[epiphany] ephy-shell: install global menu for private mode too
- From: Xan Lopez <xan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] ephy-shell: install global menu for private mode too
- Date: Thu, 9 Feb 2012 14:36:07 +0000 (UTC)
commit b675b51a6ed0287a840fb9c68fd2a1999449dc7b
Author: Xan Lopez <xan igalia com>
Date: Thu Feb 9 14:25:58 2012 +0100
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
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 bfa643b..c35cdd5 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),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]