aboutsummaryrefslogtreecommitdiff
path: root/shell/stock.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/stock.c')
-rw-r--r--shell/stock.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/shell/stock.c b/shell/stock.c
index 86d66778..27b2eedb 100644
--- a/shell/stock.c
+++ b/shell/stock.c
@@ -1,10 +1,10 @@
/*
* HardInfo - Displays System Information
- * Copyright (C) 2003-2007 Leandro A. F. Pereira <leandro@hardinfo.org>
+ * Copyright (C) 2003-2007 L. A. F. Pereira <l@tia.mat.br>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, version 2.
+ * the Free Software Foundation, version 2 or later.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -25,11 +25,13 @@ static struct {
gchar *filename;
gchar *stock_id;
} stock_icons[] = {
+ { "clipboard.png", HI_STOCK_CLIPBOARD},
+ { "refresh.png", HI_STOCK_REFRESH},
{ "report.png", HI_STOCK_REPORT},
{ "internet.png", HI_STOCK_INTERNET},
{ "module.png", HI_STOCK_MODULE},
{ "about-modules.png", HI_STOCK_ABOUT_MODULES},
- { "syncmanager-small.png", HI_STOCK_SYNC_MENU},
+ { "server_sync.png", HI_STOCK_SYNC_MENU},
{ "face-grin.png", HI_STOCK_DONATE},
{ "server.png", HI_STOCK_SERVER},
};
@@ -38,8 +40,6 @@ 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;
@@ -54,13 +54,10 @@ 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;
@@ -74,30 +71,23 @@ 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)
{
- gint i;
+ guint i;
guint n_stock_icons = G_N_ELEMENTS(stock_icons);
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);
}