summaryrefslogtreecommitdiff
path: root/inputmethods
Unidiff
Diffstat (limited to 'inputmethods') (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/multikey/configdlg.cpp4
-rw-r--r--inputmethods/multikey/keyboard.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/inputmethods/multikey/configdlg.cpp b/inputmethods/multikey/configdlg.cpp
index 1fba9bc..fe5051d 100644
--- a/inputmethods/multikey/configdlg.cpp
+++ b/inputmethods/multikey/configdlg.cpp
@@ -70,25 +70,25 @@ ConfigDlg::ConfigDlg () : QDialog ()
70 70
71 QToolButton *tb2 = new QToolButton(vbox1, tr("Move Down")); 71 QToolButton *tb2 = new QToolButton(vbox1, tr("Move Down"));
72 tb2->setPixmap(Resource::loadPixmap("down")); 72 tb2->setPixmap(Resource::loadPixmap("down"));
73 tb2->setAutoRaise(TRUE); 73 tb2->setAutoRaise(TRUE);
74 tb2->setFocusPolicy(QWidget::NoFocus); 74 tb2->setFocusPolicy(QWidget::NoFocus);
75 tb2->setToggleButton(FALSE); 75 tb2->setToggleButton(FALSE);
76 connect(tb2, SIGNAL(clicked()), this, SLOT(moveSelectedDown())); 76 connect(tb2, SIGNAL(clicked()), this, SLOT(moveSelectedDown()));
77 77
78 QString cur(tr("Current Language")); 78 QString cur(tr("Current Language"));
79 keymaps->insertItem(cur); 79 keymaps->insertItem(cur);
80 keymaps->setSelected(0, true); 80 keymaps->setSelected(0, true);
81 81
82 QDir map_dir(QPEApplication::qpeDir() + "/share/multikey", "*.keymap"); 82 QDir map_dir(QPEApplication::qpeDir() + "share/multikey", "*.keymap");
83 default_maps = map_dir.entryList(); // so i can access it in other places 83 default_maps = map_dir.entryList(); // so i can access it in other places
84 custom_maps = config.readListEntry("maps", QChar('|')); 84 custom_maps = config.readListEntry("maps", QChar('|'));
85 sw_maps = ConfigDlg::loadSw(); 85 sw_maps = ConfigDlg::loadSw();
86 86
87 QStringList sw_copy(sw_maps); 87 QStringList sw_copy(sw_maps);
88 for (uint i = 0; i < sw_copy.count(); i++) { 88 for (uint i = 0; i < sw_copy.count(); i++) {
89 89
90 QString keymap_map; 90 QString keymap_map;
91 if (sw_copy[i][0] != '/') { /* share/multikey */ 91 if (sw_copy[i][0] != '/') { /* share/multikey */
92 92
93 keymap_map = map_dir.absPath() + "/" + sw_copy[i]; 93 keymap_map = map_dir.absPath() + "/" + sw_copy[i];
94 } else { 94 } else {
@@ -239,25 +239,25 @@ ConfigDlg::ConfigDlg () : QDialog ()
239 239
240 color_lay->addWidget(color_grid, 0, 0); 240 color_lay->addWidget(color_grid, 0, 0);
241 color_lay->addItem(spacer); 241 color_lay->addItem(spacer);
242 242
243 tabs->addTab(color_box, tr("Colors")); 243 tabs->addTab(color_box, tr("Colors"));
244 base_lay->addWidget(tabs); 244 base_lay->addWidget(tabs);
245} 245}
246 246
247QStringList ConfigDlg::loadSw() 247QStringList ConfigDlg::loadSw()
248{ 248{
249 Config *config = new Config("multikey"); 249 Config *config = new Config("multikey");
250 config->setGroup("keymaps"); 250 config->setGroup("keymaps");
251 QDir map_dir(QPEApplication::qpeDir() + "/share/multikey", "*.keymap"); 251 QDir map_dir(QPEApplication::qpeDir() + "share/multikey", "*.keymap");
252 QStringList d_maps = map_dir.entryList(); // so i can access it in other places 252 QStringList d_maps = map_dir.entryList(); // so i can access it in other places
253 QStringList c_maps = config->readListEntry("maps", QChar('|')); 253 QStringList c_maps = config->readListEntry("maps", QChar('|'));
254 QStringList s_maps = config->readListEntry("sw", QChar('|')); 254 QStringList s_maps = config->readListEntry("sw", QChar('|'));
255 delete config; 255 delete config;
256 256
257 if (!s_maps.count()) 257 if (!s_maps.count())
258 { 258 {
259 s_maps = d_maps+c_maps; 259 s_maps = d_maps+c_maps;
260 } 260 }
261 else 261 else
262 { 262 {
263 /* Clear non existents entries */ 263 /* Clear non existents entries */
diff --git a/inputmethods/multikey/keyboard.cpp b/inputmethods/multikey/keyboard.cpp
index 7ddfd3e..f8cafd5 100644
--- a/inputmethods/multikey/keyboard.cpp
+++ b/inputmethods/multikey/keyboard.cpp
@@ -1368,30 +1368,30 @@ Keys::Keys() {
1368 Config *config = new Config ("multikey"); 1368 Config *config = new Config ("multikey");
1369 config->setGroup( "keymaps" ); 1369 config->setGroup( "keymaps" );
1370 QString map = config->readEntry( "current" ); 1370 QString map = config->readEntry( "current" );
1371 delete config; 1371 delete config;
1372 1372
1373 if (map.isNull() || !(QFile(map).exists())) { 1373 if (map.isNull() || !(QFile(map).exists())) {
1374 1374
1375 Config *config = new Config("locale"); 1375 Config *config = new Config("locale");
1376 config->setGroup( "Language" ); 1376 config->setGroup( "Language" );
1377 QString l = config->readEntry( "Language" , "en" ); 1377 QString l = config->readEntry( "Language" , "en" );
1378 delete config; 1378 delete config;
1379 1379
1380 map = QPEApplication::qpeDir() + "/share/multikey/" 1380 map = QPEApplication::qpeDir() + "share/multikey/"
1381 + l + ".keymap"; 1381 + l + ".keymap";
1382 1382
1383 } 1383 }
1384 if (map.isNull() || !(QFile(map).exists())) { 1384 if (map.isNull() || !(QFile(map).exists())) {
1385 map = QPEApplication::qpeDir() + "/share/multikey/en.keymap"; 1385 map = QPEApplication::qpeDir() + "share/multikey/en.keymap";
1386 } 1386 }
1387 1387
1388 setKeysFromFile(map); 1388 setKeysFromFile(map);
1389} 1389}
1390 1390
1391Keys::Keys(const char * filename) { 1391Keys::Keys(const char * filename) {
1392 1392
1393 setKeysFromFile(filename); 1393 setKeysFromFile(filename);
1394} 1394}
1395 1395
1396// Keys::setKeysFromFile {{{2 1396// Keys::setKeysFromFile {{{2
1397void Keys::setKeysFromFile(const char * filename) { 1397void Keys::setKeysFromFile(const char * filename) {