From 6cb26c97a9c11bc971d19539549456096abfd025 Mon Sep 17 00:00:00 2001
From: Mark Tiefenbruck <mark@fluxbox.org>
Date: Tue, 29 Apr 2008 05:51:43 -0700
Subject: don't add program icons to tabs for previous users, for backwards
 compatibility, but leave it as default for new users

---
 data/init.in                   |  2 +-
 src/fluxbox.cc                 |  2 +-
 util/fluxbox-update_configs.cc | 10 ++++++++++
 3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/data/init.in b/data/init.in
index 86cfa08..e1741bb 100644
--- a/data/init.in
+++ b/data/init.in
@@ -30,4 +30,4 @@ session.colorsPerChannel:	4
 session.doubleClickInterval:	250
 session.cacheMax:	200
 session.imageDither:	True
-session.configVersion:	7
+session.configVersion:	8
diff --git a/src/fluxbox.cc b/src/fluxbox.cc
index 8fcc194..a6ce035 100644
--- a/src/fluxbox.cc
+++ b/src/fluxbox.cc
@@ -592,7 +592,7 @@ void Fluxbox::setupConfigFiles() {
     if (create_init)
         FbTk::FileUtil::copyFile(DEFAULT_INITFILE, init_file.c_str());
 
-#define CONFIG_VERSION 7
+#define CONFIG_VERSION 8
     FbTk::Resource<int> config_version(m_resourcemanager, 0,
             "session.configVersion", "Session.ConfigVersion");
     if (*config_version < CONFIG_VERSION) {
diff --git a/util/fluxbox-update_configs.cc b/util/fluxbox-update_configs.cc
index eb080de..be22383 100644
--- a/util/fluxbox-update_configs.cc
+++ b/util/fluxbox-update_configs.cc
@@ -291,6 +291,16 @@ int run_updates(int old_version, FbTk::ResourceManager &rm) {
         new_version = 7;
     }
 
+    if (old_version < 8) { // disable icons in tabs for backwards compatibility
+        FbTk::Resource<bool> *show =
+            new FbTk::Resource<bool>(rm, false,
+                                     "session.screen0.tabs.usePixmap",
+                                     "Session.Screen0.Tabs.UsePixmap");
+        if (!*show) // only change if the setting didn't already exist
+            *show = false;
+        new_version = 8;
+    }
+
     return new_version;
 }
 
-- 
cgit v0.11.2