]> spindle.queued.net Git - midori/commitdiff
Use a different method of working around the icon entry bug
authorChristian Dywan <christian@twotoasts.de>
Sun, 12 Jul 2009 21:22:39 +0000 (23:22 +0200)
committerChristian Dywan <christian@twotoasts.de>
Sun, 12 Jul 2009 21:22:39 +0000 (23:22 +0200)
midori/gtkiconentry.c

index 6882eb49d46dba6c686f398741003ff1596f03ab..8c28c77f5589b2c58663199685561bfa5862fef4 100644 (file)
@@ -27,17 +27,13 @@ gtk_icon_entry_set_icon_from_pixbuf (GtkEntry*            entry,
                                      GtkEntryIconPosition position,
                                      GdkPixbuf*           pixbuf)
 {
-    GtkWidget* widget = GTK_WIDGET (entry);
-    GtkWidget* window;
+    gboolean activatable;
 
     /* Without this ugly hack pixbuf icons don't work */
-    gtk_widget_hide (widget);
+    activatable = gtk_entry_get_icon_activatable (entry, position);
     gtk_entry_set_icon_from_pixbuf (entry, position, pixbuf);
-    gtk_widget_show (widget);
-
-    if ((window = gtk_widget_get_toplevel (widget)))
-        if (GTK_IS_WINDOW (window))
-            gtk_window_set_focus (GTK_WINDOW (window), widget);
+    gtk_entry_set_icon_activatable (entry, position, !activatable);
+    gtk_entry_set_icon_activatable (entry, position, activatable);
 }
 
 #else