update window scroll action and direction on reconfigure

This commit is contained in:
markt 2006-12-31 21:00:46 +00:00
parent 9e10811c0d
commit 5ee7d3e72e
2 changed files with 25 additions and 0 deletions

View file

@ -8,6 +8,8 @@ Changes for 1.0rc3:
"32-bit" type is actually a "long array" argument (=64bit on 64 systems)
Ewmh.cc Gnome.cc
*06/12/31:
* Update window scroll action (and direction) on reconfigure (Mark)
Window.cc
* Update toolbar visibility on reconfigure (Mark)
Toolbar.cc
*06/12/28:

View file

@ -1199,6 +1199,29 @@ void FluxboxWindow::reconfigure() {
menu().reconfigure();
typedef FbTk::RefCount<FbTk::Command> CommandRef;
typedef FbTk::SimpleCommand<FluxboxWindow> WindowCmd;
CommandRef shade_on_cmd(new WindowCmd(*this, &FluxboxWindow::shadeOn));
CommandRef shade_off_cmd(new WindowCmd(*this, &FluxboxWindow::shadeOff));
CommandRef next_tab_cmd(new WindowCmd(*this, &FluxboxWindow::nextClient));
CommandRef prev_tab_cmd(new WindowCmd(*this, &FluxboxWindow::prevClient));
CommandRef null_cmd;
int reverse = 0;
if (screen().getScrollReverse())
reverse = 1;
if (StringUtil::toLower(screen().getScrollAction()) == string("shade")) {
frame().setOnClickTitlebar(shade_on_cmd, 5 - reverse); // shade on mouse roll
frame().setOnClickTitlebar(shade_off_cmd, 4 + reverse); // unshade if rolled oposite direction
} else if (StringUtil::toLower(screen().getScrollAction()) == string("nexttab")) {
frame().setOnClickTitlebar(next_tab_cmd, 5 - reverse); // next tab
frame().setOnClickTitlebar(prev_tab_cmd, 4 + reverse); // previous tab
} else {
frame().setOnClickTitlebar(null_cmd, 4);
frame().setOnClickTitlebar(null_cmd, 5);
}
}
/// update current client title and title in our frame