Diffstat (limited to 'core/applets/cardmon/cardmon.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/applets/cardmon/cardmon.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/core/applets/cardmon/cardmon.cpp b/core/applets/cardmon/cardmon.cpp index 3a6ad27..3af3d03 100644 --- a/core/applets/cardmon/cardmon.cpp +++ b/core/applets/cardmon/cardmon.cpp | |||
@@ -144,26 +144,25 @@ void CardMonitor::mousePressEvent( QMouseEvent * ) | |||
144 | 144 | ||
145 | QPoint p = mapToGlobal( QPoint( 0, 0 ) ); | 145 | QPoint p = mapToGlobal( QPoint( 0, 0 ) ); |
146 | QSize s = menu->sizeHint(); | 146 | QSize s = menu->sizeHint(); |
147 | int opt = menu->exec( QPoint( p.x() + ( width() / 2 ) - ( s.width() / 2 ), | 147 | int opt = menu->exec( QPoint( p.x() + ( width() / 2 ) - ( s.width() / 2 ), |
148 | p.y() - s.height() ), 0 ); | 148 | p.y() - s.height() ), 0 ); |
149 | 149 | ||
150 | if ( opt == 1 ) | 150 | if ( opt == 1 ) |
151 | { | 151 | { |
152 | cmd = "/sbin/cardctl eject 0"; | 152 | cmd = "/sbin/cardctl eject 0"; |
153 | err = system( ( const char * ) cmd ); | 153 | err = system( ( const char * ) cmd ); |
154 | if ( err != 0 ) | 154 | if ( err != 0 ) |
155 | { | 155 | { |
156 | qDebug( "Could not execute `/sbin/cardctl eject 0'! err=%d", | 156 | odebug << "Could not execute `/sbin/cardctl eject 0'! err=" << err << oendl; |
157 | err ); | ||
158 | popUp( tr( "CF/PCMCIA card eject failed!" ) ); | 157 | popUp( tr( "CF/PCMCIA card eject failed!" ) ); |
159 | } | 158 | } |
160 | } | 159 | } |
161 | else if ( opt == 0 ) | 160 | else if ( opt == 0 ) |
162 | { | 161 | { |
163 | if ( ODevice::inst() ->system() == System_Familiar ) | 162 | if ( ODevice::inst() ->system() == System_Familiar ) |
164 | { | 163 | { |
165 | cmd = "umount /dev/mmc/part1"; | 164 | cmd = "umount /dev/mmc/part1"; |
166 | } | 165 | } |
167 | else | 166 | else |
168 | { | 167 | { |
169 | cmd = "umount /dev/mmcda1"; | 168 | cmd = "umount /dev/mmcda1"; |
@@ -171,26 +170,25 @@ void CardMonitor::mousePressEvent( QMouseEvent * ) | |||
171 | err = system( ( const char * ) cmd ); | 170 | err = system( ( const char * ) cmd ); |
172 | if ( err != 0 ) | 171 | if ( err != 0 ) |
173 | { | 172 | { |
174 | popUp( tr( "SD/MMC card eject failed!" ) ); | 173 | popUp( tr( "SD/MMC card eject failed!" ) ); |
175 | } | 174 | } |
176 | } | 175 | } |
177 | else if ( opt == 2 ) | 176 | else if ( opt == 2 ) |
178 | { | 177 | { |
179 | cmd = "/sbin/cardctl eject 1"; | 178 | cmd = "/sbin/cardctl eject 1"; |
180 | err = system( ( const char * ) cmd ); | 179 | err = system( ( const char * ) cmd ); |
181 | if ( err != 0 ) | 180 | if ( err != 0 ) |
182 | { | 181 | { |
183 | qDebug( "Could not execute `/sbin/cardctl eject 1'! err=%d", | 182 | odebug << "Could not execute `/sbin/cardctl eject 1'! err=" << err << oendl; |
184 | err ); | ||
185 | popUp( tr( "CF/PCMCIA card eject failed!" ) ); | 183 | popUp( tr( "CF/PCMCIA card eject failed!" ) ); |
186 | } | 184 | } |
187 | } | 185 | } |
188 | delete menu; | 186 | delete menu; |
189 | } | 187 | } |
190 | 188 | ||
191 | 189 | ||
192 | void CardMonitor::cardMessage( const QCString & msg, const QByteArray & ) | 190 | void CardMonitor::cardMessage( const QCString & msg, const QByteArray & ) |
193 | { | 191 | { |
194 | if ( msg == "stabChanged()" ) | 192 | if ( msg == "stabChanged()" ) |
195 | { | 193 | { |
196 | // odebug << "Pcmcia: stabchanged" << oendl; | 194 | // odebug << "Pcmcia: stabchanged" << oendl; |