Use a different method of working around the icon entry bug
This commit is contained in:
parent
4001396443
commit
8a2d55b918
1 changed files with 4 additions and 8 deletions
|
@ -27,17 +27,13 @@ gtk_icon_entry_set_icon_from_pixbuf (GtkEntry* entry,
|
||||||
GtkEntryIconPosition position,
|
GtkEntryIconPosition position,
|
||||||
GdkPixbuf* pixbuf)
|
GdkPixbuf* pixbuf)
|
||||||
{
|
{
|
||||||
GtkWidget* widget = GTK_WIDGET (entry);
|
gboolean activatable;
|
||||||
GtkWidget* window;
|
|
||||||
|
|
||||||
/* Without this ugly hack pixbuf icons don't work */
|
/* 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_entry_set_icon_from_pixbuf (entry, position, pixbuf);
|
||||||
gtk_widget_show (widget);
|
gtk_entry_set_icon_activatable (entry, position, !activatable);
|
||||||
|
gtk_entry_set_icon_activatable (entry, position, activatable);
|
||||||
if ((window = gtk_widget_get_toplevel (widget)))
|
|
||||||
if (GTK_IS_WINDOW (window))
|
|
||||||
gtk_window_set_focus (GTK_WINDOW (window), widget);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in a new issue