diff options
Diffstat (limited to 'app-i18n/ibus-handwrite/files/ibus-handwrite-nested-function.patch')
-rw-r--r-- | app-i18n/ibus-handwrite/files/ibus-handwrite-nested-function.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/app-i18n/ibus-handwrite/files/ibus-handwrite-nested-function.patch b/app-i18n/ibus-handwrite/files/ibus-handwrite-nested-function.patch new file mode 100644 index 000000000000..96cbc118fa4f --- /dev/null +++ b/app-i18n/ibus-handwrite/files/ibus-handwrite-nested-function.patch @@ -0,0 +1,26 @@ +--- a/src/UI_gtk.c ++++ b/src/UI_gtk.c +@@ -74,6 +74,11 @@ + return TRUE; + } + ++static void clicked(GtkButton *button, IBusHandwriteEngine *engine) ++{ ++ ibus_handwrite_engine_commit_text(engine,GPOINTER_TO_INT(g_object_get_data(G_OBJECT(button),"order"))); ++} ++ + static void regen_loopuptable(GtkWidget * widget, IBusHandwriteEngine * engine) + { + int i; +@@ -98,11 +103,6 @@ + + gtk_widget_show(bt); + +- void clicked(GtkButton *button, IBusHandwriteEngine *engine) +- { +- ibus_handwrite_engine_commit_text(engine,GPOINTER_TO_INT(g_object_get_data(G_OBJECT(button),"order"))); +- } +- + g_object_set_data(G_OBJECT(bt),"order",GINT_TO_POINTER(i)); + g_signal_connect(bt,"clicked",G_CALLBACK(clicked),engine); + |