glom r2026 - in trunk: . glom glom/bakery



Author: murrayc
Date: Tue Mar 24 13:21:50 2009
New Revision: 2026
URL: http://svn.gnome.org/viewvc/glom?rev=2026&view=rev

Log:
2009-03-24  Murray Cumming  <murrayc murrayc com>

* glom/main.cc: Stop the mainloop when the window is hidden, and then 
delete it. I think this was done by AppInstanceManager before.

Modified:
   trunk/ChangeLog
   trunk/glom/bakery/app_withdoc_gtk.cc
   trunk/glom/main.cc

Modified: trunk/glom/bakery/app_withdoc_gtk.cc
==============================================================================
--- trunk/glom/bakery/app_withdoc_gtk.cc	(original)
+++ trunk/glom/bakery/app_withdoc_gtk.cc	Tue Mar 24 13:21:50 2009
@@ -467,7 +467,7 @@
 
 bool App_WithDoc_Gtk::on_delete_event(GdkEventAny* /* event */)
 {
-  //Clicking on the [x] in the title bar should be like choosing File|New
+  //Clicking on the [x] in the title bar should be like choosing File|Close
   on_menu_file_close();
 
   return true; // true = don't hide, don't destroy

Modified: trunk/glom/main.cc
==============================================================================
--- trunk/glom/main.cc	(original)
+++ trunk/glom/main.cc	Tue Mar 24 13:21:50 2009
@@ -309,11 +309,11 @@
 
     bool test = pApp_Glom->init(input_uri); //Sets it up and shows it.
     if(test) //The user could cancel the offer of a new or existing database.
-    {
-      Gtk::Main::run();
-    }
-    else
-      delete pApp_Glom;
+      Gtk::Main::run(*pApp_Glom); //Quit when the window is closed.
+
+    //Cleanup:
+    delete pApp_Glom;
+    pApp_Glom = 0;
   }
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
   catch(const Glib::Exception& ex)



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