[anjuta] python-support: Adjust preferences page generation a bit



commit 977e84eb22965573c2150468dd6f4d7b626124e4
Author: Johannes Schmid <jhs gnome org>
Date:   Tue Aug 24 22:20:47 2010 +0200

    python-support: Adjust preferences page generation a bit
    
    Might help with some strage text-field bugs

 plugins/language-support-python/plugin.c |   12 +++++++-----
 plugins/language-support-python/plugin.h |    3 +++
 2 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/plugins/language-support-python/plugin.c b/plugins/language-support-python/plugin.c
index efb48e4..532e9bb 100644
--- a/plugins/language-support-python/plugin.c
+++ b/plugins/language-support-python/plugin.c
@@ -1355,20 +1355,22 @@ ipreferences_merge (IAnjutaPreferences* ipref, AnjutaPreferences* prefs,
 					GError** e)
 {
 	/* Add preferences */
-	GtkBuilder *pref_page = gtk_builder_new();
+	PythonPlugin* plugin = ANJUTA_PLUGIN_PYTHON (ipref);
 	gchar *objects[] = {"python_preferences_dialog", NULL};
-	gtk_builder_add_objects_from_file(pref_page, PROPERTIES_FILE_UI, objects, NULL);
+	plugin->bxml = gtk_builder_new();
+	gtk_builder_add_objects_from_file(plugin->bxml, PROPERTIES_FILE_UI, objects, NULL);
 	anjuta_preferences_add_from_builder (prefs,
-								 pref_page, "preferences", _("Python"),
-								 ICON_FILE);
-	g_object_unref (pref_page);
+	                                     plugin->bxml, "preferences", _("Python"),
+	                                     ICON_FILE);
 }
 
 static void
 ipreferences_unmerge (IAnjutaPreferences* ipref, AnjutaPreferences* prefs,
 					  GError** e)
 {
+	PythonPlugin* plugin = ANJUTA_PLUGIN_PYTHON (ipref);
 	anjuta_preferences_remove_page(prefs, _("Python"));
+	g_object_unref (plugin->bxml);
 }
 
 static void
diff --git a/plugins/language-support-python/plugin.h b/plugins/language-support-python/plugin.h
index 92b617e..560d46c 100644
--- a/plugins/language-support-python/plugin.h
+++ b/plugins/language-support-python/plugin.h
@@ -76,6 +76,9 @@ struct _PythonPlugin{
 	
 	/* Assist */
 	PythonAssist *assist;
+
+	/* Preferences */
+	GtkBuilder* bxml;
 };
 
 struct _PythonPluginClass{



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