diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2004-03-27 20:59:25 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2004-03-27 20:59:25 +0800 |
commit | 9858006c017531ae84f709a346273a0cb5b4f968 (patch) | |
tree | de603c2a5c30962a04e11df0a3affe5ce9e49585 | |
parent | 9e31ac451aff0bd015136218603c1df336514e12 (diff) | |
download | gsoc2013-epiphany-9858006c017531ae84f709a346273a0cb5b4f968.tar gsoc2013-epiphany-9858006c017531ae84f709a346273a0cb5b4f968.tar.gz gsoc2013-epiphany-9858006c017531ae84f709a346273a0cb5b4f968.tar.bz2 gsoc2013-epiphany-9858006c017531ae84f709a346273a0cb5b4f968.tar.lz gsoc2013-epiphany-9858006c017531ae84f709a346273a0cb5b4f968.tar.xz gsoc2013-epiphany-9858006c017531ae84f709a346273a0cb5b4f968.tar.zst gsoc2013-epiphany-9858006c017531ae84f709a346273a0cb5b4f968.zip |
Register our stock icons.
2004-03-27 Christian Persch <chpe@cvs.gnome.org>
* lib/ephy-stock-icons.c: (ephy_stock_icons_init):
Register our stock icons.
* embed/mozilla/ContentHandler.cpp:
Use stock icon for "Download".
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | embed/mozilla/ContentHandler.cpp | 2 | ||||
-rw-r--r-- | lib/ephy-stock-icons.c | 21 |
3 files changed, 23 insertions, 10 deletions
@@ -1,3 +1,13 @@ +2004-03-27 Christian Persch <chpe@cvs.gnome.org> + + * lib/ephy-stock-icons.c: (ephy_stock_icons_init): + + Register our stock icons. + + * embed/mozilla/ContentHandler.cpp: + + Use stock icon for "Download". + 2004-03-26 Adam Hooper <adamh@cvs.gnome.org> * doc/reference/epiphany-docs.sgml: diff --git a/embed/mozilla/ContentHandler.cpp b/embed/mozilla/ContentHandler.cpp index 8ae828424..5cd1bdbbe 100644 --- a/embed/mozilla/ContentHandler.cpp +++ b/embed/mozilla/ContentHandler.cpp @@ -240,7 +240,7 @@ NS_METHOD GContentHandler::MIMEConfirmAction () action_label = (mAction == CONTENT_ACTION_OPEN) || (mAction == CONTENT_ACTION_OPEN_TMP) ? - GTK_STOCK_OPEN : _("_Download"); + GTK_STOCK_OPEN : EPHY_STOCK_DOWNLOAD; dialog = gtk_dialog_new_with_buttons ("", parentWindow, GTK_DIALOG_NO_SEPARATOR, diff --git a/lib/ephy-stock-icons.c b/lib/ephy-stock-icons.c index 7515323ce..8bbd77383 100644 --- a/lib/ephy-stock-icons.c +++ b/lib/ephy-stock-icons.c @@ -26,6 +26,7 @@ #include <glib.h> #include <stdio.h> #include <string.h> +#include <glib/gi18n.h> #include "ephy-file-helpers.h" #include "ephy-stock-icons.h" @@ -48,14 +49,14 @@ ephy_stock_icons_init (void) STOCK_PRINT_SETUP }; - static const char *items[] = + static const GtkStockItem items[] = { - EPHY_STOCK_SECURE, - EPHY_STOCK_UNSECURE, - EPHY_STOCK_HISTORY, - EPHY_STOCK_BOOKMARKS, - EPHY_STOCK_ENTRY, - EPHY_STOCK_DOWNLOAD + { EPHY_STOCK_SECURE, N_("Secure"), 0, 0, NULL }, + { EPHY_STOCK_UNSECURE, N_("Insecure"), 0, 0, NULL }, + { EPHY_STOCK_HISTORY, N_("History"), 0, 0, NULL }, + { EPHY_STOCK_BOOKMARKS, N_("Bookmarks"), 0, 0, NULL }, + { EPHY_STOCK_ENTRY, N_("Address Entry"), 0, 0, NULL }, + { EPHY_STOCK_DOWNLOAD, N_("_Download"), 0, 0, NULL } }; factory = gtk_icon_factory_new (); @@ -68,16 +69,18 @@ ephy_stock_icons_init (void) icon_set = gtk_icon_set_new (); icon_source = gtk_icon_source_new (); - fn = g_strconcat (items[i], ".png", NULL); + fn = g_strconcat (items[i].stock_id, ".png", NULL); gtk_icon_source_set_filename (icon_source, ephy_file (fn)); g_free (fn); gtk_icon_set_add_source (icon_set, icon_source); - gtk_icon_factory_add (factory, items[i], icon_set); + 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 (); |