aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authormarkt <markt>2007-04-08 17:57:49 (GMT)
committermarkt <markt>2007-04-08 17:57:49 (GMT)
commit863eca5517b4f91e26d889d598f41816acf60a40 (patch)
tree18be5baa27a1c5fa8523ff951bdf751b8f163a44 /util
parent12a8b3c038c9ccb577c699d41a1d19602132a7a8 (diff)
downloadfluxbox-863eca5517b4f91e26d889d598f41816acf60a40.zip
fluxbox-863eca5517b4f91e26d889d598f41816acf60a40.tar.bz2
added OnToolbar modifier, removed followModel, fixed unpressed button rendering
Diffstat (limited to 'util')
-rw-r--r--util/fluxbox-update_configs.cc36
1 files changed, 36 insertions, 0 deletions
diff --git a/util/fluxbox-update_configs.cc b/util/fluxbox-update_configs.cc
index c3b5a85..563bada 100644
--- a/util/fluxbox-update_configs.cc
+++ b/util/fluxbox-update_configs.cc
@@ -146,6 +146,42 @@ int run_updates(int old_version, FbTk::ResourceManager rm) {
146 new_version = 2; 146 new_version = 2;
147 } 147 }
148 148
149 if (old_version < 3) { // move toolbar wheeling to keys file
150 string whole_keyfile = read_file(keyfilename);
151 string new_keyfile = "";
152 // let's put our new keybindings first, so they're easy to find
153 new_keyfile += "!mouse actions added by fluxbox-update_configs\n";
154 bool keep_changes = false;
155
156 // scrolling on toolbar needs to match user's toolbar wheeling settings
157 FbTk::Resource<string> rc_wheeling(rm, "Off",
158 "session.screen0.iconbar.wheelMode",
159 "Session.Screen0.Iconbar.WheelMode");
160 FbTk::Resource<bool> rc_screen(rm, true,
161 "session.screen0.desktopwheeling",
162 "Session.Screen0.DesktopWheeling");
163 FbTk::Resource<bool> rc_reverse(rm, false,
164 "session.screen0.reversewheeling",
165 "Session.Screen0.ReverseWheeling");
166 if (strcasecmp((*rc_wheeling).c_str(), "On") == 0 ||
167 (strcasecmp((*rc_wheeling).c_str(), "Screen") && *rc_screen)) {
168 keep_changes = true;
169 if (*rc_reverse) { // if you ask me, this should have been default
170 new_keyfile += "OnToolbar Mouse4 :prevWorkspace\n";
171 new_keyfile += "OnToolbar Mouse5 :nextWorkspace\n";
172 } else {
173 new_keyfile += "OnToolbar Mouse4 :nextWorkspace\n";
174 new_keyfile += "OnToolbar Mouse5 :prevWorkspace\n";
175 }
176 }
177 new_keyfile += "\n"; // just for good looks
178 new_keyfile += whole_keyfile; // don't forget user's old keybindings
179
180 if (keep_changes)
181 write_file(keyfilename, new_keyfile);
182 new_version = 3;
183 }
184
149 return new_version; 185 return new_version;
150} 186}
151 187