aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-location-action.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-10-07 02:28:55 +0800
committerChristian Persch <chpe@src.gnome.org>2005-10-07 02:28:55 +0800
commitc3422e72c44eb2999de994b8151ec2db2e591631 (patch)
tree95365fcd667709b2abcd86082fadec4fc3d3c037 /src/ephy-location-action.c
parent91edd219e3e228dfaa559d524401aceed31329c7 (diff)
downloadgsoc2013-epiphany-c3422e72c44eb2999de994b8151ec2db2e591631.tar
gsoc2013-epiphany-c3422e72c44eb2999de994b8151ec2db2e591631.tar.gz
gsoc2013-epiphany-c3422e72c44eb2999de994b8151ec2db2e591631.tar.bz2
gsoc2013-epiphany-c3422e72c44eb2999de994b8151ec2db2e591631.tar.lz
gsoc2013-epiphany-c3422e72c44eb2999de994b8151ec2db2e591631.tar.xz
gsoc2013-epiphany-c3422e72c44eb2999de994b8151ec2db2e591631.tar.zst
gsoc2013-epiphany-c3422e72c44eb2999de994b8151ec2db2e591631.zip
Add style properties for 'secure-[bg|fg]-color', and apply them when the
2005-10-06 Christian Persch <chpe@cvs.gnome.org> * lib/widgets/ephy-location-entry.c: (ephy_location_entry_style_set), (ephy_location_entry_class_init), (ephy_location_entry_set_favicon), (ephy_location_entry_set_secure): * lib/widgets/ephy-location-entry.h: Add style properties for 'secure-[bg|fg]-color', and apply them when the entry is in 'secure' mode. Reset the IM context before emitting the 'activate' signal. * src/ephy-location-action.c: (sync_secure), (connect_proxy), (ephy_location_action_set_property), (ephy_location_action_get_property), (ephy_location_action_class_init): * src/ephy-toolbar.c: (ephy_toolbar_set_security_state), (ephy_toolbar_init): * src/ephy-toolbar.h: * src/ephy-window.c: (sync_chromes_visibility), (sync_tab_security): Set the location entry's 'secure' property on secure sites, and also always show the lock for secure sites.
Diffstat (limited to 'src/ephy-location-action.c')
-rw-r--r--src/ephy-location-action.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/ephy-location-action.c b/src/ephy-location-action.c
index 4cce221cf..c3c0b4109 100644
--- a/src/ephy-location-action.c
+++ b/src/ephy-location-action.c
@@ -50,6 +50,7 @@ struct _EphyLocationActionPrivate
char *lock_tooltip;
guint editable : 1;
guint show_lock : 1;
+ guint secure : 1;
};
static void ephy_location_action_init (EphyLocationAction *action);
@@ -69,6 +70,7 @@ enum
PROP_ICON,
PROP_LOCK_STOCK,
PROP_LOCK_TOOLTIP,
+ PROP_SECURE,
PROP_SHOW_LOCK,
PROP_WINDOW
};
@@ -267,6 +269,18 @@ sync_lock_tooltip (GtkAction *gaction,
}
static void
+sync_secure (GtkAction *gaction,
+ GParamSpec *pspec,
+ GtkWidget *proxy)
+{
+ EphyLocationAction *action = EPHY_LOCATION_ACTION (gaction);
+ EphyLocationActionPrivate *priv = action->priv;
+ EphyLocationEntry *entry = EPHY_LOCATION_ENTRY (proxy);
+
+ ephy_location_entry_set_secure (entry, priv->secure);
+}
+
+static void
sync_show_lock (GtkAction *gaction,
GParamSpec *pspec,
GtkWidget *proxy)
@@ -387,6 +401,9 @@ connect_proxy (GtkAction *action, GtkWidget *proxy)
sync_lock_tooltip (action, NULL, proxy);
g_signal_connect_object (action, "notify::lock-tooltip",
G_CALLBACK (sync_lock_tooltip), proxy, 0);
+ sync_secure (action, NULL, proxy);
+ g_signal_connect_object (action, "notify::secure",
+ G_CALLBACK (sync_secure), proxy, 0);
sync_show_lock (action, NULL, proxy);
g_signal_connect_object (action, "notify::show-lock",
G_CALLBACK (sync_show_lock), proxy, 0);
@@ -461,6 +478,9 @@ ephy_location_action_set_property (GObject *object,
g_free (priv->lock_tooltip);
priv->lock_tooltip = g_value_dup_string (value);
break;
+ case PROP_SECURE:
+ priv->secure = g_value_get_boolean (value);
+ break;
case PROP_SHOW_LOCK:
priv->show_lock = g_value_get_boolean (value);
break;
@@ -496,6 +516,9 @@ ephy_location_action_get_property (GObject *object,
case PROP_LOCK_TOOLTIP:
g_value_set_string (value, priv->lock_tooltip);
break;
+ case PROP_SECURE:
+ g_value_set_boolean (value, priv->secure);
+ break;
case PROP_SHOW_LOCK:
g_value_set_boolean (value, priv->show_lock);
break;
@@ -571,6 +594,14 @@ ephy_location_action_class_init (EphyLocationActionClass *class)
G_PARAM_READWRITE));
g_object_class_install_property (object_class,
+ PROP_SECURE,
+ g_param_spec_boolean ("secure",
+ "Secure",
+ "Secure",
+ FALSE,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (object_class,
PROP_SHOW_LOCK,
g_param_spec_boolean ("show-lock",
"Show Lock",