Use a different method of working around the icon entry bug

This commit is contained in:
Christian Dywan 2009-07-12 23:22:39 +02:00
parent 4001396443
commit 8a2d55b918

View 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