[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/3.5/kdebase/kcontrol/smartcard
From: Helio Chissini de Castro <helio () conectiva ! com ! br>
Date: 2006-08-22 3:17:44
Message-ID: 1156216664.259539.29852.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 575774 by helio:
- Setting module to use system defaults
M +18 -31 smartcard.cpp
M +2 -2 smartcard.h
--- branches/KDE/3.5/kdebase/kcontrol/smartcard/smartcard.cpp #575773:575774
@@ -140,27 +140,7 @@
}
-void KSmartcardConfig::loadSmartCardSupportTab(){
-
-
- //Update the toggle buttons with the current configuration
-
- if (_ok) {
- base->enableSupport->setChecked(config->readBoolEntry("Enable Support",
- false));
- base->enablePolling->setChecked(config->readBoolEntry("Enable Polling",
- true));
- base->beepOnInsert->setChecked(config->readBoolEntry("Beep on Insert",
- true));
- base->launchManager->setChecked(config->readBoolEntry("Launch Manager",
- true));
-
-
-
- }
-}
-
void KSmartcardConfig::updateReadersState (QString readerName,
bool isCardPresent,
QString atr) {
@@ -294,10 +274,12 @@
}
}
-
void KSmartcardConfig::load()
{
+ load( false );
+void KSmartcardConfig::load(bool useDefaults )
+{
//Prepare data for dcop calls
QByteArray data, retval;
@@ -306,9 +288,21 @@
QCString modName = "kardsvc";
arg << modName;
- loadSmartCardSupportTab();
+ //Update the toggle buttons with the current configuration
+ config->setReadDefaults( useDefaults );
+ if (_ok) {
+ base->enableSupport->setChecked(config->readBoolEntry("Enable Support",
+ false));
+ base->enablePolling->setChecked(config->readBoolEntry("Enable Polling",
+ true));
+ base->beepOnInsert->setChecked(config->readBoolEntry("Beep on Insert",
+ true));
+ base->launchManager->setChecked(config->readBoolEntry("Launch Manager",
+ true));
+ }
+
// We call kardsvc to retrieve the current readers
kapp->dcopClient()->call("kded", "kardsvc", "getSlotList ()",
data, rettype, retval);
@@ -320,7 +314,7 @@
//And we update the panel
loadReadersTab(readers);
- emit changed(false);
+ emit changed(useDefaults);
}
@@ -364,18 +358,11 @@
void KSmartcardConfig::defaults()
{
-if (_ok) {
- base->enableSupport->setChecked(false);
- base->enablePolling->setChecked(true);
- base->beepOnInsert->setChecked(true);
- base->launchManager->setChecked(true);
+ load( true );
}
- emit changed(true);
-}
-
QString KSmartcardConfig::quickHelp() const
{
return i18n("<h1>smartcard</h1> This module allows you to configure KDE support"
--- branches/KDE/3.5/kdebase/kcontrol/smartcard/smartcard.h #575773:575774
@@ -50,6 +50,7 @@
SmartcardBase *base;
void load();
+ void load( bool useDefaults);
void save();
void defaults();
@@ -77,8 +78,7 @@
bool _ok;
KCardDB * _cardDB;
KPopupMenu * _popUpKardChooser;
-
- void loadSmartCardSupportTab();
+
void getSupportingModule( KListViewItem * ant,
QString & cardATR) const ;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic