[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdebase/workspace/kcontrol/keyboard
From:       Andriy Rysin <arysin () gmail ! com>
Date:       2010-08-20 22:43:30
Message-ID: 20100820224330.8E00CAC855 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1166109 by rysin:

make label/flag radiobutton instead of checkbox (BUG 244145)

 M  +8 -1      kcm_keyboard.ui  
 M  +6 -4      kcm_keyboard_widget.cpp  


--- trunk/KDE/kdebase/workspace/kcontrol/keyboard/kcm_keyboard.ui #1166108:1166109
@@ -114,12 +114,19 @@
           </widget>
          </item>
          <item row="2" column="0">
-          <widget class="QCheckBox" name="showFlagChk">
+          <widget class="QRadioButton" name="showFlagRadioBtn">
            <property name="text">
             <string>Show flag</string>
            </property>
           </widget>
          </item>
+         <item row="3" column="0">
+          <widget class="QRadioButton" name="showLabelRadioBtn">
+           <property name="text">
+            <string>Show label</string>
+           </property>
+          </widget>
+         </item>
         </layout>
        </widget>
       </item>
--- trunk/KDE/kdebase/workspace/kcontrol/keyboard/kcm_keyboard_widget.cpp \
#1166108:1166109 @@ -54,12 +54,12 @@
 static const int TAB_ADVANCED = 2;
 
 KCMKeyboardWidget::KCMKeyboardWidget(Rules* rules_, KeyboardConfig* keyboardConfig_, \
const KComponentData componentData_, QWidget* /*parent*/): +	rules(rules_),
 	componentData(componentData_),
 	actionCollection(NULL),
 	uiUpdating(false)
 {
 	flags = new Flags();
-	rules = rules_;
 	keyboardConfig = keyboardConfig_;
 
 	uiWidget = new Ui::TabWidget;
@@ -118,7 +118,7 @@
 
 	keyboardConfig->configureLayouts = uiWidget->configureLayoutsChk->isChecked();
 	keyboardConfig->keyboardModel = \
uiWidget->keyboardModelComboBox->itemData(uiWidget->keyboardModelComboBox->currentIndex()).toString();
                
-	keyboardConfig->showFlag = uiWidget->showFlagChk->isChecked();
+	keyboardConfig->showFlag = uiWidget->showFlagRadioBtn->isChecked();
 
 	keyboardConfig->resetOldXkbOptions = \
uiWidget->configureKeyboardOptionsChk->isChecked();  //    if( \
keyboardConfig->resetOldXkbOptions ) { @@ -241,7 +241,8 @@
 
 	connect(uiWidget->showIndicatorChk, SIGNAL(clicked(bool)), this, \
SLOT(uiChanged()));  connect(uiWidget->showIndicatorChk, SIGNAL(toggled(bool)), \
                uiWidget->showSingleChk, SLOT(setEnabled(bool)));
-	connect(uiWidget->showFlagChk, SIGNAL(clicked(bool)), this, SLOT(uiChanged()));
+	connect(uiWidget->showFlagRadioBtn, SIGNAL(clicked(bool)), this, \
SLOT(uiChanged())); +	connect(uiWidget->showLabelRadioBtn, SIGNAL(clicked(bool)), \
this, SLOT(uiChanged()));  connect(uiWidget->showSingleChk, SIGNAL(toggled(bool)), \
this, SLOT(uiChanged()));  }
 
@@ -495,7 +496,8 @@
 	uiWidget->configureLayoutsChk->setChecked(keyboardConfig->configureLayouts);
 	uiWidget->showIndicatorChk->setChecked(keyboardConfig->showIndicator);
 	uiWidget->showSingleChk->setChecked(keyboardConfig->showSingle);
-	uiWidget->showFlagChk->setChecked(keyboardConfig->showFlag);
+	uiWidget->showFlagRadioBtn->setChecked(keyboardConfig->showFlag);
+	uiWidget->showLabelRadioBtn->setChecked(!keyboardConfig->showFlag);
 }
 
 void KCMKeyboardWidget::updateHardwareUI()


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic