author | drw <drw> | 2005-06-05 22:41:15 (UTC) |
---|---|---|
committer | drw <drw> | 2005-06-05 22:41:15 (UTC) |
commit | 56b8917e2cca3715e9a19941965ddd73e6bba5d4 (patch) (unidiff) | |
tree | 77f19a696d1cc4568083f38467390b59c5270da2 /noncore/settings/packagemanager/oipkgconfigdlg.cpp | |
parent | 31e8d6aad8220f747113870cfa10261435a2a162 (diff) | |
download | opie-56b8917e2cca3715e9a19941965ddd73e6bba5d4.zip opie-56b8917e2cca3715e9a19941965ddd73e6bba5d4.tar.gz opie-56b8917e2cca3715e9a19941965ddd73e6bba5d4.tar.bz2 |
Resource -> OResource
Diffstat (limited to 'noncore/settings/packagemanager/oipkgconfigdlg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/packagemanager/oipkgconfigdlg.cpp | 52 |
1 files changed, 25 insertions, 27 deletions
diff --git a/noncore/settings/packagemanager/oipkgconfigdlg.cpp b/noncore/settings/packagemanager/oipkgconfigdlg.cpp index 945571f..58c572b 100644 --- a/noncore/settings/packagemanager/oipkgconfigdlg.cpp +++ b/noncore/settings/packagemanager/oipkgconfigdlg.cpp | |||
@@ -10,51 +10,51 @@ | |||
10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
11 | .="- .-=="i, .._ License as published by the Free Software | 11 | .="- .-=="i, .._ License as published by the Free Software |
12 | - . .-<_> .<> Foundation; either version 2 of the License, | 12 | - . .-<_> .<> Foundation; either version 2 of the License, |
13 | ._= =} : or (at your option) any later version. | 13 | ._= =} : or (at your option) any later version. |
14 | .%`+i> _;_. | 14 | .%`+i> _;_. |
15 | .i_,=:_. -<s. This program is distributed in the hope that | 15 | .i_,=:_. -<s. This program is distributed in the hope that |
16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
17 | : .. .:, . . . without even the implied warranty of | 17 | : .. .:, . . . without even the implied warranty of |
18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
20 | ..}^=.= = ; Library General Public License for more | 20 | ..}^=.= = ; Library General Public License for more |
21 | ++= -. .` .: details. | 21 | ++= -. .` .: details. |
22 | : = ...= . :.=- | 22 | : = ...= . :.=- |
23 | -. .:....=;==+<; You should have received a copy of the GNU | 23 | -. .:....=;==+<; You should have received a copy of the GNU |
24 | -_. . . )=. = Library General Public License along with | 24 | -_. . . )=. = Library General Public License along with |
25 | -- :-=` this library; see the file COPYING.LIB. | 25 | -- :-=` this library; see the file COPYING.LIB. |
26 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
27 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
28 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include "oipkgconfigdlg.h" | 31 | #include "oipkgconfigdlg.h" |
32 | 32 | ||
33 | #include <opie2/ofiledialog.h> | 33 | #include <opie2/ofiledialog.h> |
34 | #include <opie2/oresource.h> | ||
34 | 35 | ||
35 | #include <qpe/qpeapplication.h> | 36 | #include <qpe/qpeapplication.h> |
36 | #include <qpe/resource.h> | ||
37 | 37 | ||
38 | #include <qcheckbox.h> | 38 | #include <qcheckbox.h> |
39 | #include <qcombobox.h> | 39 | #include <qcombobox.h> |
40 | #include <qgroupbox.h> | 40 | #include <qgroupbox.h> |
41 | #include <qlabel.h> | 41 | #include <qlabel.h> |
42 | #include <qlineedit.h> | 42 | #include <qlineedit.h> |
43 | #include <qlistbox.h> | 43 | #include <qlistbox.h> |
44 | #include <qpushbutton.h> | 44 | #include <qpushbutton.h> |
45 | #include <qscrollview.h> | 45 | #include <qscrollview.h> |
46 | #include <qwhatsthis.h> | 46 | #include <qwhatsthis.h> |
47 | 47 | ||
48 | OIpkgConfigDlg::OIpkgConfigDlg( OIpkg *ipkg, bool installOptions, QWidget *parent ) | 48 | OIpkgConfigDlg::OIpkgConfigDlg( OIpkg *ipkg, bool installOptions, QWidget *parent ) |
49 | : QDialog( parent, QString::null, true, WStyle_ContextHelp ) | 49 | : QDialog( parent, QString::null, true, WStyle_ContextHelp ) |
50 | , m_ipkg( ipkg ) | 50 | , m_ipkg( ipkg ) |
51 | , m_configs( 0l ) | 51 | , m_configs( 0l ) |
52 | , m_installOptions( installOptions ) | 52 | , m_installOptions( installOptions ) |
53 | , m_serverCurrent( -1 ) | 53 | , m_serverCurrent( -1 ) |
54 | , m_destCurrent( -1 ) | 54 | , m_destCurrent( -1 ) |
55 | , m_layout( this, 2, 4 ) | 55 | , m_layout( this, 2, 4 ) |
56 | , m_tabWidget( this ) | 56 | , m_tabWidget( this ) |
57 | { | 57 | { |
58 | setCaption( tr( "Configuration" ) ); | 58 | setCaption( tr( "Configuration" ) ); |
59 | 59 | ||
60 | // Initialize configuration widgets | 60 | // Initialize configuration widgets |
@@ -161,112 +161,110 @@ void OIpkgConfigDlg::reject() | |||
161 | if ( m_configs ) | 161 | if ( m_configs ) |
162 | delete m_configs; | 162 | delete m_configs; |
163 | } | 163 | } |
164 | 164 | ||
165 | void OIpkgConfigDlg::initServerWidget() | 165 | void OIpkgConfigDlg::initServerWidget() |
166 | { | 166 | { |
167 | m_serverWidget = new QWidget( this ); | 167 | m_serverWidget = new QWidget( this ); |
168 | 168 | ||
169 | // Initialize UI | 169 | // Initialize UI |
170 | QVBoxLayout *vb = new QVBoxLayout( m_serverWidget ); | 170 | QVBoxLayout *vb = new QVBoxLayout( m_serverWidget ); |
171 | QScrollView *sv = new QScrollView( m_serverWidget ); | 171 | QScrollView *sv = new QScrollView( m_serverWidget ); |
172 | vb->addWidget( sv, 0, 0 ); | 172 | vb->addWidget( sv, 0, 0 ); |
173 | sv->setResizePolicy( QScrollView::AutoOneFit ); | 173 | sv->setResizePolicy( QScrollView::AutoOneFit ); |
174 | sv->setFrameStyle( QFrame::NoFrame ); | 174 | sv->setFrameStyle( QFrame::NoFrame ); |
175 | QWidget *container = new QWidget( sv->viewport() ); | 175 | QWidget *container = new QWidget( sv->viewport() ); |
176 | sv->addChild( container ); | 176 | sv->addChild( container ); |
177 | QGridLayout *layout = new QGridLayout( container, 2, 3, 2, 4 ); | 177 | QGridLayout *layout = new QGridLayout( container, 2, 3, 2, 4 ); |
178 | 178 | ||
179 | m_serverList = new QListBox( container ); | 179 | m_serverList = new QListBox( container ); |
180 | QWhatsThis::add( m_serverList, tr( "This is a list of all servers configured. Select one here to edit or delete, or add a new one below." ) ); | 180 | QWhatsThis::add( m_serverList, tr( "This is a list of all servers configured. Select one here to edit or delete, or add a new one below." ) ); |
181 | m_serverList->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ) ); | 181 | m_serverList->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ) ); |
182 | connect( m_serverList, SIGNAL(highlighted(int)), this, SLOT(slotServerSelected(int)) ); | 182 | connect( m_serverList, SIGNAL(highlighted(int)), this, SLOT(slotServerSelected(int)) ); |
183 | layout->addMultiCellWidget( m_serverList, 0, 0, 0, 2 ); | 183 | layout->addMultiCellWidget( m_serverList, 0, 0, 0, 2 ); |
184 | 184 | ||
185 | QPixmap pic; | 185 | QPushButton *btn = new QPushButton( Opie::Core::OResource::loadPixmap( "new", Opie::Core::OResource::SmallIcon ), |
186 | pic.convertFromImage( Resource::loadImage( "new" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); | 186 | tr( "New" ), container ); |
187 | QPushButton *btn = new QPushButton( pic, tr( "New" ), container ); | 187 | btn->setMinimumHeight( AppLnk::smallIconSize()+4 ); |
188 | btn->setMinimumHeight( AppLnk::smallIconSize() ); | ||
189 | QWhatsThis::add( btn, tr( "Tap here to create a new entry. Fill in the fields below and then tap on Update." ) ); | 188 | QWhatsThis::add( btn, tr( "Tap here to create a new entry. Fill in the fields below and then tap on Update." ) ); |
190 | connect( btn, SIGNAL(clicked()), this, SLOT(slotServerNew()) ); | 189 | connect( btn, SIGNAL(clicked()), this, SLOT(slotServerNew()) ); |
191 | layout->addWidget( btn, 1, 0 ); | 190 | layout->addWidget( btn, 1, 0 ); |
192 | 191 | ||
193 | pic.convertFromImage( Resource::loadImage( "edit" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); | 192 | m_serverEditBtn = new QPushButton( Opie::Core::OResource::loadPixmap( "edit", Opie::Core::OResource::SmallIcon ), |
194 | m_serverEditBtn = new QPushButton( pic, tr( "Edit" ), container ); | 193 | tr( "Edit" ), container ); |
195 | m_serverEditBtn->setMinimumHeight( AppLnk::smallIconSize() ); | 194 | m_serverEditBtn->setMinimumHeight( AppLnk::smallIconSize()+4 ); |
196 | m_serverEditBtn->setEnabled( false ); | 195 | m_serverEditBtn->setEnabled( false ); |
197 | QWhatsThis::add( m_serverEditBtn, tr( "Tap here to edit the entry selected above." ) ); | 196 | QWhatsThis::add( m_serverEditBtn, tr( "Tap here to edit the entry selected above." ) ); |
198 | connect( m_serverEditBtn, SIGNAL(clicked()), this, SLOT(slotServerEdit()) ); | 197 | connect( m_serverEditBtn, SIGNAL(clicked()), this, SLOT(slotServerEdit()) ); |
199 | layout->addWidget( m_serverEditBtn, 1, 1 ); | 198 | layout->addWidget( m_serverEditBtn, 1, 1 ); |
200 | 199 | ||
201 | pic.convertFromImage( Resource::loadImage( "trash" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); | 200 | m_serverDeleteBtn = new QPushButton( Opie::Core::OResource::loadPixmap( "trash", Opie::Core::OResource::SmallIcon ), |
202 | m_serverDeleteBtn = new QPushButton( pic, tr( "Delete" ), container ); | 201 | tr( "Delete" ), container ); |
203 | m_serverDeleteBtn->setMinimumHeight( AppLnk::smallIconSize() ); | 202 | m_serverDeleteBtn->setMinimumHeight( AppLnk::smallIconSize()+4 ); |
204 | m_serverDeleteBtn->setEnabled( false ); | 203 | m_serverDeleteBtn->setEnabled( false ); |
205 | QWhatsThis::add( m_serverDeleteBtn, tr( "Tap here to delete the entry selected above." ) ); | 204 | QWhatsThis::add( m_serverDeleteBtn, tr( "Tap here to delete the entry selected above." ) ); |
206 | connect( m_serverDeleteBtn, SIGNAL(clicked()), this, SLOT(slotServerDelete()) ); | 205 | connect( m_serverDeleteBtn, SIGNAL(clicked()), this, SLOT(slotServerDelete()) ); |
207 | layout->addWidget( m_serverDeleteBtn, 1, 2 ); | 206 | layout->addWidget( m_serverDeleteBtn, 1, 2 ); |
208 | } | 207 | } |
209 | 208 | ||
210 | void OIpkgConfigDlg::initDestinationWidget() | 209 | void OIpkgConfigDlg::initDestinationWidget() |
211 | { | 210 | { |
212 | m_destWidget = new QWidget( this ); | 211 | m_destWidget = new QWidget( this ); |
213 | 212 | ||
214 | // Initialize UI | 213 | // Initialize UI |
215 | QVBoxLayout *vb = new QVBoxLayout( m_destWidget ); | 214 | QVBoxLayout *vb = new QVBoxLayout( m_destWidget ); |
216 | QScrollView *sv = new QScrollView( m_destWidget ); | 215 | QScrollView *sv = new QScrollView( m_destWidget ); |
217 | vb->addWidget( sv, 0, 0 ); | 216 | vb->addWidget( sv, 0, 0 ); |
218 | sv->setResizePolicy( QScrollView::AutoOneFit ); | 217 | sv->setResizePolicy( QScrollView::AutoOneFit ); |
219 | sv->setFrameStyle( QFrame::NoFrame ); | 218 | sv->setFrameStyle( QFrame::NoFrame ); |
220 | QWidget *container = new QWidget( sv->viewport() ); | 219 | QWidget *container = new QWidget( sv->viewport() ); |
221 | sv->addChild( container ); | 220 | sv->addChild( container ); |
222 | QGridLayout *layout = new QGridLayout( container, 2, 3, 2, 4 ); | 221 | QGridLayout *layout = new QGridLayout( container, 2, 3, 2, 4 ); |
223 | 222 | ||
224 | m_destList = new QListBox( container ); | 223 | m_destList = new QListBox( container ); |
225 | QWhatsThis::add( m_destList, tr( "This is a list of all destinations configured for this device. Select one here to edit or delete, or add a new one below." ) ); | 224 | QWhatsThis::add( m_destList, tr( "This is a list of all destinations configured for this device. Select one here to edit or delete, or add a new one below." ) ); |
226 | m_destList->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ) ); | 225 | m_destList->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ) ); |
227 | connect( m_destList, SIGNAL(highlighted(int)), this, SLOT(slotDestSelected(int)) ); | 226 | connect( m_destList, SIGNAL(highlighted(int)), this, SLOT(slotDestSelected(int)) ); |
228 | layout->addMultiCellWidget( m_destList, 0, 0, 0, 2 ); | 227 | layout->addMultiCellWidget( m_destList, 0, 0, 0, 2 ); |
229 | 228 | ||
230 | QPixmap pic; | 229 | QPushButton *btn = new QPushButton( Opie::Core::OResource::loadPixmap( "new", Opie::Core::OResource::SmallIcon ), |
231 | pic.convertFromImage( Resource::loadImage( "new" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); | 230 | tr( "New" ), container ); |
232 | QPushButton *btn = new QPushButton( pic, tr( "New" ), container ); | 231 | btn->setMinimumHeight( AppLnk::smallIconSize()+4 ); |
233 | btn->setMinimumHeight( AppLnk::smallIconSize() ); | ||
234 | QWhatsThis::add( btn, tr( "Tap here to create a new entry. Fill in the fields below and then tap on Update." ) ); | 232 | QWhatsThis::add( btn, tr( "Tap here to create a new entry. Fill in the fields below and then tap on Update." ) ); |
235 | connect( btn, SIGNAL(clicked()), this, SLOT(slotDestNew()) ); | 233 | connect( btn, SIGNAL(clicked()), this, SLOT(slotDestNew()) ); |
236 | layout->addWidget( btn, 1, 0 ); | 234 | layout->addWidget( btn, 1, 0 ); |
237 | 235 | ||
238 | pic.convertFromImage( Resource::loadImage( "edit" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); | 236 | m_destEditBtn = new QPushButton( Opie::Core::OResource::loadPixmap( "edit", Opie::Core::OResource::SmallIcon ), |
239 | m_destEditBtn = new QPushButton( pic, tr( "Edit" ), container ); | 237 | tr( "Edit" ), container ); |
240 | m_destEditBtn->setMinimumHeight( AppLnk::smallIconSize() ); | 238 | m_destEditBtn->setMinimumHeight( AppLnk::smallIconSize()+4 ); |
241 | m_destEditBtn->setEnabled( false ); | 239 | m_destEditBtn->setEnabled( false ); |
242 | QWhatsThis::add( m_destEditBtn, tr( "Tap here to edit the entry selected above." ) ); | 240 | QWhatsThis::add( m_destEditBtn, tr( "Tap here to edit the entry selected above." ) ); |
243 | connect( m_destEditBtn, SIGNAL(clicked()), this, SLOT(slotDestEdit()) ); | 241 | connect( m_destEditBtn, SIGNAL(clicked()), this, SLOT(slotDestEdit()) ); |
244 | layout->addWidget( m_destEditBtn, 1, 1 ); | 242 | layout->addWidget( m_destEditBtn, 1, 1 ); |
245 | 243 | ||
246 | pic.convertFromImage( Resource::loadImage( "trash" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); | 244 | m_destDeleteBtn = new QPushButton( Opie::Core::OResource::loadPixmap( "trash", Opie::Core::OResource::SmallIcon ), |
247 | m_destDeleteBtn = new QPushButton( pic, tr( "Delete" ), container ); | 245 | tr( "Delete" ), container ); |
248 | m_destDeleteBtn->setMinimumHeight( AppLnk::smallIconSize() ); | 246 | m_destDeleteBtn->setMinimumHeight( AppLnk::smallIconSize()+4 ); |
249 | m_destDeleteBtn->setEnabled( false ); | 247 | m_destDeleteBtn->setEnabled( false ); |
250 | QWhatsThis::add( m_destDeleteBtn, tr( "Tap here to delete the entry selected above." ) ); | 248 | QWhatsThis::add( m_destDeleteBtn, tr( "Tap here to delete the entry selected above." ) ); |
251 | connect( m_destDeleteBtn, SIGNAL(clicked()), this, SLOT(slotDestDelete()) ); | 249 | connect( m_destDeleteBtn, SIGNAL(clicked()), this, SLOT(slotDestDelete()) ); |
252 | layout->addWidget( m_destDeleteBtn, 1, 2 ); | 250 | layout->addWidget( m_destDeleteBtn, 1, 2 ); |
253 | } | 251 | } |
254 | 252 | ||
255 | void OIpkgConfigDlg::initProxyWidget() | 253 | void OIpkgConfigDlg::initProxyWidget() |
256 | { | 254 | { |
257 | m_proxyWidget = new QWidget( this ); | 255 | m_proxyWidget = new QWidget( this ); |
258 | 256 | ||
259 | // Initialize UI | 257 | // Initialize UI |
260 | QVBoxLayout *vb = new QVBoxLayout( m_proxyWidget ); | 258 | QVBoxLayout *vb = new QVBoxLayout( m_proxyWidget ); |
261 | QScrollView *sv = new QScrollView( m_proxyWidget ); | 259 | QScrollView *sv = new QScrollView( m_proxyWidget ); |
262 | vb->addWidget( sv, 0, 0 ); | 260 | vb->addWidget( sv, 0, 0 ); |
263 | sv->setResizePolicy( QScrollView::AutoOneFit ); | 261 | sv->setResizePolicy( QScrollView::AutoOneFit ); |
264 | sv->setFrameStyle( QFrame::NoFrame ); | 262 | sv->setFrameStyle( QFrame::NoFrame ); |
265 | QWidget *container = new QWidget( sv->viewport() ); | 263 | QWidget *container = new QWidget( sv->viewport() ); |
266 | sv->addChild( container ); | 264 | sv->addChild( container ); |
267 | QGridLayout *layout = new QGridLayout( container, 4, 2, 2, 4 ); | 265 | QGridLayout *layout = new QGridLayout( container, 4, 2, 2, 4 ); |
268 | 266 | ||
269 | // HTTP proxy server configuration | 267 | // HTTP proxy server configuration |
270 | QGroupBox *grpbox = new QGroupBox( 0, Qt::Vertical, tr( "HTTP Proxy" ), container ); | 268 | QGroupBox *grpbox = new QGroupBox( 0, Qt::Vertical, tr( "HTTP Proxy" ), container ); |
271 | grpbox->layout()->setSpacing( 2 ); | 269 | grpbox->layout()->setSpacing( 2 ); |
272 | grpbox->layout()->setMargin( 4 ); | 270 | grpbox->layout()->setMargin( 4 ); |
@@ -336,51 +334,52 @@ void OIpkgConfigDlg::initOptionsWidget() | |||
336 | 334 | ||
337 | m_optForceOverwrite = new QCheckBox( tr( "Force Overwrite" ), container ); | 335 | m_optForceOverwrite = new QCheckBox( tr( "Force Overwrite" ), container ); |
338 | QWhatsThis::add( m_optForceOverwrite, tr( "Tap here to enable or disable the '-force-overwrite' option for Ipkg." ) ); | 336 | QWhatsThis::add( m_optForceOverwrite, tr( "Tap here to enable or disable the '-force-overwrite' option for Ipkg." ) ); |
339 | layout->addMultiCellWidget( m_optForceOverwrite, 3, 3, 0, 1 ); | 337 | layout->addMultiCellWidget( m_optForceOverwrite, 3, 3, 0, 1 ); |
340 | 338 | ||
341 | QLabel *l = new QLabel( tr( "Information level:" ), container ); | 339 | QLabel *l = new QLabel( tr( "Information level:" ), container ); |
342 | QWhatsThis::add( l, tr( "Select information level for Ipkg." ) ); | 340 | QWhatsThis::add( l, tr( "Select information level for Ipkg." ) ); |
343 | layout->addMultiCellWidget( l, 4, 4, 0, 1 ); | 341 | layout->addMultiCellWidget( l, 4, 4, 0, 1 ); |
344 | 342 | ||
345 | m_optVerboseIpkg = new QComboBox( container ); | 343 | m_optVerboseIpkg = new QComboBox( container ); |
346 | QWhatsThis::add( m_optVerboseIpkg, tr( "Select information level for Ipkg." ) ); | 344 | QWhatsThis::add( m_optVerboseIpkg, tr( "Select information level for Ipkg." ) ); |
347 | m_optVerboseIpkg->insertItem( tr( "Errors only" ) ); | 345 | m_optVerboseIpkg->insertItem( tr( "Errors only" ) ); |
348 | m_optVerboseIpkg->insertItem( tr( "Normal messages" ) ); | 346 | m_optVerboseIpkg->insertItem( tr( "Normal messages" ) ); |
349 | m_optVerboseIpkg->insertItem( tr( "Informative messages" ) ); | 347 | m_optVerboseIpkg->insertItem( tr( "Informative messages" ) ); |
350 | m_optVerboseIpkg->insertItem( tr( "Troubleshooting output" ) ); | 348 | m_optVerboseIpkg->insertItem( tr( "Troubleshooting output" ) ); |
351 | layout->addMultiCellWidget( m_optVerboseIpkg, 5, 5, 0, 1 ); | 349 | layout->addMultiCellWidget( m_optVerboseIpkg, 5, 5, 0, 1 ); |
352 | 350 | ||
353 | l = new QLabel( tr( "Package source lists directory:" ), container ); | 351 | l = new QLabel( tr( "Package source lists directory:" ), container ); |
354 | QWhatsThis::add( l, tr( "Enter the directory where package source feed information is stored." ) ); | 352 | QWhatsThis::add( l, tr( "Enter the directory where package source feed information is stored." ) ); |
355 | layout->addMultiCellWidget( l, 6, 6, 0, 1 ); | 353 | layout->addMultiCellWidget( l, 6, 6, 0, 1 ); |
356 | 354 | ||
357 | m_optSourceLists = new QLineEdit( container ); | 355 | m_optSourceLists = new QLineEdit( container ); |
358 | QWhatsThis::add( m_optSourceLists, tr( "Enter the directory where package source feed information is stored." ) ); | 356 | QWhatsThis::add( m_optSourceLists, tr( "Enter the directory where package source feed information is stored." ) ); |
359 | layout->addWidget( m_optSourceLists, 7, 0 ); | 357 | layout->addWidget( m_optSourceLists, 7, 0 ); |
360 | QPixmap pic; | 358 | |
361 | pic.convertFromImage( Resource::loadImage( "folder" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); | 359 | QPushButton *btn = new QPushButton( Opie::Core::OResource::loadPixmap( "folder", Opie::Core::OResource::SmallIcon ), |
362 | QPushButton *btn = new QPushButton( pic, QString::null, container ); | 360 | QString::null, container ); |
361 | btn->setMinimumHeight( AppLnk::smallIconSize()+4 ); | ||
363 | btn->setMaximumWidth( btn->height() ); | 362 | btn->setMaximumWidth( btn->height() ); |
364 | QWhatsThis::add( btn, tr( "Tap here to select the directory where package source feed information is stored." ) ); | 363 | QWhatsThis::add( btn, tr( "Tap here to select the directory where package source feed information is stored." ) ); |
365 | connect( btn, SIGNAL(clicked()), this, SLOT(slotOptSelectSourceListsPath()) ); | 364 | connect( btn, SIGNAL(clicked()), this, SLOT(slotOptSelectSourceListsPath()) ); |
366 | layout->addWidget( btn, 7, 1 ); | 365 | layout->addWidget( btn, 7, 1 ); |
367 | 366 | ||
368 | layout->addItem( new QSpacerItem( 1, 1, QSizePolicy::Minimum, QSizePolicy::Expanding ) ); | 367 | layout->addItem( new QSpacerItem( 1, 1, QSizePolicy::Minimum, QSizePolicy::Expanding ) ); |
369 | } | 368 | } |
370 | 369 | ||
371 | void OIpkgConfigDlg::initData() | 370 | void OIpkgConfigDlg::initData() |
372 | { | 371 | { |
373 | // Read ipkg configuration (server/destination/proxy) information | 372 | // Read ipkg configuration (server/destination/proxy) information |
374 | if ( m_ipkg && !m_installOptions ) | 373 | if ( m_ipkg && !m_installOptions ) |
375 | { | 374 | { |
376 | m_configs = m_ipkg->configItems(); | 375 | m_configs = m_ipkg->configItems(); |
377 | if ( m_configs ) | 376 | if ( m_configs ) |
378 | { | 377 | { |
379 | for ( OConfItemListIterator configIt( *m_configs ); configIt.current(); ++configIt ) | 378 | for ( OConfItemListIterator configIt( *m_configs ); configIt.current(); ++configIt ) |
380 | { | 379 | { |
381 | OConfItem *config = configIt.current(); | 380 | OConfItem *config = configIt.current(); |
382 | 381 | ||
383 | // Add configuration item to the appropriate dialog controls | 382 | // Add configuration item to the appropriate dialog controls |
384 | if ( config ) | 383 | if ( config ) |
385 | { | 384 | { |
386 | switch ( config->type() ) | 385 | switch ( config->type() ) |
@@ -641,51 +640,50 @@ OIpkgDestDlg::OIpkgDestDlg( OConfItem *dest, QWidget *parent ) | |||
641 | QWhatsThis::add( m_active, tr( "Tap here to indicate whether this entry is active or not." ) ); | 640 | QWhatsThis::add( m_active, tr( "Tap here to indicate whether this entry is active or not." ) ); |
642 | layout->addWidget( m_active ); | 641 | layout->addWidget( m_active ); |
643 | 642 | ||
644 | layout->addStretch(); | 643 | layout->addStretch(); |
645 | 644 | ||
646 | QLabel *label = new QLabel( tr( "Name:" ), this ); | 645 | QLabel *label = new QLabel( tr( "Name:" ), this ); |
647 | QWhatsThis::add( label, tr( "Enter the name of this entry here." ) ); | 646 | QWhatsThis::add( label, tr( "Enter the name of this entry here." ) ); |
648 | layout->addWidget( label ); | 647 | layout->addWidget( label ); |
649 | m_name = new QLineEdit( this ); | 648 | m_name = new QLineEdit( this ); |
650 | QWhatsThis::add( m_name, tr( "Enter the name of this entry here." ) ); | 649 | QWhatsThis::add( m_name, tr( "Enter the name of this entry here." ) ); |
651 | layout->addWidget( m_name ); | 650 | layout->addWidget( m_name ); |
652 | 651 | ||
653 | layout->addStretch(); | 652 | layout->addStretch(); |
654 | 653 | ||
655 | label = new QLabel( tr( "Location:" ), this ); | 654 | label = new QLabel( tr( "Location:" ), this ); |
656 | QWhatsThis::add( label, tr( "Enter the absolute directory path of this entry here." ) ); | 655 | QWhatsThis::add( label, tr( "Enter the absolute directory path of this entry here." ) ); |
657 | layout->addWidget( label ); | 656 | layout->addWidget( label ); |
658 | 657 | ||
659 | QHBoxLayout *layout2 = new QHBoxLayout( this, 2, 4 ); | 658 | QHBoxLayout *layout2 = new QHBoxLayout( this, 2, 4 ); |
660 | layout->addLayout( layout2 ); | 659 | layout->addLayout( layout2 ); |
661 | 660 | ||
662 | m_location = new QLineEdit( this ); | 661 | m_location = new QLineEdit( this ); |
663 | QWhatsThis::add( m_location, tr( "Enter the absolute directory path of this entry here." ) ); | 662 | QWhatsThis::add( m_location, tr( "Enter the absolute directory path of this entry here." ) ); |
664 | layout2->addWidget( m_location ); | 663 | layout2->addWidget( m_location ); |
665 | QPixmap pic; | 664 | QPushButton *btn = new QPushButton( Opie::Core::OResource::loadPixmap( "folder", Opie::Core::OResource::SmallIcon ), |
666 | pic.convertFromImage( Resource::loadImage( "folder" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); | 665 | QString::null, this ); |
667 | QPushButton *btn = new QPushButton( pic, QString::null, this ); | ||
668 | btn->setMaximumWidth( btn->height() ); | 666 | btn->setMaximumWidth( btn->height() ); |
669 | QWhatsThis::add( btn, tr( "Tap here to select the desired location." ) ); | 667 | QWhatsThis::add( btn, tr( "Tap here to select the desired location." ) ); |
670 | connect( btn, SIGNAL(clicked()), this, SLOT(slotSelectPath()) ); | 668 | connect( btn, SIGNAL(clicked()), this, SLOT(slotSelectPath()) ); |
671 | layout2->addWidget( btn ); | 669 | layout2->addWidget( btn ); |
672 | 670 | ||
673 | // Populate initial information | 671 | // Populate initial information |
674 | if ( m_dest ) | 672 | if ( m_dest ) |
675 | { | 673 | { |
676 | m_name->setText( m_dest->name() ); | 674 | m_name->setText( m_dest->name() ); |
677 | m_location->setText( m_dest->value() ); | 675 | m_location->setText( m_dest->value() ); |
678 | m_active->setChecked( m_dest->active() ); | 676 | m_active->setChecked( m_dest->active() ); |
679 | } | 677 | } |
680 | } | 678 | } |
681 | 679 | ||
682 | void OIpkgDestDlg::accept() | 680 | void OIpkgDestDlg::accept() |
683 | { | 681 | { |
684 | // Save information entered | 682 | // Save information entered |
685 | QString name = m_name->text(); | 683 | QString name = m_name->text(); |
686 | name.replace( QRegExp( " " ), "_" ); | 684 | name.replace( QRegExp( " " ), "_" ); |
687 | m_dest->setName( name ); | 685 | m_dest->setName( name ); |
688 | m_dest->setValue( m_location->text() ); | 686 | m_dest->setValue( m_location->text() ); |
689 | m_dest->setActive( m_active->isChecked() ); | 687 | m_dest->setActive( m_active->isChecked() ); |
690 | 688 | ||
691 | QDialog::accept(); | 689 | QDialog::accept(); |