dasher r3514 - in trunk: . Src/Gtk2



Author: pcowans
Date: Tue Apr 22 20:22:28 2008
New Revision: 3514
URL: http://svn.gnome.org/viewvc/dasher?rev=3514&view=rev

Log:
* Applied bugfix patch


Modified:
   trunk/ChangeLog
   trunk/Src/Gtk2/dasher_main.cpp

Modified: trunk/Src/Gtk2/dasher_main.cpp
==============================================================================
--- trunk/Src/Gtk2/dasher_main.cpp	(original)
+++ trunk/Src/Gtk2/dasher_main.cpp	Tue Apr 22 20:22:28 2008
@@ -1111,14 +1111,22 @@
     }
   }
   else {
-    // It should be noted that write_to_file merely saves the new text to the training
-    // file rather than saving it to a file of the user's choice
-
-    // FIXME - REIMPLEMENT
-
-    //    write_to_file();
+	pDialogue = gtk_message_dialog_new(GTK_WINDOW(pPrivate->pMainWindow), GTK_DIALOG_MODAL, 
+					 GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE, 
+					 _("Are you sure you wish to quit?"));
+
+    	gtk_dialog_add_buttons(GTK_DIALOG(pDialogue), 
+			   _("Don't quit"), GTK_RESPONSE_REJECT,
+			   _("Quit"), GTK_RESPONSE_ACCEPT, 
+			   NULL);
 
-    gtk_main_quit();
+    switch (gtk_dialog_run(GTK_DIALOG(pDialogue))) {
+    case GTK_RESPONSE_REJECT:
+	gtk_widget_destroy(GTK_WIDGET(pDialogue));
+      break;
+    case GTK_RESPONSE_ACCEPT:
+      gtk_main_quit();
+    }
   }
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]