summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2005-06-21 14:58:24 (UTC)
committer mickeyl <mickeyl>2005-06-21 14:58:24 (UTC)
commit6d4379546a9ae0ca397463820fe81126703f53c5 (patch) (unidiff)
tree4d729dfa5cfaa460a97ff2041fb189535956d3a1
parentae85d18a1f8a63323ad47631724516f3aa355a75 (diff)
downloadopie-6d4379546a9ae0ca397463820fe81126703f53c5.zip
opie-6d4379546a9ae0ca397463820fe81126703f53c5.tar.gz
opie-6d4379546a9ae0ca397463820fe81126703f53c5.tar.bz2
use own pixmap (s/cardmon/pcmcia/)
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/applets/pcmcia/pcmcia.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/applets/pcmcia/pcmcia.cpp b/noncore/applets/pcmcia/pcmcia.cpp
index 0787c3c..e435f61 100644
--- a/noncore/applets/pcmcia/pcmcia.cpp
+++ b/noncore/applets/pcmcia/pcmcia.cpp
@@ -31,97 +31,97 @@
31#include "configdialog.h" 31#include "configdialog.h"
32 32
33/* OPIE */ 33/* OPIE */
34#include <opie2/odebug.h> 34#include <opie2/odebug.h>
35#include <opie2/odevice.h> 35#include <opie2/odevice.h>
36#include <opie2/oconfig.h> 36#include <opie2/oconfig.h>
37#include <opie2/oprocess.h> 37#include <opie2/oprocess.h>
38#include <opie2/opcmciasystem.h> 38#include <opie2/opcmciasystem.h>
39#include <opie2/oresource.h> 39#include <opie2/oresource.h>
40#include <opie2/otaskbarapplet.h> 40#include <opie2/otaskbarapplet.h>
41#include <qpe/applnk.h> 41#include <qpe/applnk.h>
42#include <qpe/global.h> 42#include <qpe/global.h>
43#include <qpe/resource.h> 43#include <qpe/resource.h>
44using namespace Opie::Core; 44using namespace Opie::Core;
45using namespace Opie::Ui; 45using namespace Opie::Ui;
46 46
47/* QT */ 47/* QT */
48#include <qcombobox.h> 48#include <qcombobox.h>
49#include <qcopchannel_qws.h> 49#include <qcopchannel_qws.h>
50#include <qpainter.h> 50#include <qpainter.h>
51#include <qfile.h> 51#include <qfile.h>
52#include <qtextstream.h> 52#include <qtextstream.h>
53#include <qmessagebox.h> 53#include <qmessagebox.h>
54#include <qsound.h> 54#include <qsound.h>
55#include <qtimer.h> 55#include <qtimer.h>
56 56
57/* STD */ 57/* STD */
58#include <stdio.h> 58#include <stdio.h>
59#include <unistd.h> 59#include <unistd.h>
60#include <stdlib.h> 60#include <stdlib.h>
61#include <string.h> 61#include <string.h>
62#include <errno.h> 62#include <errno.h>
63#include <fcntl.h> 63#include <fcntl.h>
64#if defined(_OS_LINUX_) || defined(Q_OS_LINUX) 64#if defined(_OS_LINUX_) || defined(Q_OS_LINUX)
65#include <sys/vfs.h> 65#include <sys/vfs.h>
66#include <mntent.h> 66#include <mntent.h>
67#endif 67#endif
68 68
69PcmciaManager::PcmciaManager( QWidget * parent ) : QWidget( parent ) 69PcmciaManager::PcmciaManager( QWidget * parent ) : QWidget( parent )
70{ 70{
71 QCopChannel * pcmciaChannel = new QCopChannel( "QPE/Card", this ); 71 QCopChannel * pcmciaChannel = new QCopChannel( "QPE/Card", this );
72 connect( pcmciaChannel, 72 connect( pcmciaChannel,
73 SIGNAL( received(const QCString&,const QByteArray&) ), this, 73 SIGNAL( received(const QCString&,const QByteArray&) ), this,
74 SLOT( cardMessage(const QCString&,const QByteArray&) ) ); 74 SLOT( cardMessage(const QCString&,const QByteArray&) ) );
75 75
76 setFocusPolicy( NoFocus ); 76 setFocusPolicy( NoFocus );
77 setFixedWidth ( AppLnk::smallIconSize() ); 77 setFixedWidth ( AppLnk::smallIconSize() );
78 setFixedHeight ( AppLnk::smallIconSize() ); 78 setFixedHeight ( AppLnk::smallIconSize() );
79 pm = Opie::Core::OResource::loadPixmap( "cardmon/pcmcia", Opie::Core::OResource::SmallIcon ); 79 pm = Opie::Core::OResource::loadPixmap( "pcmcia/pcmcia", Opie::Core::OResource::SmallIcon );
80 configuring = false; 80 configuring = false;
81 81
82 QCopChannel *channel = new QCopChannel( "QPE/System", this ); 82 QCopChannel *channel = new QCopChannel( "QPE/System", this );
83 connect( channel, SIGNAL(received(const QCString&,const QByteArray&)), 83 connect( channel, SIGNAL(received(const QCString&,const QByteArray&)),
84 this, SLOT(handleSystemChannel(const QCString&,const QByteArray&)) ); 84 this, SLOT(handleSystemChannel(const QCString&,const QByteArray&)) );
85} 85}
86 86
87 87
88PcmciaManager::~PcmciaManager() 88PcmciaManager::~PcmciaManager()
89{ 89{
90} 90}
91 91
92void PcmciaManager::handleSystemChannel( const QCString&msg, const QByteArray& ) 92void PcmciaManager::handleSystemChannel( const QCString&msg, const QByteArray& )
93{ 93{
94 if ( msg == "returnFromSuspend()" ) 94 if ( msg == "returnFromSuspend()" )
95 { 95 {
96 if ( !OPcmciaSystem::instance()->cardCount() ) return; 96 if ( !OPcmciaSystem::instance()->cardCount() ) return;
97 OPcmciaSystem* sys = OPcmciaSystem::instance(); 97 OPcmciaSystem* sys = OPcmciaSystem::instance();
98 OPcmciaSystem::CardIterator it = sys->iterator(); 98 OPcmciaSystem::CardIterator it = sys->iterator();
99 OPcmciaSocket* theCard = 0; 99 OPcmciaSocket* theCard = 0;
100 100
101 while ( it.current() ) 101 while ( it.current() )
102 { 102 {
103 if ( it.current()->isEmpty() ) 103 if ( it.current()->isEmpty() )
104 { 104 {
105 executeResumeAction( theCard ); 105 executeResumeAction( theCard );
106 } 106 }
107 ++it; 107 ++it;
108 } 108 }
109 } 109 }
110} 110}
111 111
112void PcmciaManager::popUp( QString message, QString icon ) 112void PcmciaManager::popUp( QString message, QString icon )
113{ 113{
114 if ( !popupMenu ) { 114 if ( !popupMenu ) {
115 popupMenu = new QPopupMenu( this ); 115 popupMenu = new QPopupMenu( this );
116 } 116 }
117 117
118 popupMenu->clear(); 118 popupMenu->clear();
119 if ( icon.isEmpty() ) { 119 if ( icon.isEmpty() ) {
120 popupMenu->insertItem( message, 0 ); 120 popupMenu->insertItem( message, 0 );
121 } else { 121 } else {
122 popupMenu->insertItem( QIconSet( Opie::Core::OResource::loadPixmap( icon, Opie::Core::OResource::SmallIcon ) ), 122 popupMenu->insertItem( QIconSet( Opie::Core::OResource::loadPixmap( icon, Opie::Core::OResource::SmallIcon ) ),
123 message, 0 ); 123 message, 0 );
124 } 124 }
125 125
126 QPoint p = mapToGlobal( QPoint( 0, 0 ) ); 126 QPoint p = mapToGlobal( QPoint( 0, 0 ) );
127 QSize s = popupMenu->sizeHint(); 127 QSize s = popupMenu->sizeHint();