diff options
Diffstat (limited to 'util/fluxbox-update_configs.cc')
-rw-r--r-- | util/fluxbox-update_configs.cc | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/util/fluxbox-update_configs.cc b/util/fluxbox-update_configs.cc index cca82bd..89b355f 100644 --- a/util/fluxbox-update_configs.cc +++ b/util/fluxbox-update_configs.cc | |||
@@ -64,7 +64,7 @@ string read_file(string filename); | |||
64 | void write_file(string filename, string &contents); | 64 | void write_file(string filename, string &contents); |
65 | void save_all_files(); | 65 | void save_all_files(); |
66 | 66 | ||
67 | int run_updates(int old_version, FbTk::ResourceManager rm) { | 67 | int run_updates(int old_version, FbTk::ResourceManager &rm) { |
68 | int new_version = old_version; | 68 | int new_version = old_version; |
69 | 69 | ||
70 | FbTk::Resource<string> rc_keyfile(rm, "~/.fluxbox/keys", | 70 | FbTk::Resource<string> rc_keyfile(rm, "~/.fluxbox/keys", |
@@ -214,6 +214,31 @@ int run_updates(int old_version, FbTk::ResourceManager rm) { | |||
214 | new_version = 4; | 214 | new_version = 4; |
215 | } | 215 | } |
216 | 216 | ||
217 | if (old_version < 5) { // window patterns for iconbar | ||
218 | // this needs to survive after going out of scope | ||
219 | // it won't get freed, but that's ok | ||
220 | FbTk::Resource<string> *rc_mode = | ||
221 | new FbTk::Resource<string>(rm, "Workspace", | ||
222 | "session.screen0.iconbar.mode", | ||
223 | "Session.Screen0.Iconbar.Mode"); | ||
224 | if (strcasecmp((**rc_mode).c_str(), "None") == 0) | ||
225 | *rc_mode = "none"; | ||
226 | else if (strcasecmp((**rc_mode).c_str(), "Icons") == 0) | ||
227 | *rc_mode = "{static groups} (minimized=yes)"; | ||
228 | else if (strcasecmp((**rc_mode).c_str(), "NoIcons") == 0) | ||
229 | *rc_mode = "{static groups} (minimized=no)"; | ||
230 | else if (strcasecmp((**rc_mode).c_str(), "WorkspaceIcons") == 0) | ||
231 | *rc_mode = "{static groups} (minimized=yes) (workspace)"; | ||
232 | else if (strcasecmp((**rc_mode).c_str(), "WorkspaceNoIcons") == 0) | ||
233 | *rc_mode = "{static groups} (minimized=no) (workspace)"; | ||
234 | else if (strcasecmp((**rc_mode).c_str(), "AllWindows") == 0) | ||
235 | *rc_mode = "{static groups}"; | ||
236 | else | ||
237 | *rc_mode = "{static groups} (workspace)"; | ||
238 | |||
239 | new_version = 5; | ||
240 | } | ||
241 | |||
217 | return new_version; | 242 | return new_version; |
218 | } | 243 | } |
219 | 244 | ||