summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--ChangeLog1
-rw-r--r--noncore/settings/packagemanager/oipkg.cpp2
-rw-r--r--noncore/settings/packagemanager/oipkg.h2
-rw-r--r--noncore/settings/packagemanager/oipkgconfigdlg.cpp26
-rw-r--r--noncore/settings/packagemanager/oipkgconfigdlg.h2
5 files changed, 28 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 0f0dcbb..a9639ef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,135 +1,136 @@
1 2005-??-??Opie 1.2.2 1 2005-??-??Opie 1.2.2
2 2
3 3
4 New Features 4 New Features
5 ------------ 5 ------------
6 * Appearance: Added configuration options to set smallIconSize, bigIconSize, useBigPixmaps (hrw, drw) 6 * Appearance: Added configuration options to set smallIconSize, bigIconSize, useBigPixmaps (hrw, drw)
7 * Opie-Notes: Notes application based on NoteZ (hrw) 7 * Opie-Notes: Notes application based on NoteZ (hrw)
8 * OPIE-PackageManager: Added two configuration options: "Force recursive", "Verbose fetch" (hrw)
8 9
9 Fixed Bugs 10 Fixed Bugs
10 ---------- 11 ----------
11 * #1695 - Date selector use too small fontsize on VGA screen (hrw) 12 * #1695 - Date selector use too small fontsize on VGA screen (hrw)
12 * #1686 - opie-console lack UI setting for switching scrollbar (hrw) 13 * #1686 - opie-console lack UI setting for switching scrollbar (hrw)
13 * #1647 - Opie-console doesn't respect scroll-bar on left side (hrw) 14 * #1647 - Opie-console doesn't respect scroll-bar on left side (hrw)
14 * #1624 - Button settngs changes are applied only after restart (hrw) 15 * #1624 - Button settngs changes are applied only after restart (hrw)
15 * #1492 - Backup and Restore does not show list of backups to restore on start (hrw) 16 * #1492 - Backup and Restore does not show list of backups to restore on start (hrw)
16 * n.a. - remove hardcoded font size from wellenreiter (hrw) 17 * n.a. - remove hardcoded font size from wellenreiter (hrw)
17 * n.a. - added patch to build QT/E 2.3.10 with gcc 4.x.x (hrw) 18 * n.a. - added patch to build QT/E 2.3.10 with gcc 4.x.x (hrw)
18 * n.a. - make blue-pin UI resizable to looks good in any resolution (hrw) 19 * n.a. - make blue-pin UI resizable to looks good in any resolution (hrw)
19 * n.a. - fix a problem with vCard send to Sony Ericsson k600i (ar) 20 * n.a. - fix a problem with vCard send to Sony Ericsson k600i (ar)
20 * n.a. - add a patch to build Qt/E 2.3.10 on amd64 with gcc 4.x.x (ar) 21 * n.a. - add a patch to build Qt/E 2.3.10 on amd64 with gcc 4.x.x (ar)
21 22
22 2005-09-11Opie 1.2.1 23 2005-09-11Opie 1.2.1
23 24
24 25
25 New Features 26 New Features
26 ------------ 27 ------------
27 * OpieStumbler: Scans WiFi networks using the wireless extension scanning (skyhusker) 28 * OpieStumbler: Scans WiFi networks using the wireless extension scanning (skyhusker)
28 * Opie-Reader: Support for document formats ArriereGo and Reb, add flite output (tim,pohly) 29 * Opie-Reader: Support for document formats ArriereGo and Reb, add flite output (tim,pohly)
29 * Opie-Networksettings: Add support for wlan-ng devices and improve WEP handling (Dirk Opfer) 30 * Opie-Networksettings: Add support for wlan-ng devices and improve WEP handling (Dirk Opfer)
30 * Wellenreiter: Remove Joining networks - use OpieStumbler for that (mickeyl) 31 * Wellenreiter: Remove Joining networks - use OpieStumbler for that (mickeyl)
31 * Opie-Mobilemsg has gone unsupported - it never really worked and there will be a replacement (mickeyl) 32 * Opie-Mobilemsg has gone unsupported - it never really worked and there will be a replacement (mickeyl)
32 * Opie-Tabmanager has gone unsupported - it barely works and there is not much of a use of it anyway (mickeyl) 33 * Opie-Tabmanager has gone unsupported - it barely works and there is not much of a use of it anyway (mickeyl)
33 * Checkbook: Added configuration option to use smaller font for checkbook transaction tab (hrw) 34 * Checkbook: Added configuration option to use smaller font for checkbook transaction tab (hrw)
34 * ZSafe: Made UI conform to Opie standards (drw) 35 * ZSafe: Made UI conform to Opie standards (drw)
35 * Today Addressbook plugin: Fixed configuration to show/not show birthdays, use checkboxes for selection (hrw) 36 * Today Addressbook plugin: Fixed configuration to show/not show birthdays, use checkboxes for selection (hrw)
36 * Opie-Console: Read initial fixed font configuration from qpe.conf (mickeyl) 37 * Opie-Console: Read initial fixed font configuration from qpe.conf (mickeyl)
37 * Opie-PcmciaApplet: Configure insert/resume actions and bind unsupported cards (mickeyl) 38 * Opie-PcmciaApplet: Configure insert/resume actions and bind unsupported cards (mickeyl)
38 * SysInfo: Remove CPU tab and add Devices tab instead (mickeyl) 39 * SysInfo: Remove CPU tab and add Devices tab instead (mickeyl)
39 * Opie-smb: Added Opie front end for Samba (ljp) 40 * Opie-smb: Added Opie front end for Samba (ljp)
40 * Opie-Bluetooth: Replace obex send implementation and patch libopieobex and the bluetoothapplet (Michael Haynie) 41 * Opie-Bluetooth: Replace obex send implementation and patch libopieobex and the bluetoothapplet (Michael Haynie)
41 * Opieplayer: rudimentary podcast support (ljp) 42 * Opieplayer: rudimentary podcast support (ljp)
42 43
43 Fixed Bugs 44 Fixed Bugs
44 ---------- 45 ----------
45 * #1377 - Suspend Powermanagement when switched to another VT (mickeyl) 46 * #1377 - Suspend Powermanagement when switched to another VT (mickeyl)
46 - We actually suspend the complete Opie now in that case. 47 - We actually suspend the complete Opie now in that case.
47 * #1384 - Battery status updated improperly when charging (skyhusker) 48 * #1384 - Battery status updated improperly when charging (skyhusker)
48 * #1476 - Wrong order of application entries in the O-menu (skyhusker) 49 * #1476 - Wrong order of application entries in the O-menu (skyhusker)
49 * #1514 - Remove usage of cardmon/pcmcia picture in applications. pcmcia is now an inline picture (mickeyl) 50 * #1514 - Remove usage of cardmon/pcmcia picture in applications. pcmcia is now an inline picture (mickeyl)
50 * #1535- Missing line break and unnecessary location shown with Today-Calendar plugin (deller) 51 * #1535- Missing line break and unnecessary location shown with Today-Calendar plugin (deller)
51 * #1543 - Time Settings: "predict" tab is displayed twice after reopen (hrw) 52 * #1543 - Time Settings: "predict" tab is displayed twice after reopen (hrw)
52 * #1546 - Battery applet popup is not always large enough to show jacket remaining info (skyhusker) 53 * #1546 - Battery applet popup is not always large enough to show jacket remaining info (skyhusker)
53 * #1557 - Light&Power-Settings don't store warning intervall and warning levels (skyhusker) 54 * #1557 - Light&Power-Settings don't store warning intervall and warning levels (skyhusker)
54 * #1565 - crash-fix in odevice.cpp while scanning the distribution table (deller) 55 * #1565 - crash-fix in odevice.cpp while scanning the distribution table (deller)
55 * #1614 - Make Opie-console start in $HOME instead of / (skyhusker) 56 * #1614 - Make Opie-console start in $HOME instead of / (skyhusker)
56 * #1635 - opie-today, datebook-plugin does not show notes (skyhusker) 57 * #1635 - opie-today, datebook-plugin does not show notes (skyhusker)
57 * #1665 - Opie-IRC displays the host prepended to the message when peer is using and ipv6 address (skyhusker) 58 * #1665 - Opie-IRC displays the host prepended to the message when peer is using and ipv6 address (skyhusker)
58 * #1666 - Opie-IRC does not allow to add !channels in config asautojoin ones (skyhusker) 59 * #1666 - Opie-IRC does not allow to add !channels in config asautojoin ones (skyhusker)
59 * #1667 - Opie-IRC does not show messages from !channel (skyhusker) 60 * #1667 - Opie-IRC does not show messages from !channel (skyhusker)
60 * #1679 - Security PIN plugin is QVGA sized (hrw) 61 * #1679 - Security PIN plugin is QVGA sized (hrw)
61 * #1682 - Properly resize tab control in OTabWidget (drw) 62 * #1682 - Properly resize tab control in OTabWidget (drw)
62 * n.a. - always show volume and wireless applet popups inside visible screen (deller) 63 * n.a. - always show volume and wireless applet popups inside visible screen (deller)
63 * n.a. - scale O-Menu-Applets appropriately (mickeyl) 64 * n.a. - scale O-Menu-Applets appropriately (mickeyl)
64 * n.a. - libopienet: fix bugs in wireless scanning and setting SSID (skyhusker) 65 * n.a. - libopienet: fix bugs in wireless scanning and setting SSID (skyhusker)
65 * n.a. - Wellenreiter: relax WE version matching test a bit (mickeyl) 66 * n.a. - Wellenreiter: relax WE version matching test a bit (mickeyl)
66 * n.a. - scale BluezApplet appropriately and use larger icons (mickeyl) 67 * n.a. - scale BluezApplet appropriately and use larger icons (mickeyl)
67 * n.a. - memoryapplet: fix crash in memoryapplet on kernels without swap support (seneca cunningham) 68 * n.a. - memoryapplet: fix crash in memoryapplet on kernels without swap support (seneca cunningham)
68 * n.a. - networksettings: ignore hostap control interfaces wifi* (mickeyl) 69 * n.a. - networksettings: ignore hostap control interfaces wifi* (mickeyl)
69 * n.a. - Today Addressbook plugin fix configuration to show/not show birthdays, use checkboxes for selection (hrw) 70 * n.a. - Today Addressbook plugin fix configuration to show/not show birthdays, use checkboxes for selection (hrw)
70 * n.a. - remove hardcoded font size from netsystemtime (hrw) 71 * n.a. - remove hardcoded font size from netsystemtime (hrw)
71 * n.a. - remove hardcoded font size from checkbook graphs (hrw) 72 * n.a. - remove hardcoded font size from checkbook graphs (hrw)
72 * n.a. - Dagger - fixes for Sword 1.5.8, morph tag x-refs, closing last tab crash (drw) 73 * n.a. - Dagger - fixes for Sword 1.5.8, morph tag x-refs, closing last tab crash (drw)
73 74
74 75
75 Internal 76 Internal
76 -------- 77 --------
77 * Make BluezApplet use OTaskbarApplet (mickeyl) 78 * Make BluezApplet use OTaskbarApplet (mickeyl)
78 * libopiecore: rewrite OFileNotification to use the Linux 2.6 inotify interface (mickeyl) 79 * libopiecore: rewrite OFileNotification to use the Linux 2.6 inotify interface (mickeyl)
79 * libopiecore: add ODirNotification - recursive directory notifications (mickeyl) 80 * libopiecore: add ODirNotification - recursive directory notifications (mickeyl)
80 * libopienet: Skip hostap control interfaces 'wifi' and improve robustness in ONetworkInterface (mickeyl) 81 * libopienet: Skip hostap control interfaces 'wifi' and improve robustness in ONetworkInterface (mickeyl)
81 * libopieui: Remove OVersatileView and OVersatileViewItem (mickeyl) 82 * libopieui: Remove OVersatileView and OVersatileViewItem (mickeyl)
82 * libopienet: Miscellaneous API cleanups (mickeyl) 83 * libopienet: Miscellaneous API cleanups (mickeyl)
83 * libopiecore: Add linux pcmcia system abstraction classes (mickeyl) 84 * libopiecore: Add linux pcmcia system abstraction classes (mickeyl)
84 * libopiecore: ODevice now knows the default gfx driver to use (mteira,mickeyl) 85 * libopiecore: ODevice now knows the default gfx driver to use (mteira,mickeyl)
85 * libopiecore: Add support for the Sharp SL-C3100 "Borzoi" (mickeyl) 86 * libopiecore: Add support for the Sharp SL-C3100 "Borzoi" (mickeyl)
86 * libopiecore: Add support for the new Linux Inputsystem Switches type [necessary for auto rotation in 2.6.13] (mickeyl) 87 * libopiecore: Add support for the new Linux Inputsystem Switches type [necessary for auto rotation in 2.6.13] (mickeyl)
87 * Remove assumptions about default gfx driver ("Transformed") all over the place (mteira,mickeyl) 88 * Remove assumptions about default gfx driver ("Transformed") all over the place (mteira,mickeyl)
88 * Fix / Optimize number of scanned directories (ljp) 89 * Fix / Optimize number of scanned directories (ljp)
89 * Use five point mouse calibration to make calibrated mouse drivers work on newer Zaurii (rp,mickeyl) 90 * Use five point mouse calibration to make calibrated mouse drivers work on newer Zaurii (rp,mickeyl)
90 91
91 2005-03-25Opie 1.2.0 92 2005-03-25Opie 1.2.0
92 93
93 Fixed Bugs 94 Fixed Bugs
94 ---------- 95 ----------
95 * #1613 - AdvancedFM - scale toolbar icons appropriately (drw) 96 * #1613 - AdvancedFM - scale toolbar icons appropriately (drw)
96 * #1620 - OFileSelector - show the button on press and not on press on hold (alwin) 97 * #1620 - OFileSelector - show the button on press and not on press on hold (alwin)
97 * #1473 - Opie-Eye - Same as #1620 but we lack a common FileSystem Button class (zecke) 98 * #1473 - Opie-Eye - Same as #1620 but we lack a common FileSystem Button class (zecke)
98 * n.a. - PackageManager - fix bug where messages show up multiple times in install dialog (drw) 99 * n.a. - PackageManager - fix bug where messages show up multiple times in install dialog (drw)
99 * n.a.- make qpeglobal.h include qglobal.h (zecke) 100 * n.a.- make qpeglobal.h include qglobal.h (zecke)
100 101
101 2005-03-20Opie 1.2.0-rc1 102 2005-03-20Opie 1.2.0-rc1
102 103
103 104
104 New Features 105 New Features
105 ------------ 106 ------------
106 * Launcher: Support a static background pixmap (mickeyl) 107 * Launcher: Support a static background pixmap (mickeyl)
107 * LauncherSettings: Choose whether to have a static background pixmap (mickeyl) 108 * LauncherSettings: Choose whether to have a static background pixmap (mickeyl)
108 * PackageManager supports the 'lists_dir' ipkg configuration option (drw) 109 * PackageManager supports the 'lists_dir' ipkg configuration option (drw)
109 * Added hi-res inline images for large resolution devices (drw) 110 * Added hi-res inline images for large resolution devices (drw)
110 * Improved launcher icons for consistency (ar) 111 * Improved launcher icons for consistency (ar)
111 * Datebook: Added plugin system to datebook so holidays and birthdays from contacts may displayed in datebook (alwin) 112 * Datebook: Added plugin system to datebook so holidays and birthdays from contacts may displayed in datebook (alwin)
112 113
113 Fixed Bugs 114 Fixed Bugs
114 ---------- 115 ----------
115 * #1236 - VCards contained empty home and work address entries causing Palms to crash (eilers) 116 * #1236 - VCards contained empty home and work address entries causing Palms to crash (eilers)
116 * #1412 - Launcher Settings - fixed default settings for background in Edit tab dialog (drw) 117 * #1412 - Launcher Settings - fixed default settings for background in Edit tab dialog (drw)
117 * #1472 - Opie textedit now check for unsaved changes on ESC key (ljp) 118 * #1472 - Opie textedit now check for unsaved changes on ESC key (ljp)
118 * #1474 - Implement GUI for Scrollbars on the Left in Appearance (zecke) 119 * #1474 - Implement GUI for Scrollbars on the Left in Appearance (zecke)
119 * #1482 - Fix double '/' in paths (zecke) 120 * #1482 - Fix double '/' in paths (zecke)
120 * #1536 - Autosave of custom locations in opie backup (ar) 121 * #1536 - Autosave of custom locations in opie backup (ar)
121 * #1539 - Fixed displaying too long path in the delete dialog in opie-eye (zecke) 122 * #1539 - Fixed displaying too long path in the delete dialog in opie-eye (zecke)
122 * #1540 - Implemented deletion of DocLnks in opie-eye (zecke) 123 * #1540 - Implemented deletion of DocLnks in opie-eye (zecke)
123 * #1542 - Fixed Todo crash when priority < 1 or > 5 (drw) 124 * #1542 - Fixed Todo crash when priority < 1 or > 5 (drw)
124 * #1550 - Browse for alarm sound start in QPEDIR/sounds/ (zecke) 125 * #1550 - Browse for alarm sound start in QPEDIR/sounds/ (zecke)
125 * #1554 - Fixed Opie-Console name in .desktop file (mickeyl) 126 * #1554 - Fixed Opie-Console name in .desktop file (mickeyl)
126 * #1556 - Start to look for sound files in /opt/QtPalmtop/sounds (zecke) 127 * #1556 - Start to look for sound files in /opt/QtPalmtop/sounds (zecke)
127 * #1558 - Fixed opie-login breaking opie startup (mickeyl) 128 * #1558 - Fixed opie-login breaking opie startup (mickeyl)
128 * #1560 - Fixed Opie-Console picking up the wrong shell (bluelightning) 129 * #1560 - Fixed Opie-Console picking up the wrong shell (bluelightning)
129 * #1570 - Confirmation needed befor Restore a backup and overwrite local data (ar) 130 * #1570 - Confirmation needed befor Restore a backup and overwrite local data (ar)
130 * #1591 - Addressbook sortorder changed by clicking on column 0 (eilers) 131 * #1591 - Addressbook sortorder changed by clicking on column 0 (eilers)
131 * #1599 - Security - change recommendation for opie-multiauth to opie-securityplugin (gints) 132 * #1599 - Security - change recommendation for opie-multiauth to opie-securityplugin (gints)
132 * #1604 - Checkbook crashed on startup (drw) 133 * #1604 - Checkbook crashed on startup (drw)
133 * #1608 - Addressbook crashed after search, which may caused by not initialzed member variable (eilers) 134 * #1608 - Addressbook crashed after search, which may caused by not initialzed member variable (eilers)
134 * #1608 - QueryByExampe-Datediff on SQL database did not worked properly (eilers) 135 * #1608 - QueryByExampe-Datediff on SQL database did not worked properly (eilers)
135 * n.a. - Netsystemtime - fixed UI to prevent error dialog from displaying when it shouldn't, get rid of some compiler warnings (drw) 136 * n.a. - Netsystemtime - fixed UI to prevent error dialog from displaying when it shouldn't, get rid of some compiler warnings (drw)
diff --git a/noncore/settings/packagemanager/oipkg.cpp b/noncore/settings/packagemanager/oipkg.cpp
index ffb3687..38cd824 100644
--- a/noncore/settings/packagemanager/oipkg.cpp
+++ b/noncore/settings/packagemanager/oipkg.cpp
@@ -297,256 +297,258 @@ OPackageList *OIpkg::availablePackages( const QString &server )
297 // Skip past all description lines 297 // Skip past all description lines
298 if ( key == "Description" ) 298 if ( key == "Description" )
299 { 299 {
300 line = t.readLine(); 300 line = t.readLine();
301 while ( !line.isEmpty() && line.find( ':', 0 ) == -1 && !t.eof() ) 301 while ( !line.isEmpty() && line.find( ':', 0 ) == -1 && !t.eof() )
302 line = t.readLine(); 302 line = t.readLine();
303 } 303 }
304 else 304 else
305 line = t.readLine(); 305 line = t.readLine();
306 } 306 }
307 307
308 f.close(); 308 f.close();
309 309
310 return pl; 310 return pl;
311} 311}
312 312
313OPackageList *OIpkg::installedPackages( const QString &destName, const QString &destPath ) 313OPackageList *OIpkg::installedPackages( const QString &destName, const QString &destPath )
314{ 314{
315 // Load Ipkg configuration info if not already cached 315 // Load Ipkg configuration info if not already cached
316 if ( !m_confInfo ) 316 if ( !m_confInfo )
317 loadConfiguration(); 317 loadConfiguration();
318 318
319 // Build new server list (caller is responsible for deleting) 319 // Build new server list (caller is responsible for deleting)
320 OPackageList *pl = new OPackageList; 320 OPackageList *pl = new OPackageList;
321 321
322 // Open status file 322 // Open status file
323 QString path = destPath; 323 QString path = destPath;
324 if ( path.right( 1 ) != "/" ) 324 if ( path.right( 1 ) != "/" )
325 path.append( "/" ); 325 path.append( "/" );
326 path.append( IPKG_STATUS_PATH ); 326 path.append( IPKG_STATUS_PATH );
327 327
328 QFile f( path ); 328 QFile f( path );
329 if ( !f.open( IO_ReadOnly ) ) 329 if ( !f.open( IO_ReadOnly ) )
330 return NULL; 330 return NULL;
331 QTextStream t( &f ); 331 QTextStream t( &f );
332 332
333 // Process all information in status file 333 // Process all information in status file
334 bool newPackage = false; 334 bool newPackage = false;
335 QString line = t.readLine(); 335 QString line = t.readLine();
336 QString name; 336 QString name;
337 QString version; 337 QString version;
338 QString status; 338 QString status;
339 339
340 while ( !t.eof() ) 340 while ( !t.eof() )
341 { 341 {
342 // Determine key/value pair 342 // Determine key/value pair
343 int pos = line.find( ':', 0 ); 343 int pos = line.find( ':', 0 );
344 QString key; 344 QString key;
345 if ( pos > -1 ) 345 if ( pos > -1 )
346 key = line.mid( 0, pos ); 346 key = line.mid( 0, pos );
347 else 347 else
348 key = QString::null; 348 key = QString::null;
349 QString value = line.mid( pos+2, line.length()-pos ); 349 QString value = line.mid( pos+2, line.length()-pos );
350 350
351 // Allocate new package and insert into list 351 // Allocate new package and insert into list
352 if ( newPackage && !key.isEmpty() ) 352 if ( newPackage && !key.isEmpty() )
353 { 353 {
354 // Add to list only if it has a valid name and is installed 354 // Add to list only if it has a valid name and is installed
355 if ( !name.isNull() && status.contains( " installed" ) ) 355 if ( !name.isNull() && status.contains( " installed" ) )
356 { 356 {
357 pl->append( new OPackage( name, QString::null, version, QString::null, destName ) ); 357 pl->append( new OPackage( name, QString::null, version, QString::null, destName ) );
358 name = QString::null; 358 name = QString::null;
359 version = QString::null; 359 version = QString::null;
360 status = QString::null; 360 status = QString::null;
361 361
362 newPackage = false; 362 newPackage = false;
363 } 363 }
364 } 364 }
365 365
366 // Update package data 366 // Update package data
367 if ( key == "Package" ) 367 if ( key == "Package" )
368 name = value; 368 name = value;
369 else if ( key == "Version" ) 369 else if ( key == "Version" )
370 version = value; 370 version = value;
371 else if ( key == "Status" ) 371 else if ( key == "Status" )
372 status = value; 372 status = value;
373 else if ( key.isEmpty() && value.isEmpty() ) 373 else if ( key.isEmpty() && value.isEmpty() )
374 newPackage = true; 374 newPackage = true;
375 375
376 // Skip past all description lines 376 // Skip past all description lines
377 if ( key == "Description" ) 377 if ( key == "Description" )
378 { 378 {
379 line = t.readLine(); 379 line = t.readLine();
380 while ( !line.isEmpty() && line.find( ':', 0 ) == -1 && !t.eof() ) 380 while ( !line.isEmpty() && line.find( ':', 0 ) == -1 && !t.eof() )
381 line = t.readLine(); 381 line = t.readLine();
382 } 382 }
383 else 383 else
384 line = t.readLine(); 384 line = t.readLine();
385 } 385 }
386 386
387 f.close(); 387 f.close();
388 388
389 // Make sure to add to list last entry 389 // Make sure to add to list last entry
390 if ( !name.isNull() && status.contains( " installed" ) ) 390 if ( !name.isNull() && status.contains( " installed" ) )
391 pl->append( new OPackage( name, QString::null, version, QString::null, destName ) ); 391 pl->append( new OPackage( name, QString::null, version, QString::null, destName ) );
392 392
393 return pl; 393 return pl;
394} 394}
395 395
396OConfItem *OIpkg::findConfItem( OConfItem::Type type, const QString &name ) 396OConfItem *OIpkg::findConfItem( OConfItem::Type type, const QString &name )
397{ 397{
398 // Find configuration item in list 398 // Find configuration item in list
399 OConfItemListIterator configIt( *m_confInfo ); 399 OConfItemListIterator configIt( *m_confInfo );
400 OConfItem *config = 0l; 400 OConfItem *config = 0l;
401 for ( ; configIt.current(); ++configIt ) 401 for ( ; configIt.current(); ++configIt )
402 { 402 {
403 config = configIt.current(); 403 config = configIt.current();
404 if ( config->type() == type && config->name() == name ) 404 if ( config->type() == type && config->name() == name )
405 break; 405 break;
406 } 406 }
407 407
408 if ( config && config->type() == type && config->name() == name ) 408 if ( config && config->type() == type && config->name() == name )
409 return config; 409 return config;
410 410
411 return 0l; 411 return 0l;
412} 412}
413 413
414bool OIpkg::executeCommand( OPackage::Command command, const QStringList &parameters, const QString &destination, 414bool OIpkg::executeCommand( OPackage::Command command, const QStringList &parameters, const QString &destination,
415 const QObject *receiver, const char *slotOutput, bool rawOutput ) 415 const QObject *receiver, const char *slotOutput, bool rawOutput )
416{ 416{
417 if ( command == OPackage::NotDefined ) 417 if ( command == OPackage::NotDefined )
418 return false; 418 return false;
419 419
420 // Set ipkg run-time options/arguments 420 // Set ipkg run-time options/arguments
421 m_ipkgArgs.force_depends = ( m_ipkgExecOptions & FORCE_DEPENDS ); 421 m_ipkgArgs.force_depends = ( m_ipkgExecOptions & FORCE_DEPENDS );
422 m_ipkgArgs.force_reinstall = ( m_ipkgExecOptions & FORCE_REINSTALL ); 422 m_ipkgArgs.force_reinstall = ( m_ipkgExecOptions & FORCE_REINSTALL );
423 // TODO m_ipkgArgs.force_remove = ( m_ipkgExecOptions & FORCE_REMOVE ); 423 // TODO m_ipkgArgs.force_remove = ( m_ipkgExecOptions & FORCE_REMOVE );
424 m_ipkgArgs.force_overwrite = ( m_ipkgExecOptions & FORCE_OVERWRITE ); 424 m_ipkgArgs.force_overwrite = ( m_ipkgExecOptions & FORCE_OVERWRITE );
425 m_ipkgArgs.force_removal_of_dependent_packages = ( m_ipkgExecOptions & FORCE_RECURSIVE );
426 m_ipkgArgs.verbose_wget = ( m_ipkgExecOptions & FORCE_VERBOSE_WGET );
425 m_ipkgArgs.verbosity = m_ipkgExecVerbosity; 427 m_ipkgArgs.verbosity = m_ipkgExecVerbosity;
426 if ( m_ipkgArgs.dest ) 428 if ( m_ipkgArgs.dest )
427 free( m_ipkgArgs.dest ); 429 free( m_ipkgArgs.dest );
428 if ( !destination.isNull() ) 430 if ( !destination.isNull() )
429 { 431 {
430 int len = destination.length() + 1; 432 int len = destination.length() + 1;
431 m_ipkgArgs.dest = (char *)malloc( len ); 433 m_ipkgArgs.dest = (char *)malloc( len );
432 strncpy( m_ipkgArgs.dest, destination, destination.length() ); 434 strncpy( m_ipkgArgs.dest, destination, destination.length() );
433 m_ipkgArgs.dest[ len - 1 ] = '\0'; 435 m_ipkgArgs.dest[ len - 1 ] = '\0';
434 } 436 }
435 else 437 else
436 m_ipkgArgs.dest = 0l; 438 m_ipkgArgs.dest = 0l;
437 439
438 // Connect output signal to widget 440 // Connect output signal to widget
439 441
440 if ( !rawOutput ) 442 if ( !rawOutput )
441 { 443 {
442 // TODO - connect to local slot and parse output before emitting signalIpkgMessage 444 // TODO - connect to local slot and parse output before emitting signalIpkgMessage
443 } 445 }
444 446
445 switch( command ) 447 switch( command )
446 { 448 {
447 case OPackage::Update : { 449 case OPackage::Update : {
448 connect( this, SIGNAL(signalIpkgMessage(const QString &)), receiver, slotOutput ); 450 connect( this, SIGNAL(signalIpkgMessage(const QString &)), receiver, slotOutput );
449 ipkg_lists_update( &m_ipkgArgs ); 451 ipkg_lists_update( &m_ipkgArgs );
450 disconnect( this, SIGNAL(signalIpkgMessage(const QString &)), 0, 0 ); 452 disconnect( this, SIGNAL(signalIpkgMessage(const QString &)), 0, 0 );
451 }; 453 };
452 break; 454 break;
453 case OPackage::Upgrade : { 455 case OPackage::Upgrade : {
454 connect( this, SIGNAL(signalIpkgMessage(const QString &)), receiver, slotOutput ); 456 connect( this, SIGNAL(signalIpkgMessage(const QString &)), receiver, slotOutput );
455 ipkg_packages_upgrade( &m_ipkgArgs ); 457 ipkg_packages_upgrade( &m_ipkgArgs );
456 458
457 // Re-link non-root destinations to make sure everything is in sync 459 // Re-link non-root destinations to make sure everything is in sync
458 OConfItemList *destList = destinations(); 460 OConfItemList *destList = destinations();
459 OConfItemListIterator it( *destList ); 461 OConfItemListIterator it( *destList );
460 for ( ; it.current(); ++it ) 462 for ( ; it.current(); ++it )
461 { 463 {
462 OConfItem *dest = it.current(); 464 OConfItem *dest = it.current();
463 if ( dest->name() != "root" ) 465 if ( dest->name() != "root" )
464 linkPackageDir( dest->name() ); 466 linkPackageDir( dest->name() );
465 } 467 }
466 delete destList; 468 delete destList;
467 disconnect( this, SIGNAL(signalIpkgMessage(const QString &)), 0, 0 ); 469 disconnect( this, SIGNAL(signalIpkgMessage(const QString &)), 0, 0 );
468 }; 470 };
469 break; 471 break;
470 case OPackage::Install : { 472 case OPackage::Install : {
471 connect( this, SIGNAL(signalIpkgMessage(const QString &)), receiver, slotOutput ); 473 connect( this, SIGNAL(signalIpkgMessage(const QString &)), receiver, slotOutput );
472 for ( QStringList::ConstIterator it = parameters.begin(); it != parameters.end(); ++it ) 474 for ( QStringList::ConstIterator it = parameters.begin(); it != parameters.end(); ++it )
473 { 475 {
474 ipkg_packages_install( &m_ipkgArgs, (*it) ); 476 ipkg_packages_install( &m_ipkgArgs, (*it) );
475 } 477 }
476 if ( destination != "root" ) 478 if ( destination != "root" )
477 linkPackageDir( destination ); 479 linkPackageDir( destination );
478 disconnect( this, SIGNAL(signalIpkgMessage(const QString &)), 0, 0 ); 480 disconnect( this, SIGNAL(signalIpkgMessage(const QString &)), 0, 0 );
479 }; 481 };
480 break; 482 break;
481 case OPackage::Remove : { 483 case OPackage::Remove : {
482 connect( this, SIGNAL(signalIpkgMessage(const QString &)), receiver, slotOutput ); 484 connect( this, SIGNAL(signalIpkgMessage(const QString &)), receiver, slotOutput );
483 485
484 // Get list of destinations for unlinking of packages not installed to root 486 // Get list of destinations for unlinking of packages not installed to root
485 OConfItemList *destList = destinations(); 487 OConfItemList *destList = destinations();
486 488
487 for ( QStringList::ConstIterator it = parameters.begin(); it != parameters.end(); ++it ) 489 for ( QStringList::ConstIterator it = parameters.begin(); it != parameters.end(); ++it )
488 { 490 {
489 unlinkPackage( (*it), destList ); 491 unlinkPackage( (*it), destList );
490 ipkg_packages_remove( &m_ipkgArgs, (*it), true ); 492 ipkg_packages_remove( &m_ipkgArgs, (*it), true );
491 } 493 }
492 494
493 delete destList; 495 delete destList;
494 disconnect( this, SIGNAL(signalIpkgMessage(const QString &)), 0, 0 ); 496 disconnect( this, SIGNAL(signalIpkgMessage(const QString &)), 0, 0 );
495 }; 497 };
496 break; 498 break;
497 case OPackage::Download : { 499 case OPackage::Download : {
498 connect( this, SIGNAL(signalIpkgMessage(const QString &)), receiver, slotOutput ); 500 connect( this, SIGNAL(signalIpkgMessage(const QString &)), receiver, slotOutput );
499 for ( QStringList::ConstIterator it = parameters.begin(); it != parameters.end(); ++it ) 501 for ( QStringList::ConstIterator it = parameters.begin(); it != parameters.end(); ++it )
500 { 502 {
501 ipkg_packages_download( &m_ipkgArgs, (*it) ); 503 ipkg_packages_download( &m_ipkgArgs, (*it) );
502 } 504 }
503 disconnect( this, SIGNAL(signalIpkgMessage(const QString &)), 0, 0 ); 505 disconnect( this, SIGNAL(signalIpkgMessage(const QString &)), 0, 0 );
504 }; 506 };
505 break; 507 break;
506 case OPackage::Info : { 508 case OPackage::Info : {
507 connect( this, SIGNAL(signalIpkgStatus(const QString &)), receiver, slotOutput ); 509 connect( this, SIGNAL(signalIpkgStatus(const QString &)), receiver, slotOutput );
508 ipkg_packages_info( &m_ipkgArgs, (*parameters.begin()), &fIpkgStatus, 0l ); 510 ipkg_packages_info( &m_ipkgArgs, (*parameters.begin()), &fIpkgStatus, 0l );
509 disconnect( this, SIGNAL(signalIpkgStatus(const QString &)), 0, 0 ); 511 disconnect( this, SIGNAL(signalIpkgStatus(const QString &)), 0, 0 );
510 }; 512 };
511 break; 513 break;
512 case OPackage::Files : { 514 case OPackage::Files : {
513 connect( this, SIGNAL(signalIpkgList(const QString &)), receiver, slotOutput ); 515 connect( this, SIGNAL(signalIpkgList(const QString &)), receiver, slotOutput );
514 ipkg_package_files( &m_ipkgArgs, (*parameters.begin()), &fIpkgFiles, 0l ); 516 ipkg_package_files( &m_ipkgArgs, (*parameters.begin()), &fIpkgFiles, 0l );
515 disconnect( this, SIGNAL(signalIpkgList(const QString &)), 0, 0 ); 517 disconnect( this, SIGNAL(signalIpkgList(const QString &)), 0, 0 );
516 }; 518 };
517 break; 519 break;
518 default : break; 520 default : break;
519 }; 521 };
520 522
521 return true; 523 return true;
522} 524}
523 525
524void OIpkg::ipkgMessage( char *msg ) 526void OIpkg::ipkgMessage( char *msg )
525{ 527{
526 emit signalIpkgMessage( msg ); 528 emit signalIpkgMessage( msg );
527} 529}
528 530
529void OIpkg::ipkgStatus( char *status ) 531void OIpkg::ipkgStatus( char *status )
530{ 532{
531 emit signalIpkgStatus( status ); 533 emit signalIpkgStatus( status );
532} 534}
533 535
534void OIpkg::ipkgList( char *filelist ) 536void OIpkg::ipkgList( char *filelist )
535{ 537{
536 emit signalIpkgList( filelist ); 538 emit signalIpkgList( filelist );
537} 539}
538 540
539void OIpkg::loadConfiguration() 541void OIpkg::loadConfiguration()
540{ 542{
541 if ( m_confInfo ) 543 if ( m_confInfo )
542 delete m_confInfo; 544 delete m_confInfo;
543 545
544 // Load configuration item list 546 // Load configuration item list
545 m_confInfo = new OConfItemList(); 547 m_confInfo = new OConfItemList();
546 548
547 QStringList confFiles; 549 QStringList confFiles;
548 QDir confDir( IPKG_CONF_DIR ); 550 QDir confDir( IPKG_CONF_DIR );
549 if ( confDir.exists() ) 551 if ( confDir.exists() )
550 { 552 {
551 confDir.setNameFilter( "*.conf" ); 553 confDir.setNameFilter( "*.conf" );
552 confDir.setFilter( QDir::Files ); 554 confDir.setFilter( QDir::Files );
diff --git a/noncore/settings/packagemanager/oipkg.h b/noncore/settings/packagemanager/oipkg.h
index 9a7802c..88f0e32 100644
--- a/noncore/settings/packagemanager/oipkg.h
+++ b/noncore/settings/packagemanager/oipkg.h
@@ -1,110 +1,112 @@
1/* 1/*
2                 This file is part of the Opie Project 2                 This file is part of the Opie Project
3 3
4 Copyright (C)2004, 2005 Dan Williams <drw@handhelds.org> 4 Copyright (C)2004, 2005 Dan Williams <drw@handhelds.org>
5 =. 5 =.
6 .=l. 6 .=l.
7           .>+-= 7           .>+-=
8 _;:,     .>    :=|. This program is free software; you can 8 _;:,     .>    :=|. This program is free software; you can
9.> <`_,   >  .   <= redistribute it and/or modify it under 9.> <`_,   >  .   <= redistribute it and/or modify it under
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#ifndef OIPKG_H 31#ifndef OIPKG_H
32#define OIPKG_H 32#define OIPKG_H
33 33
34#include "oconfitem.h" 34#include "oconfitem.h"
35#include "opackage.h" 35#include "opackage.h"
36 36
37#include <qpe/config.h> 37#include <qpe/config.h>
38 38
39#include <qobject.h> 39#include <qobject.h>
40 40
41// Ipkg execution options (m_ipkgExecOptions) 41// Ipkg execution options (m_ipkgExecOptions)
42#define FORCE_DEPENDS 0x0001 42#define FORCE_DEPENDS 0x0001
43#define FORCE_REMOVE 0x0002 43#define FORCE_REMOVE 0x0002
44#define FORCE_REINSTALL 0x0004 44#define FORCE_REINSTALL 0x0004
45#define FORCE_OVERWRITE 0x0008 45#define FORCE_OVERWRITE 0x0008
46#define FORCE_RECURSIVE 0x0010
47#define FORCE_VERBOSE_WGET 0x0020
46 48
47class OConfItemList; 49class OConfItemList;
48 50
49class OIpkg : public QObject 51class OIpkg : public QObject
50{ 52{
51 Q_OBJECT 53 Q_OBJECT
52 54
53public: 55public:
54 OIpkg( Config *config = 0l, QObject *parent = 0l, const char *name = 0l ); 56 OIpkg( Config *config = 0l, QObject *parent = 0l, const char *name = 0l );
55 ~OIpkg(); 57 ~OIpkg();
56 58
57 OConfItemList *configItems(); 59 OConfItemList *configItems();
58 OConfItemList *servers(); 60 OConfItemList *servers();
59 OConfItemList *destinations(); 61 OConfItemList *destinations();
60 OConfItemList *options(); 62 OConfItemList *options();
61 63
62 int ipkgExecOptions() { return m_ipkgExecOptions; } 64 int ipkgExecOptions() { return m_ipkgExecOptions; }
63 int ipkgExecVerbosity() { return m_ipkgExecVerbosity; } 65 int ipkgExecVerbosity() { return m_ipkgExecVerbosity; }
64 66
65 void setConfigItems( OConfItemList *configList ); 67 void setConfigItems( OConfItemList *configList );
66 void setIpkgExecOptions( int options ) { m_ipkgExecOptions = options; } 68 void setIpkgExecOptions( int options ) { m_ipkgExecOptions = options; }
67 void setIpkgExecVerbosity( int verbosity ) { m_ipkgExecVerbosity = verbosity; } 69 void setIpkgExecVerbosity( int verbosity ) { m_ipkgExecVerbosity = verbosity; }
68 70
69 void saveSettings(); 71 void saveSettings();
70 72
71 OPackageList *availablePackages( const QString &server = QString::null ); 73 OPackageList *availablePackages( const QString &server = QString::null );
72 OPackageList *installedPackages( const QString &destName = QString::null, 74 OPackageList *installedPackages( const QString &destName = QString::null,
73 const QString &destPath = QString::null ); 75 const QString &destPath = QString::null );
74 76
75 OConfItem *findConfItem( OConfItem::Type type = OConfItem::NotDefined, 77 OConfItem *findConfItem( OConfItem::Type type = OConfItem::NotDefined,
76 const QString &name = QString::null ); 78 const QString &name = QString::null );
77 79
78 bool executeCommand( OPackage::Command command = OPackage::NotDefined, 80 bool executeCommand( OPackage::Command command = OPackage::NotDefined,
79 const QStringList &parameters = QStringList(), 81 const QStringList &parameters = QStringList(),
80 const QString &destination = QString::null, 82 const QString &destination = QString::null,
81 const QObject *receiver = 0l, 83 const QObject *receiver = 0l,
82 const char *slotOutput = 0l, 84 const char *slotOutput = 0l,
83 bool rawOutput = true ); 85 bool rawOutput = true );
84 void abortCommand(); 86 void abortCommand();
85 87
86 void ipkgMessage( char *msg ); 88 void ipkgMessage( char *msg );
87 void ipkgStatus( char *status ); 89 void ipkgStatus( char *status );
88 void ipkgList( char *filelist ); 90 void ipkgList( char *filelist );
89 91
90private: 92private:
91 Config *m_config; // Pointer to application configuration file 93 Config *m_config; // Pointer to application configuration file
92 OConfItemList *m_confInfo; // Contains info from all Ipkg configuration files 94 OConfItemList *m_confInfo; // Contains info from all Ipkg configuration files
93 int m_ipkgExecOptions; // Bit-mapped flags for Ipkg execution options 95 int m_ipkgExecOptions; // Bit-mapped flags for Ipkg execution options
94 int m_ipkgExecVerbosity; // Ipkg execution verbosity level 96 int m_ipkgExecVerbosity; // Ipkg execution verbosity level
95 QString m_rootPath; // Directory path where the 'root' destination is located 97 QString m_rootPath; // Directory path where the 'root' destination is located
96 98
97 void loadConfiguration(); 99 void loadConfiguration();
98 OConfItemList *filterConfItems( OConfItem::Type typefilter = OConfItem::NotDefined ); 100 OConfItemList *filterConfItems( OConfItem::Type typefilter = OConfItem::NotDefined );
99 const QString &rootPath(); 101 const QString &rootPath();
100 void linkPackageDir( const QString &dest = QString::null ); 102 void linkPackageDir( const QString &dest = QString::null );
101 void unlinkPackage( const QString &package = QString::null, 103 void unlinkPackage( const QString &package = QString::null,
102 OConfItemList *destList = 0l ); 104 OConfItemList *destList = 0l );
103 105
104signals: 106signals:
105 void signalIpkgMessage( const QString &msg ); 107 void signalIpkgMessage( const QString &msg );
106 void signalIpkgStatus( const QString &status ); 108 void signalIpkgStatus( const QString &status );
107 void signalIpkgList( const QString &filelist ); 109 void signalIpkgList( const QString &filelist );
108}; 110};
109 111
110#endif 112#endif
diff --git a/noncore/settings/packagemanager/oipkgconfigdlg.cpp b/noncore/settings/packagemanager/oipkgconfigdlg.cpp
index 58c572b..d014378 100644
--- a/noncore/settings/packagemanager/oipkgconfigdlg.cpp
+++ b/noncore/settings/packagemanager/oipkgconfigdlg.cpp
@@ -25,539 +25,555 @@
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#include <opie2/oresource.h>
35 35
36#include <qpe/qpeapplication.h> 36#include <qpe/qpeapplication.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
48OIpkgConfigDlg::OIpkgConfigDlg( OIpkg *ipkg, bool installOptions, QWidget *parent ) 48OIpkgConfigDlg::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
61 if ( !installOptions ) 61 if ( !installOptions )
62 { 62 {
63 initServerWidget(); 63 initServerWidget();
64 initDestinationWidget(); 64 initDestinationWidget();
65 initProxyWidget(); 65 initProxyWidget();
66 } 66 }
67 initOptionsWidget(); 67 initOptionsWidget();
68 68
69 // Load configuration information 69 // Load configuration information
70 initData(); 70 initData();
71 71
72 // Setup tabs for all info 72 // Setup tabs for all info
73 m_layout.addWidget( &m_tabWidget ); 73 m_layout.addWidget( &m_tabWidget );
74 if ( !m_installOptions ) 74 if ( !m_installOptions )
75 { 75 {
76 m_tabWidget.addTab( m_serverWidget, "packagemanager/servertab", tr( "Servers" ) ); 76 m_tabWidget.addTab( m_serverWidget, "packagemanager/servertab", tr( "Servers" ) );
77 m_tabWidget.addTab( m_destWidget, "packagemanager/desttab", tr( "Destinations" ) ); 77 m_tabWidget.addTab( m_destWidget, "packagemanager/desttab", tr( "Destinations" ) );
78 m_tabWidget.addTab( m_proxyWidget, "packagemanager/proxytab", tr( "Proxies" ) ); 78 m_tabWidget.addTab( m_proxyWidget, "packagemanager/proxytab", tr( "Proxies" ) );
79 m_tabWidget.addTab( m_optionsWidget, "exec", tr( "Options" ) ); 79 m_tabWidget.addTab( m_optionsWidget, "exec", tr( "Options" ) );
80 m_tabWidget.setCurrentTab( tr( "Servers" ) ); 80 m_tabWidget.setCurrentTab( tr( "Servers" ) );
81 } 81 }
82 else 82 else
83 { 83 {
84 m_tabWidget.addTab( m_optionsWidget, "exec", tr( "Options" ) ); 84 m_tabWidget.addTab( m_optionsWidget, "exec", tr( "Options" ) );
85 } 85 }
86} 86}
87 87
88void OIpkgConfigDlg::accept() 88void OIpkgConfigDlg::accept()
89{ 89{
90 // Save server, destination and proxy configuration 90 // Save server, destination and proxy configuration
91 if ( !m_installOptions ) 91 if ( !m_installOptions )
92 { 92 {
93 // Update proxy information before saving settings 93 // Update proxy information before saving settings
94 OConfItem *confItem = m_ipkg->findConfItem( OConfItem::Option, "http_proxy" ); 94 OConfItem *confItem = m_ipkg->findConfItem( OConfItem::Option, "http_proxy" );
95 if ( confItem ) 95 if ( confItem )
96 { 96 {
97 confItem->setValue( m_proxyHttpServer->text() ); 97 confItem->setValue( m_proxyHttpServer->text() );
98 confItem->setActive( m_proxyHttpActive->isChecked() ); 98 confItem->setActive( m_proxyHttpActive->isChecked() );
99 } 99 }
100 else 100 else
101 m_configs->append( new OConfItem( OConfItem::Option, "http_proxy", 101 m_configs->append( new OConfItem( OConfItem::Option, "http_proxy",
102 m_proxyHttpServer->text(), QString::null, 102 m_proxyHttpServer->text(), QString::null,
103 m_proxyHttpActive->isChecked() ) ); 103 m_proxyHttpActive->isChecked() ) );
104 104
105 confItem = m_ipkg->findConfItem( OConfItem::Option, "ftp_proxy" ); 105 confItem = m_ipkg->findConfItem( OConfItem::Option, "ftp_proxy" );
106 if ( confItem ) 106 if ( confItem )
107 { 107 {
108 confItem->setValue( m_proxyFtpServer->text() ); 108 confItem->setValue( m_proxyFtpServer->text() );
109 confItem->setActive( m_proxyFtpActive->isChecked() ); 109 confItem->setActive( m_proxyFtpActive->isChecked() );
110 } 110 }
111 else 111 else
112 m_configs->append( new OConfItem( OConfItem::Option, "ftp_proxy", 112 m_configs->append( new OConfItem( OConfItem::Option, "ftp_proxy",
113 m_proxyFtpServer->text(), QString::null, 113 m_proxyFtpServer->text(), QString::null,
114 m_proxyFtpActive->isChecked() ) ); 114 m_proxyFtpActive->isChecked() ) );
115 115
116 confItem = m_ipkg->findConfItem( OConfItem::Option, "proxy_username" ); 116 confItem = m_ipkg->findConfItem( OConfItem::Option, "proxy_username" );
117 if ( confItem ) 117 if ( confItem )
118 confItem->setValue( m_proxyUsername->text() ); 118 confItem->setValue( m_proxyUsername->text() );
119 else 119 else
120 m_configs->append( new OConfItem( OConfItem::Option, "proxy_username", 120 m_configs->append( new OConfItem( OConfItem::Option, "proxy_username",
121 m_proxyUsername->text() ) ); 121 m_proxyUsername->text() ) );
122 122
123 confItem = m_ipkg->findConfItem( OConfItem::Option, "proxy_password" ); 123 confItem = m_ipkg->findConfItem( OConfItem::Option, "proxy_password" );
124 if ( confItem ) 124 if ( confItem )
125 confItem->setValue( m_proxyPassword->text() ); 125 confItem->setValue( m_proxyPassword->text() );
126 else 126 else
127 m_configs->append( new OConfItem( OConfItem::Option, "proxy_password", 127 m_configs->append( new OConfItem( OConfItem::Option, "proxy_password",
128 m_proxyPassword->text() ) ); 128 m_proxyPassword->text() ) );
129 129
130 QString listsDir = m_optSourceLists->text(); 130 QString listsDir = m_optSourceLists->text();
131 if ( listsDir == QString::null || listsDir == "" ) 131 if ( listsDir == QString::null || listsDir == "" )
132 listsDir = "/usr/lib/ipkg/lists"; // TODO - use proper libipkg define 132 listsDir = "/usr/lib/ipkg/lists"; // TODO - use proper libipkg define
133 confItem = m_ipkg->findConfItem( OConfItem::Other, "lists_dir" ); 133 confItem = m_ipkg->findConfItem( OConfItem::Other, "lists_dir" );
134 if ( confItem ) 134 if ( confItem )
135 confItem->setValue( listsDir ); 135 confItem->setValue( listsDir );
136 else 136 else
137 m_configs->append( new OConfItem( OConfItem::Other, "lists_dir", 137 m_configs->append( new OConfItem( OConfItem::Other, "lists_dir",
138 listsDir, "name" ) ); 138 listsDir, "name" ) );
139 139
140 m_ipkg->setConfigItems( m_configs ); 140 m_ipkg->setConfigItems( m_configs );
141 } 141 }
142 142
143 // Save options configuration 143 // Save options configuration
144 int options = 0; 144 int options = 0;
145 if ( m_optForceDepends->isChecked() ) 145 if ( m_optForceDepends->isChecked() )
146 options |= FORCE_DEPENDS; 146 options |= FORCE_DEPENDS;
147 if ( m_optForceReinstall->isChecked() ) 147 if ( m_optForceReinstall->isChecked() )
148 options |= FORCE_REINSTALL; 148 options |= FORCE_REINSTALL;
149 if ( m_optForceRemove->isChecked() ) 149 if ( m_optForceRemove->isChecked() )
150 options |= FORCE_REMOVE; 150 options |= FORCE_REMOVE;
151 if ( m_optForceOverwrite->isChecked() ) 151 if ( m_optForceOverwrite->isChecked() )
152 options |= FORCE_OVERWRITE; 152 options |= FORCE_OVERWRITE;
153 if ( m_optForceRecursive->isChecked() )
154 options |= FORCE_RECURSIVE;
155 if ( m_optVerboseWget->isChecked() )
156 options |= FORCE_VERBOSE_WGET;
153 m_ipkg->setIpkgExecOptions( options ); 157 m_ipkg->setIpkgExecOptions( options );
154 m_ipkg->setIpkgExecVerbosity( m_optVerboseIpkg->currentItem() ); 158 m_ipkg->setIpkgExecVerbosity( m_optVerboseIpkg->currentItem() );
155 159
156 QDialog::accept(); 160 QDialog::accept();
157} 161}
158 162
159void OIpkgConfigDlg::reject() 163void OIpkgConfigDlg::reject()
160{ 164{
161 if ( m_configs ) 165 if ( m_configs )
162 delete m_configs; 166 delete m_configs;
163} 167}
164 168
165void OIpkgConfigDlg::initServerWidget() 169void OIpkgConfigDlg::initServerWidget()
166{ 170{
167 m_serverWidget = new QWidget( this ); 171 m_serverWidget = new QWidget( this );
168 172
169 // Initialize UI 173 // Initialize UI
170 QVBoxLayout *vb = new QVBoxLayout( m_serverWidget ); 174 QVBoxLayout *vb = new QVBoxLayout( m_serverWidget );
171 QScrollView *sv = new QScrollView( m_serverWidget ); 175 QScrollView *sv = new QScrollView( m_serverWidget );
172 vb->addWidget( sv, 0, 0 ); 176 vb->addWidget( sv, 0, 0 );
173 sv->setResizePolicy( QScrollView::AutoOneFit ); 177 sv->setResizePolicy( QScrollView::AutoOneFit );
174 sv->setFrameStyle( QFrame::NoFrame ); 178 sv->setFrameStyle( QFrame::NoFrame );
175 QWidget *container = new QWidget( sv->viewport() ); 179 QWidget *container = new QWidget( sv->viewport() );
176 sv->addChild( container ); 180 sv->addChild( container );
177 QGridLayout *layout = new QGridLayout( container, 2, 3, 2, 4 ); 181 QGridLayout *layout = new QGridLayout( container, 2, 3, 2, 4 );
178 182
179 m_serverList = new QListBox( container ); 183 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." ) ); 184 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 ) ); 185 m_serverList->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ) );
182 connect( m_serverList, SIGNAL(highlighted(int)), this, SLOT(slotServerSelected(int)) ); 186 connect( m_serverList, SIGNAL(highlighted(int)), this, SLOT(slotServerSelected(int)) );
183 layout->addMultiCellWidget( m_serverList, 0, 0, 0, 2 ); 187 layout->addMultiCellWidget( m_serverList, 0, 0, 0, 2 );
184 188
185 QPushButton *btn = new QPushButton( Opie::Core::OResource::loadPixmap( "new", Opie::Core::OResource::SmallIcon ), 189 QPushButton *btn = new QPushButton( Opie::Core::OResource::loadPixmap( "new", Opie::Core::OResource::SmallIcon ),
186 tr( "New" ), container ); 190 tr( "New" ), container );
187 btn->setMinimumHeight( AppLnk::smallIconSize()+4 ); 191 btn->setMinimumHeight( AppLnk::smallIconSize()+4 );
188 QWhatsThis::add( btn, tr( "Tap here to create a new entry. Fill in the fields below and then tap on Update." ) ); 192 QWhatsThis::add( btn, tr( "Tap here to create a new entry. Fill in the fields below and then tap on Update." ) );
189 connect( btn, SIGNAL(clicked()), this, SLOT(slotServerNew()) ); 193 connect( btn, SIGNAL(clicked()), this, SLOT(slotServerNew()) );
190 layout->addWidget( btn, 1, 0 ); 194 layout->addWidget( btn, 1, 0 );
191 195
192 m_serverEditBtn = new QPushButton( Opie::Core::OResource::loadPixmap( "edit", Opie::Core::OResource::SmallIcon ), 196 m_serverEditBtn = new QPushButton( Opie::Core::OResource::loadPixmap( "edit", Opie::Core::OResource::SmallIcon ),
193 tr( "Edit" ), container ); 197 tr( "Edit" ), container );
194 m_serverEditBtn->setMinimumHeight( AppLnk::smallIconSize()+4 ); 198 m_serverEditBtn->setMinimumHeight( AppLnk::smallIconSize()+4 );
195 m_serverEditBtn->setEnabled( false ); 199 m_serverEditBtn->setEnabled( false );
196 QWhatsThis::add( m_serverEditBtn, tr( "Tap here to edit the entry selected above." ) ); 200 QWhatsThis::add( m_serverEditBtn, tr( "Tap here to edit the entry selected above." ) );
197 connect( m_serverEditBtn, SIGNAL(clicked()), this, SLOT(slotServerEdit()) ); 201 connect( m_serverEditBtn, SIGNAL(clicked()), this, SLOT(slotServerEdit()) );
198 layout->addWidget( m_serverEditBtn, 1, 1 ); 202 layout->addWidget( m_serverEditBtn, 1, 1 );
199 203
200 m_serverDeleteBtn = new QPushButton( Opie::Core::OResource::loadPixmap( "trash", Opie::Core::OResource::SmallIcon ), 204 m_serverDeleteBtn = new QPushButton( Opie::Core::OResource::loadPixmap( "trash", Opie::Core::OResource::SmallIcon ),
201 tr( "Delete" ), container ); 205 tr( "Delete" ), container );
202 m_serverDeleteBtn->setMinimumHeight( AppLnk::smallIconSize()+4 ); 206 m_serverDeleteBtn->setMinimumHeight( AppLnk::smallIconSize()+4 );
203 m_serverDeleteBtn->setEnabled( false ); 207 m_serverDeleteBtn->setEnabled( false );
204 QWhatsThis::add( m_serverDeleteBtn, tr( "Tap here to delete the entry selected above." ) ); 208 QWhatsThis::add( m_serverDeleteBtn, tr( "Tap here to delete the entry selected above." ) );
205 connect( m_serverDeleteBtn, SIGNAL(clicked()), this, SLOT(slotServerDelete()) ); 209 connect( m_serverDeleteBtn, SIGNAL(clicked()), this, SLOT(slotServerDelete()) );
206 layout->addWidget( m_serverDeleteBtn, 1, 2 ); 210 layout->addWidget( m_serverDeleteBtn, 1, 2 );
207} 211}
208 212
209void OIpkgConfigDlg::initDestinationWidget() 213void OIpkgConfigDlg::initDestinationWidget()
210{ 214{
211 m_destWidget = new QWidget( this ); 215 m_destWidget = new QWidget( this );
212 216
213 // Initialize UI 217 // Initialize UI
214 QVBoxLayout *vb = new QVBoxLayout( m_destWidget ); 218 QVBoxLayout *vb = new QVBoxLayout( m_destWidget );
215 QScrollView *sv = new QScrollView( m_destWidget ); 219 QScrollView *sv = new QScrollView( m_destWidget );
216 vb->addWidget( sv, 0, 0 ); 220 vb->addWidget( sv, 0, 0 );
217 sv->setResizePolicy( QScrollView::AutoOneFit ); 221 sv->setResizePolicy( QScrollView::AutoOneFit );
218 sv->setFrameStyle( QFrame::NoFrame ); 222 sv->setFrameStyle( QFrame::NoFrame );
219 QWidget *container = new QWidget( sv->viewport() ); 223 QWidget *container = new QWidget( sv->viewport() );
220 sv->addChild( container ); 224 sv->addChild( container );
221 QGridLayout *layout = new QGridLayout( container, 2, 3, 2, 4 ); 225 QGridLayout *layout = new QGridLayout( container, 2, 3, 2, 4 );
222 226
223 m_destList = new QListBox( container ); 227 m_destList = new QListBox( container );
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." ) ); 228 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." ) );
225 m_destList->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ) ); 229 m_destList->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ) );
226 connect( m_destList, SIGNAL(highlighted(int)), this, SLOT(slotDestSelected(int)) ); 230 connect( m_destList, SIGNAL(highlighted(int)), this, SLOT(slotDestSelected(int)) );
227 layout->addMultiCellWidget( m_destList, 0, 0, 0, 2 ); 231 layout->addMultiCellWidget( m_destList, 0, 0, 0, 2 );
228 232
229 QPushButton *btn = new QPushButton( Opie::Core::OResource::loadPixmap( "new", Opie::Core::OResource::SmallIcon ), 233 QPushButton *btn = new QPushButton( Opie::Core::OResource::loadPixmap( "new", Opie::Core::OResource::SmallIcon ),
230 tr( "New" ), container ); 234 tr( "New" ), container );
231 btn->setMinimumHeight( AppLnk::smallIconSize()+4 ); 235 btn->setMinimumHeight( AppLnk::smallIconSize()+4 );
232 QWhatsThis::add( btn, tr( "Tap here to create a new entry. Fill in the fields below and then tap on Update." ) ); 236 QWhatsThis::add( btn, tr( "Tap here to create a new entry. Fill in the fields below and then tap on Update." ) );
233 connect( btn, SIGNAL(clicked()), this, SLOT(slotDestNew()) ); 237 connect( btn, SIGNAL(clicked()), this, SLOT(slotDestNew()) );
234 layout->addWidget( btn, 1, 0 ); 238 layout->addWidget( btn, 1, 0 );
235 239
236 m_destEditBtn = new QPushButton( Opie::Core::OResource::loadPixmap( "edit", Opie::Core::OResource::SmallIcon ), 240 m_destEditBtn = new QPushButton( Opie::Core::OResource::loadPixmap( "edit", Opie::Core::OResource::SmallIcon ),
237 tr( "Edit" ), container ); 241 tr( "Edit" ), container );
238 m_destEditBtn->setMinimumHeight( AppLnk::smallIconSize()+4 ); 242 m_destEditBtn->setMinimumHeight( AppLnk::smallIconSize()+4 );
239 m_destEditBtn->setEnabled( false ); 243 m_destEditBtn->setEnabled( false );
240 QWhatsThis::add( m_destEditBtn, tr( "Tap here to edit the entry selected above." ) ); 244 QWhatsThis::add( m_destEditBtn, tr( "Tap here to edit the entry selected above." ) );
241 connect( m_destEditBtn, SIGNAL(clicked()), this, SLOT(slotDestEdit()) ); 245 connect( m_destEditBtn, SIGNAL(clicked()), this, SLOT(slotDestEdit()) );
242 layout->addWidget( m_destEditBtn, 1, 1 ); 246 layout->addWidget( m_destEditBtn, 1, 1 );
243 247
244 m_destDeleteBtn = new QPushButton( Opie::Core::OResource::loadPixmap( "trash", Opie::Core::OResource::SmallIcon ), 248 m_destDeleteBtn = new QPushButton( Opie::Core::OResource::loadPixmap( "trash", Opie::Core::OResource::SmallIcon ),
245 tr( "Delete" ), container ); 249 tr( "Delete" ), container );
246 m_destDeleteBtn->setMinimumHeight( AppLnk::smallIconSize()+4 ); 250 m_destDeleteBtn->setMinimumHeight( AppLnk::smallIconSize()+4 );
247 m_destDeleteBtn->setEnabled( false ); 251 m_destDeleteBtn->setEnabled( false );
248 QWhatsThis::add( m_destDeleteBtn, tr( "Tap here to delete the entry selected above." ) ); 252 QWhatsThis::add( m_destDeleteBtn, tr( "Tap here to delete the entry selected above." ) );
249 connect( m_destDeleteBtn, SIGNAL(clicked()), this, SLOT(slotDestDelete()) ); 253 connect( m_destDeleteBtn, SIGNAL(clicked()), this, SLOT(slotDestDelete()) );
250 layout->addWidget( m_destDeleteBtn, 1, 2 ); 254 layout->addWidget( m_destDeleteBtn, 1, 2 );
251} 255}
252 256
253void OIpkgConfigDlg::initProxyWidget() 257void OIpkgConfigDlg::initProxyWidget()
254{ 258{
255 m_proxyWidget = new QWidget( this ); 259 m_proxyWidget = new QWidget( this );
256 260
257 // Initialize UI 261 // Initialize UI
258 QVBoxLayout *vb = new QVBoxLayout( m_proxyWidget ); 262 QVBoxLayout *vb = new QVBoxLayout( m_proxyWidget );
259 QScrollView *sv = new QScrollView( m_proxyWidget ); 263 QScrollView *sv = new QScrollView( m_proxyWidget );
260 vb->addWidget( sv, 0, 0 ); 264 vb->addWidget( sv, 0, 0 );
261 sv->setResizePolicy( QScrollView::AutoOneFit ); 265 sv->setResizePolicy( QScrollView::AutoOneFit );
262 sv->setFrameStyle( QFrame::NoFrame ); 266 sv->setFrameStyle( QFrame::NoFrame );
263 QWidget *container = new QWidget( sv->viewport() ); 267 QWidget *container = new QWidget( sv->viewport() );
264 sv->addChild( container ); 268 sv->addChild( container );
265 QGridLayout *layout = new QGridLayout( container, 4, 2, 2, 4 ); 269 QGridLayout *layout = new QGridLayout( container, 4, 2, 2, 4 );
266 270
267 // HTTP proxy server configuration 271 // HTTP proxy server configuration
268 QGroupBox *grpbox = new QGroupBox( 0, Qt::Vertical, tr( "HTTP Proxy" ), container ); 272 QGroupBox *grpbox = new QGroupBox( 0, Qt::Vertical, tr( "HTTP Proxy" ), container );
269 grpbox->layout()->setSpacing( 2 ); 273 grpbox->layout()->setSpacing( 2 );
270 grpbox->layout()->setMargin( 4 ); 274 grpbox->layout()->setMargin( 4 );
271 layout->addMultiCellWidget( grpbox, 0, 0, 0, 1 ); 275 layout->addMultiCellWidget( grpbox, 0, 0, 0, 1 );
272 QVBoxLayout *grplayout = new QVBoxLayout( grpbox->layout() ); 276 QVBoxLayout *grplayout = new QVBoxLayout( grpbox->layout() );
273 m_proxyHttpServer = new QLineEdit( grpbox ); 277 m_proxyHttpServer = new QLineEdit( grpbox );
274 QWhatsThis::add( m_proxyHttpServer, tr( "Enter the URL address of the HTTP proxy server here." ) ); 278 QWhatsThis::add( m_proxyHttpServer, tr( "Enter the URL address of the HTTP proxy server here." ) );
275 grplayout->addWidget( m_proxyHttpServer ); 279 grplayout->addWidget( m_proxyHttpServer );
276 m_proxyHttpActive = new QCheckBox( tr( "Enabled" ), grpbox ); 280 m_proxyHttpActive = new QCheckBox( tr( "Enabled" ), grpbox );
277 QWhatsThis::add( m_proxyHttpActive, tr( "Tap here to enable or disable the HTTP proxy server." ) ); 281 QWhatsThis::add( m_proxyHttpActive, tr( "Tap here to enable or disable the HTTP proxy server." ) );
278 grplayout->addWidget( m_proxyHttpActive ); 282 grplayout->addWidget( m_proxyHttpActive );
279 283
280 // FTP proxy server configuration 284 // FTP proxy server configuration
281 grpbox = new QGroupBox( 0, Qt::Vertical, tr( "FTP Proxy" ), container ); 285 grpbox = new QGroupBox( 0, Qt::Vertical, tr( "FTP Proxy" ), container );
282 grpbox->layout()->setSpacing( 2 ); 286 grpbox->layout()->setSpacing( 2 );
283 grpbox->layout()->setMargin( 4 ); 287 grpbox->layout()->setMargin( 4 );
284 layout->addMultiCellWidget( grpbox, 1, 1, 0, 1 ); 288 layout->addMultiCellWidget( grpbox, 1, 1, 0, 1 );
285 grplayout = new QVBoxLayout( grpbox->layout() ); 289 grplayout = new QVBoxLayout( grpbox->layout() );
286 m_proxyFtpServer = new QLineEdit( grpbox ); 290 m_proxyFtpServer = new QLineEdit( grpbox );
287 QWhatsThis::add( m_proxyFtpServer, tr( "Enter the URL address of the FTP proxy server here." ) ); 291 QWhatsThis::add( m_proxyFtpServer, tr( "Enter the URL address of the FTP proxy server here." ) );
288 grplayout->addWidget( m_proxyFtpServer ); 292 grplayout->addWidget( m_proxyFtpServer );
289 m_proxyFtpActive = new QCheckBox( tr( "Enabled" ), grpbox ); 293 m_proxyFtpActive = new QCheckBox( tr( "Enabled" ), grpbox );
290 QWhatsThis::add( m_proxyFtpActive, tr( "Tap here to enable or disable the FTP proxy server." ) ); 294 QWhatsThis::add( m_proxyFtpActive, tr( "Tap here to enable or disable the FTP proxy server." ) );
291 grplayout->addWidget( m_proxyFtpActive ); 295 grplayout->addWidget( m_proxyFtpActive );
292 296
293 // Proxy server username and password configuration 297 // Proxy server username and password configuration
294 QLabel *label = new QLabel( tr( "Username:" ), container ); 298 QLabel *label = new QLabel( tr( "Username:" ), container );
295 QWhatsThis::add( label, tr( "Enter the username for the proxy servers here." ) ); 299 QWhatsThis::add( label, tr( "Enter the username for the proxy servers here." ) );
296 layout->addWidget( label, 2, 0 ); 300 layout->addWidget( label, 2, 0 );
297 m_proxyUsername = new QLineEdit( container ); 301 m_proxyUsername = new QLineEdit( container );
298 QWhatsThis::add( m_proxyUsername, tr( "Enter the username for the proxy servers here." ) ); 302 QWhatsThis::add( m_proxyUsername, tr( "Enter the username for the proxy servers here." ) );
299 layout->addWidget( m_proxyUsername, 2, 1 ); 303 layout->addWidget( m_proxyUsername, 2, 1 );
300 304
301 label = new QLabel( tr( "Password:" ), container ); 305 label = new QLabel( tr( "Password:" ), container );
302 QWhatsThis::add( label, tr( "Enter the password for the proxy servers here." ) ); 306 QWhatsThis::add( label, tr( "Enter the password for the proxy servers here." ) );
303 layout->addWidget( label, 3, 0 ); 307 layout->addWidget( label, 3, 0 );
304 m_proxyPassword = new QLineEdit( container ); 308 m_proxyPassword = new QLineEdit( container );
305 QWhatsThis::add( m_proxyPassword, tr( "Enter the password for the proxy servers here." ) ); 309 QWhatsThis::add( m_proxyPassword, tr( "Enter the password for the proxy servers here." ) );
306 layout->addWidget( m_proxyPassword, 3, 1 ); 310 layout->addWidget( m_proxyPassword, 3, 1 );
307} 311}
308 312
309void OIpkgConfigDlg::initOptionsWidget() 313void OIpkgConfigDlg::initOptionsWidget()
310{ 314{
311 m_optionsWidget = new QWidget( this ); 315 m_optionsWidget = new QWidget( this );
312 316
313 // Initialize UI 317 // Initialize UI
314 QVBoxLayout *vb = new QVBoxLayout( m_optionsWidget ); 318 QVBoxLayout *vb = new QVBoxLayout( m_optionsWidget );
315 QScrollView *sv = new QScrollView( m_optionsWidget ); 319 QScrollView *sv = new QScrollView( m_optionsWidget );
316 vb->addWidget( sv, 0, 0 ); 320 vb->addWidget( sv, 0, 0 );
317 sv->setResizePolicy( QScrollView::AutoOneFit ); 321 sv->setResizePolicy( QScrollView::AutoOneFit );
318 sv->setFrameStyle( QFrame::NoFrame ); 322 sv->setFrameStyle( QFrame::NoFrame );
319 QWidget *container = new QWidget( sv->viewport() ); 323 QWidget *container = new QWidget( sv->viewport() );
320 sv->addChild( container ); 324 sv->addChild( container );
321 QGridLayout *layout = new QGridLayout( container, 8, 2, 2, 4 ); 325 QGridLayout *layout = new QGridLayout( container, 8, 2, 2, 4 );
322 326
323 m_optForceDepends = new QCheckBox( tr( "Force Depends" ), container ); 327 m_optForceDepends = new QCheckBox( tr( "Force Depends" ), container );
324 QWhatsThis::add( m_optForceDepends, tr( "Tap here to enable or disable the '-force-depends' option for Ipkg." ) ); 328 QWhatsThis::add( m_optForceDepends, tr( "Tap here to enable or disable the '-force-depends' option for Ipkg." ) );
325 layout->addMultiCellWidget( m_optForceDepends, 0, 0, 0, 1 ); 329 layout->addMultiCellWidget( m_optForceDepends, 0, 0, 0, 1 );
326 330
327 m_optForceReinstall = new QCheckBox( tr( "Force Reinstall" ), container ); 331 m_optForceReinstall = new QCheckBox( tr( "Force Reinstall" ), container );
328 QWhatsThis::add( m_optForceReinstall, tr( "Tap here to enable or disable the '-force-reinstall' option for Ipkg." ) ); 332 QWhatsThis::add( m_optForceReinstall, tr( "Tap here to enable or disable the '-force-reinstall' option for Ipkg." ) );
329 layout->addMultiCellWidget( m_optForceReinstall, 1, 1, 0, 1 ); 333 layout->addMultiCellWidget( m_optForceReinstall, 1, 1, 0, 1 );
330 334
331 m_optForceRemove = new QCheckBox( tr( "Force Remove" ), container ); 335 m_optForceRemove = new QCheckBox( tr( "Force Remove" ), container );
332 QWhatsThis::add( m_optForceRemove, tr( "Tap here to enable or disable the '-force-removal-of-dependent-packages' option for Ipkg." ) ); 336 QWhatsThis::add( m_optForceRemove, tr( "Tap here to enable or disable the '-force-removal-of-dependent-packages' option for Ipkg." ) );
333 layout->addMultiCellWidget( m_optForceRemove, 2, 2, 0, 1 ); 337 layout->addMultiCellWidget( m_optForceRemove, 2, 2, 0, 1 );
334 338
335 m_optForceOverwrite = new QCheckBox( tr( "Force Overwrite" ), container ); 339 m_optForceOverwrite = new QCheckBox( tr( "Force Overwrite" ), container );
336 QWhatsThis::add( m_optForceOverwrite, tr( "Tap here to enable or disable the '-force-overwrite' option for Ipkg." ) ); 340 QWhatsThis::add( m_optForceOverwrite, tr( "Tap here to enable or disable the '-force-overwrite' option for Ipkg." ) );
337 layout->addMultiCellWidget( m_optForceOverwrite, 3, 3, 0, 1 ); 341 layout->addMultiCellWidget( m_optForceOverwrite, 3, 3, 0, 1 );
338 342
343 m_optForceRecursive = new QCheckBox( tr( "Force Recursive" ), container );
344 QWhatsThis::add( m_optForceRecursive, tr( "Tap here to enable or disable the '-recursive' option for Ipkg." ) );
345 layout->addMultiCellWidget( m_optForceRecursive, 4, 4, 0, 1 );
346
347 m_optVerboseWget = new QCheckBox( tr( "Verbose fetch" ), container );
348 QWhatsThis::add( m_optVerboseWget, tr( "Tap here to enable or disable the '-verbose_wget' option for Ipkg." ) );
349 layout->addMultiCellWidget( m_optVerboseWget, 5, 5, 0, 1 );
350
339 QLabel *l = new QLabel( tr( "Information level:" ), container ); 351 QLabel *l = new QLabel( tr( "Information level:" ), container );
340 QWhatsThis::add( l, tr( "Select information level for Ipkg." ) ); 352 QWhatsThis::add( l, tr( "Select information level for Ipkg." ) );
341 layout->addMultiCellWidget( l, 4, 4, 0, 1 ); 353 layout->addMultiCellWidget( l, 6, 6, 0, 1 );
342 354
343 m_optVerboseIpkg = new QComboBox( container ); 355 m_optVerboseIpkg = new QComboBox( container );
344 QWhatsThis::add( m_optVerboseIpkg, tr( "Select information level for Ipkg." ) ); 356 QWhatsThis::add( m_optVerboseIpkg, tr( "Select information level for Ipkg." ) );
345 m_optVerboseIpkg->insertItem( tr( "Errors only" ) ); 357 m_optVerboseIpkg->insertItem( tr( "Errors only" ) );
346 m_optVerboseIpkg->insertItem( tr( "Normal messages" ) ); 358 m_optVerboseIpkg->insertItem( tr( "Normal messages" ) );
347 m_optVerboseIpkg->insertItem( tr( "Informative messages" ) ); 359 m_optVerboseIpkg->insertItem( tr( "Informative messages" ) );
348 m_optVerboseIpkg->insertItem( tr( "Troubleshooting output" ) ); 360 m_optVerboseIpkg->insertItem( tr( "Troubleshooting output" ) );
349 layout->addMultiCellWidget( m_optVerboseIpkg, 5, 5, 0, 1 ); 361 layout->addMultiCellWidget( m_optVerboseIpkg, 7, 7, 0, 1 );
350 362
351 l = new QLabel( tr( "Package source lists directory:" ), container ); 363 l = new QLabel( tr( "Package source lists directory:" ), container );
352 QWhatsThis::add( l, tr( "Enter the directory where package source feed information is stored." ) ); 364 QWhatsThis::add( l, tr( "Enter the directory where package source feed information is stored." ) );
353 layout->addMultiCellWidget( l, 6, 6, 0, 1 ); 365 layout->addMultiCellWidget( l, 8, 8, 0, 1 );
354 366
355 m_optSourceLists = new QLineEdit( container ); 367 m_optSourceLists = new QLineEdit( container );
356 QWhatsThis::add( m_optSourceLists, tr( "Enter the directory where package source feed information is stored." ) ); 368 QWhatsThis::add( m_optSourceLists, tr( "Enter the directory where package source feed information is stored." ) );
357 layout->addWidget( m_optSourceLists, 7, 0 ); 369 layout->addWidget( m_optSourceLists, 9, 0 );
358 370
359 QPushButton *btn = new QPushButton( Opie::Core::OResource::loadPixmap( "folder", Opie::Core::OResource::SmallIcon ), 371 QPushButton *btn = new QPushButton( Opie::Core::OResource::loadPixmap( "folder", Opie::Core::OResource::SmallIcon ),
360 QString::null, container ); 372 QString::null, container );
361 btn->setMinimumHeight( AppLnk::smallIconSize()+4 ); 373 btn->setMinimumHeight( AppLnk::smallIconSize()+4 );
362 btn->setMaximumWidth( btn->height() ); 374 btn->setMaximumWidth( btn->height() );
363 QWhatsThis::add( btn, tr( "Tap here to select the directory where package source feed information is stored." ) ); 375 QWhatsThis::add( btn, tr( "Tap here to select the directory where package source feed information is stored." ) );
364 connect( btn, SIGNAL(clicked()), this, SLOT(slotOptSelectSourceListsPath()) ); 376 connect( btn, SIGNAL(clicked()), this, SLOT(slotOptSelectSourceListsPath()) );
365 layout->addWidget( btn, 7, 1 ); 377 layout->addWidget( btn, 9, 1 );
366 378
367 layout->addItem( new QSpacerItem( 1, 1, QSizePolicy::Minimum, QSizePolicy::Expanding ) ); 379 layout->addItem( new QSpacerItem( 1, 1, QSizePolicy::Minimum, QSizePolicy::Expanding ) );
368} 380}
369 381
370void OIpkgConfigDlg::initData() 382void OIpkgConfigDlg::initData()
371{ 383{
372 // Read ipkg configuration (server/destination/proxy) information 384 // Read ipkg configuration (server/destination/proxy) information
373 if ( m_ipkg && !m_installOptions ) 385 if ( m_ipkg && !m_installOptions )
374 { 386 {
375 m_configs = m_ipkg->configItems(); 387 m_configs = m_ipkg->configItems();
376 if ( m_configs ) 388 if ( m_configs )
377 { 389 {
378 for ( OConfItemListIterator configIt( *m_configs ); configIt.current(); ++configIt ) 390 for ( OConfItemListIterator configIt( *m_configs ); configIt.current(); ++configIt )
379 { 391 {
380 OConfItem *config = configIt.current(); 392 OConfItem *config = configIt.current();
381 393
382 // Add configuration item to the appropriate dialog controls 394 // Add configuration item to the appropriate dialog controls
383 if ( config ) 395 if ( config )
384 { 396 {
385 switch ( config->type() ) 397 switch ( config->type() )
386 { 398 {
387 case OConfItem::Source : m_serverList->insertItem( config->name() ); break; 399 case OConfItem::Source : m_serverList->insertItem( config->name() ); break;
388 case OConfItem::Destination : m_destList->insertItem( config->name() ); break; 400 case OConfItem::Destination : m_destList->insertItem( config->name() ); break;
389 case OConfItem::Option : 401 case OConfItem::Option :
390 { 402 {
391 if ( config->name() == "http_proxy" ) 403 if ( config->name() == "http_proxy" )
392 { 404 {
393 m_proxyHttpServer->setText( config->value() ); 405 m_proxyHttpServer->setText( config->value() );
394 m_proxyHttpActive->setChecked( config->active() ); 406 m_proxyHttpActive->setChecked( config->active() );
395 } 407 }
396 else if ( config->name() == "ftp_proxy" ) 408 else if ( config->name() == "ftp_proxy" )
397 { 409 {
398 m_proxyFtpServer->setText( config->value() ); 410 m_proxyFtpServer->setText( config->value() );
399 m_proxyFtpActive->setChecked( config->active() ); 411 m_proxyFtpActive->setChecked( config->active() );
400 } 412 }
401 else if ( config->name() == "proxy_username" ) 413 else if ( config->name() == "proxy_username" )
402 { 414 {
403 m_proxyUsername->setText( config->value() ); 415 m_proxyUsername->setText( config->value() );
404 } 416 }
405 else if ( config->name() == "proxy_password" ) 417 else if ( config->name() == "proxy_password" )
406 { 418 {
407 m_proxyPassword->setText( config->value() ); 419 m_proxyPassword->setText( config->value() );
408 } 420 }
409 } 421 }
410 break; 422 break;
411 case OConfItem::Other : 423 case OConfItem::Other :
412 { 424 {
413 if ( config->name() == "lists_dir" ) 425 if ( config->name() == "lists_dir" )
414 m_optSourceLists->setText( config->value() ); 426 m_optSourceLists->setText( config->value() );
415 else // TODO - use proper libipkg define 427 else // TODO - use proper libipkg define
416 m_optSourceLists->setText( "/usr/lib/ipkg/lists" ); 428 m_optSourceLists->setText( "/usr/lib/ipkg/lists" );
417 } 429 }
418 break; 430 break;
419 default : break; 431 default : break;
420 }; 432 };
421 } 433 }
422 } 434 }
423 } 435 }
424 } 436 }
425 437
426 // Get Ipkg execution options 438 // Get Ipkg execution options
427 int options = m_ipkg->ipkgExecOptions(); 439 int options = m_ipkg->ipkgExecOptions();
428 if ( options & FORCE_DEPENDS ) 440 if ( options & FORCE_DEPENDS )
429 m_optForceDepends->setChecked( true ); 441 m_optForceDepends->setChecked( true );
430 if ( options & FORCE_REINSTALL ) 442 if ( options & FORCE_REINSTALL )
431 m_optForceReinstall->setChecked( true ); 443 m_optForceReinstall->setChecked( true );
432 if ( options & FORCE_REMOVE ) 444 if ( options & FORCE_REMOVE )
433 m_optForceRemove->setChecked( true ); 445 m_optForceRemove->setChecked( true );
434 if ( options & FORCE_OVERWRITE ) 446 if ( options & FORCE_OVERWRITE )
435 m_optForceOverwrite->setChecked( true ); 447 m_optForceOverwrite->setChecked( true );
448 if ( options & FORCE_RECURSIVE )
449 m_optForceRecursive->setChecked( true );
450 if ( options & FORCE_VERBOSE_WGET )
451 m_optVerboseWget->setChecked( true );
436 452
437 m_optVerboseIpkg->setCurrentItem( m_ipkg->ipkgExecVerbosity() ); 453 m_optVerboseIpkg->setCurrentItem( m_ipkg->ipkgExecVerbosity() );
438} 454}
439 455
440void OIpkgConfigDlg::slotServerSelected( int index ) 456void OIpkgConfigDlg::slotServerSelected( int index )
441{ 457{
442 m_serverCurrent = index; 458 m_serverCurrent = index;
443 459
444 // Enable Edit and Delete buttons 460 // Enable Edit and Delete buttons
445 m_serverEditBtn->setEnabled( true ); 461 m_serverEditBtn->setEnabled( true );
446 m_serverDeleteBtn->setEnabled( true ); 462 m_serverDeleteBtn->setEnabled( true );
447} 463}
448 464
449void OIpkgConfigDlg::slotServerNew() 465void OIpkgConfigDlg::slotServerNew()
450{ 466{
451 OConfItem *server = new OConfItem( OConfItem::Source ); 467 OConfItem *server = new OConfItem( OConfItem::Source );
452 468
453 OIpkgServerDlg dlg( server, this ); 469 OIpkgServerDlg dlg( server, this );
454 if ( QPEApplication::execDialog( &dlg ) == QDialog::Accepted ) 470 if ( QPEApplication::execDialog( &dlg ) == QDialog::Accepted )
455 { 471 {
456 // Add to configuration option list 472 // Add to configuration option list
457 m_configs->append( server ); 473 m_configs->append( server );
458 m_configs->sort(); 474 m_configs->sort();
459 475
460 // Add to server list 476 // Add to server list
461 m_serverList->insertItem( server->name() ); 477 m_serverList->insertItem( server->name() );
462 m_serverList->setCurrentItem( m_serverList->count() ); 478 m_serverList->setCurrentItem( m_serverList->count() );
463 } 479 }
464 else 480 else
465 delete server; 481 delete server;
466} 482}
467 483
468void OIpkgConfigDlg::slotServerEdit() 484void OIpkgConfigDlg::slotServerEdit()
469{ 485{
470 // Find selected server in list 486 // Find selected server in list
471 OConfItem *server = m_ipkg->findConfItem( OConfItem::Source, m_serverList->currentText() ); 487 OConfItem *server = m_ipkg->findConfItem( OConfItem::Source, m_serverList->currentText() );
472 488
473 // Edit server 489 // Edit server
474 if ( server ) 490 if ( server )
475 { 491 {
476 QString origName = server->name(); 492 QString origName = server->name();
477 OIpkgServerDlg dlg( server, this ); 493 OIpkgServerDlg dlg( server, this );
478 if ( QPEApplication::execDialog( &dlg ) == QDialog::Accepted ) 494 if ( QPEApplication::execDialog( &dlg ) == QDialog::Accepted )
479 { 495 {
480 // Check to see if name has changed, if so update the server list 496 // Check to see if name has changed, if so update the server list
481 if ( server->name() != origName ) 497 if ( server->name() != origName )
482 m_serverList->changeItem( server->name(), m_serverCurrent ); 498 m_serverList->changeItem( server->name(), m_serverCurrent );
483 } 499 }
484 } 500 }
485} 501}
486 502
487void OIpkgConfigDlg::slotServerDelete() 503void OIpkgConfigDlg::slotServerDelete()
488{ 504{
489 // Find selected server in list 505 // Find selected server in list
490 OConfItem *server = m_ipkg->findConfItem( OConfItem::Source, m_serverList->currentText() ); 506 OConfItem *server = m_ipkg->findConfItem( OConfItem::Source, m_serverList->currentText() );
491 507
492 // Delete server 508 // Delete server
493 if ( server ) 509 if ( server )
494 { 510 {
495 m_configs->removeRef( server ); 511 m_configs->removeRef( server );
496 m_serverList->removeItem( m_serverCurrent ); 512 m_serverList->removeItem( m_serverCurrent );
497 } 513 }
498} 514}
499 515
500void OIpkgConfigDlg::slotDestSelected( int index ) 516void OIpkgConfigDlg::slotDestSelected( int index )
501{ 517{
502 m_destCurrent = index; 518 m_destCurrent = index;
503 519
504 // Enable Edit and Delete buttons 520 // Enable Edit and Delete buttons
505 m_destEditBtn->setEnabled( true ); 521 m_destEditBtn->setEnabled( true );
506 m_destDeleteBtn->setEnabled( true ); 522 m_destDeleteBtn->setEnabled( true );
507} 523}
508 524
509void OIpkgConfigDlg::slotDestNew() 525void OIpkgConfigDlg::slotDestNew()
510{ 526{
511 OConfItem *dest = new OConfItem( OConfItem::Destination ); 527 OConfItem *dest = new OConfItem( OConfItem::Destination );
512 528
513 OIpkgDestDlg dlg( dest, this ); 529 OIpkgDestDlg dlg( dest, this );
514 if ( QPEApplication::execDialog( &dlg ) == QDialog::Accepted ) 530 if ( QPEApplication::execDialog( &dlg ) == QDialog::Accepted )
515 { 531 {
516 // Add to configuration option list 532 // Add to configuration option list
517 m_configs->append( dest ); 533 m_configs->append( dest );
518 m_configs->sort(); 534 m_configs->sort();
519 535
520 // Add to destination list 536 // Add to destination list
521 m_destList->insertItem( dest->name() ); 537 m_destList->insertItem( dest->name() );
522 m_destList->setCurrentItem( m_destList->count() ); 538 m_destList->setCurrentItem( m_destList->count() );
523 } 539 }
524 else 540 else
525 delete dest; 541 delete dest;
526} 542}
527 543
528void OIpkgConfigDlg::slotDestEdit() 544void OIpkgConfigDlg::slotDestEdit()
529{ 545{
530 // Find selected destination in list 546 // Find selected destination in list
531 OConfItem *dest = m_ipkg->findConfItem( OConfItem::Destination, m_destList->currentText() ); 547 OConfItem *dest = m_ipkg->findConfItem( OConfItem::Destination, m_destList->currentText() );
532 548
533 // Edit destination 549 // Edit destination
534 if ( dest ) 550 if ( dest )
535 { 551 {
536 QString origName = dest->name(); 552 QString origName = dest->name();
537 OIpkgDestDlg dlg( dest, this ); 553 OIpkgDestDlg dlg( dest, this );
538 if ( QPEApplication::execDialog( &dlg ) == QDialog::Accepted ) 554 if ( QPEApplication::execDialog( &dlg ) == QDialog::Accepted )
539 { 555 {
540 // Check to see if name has changed, if so update the dest list 556 // Check to see if name has changed, if so update the dest list
541 if ( dest->name() != origName ) 557 if ( dest->name() != origName )
542 m_destList->changeItem( dest->name(), m_destCurrent ); 558 m_destList->changeItem( dest->name(), m_destCurrent );
543 } 559 }
544 } 560 }
545} 561}
546 562
547void OIpkgConfigDlg::slotDestDelete() 563void OIpkgConfigDlg::slotDestDelete()
548{ 564{
549 // Find selected destination in list 565 // Find selected destination in list
550 OConfItem *destination = m_ipkg->findConfItem( OConfItem::Destination, m_destList->currentText() ); 566 OConfItem *destination = m_ipkg->findConfItem( OConfItem::Destination, m_destList->currentText() );
551 567
552 // Delete destination 568 // Delete destination
553 if ( destination ) 569 if ( destination )
554 { 570 {
555 m_configs->removeRef( destination ); 571 m_configs->removeRef( destination );
556 m_destList->removeItem( m_destCurrent ); 572 m_destList->removeItem( m_destCurrent );
557 } 573 }
558} 574}
559 575
560void OIpkgConfigDlg::slotOptSelectSourceListsPath() 576void OIpkgConfigDlg::slotOptSelectSourceListsPath()
561{ 577{
562 QString path = Opie::Ui::OFileDialog::getDirectory( 0, m_optSourceLists->text() ); 578 QString path = Opie::Ui::OFileDialog::getDirectory( 0, m_optSourceLists->text() );
563 if ( path.at( path.length() - 1 ) == '/' ) 579 if ( path.at( path.length() - 1 ) == '/' )
diff --git a/noncore/settings/packagemanager/oipkgconfigdlg.h b/noncore/settings/packagemanager/oipkgconfigdlg.h
index 88381ab..36ab9a0 100644
--- a/noncore/settings/packagemanager/oipkgconfigdlg.h
+++ b/noncore/settings/packagemanager/oipkgconfigdlg.h
@@ -1,165 +1,167 @@
1/* 1/*
2                 This file is part of the Opie Project 2                 This file is part of the Opie Project
3 3
4 Copyright (C)2004, 2005 Dan Williams <drw@handhelds.org> 4 Copyright (C)2004, 2005 Dan Williams <drw@handhelds.org>
5 =. 5 =.
6 .=l. 6 .=l.
7           .>+-= 7           .>+-=
8 _;:,     .>    :=|. This program is free software; you can 8 _;:,     .>    :=|. This program is free software; you can
9.> <`_,   >  .   <= redistribute it and/or modify it under 9.> <`_,   >  .   <= redistribute it and/or modify it under
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#ifndef OIPKGCONFIGDLG_H 31#ifndef OIPKGCONFIGDLG_H
32#define OIPKGCONFIGDLG_H 32#define OIPKGCONFIGDLG_H
33 33
34#include <opie2/otabwidget.h> 34#include <opie2/otabwidget.h>
35 35
36#include <qdialog.h> 36#include <qdialog.h>
37#include <qlayout.h> 37#include <qlayout.h>
38 38
39#include "oipkg.h" 39#include "oipkg.h"
40 40
41class QCheckBox; 41class QCheckBox;
42class QComboBox; 42class QComboBox;
43class QLineEdit; 43class QLineEdit;
44class QListBox; 44class QListBox;
45class QPushButton; 45class QPushButton;
46 46
47class OIpkgConfigDlg : public QDialog 47class OIpkgConfigDlg : public QDialog
48{ 48{
49 Q_OBJECT 49 Q_OBJECT
50 50
51public: 51public:
52 OIpkgConfigDlg( OIpkg *ipkg = 0l, bool installOptions = false, QWidget *parent = 0l ); 52 OIpkgConfigDlg( OIpkg *ipkg = 0l, bool installOptions = false, QWidget *parent = 0l );
53 53
54protected slots: 54protected slots:
55 void accept(); 55 void accept();
56 void reject(); 56 void reject();
57 57
58private: 58private:
59 OIpkg *m_ipkg; // Pointer to Ipkg class for retrieving/saving configuration options 59 OIpkg *m_ipkg; // Pointer to Ipkg class for retrieving/saving configuration options
60 OConfItemList *m_configs; // Local list of configuration items 60 OConfItemList *m_configs; // Local list of configuration items
61 61
62 bool m_installOptions; // If true, will only display the Options tab 62 bool m_installOptions; // If true, will only display the Options tab
63 63
64 // Server/Destination cached information 64 // Server/Destination cached information
65 int m_serverCurrent; // Index of currently selected server in m_serverList 65 int m_serverCurrent; // Index of currently selected server in m_serverList
66 int m_destCurrent; // Index of currently selected destination in m_destList 66 int m_destCurrent; // Index of currently selected destination in m_destList
67 67
68 // UI controls 68 // UI controls
69 QVBoxLayout m_layout; // Main dialog layout control 69 QVBoxLayout m_layout; // Main dialog layout control
70 Opie::Ui::OTabWidget m_tabWidget; // Main tab widget control 70 Opie::Ui::OTabWidget m_tabWidget; // Main tab widget control
71 QWidget *m_serverWidget; // Widget containing server configuration controls 71 QWidget *m_serverWidget; // Widget containing server configuration controls
72 QWidget *m_destWidget; // Widget containing destination configuration controls 72 QWidget *m_destWidget; // Widget containing destination configuration controls
73 QWidget *m_proxyWidget; // Widget containing proxy configuration controls 73 QWidget *m_proxyWidget; // Widget containing proxy configuration controls
74 QWidget *m_optionsWidget; // Widget containing ipkg execution configuration controls 74 QWidget *m_optionsWidget; // Widget containing ipkg execution configuration controls
75 75
76 // Server configuration UI controls 76 // Server configuration UI controls
77 QListBox *m_serverList; // Server list selection 77 QListBox *m_serverList; // Server list selection
78 QPushButton *m_serverEditBtn; // Server edit button 78 QPushButton *m_serverEditBtn; // Server edit button
79 QPushButton *m_serverDeleteBtn; // Server edit button 79 QPushButton *m_serverDeleteBtn; // Server edit button
80 80
81 // Destination configuration UI controls 81 // Destination configuration UI controls
82 QListBox *m_destList; // Destination list selection 82 QListBox *m_destList; // Destination list selection
83 QPushButton *m_destEditBtn; // Destination edit button 83 QPushButton *m_destEditBtn; // Destination edit button
84 QPushButton *m_destDeleteBtn; // Destination edit button 84 QPushButton *m_destDeleteBtn; // Destination edit button
85 85
86 // Proxy server configuration UI controls 86 // Proxy server configuration UI controls
87 QLineEdit *m_proxyHttpServer; // HTTP proxy server URL edit box 87 QLineEdit *m_proxyHttpServer; // HTTP proxy server URL edit box
88 QCheckBox *m_proxyHttpActive; // Activate HTTP proxy check box 88 QCheckBox *m_proxyHttpActive; // Activate HTTP proxy check box
89 QLineEdit *m_proxyFtpServer; // FTP proxy server edit box 89 QLineEdit *m_proxyFtpServer; // FTP proxy server edit box
90 QCheckBox *m_proxyFtpActive; // Activate FTP proxy check box 90 QCheckBox *m_proxyFtpActive; // Activate FTP proxy check box
91 QLineEdit *m_proxyUsername; // Proxy server username edit box 91 QLineEdit *m_proxyUsername; // Proxy server username edit box
92 QLineEdit *m_proxyPassword; // Proxy server password edit box 92 QLineEdit *m_proxyPassword; // Proxy server password edit box
93 93
94 // Options configuration UI controls 94 // Options configuration UI controls
95 QCheckBox *m_optForceDepends; // Force depends ipkg option checkbox 95 QCheckBox *m_optForceDepends; // Force depends ipkg option checkbox
96 QCheckBox *m_optForceReinstall; // Force reinstall ipkg option checkbox 96 QCheckBox *m_optForceReinstall; // Force reinstall ipkg option checkbox
97 QCheckBox *m_optForceRemove; // Force remove ipkg option checkbox 97 QCheckBox *m_optForceRemove; // Force remove ipkg option checkbox
98 QCheckBox *m_optForceOverwrite; // Force overwrite ipkg option checkbox 98 QCheckBox *m_optForceOverwrite; // Force overwrite ipkg option checkbox
99 QCheckBox *m_optForceRecursive; // Force recursive ipkg option checkbox
100 QCheckBox *m_optVerboseWget; // Force verbose_wget ipkg option checkbox
99 QComboBox *m_optVerboseIpkg; // Ipkg verbosity option selection 101 QComboBox *m_optVerboseIpkg; // Ipkg verbosity option selection
100 QLineEdit *m_optSourceLists; // Ipkg source lists destination directory 102 QLineEdit *m_optSourceLists; // Ipkg source lists destination directory
101 103
102 void initServerWidget(); 104 void initServerWidget();
103 void initDestinationWidget(); 105 void initDestinationWidget();
104 void initProxyWidget(); 106 void initProxyWidget();
105 void initOptionsWidget(); 107 void initOptionsWidget();
106 108
107 void initData(); 109 void initData();
108 110
109private slots: 111private slots:
110 void slotServerSelected( int index ); 112 void slotServerSelected( int index );
111 void slotServerNew(); 113 void slotServerNew();
112 void slotServerEdit(); 114 void slotServerEdit();
113 void slotServerDelete(); 115 void slotServerDelete();
114 116
115 void slotDestSelected( int index ); 117 void slotDestSelected( int index );
116 void slotDestNew(); 118 void slotDestNew();
117 void slotDestEdit(); 119 void slotDestEdit();
118 void slotDestDelete(); 120 void slotDestDelete();
119 121
120 void slotOptSelectSourceListsPath(); 122 void slotOptSelectSourceListsPath();
121}; 123};
122 124
123class OIpkgServerDlg : public QDialog 125class OIpkgServerDlg : public QDialog
124{ 126{
125 Q_OBJECT 127 Q_OBJECT
126 128
127public: 129public:
128 OIpkgServerDlg( OConfItem *server = 0l, QWidget *parent = 0l ); 130 OIpkgServerDlg( OConfItem *server = 0l, QWidget *parent = 0l );
129 131
130protected slots: 132protected slots:
131 void accept(); 133 void accept();
132 134
133private: 135private:
134 OConfItem *m_server; 136 OConfItem *m_server;
135 137
136 // UI controls 138 // UI controls
137 QLineEdit *m_name; // Server name edit box 139 QLineEdit *m_name; // Server name edit box
138 QLineEdit *m_location; // Server location URL edit box 140 QLineEdit *m_location; // Server location URL edit box
139 QCheckBox *m_compressed; // Indicates whether the server is a 'src/gz' feed 141 QCheckBox *m_compressed; // Indicates whether the server is a 'src/gz' feed
140 QCheckBox *m_active; // Indicates whether the server is activated 142 QCheckBox *m_active; // Indicates whether the server is activated
141}; 143};
142 144
143class OIpkgDestDlg : public QDialog 145class OIpkgDestDlg : public QDialog
144{ 146{
145 Q_OBJECT 147 Q_OBJECT
146 148
147public: 149public:
148 OIpkgDestDlg( OConfItem *dest = 0l, QWidget *parent = 0l ); 150 OIpkgDestDlg( OConfItem *dest = 0l, QWidget *parent = 0l );
149 151
150protected slots: 152protected slots:
151 void accept(); 153 void accept();
152 154
153private: 155private:
154 OConfItem *m_dest; 156 OConfItem *m_dest;
155 157
156 // UI controls 158 // UI controls
157 QLineEdit *m_name; // Destination name edit box 159 QLineEdit *m_name; // Destination name edit box
158 QLineEdit *m_location; // Destination location URL edit box 160 QLineEdit *m_location; // Destination location URL edit box
159 QCheckBox *m_active; // Indicates whether the destination is activated 161 QCheckBox *m_active; // Indicates whether the destination is activated
160 162
161private slots: 163private slots:
162 void slotSelectPath(); 164 void slotSelectPath();
163}; 165};
164 166
165#endif 167#endif