diff options
author | TotalCaesar659 <x24cm5b8c54q6szxw@yandex.ru> | 2017-09-22 00:38:37 +0300 |
---|---|---|
committer | Leandro Pereira <leandro@hardinfo.org> | 2017-09-28 07:50:24 -0700 |
commit | 0c17a489bb1305547121235259af99bdf9a67b12 (patch) | |
tree | 4f61806a2af7689190bb030455e8130fa5cf2c40 /shell/stock.c | |
parent | 35c0821817b976fdd627b6b7c68e3f0777352e35 (diff) |
Fix more compilation warnings when building with GTK+3
Diffstat (limited to 'shell/stock.c')
-rw-r--r-- | shell/stock.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/shell/stock.c b/shell/stock.c index ad1a0135..86d66778 100644 --- a/shell/stock.c +++ b/shell/stock.c @@ -38,6 +38,8 @@ static GtkIconFactory *icon_factory; void stock_icon_register(gchar * filename, gchar * stock_id) { +#if GTK_CHECK_VERSION(3, 0, 0) +#else GtkIconSet *icon_set; GtkIconSource *icon_source; @@ -52,10 +54,13 @@ void stock_icon_register(gchar * filename, gchar * stock_id) gtk_icon_factory_add(icon_factory, stock_id, icon_set); gtk_icon_set_unref(icon_set); +#endif } void stock_icon_register_pixbuf(GdkPixbuf * pixbuf, gchar * stock_id) { +#if GTK_CHECK_VERSION(3, 0, 0) +#else GtkIconSet *icon_set; GtkIconSource *icon_source; @@ -69,6 +74,7 @@ void stock_icon_register_pixbuf(GdkPixbuf * pixbuf, gchar * stock_id) gtk_icon_factory_add(icon_factory, stock_id, icon_set); gtk_icon_set_unref(icon_set); +#endif } void stock_icons_init(void) @@ -78,14 +84,20 @@ void stock_icons_init(void) DEBUG("initializing stock icons"); +#if GTK_CHECK_VERSION(3, 0, 0) +#else icon_factory = gtk_icon_factory_new(); +#endif for (i = 0; i < n_stock_icons; i++) { stock_icon_register(stock_icons[i].filename, stock_icons[i].stock_id); } +#if GTK_CHECK_VERSION(3, 0, 0) +#else gtk_icon_factory_add_default(icon_factory); +#endif g_object_unref(icon_factory); } |