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

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Tue Oct 9 13:57:53 EEST 2007
Author: tjunnone
Date: 2007-10-09 13:57:51 +0300 (Tue, 09 Oct 2007)
New Revision: 14379

Modified:
   projects/haf/trunk/hildon-input-method-plugins-example/ChangeLog
   projects/haf/trunk/hildon-input-method-plugins-example/src/him-vkb-example.c
Log:
2007-10-09  Tomas Junnonen  <tomas.junnonen at nokia.com>

        * src/him-vkb-example.c: Fixed the keyboard not keeping
          up with theme changes.



Modified: projects/haf/trunk/hildon-input-method-plugins-example/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-input-method-plugins-example/ChangeLog	2007-10-09 10:19:34 UTC (rev 14378)
+++ projects/haf/trunk/hildon-input-method-plugins-example/ChangeLog	2007-10-09 10:57:51 UTC (rev 14379)
@@ -1,3 +1,8 @@
+2007-10-09  Tomas Junnonen  <tomas.junnonen at nokia.com>
+
+	* src/him-vkb-example.c: Fixed the keyboard not keeping
+	  up with theme changes.
+
 2007-09-11  Mohammad Anwari  <Mohammad.Anwari at nokia.com>
 
 	* Version 1.99.5

Modified: projects/haf/trunk/hildon-input-method-plugins-example/src/him-vkb-example.c
===================================================================
--- projects/haf/trunk/hildon-input-method-plugins-example/src/him-vkb-example.c	2007-10-09 10:19:34 UTC (rev 14378)
+++ projects/haf/trunk/hildon-input-method-plugins-example/src/him-vkb-example.c	2007-10-09 10:57:51 UTC (rev 14379)
@@ -368,6 +368,29 @@
   }
 }
 
+static void 
+style_set_cb (GtkWidget *widget,
+              GtkStyle *previous_style,
+              gpointer user_data)
+{ 
+  HimExampleVKB        *vkb;
+  HimExampleVKBPrivate *priv;
+  GtkStyle *style;
+
+  g_return_if_fail (IS_HIMEXAMPLE_VKB (widget));
+  vkb = HIMEXAMPLE_VKB (widget);
+  priv = HIMEXAMPLE_VKB_GET_PRIVATE (vkb);
+
+  if (previous_style == NULL)
+  {
+    return;
+  }
+
+  priv->style = gtk_rc_get_style_by_paths (
+      gtk_widget_get_settings(GTK_WIDGET(widget)),
+      ".osso-im-key", NULL, GTK_TYPE_BUTTON);
+}
+
 /* Implementation of plugin interface starts here */
 static void
 himExample_vkb_init (HimExampleVKB *vkb)
@@ -381,6 +404,8 @@
   priv->keys          = NULL;
   priv->screen_mode   = SCREEN_NORMAL;
   priv->case_mode     = CASE_LOWER;
+
+  g_signal_connect (vkb, "style-set", (GCallback) style_set_cb, NULL);
 }
 
 GtkWidget *


More information about the maemo-commits mailing list