summaryrefslogtreecommitdiff
path: root/inputmethods
Side-by-side diff
Diffstat (limited to 'inputmethods') (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/multikey/configdlg.cpp23
-rw-r--r--inputmethods/multikey/multikey.pro2
2 files changed, 23 insertions, 2 deletions
diff --git a/inputmethods/multikey/configdlg.cpp b/inputmethods/multikey/configdlg.cpp
index c5ebe3c..f6507b4 100644
--- a/inputmethods/multikey/configdlg.cpp
+++ b/inputmethods/multikey/configdlg.cpp
@@ -289,7 +289,28 @@ void ConfigDlg::addMap() {
QStringList maps = config.readListEntry("maps", QChar('|'));
maps.append(map);
custom_maps.append(map);
- keymaps->insertItem(map);
+
+ QFile map_file (map);
+ if (map_file.open(IO_ReadOnly)) {
+
+ QString line; bool found = 0;
+
+ map_file.readLine(line, 1024);
+ while (!map_file.atEnd()) {
+
+ if (line.find(QRegExp("^title\\s*=\\s*")) != -1) {
+
+ keymaps->insertItem(line.right(line.length() - line.find(QChar('=')) - 1).stripWhiteSpace());
+ found = 1;
+ break;
+ }
+ map_file.readLine(line, 1024);
+ }
+ if (!found) keymaps->insertItem(map);
+
+ map_file.close();
+ }
+
keymaps->setSelected(keymaps->count() - 1, true);
diff --git a/inputmethods/multikey/multikey.pro b/inputmethods/multikey/multikey.pro
index 9d76a3d..1171602 100644
--- a/inputmethods/multikey/multikey.pro
+++ b/inputmethods/multikey/multikey.pro
@@ -11,7 +11,7 @@ SOURCES = keyboard.cpp \
../pickboard/pickboardpicks.cpp \
keyboardimpl.cpp
TARGET = qmultikey
-DESTDIR = ../../plugins/inputmethods
+DESTDIR = $(OPIEDIR)/plugins/inputmethods
INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += ../$(OPIEDIR)/include ../../launcher
LIBS += -lqpe