[epiphany] app-mode: Allow to access the the url bar in application mode
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] app-mode: Allow to access the the url bar in application mode
- Date: Tue, 3 Feb 2015 14:25:07 +0000 (UTC)
commit 0243cbd3a7e0b72684b07d9380743d511a2b6a4a
Author: Carlos Garcia Campos <cgarcia igalia com>
Date: Thu Dec 11 12:31:41 2014 +0100
app-mode: Allow to access the the url bar in application mode
It's not editable but you can copy-paste the URL for example.
https://bugzilla.gnome.org/show_bug.cgi?id=741392
src/ephy-lockdown.c | 7 ++++---
src/ephy-window.c | 4 +++-
2 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/src/ephy-lockdown.c b/src/ephy-lockdown.c
index b60dbdd..ac3c9f9 100644
--- a/src/ephy-lockdown.c
+++ b/src/ephy-lockdown.c
@@ -238,9 +238,10 @@ window_added_cb (GtkApplication *application,
bind_settings_and_actions (EPHY_SETTINGS_LOCKDOWN,
action_group, special_toolbar_actions,
G_N_ELEMENTS (special_toolbar_actions));
-
- location_controller = ephy_window_get_location_controller (EPHY_WINDOW (window));
- bind_location_controller (EPHY_SETTINGS_LOCKDOWN, location_controller);
+ if (ephy_embed_shell_get_mode (ephy_embed_shell_get_default ()) != EPHY_EMBED_SHELL_MODE_APPLICATION) {
+ location_controller = ephy_window_get_location_controller (EPHY_WINDOW (window));
+ bind_location_controller (EPHY_SETTINGS_LOCKDOWN, location_controller);
+ }
}
G_DEFINE_TYPE (EphyLockdown, ephy_lockdown, G_TYPE_OBJECT)
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 8a197af..e010831 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -3466,6 +3466,8 @@ ephy_window_constructor (GType type,
mode = ephy_embed_shell_get_mode (ephy_embed_shell_get_default ());
if (mode == EPHY_EMBED_SHELL_MODE_APPLICATION)
{
+ g_object_set(priv->location_controller, "editable", FALSE, NULL);
+
/* We don't need to show the page menu in web application mode. */
action = gtk_action_group_get_action (toolbar_action_group, "PageMenu");
ephy_action_change_sensitivity_flags (action, SENS_FLAG_CHROME, TRUE);
@@ -3487,7 +3489,7 @@ ephy_window_constructor (GType type,
ephy_action_change_sensitivity_flags (action, SENS_FLAG_CHROME, TRUE);
gtk_action_set_visible (action, FALSE);
}
- chrome &= ~(EPHY_WINDOW_CHROME_LOCATION | EPHY_WINDOW_CHROME_MENU |
EPHY_WINDOW_CHROME_TABSBAR);
+ chrome &= ~(EPHY_WINDOW_CHROME_MENU | EPHY_WINDOW_CHROME_TABSBAR);
}
/* We never want the menubar shown, we merge the app menu into
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]