summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-09-02 18:35:02 +0000
committerChristian Persch <chpe@src.gnome.org>2004-09-02 18:35:02 +0000
commit227e79805c07193f528c59531c2e077e8404d869 (patch)
treec8b9c5603e7d670870809ce73d3a365c5f821e46
parentaf4cb0eb602f2bf07c5f16c9eeaad8ea9bdb38d9 (diff)
downloadepiphany-227e79805c07193f528c59531c2e077e8404d869.tar.gz
R data/art/epiphany-secure.png: R data/art/epiphany-unsecure.png:
2004-09-02 Christian Persch <chpe@cvs.gnome.org> * data/art/Makefile.am: R data/art/epiphany-secure.png: R data/art/epiphany-unsecure.png: * lib/ephy-stock-icons.c: (ephy_stock_icons_init): * lib/ephy-stock-icons.h: * src/ephy-statusbar.c: (ephy_statusbar_set_security_state): * src/ephy-statusbar.h: * src/ephy-window.c: (sync_tab_security): Use stock icons for the security padlock.
-rw-r--r--ChangeLog13
-rw-r--r--data/art/Makefile.am2
-rw-r--r--data/art/epiphany-secure.pngbin866 -> 0 bytes
-rw-r--r--data/art/epiphany-unsecure.pngbin792 -> 0 bytes
-rw-r--r--lib/ephy-stock-icons.c7
-rw-r--r--lib/ephy-stock-icons.h5
-rwxr-xr-xsrc/ephy-statusbar.c12
-rw-r--r--src/ephy-statusbar.h2
-rw-r--r--src/ephy-window.c19
9 files changed, 31 insertions, 29 deletions
diff --git a/ChangeLog b/ChangeLog
index f45bfb1ab..b71ce964e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2004-09-02 Christian Persch <chpe@cvs.gnome.org>
+
+ * data/art/Makefile.am:
+ R data/art/epiphany-secure.png:
+ R data/art/epiphany-unsecure.png:
+ * lib/ephy-stock-icons.c: (ephy_stock_icons_init):
+ * lib/ephy-stock-icons.h:
+ * src/ephy-statusbar.c: (ephy_statusbar_set_security_state):
+ * src/ephy-statusbar.h:
+ * src/ephy-window.c: (sync_tab_security):
+
+ Use stock icons for the security padlock.
+
2004-09-01 Christian Persch <chpe@cvs.gnome.org>
* src/ephy-tab.c: (ephy_tab_set_title):
diff --git a/data/art/Makefile.am b/data/art/Makefile.am
index cc27b7231..80a5d0a05 100644
--- a/data/art/Makefile.am
+++ b/data/art/Makefile.am
@@ -1,6 +1,4 @@
art_DATA = \
- epiphany-secure.png \
- epiphany-unsecure.png \
epiphany-entry.png \
epiphany-download.png \
epiphany-history.png \
diff --git a/data/art/epiphany-secure.png b/data/art/epiphany-secure.png
deleted file mode 100644
index 36b3fc8b5..000000000
--- a/data/art/epiphany-secure.png
+++ /dev/null
Binary files differ
diff --git a/data/art/epiphany-unsecure.png b/data/art/epiphany-unsecure.png
deleted file mode 100644
index d6699dc94..000000000
--- a/data/art/epiphany-unsecure.png
+++ /dev/null
Binary files differ
diff --git a/lib/ephy-stock-icons.c b/lib/ephy-stock-icons.c
index 6134dce4e..1d2aa1e4d 100644
--- a/lib/ephy-stock-icons.c
+++ b/lib/ephy-stock-icons.c
@@ -46,13 +46,14 @@ ephy_stock_icons_init (void)
STOCK_VIEW_SOURCE,
STOCK_SEND_MAIL,
STOCK_ADD_BOOKMARK,
- STOCK_PRINT_SETUP
+ STOCK_PRINT_SETUP,
+ STOCK_LOCK_INSECURE,
+ STOCK_LOCK_SECURE,
+ STOCK_LOCK_BROKEN
};
static const GtkStockItem items[] =
{
- { EPHY_STOCK_SECURE, N_("Secure"), 0, 0, NULL },
- { EPHY_STOCK_UNSECURE, N_("Insecure"), 0, 0, NULL },
{ EPHY_STOCK_POPUPS, N_("Popup Windows"), 0, 0, NULL },
{ EPHY_STOCK_HISTORY, N_("History"), 0, 0, NULL },
{ EPHY_STOCK_BOOKMARKS, N_("Bookmarks"), 0, 0, NULL },
diff --git a/lib/ephy-stock-icons.h b/lib/ephy-stock-icons.h
index 4984c2d13..19a5641eb 100644
--- a/lib/ephy-stock-icons.h
+++ b/lib/ephy-stock-icons.h
@@ -23,8 +23,6 @@
G_BEGIN_DECLS
-#define EPHY_STOCK_SECURE "epiphany-secure"
-#define EPHY_STOCK_UNSECURE "epiphany-unsecure"
#define EPHY_STOCK_POPUPS "epiphany-popup-hidden"
#define EPHY_STOCK_HISTORY "epiphany-history"
#define EPHY_STOCK_BOOKMARKS "epiphany-bookmarks"
@@ -37,6 +35,9 @@ G_BEGIN_DECLS
#define STOCK_SEND_MAIL "stock_mail-send"
#define STOCK_ADD_BOOKMARK "stock_add-bookmark"
#define STOCK_PRINT_SETUP "stock_print-setup"
+#define STOCK_LOCK_INSECURE "stock_lock-open"
+#define STOCK_LOCK_SECURE "stock_lock"
+#define STOCK_LOCK_BROKEN "stock_lock-broken"
void ephy_stock_icons_init (void);
diff --git a/src/ephy-statusbar.c b/src/ephy-statusbar.c
index 8e2e8c475..697af416d 100755
--- a/src/ephy-statusbar.c
+++ b/src/ephy-statusbar.c
@@ -236,22 +236,18 @@ ephy_statusbar_new (void)
/**
* ephy_statusbar_set_security_state:
* @statusbar: an #EphyStatusbar
- * @secure: whether to set the icon to show secure or insecure
+ * @stock_id: stock-id of the icon showing the security state
* @tooltip: a string detailing the security state
*
* Sets the statusbar's security icon and its tooltip.
**/
void
ephy_statusbar_set_security_state (EphyStatusbar *statusbar,
- gboolean secure,
+ const char *stock_id,
const char *tooltip)
{
- const char *stock;
-
- stock = secure ? EPHY_STOCK_SECURE : EPHY_STOCK_UNSECURE;
-
- gtk_image_set_from_stock (GTK_IMAGE (statusbar->priv->security_icon), stock,
- GTK_ICON_SIZE_MENU);
+ gtk_image_set_from_stock (GTK_IMAGE (statusbar->priv->security_icon),
+ stock_id, GTK_ICON_SIZE_MENU);
gtk_tooltips_set_tip (statusbar->tooltips, statusbar->priv->security_evbox,
tooltip, NULL);
diff --git a/src/ephy-statusbar.h b/src/ephy-statusbar.h
index 8ca1b5af4..f7472ee82 100644
--- a/src/ephy-statusbar.h
+++ b/src/ephy-statusbar.h
@@ -62,7 +62,7 @@ GType ephy_statusbar_get_type (void);
GtkWidget *ephy_statusbar_new (void);
void ephy_statusbar_set_security_state (EphyStatusbar *statusbar,
- gboolean secure,
+ const char *stock_id,
const char *tooltip);
void ephy_statusbar_set_popups_state (EphyStatusbar *statusbar,
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 9f5d1c2bb..0d6499155 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -1279,8 +1279,8 @@ sync_tab_security (EphyTab *tab, GParamSpec *pspec, EphyWindow *window)
EmbedSecurityLevel level;
char *description = NULL;
char *state = NULL;
- gboolean secure;
char *tooltip;
+ const char *stock_id = STOCK_LOCK_INSECURE;
if (window->priv->closing) return;
@@ -1288,14 +1288,6 @@ sync_tab_security (EphyTab *tab, GParamSpec *pspec, EphyWindow *window)
ephy_embed_get_security_level (embed, &level, &description);
- if (level != ephy_tab_get_security_level (tab))
- {
- /* something is VERY wrong here! */
- level = STATE_IS_UNKNOWN;
- description = NULL;
- }
-
- secure = FALSE;
switch (level)
{
case STATE_IS_UNKNOWN:
@@ -1306,18 +1298,19 @@ sync_tab_security (EphyTab *tab, GParamSpec *pspec, EphyWindow *window)
break;
case STATE_IS_BROKEN:
state = _("Broken");
+ stock_id = STOCK_LOCK_BROKEN;
break;
case STATE_IS_SECURE_MED:
state = _("Medium");
- secure = TRUE;
+ stock_id = STOCK_LOCK_SECURE;
break;
case STATE_IS_SECURE_LOW:
state = _("Low");
- secure = TRUE;
+ stock_id = STOCK_LOCK_SECURE;
break;
case STATE_IS_SECURE_HIGH:
state = _("High");
- secure = TRUE;
+ stock_id = STOCK_LOCK_SECURE;
break;
default:
g_assert_not_reached ();
@@ -1337,7 +1330,7 @@ sync_tab_security (EphyTab *tab, GParamSpec *pspec, EphyWindow *window)
}
ephy_statusbar_set_security_state (EPHY_STATUSBAR (window->priv->statusbar),
- secure, tooltip);
+ stock_id, tooltip);
g_free (tooltip);
}