From: Christian Dywan Date: Sun, 12 Jul 2009 21:22:39 +0000 (+0200) Subject: Use a different method of working around the icon entry bug X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a2d55b91848ea0a535c229cb873be9c5a804f1d;p=midori Use a different method of working around the icon entry bug --- diff --git a/midori/gtkiconentry.c b/midori/gtkiconentry.c index 6882eb49..8c28c77f 100644 --- a/midori/gtkiconentry.c +++ b/midori/gtkiconentry.c @@ -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