From 256b0968db89c5a13b5a743a313d3eeeaf55e92e Mon Sep 17 00:00:00 2001 From: fluxgen Date: Fri, 28 Feb 2003 23:55:37 +0000 Subject: cleaning --- src/Keys.cc | 109 +++++++++++++++++++++++++++++------------------------------- 1 file changed, 52 insertions(+), 57 deletions(-) diff --git a/src/Keys.cc b/src/Keys.cc index 5343634..20677cd 100644 --- a/src/Keys.cc +++ b/src/Keys.cc @@ -19,12 +19,13 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -//$Id: Keys.cc,v 1.22 2003/02/02 16:32:37 rathnor Exp $ +//$Id: Keys.cc,v 1.23 2003/02/28 23:55:37 fluxgen Exp $ #include "Keys.hh" #include "StringUtil.hh" +#include "App.hh" #ifdef HAVE_CONFIG_H #include "../config.h" @@ -132,15 +133,14 @@ Keys::t_actionstr Keys::m_actionlist[] = { {0, LASTKEYGRAB} }; -Keys::Keys(Display *display, const char *filename): +Keys::Keys(const char *filename): m_capslock_mod(0), m_numlock_mod(0), m_scrolllock_mod(0), m_abortkey(0), - m_display(display) + m_display(FbTk::App::instance()->display()) { determineModmap(); - assert(display); if (filename != 0) load(filename); } @@ -150,9 +150,7 @@ Keys::~Keys() { deleteTree(); } -//--------- deleteTree ----------- -// Destroys the keytree and m_abortkey -//-------------------------------- +/// Destroys the keytree and m_abortkey void Keys::deleteTree() { while (!m_keylist.empty()) { if (m_keylist.back() && m_keylist.back() != 0) @@ -165,9 +163,7 @@ void Keys::deleteTree() { } } -//-------- ungrabKeys --------- -// Ungrabs the keys -//----------------------------- +/// Ungrabs the keys void Keys::ungrabKeys() { for (int screen=0; screen1) { //keyarg=0; - int tmpmod=getModifier(val[argc].c_str()); + int tmpmod = getModifier(val[argc].c_str()); if(tmpmod) mod|=tmpmod; //If it's a modifier else { @@ -351,17 +347,17 @@ bool Keys::load(const char *filename) { } break; //dont process this linebuffer more - } - } - } + } // end if + } // end for + } // end while return true; } -//--------- grabKey --------------------- -// Grabs a key with the modifier -// and with numlock,capslock and scrollock -//---------------------------------------- +/** + Grabs a key with the modifier + and with numlock,capslock and scrollock +*/ void Keys::grabKey(unsigned int key, unsigned int mod) { for (int screen=0; screen