aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2013-10-23 09:16:48 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2013-10-23 09:16:48 +0000
commit1a3de1e4f73ce4329edb99e72fc428b8f69edfd7 (patch)
tree1d3e50d96f40efce57672c6eaa6578f550deed58
parentfd5c980f1770aa74b9d4dd2ecdbaeb5abbb7b8de (diff)
fixed empty toolbar icons.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@3289 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r--ChangeLog5
-rw-r--r--src/stock_pixmap.c8
2 files changed, 11 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 1f764f7c..11a22b14 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-10-23
+
+ * src/stock_pixmap.c: stock_pixbuf_widget_for_toolbar():
+ check if icon for stock id exist (fixes empty toolbar icons).
+
2013-10-04
* src/compose.c
diff --git a/src/stock_pixmap.c b/src/stock_pixmap.c
index e41b405b..5cb8c5e2 100644
--- a/src/stock_pixmap.c
+++ b/src/stock_pixmap.c
@@ -251,8 +251,12 @@ GtkWidget *stock_pixbuf_widget_for_toolbar(StockPixmap icon)
image = gtk_image_new_from_pixbuf(pix_d->icon_file_pixbuf);
}
- if (!image && pix_d->icon_name)
- image = gtk_image_new_from_stock(pix_d->icon_name, GTK_ICON_SIZE_LARGE_TOOLBAR);
+ if (!image && pix_d->icon_name) {
+ if (gtk_style_lookup_icon_set(gtk_widget_get_default_style(), pix_d->icon_name))
+ image = gtk_image_new_from_stock(pix_d->icon_name, GTK_ICON_SIZE_LARGE_TOOLBAR);
+ else
+ pix_d->icon_name = NULL;
+ }
if (!image)
image = stock_pixbuf_widget(NULL, icon);