summaryrefslogtreecommitdiff
path: root/inputmethods/multikey
Side-by-side diff
Diffstat (limited to 'inputmethods/multikey') (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/multikey/keyboard.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/inputmethods/multikey/keyboard.cpp b/inputmethods/multikey/keyboard.cpp
index bded447..2ce6dd3 100644
--- a/inputmethods/multikey/keyboard.cpp
+++ b/inputmethods/multikey/keyboard.cpp
@@ -36,12 +36,24 @@
#include <qstringlist.h>
#include <sys/utsname.h>
using namespace MultiKey;
+static const char * const kb_config_xpm[] = {
+"13 7 2 1",
+" c None",
+". c #000000",
+" ",
+" . ",
+" ... ",
+" ..... ",
+" . ",
+" . ",
+" "};
+
/* Keyboard::Keyboard {{{1 */
Keyboard::Keyboard(QWidget* parent, const char* _name, WFlags f) :
QFrame(parent, _name, f), shift(0), lock(0), ctrl(0), alt(0),
meta(0), circumflex(0), diaeresis(0), baccent(0), accent(0),
useLargeKeys(TRUE), usePicks(0), useRepeat(0),
pressedKeyRow(-1), pressedKeyCol(-1),
@@ -1519,17 +1531,23 @@ void Keys::setKeysFromFile(const char * filename) {
buf = t.readLine();
}
}
+
f.close();
+ } else {
+ // We couldnt find the selected keymap, give them a configure button
+ QImage * btn = new QImage((const char ** )kb_config_xpm);
+ setKey(1, 0x1030, 0, 2, btn);
}
}
+
// Keys::setKey {{{2
void Keys::setKey(const int row, const int qcode, const ushort unicode,
const int width, QImage *pix) {
Key * key;
key = new Key;