diff options
author | Mathias Gumz <akira at fluxbox dot org> | 2010-05-05 06:41:48 (GMT) |
---|---|---|
committer | Mathias Gumz <akira at fluxbox dot org> | 2010-05-05 06:41:48 (GMT) |
commit | e05230ea4b685ca09229511be0f3ec9f876a654e (patch) | |
tree | e64e9b26ae330a6d0b0297d878dc4381a2e782b0 /util | |
parent | a10bab0f7cf9d41b9d462c643a3971c3ac348953 (diff) | |
download | fluxbox_pavel-e05230ea4b685ca09229511be0f3ec9f876a654e.zip fluxbox_pavel-e05230ea4b685ca09229511be0f3ec9f876a654e.tar.bz2 |
deploy new key-bindings to old keys-files via fluxbox-update_configs
Diffstat (limited to 'util')
-rw-r--r-- | util/fluxbox-update_configs.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/util/fluxbox-update_configs.cc b/util/fluxbox-update_configs.cc index 85bbbfe..f4a2019 100644 --- a/util/fluxbox-update_configs.cc +++ b/util/fluxbox-update_configs.cc | |||
@@ -379,6 +379,23 @@ int run_updates(int old_version, FbTk::ResourceManager &rm) { | |||
379 | new_version = 10; | 379 | new_version = 10; |
380 | } | 380 | } |
381 | 381 | ||
382 | if (old_version < 11) { // update keys for OnLeftGrip/OnRightGrip/OnWindowBorder | ||
383 | |||
384 | string whole_keyfile = read_file(keyfilename); | ||
385 | string new_keyfile = ""; | ||
386 | // let's put our new keybindings first, so they're easy to find | ||
387 | new_keyfile += "!mouse actions added by fluxbox-update_configs\n"; | ||
388 | new_keyfile += "OnTitlebar Move1 :StartMoving\n"; | ||
389 | new_keyfile += "OnLeftGrip Move1 :StartResizing bottomleft\n"; | ||
390 | new_keyfile += "OnRightGrip Move1 :StartResizing bottomright\n"; | ||
391 | new_keyfile += "OnWindowBorder Move1 :StartMoving\n\n"; | ||
392 | new_keyfile += whole_keyfile; // don't forget user's old keybindings | ||
393 | |||
394 | write_file(keyfilename, new_keyfile); | ||
395 | |||
396 | new_version = 11; | ||
397 | } | ||
398 | |||
382 | return new_version; | 399 | return new_version; |
383 | } | 400 | } |
384 | 401 | ||