-rw-r--r-- | noncore/applets/pcmcia/configdialog.cpp | 21 | ||||
-rw-r--r-- | noncore/applets/pcmcia/configdialog.h | 2 | ||||
-rw-r--r-- | noncore/applets/pcmcia/configdialogbase.ui | 76 | ||||
-rw-r--r-- | noncore/applets/pcmcia/pcmcia.cpp | 12 |
4 files changed, 91 insertions, 20 deletions
diff --git a/noncore/applets/pcmcia/configdialog.cpp b/noncore/applets/pcmcia/configdialog.cpp index c08926e..e7c97c1 100644 --- a/noncore/applets/pcmcia/configdialog.cpp +++ b/noncore/applets/pcmcia/configdialog.cpp | |||
@@ -38,2 +38,4 @@ using namespace Opie::Core; | |||
38 | #include <qcombobox.h> | 38 | #include <qcombobox.h> |
39 | #include <qdir.h> | ||
40 | #include <qlabel.h> | ||
39 | 41 | ||
@@ -42,4 +44,5 @@ ConfigDialog::ConfigDialog( const QString& cardname, QWidget* parent ) | |||
42 | { | 44 | { |
43 | setCaption( tr( "Configure %1" ).arg( cardname ) ); | 45 | //setCaption( tr( "Configure %1" ).arg( cardname ) ); |
44 | 46 | textCardName->setText( cardname ); | |
47 | |||
45 | OConfig cfg( "PCMCIA" ); | 48 | OConfig cfg( "PCMCIA" ); |
@@ -48,3 +51,3 @@ ConfigDialog::ConfigDialog( const QString& cardname, QWidget* parent ) | |||
48 | QString insert; | 51 | QString insert; |
49 | 52 | ||
50 | for ( int i = 0; i < nCards; ++i ) | 53 | for ( int i = 0; i < nCards; ++i ) |
@@ -62,3 +65,3 @@ ConfigDialog::ConfigDialog( const QString& cardname, QWidget* parent ) | |||
62 | odebug << "preferred action for card '" << cardname << "' seems to be '" << insert << "'" << oendl; | 65 | odebug << "preferred action for card '" << cardname << "' seems to be '" << insert << "'" << oendl; |
63 | 66 | ||
64 | if ( !insert.isEmpty() ) | 67 | if ( !insert.isEmpty() ) |
@@ -68,2 +71,12 @@ ConfigDialog::ConfigDialog( const QString& cardname, QWidget* parent ) | |||
68 | } | 71 | } |
72 | |||
73 | // parse possible device and class names out of /etc/pcmcia/*.conf | ||
74 | QStringList deviceNames; | ||
75 | QStringList classNames; | ||
76 | |||
77 | QDir pcmciaconfdir( "/etc/pcmcia", "*.conf" ); | ||
78 | |||
79 | for ( int i = 0; i < pcmciaconfdir.count(); ++i ) | ||
80 | odebug << "found conf file '" << pcmciaconfdir[i] << "'" << oendl; | ||
81 | |||
69 | } | 82 | } |
diff --git a/noncore/applets/pcmcia/configdialog.h b/noncore/applets/pcmcia/configdialog.h index 12500c4..f79d7a6 100644 --- a/noncore/applets/pcmcia/configdialog.h +++ b/noncore/applets/pcmcia/configdialog.h | |||
@@ -38,3 +38,3 @@ class ConfigDialog : public ConfigDialogBase | |||
38 | public: | 38 | public: |
39 | 39 | ||
40 | ConfigDialog( const QString& cardname, QWidget* parent ); | 40 | ConfigDialog( const QString& cardname, QWidget* parent ); |
diff --git a/noncore/applets/pcmcia/configdialogbase.ui b/noncore/applets/pcmcia/configdialogbase.ui index d8dd983..a9682c5 100644 --- a/noncore/applets/pcmcia/configdialogbase.ui +++ b/noncore/applets/pcmcia/configdialogbase.ui | |||
@@ -13,4 +13,4 @@ | |||
13 | <y>0</y> | 13 | <y>0</y> |
14 | <width>214</width> | 14 | <width>234</width> |
15 | <height>44</height> | 15 | <height>130</height> |
16 | </rect> | 16 | </rect> |
@@ -30,3 +30,3 @@ | |||
30 | <name>margin</name> | 30 | <name>margin</name> |
31 | <number>11</number> | 31 | <number>7</number> |
32 | </property> | 32 | </property> |
@@ -34,5 +34,5 @@ | |||
34 | <name>spacing</name> | 34 | <name>spacing</name> |
35 | <number>6</number> | 35 | <number>4</number> |
36 | </property> | 36 | </property> |
37 | <widget row="0" column="2" > | 37 | <widget row="2" column="2" > |
38 | <class>QLabel</class> | 38 | <class>QLabel</class> |
@@ -47,3 +47,14 @@ | |||
47 | </widget> | 47 | </widget> |
48 | <widget row="0" column="1" > | 48 | <widget row="2" column="0" > |
49 | <class>QLabel</class> | ||
50 | <property stdset="1"> | ||
51 | <name>name</name> | ||
52 | <cstring>TextLabel2</cstring> | ||
53 | </property> | ||
54 | <property stdset="1"> | ||
55 | <name>text</name> | ||
56 | <string>Upon insertion,</string> | ||
57 | </property> | ||
58 | </widget> | ||
59 | <widget row="2" column="1" > | ||
49 | <class>QComboBox</class> | 60 | <class>QComboBox</class> |
@@ -78,3 +89,21 @@ | |||
78 | </widget> | 89 | </widget> |
79 | <widget row="0" column="0" > | 90 | <widget row="3" column="1" rowspan="1" colspan="2" > |
91 | <class>QComboBox</class> | ||
92 | <property stdset="1"> | ||
93 | <name>name</name> | ||
94 | <cstring>cbBindTo</cstring> | ||
95 | </property> | ||
96 | </widget> | ||
97 | <widget row="1" column="0" rowspan="1" colspan="3" > | ||
98 | <class>Line</class> | ||
99 | <property stdset="1"> | ||
100 | <name>name</name> | ||
101 | <cstring>Line1</cstring> | ||
102 | </property> | ||
103 | <property stdset="1"> | ||
104 | <name>orientation</name> | ||
105 | <enum>Horizontal</enum> | ||
106 | </property> | ||
107 | </widget> | ||
108 | <widget row="3" column="0" > | ||
80 | <class>QLabel</class> | 109 | <class>QLabel</class> |
@@ -82,3 +111,3 @@ | |||
82 | <name>name</name> | 111 | <name>name</name> |
83 | <cstring>TextLabel2</cstring> | 112 | <cstring>textBindTo</cstring> |
84 | </property> | 113 | </property> |
@@ -86,3 +115,32 @@ | |||
86 | <name>text</name> | 115 | <name>text</name> |
87 | <string>Upon insertion,</string> | 116 | <string>Bind to:</string> |
117 | </property> | ||
118 | </widget> | ||
119 | <widget row="4" column="0" > | ||
120 | <class>QLabel</class> | ||
121 | <property stdset="1"> | ||
122 | <name>name</name> | ||
123 | <cstring>textClassName</cstring> | ||
124 | </property> | ||
125 | <property stdset="1"> | ||
126 | <name>text</name> | ||
127 | <string>Classname:</string> | ||
128 | </property> | ||
129 | </widget> | ||
130 | <widget row="4" column="1" rowspan="1" colspan="2" > | ||
131 | <class>QComboBox</class> | ||
132 | <property stdset="1"> | ||
133 | <name>name</name> | ||
134 | <cstring>cbClassName</cstring> | ||
135 | </property> | ||
136 | </widget> | ||
137 | <widget row="0" column="0" rowspan="1" colspan="3" > | ||
138 | <class>QLabel</class> | ||
139 | <property stdset="1"> | ||
140 | <name>name</name> | ||
141 | <cstring>textCardName</cstring> | ||
142 | </property> | ||
143 | <property stdset="1"> | ||
144 | <name>text</name> | ||
145 | <string>CardName</string> | ||
88 | </property> | 146 | </property> |
diff --git a/noncore/applets/pcmcia/pcmcia.cpp b/noncore/applets/pcmcia/pcmcia.cpp index 4fcc189..6c18e86 100644 --- a/noncore/applets/pcmcia/pcmcia.cpp +++ b/noncore/applets/pcmcia/pcmcia.cpp | |||
@@ -133,3 +133,3 @@ void PcmciaManager::mousePressEvent( QMouseEvent* ) | |||
133 | submenu->insertItem( "&Configure", CONFIGURE+i*100 ); | 133 | submenu->insertItem( "&Configure", CONFIGURE+i*100 ); |
134 | 134 | ||
135 | submenu->setItemEnabled( EJECT+i*100, !it.current()->isEmpty() ); | 135 | submenu->setItemEnabled( EJECT+i*100, !it.current()->isEmpty() ); |
@@ -139,3 +139,3 @@ void PcmciaManager::mousePressEvent( QMouseEvent* ) | |||
139 | submenu->setItemEnabled( CONFIGURE+i*100, !it.current()->isEmpty() ); | 139 | submenu->setItemEnabled( CONFIGURE+i*100, !it.current()->isEmpty() ); |
140 | 140 | ||
141 | connect( submenu, SIGNAL(activated(int)), this, SLOT(userCardAction(int)) ); | 141 | connect( submenu, SIGNAL(activated(int)), this, SLOT(userCardAction(int)) ); |
@@ -172,3 +172,3 @@ void PcmciaManager::cardMessage( const QCString & msg, const QByteArray & ) | |||
172 | OPcmciaSocket* theCard = 0; | 172 | OPcmciaSocket* theCard = 0; |
173 | 173 | ||
174 | while ( it.current() && newCard ) | 174 | while ( it.current() && newCard ) |
@@ -236,3 +236,3 @@ void PcmciaManager::paintEvent( QPaintEvent * ) | |||
236 | odebug << "sockets = " << OPcmciaSystem::instance()->count() << ", cards = " << OPcmciaSystem::instance()->cardCount() << oendl; | 236 | odebug << "sockets = " << OPcmciaSystem::instance()->count() << ", cards = " << OPcmciaSystem::instance()->cardCount() << oendl; |
237 | 237 | ||
238 | if ( OPcmciaSystem::instance()->cardCount() ) | 238 | if ( OPcmciaSystem::instance()->cardCount() ) |
@@ -260,6 +260,6 @@ void PcmciaManager::userCardAction( int action ) | |||
260 | odebug << "user action requested. action = " << action << oendl; | 260 | odebug << "user action requested. action = " << action << oendl; |
261 | 261 | ||
262 | int socket = action / 100; | 262 | int socket = action / 100; |
263 | int what = action % 100; | 263 | int what = action % 100; |
264 | 264 | ||
265 | switch ( what ) | 265 | switch ( what ) |