aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-statusbar.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2006-07-25 03:34:54 +0800
committerChristian Persch <chpe@src.gnome.org>2006-07-25 03:34:54 +0800
commit095010d768b454906d6029fc0403580585527e51 (patch)
tree2099f34d6168da1987aff944465e477bc68dbf83 /src/ephy-statusbar.c
parent3f67020b032c7307fdc8d66777c808f75a2c4016 (diff)
downloadgsoc2013-epiphany-095010d768b454906d6029fc0403580585527e51.tar
gsoc2013-epiphany-095010d768b454906d6029fc0403580585527e51.tar.gz
gsoc2013-epiphany-095010d768b454906d6029fc0403580585527e51.tar.bz2
gsoc2013-epiphany-095010d768b454906d6029fc0403580585527e51.tar.lz
gsoc2013-epiphany-095010d768b454906d6029fc0403580585527e51.tar.xz
gsoc2013-epiphany-095010d768b454906d6029fc0403580585527e51.tar.zst
gsoc2013-epiphany-095010d768b454906d6029fc0403580585527e51.zip
Add page security info dialogue from Certificates extension.
2006-07-24 Christian Persch <chpe@cvs.gnome.org> * data/ui/epiphany-ui.xml: * src/ephy-statusbar.c: (ephy_statusbar_class_init), (padlock_button_press_cb), (create_statusbar_security_icon): * src/ephy-statusbar.h: * src/ephy-window.c: (ephy_window_constructor): * src/window-commands.c: (window_cmd_view_page_security_info), (window_cmd_help_about): * src/window-commands.h: Add page security info dialogue from Certificates extension.
Diffstat (limited to 'src/ephy-statusbar.c')
-rwxr-xr-xsrc/ephy-statusbar.c43
1 files changed, 41 insertions, 2 deletions
diff --git a/src/ephy-statusbar.c b/src/ephy-statusbar.c
index 44bc5b029..c5dab348f 100755
--- a/src/ephy-statusbar.c
+++ b/src/ephy-statusbar.c
@@ -38,8 +38,6 @@ static void ephy_statusbar_class_init (EphyStatusbarClass *klass);
static void ephy_statusbar_init (EphyStatusbar *t);
static void ephy_statusbar_finalize (GObject *object);
-static GObjectClass *parent_class = NULL;
-
#define EPHY_STATUSBAR_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EPHY_TYPE_STATUSBAR, EphyStatusbarPrivate))
struct _EphyStatusbarPrivate
@@ -54,6 +52,15 @@ struct _EphyStatusbarPrivate
GtkWidget *popups_manager_evbox;
};
+enum
+{
+ LOCK_CLICKED,
+ LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL];
+static GObjectClass *parent_class;
+
GType
ephy_statusbar_get_type (void)
{
@@ -91,6 +98,17 @@ ephy_statusbar_class_init (EphyStatusbarClass *klass)
object_class->finalize = ephy_statusbar_finalize;
+ signals[LOCK_CLICKED] =
+ g_signal_new
+ ("lock-clicked",
+ EPHY_TYPE_STATUSBAR,
+ G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
+ G_STRUCT_OFFSET (EphyStatusbarClass, lock_clicked),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE,
+ 0);
+
g_type_class_add_private (object_class, sizeof (EphyStatusbarPrivate));
}
@@ -126,6 +144,23 @@ create_caret_indicator (EphyStatusbar *statusbar)
FALSE, FALSE, 0);
}
+static gboolean
+padlock_button_press_cb (GtkWidget *ebox,
+ GdkEventButton *event,
+ EphyStatusbar *statusbar)
+{
+ if (event->type == GDK_BUTTON_PRESS &&
+ event->button == 1 /* left */ &&
+ (event->state & gtk_accelerator_get_default_mod_mask ()) == 0)
+ {
+ g_signal_emit (statusbar, signals[LOCK_CLICKED], 0);
+
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
static void
create_statusbar_security_icon (EphyStatusbar *s)
{
@@ -137,6 +172,10 @@ create_statusbar_security_icon (EphyStatusbar *s)
s->priv->security_evbox = gtk_event_box_new ();
gtk_event_box_set_visible_window (GTK_EVENT_BOX (s->priv->security_evbox),
FALSE);
+ gtk_widget_add_events (s->priv->security_evbox, GDK_BUTTON_PRESS_MASK);
+ g_signal_connect (s->priv->security_evbox, "button-press-event",
+ G_CALLBACK (padlock_button_press_cb), s);
+
gtk_container_add (GTK_CONTAINER (s->security_frame),
GTK_WIDGET (s->priv->security_evbox));
gtk_container_add (GTK_CONTAINER (s->priv->security_evbox),