Diffstat (limited to 'core/applets/cardmon/cardmon.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/applets/cardmon/cardmon.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/applets/cardmon/cardmon.cpp b/core/applets/cardmon/cardmon.cpp index b8c4553..4ed09b8 100644 --- a/core/applets/cardmon/cardmon.cpp +++ b/core/applets/cardmon/cardmon.cpp | |||
@@ -263,25 +263,27 @@ bool CardMonitor::getStatusPcmcia(int showPopUp) | |||
263 | 263 | ||
264 | if (cardWas1 != cardInPcmcia1) { | 264 | if (cardWas1 != cardInPcmcia1) { |
265 | if (cardInPcmcia1) { | 265 | if (cardInPcmcia1) { |
266 | text += tr("New card: "); | 266 | text += tr("New card: "); |
267 | what = "on"; | 267 | what = "on"; |
268 | } else { | 268 | } else { |
269 | text += tr("Ejected: "); | 269 | text += tr("Ejected: "); |
270 | what = "off"; | 270 | what = "off"; |
271 | } | 271 | } |
272 | text += cardInPcmcia1Name; | 272 | text += cardInPcmcia1Name; |
273 | popUp(text, "cardmon/" + cardInPcmcia1Type); | 273 | popUp(text, "cardmon/" + cardInPcmcia1Type); |
274 | } | 274 | } |
275 | #ifndef QT_NO_SOUND | ||
275 | QSound::play(Resource::findSound("cardmon/card" + what)); | 276 | QSound::play(Resource::findSound("cardmon/card" + what)); |
277 | #endif | ||
276 | } | 278 | } |
277 | } else { | 279 | } else { |
278 | // no file found | 280 | // no file found |
279 | qDebug("no file found"); | 281 | qDebug("no file found"); |
280 | cardInPcmcia0 = FALSE; | 282 | cardInPcmcia0 = FALSE; |
281 | cardInPcmcia1 = FALSE; | 283 | cardInPcmcia1 = FALSE; |
282 | } | 284 | } |
283 | repaint( FALSE ); | 285 | repaint( FALSE ); |
284 | return ((cardWas0 == cardInPcmcia0 | 286 | return ((cardWas0 == cardInPcmcia0 |
285 | && cardWas1 == cardInPcmcia1) ? FALSE : TRUE); | 287 | && cardWas1 == cardInPcmcia1) ? FALSE : TRUE); |
286 | 288 | ||
287 | } | 289 | } |
@@ -315,25 +317,27 @@ bool CardMonitor::getStatusSd(int showPopUp) | |||
315 | 317 | ||
316 | if (!showPopUp && cardWas != cardInSd) { | 318 | if (!showPopUp && cardWas != cardInSd) { |
317 | QString text = QString::null; | 319 | QString text = QString::null; |
318 | QString what = QString::null; | 320 | QString what = QString::null; |
319 | if (cardInSd) { | 321 | if (cardInSd) { |
320 | text += "New card: SD/MMC"; | 322 | text += "New card: SD/MMC"; |
321 | what = "on"; | 323 | what = "on"; |
322 | } else { | 324 | } else { |
323 | text += "Ejected: SD/MMC"; | 325 | text += "Ejected: SD/MMC"; |
324 | what = "off"; | 326 | what = "off"; |
325 | } | 327 | } |
326 | //qDebug("TEXT: " + text ); | 328 | //qDebug("TEXT: " + text ); |
329 | #ifndef QT_NO_SOUND | ||
327 | QSound::play(Resource::findSound("cardmon/card" + what)); | 330 | QSound::play(Resource::findSound("cardmon/card" + what)); |
331 | #endif | ||
328 | popUp(text, "cardmon/ide");// XX add SD pic | 332 | popUp(text, "cardmon/ide");// XX add SD pic |
329 | } | 333 | } |
330 | #else | 334 | #else |
331 | #error "Not on Linux" | 335 | #error "Not on Linux" |
332 | #endif | 336 | #endif |
333 | repaint( FALSE ); | 337 | repaint( FALSE ); |
334 | return ((cardWas == cardInSd) ? FALSE : TRUE); | 338 | return ((cardWas == cardInSd) ? FALSE : TRUE); |
335 | } | 339 | } |
336 | 340 | ||
337 | void CardMonitor::paintEvent(QPaintEvent *) | 341 | void CardMonitor::paintEvent(QPaintEvent *) |
338 | { | 342 | { |
339 | 343 | ||