add execute command. add string to action class.
Dana Jansens danakj@orodu.net
4 files changed,
16 insertions(+),
4 deletions(-)
M
util/epist/actions.cc
→
util/epist/actions.cc
@@ -23,6 +23,13 @@
#include "actions.hh" Action::Action(enum ActionType type, KeyCode keycode, unsigned int modifierMask, - int num): _type(type), _keycode(keycode), - _modifierMask(modifierMask), _numberParam(num) + int num) + : _type(type), _keycode(keycode), + _modifierMask(modifierMask), _numberParam(num) +{ } + +Action::Action(enum ActionType type, KeyCode keycode, unsigned int modifierMask, + const std::string &str) + : _type(type), _keycode(keycode), + _modifierMask(modifierMask), _stringParam(str) { }
M
util/epist/actions.hh
→
util/epist/actions.hh
@@ -28,6 +28,7 @@ #include <X11/Xlib.h>
} #include <list> +#include <string> class Action { public:@@ -81,14 +82,18 @@ const KeyCode _keycode;
const unsigned int _modifierMask; const int _numberParam; + const std::string _stringParam; public: inline enum ActionType type() const { return _type;} inline const KeyCode keycode() const { return _keycode; } inline const unsigned int modifierMask() const { return _modifierMask; } inline const int number() const { return _numberParam; } + inline const std::string &string() const { return _stringParam; } Action(enum ActionType type, KeyCode keycode, unsigned int modifierMask, int number = 0); + Action(enum ActionType type, KeyCode keycode, unsigned int modifierMask, + const std::string &str); }; typedef std::list<Action> ActionList;
M
util/epist/epist.cc
→
util/epist/epist.cc
@@ -159,7 +159,7 @@ Mod1Mask | ControlMask | ShiftMask, 3));
_actions.push_back(Action(Action::execute, XKeysymToKeycode(getXDisplay(), XStringToKeysym("F6")), - Mod1Mask)); + Mod1Mask, "aterm")); activateGrabs(); }
M
util/epist/screen.cc
→
util/epist/screen.cc
@@ -202,7 +202,7 @@ changeWorkspace(it->number());
return; case Action::execute: - execCommand("aterm"); + execCommand(it->string()); return; }