summaryrefslogtreecommitdiff
path: root/inputmethods/multikey/configdlg.cpp
Unidiff
Diffstat (limited to 'inputmethods/multikey/configdlg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/multikey/configdlg.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/inputmethods/multikey/configdlg.cpp b/inputmethods/multikey/configdlg.cpp
index a6e4dad..ac132d3 100644
--- a/inputmethods/multikey/configdlg.cpp
+++ b/inputmethods/multikey/configdlg.cpp
@@ -163,32 +163,34 @@ void ConfigDlg::pickTog() {
163 * listItem. therefor you have to minus one to the index before you access it. 163 * listItem. therefor you have to minus one to the index before you access it.
164 * 164 *
165 */ 165 */
166 166
167void ConfigDlg::setMap(int index) { 167void ConfigDlg::setMap(int index) {
168 168
169 if (index == 0) { 169 if (index == 0) {
170 170
171 remove_button->setDisabled(true); 171 remove_button->setDisabled(true);
172 172
173 emit setMapToDefault(); 173 emit setMapToDefault();
174 } 174 }
175 else if ((uint)index <= default_maps.count()) { 175 else if ((uint)index <= default_maps.count()) {
176 176
177 remove_button->setDisabled(true); 177 remove_button->setDisabled(true);
178 178
179 emit setMapToFile(keymaps->text(index));
180
179 } else { 181 } else {
180 182
181 remove_button->setEnabled(true); 183 remove_button->setEnabled(true);
182 184
183 emit setMapToFile(keymaps->text(index)); 185 emit setMapToFile(keymaps->text(index));
184 } 186 }
185} 187}
186 188
187void ConfigDlg::addMap() { 189void ConfigDlg::addMap() {
188 190
189 QString map = OFileDialog::getOpenFileName(1, QDir::home().absPath()); 191 QString map = OFileDialog::getOpenFileName(1, QDir::home().absPath());
190 Config config ("multikey"); 192 Config config ("multikey");
191 config.setGroup("keymaps"); 193 config.setGroup("keymaps");
192 QStringList maps = config.readListEntry("maps", QChar('|')); 194 QStringList maps = config.readListEntry("maps", QChar('|'));
193 maps.append(map); 195 maps.append(map);
194 keymaps->insertItem(map); 196 keymaps->insertItem(map);