From 8a2d55b91848ea0a535c229cb873be9c5a804f1d Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Sun, 12 Jul 2009 23:22:39 +0200 Subject: [PATCH] Use a different method of working around the icon entry bug --- midori/gtkiconentry.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) 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 -- 2.39.5