-rw-r--r-- | core/applets/cardmon/cardmon.cpp | 10 | ||||
-rw-r--r-- | core/applets/cardmon/cardmon.h | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/core/applets/cardmon/cardmon.cpp b/core/applets/cardmon/cardmon.cpp index 0bd1ed3..ffead4d 100644 --- a/core/applets/cardmon/cardmon.cpp +++ b/core/applets/cardmon/cardmon.cpp | |||
@@ -62,18 +62,18 @@ CardMonitor::CardMonitor( QWidget *parent ) : QWidget( parent ), | |||
62 | } | 62 | } |
63 | 63 | ||
64 | CardMonitor::~CardMonitor() { | 64 | CardMonitor::~CardMonitor() { |
65 | if( popupMenu ) { delete popupMenu; } | 65 | if( popupMenu ) { delete popupMenu; } |
66 | } | 66 | } |
67 | 67 | ||
68 | void CardMonitor::popUp(QString message, QString icon="") { | 68 | void CardMonitor::popUp( QString message, QString icon = QString::null ) { |
69 | if ( ! popupMenu ) { | 69 | if ( ! popupMenu ) { |
70 | popupMenu = new QPopupMenu(); | 70 | popupMenu = new QPopupMenu(); |
71 | } | 71 | } |
72 | popupMenu->clear(); | 72 | popupMenu->clear(); |
73 | if( icon == "" ) { | 73 | if( icon.isEmpty() ) { |
74 | popupMenu->insertItem( message, 0 ); | 74 | popupMenu->insertItem( message, 0 ); |
75 | } else { | 75 | } else { |
76 | popupMenu->insertItem( QIconSet ( Resource::loadPixmap ( icon )), | 76 | popupMenu->insertItem( QIconSet ( Resource::loadPixmap ( icon )), |
77 | message, 0 ); | 77 | message, 0 ); |
78 | } | 78 | } |
79 | 79 | ||
@@ -208,14 +208,14 @@ bool CardMonitor::getStatusPcmcia( int showPopUp ) { | |||
208 | cardInPcmcia1Type = (*line).mid( pos, (*line).find("\t", pos) - pos); | 208 | cardInPcmcia1Type = (*line).mid( pos, (*line).find("\t", pos) - pos); |
209 | } | 209 | } |
210 | } | 210 | } |
211 | } | 211 | } |
212 | f.close(); | 212 | f.close(); |
213 | if( !showPopUp && (cardWas0 != cardInPcmcia0 || cardWas1 != cardInPcmcia1)) { | 213 | if( !showPopUp && (cardWas0 != cardInPcmcia0 || cardWas1 != cardInPcmcia1)) { |
214 | QString text = ""; | 214 | QString text = QString::null; |
215 | QString what = ""; | 215 | QString what = QString::null; |
216 | if(cardWas0 != cardInPcmcia0) { | 216 | if(cardWas0 != cardInPcmcia0) { |
217 | if(cardInPcmcia0) { text += tr("New card: "); what="on";} | 217 | if(cardInPcmcia0) { text += tr("New card: "); what="on";} |
218 | else { text += tr("Ejected: "); what="off";} | 218 | else { text += tr("Ejected: "); what="off";} |
219 | text += cardInPcmcia0Name; | 219 | text += cardInPcmcia0Name; |
220 | popUp( text, "cardmon/" + cardInPcmcia0Type ); | 220 | popUp( text, "cardmon/" + cardInPcmcia0Type ); |
221 | } | 221 | } |
@@ -255,13 +255,13 @@ bool CardMonitor::getStatusSd( int showPopUp ) { | |||
255 | cardInSd=true; | 255 | cardInSd=true; |
256 | } | 256 | } |
257 | } | 257 | } |
258 | endmntent( mntfp ); | 258 | endmntent( mntfp ); |
259 | } | 259 | } |
260 | if(!showPopUp && cardWas != cardInSd) { | 260 | if(!showPopUp && cardWas != cardInSd) { |
261 | QString text = ""; | 261 | QString text = QString::null; |
262 | if(cardInSd) { text += "SD Inserted"; } | 262 | if(cardInSd) { text += "SD Inserted"; } |
263 | else { text += "SD Removed"; } | 263 | else { text += "SD Removed"; } |
264 | popUp( text); // XX add SD pic | 264 | popUp( text); // XX add SD pic |
265 | } | 265 | } |
266 | 266 | ||
267 | #else | 267 | #else |
diff --git a/core/applets/cardmon/cardmon.h b/core/applets/cardmon/cardmon.h index 9651783..49bcae8 100644 --- a/core/applets/cardmon/cardmon.h +++ b/core/applets/cardmon/cardmon.h | |||
@@ -48,11 +48,11 @@ private: | |||
48 | bool cardInPcmcia1; | 48 | bool cardInPcmcia1; |
49 | QString cardInPcmcia1Name; | 49 | QString cardInPcmcia1Name; |
50 | QString cardInPcmcia1Type; | 50 | QString cardInPcmcia1Type; |
51 | bool cardInSd; | 51 | bool cardInSd; |
52 | void iconShow(); | 52 | void iconShow(); |
53 | QPopupMenu *popupMenu; | 53 | QPopupMenu *popupMenu; |
54 | void popUp(QString message, QString icon=""); | 54 | void popUp(QString message, QString icon = QString::null ); |
55 | }; | 55 | }; |
56 | 56 | ||
57 | #endif | 57 | #endif |
58 | 58 | ||