[anjuta] glade: Use glade_app_get() insetad of glade_app_new()



commit ebd0dceada2bf6fe2ba568e0e92a856a34b744ca
Author: Johannes Schmid <jhs gnome org>
Date:   Thu Jan 6 14:58:07 2011 +0100

    glade: Use glade_app_get() insetad of glade_app_new()
    
    GladeApp is a singleton and should be used like this.

 plugins/glade/plugin.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/plugins/glade/plugin.c b/plugins/glade/plugin.c
index c684886..a7861a9 100644
--- a/plugins/glade/plugin.c
+++ b/plugins/glade/plugin.c
@@ -378,7 +378,7 @@ activate_plugin (AnjutaPlugin *plugin)
 		anjuta_status_busy_push (status);
 		anjuta_status_set (status, "%s", _("Loading Gladeâ?¦"));
 
-		priv->app = glade_app_new ();
+		priv->app = glade_app_get ();
 
 		glade_app_set_window (GTK_WIDGET (ANJUTA_PLUGIN(plugin)->shell));
 		glade_app_set_transient_parent (GTK_WINDOW (ANJUTA_PLUGIN(plugin)->shell));
@@ -469,8 +469,6 @@ deactivate_plugin (AnjutaPlugin *plugin)
 	priv->uiid = 0;
 	priv->action_group = NULL;
 
-	g_object_unref (priv->app);
-	
 	priv->app = NULL;
 
 	return TRUE;



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