aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/obsolete
diff options
context:
space:
mode:
authorFrans Meulenbroeks <fransmeulenbroeks@gmail.com>2010-10-06 18:46:04 +0200
committerFrans Meulenbroeks <fransmeulenbroeks@gmail.com>2010-10-06 18:46:04 +0200
commit26bba2c6334757a47f600a8756e39832a8521c57 (patch)
tree5ced02c98e4ef52220971feac01330dd7cb8d51d /recipes/obsolete
parentf58a5d59b755bdb725497f574a8059529c134c27 (diff)
downloadopenembedded-26bba2c6334757a47f600a8756e39832a8521c57.tar.gz
matchbox-keyboard : moved unused files to obsolete dir
Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/obsolete')
-rw-r--r--recipes/obsolete/matchbox-keyboard/files/matchbox-keyboard-applet.patch92
-rw-r--r--recipes/obsolete/matchbox-keyboard/files/matchbox-keyboard-hide-delay.patch99
2 files changed, 191 insertions, 0 deletions
diff --git a/recipes/obsolete/matchbox-keyboard/files/matchbox-keyboard-applet.patch b/recipes/obsolete/matchbox-keyboard/files/matchbox-keyboard-applet.patch
new file mode 100644
index 0000000000..29dc9c0ab6
--- /dev/null
+++ b/recipes/obsolete/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/recipes/obsolete/matchbox-keyboard/files/matchbox-keyboard-hide-delay.patch b/recipes/obsolete/matchbox-keyboard/files/matchbox-keyboard-hide-delay.patch
new file mode 100644
index 0000000000..c8cb76d99e
--- /dev/null
+++ b/recipes/obsolete/matchbox-keyboard/files/matchbox-keyboard-hide-delay.patch
@@ -0,0 +1,99 @@
+Index: matchbox-keyboard/src/matchbox-keyboard.h
+===================================================================
+--- matchbox-keyboard/src/matchbox-keyboard.h (revision 1669)
++++ matchbox-keyboard/src/matchbox-keyboard.h (working copy)
+@@ -285,7 +285,7 @@
+ void
+ mb_kbd_remote_init (MBKeyboardUI *ui);
+
+-void
++int
+ mb_kbd_remote_process_xevents (MBKeyboardUI *ui, XEvent *xevent);
+
+ /**** Keyboard ****/
+Index: matchbox-keyboard/src/matchbox-keyboard-ui.c
+===================================================================
+--- matchbox-keyboard/src/matchbox-keyboard-ui.c (revision 1669)
++++ matchbox-keyboard/src/matchbox-keyboard-ui.c (working copy)
+@@ -1096,6 +1096,8 @@
+ /* Key repeat - values for standard xorg install ( xset q) */
+ int repeat_delay = 100 * 10000;
+ int repeat_rate = 30 * 1000;
++ int hide_delay = 100 * 1000;
++ int to_hide = 0;
+
+ int press_x = 0, press_y = 0;
+
+@@ -1182,11 +1184,42 @@
+ mb_kbd_xembed_process_xevents (ui, &xev);
+
+ if (ui->is_daemon)
+- mb_kbd_remote_process_xevents (ui, &xev);
+-
++ {
++ switch (mb_kbd_remote_process_xevents (ui, &xev))
++ {
++ case 0:
++ if (to_hide == 1) {
++ mb_kbd_ui_hide(ui);
++ }
++ tvt.tv_usec = hide_delay;
++ to_hide = 1;
++ break;
++ case 1:
++ mb_kbd_ui_show(ui);
++ tvt.tv_usec = repeat_delay;
++ to_hide = 0;
++ break;
++ default:
++ if (to_hide == 1) {
++ mb_kbd_ui_hide(ui);
++ tvt.tv_usec = repeat_delay;
++ to_hide = 0;
++ }
++ break;
++ }
++ }
+ }
+ else
+ {
++ /* Hide timed out */
++ if (to_hide == 1)
++ {
++ DBG("Hide timed out, calling mb_kbd_ui_hide");
++ mb_kbd_ui_hide(ui);
++ tvt.tv_usec = repeat_delay;
++ to_hide = 0;
++ }
++
+ /* Keyrepeat */
+ if (mb_kbd_get_held_key(ui->kbd) != NULL)
+ {
+Index: matchbox-keyboard/src/matchbox-keyboard-remote.c
+===================================================================
+--- matchbox-keyboard/src/matchbox-keyboard-remote.c (revision 1669)
++++ matchbox-keyboard/src/matchbox-keyboard-remote.c (working copy)
+@@ -28,7 +28,7 @@
+ "_MB_IM_INVOKER_COMMAND", False);
+ }
+
+-void
++int
+ mb_kbd_remote_process_xevents (MBKeyboardUI *ui, XEvent *xevent)
+ {
+ DBG("got a message\n");
+@@ -42,9 +42,12 @@
+ DBG("got a message of type _MB_IM_INVOKER_COMMAND, val %i\n",
+ xevent->xclient.data.l[0]);
+ if (xevent->xclient.data.l[0] == 1)
+- mb_kbd_ui_show (ui);
++ {
++ return 1;
++ }
+ else
+- mb_kbd_ui_hide (ui);
++ return 0;
+ }
+ }
++ return -1;
+ }