diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2012-01-19 02:56:45 +0800 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2012-01-20 02:07:22 +0800 |
commit | 2082e3a96b3aed97adc615e7739cec6afea5d76e (patch) | |
tree | 4a671907df719acfb6a9072daabcb036018a4564 /src/ephy-lockdown.c | |
parent | 90e79ffec92b47fbc6ad8b575b9691b1f7621f3b (diff) | |
download | gsoc2013-epiphany-2082e3a96b3aed97adc615e7739cec6afea5d76e.tar gsoc2013-epiphany-2082e3a96b3aed97adc615e7739cec6afea5d76e.tar.gz gsoc2013-epiphany-2082e3a96b3aed97adc615e7739cec6afea5d76e.tar.bz2 gsoc2013-epiphany-2082e3a96b3aed97adc615e7739cec6afea5d76e.tar.lz gsoc2013-epiphany-2082e3a96b3aed97adc615e7739cec6afea5d76e.tar.xz gsoc2013-epiphany-2082e3a96b3aed97adc615e7739cec6afea5d76e.tar.zst gsoc2013-epiphany-2082e3a96b3aed97adc615e7739cec6afea5d76e.zip |
location-action: don't make this a GtkAction anymore
It doesn't really make sense in a world where the location action is
only used on a fixed toolbar, and complicates the code a lot.
https://bugzilla.gnome.org/show_bug.cgi?id=668206
Diffstat (limited to 'src/ephy-lockdown.c')
-rw-r--r-- | src/ephy-lockdown.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/ephy-lockdown.c b/src/ephy-lockdown.c index 9186cad0a..4ffa81534 100644 --- a/src/ephy-lockdown.c +++ b/src/ephy-lockdown.c @@ -122,8 +122,6 @@ static const BindAction popup_actions[] = { }; static const BindAction special_toolbar_actions[] = { - { EPHY_PREFS_LOCKDOWN_ARBITRARY_URL, "Location", "editable" }, - { EPHY_PREFS_LOCKDOWN_HISTORY, "NavigationBack", "visible" }, { EPHY_PREFS_LOCKDOWN_HISTORY, "NavigationBack", "sensitive" }, { EPHY_PREFS_LOCKDOWN_HISTORY, "NavigationForward", "visible" }, @@ -191,6 +189,16 @@ bind_settings_and_actions (GSettings *settings, } static void +bind_location_action (GSettings *settings, + EphyLocationAction *action) +{ + g_settings_bind (settings, EPHY_PREFS_LOCKDOWN_ARBITRARY_URL, + action, "editable", + G_SETTINGS_BIND_GET | + G_SETTINGS_BIND_INVERT_BOOLEAN); +} + +static void impl_attach_window (EphyExtension *extension, EphyWindow *window) { @@ -198,6 +206,7 @@ impl_attach_window (EphyExtension *extension, GtkActionGroup *action_group; GtkAction *action; GSettings *settings; + EphyLocationAction *location_action; g_signal_connect (EPHY_SETTINGS_LOCKDOWN, "changed::" EPHY_PREFS_LOCKDOWN_FULLSCREEN, @@ -234,6 +243,9 @@ impl_attach_window (EphyExtension *extension, bind_settings_and_actions (EPHY_SETTINGS_LOCKDOWN, action_group, special_toolbar_actions, G_N_ELEMENTS (special_toolbar_actions)); + + location_action = ephy_window_get_location_action (window); + bind_location_action (EPHY_SETTINGS_LOCKDOWN, location_action); } static void |