[gedit] gtk_main_quit instead of app object unref when last window closed



commit 90c9889a4a31fbebfa042c5d2c64bb2b05160b10
Author: Jesse van den Kieboom <jesse vandenkieboom epfl ch>
Date:   Wed May 5 23:23:03 2010 +0200

    gtk_main_quit instead of app object unref when last window closed
    
    Plugin engine finalization calls app_get_default which
    reconstructs the app object. Before that was reasonably ok
    because it didn't really do anything, but now the app does stuff
    in 'init'.

 gedit/gedit-app.c |   10 +---------
 1 files changed, 1 insertions(+), 9 deletions(-)
---
diff --git a/gedit/gedit-app.c b/gedit/gedit-app.c
index 2789067..aa5cabd 100644
--- a/gedit/gedit-app.c
+++ b/gedit/gedit-app.c
@@ -116,13 +116,6 @@ gedit_app_get_property (GObject    *object,
 	}
 }
 
-static void
-app_weak_notify (gpointer  data,
-                 GObject  *where_the_app_was)
-{
-	gtk_main_quit ();
-}
-
 static GObject *
 gedit_app_constructor (GType                  gtype,
                        guint                  n_construct_params,
@@ -137,7 +130,6 @@ gedit_app_constructor (GType                  gtype,
 		                                                            construct_params);
 
 		g_object_add_weak_pointer (app, (gpointer *) &app);
-		g_object_weak_ref (app, app_weak_notify, NULL);
 
 		return app;
 	}
@@ -584,7 +576,7 @@ window_destroy (GeditWindow *window,
 		save_page_setup (app);
 		save_print_settings (app);
 
-		g_object_unref (app);
+		gtk_main_quit ();
 	}
 }
 



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