1
From 5c38825b8a72b8cdbfae34105f6ffe330acbecc8 Mon Sep 17 00:00:00 2001
2
From: Andriy Rysin <arysin@gmail.com>
3
Date: Tue, 20 Sep 2011 21:14:47 -0400
4
Subject: [PATCH 31/31] Fix wrong inital tab in keyboard kcm
9
kcontrol/keyboard/kcm_keyboard_widget.cpp | 7 ++++---
10
1 files changed, 4 insertions(+), 3 deletions(-)
12
diff --git a/kcontrol/keyboard/kcm_keyboard_widget.cpp b/kcontrol/keyboard/kcm_keyboard_widget.cpp
13
index 1b5f558..e94640f 100644
14
--- a/kcontrol/keyboard/kcm_keyboard_widget.cpp
15
+++ b/kcontrol/keyboard/kcm_keyboard_widget.cpp
16
@@ -50,7 +50,7 @@ static const QString LV3_SWITCH_GROUP_NAME("lv3");
17
//static const QString RESET_XKB_OPTIONS("-option");
19
static const int TAB_HARDWARE = 0;
20
-//static const int TAB_LAYOUTS = 1;
21
+static const int TAB_LAYOUTS = 1;
22
static const int TAB_ADVANCED = 2;
24
static const int MIN_LOOPING_COUNT = 2;
25
@@ -95,14 +95,15 @@ KCMKeyboardWidget::~KCMKeyboardWidget()
26
void KCMKeyboardWidget::handleParameters(const QVariantList &args)
28
// TODO: improve parameter handling
29
+ setCurrentIndex(TAB_HARDWARE);
30
foreach(const QVariant& arg, args) {
31
if( arg.type() == QVariant::String ) {
32
QString str = arg.toString();
33
if( str == "--tab=layouts" ) {
35
+ setCurrentIndex(TAB_LAYOUTS);
37
else if( str == "--tab=advanced" ) {
39
+ setCurrentIndex(TAB_ADVANCED);