diff options
| author | Dana Jansens <danakj@orodu.net> | 2002-07-20 16:26:37 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2002-07-20 16:26:37 +0000 |
| commit | 843f9726ab6fd99fe3a2f285e6c85bd2880a275f (patch) | |
| tree | 201a1ece1d918d814ce22e47764b389cf23c025c /util/epist | |
| parent | f32096dcd2c5a4e44763def56c290ce37aa548ba (diff) | |
add execute command. add string to action class.
Diffstat (limited to 'util/epist')
| -rw-r--r-- | util/epist/actions.cc | 11 | ||||
| -rw-r--r-- | util/epist/actions.hh | 5 | ||||
| -rw-r--r-- | util/epist/epist.cc | 2 | ||||
| -rw-r--r-- | util/epist/screen.cc | 2 |
4 files changed, 16 insertions, 4 deletions
diff --git a/util/epist/actions.cc b/util/epist/actions.cc index 493d0215..35ddbb80 100644 --- a/util/epist/actions.cc +++ b/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) { } diff --git a/util/epist/actions.hh b/util/epist/actions.hh index 6ae4e7ff..81b3920c 100644 --- a/util/epist/actions.hh +++ b/util/epist/actions.hh @@ -28,6 +28,7 @@ extern "C" { } #include <list> +#include <string> class Action { public: @@ -81,14 +82,18 @@ private: 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; diff --git a/util/epist/epist.cc b/util/epist/epist.cc index b9dac6a8..1a4b4c24 100644 --- a/util/epist/epist.cc +++ b/util/epist/epist.cc @@ -159,7 +159,7 @@ epist::epist(char **argv, char *dpy_name, char *rc_file) _actions.push_back(Action(Action::execute, XKeysymToKeycode(getXDisplay(), XStringToKeysym("F6")), - Mod1Mask)); + Mod1Mask, "aterm")); activateGrabs(); } diff --git a/util/epist/screen.cc b/util/epist/screen.cc index 98ad67f2..ce068122 100644 --- a/util/epist/screen.cc +++ b/util/epist/screen.cc @@ -202,7 +202,7 @@ void screen::handleKeypress(const XEvent &e) { return; case Action::execute: - execCommand("aterm"); + execCommand(it->string()); return; } |
