diff options
author | Graeme Gregory <dp@xora.org.uk> | 2007-09-05 12:43:38 +0000 |
---|---|---|
committer | Graeme Gregory <dp@xora.org.uk> | 2007-09-05 12:43:38 +0000 |
commit | ea8c70b53b4ce9fea288bc7c255cd16d29a1ac18 (patch) | |
tree | 6e0b4ddeef2b71f8c1cd118f5eaeeab0ce5c25f6 | |
parent | e55876c2ba87d64c803332a181643f875a93876e (diff) | |
parent | 955d26d465ccb3637adf776afe7b7299e32bd11d (diff) |
merge of '4d795eb920749e4b57552891946fac066af26b7d'
and '7181fd7d242ef9d29a89f2d8fa4b4ab5d42801ba'
4 files changed, 98 insertions, 5 deletions
diff --git a/packages/matchbox-keyboard/files/matchbox-keyboard-applet.patch b/packages/matchbox-keyboard/files/matchbox-keyboard-applet.patch new file mode 100644 index 0000000000..29dc9c0ab6 --- /dev/null +++ b/packages/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 <stefan@openmoko.org> ++ * ++ * 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 <gtk/gtk.h> ++#include <gtk/gtkeventbox.h> + #include <matchbox-panel/mb-panel.h> + #include <matchbox-panel/mb-panel-scaling-image.h> + #include <gtk-im/im-protocol.h> + ++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; + } diff --git a/packages/matchbox-keyboard/matchbox-keyboard-inputmethod_svn.bb b/packages/matchbox-keyboard/matchbox-keyboard-inputmethod_svn.bb index 0ecb5e947d..a0e35824b8 100644 --- a/packages/matchbox-keyboard/matchbox-keyboard-inputmethod_svn.bb +++ b/packages/matchbox-keyboard/matchbox-keyboard-inputmethod_svn.bb @@ -6,10 +6,11 @@ RPROVIDES_${PN} = matchbox-keyboard #DEFAULT_PREFERENCE = "-1" SECTION = "x11" PV = "0.0+svn${SRCDATE}" -PR = "r2" +PR = "r4" SRC_URI = "svn://svn.o-hand.com/repos/matchbox/trunk;module=matchbox-keyboard;proto=http \ - file://80matchboxkeyboard" + file://matchbox-keyboard-applet.patch;patch=1;pnum=0 \ + file://80matchboxkeyboard" SRC_URI_append_fic-gta01 = " file://fic-gta01-font-size.patch;patch=1" diff --git a/packages/openmoko2/openmoko-session2.bb b/packages/openmoko2/openmoko-session2.bb index 31d38382df..de2d7cdff6 100644 --- a/packages/openmoko2/openmoko-session2.bb +++ b/packages/openmoko2/openmoko-session2.bb @@ -4,7 +4,7 @@ SECTION = "x11" RDEPENDS = "matchbox-common matchbox-applet-startup-monitor matchbox-panel-2" RDEPENDS += "openmoko-common2 openmoko-today2 openmoko-dialer2" RCONFLICTS = "openmoko-session" -PR = "r30" +PR = "r31" SRC_URI = "file://etc" S = ${WORKDIR} diff --git a/packages/openmoko2/openmoko-session2/etc/matchbox/session b/packages/openmoko2/openmoko-session2/etc/matchbox/session index dee3e58051..9e1c0a2aad 100755 --- a/packages/openmoko2/openmoko-session2/etc/matchbox/session +++ b/packages/openmoko2/openmoko-session2/etc/matchbox/session @@ -8,7 +8,7 @@ openmoko-dialer & matchbox-window-manager -use_titlebar yes -use_desktop_mode decorated -theme openmoko-standard-2 -use_cursor $SHOWCURSOR $@ & -matchbox-panel-2 --start-applets systray,startup \ - --end-applets openmoko-panel-battery,openmoko-panel-gsm,openmoko-panel-gps,openmoko-panel-usb,openmoko-panel-bt,openmoko-panel-clock --titlebar & +matchbox-panel-2 --start-applets startup \ + --end-applets openmoko-panel-battery,openmoko-panel-gsm,openmoko-panel-gps,openmoko-panel-usb,openmoko-panel-bt,openmoko-panel-clock,keyboard --titlebar & exec neod |