author | mickeyl <mickeyl> | 2005-05-21 15:43:07 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2005-05-21 15:43:07 (UTC) |
commit | e570da2879fb3220a46f1a19bb797512fca144c6 (patch) (unidiff) | |
tree | 9ba374f101078fb5ba2e77ad9ab3beefa0a05415 | |
parent | c5cb180e37514584fd0015d7713fe07c041f3815 (diff) | |
download | opie-e570da2879fb3220a46f1a19bb797512fca144c6.zip opie-e570da2879fb3220a46f1a19bb797512fca144c6.tar.gz opie-e570da2879fb3220a46f1a19bb797512fca144c6.tar.bz2 |
catch up with pcmcia changes
-rw-r--r-- | noncore/applets/pcmcia/pcmcia.cpp | 24 | ||||
-rw-r--r-- | noncore/settings/sysinfo/devicesinfo.cpp | 2 |
2 files changed, 18 insertions, 8 deletions
diff --git a/noncore/applets/pcmcia/pcmcia.cpp b/noncore/applets/pcmcia/pcmcia.cpp index 5183572..7f24371 100644 --- a/noncore/applets/pcmcia/pcmcia.cpp +++ b/noncore/applets/pcmcia/pcmcia.cpp | |||
@@ -113,5 +113,5 @@ void PcmciaManager::popupTimeout() | |||
113 | void PcmciaManager::mousePressEvent( QMouseEvent* ) | 113 | void PcmciaManager::mousePressEvent( QMouseEvent* ) |
114 | { | 114 | { |
115 | QPopupMenu * menu = new QPopupMenu( this ); | 115 | QPopupMenu* menu = new QPopupMenu( this ); |
116 | QStringList cmd; | 116 | QStringList cmd; |
117 | bool execute = true; | 117 | bool execute = true; |
@@ -124,9 +124,18 @@ void PcmciaManager::mousePressEvent( QMouseEvent* ) | |||
124 | while ( it.current() ) | 124 | while ( it.current() ) |
125 | { | 125 | { |
126 | menu->insertItem( tr( "Eject card %1: %2" ).arg( i++ ).arg( it.currentKey() ), 1 ); | 126 | |
127 | QPopupMenu* submenu = new QPopupMenu( menu ); | ||
128 | submenu->insertItem( "Eject" ); | ||
129 | submenu->insertItem( "Insert" ); | ||
130 | submenu->insertItem( "Suspend" ); | ||
131 | submenu->insertItem( "Resume" ); | ||
132 | submenu->insertItem( "Configure" ); | ||
133 | |||
134 | menu->insertItem( tr( "%1: %2" ).arg( i++ ).arg( it.current()->identity() ), submenu, 1 ); | ||
127 | ++it; | 135 | ++it; |
128 | } | 136 | } |
129 | 137 | ||
130 | 138 | ||
139 | |||
131 | /* insert items depending on number of cards etc. | 140 | /* insert items depending on number of cards etc. |
132 | 141 | ||
@@ -136,5 +145,5 @@ void PcmciaManager::mousePressEvent( QMouseEvent* ) | |||
136 | } | 145 | } |
137 | 146 | ||
138 | 147 | ||
139 | 148 | ||
140 | if ( cardInPcmcia0 ) { | 149 | if ( cardInPcmcia0 ) { |
@@ -169,5 +178,5 @@ void PcmciaManager::cardMessage( const QCString & msg, const QByteArray & ) | |||
169 | OPcmciaSystem::instance()->synchronize(); | 178 | OPcmciaSystem::instance()->synchronize(); |
170 | 179 | ||
171 | if ( !OPcmciaSystem::instance()->count() ) return; | 180 | if ( !OPcmciaSystem::instance()->cardCount() ) return; |
172 | 181 | ||
173 | OConfig cfg( "PCMCIA" ); | 182 | OConfig cfg( "PCMCIA" ); |
@@ -179,7 +188,8 @@ void PcmciaManager::cardMessage( const QCString & msg, const QByteArray & ) | |||
179 | 188 | ||
180 | bool newCard = true; | 189 | bool newCard = true; |
181 | while ( it.current() && newCard ) | 190 | |
191 | while ( it.current() && !it.current()->isEmpty() && newCard ) | ||
182 | { | 192 | { |
183 | QString name = it.currentKey(); | 193 | QString name = it.current()->identity(); |
184 | for ( int i = 0; i < nCards; ++i ) | 194 | for ( int i = 0; i < nCards; ++i ) |
185 | { | 195 | { |
@@ -196,8 +206,8 @@ void PcmciaManager::cardMessage( const QCString & msg, const QByteArray & ) | |||
196 | if ( !newCard ) ++it; else break; | 206 | if ( !newCard ) ++it; else break; |
197 | } | 207 | } |
198 | QString newCardName = it.currentKey(); | ||
199 | 208 | ||
200 | if ( newCard ) | 209 | if ( newCard ) |
201 | { | 210 | { |
211 | QString newCardName = it.current()->identity(); | ||
202 | odebug << "pcmcia: new card detected" << oendl; | 212 | odebug << "pcmcia: new card detected" << oendl; |
203 | cfg.setGroup( QString( "Card_%1" ).arg( nCards ) ); | 213 | cfg.setGroup( QString( "Card_%1" ).arg( nCards ) ); |
diff --git a/noncore/settings/sysinfo/devicesinfo.cpp b/noncore/settings/sysinfo/devicesinfo.cpp index 945edea..4940286 100644 --- a/noncore/settings/sysinfo/devicesinfo.cpp +++ b/noncore/settings/sysinfo/devicesinfo.cpp | |||
@@ -209,5 +209,5 @@ void CardsCategory::populate() | |||
209 | while ( it.current() ) | 209 | while ( it.current() ) |
210 | { | 210 | { |
211 | new CardDevice( this, (const char*) it.currentKey() ); | 211 | new CardDevice( this, it.current()->identity() ); |
212 | ++it; | 212 | ++it; |
213 | } | 213 | } |