From 67b69b7aede83ccb0d933dec9bd959f01eb6ea06 Mon Sep 17 00:00:00 2001 From: treke Date: Sat, 19 Jul 2003 16:38:27 +0000 Subject: * Adds a keyboard layout with a configure button to multikey when it is unable to load the selected layout. Fixes (#920) --- (limited to 'inputmethods') 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 @@ -39,6 +39,18 @@ 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), @@ -1522,11 +1534,17 @@ void Keys::setKeysFromFile(const char * filename) { } } + 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) { -- cgit v0.9.0.2