author | mickeyl <mickeyl> | 2005-06-24 12:10:13 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2005-06-24 12:10:13 (UTC) |
commit | 886b3a77a64d5808d2fe68d0e7e6b712cf642753 (patch) (unidiff) | |
tree | 60121b38e6100ff10a6e01293b7e478489f09bba /noncore/applets/pcmcia/configdialog.cpp | |
parent | 4775588885d60ea208c667a5863244a847a69f94 (diff) | |
download | opie-886b3a77a64d5808d2fe68d0e7e6b712cf642753.zip opie-886b3a77a64d5808d2fe68d0e7e6b712cf642753.tar.gz opie-886b3a77a64d5808d2fe68d0e7e6b712cf642753.tar.bz2 |
- fix configdialog checking for productIdentity, not for cardmgr's idea of that
- perform insert action and perform suspend action
Except for "prompt for" and some polishing, this applet should now be fairly complete
Diffstat (limited to 'noncore/applets/pcmcia/configdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/applets/pcmcia/configdialog.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/noncore/applets/pcmcia/configdialog.cpp b/noncore/applets/pcmcia/configdialog.cpp index f5812ba..f94edde 100644 --- a/noncore/applets/pcmcia/configdialog.cpp +++ b/noncore/applets/pcmcia/configdialog.cpp | |||
@@ -132,6 +132,7 @@ void ConfigDialog::writeConfigEntry( const OPcmciaSocket* card, const QString& k | |||
132 | OConfig cfg( "PCMCIA" ); | 132 | OConfig cfg( "PCMCIA" ); |
133 | cfg.setGroup( "Global" ); | 133 | cfg.setGroup( "Global" ); |
134 | int nCards = cfg.readNumEntry( "nCards", 0 ); | 134 | int nCards = cfg.readNumEntry( "nCards", 0 ); |
135 | QString cardName = card->productIdentity().join( " " ).stripWhiteSpace(); | ||
135 | QString action; | 136 | QString action; |
136 | 137 | ||
137 | for ( int i = 0; i < nCards; ++i ) | 138 | for ( int i = 0; i < nCards; ++i ) |
@@ -139,8 +140,8 @@ void ConfigDialog::writeConfigEntry( const OPcmciaSocket* card, const QString& k | |||
139 | QString cardSection = QString( "Card_%1" ).arg( i ); | 140 | QString cardSection = QString( "Card_%1" ).arg( i ); |
140 | cfg.setGroup( cardSection ); | 141 | cfg.setGroup( cardSection ); |
141 | QString name = cfg.readEntry( "name" ); | 142 | QString name = cfg.readEntry( "name" ); |
142 | odebug << "comparing card '" << card->name() << "' with known card '" << name << "'" << oendl; | 143 | odebug << "comparing card '" << cardName << "' with known card '" << name << "'" << oendl; |
143 | if ( card->name() == name ) | 144 | if ( cardName == name ) |
144 | { | 145 | { |
145 | cfg.writeEntry( key, value ); | 146 | cfg.writeEntry( key, value ); |
146 | break; | 147 | break; |
@@ -153,6 +154,7 @@ QString ConfigDialog::readConfigEntry( const OPcmciaSocket* card, const QString& | |||
153 | OConfig cfg( "PCMCIA" ); | 154 | OConfig cfg( "PCMCIA" ); |
154 | cfg.setGroup( "Global" ); | 155 | cfg.setGroup( "Global" ); |
155 | int nCards = cfg.readNumEntry( "nCards", 0 ); | 156 | int nCards = cfg.readNumEntry( "nCards", 0 ); |
157 | QString cardName = card->productIdentity().join( " " ).stripWhiteSpace(); | ||
156 | QString value; | 158 | QString value; |
157 | 159 | ||
158 | for ( int i = 0; i < nCards; ++i ) | 160 | for ( int i = 0; i < nCards; ++i ) |
@@ -160,8 +162,8 @@ QString ConfigDialog::readConfigEntry( const OPcmciaSocket* card, const QString& | |||
160 | QString cardSection = QString( "Card_%1" ).arg( i ); | 162 | QString cardSection = QString( "Card_%1" ).arg( i ); |
161 | cfg.setGroup( cardSection ); | 163 | cfg.setGroup( cardSection ); |
162 | QString name = cfg.readEntry( "name" ); | 164 | QString name = cfg.readEntry( "name" ); |
163 | odebug << "comparing card '" << card->name() << "' with known card '" << name << "'" << oendl; | 165 | odebug << "comparing card '" << cardName << "' with known card '" << name << "'" << oendl; |
164 | if ( card->name() == name ) | 166 | if ( cardName == name ) |
165 | { | 167 | { |
166 | value = cfg.readEntry( key, defaultValue ); | 168 | value = cfg.readEntry( key, defaultValue ); |
167 | break; | 169 | break; |