diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2005-10-20 21:33:42 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2005-10-20 21:33:42 +0800 |
commit | 0dd2f8a6be0d70809b408d42d3599fcc4ce68973 (patch) | |
tree | d5009fe7614d347e57af117023467e6eab4c7ed3 /lib | |
parent | 501c4357042c915188dc900849e2c595ad4edf8a (diff) | |
download | gsoc2013-epiphany-0dd2f8a6be0d70809b408d42d3599fcc4ce68973.tar.gz gsoc2013-epiphany-0dd2f8a6be0d70809b408d42d3599fcc4ce68973.tar.zst gsoc2013-epiphany-0dd2f8a6be0d70809b408d42d3599fcc4ce68973.zip |
Minor code cleanup.
2005-10-20 Christian Persch <chpe@cvs.gnome.org>
* lib/ephy-stock-icons.c: (ephy_stock_icons_init):
Minor code cleanup.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ephy-stock-icons.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/ephy-stock-icons.c b/lib/ephy-stock-icons.c index 961dd50b9..07ae50c06 100644 --- a/lib/ephy-stock-icons.c +++ b/lib/ephy-stock-icons.c @@ -60,39 +60,43 @@ ephy_stock_icons_init (void) }; factory = gtk_icon_factory_new (); - gtk_icon_factory_add_default (factory); for (i = 0; i < (int) G_N_ELEMENTS (items); i++) { char *fn; - icon_set = gtk_icon_set_new (); icon_source = gtk_icon_source_new (); fn = g_strconcat (items[i].stock_id, ".png", NULL); + gtk_icon_source_set_icon_name (icon_source, items[i].stock_id); gtk_icon_source_set_filename (icon_source, ephy_file (fn)); g_free (fn); + icon_set = gtk_icon_set_new (); gtk_icon_set_add_source (icon_set, icon_source); + gtk_icon_source_free (icon_source); + gtk_icon_factory_add (factory, items[i].stock_id, icon_set); gtk_icon_set_unref (icon_set); - gtk_icon_source_free (icon_source); } gtk_stock_add_static (items, G_N_ELEMENTS (items)); for (i = 0; i < (int) G_N_ELEMENTS (icon_theme_items); i++) { - icon_set = gtk_icon_set_new (); icon_source = gtk_icon_source_new (); gtk_icon_source_set_icon_name (icon_source, icon_theme_items[i]); + + icon_set = gtk_icon_set_new (); gtk_icon_set_add_source (icon_set, icon_source); + gtk_icon_source_free (icon_source); + gtk_icon_factory_add (factory, icon_theme_items[i], icon_set); gtk_icon_set_unref (icon_set); - gtk_icon_source_free (icon_source); } - g_object_unref (G_OBJECT (factory)); + gtk_icon_factory_add_default (factory); + g_object_unref (factory); gtk_icon_size_register (EPHY_ICON_SIZE_TAB_BUTTON, 10, 10); } |