[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/base/plasma/applets/plasmaboard
From: Björn Ruberg <bjoern () ruberg-wegener ! de>
Date: 2009-04-11 12:33:28
Message-ID: 1239453208.335831.25207.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 952222 by ruberg:
Configuration of plasmaboard is now saved via Kconfig
M +7 -1 PanelIcon.cpp
M +10 -6 widget.cpp
--- trunk/playground/base/plasma/applets/plasmaboard/PanelIcon.cpp #952221:952222
@@ -26,7 +26,8 @@
{
setAspectRatioMode(Plasma::IgnoreAspectRatio);
setPopupIcon("preferences-desktop-keyboard");
- extendedMode = false;
+ KConfigGroup cg = config();
+ extendedMode = cg.readEntry("extendedMode", false);
}
void PanelIcon::init(){
@@ -44,12 +45,16 @@
if(contextSwitcher != NULL){
delete contextSwitcher;
}
+
+ KConfigGroup cg = config();
+
if(!extendedMode){
contextSwitcher = new QAction(i18n("Switch to basic mode"), this);
if(m_plasmaboard != NULL){
m_plasmaboard->resetKeyboard();
m_plasmaboard->initExtendedKeyboard();
}
+ cg.writeEntry("extendedMode", true);
extendedMode = true;
}
else{
@@ -58,6 +63,7 @@
m_plasmaboard->resetKeyboard();
m_plasmaboard->initBasicKeyboard();
}
+ cg.writeEntry("extendedMode", false);
extendedMode = false;
}
connect(contextSwitcher, SIGNAL(triggered(bool)), this, SLOT(toggleMode()));
--- trunk/playground/base/plasma/applets/plasmaboard/widget.cpp #952221:952222
@@ -25,8 +25,10 @@
#include <QPainter>
#include <QGraphicsGridLayout>
#include <X11/Xlib.h>
+#include <KConfigGroup>
+
#include <math.h>
#include <plasma/theme.h>
@@ -61,15 +63,17 @@
void PlasmaboardWidget::resetKeyboard(){
- int i = m_layout->count() - 1;
- while(i >= 0){
- m_layout->removeAt(i--);
- }
+ int i = 0;
- i = 0;
-
if( basicKeys ){
+ i = m_layout->count() - 1;
+ while(i >= 0){
+ m_layout->removeAt(i--);
+ }
+
+ i = 0;
+
while ( i < 14 ) {
delete funcKeys[i];
i++;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic