aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ephy-location-action.c26
-rw-r--r--src/ephy-location-action.h3
-rwxr-xr-xsrc/ephy-toolbar.c9
3 files changed, 38 insertions, 0 deletions
diff --git a/src/ephy-location-action.c b/src/ephy-location-action.c
index 402abb4cd..9043cac94 100644
--- a/src/ephy-location-action.c
+++ b/src/ephy-location-action.c
@@ -72,6 +72,13 @@ enum
PROP_WINDOW
};
+enum
+{
+ LOCK_CLICKED,
+ LAST_SIGNAL
+};
+static guint signals[LAST_SIGNAL] = { 0 };
+
static GObjectClass *parent_class = NULL;
GType
@@ -162,6 +169,13 @@ user_changed_cb (GtkWidget *proxy, EphyLocationAction *action)
}
static void
+lock_clicked_cb (GtkWidget *proxy,
+ EphyLocationAction *action)
+{
+ g_signal_emit (action, signals[LOCK_CLICKED], 0);
+}
+
+static void
sync_address (GtkAction *gaction,
GParamSpec *pspec,
GtkWidget *proxy)
@@ -362,6 +376,8 @@ connect_proxy (GtkAction *action, GtkWidget *proxy)
action, 0);
g_signal_connect_object (proxy, "user_changed",
G_CALLBACK (user_changed_cb), action, 0);
+ g_signal_connect_object (proxy, "lock-clicked",
+ G_CALLBACK (lock_clicked_cb), action, 0);
g_signal_connect_object (proxy, "get-location",
G_CALLBACK (get_location_cb), action, 0);
g_signal_connect_object (proxy, "get-title",
@@ -479,6 +495,16 @@ ephy_location_action_class_init (EphyLocationActionClass *class)
action_class->connect_proxy = connect_proxy;
action_class->disconnect_proxy = disconnect_proxy;
+ signals[LOCK_CLICKED] = g_signal_new (
+ "lock-clicked",
+ EPHY_TYPE_LOCATION_ACTION,
+ G_SIGNAL_RUN_FIRST | G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (EphyLocationActionClass, lock_clicked),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE,
+ 0);
+
g_object_class_install_property (object_class,
PROP_ADDRESS,
g_param_spec_string ("address",
diff --git a/src/ephy-location-action.h b/src/ephy-location-action.h
index 78053b27c..15ad6f123 100644
--- a/src/ephy-location-action.h
+++ b/src/ephy-location-action.h
@@ -47,6 +47,9 @@ struct _EphyLocationAction
struct _EphyLocationActionClass
{
EphyLinkActionClass parent_class;
+
+ /* Signals */
+ void (* lock_clicked) (EphyLocationAction *action);
};
GType ephy_location_action_get_type (void);
diff --git a/src/ephy-toolbar.c b/src/ephy-toolbar.c
index abb2cf8c6..41368a6c4 100755
--- a/src/ephy-toolbar.c
+++ b/src/ephy-toolbar.c
@@ -253,6 +253,13 @@ sync_user_input_cb (EphyLocationAction *action,
}
static void
+lock_clicked_cb (EphyLocationAction *action,
+ EphyToolbar *toolbar)
+{
+ g_signal_emit (toolbar, signals[LOCK_CLICKED], 0);
+}
+
+static void
zoom_to_level_cb (GtkAction *action,
float zoom,
EphyToolbar *toolbar)
@@ -357,6 +364,8 @@ ephy_toolbar_set_window (EphyToolbar *toolbar,
G_CALLBACK (ephy_link_open), toolbar);
g_signal_connect (action, "notify::address",
G_CALLBACK (sync_user_input_cb), toolbar);
+ g_signal_connect (action, "lock-clicked",
+ G_CALLBACK (lock_clicked_cb), toolbar);
gtk_action_group_add_action (priv->action_group, action);
update_location_editable (toolbar);
g_object_unref (action);