author | hash <hash> | 2002-08-27 02:05:55 (UTC) |
---|---|---|
committer | hash <hash> | 2002-08-27 02:05:55 (UTC) |
commit | 59172653912647168c44ec30c66458b7ed4c5a41 (patch) (unidiff) | |
tree | dff146bf9812c39764ef2c134a9bb0764b3dc104 | |
parent | b35f6fbca5a2720044e0a1dc309191e9b39eb3ce (diff) | |
download | opie-59172653912647168c44ec30c66458b7ed4c5a41.zip opie-59172653912647168c44ec30c66458b7ed4c5a41.tar.gz opie-59172653912647168c44ec30c66458b7ed4c5a41.tar.bz2 |
now shows whatever you wrote in the keymap 'title' var as the listItem
-rw-r--r-- | inputmethods/multikey/configdlg.cpp | 23 | ||||
-rw-r--r-- | inputmethods/multikey/multikey.pro | 2 |
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() { | |||
289 | QStringList maps = config.readListEntry("maps", QChar('|')); | 289 | QStringList maps = config.readListEntry("maps", QChar('|')); |
290 | maps.append(map); | 290 | maps.append(map); |
291 | custom_maps.append(map); | 291 | custom_maps.append(map); |
292 | keymaps->insertItem(map); | 292 | |
293 | QFile map_file (map); | ||
294 | if (map_file.open(IO_ReadOnly)) { | ||
295 | |||
296 | QString line; bool found = 0; | ||
297 | |||
298 | map_file.readLine(line, 1024); | ||
299 | while (!map_file.atEnd()) { | ||
300 | |||
301 | if (line.find(QRegExp("^title\\s*=\\s*")) != -1) { | ||
302 | |||
303 | keymaps->insertItem(line.right(line.length() - line.find(QChar('=')) - 1).stripWhiteSpace()); | ||
304 | found = 1; | ||
305 | break; | ||
306 | } | ||
307 | map_file.readLine(line, 1024); | ||
308 | } | ||
309 | if (!found) keymaps->insertItem(map); | ||
310 | |||
311 | map_file.close(); | ||
312 | } | ||
313 | |||
293 | keymaps->setSelected(keymaps->count() - 1, true); | 314 | keymaps->setSelected(keymaps->count() - 1, true); |
294 | 315 | ||
295 | 316 | ||
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 \ | |||
11 | ../pickboard/pickboardpicks.cpp \ | 11 | ../pickboard/pickboardpicks.cpp \ |
12 | keyboardimpl.cpp | 12 | keyboardimpl.cpp |
13 | TARGET = qmultikey | 13 | TARGET = qmultikey |
14 | DESTDIR = ../../plugins/inputmethods | 14 | DESTDIR = $(OPIEDIR)/plugins/inputmethods |
15 | INCLUDEPATH += $(OPIEDIR)/include | 15 | INCLUDEPATH += $(OPIEDIR)/include |
16 | DEPENDPATH += ../$(OPIEDIR)/include ../../launcher | 16 | DEPENDPATH += ../$(OPIEDIR)/include ../../launcher |
17 | LIBS += -lqpe | 17 | LIBS += -lqpe |