diff options
Diffstat (limited to 'frontends/gtk/compat.c')
-rw-r--r-- | frontends/gtk/compat.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/frontends/gtk/compat.c b/frontends/gtk/compat.c index a75fdafdc..bd3f46ee5 100644 --- a/frontends/gtk/compat.c +++ b/frontends/gtk/compat.c @@ -170,18 +170,18 @@ void nsgtk_entry_set_icon_from_pixbuf(GtkWidget *entry, /* exported interface documented in gtk/compat.h */ -void nsgtk_entry_set_icon_from_stock(GtkWidget *entry, - GtkEntryIconPosition icon_pos, - const gchar *id) +void nsgtk_entry_set_icon_from_icon_name(GtkWidget *entry, + GtkEntryIconPosition icon_pos, + const gchar *id) { #ifdef NSGTK_USE_ICON_NAME gtk_entry_set_icon_from_icon_name(GTK_ENTRY(entry), icon_pos, id); #else #if GTK_CHECK_VERSION(2,16,0) - gtk_entry_set_icon_from_stock(GTK_ENTRY(entry), icon_pos, id); + gtk_entry_set_icon_from_icon_name(GTK_ENTRY(entry), icon_pos, id); #else - GtkImage *image = GTK_IMAGE(gtk_image_new_from_stock(id, - GTK_ICON_SIZE_LARGE_TOOLBAR)); + GtkImage *image; + image = GTK_IMAGE(gtk_image_new_from_stock(id, GTK_ICON_SIZE_LARGE_TOOLBAR)); if (image != NULL) { sexy_icon_entry_set_icon(SEXY_ICON_ENTRY(entry), @@ -635,7 +635,9 @@ void nsgtk_widget_set_margins(GtkWidget *widget, gint hmargin, gint vmargin) gtk_widget_set_margin_top(widget, vmargin); gtk_widget_set_margin_bottom(widget, vmargin); #else - gtk_misc_set_padding(GTK_MISC(widget), hmargin, vmargin); + if (GTK_IS_MISC(widget)) { + gtk_misc_set_padding(GTK_MISC(widget), hmargin, vmargin); + } #endif } |