aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-toolbars-model.c
diff options
context:
space:
mode:
authorXan Lopez <xlopez@igalia.com>2011-07-14 06:47:33 +0800
committerXan Lopez <xlopez@igalia.com>2011-08-29 03:23:26 +0800
commitebac66a05be1e71bd978f070fb842fd8b457e7e8 (patch)
tree549cd1797c49a39cf20be47b5567441f208a5fa5 /src/ephy-toolbars-model.c
parentbebb9f4299f4a86439ed04b335b6852234af0622 (diff)
downloadgsoc2013-epiphany-ebac66a05be1e71bd978f070fb842fd8b457e7e8.tar
gsoc2013-epiphany-ebac66a05be1e71bd978f070fb842fd8b457e7e8.tar.gz
gsoc2013-epiphany-ebac66a05be1e71bd978f070fb842fd8b457e7e8.tar.bz2
gsoc2013-epiphany-ebac66a05be1e71bd978f070fb842fd8b457e7e8.tar.lz
gsoc2013-epiphany-ebac66a05be1e71bd978f070fb842fd8b457e7e8.tar.xz
gsoc2013-epiphany-ebac66a05be1e71bd978f070fb842fd8b457e7e8.tar.zst
gsoc2013-epiphany-ebac66a05be1e71bd978f070fb842fd8b457e7e8.zip
Add basic support for Web Applications
Allow to save any page as a "Web Application". A new .desktop file will be created, and added to the Shell as a new application. It will launch epiphany in application mode, with its own private profile (inheriting some data from the main profile, like the relevant domain cookies) and in a new process.
Diffstat (limited to 'src/ephy-toolbars-model.c')
-rw-r--r--src/ephy-toolbars-model.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/ephy-toolbars-model.c b/src/ephy-toolbars-model.c
index 5dc6cf4b1..346aa0253 100644
--- a/src/ephy-toolbars-model.c
+++ b/src/ephy-toolbars-model.c
@@ -19,13 +19,14 @@
*/
#include "config.h"
-
#include "ephy-toolbars-model.h"
+
+#include "eggtypebuiltins.h"
+#include "ephy-debug.h"
+#include "ephy-embed-shell.h"
#include "ephy-file-helpers.h"
#include "ephy-prefs.h"
#include "ephy-settings.h"
-#include "eggtypebuiltins.h"
-#include "ephy-debug.h"
#include <string.h>
@@ -213,8 +214,9 @@ ephy_toolbars_model_load (EphyToolbarsModel *model)
}
}
- /* Ensure we have at least 1 toolbar */
- if (egg_toolbars_model_n_toolbars (eggmodel) < 1)
+ /* Ensure we have at least 1 toolbar unless we are in WebApp mode. */
+ if (ephy_embed_shell_get_mode (embed_shell) != EPHY_EMBED_SHELL_MODE_APPLICATION &&
+ egg_toolbars_model_n_toolbars (eggmodel) < 1)
{
egg_toolbars_model_add_toolbar (eggmodel, 0, "DefaultToolbar");
}