955 |
static void on_edit_clicked(GtkButton *button, gpointer data) { |
static void on_edit_clicked(GtkButton *button, gpointer data) { |
956 |
project_context_t *context = (project_context_t*)data; |
project_context_t *context = (project_context_t*)data; |
957 |
|
|
958 |
if(diff_present(context->project) || project_active_n_dirty(context)) { |
if(diff_present(context->project) || project_active_n_dirty(context)) |
959 |
if(!yes_no_f(context->dialog, NULL, 0, 0, |
messagef(context->dialog, |
960 |
_("Discard pending changes?"), |
_("Pending changes"), |
961 |
_("You have pending changes in this project. Changing " |
_("You have pending changes in this project.\n\n" |
962 |
"the area will discard these changes.\n\nDo you want to " |
"Changing the area may cause pending changes to be " |
963 |
"discard all your changes?"))) |
"lost if they are outside the updated area.")); |
|
return; |
|
|
|
|
|
diff_remove(context->project); |
|
|
project_diffstat(context); |
|
|
gtk_widget_set_sensitive(context->diff_remove, FALSE); |
|
|
} |
|
964 |
|
|
965 |
if(area_edit(&context->area_edit)) { |
if(area_edit(&context->area_edit)) { |
966 |
printf("coordinates changed!!\n"); |
printf("coordinates changed!!\n"); |