diff options
author | Xan Lopez <xan@igalia.com> | 2012-04-16 19:41:52 +0800 |
---|---|---|
committer | Xan Lopez <xan@igalia.com> | 2012-04-16 19:41:52 +0800 |
commit | 954fd17d06fe9453c355223d66207b23f359665b (patch) | |
tree | 5ea83a71a01a43ef6fdfbd9c2262992b9ca2ddc6 /lib/ephy-profile-migrator.c | |
parent | 6ca351051cee2d7528a4c03a5ffb50a230be5327 (diff) | |
download | gsoc2013-epiphany-954fd17d06fe9453c355223d66207b23f359665b.tar gsoc2013-epiphany-954fd17d06fe9453c355223d66207b23f359665b.tar.gz gsoc2013-epiphany-954fd17d06fe9453c355223d66207b23f359665b.tar.bz2 gsoc2013-epiphany-954fd17d06fe9453c355223d66207b23f359665b.tar.lz gsoc2013-epiphany-954fd17d06fe9453c355223d66207b23f359665b.tar.xz gsoc2013-epiphany-954fd17d06fe9453c355223d66207b23f359665b.tar.zst gsoc2013-epiphany-954fd17d06fe9453c355223d66207b23f359665b.zip |
Create a new 'tabs-bar-visibility-policy' setting
We need this to be an enum, since we'll a third option in the future
for the Overview (to never show the tabs bar). For now just add the
two values we have now and migrate the code and the user data.
Diffstat (limited to 'lib/ephy-profile-migrator.c')
-rw-r--r-- | lib/ephy-profile-migrator.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/lib/ephy-profile-migrator.c b/lib/ephy-profile-migrator.c index a37638c25..2ab42c95e 100644 --- a/lib/ephy-profile-migrator.c +++ b/lib/ephy-profile-migrator.c @@ -36,6 +36,7 @@ #include "ephy-file-helpers.h" #include "ephy-history-service.h" #include "ephy-profile-utils.h" +#include "ephy-settings.h" #ifdef ENABLE_NSS #include "ephy-nss-glue.h" #endif @@ -605,6 +606,20 @@ migrate_history () g_object_unref (history_service); } +static void +migrate_tabs_visibility () +{ + gboolean always_show_tabs; + + always_show_tabs = g_settings_get_boolean (EPHY_SETTINGS_UI, + EPHY_PREFS_UI_ALWAYS_SHOW_TABS_BAR); + + if (always_show_tabs) + g_settings_set_enum (EPHY_SETTINGS_UI, + EPHY_PREFS_UI_TABS_BAR_VISIBILITY_POLICY, + EPHY_PREFS_UI_TABS_BAR_VISIBILITY_POLICY_ALWAYS); +} + const EphyProfileMigrator migrators[] = { migrate_cookies, migrate_passwords, @@ -614,7 +629,8 @@ const EphyProfileMigrator migrators[] = { /* Very similar to migrate_passwords, but this migrates * login/passwords for page forms, which we previously ignored */ migrate_passwords2, - migrate_history + migrate_history, + migrate_tabs_visibility }; static void |