[anjuta] python-support: Create correct signals handlers with widget object



commit 8a0833a1f2f6bc8c34564b1d40a0c4e5d7f0690d
Author: Johannes Schmid <jhs gnome org>
Date:   Thu Mar 17 19:22:49 2011 -0400

    python-support: Create correct signals handlers with widget object

 plugins/language-support-python/plugin.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/plugins/language-support-python/plugin.c b/plugins/language-support-python/plugin.c
index f6f0eee..b7f535e 100644
--- a/plugins/language-support-python/plugin.c
+++ b/plugins/language-support-python/plugin.c
@@ -212,10 +212,12 @@ on_glade_drop (IAnjutaEditor* editor,
 
 	g_signal_query (id, &query);
 
-	g_string_append_printf (str, "\ndef %s (self", handler);
+	g_string_append_printf (str, "\ndef %s (self, %s", handler,
+	                        language_support_get_signal_parameter (widget,
+	                                                               &names));
 	for (i = 0; i < query.n_params; i++)
 	{
-		const gchar* type_name = g_type_name (query.param_types[i]);
+				const gchar* type_name = g_type_name (query.param_types[i]);
 		const gchar* param_name = language_support_get_signal_parameter (type_name,
 		                                                                 &names);
 
@@ -496,7 +498,7 @@ python_plugin_activate (AnjutaPlugin *plugin)
 	AnjutaUI *ui;
 
 	PythonPlugin *python_plugin;
-	static gboolean initialized = FALSE;
+	static gboolean initialized = FALSE;	
 
 	python_plugin = (PythonPlugin*) plugin;
 	



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