diff options
author | Xan Lopez <xan@igalia.com> | 2012-02-09 21:25:58 +0800 |
---|---|---|
committer | Xan Lopez <xan@igalia.com> | 2012-02-09 22:35:48 +0800 |
commit | b675b51a6ed0287a840fb9c68fd2a1999449dc7b (patch) | |
tree | 54a813037edcee034fe81ff9fb144b7add040816 | |
parent | 93f655b3774a30546f4ccb2fb6f9f2ece34243f0 (diff) | |
download | gsoc2013-epiphany-b675b51a6ed0287a840fb9c68fd2a1999449dc7b.tar.gz gsoc2013-epiphany-b675b51a6ed0287a840fb9c68fd2a1999449dc7b.tar.zst gsoc2013-epiphany-b675b51a6ed0287a840fb9c68fd2a1999449dc7b.zip |
ephy-shell: install global menu for private mode too
This is still not enough to make it work, the menu shows empty in
private mode, but the code change is obviously correct. See bug
https://bugzilla.gnome.org/show_bug.cgi?id=647986
https://bugzilla.gnome.org/show_bug.cgi?id=669740
-rw-r--r-- | src/ephy-shell.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/ephy-shell.c b/src/ephy-shell.c index bfa643bb3..c35cdd5f3 100644 --- a/src/ephy-shell.c +++ b/src/ephy-shell.c @@ -275,19 +275,21 @@ static GActionEntry app_entries[] = { static void ephy_shell_startup (GApplication* application) { + EphyEmbedShellMode mode; + G_APPLICATION_CLASS (ephy_shell_parent_class)->startup (application); /* We're not remoting; start our services */ /* Migrate profile if we are not running a private instance */ /* TODO: we want to migrate each WebApp profile too */ - if (ephy_embed_shell_get_mode (EPHY_EMBED_SHELL (application)) == EPHY_EMBED_SHELL_MODE_BROWSER) { - GtkBuilder *builder; + mode = ephy_embed_shell_get_mode (EPHY_EMBED_SHELL (application)); + if (mode == EPHY_EMBED_SHELL_MODE_BROWSER) { if (ephy_profile_utils_get_migration_version () < EPHY_PROFILE_MIGRATION_VERSION) { GError *error = NULL; char *argv[1] = { "ephy-profile-migrator" }; char *envp[1] = { "EPHY_LOG_MODULES=ephy-profile" }; - + g_spawn_sync (NULL, argv, envp, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL, NULL, &error); @@ -297,6 +299,10 @@ ephy_shell_startup (GApplication* application) g_error_free (error); } } + } + + if (mode != EPHY_EMBED_SHELL_MODE_APPLICATION) { + GtkBuilder *builder; g_action_map_add_action_entries (G_ACTION_MAP (application), app_entries, G_N_ELEMENTS (app_entries), |