diff options
author | markt <markt> | 2007-11-12 21:59:43 (GMT) |
---|---|---|
committer | markt <markt> | 2007-11-12 21:59:43 (GMT) |
commit | 5d7043320da1378e7dd3b10f7e425f3b47455b28 (patch) | |
tree | 305db18a58ab6768b78ab230074da576d09e372d /util | |
parent | 807a1b557552e43dbdc169c1e7a3065a3f12aac7 (diff) | |
download | fluxbox_pavel-5d7043320da1378e7dd3b10f7e425f3b47455b28.zip fluxbox_pavel-5d7043320da1378e7dd3b10f7e425f3b47455b28.tar.bz2 |
allow arbitrary window patterns in iconbar
Diffstat (limited to 'util')
-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 | ||