2006-10-20 Michael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
authorMichael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
Fri, 20 Oct 2006 11:02:28 +0000 (11:02 +0000)
committerMichael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
Fri, 20 Oct 2006 11:02:28 +0000 (11:02 +0000)
* hildon-widgets/hildon-find-toolbar.c: Do not grab focus but just
hide the IM context when the toolbar is being closed. Patch by Tomas
Ostman, fixes for good NB#34193.

ChangeLog
hildon-widgets/hildon-find-toolbar.c

index d37a03e..d880c8c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2006-10-20  Michael Dominic Kostrzewa  <michael.kostrzewa@nokia.com> 
 
+       * hildon-widgets/hildon-find-toolbar.c: Do not grab focus but just
+       hide the IM context when the toolbar is being closed. Patch by Tomas
+       Ostman, fixes for good NB#34193. 
+
+2006-10-20  Michael Dominic Kostrzewa  <michael.kostrzewa@nokia.com> 
+
        * hildon-widgets/hildon-date-editor.c: Changing the error infobanner
        displayed to ckct_ib_illegal_character (when user presses non-numeric
        character in the date editor).
index 7eb7f0f..33a9e69 100644 (file)
@@ -373,8 +373,12 @@ hildon_find_toolbar_emit_search(GtkButton *button, gpointer self)
 static void
 hildon_find_toolbar_emit_close(GtkButton *button, gpointer self)
 {
-  GtkWidget *parent = gtk_widget_get_parent (GTK_WIDGET (self));
-  gtk_widget_grab_focus (parent);
+  HildonFindToolbarPrivate *priv = HILDON_FIND_TOOLBAR(self)->priv;
+  GtkWidget *entry = gtk_bin_get_child(GTK_BIN(priv->entry_combo_box));
+  if (GTK_WIDGET_HAS_FOCUS(entry))
+    {
+      hildon_gtk_im_context_hide(GTK_ENTRY(entry)->im_context);
+    }
   /* Clicked close button */
   g_signal_emit_by_name(self, "close", NULL);
 }