From 9858006c017531ae84f709a346273a0cb5b4f968 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Sat, 27 Mar 2004 12:59:25 +0000 Subject: Register our stock icons. 2004-03-27 Christian Persch * lib/ephy-stock-icons.c: (ephy_stock_icons_init): Register our stock icons. * embed/mozilla/ContentHandler.cpp: Use stock icon for "Download". --- ChangeLog | 10 ++++++++++ embed/mozilla/ContentHandler.cpp | 2 +- lib/ephy-stock-icons.c | 21 ++++++++++++--------- 3 files changed, 23 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index f23b6b07a..bb1d19d72 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2004-03-27 Christian Persch + + * 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 * 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 #include #include +#include #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 (); -- cgit v1.2.3