aboutsummaryrefslogtreecommitdiff
path: root/src/WorkspaceCmd.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/WorkspaceCmd.cc')
-rw-r--r--src/WorkspaceCmd.cc25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/WorkspaceCmd.cc b/src/WorkspaceCmd.cc
index bdba96c..a642008 100644
--- a/src/WorkspaceCmd.cc
+++ b/src/WorkspaceCmd.cc
@@ -686,3 +686,28 @@ void CloseAllWindowsCmd::execute() {
686 windows.end(), std::mem_fun(&FluxboxWindow::close)); 686 windows.end(), std::mem_fun(&FluxboxWindow::close));
687 687
688} 688}
689
690void RelabelButtonCmd::execute() {
691#if USE_TOOLBAR
692 if (BScreen *screen = Fluxbox::instance()->mouseScreen())
693 screen->relabelToolButton(m_button, m_label);
694#endif
695}
696
697FbTk::Command<void> *RelabelButtonCmd::parse(const std::string &command,
698 const std::string &args, bool trusted) {
699 std::string button, label;
700 std::size_t ws = args.find_first_of(" \t\n");
701 if (ws != std::string::npos) {
702 button = args.substr(0, ws);
703 if (button.find("button.") == 0) {
704 label = args.substr(ws + 1, std::string::npos);
705 } else {
706 button.clear();
707 }
708 }
709 return new RelabelButtonCmd(button, label);
710}
711
712REGISTER_COMMAND_PARSER(relabelbutton, RelabelButtonCmd::parse, void);
713