[maemo-commits] [maemo-commits] r19348 - in projects/haf/trunk/hildon-input-method-plugins-example: . src

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Tue Sep 15 12:53:23 EEST 2009
Author: jrocha
Date: 2009-09-15 12:53:19 +0300 (Tue, 15 Sep 2009)
New Revision: 19348

Modified:
   projects/haf/trunk/hildon-input-method-plugins-example/ChangeLog
   projects/haf/trunk/hildon-input-method-plugins-example/src/hildon-im-onehand-fkb.c
Log:
2009-09-15  Joaquim Rocha <jrocha at igalia.com>

    * hildon-im-onehand-fkb.c: Added support to favorite hand, for
      use in landscape mode.

Modified: projects/haf/trunk/hildon-input-method-plugins-example/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-input-method-plugins-example/ChangeLog	2009-09-15 09:23:39 UTC (rev 19347)
+++ projects/haf/trunk/hildon-input-method-plugins-example/ChangeLog	2009-09-15 09:53:19 UTC (rev 19348)
@@ -1,7 +1,7 @@
 2009-09-15  Joaquim Rocha <jrocha at igalia.com>
 
 	* hildon-im-onehand-fkb.c: Added a scrolled window to the one-handexample
-	  keyboard.
+	  keyboard; Added support to favorite hand, for use in landscape mode.
 
 2009-09-10  Murray Cumming  <murrayc at murrayc.com>
 

Modified: projects/haf/trunk/hildon-input-method-plugins-example/src/hildon-im-onehand-fkb.c
===================================================================
--- projects/haf/trunk/hildon-input-method-plugins-example/src/hildon-im-onehand-fkb.c	2009-09-15 09:23:39 UTC (rev 19347)
+++ projects/haf/trunk/hildon-input-method-plugins-example/src/hildon-im-onehand-fkb.c	2009-09-15 09:53:19 UTC (rev 19348)
@@ -32,6 +32,7 @@
 #include <hildon/hildon.h>
 
 #define SLIDING_TIMEOUT 1000
+#define FAVORITE_HAND LEFT
 
 #define MCE_RULE "type='signal', interface='" MCE_SIGNAL_IF "', member='" MCE_DEVICE_ORIENTATION_SIG "'"
 #define MCE_PORTRAIT_MODE_NAME "portrait"
@@ -57,6 +58,12 @@
   LANDSCAPE
 } ScreenMode;
 
+typedef enum
+{
+  RIGHT,
+  LEFT
+} HandMode;
+
 typedef struct
 {
   GtkContainerClass parent;
@@ -84,6 +91,7 @@
   gint keys_width;
 
   ScreenMode screen_mode;
+  HandMode hand_mode;
   gint fkb_width;
   gint fkb_height;
 
@@ -287,6 +295,7 @@
   priv->caps_button = NULL;
 
   priv->screen_mode = LANDSCAPE;
+  priv->hand_mode = FAVORITE_HAND;
   priv->replace_previous_char = FALSE;
   priv->slide_index = -1;
   priv->timeout_id = 0;
@@ -885,6 +894,10 @@
 
   if (mode == LANDSCAPE)
   {
+    if (priv->hand_mode == LEFT)
+    {
+      gtk_box_reorder_child (GTK_BOX (container), priv->keyboard, 0);
+    }
     gtk_widget_set_size_request (priv->text_view, priv->fkb_width / 2, -1);
   }
   else

More information about the maemo-commits mailing list