]> git.donarmstrong.com Git - xournal.git/commitdiff
fix: close dialog should focus on "Save"
authorauroux <auroux>
Mon, 18 Oct 2010 18:45:36 +0000 (18:45 +0000)
committerauroux <auroux>
Mon, 18 Oct 2010 18:45:36 +0000 (18:45 +0000)
ChangeLog
src/xo-misc.c

index 82b8abbff9563832806882f512da15a8faafe3ca..a5b18ae7caa983f8a6ed52020c438ecb3b113180 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,8 @@ This version:
   - Spanish translation (Alvaro), Brazil Portuguese translation (Marco Souza)
   - fix save bug with text boxes containing > 4095 characters
   - Czech translation (David Kolibac), Dutch translation (Timo Kluck)
+  - fix crash upon unplugging input devices
+  - change close dialog box default to "save" (patch by Kit Barnes)
 
 Version 0.4.5 (Oct 2, 2009):
   - bugfixes for GTK+ 2.16/2.17 issues with xinput events
index cb8fd485ef75db7753d207aa64bf80a5f6b80d1e..158b81bb028556ab57a1cac9ea28699f948b6358 100644 (file)
@@ -1659,9 +1659,12 @@ gboolean ok_to_close(void)
 
   if (ui.saved) return TRUE;
   dialog = gtk_message_dialog_new(GTK_WINDOW (winMain), GTK_DIALOG_DESTROY_WITH_PARENT,
-    GTK_MESSAGE_WARNING, GTK_BUTTONS_YES_NO, _("Save changes to '%s'?"),
+    GTK_MESSAGE_WARNING, GTK_BUTTONS_NONE, _("Save changes to '%s'?"),
     (ui.filename!=NULL) ? ui.filename:_("Untitled"));
+  gtk_dialog_add_button(GTK_DIALOG (dialog), GTK_STOCK_DISCARD, GTK_RESPONSE_NO);
+  gtk_dialog_add_button(GTK_DIALOG (dialog), GTK_STOCK_SAVE, GTK_RESPONSE_YES);
   gtk_dialog_add_button(GTK_DIALOG (dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
+  gtk_dialog_set_default_response(GTK_DIALOG (dialog), GTK_RESPONSE_YES);
   response = gtk_dialog_run(GTK_DIALOG (dialog));
   gtk_widget_destroy(dialog);
   if (response == GTK_RESPONSE_CANCEL || response == GTK_RESPONSE_DELETE_EVENT)