From 709c4d66e0b107ca606941b988bad717c0b45d9b Mon Sep 17 00:00:00 2001 From: Denys Dmytriyenko Date: Tue, 17 Mar 2009 14:32:59 -0400 Subject: rename packages/ to recipes/ per earlier agreement See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko Acked-by: Mike Westerhof Acked-by: Philip Balister Acked-by: Khem Raj Acked-by: Marcin Juszkiewicz Acked-by: Koen Kooi Acked-by: Frans Meulenbroeks --- .../files/matchbox-keyboard-applet.patch | 92 ++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 recipes/matchbox-keyboard/files/matchbox-keyboard-applet.patch (limited to 'recipes/matchbox-keyboard/files/matchbox-keyboard-applet.patch') diff --git a/recipes/matchbox-keyboard/files/matchbox-keyboard-applet.patch b/recipes/matchbox-keyboard/files/matchbox-keyboard-applet.patch new file mode 100644 index 0000000000..29dc9c0ab6 --- /dev/null +++ b/recipes/matchbox-keyboard/files/matchbox-keyboard-applet.patch @@ -0,0 +1,92 @@ +Index: applet/applet.c +=================================================================== +--- applet/applet.c (revision 1633) ++++ applet/applet.c (working copy) +@@ -1,30 +1,76 @@ ++/* ++ * keyboard - Tray applet to toggle matchbox-keyboard's gtk-im ++ * ++ * Copyright 2007, Openedhand Ltd. ++ * Author Stefan Schmidt ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; version 2 of the license. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ */ ++ + #include ++#include + #include + #include + #include + ++typedef struct { ++ GtkWidget *event_box; ++ gboolean show; ++} KeyboardApplet; ++ + static void +-on_toggled (GtkToggleButton *button) ++on_toggled (GtkWidget *event_box, GdkEventButton *event, KeyboardApplet *applet) + { +- protocol_send_event (gtk_toggle_button_get_active (button) ? +- INVOKE_KBD_SHOW : INVOKE_KBD_HIDE); ++ ++ protocol_send_event (applet->show ? INVOKE_KBD_SHOW : INVOKE_KBD_HIDE); ++ ++ if (applet->show) ++ applet->show = FALSE; ++ else ++ applet->show = TRUE; + } + ++static void ++keyboard_applet_free (KeyboardApplet *applet) ++{ ++ g_slice_free (KeyboardApplet, applet); ++} ++ + G_MODULE_EXPORT GtkWidget * + mb_panel_applet_create (const char *id, GtkOrientation orientation) + { +- GtkWidget *button, *image; ++ KeyboardApplet *applet; ++ MBPanelScalingImage *image; ++ //GtkImage *image; + +- button = gtk_toggle_button_new (); +- gtk_widget_set_name (button, "MatchboxPanelKeyboard"); +- gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE); ++ /* Create applet data structure */ ++ applet = g_slice_new (KeyboardApplet); + ++ applet->event_box = gtk_event_box_new (); ++ gtk_event_box_set_visible_window (applet->event_box, FALSE); ++ ++ gtk_widget_set_name (applet->event_box, "MatchboxPanelKeyboard"); ++ + image = mb_panel_scaling_image_new (orientation, "matchbox-keyboard"); +- gtk_container_add (GTK_CONTAINER (button), image); + +- g_signal_connect (button, "toggled", G_CALLBACK (on_toggled), NULL); ++ gtk_container_add (GTK_CONTAINER (applet->event_box), image); + +- gtk_widget_show_all (button); ++ g_object_weak_ref (G_OBJECT (applet->event_box), ++ (GWeakNotify) keyboard_applet_free, applet); + +- return button; ++ /* Toggle the on release event */ ++ g_signal_connect (applet->event_box, "button-release-event", ++ G_CALLBACK (on_toggled), applet); ++ ++ gtk_widget_show_all (applet->event_box); ++ ++ return applet->event_box; + } -- cgit v1.2.3