author | hrw <hrw> | 2006-01-16 15:07:34 (UTC) |
---|---|---|
committer | hrw <hrw> | 2006-01-16 15:07:34 (UTC) |
commit | 50b379b4637c80273b6f5397c9c20db78410f125 (patch) (unidiff) | |
tree | 13ebc10d48900beaa44450f94a710736420179b9 | |
parent | 2664267708d5ed695151bf0ec9376080e7bf617e (diff) | |
download | opie-50b379b4637c80273b6f5397c9c20db78410f125.zip opie-50b379b4637c80273b6f5397c9c20db78410f125.tar.gz opie-50b379b4637c80273b6f5397c9c20db78410f125.tar.bz2 |
opie-packagemanager: added two options
- "Force resursive" for -recursive ipkg option
- "Verbose fetch" for -verbose_wget ipkg option
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | noncore/settings/packagemanager/oipkg.cpp | 2 | ||||
-rw-r--r-- | noncore/settings/packagemanager/oipkg.h | 2 | ||||
-rw-r--r-- | noncore/settings/packagemanager/oipkgconfigdlg.cpp | 26 | ||||
-rw-r--r-- | noncore/settings/packagemanager/oipkgconfigdlg.h | 2 |
5 files changed, 28 insertions, 5 deletions
@@ -1,347 +1,348 @@ | |||
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) |
136 | * n.a. - PackageManager - fixed where last package in status file was not shown as installed when it should be (drw) | 137 | * n.a. - PackageManager - fixed where last package in status file was not shown as installed when it should be (drw) |
137 | * n.a. - PackageManager - fixed bug where lists_dir was not being honored at startup (drw) | 138 | * n.a. - PackageManager - fixed bug where lists_dir was not being honored at startup (drw) |
138 | * n.a. - PackageManager - provided default value for lists_dir when none is entered in configuration dialog (drw) | 139 | * n.a. - PackageManager - provided default value for lists_dir when none is entered in configuration dialog (drw) |
139 | * n.a. - OTabWidget - fixed scroll buttons, fix display position of tabs (drw) | 140 | * n.a. - OTabWidget - fixed scroll buttons, fix display position of tabs (drw) |
140 | * n.a. - AddressBook - fixed sorting by 'File As' name (drw) | 141 | * n.a. - AddressBook - fixed sorting by 'File As' name (drw) |
141 | * n.a. - AddressBook - fixed category handling for 'All' and 'Unfiled' (eilers) | 142 | * n.a. - AddressBook - fixed category handling for 'All' and 'Unfiled' (eilers) |
142 | * n.a. - AddressBook - fixed letter picker record selection and sort records afterwards (drw) | 143 | * n.a. - AddressBook - fixed letter picker record selection and sort records afterwards (drw) |
143 | 144 | ||
144 | Internal | 145 | Internal |
145 | -------- | 146 | -------- |
146 | * Worked around bug in Qt/Embedded 2.3.10: qt_version() returns 231 (mickeyl) | 147 | * Worked around bug in Qt/Embedded 2.3.10: qt_version() returns 231 (mickeyl) |
147 | * Killed the need for weak symbols in QtE (zecke) | 148 | * Killed the need for weak symbols in QtE (zecke) |
148 | * Added optional building libqpe without inline images (mickeyl) | 149 | * Added optional building libqpe without inline images (mickeyl) |
149 | * OColorButton - fixed so does not emit a colorSelected signal inside of resizeEvent (drw) | 150 | * OColorButton - fixed so does not emit a colorSelected signal inside of resizeEvent (drw) |
150 | 151 | ||
151 | 2005-02-03Opie 1.1.9 | 152 | 2005-02-03Opie 1.1.9 |
152 | 153 | ||
153 | New Features | 154 | New Features |
154 | ------------ | 155 | ------------ |
155 | * Number of icon columns in Launcher is customizable through Launcher.conf (hrw,zecke,mickeyl) | 156 | * Number of icon columns in Launcher is customizable through Launcher.conf (hrw,zecke,mickeyl) |
156 | * Number of icon columns in Launcher is customizable through LauncherSettings (mickeyl) | 157 | * Number of icon columns in Launcher is customizable through LauncherSettings (mickeyl) |
157 | * Usability enhancements in OpieIRC (skyhusker) | 158 | * Usability enhancements in OpieIRC (skyhusker) |
158 | 159 | ||
159 | Fixed Bugs | 160 | Fixed Bugs |
160 | ---------- | 161 | ---------- |
161 | * #1501 - Fixed bug in todo sql backend (eilers) | 162 | * #1501 - Fixed bug in todo sql backend (eilers) |
162 | * #1505 - Added more Swap sizes in memoryapplet (mickeyl) | 163 | * #1505 - Added more Swap sizes in memoryapplet (mickeyl) |
163 | * #1525 - Hopefully fixed double alarms and not removing alarms set with the Clock application (zecke) | 164 | * #1525 - Hopefully fixed double alarms and not removing alarms set with the Clock application (zecke) |
164 | * #1533 - Security Owner Dialog (shown in case of unsuccessfull authentiacation) wasn't able to display information in non latin1 encoding (zecke) | 165 | * #1533 - Security Owner Dialog (shown in case of unsuccessfull authentiacation) wasn't able to display information in non latin1 encoding (zecke) |
165 | * n.a. - Removed hard coded font sizes in a couple of inputmethods (mickeyl) | 166 | * n.a. - Removed hard coded font sizes in a couple of inputmethods (mickeyl) |
166 | * n.a. - Removed MediumDlg appearing prior to FirstUsage wizard (i.e. calibration) (mickeyl) | 167 | * n.a. - Removed MediumDlg appearing prior to FirstUsage wizard (i.e. calibration) (mickeyl) |
167 | * n.a. - Fixed numerous buglets in OpieIRC (skyhusker) | 168 | * n.a. - Fixed numerous buglets in OpieIRC (skyhusker) |
168 | 169 | ||
169 | Internal | 170 | Internal |
170 | -------- | 171 | -------- |
171 | * Added the Qtopia 1.7 SDK macros for quick-apps to easa compilation of 3rd party apps against our headers (mickeyl) | 172 | * Added the Qtopia 1.7 SDK macros for quick-apps to easa compilation of 3rd party apps against our headers (mickeyl) |
172 | * You can now use the Opie build system in combination with a OpenEmbedded staging area which makes a nice cross development environment (mickeyl) | 173 | * You can now use the Opie build system in combination with a OpenEmbedded staging area which makes a nice cross development environment (mickeyl) |
173 | * Made Opie compilable with Qt/Embedded 2.3.10 (ar) | 174 | * Made Opie compilable with Qt/Embedded 2.3.10 (ar) |
174 | * Changed Launcher to get default orientation from ODevice w/ QWS_DISPLAY overriding (mickeyl) | 175 | * Changed Launcher to get default orientation from ODevice w/ QWS_DISPLAY overriding (mickeyl) |
175 | * Build tree cleanups (mickeyl) | 176 | * Build tree cleanups (mickeyl) |
176 | 177 | ||
177 | 2004-11-26Opie 1.1.8 | 178 | 2004-11-26Opie 1.1.8 |
178 | 179 | ||
179 | New Features | 180 | New Features |
180 | ------------ | 181 | ------------ |
181 | * PackageManager supports installation of local ipkg files (drw) | 182 | * PackageManager supports installation of local ipkg files (drw) |
182 | * PackageManager supports linking of applications to root (drw) | 183 | * PackageManager supports linking of applications to root (drw) |
183 | * PackageManager supports src/gz feeds (drw,wimpie) | 184 | * PackageManager supports src/gz feeds (drw,wimpie) |
184 | * Added a syslog information tab to sysinfo (mickeyl) | 185 | * Added a syslog information tab to sysinfo (mickeyl) |
185 | * Added new, more consistent, PIM icons + a GIMP teplate (ar) | 186 | * Added new, more consistent, PIM icons + a GIMP teplate (ar) |
186 | 187 | ||
187 | Fixed Bugs | 188 | Fixed Bugs |
188 | ---------- | 189 | ---------- |
189 | * #1017 - Tetrix doesn't display correctly for high resolution screens (drw) | 190 | * #1017 - Tetrix doesn't display correctly for high resolution screens (drw) |
190 | * #1269 - VCards were imported into personal area if it was activated (eilers) | 191 | * #1269 - VCards were imported into personal area if it was activated (eilers) |
191 | * #1464 - Packagemanager dont set active filter after install a package (drw) | 192 | * #1464 - Packagemanager dont set active filter after install a package (drw) |
192 | * #1479 - Improved VCard-Parser to import VCards created by Evolution 2 and Apple Addressbook (eilers) | 193 | * #1479 - Improved VCard-Parser to import VCards created by Evolution 2 and Apple Addressbook (eilers) |
193 | * #1493 - Fixed one column layout bug of the launcher (hrw) | 194 | * #1493 - Fixed one column layout bug of the launcher (hrw) |
194 | * n.a. - PackageManager - (Minor UI tweak) in filter dialog, when option is enabled, set focus to widget that corresponds to that option (drw) | 195 | * n.a. - PackageManager - (Minor UI tweak) in filter dialog, when option is enabled, set focus to widget that corresponds to that option (drw) |
195 | * n.a. - PackageManager - (Minor UI tweak) fix double entry in source feed configuration when adding a new feed (drw) | 196 | * n.a. - PackageManager - (Minor UI tweak) fix double entry in source feed configuration when adding a new feed (drw) |
196 | * n.a. - Battery Applet - fix sizing of battery info popup (drw,mickeyl) | 197 | * n.a. - Battery Applet - fix sizing of battery info popup (drw,mickeyl) |
197 | 198 | ||
198 | Internal | 199 | Internal |
199 | -------- | 200 | -------- |
200 | * Moved libopie1 to unsupported (mickeyl) | 201 | * Moved libopie1 to unsupported (mickeyl) |
201 | * Implemented generic queryByExample() with incremental searching. A lot of internal changes of the Pim2-library (eilers) | 202 | * Implemented generic queryByExample() with incremental searching. A lot of internal changes of the Pim2-library (eilers) |
202 | * Added fast and full featured and incremental sorted() for SQL addressbook backend (eilers) | 203 | * Added fast and full featured and incremental sorted() for SQL addressbook backend (eilers) |
203 | 204 | ||
204 | 2004-11-14Opie 1.1.7 | 205 | 2004-11-14Opie 1.1.7 |
205 | 206 | ||
206 | New Features | 207 | New Features |
207 | ------------ | 208 | ------------ |
208 | * libOpieDB now uses SQLite V3 instead V2. Remember to upgrade your database files! (eilers) | 209 | * libOpieDB now uses SQLite V3 instead V2. Remember to upgrade your database files! (eilers) |
209 | * Backup now uses the busy indicator when backing up and restore (ar) | 210 | * Backup now uses the busy indicator when backing up and restore (ar) |
210 | * OpiePlayer2 gained adding of Directories to the playlist (zecke) | 211 | * OpiePlayer2 gained adding of Directories to the playlist (zecke) |
211 | * OpiePlayer2 better error handling (zecke) | 212 | * OpiePlayer2 better error handling (zecke) |
212 | * OpiePlayer2 progress indication while streaming (zecke) | 213 | * OpiePlayer2 progress indication while streaming (zecke) |
213 | * OpiePlayer2 ported to use libxine 1.0.0-rc6a (brad,zecke) | 214 | * OpiePlayer2 ported to use libxine 1.0.0-rc6a (brad,zecke) |
214 | * Ported brightnessapplet from Qtopia 1.7 (mickeyl) | 215 | * Ported brightnessapplet from Qtopia 1.7 (mickeyl) |
215 | * Opie-Eye got a Digital Camera File Backend (alwin,zecke) | 216 | * Opie-Eye got a Digital Camera File Backend (alwin,zecke) |
216 | * Support for Tuxpad1 of Tradesquare.NL (mickeyl,zecke) | 217 | * Support for Tuxpad1 of Tradesquare.NL (mickeyl,zecke) |
217 | * Opie-Console use Custom Font and Size in a Profile (harlekin) | 218 | * Opie-Console use Custom Font and Size in a Profile (harlekin) |
218 | * Opie-Console transparently log the Output and Input to a file (harlekin) | 219 | * Opie-Console transparently log the Output and Input to a file (harlekin) |
219 | * Added new O-menu icon to lock the PDA immediately: opie-lockapplet (clem) | 220 | * Added new O-menu icon to lock the PDA immediately: opie-lockapplet (clem) |
220 | * Opie-Security now hides the plugin-based authentication tabs if no auth. plugin package is installed (clem) | 221 | * Opie-Security now hides the plugin-based authentication tabs if no auth. plugin package is installed (clem) |
221 | * Opie-Security gained a 'test authentication' button (clem) | 222 | * Opie-Security gained a 'test authentication' button (clem) |
222 | * Opie-Eye got a more unique layout (menubar), a slideshow, user can setup some defaults | 223 | * Opie-Eye got a more unique layout (menubar), a slideshow, user can setup some defaults |
223 | * Opie-Mail improve the handling of POP mail boxes (alwin) | 224 | * Opie-Mail improve the handling of POP mail boxes (alwin) |
224 | * Both Opie-Eye and Opie-Mail were greatly improved due the hard work of Rajko Albrecht(alwin) | 225 | * Both Opie-Eye and Opie-Mail were greatly improved due the hard work of Rajko Albrecht(alwin) |
225 | * Opie IRC - backports of the 'NeIRC fork' (zecke) | 226 | * Opie IRC - backports of the 'NeIRC fork' (zecke) |
226 | 227 | ||
227 | Fixed Bugs | 228 | Fixed Bugs |
228 | ---------- | 229 | ---------- |
229 | * #501 - Pickboard is able to show 'Umlaute' (TT,zecke) | 230 | * #501 - Pickboard is able to show 'Umlaute' (TT,zecke) |
230 | * #608 - Make Opie usable for left handed users (zecke) | 231 | * #608 - Make Opie usable for left handed users (zecke) |
231 | * #957 - Import of VCards/VTodos/VEvents with BASE64 encoding (ljp,zecke) | 232 | * #957 - Import of VCards/VTodos/VEvents with BASE64 encoding (ljp,zecke) |
232 | * #1245 - Opie-Go 'paused' (zecke) | 233 | * #1245 - Opie-Go 'paused' (zecke) |
233 | * #1358 - DocTab didn't show any MimeTypes (was fixed earlier) (zecke) | 234 | * #1358 - DocTab didn't show any MimeTypes (was fixed earlier) (zecke) |
234 | * #1380 - QDateBookAccess::remove() doesn't remove entries (eilers, zecke) | 235 | * #1380 - QDateBookAccess::remove() doesn't remove entries (eilers, zecke) |
235 | * #1395 - Build VNC Backend with gcc3.4 | 236 | * #1395 - Build VNC Backend with gcc3.4 |
236 | * #1440 - The icon of opie-mobilemsg is missing (CoreDump) | 237 | * #1440 - The icon of opie-mobilemsg is missing (CoreDump) |
237 | * #1426 - Add missing opie-bartender Icon (CoreDump) | 238 | * #1426 - Add missing opie-bartender Icon (CoreDump) |
238 | * #1445 - Opie-Sheet Has No Icon (CoreDump) | 239 | * #1445 - Opie-Sheet Has No Icon (CoreDump) |
239 | * #1448 - Brightness Applet added (mickeyl) | 240 | * #1448 - Brightness Applet added (mickeyl) |
240 | * #1450 - ZSame didn't clear the bonus item after winning a game (zecke) | 241 | * #1450 - ZSame didn't clear the bonus item after winning a game (zecke) |
241 | * #1482 - Fix OFileSelector to be able to sort by size (zecke) | 242 | * #1482 - Fix OFileSelector to be able to sort by size (zecke) |
242 | * n.a. - Opie-mail: fixed some crasher, some layout-problems | 243 | * n.a. - Opie-mail: fixed some crasher, some layout-problems |
243 | * n.a. - Converted applications to not hardcode /opt/QtPalmtop but to use QPEApplication::qpeDir (zecke) | 244 | * n.a. - Converted applications to not hardcode /opt/QtPalmtop but to use QPEApplication::qpeDir (zecke) |
244 | * n.a. - Converted usage of qpeDir() not to include a '/' as first charachter of the string (zecke) | 245 | * n.a. - Converted usage of qpeDir() not to include a '/' as first charachter of the string (zecke) |
245 | * n.a. - Build system: Enable distcc and ccache when crosscompiling too, and use them everywhere we can (clem) | 246 | * n.a. - Build system: Enable distcc and ccache when crosscompiling too, and use them everywhere we can (clem) |
246 | * n.a. - Build system: Fix deps in several config.in (and fix scripts/deps.pl too) to stop breaking builds, especially with make -j highNumber (clem) | 247 | * n.a. - Build system: Fix deps in several config.in (and fix scripts/deps.pl too) to stop breaking builds, especially with make -j highNumber (clem) |
247 | * n.a. - Removed hardcoded icon size in a couple of applets (mickeyl) | 248 | * n.a. - Removed hardcoded icon size in a couple of applets (mickeyl) |
248 | 249 | ||
249 | Internal | 250 | Internal |
250 | -------- | 251 | -------- |
251 | * Opie-Qashmoney has been moved to unsupported (mickeyl) | 252 | * Opie-Qashmoney has been moved to unsupported (mickeyl) |
252 | * Opie-Ubrowser has been moved to unsupported (mickeyl) | 253 | * Opie-Ubrowser has been moved to unsupported (mickeyl) |
253 | 254 | ||
254 | 2004-09-17Opie 1.1.6 | 255 | 2004-09-17Opie 1.1.6 |
255 | 256 | ||
256 | New Features | 257 | New Features |
257 | ------------ | 258 | ------------ |
258 | * Fifteen gained configurable number of items (zecke) | 259 | * Fifteen gained configurable number of items (zecke) |
259 | * Fifteen can have custom background images (zecke) | 260 | * Fifteen can have custom background images (zecke) |
260 | * Added daemonizing capabilities to QWS Server [via Qt/Embedded] (mickeyl) | 261 | * Added daemonizing capabilities to QWS Server [via Qt/Embedded] (mickeyl) |
261 | * Integrated the new security framework into libopie2 (zecke,clem) | 262 | * Integrated the new security framework into libopie2 (zecke,clem) |
262 | * Converted the launcher to use the new security framework (zecke) | 263 | * Converted the launcher to use the new security framework (zecke) |
263 | * Backup can now handle custom locations for backup and restore (ar) | 264 | * Backup can now handle custom locations for backup and restore (ar) |
264 | * Implemented right-on-hold feedback (wimpie,zecke) | 265 | * Implemented right-on-hold feedback (wimpie,zecke) |
265 | * Lots of new features in opie-reader (tim,pohly) | 266 | * Lots of new features in opie-reader (tim,pohly) |
266 | * Build system cleanups (schurig) | 267 | * Build system cleanups (schurig) |
267 | 268 | ||
268 | Fixed Bugs | 269 | Fixed Bugs |
269 | -------- | 270 | -------- |
270 | * #1005 - Fixed backup to CompactFlash (ar) | 271 | * #1005 - Fixed backup to CompactFlash (ar) |
271 | * #1167 - Fixed Opie write crashing on more text than one page (ar) | 272 | * #1167 - Fixed Opie write crashing on more text than one page (ar) |
272 | * #1225 - Fixed repeated light flashing on Zaurus with keyz (mickeyl) | 273 | * #1225 - Fixed repeated light flashing on Zaurus with keyz (mickeyl) |
273 | * #1359 - Fixed bookmarks in Gutenbrowser (ljp) | 274 | * #1359 - Fixed bookmarks in Gutenbrowser (ljp) |
274 | * #1361 - Fixed auto upercase in Opie-Addressbook (eilers) | 275 | * #1361 - Fixed auto upercase in Opie-Addressbook (eilers) |
275 | * #1370 - Pimconverter now reacts on cancel key (eilers) | 276 | * #1370 - Pimconverter now reacts on cancel key (eilers) |
276 | * #1376 - Bring back the capslock/numlock display (zecke) | 277 | * #1376 - Bring back the capslock/numlock display (zecke) |
277 | * #1383 - Language settings now warns about losing open apps (Markus Litz) | 278 | * #1383 - Language settings now warns about losing open apps (Markus Litz) |
278 | * #1393 - Fixed line wrap issues in opie-console for the default profile (mickeyl) | 279 | * #1393 - Fixed line wrap issues in opie-console for the default profile (mickeyl) |
279 | * #1394 - Fixed oversized headline in opie-login (coredump) | 280 | * #1394 - Fixed oversized headline in opie-login (coredump) |
280 | * #1396 - Opie-console captures the escape key and vim is working (zecke) | 281 | * #1396 - Opie-console captures the escape key and vim is working (zecke) |
281 | * #1401 - Scrollbar is now only visible if necessary in DocTab (mickeyl) | 282 | * #1401 - Scrollbar is now only visible if necessary in DocTab (mickeyl) |
282 | 283 | ||
283 | 2004-07-06Opie 1.1.4 | 284 | 2004-07-06Opie 1.1.4 |
284 | 285 | ||
285 | New Features | 286 | New Features |
286 | ------------ | 287 | ------------ |
287 | * Added four themes courtesy Robert Griebl (http://www.softforge.de/zstyle) | 288 | * Added four themes courtesy Robert Griebl (http://www.softforge.de/zstyle) |
288 | * Added Conversion tool for pim-data (eilers) | 289 | * Added Conversion tool for pim-data (eilers) |
289 | * Introduced new OPimAccessFactory and OBackendFactory which simplyfies database access (eilers) | 290 | * Introduced new OPimAccessFactory and OBackendFactory which simplyfies database access (eilers) |
290 | * Modified the PIM API for providing generic use of OPimRecords (eilers) | 291 | * Modified the PIM API for providing generic use of OPimRecords (eilers) |
291 | * Clicking on the application symbol now iterates over the application's top level widgets if already raised (zecke) | 292 | * Clicking on the application symbol now iterates over the application's top level widgets if already raised (zecke) |
292 | 293 | ||
293 | Fixed Bugs | 294 | Fixed Bugs |
294 | -------- | 295 | -------- |
295 | * #1068 - Country Drop Down Box Off Screen | 296 | * #1068 - Country Drop Down Box Off Screen |
296 | * #1291 - Opie tinykate does not open .desktop files (ar) | 297 | * #1291 - Opie tinykate does not open .desktop files (ar) |
297 | * #1291 - Opie sheet not saving correctly (ar) | 298 | * #1291 - Opie sheet not saving correctly (ar) |
298 | * #1294 - Opie does not know about British Summer Time | 299 | * #1294 - Opie does not know about British Summer Time |
299 | * #1314 - Drawpad initialization (mickeyl) | 300 | * #1314 - Drawpad initialization (mickeyl) |
300 | * #1317 - Packagemanager crashes on hold-down or install (chicken) | 301 | * #1317 - Packagemanager crashes on hold-down or install (chicken) |
301 | * #1321 - Batteryapplet graphic glitch (harlekin) | 302 | * #1321 - Batteryapplet graphic glitch (harlekin) |
302 | * #1324 - ZSafe not starting up (mickeyl) | 303 | * #1324 - ZSafe not starting up (mickeyl) |
303 | * #1328 - Personal Home Address fields is trimmed to 1char (eilers) | 304 | * #1328 - Personal Home Address fields is trimmed to 1char (eilers) |
304 | * #1327 - Opie-mail ipk does not depend on libopiedb2 (chicken) | 305 | * #1327 - Opie-mail ipk does not depend on libopiedb2 (chicken) |
305 | * #1345 - Networksettingsplugin wlan plugin dependency on libpcap0 (mickeyl) | 306 | * #1345 - Networksettingsplugin wlan plugin dependency on libpcap0 (mickeyl) |
306 | * #1348 - Datebook dependency on libopiedb2 (chicken) | 307 | * #1348 - Datebook dependency on libopiedb2 (chicken) |
307 | * #1328 - Switched SQLDatabase and VCards char encoding from latin1 to unicode (eilers) | 308 | * #1328 - Switched SQLDatabase and VCards char encoding from latin1 to unicode (eilers) |
308 | 309 | ||
309 | 2004-04-25Opie 1.1.3 | 310 | 2004-04-25Opie 1.1.3 |
310 | 311 | ||
311 | * Introduced first implementation of SQL-Support using SQLite (eilers) | 312 | * Introduced first implementation of SQL-Support using SQLite (eilers) |
312 | * Added a new Gutenberg Project reader app - opie-gutenbrowser (ljp) | 313 | * Added a new Gutenberg Project reader app - opie-gutenbrowser (ljp) |
313 | * Added a real system graffiti character set (brad) | 314 | * Added a real system graffiti character set (brad) |
314 | * Added Generic Keyconfig Widget (zecke) | 315 | * Added Generic Keyconfig Widget (zecke) |
315 | * Improved Screenshotapplet and Drawpad integration. You can now open a screenshot in drawpad and take notes (zecke) | 316 | * Improved Screenshotapplet and Drawpad integration. You can now open a screenshot in drawpad and take notes (zecke) |
316 | * Added new Bible reader app - opie-dagger (drw) | 317 | * Added new Bible reader app - opie-dagger (drw) |
317 | * Added a new Image Viewer. Work is ongoing (zecke,alwin) | 318 | * Added a new Image Viewer. Work is ongoing (zecke,alwin) |
318 | * Added namespace usage in libopie2 and everywhere (zecke,alwin) | 319 | * Added namespace usage in libopie2 and everywhere (zecke,alwin) |
319 | * Enabled the possibility to pass command line arguments to applications (mickeyl) | 320 | * Enabled the possibility to pass command line arguments to applications (mickeyl) |
320 | * Added an about applet showing some credits and information about Opie (mickeyl) | 321 | * Added an about applet showing some credits and information about Opie (mickeyl) |
321 | * Added benchmarking functionality to sysinfo (mickeyl) | 322 | * Added benchmarking functionality to sysinfo (mickeyl) |
322 | * Added applet and configuration application for switching hardware keyboard layouts (alwin) | 323 | * Added applet and configuration application for switching hardware keyboard layouts (alwin) |
323 | * Ported applications from libopie1 to libopie2* (drw,ar,alwin) | 324 | * Ported applications from libopie1 to libopie2* (drw,ar,alwin) |
324 | * Imported fullscreen and font improvements from the Qkonsole fork to embeddedkonsole (waspe) | 325 | * Imported fullscreen and font improvements from the Qkonsole fork to embeddedkonsole (waspe) |
325 | * Clean-up of package information in control files (drw) | 326 | * Clean-up of package information in control files (drw) |
326 | * Repaired mediummount which was broken since integrating the quicklauncher (alwin) | 327 | * Repaired mediummount which was broken since integrating the quicklauncher (alwin) |
327 | * Improved big-screen support (zecke,ar) | 328 | * Improved big-screen support (zecke,ar) |
328 | * Improved multikeyboard support, added keyboard layout switching applet (mouse) | 329 | * Improved multikeyboard support, added keyboard layout switching applet (mouse) |
329 | * Added a new mail client based on libetpan (harlekin,alwin,jgf) | 330 | * Added a new mail client based on libetpan (harlekin,alwin,jgf) |
330 | * Added new package manager - opie-packagemanager (drw) | 331 | * Added new package manager - opie-packagemanager (drw) |
331 | * Improved light-n-power for C7x0 (mickeyl) | 332 | * Improved light-n-power for C7x0 (mickeyl) |
332 | * Added automatic rotation support for C7x0 (treke) | 333 | * Added automatic rotation support for C7x0 (treke) |
333 | * Split libopie1 up into a set of smaller - functionally grouped - libraries (mickeyl) | 334 | * Split libopie1 up into a set of smaller - functionally grouped - libraries (mickeyl) |
334 | * Added scanning the wireless network neighbourhood to networksettings (mickeyl) | 335 | * Added scanning the wireless network neighbourhood to networksettings (mickeyl) |
335 | 336 | ||
336 | 2003-11-29Opie 1.0.3 | 337 | 2003-11-29Opie 1.0.3 |
337 | 338 | ||
338 | * Released as Version 1.0.3 | 339 | * Released as Version 1.0.3 |
339 | * Improved i18n (various contributors) | 340 | * Improved i18n (various contributors) |
340 | * Reduced application startup time by integrating the TT quicklauncher (zecke,harlekin) | 341 | * Reduced application startup time by integrating the TT quicklauncher (zecke,harlekin) |
341 | * Made the Documents Tab optional (mickeyl) | 342 | * Made the Documents Tab optional (mickeyl) |
342 | * Integrated basic support for HP iPAQ 54xx and the Jornada 5xx (chicken) | 343 | * Integrated basic support for HP iPAQ 54xx and the Jornada 5xx (chicken) |
343 | 344 | ||
344 | 2003-08-04Opie 1.0.0 | 345 | 2003-08-04Opie 1.0.0 |
345 | 346 | ||
346 | * Released as Version 1.0.0 | 347 | * Released as Version 1.0.0 |
347 | * Including a PPP module for easy dial up (tille,harlekin,zecke) | 348 | * Including a PPP module for easy dial up (tille,harlekin,zecke) |
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 | |||
@@ -1,817 +1,819 @@ | |||
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 | #include "oipkg.h" | 31 | #include "oipkg.h" |
32 | 32 | ||
33 | #include <qdir.h> | 33 | #include <qdir.h> |
34 | #include <qfile.h> | 34 | #include <qfile.h> |
35 | #include <qtextstream.h> | 35 | #include <qtextstream.h> |
36 | 36 | ||
37 | #include <stdlib.h> | 37 | #include <stdlib.h> |
38 | #include <unistd.h> | 38 | #include <unistd.h> |
39 | 39 | ||
40 | extern "C" { | 40 | extern "C" { |
41 | #include <libipkg.h> | 41 | #include <libipkg.h> |
42 | }; | 42 | }; |
43 | args_t m_ipkgArgs; // libipkg configuration arguments | 43 | args_t m_ipkgArgs; // libipkg configuration arguments |
44 | 44 | ||
45 | const QString IPKG_CONF = "/etc/ipkg.conf"; // Fully-qualified name of Ipkg primary configuration file | 45 | const QString IPKG_CONF = "/etc/ipkg.conf"; // Fully-qualified name of Ipkg primary configuration file |
46 | const QString IPKG_CONF_DIR = "/etc/ipkg"; // Directory of secondary Ipkg configuration files | 46 | const QString IPKG_CONF_DIR = "/etc/ipkg"; // Directory of secondary Ipkg configuration files |
47 | const QString IPKG_PKG_PATH = "/usr/lib/ipkg/lists"; // Directory containing server package lists | 47 | const QString IPKG_PKG_PATH = "/usr/lib/ipkg/lists"; // Directory containing server package lists |
48 | const QString IPKG_STATUS_PATH = "usr/lib/ipkg/status"; // Destination status file location | 48 | const QString IPKG_STATUS_PATH = "usr/lib/ipkg/status"; // Destination status file location |
49 | const QString IPKG_INFO_PATH = "usr/lib/ipkg/info"; // Package file lists location | 49 | const QString IPKG_INFO_PATH = "usr/lib/ipkg/info"; // Package file lists location |
50 | 50 | ||
51 | OIpkg *oipkg; | 51 | OIpkg *oipkg; |
52 | 52 | ||
53 | // Ipkg callback functions | 53 | // Ipkg callback functions |
54 | 54 | ||
55 | int fsignalIpkgMessage( ipkg_conf_t *conf, message_level_t level, char *msg ) | 55 | int fsignalIpkgMessage( ipkg_conf_t *conf, message_level_t level, char *msg ) |
56 | { | 56 | { |
57 | // Display message only if it is below the message level threshold | 57 | // Display message only if it is below the message level threshold |
58 | if ( conf && ( conf->verbosity < level ) ) | 58 | if ( conf && ( conf->verbosity < level ) ) |
59 | return 0; | 59 | return 0; |
60 | else | 60 | else |
61 | oipkg->ipkgMessage( msg ); | 61 | oipkg->ipkgMessage( msg ); |
62 | 62 | ||
63 | return 0; | 63 | return 0; |
64 | } | 64 | } |
65 | 65 | ||
66 | char *fIpkgResponse( char */*question*/ ) | 66 | char *fIpkgResponse( char */*question*/ ) |
67 | { | 67 | { |
68 | return 0l; | 68 | return 0l; |
69 | } | 69 | } |
70 | 70 | ||
71 | int fIpkgStatus( char */*name*/, int /*status*/, char *desc, void */*userdata*/ ) | 71 | int fIpkgStatus( char */*name*/, int /*status*/, char *desc, void */*userdata*/ ) |
72 | { | 72 | { |
73 | oipkg->ipkgStatus( desc ); | 73 | oipkg->ipkgStatus( desc ); |
74 | return 0; | 74 | return 0; |
75 | } | 75 | } |
76 | 76 | ||
77 | int fIpkgFiles( char */*name*/, char *desc, char */*version*/, pkg_state_status_t /*status*/, | 77 | int fIpkgFiles( char */*name*/, char *desc, char */*version*/, pkg_state_status_t /*status*/, |
78 | void */*userdata*/ ) | 78 | void */*userdata*/ ) |
79 | { | 79 | { |
80 | oipkg->ipkgList( desc ); | 80 | oipkg->ipkgList( desc ); |
81 | return 0; | 81 | return 0; |
82 | } | 82 | } |
83 | 83 | ||
84 | OIpkg::OIpkg( Config *config, QObject *parent, const char *name ) | 84 | OIpkg::OIpkg( Config *config, QObject *parent, const char *name ) |
85 | : QObject( parent, name ) | 85 | : QObject( parent, name ) |
86 | , m_config( config ) | 86 | , m_config( config ) |
87 | , m_confInfo( NULL ) | 87 | , m_confInfo( NULL ) |
88 | , m_ipkgExecOptions( 0 ) | 88 | , m_ipkgExecOptions( 0 ) |
89 | , m_ipkgExecVerbosity( 1 ) | 89 | , m_ipkgExecVerbosity( 1 ) |
90 | { | 90 | { |
91 | // Keep pointer to self for the Ipkg callback functions | 91 | // Keep pointer to self for the Ipkg callback functions |
92 | oipkg = this; | 92 | oipkg = this; |
93 | 93 | ||
94 | // Initialize libipkg | 94 | // Initialize libipkg |
95 | ipkg_init( &fsignalIpkgMessage, &fIpkgResponse, &m_ipkgArgs ); | 95 | ipkg_init( &fsignalIpkgMessage, &fIpkgResponse, &m_ipkgArgs ); |
96 | 96 | ||
97 | // Default ipkg run-time arguments | 97 | // Default ipkg run-time arguments |
98 | m_ipkgArgs.noaction = false; | 98 | m_ipkgArgs.noaction = false; |
99 | m_ipkgArgs.force_defaults = true; | 99 | m_ipkgArgs.force_defaults = true; |
100 | } | 100 | } |
101 | 101 | ||
102 | OIpkg::~OIpkg() | 102 | OIpkg::~OIpkg() |
103 | { | 103 | { |
104 | // Upon destruction, ensure that items in config list are deleted with list | 104 | // Upon destruction, ensure that items in config list are deleted with list |
105 | if ( m_confInfo ) | 105 | if ( m_confInfo ) |
106 | m_confInfo->setAutoDelete( true ); | 106 | m_confInfo->setAutoDelete( true ); |
107 | 107 | ||
108 | // Free up libipkg resources | 108 | // Free up libipkg resources |
109 | ipkg_deinit( &m_ipkgArgs ); | 109 | ipkg_deinit( &m_ipkgArgs ); |
110 | } | 110 | } |
111 | 111 | ||
112 | OConfItemList *OIpkg::configItems() | 112 | OConfItemList *OIpkg::configItems() |
113 | { | 113 | { |
114 | // Retrieve all configuration items | 114 | // Retrieve all configuration items |
115 | return filterConfItems(); | 115 | return filterConfItems(); |
116 | } | 116 | } |
117 | 117 | ||
118 | OConfItemList *OIpkg::servers() | 118 | OConfItemList *OIpkg::servers() |
119 | { | 119 | { |
120 | // Retrieve only servers | 120 | // Retrieve only servers |
121 | return filterConfItems( OConfItem::Source ); | 121 | return filterConfItems( OConfItem::Source ); |
122 | } | 122 | } |
123 | 123 | ||
124 | OConfItemList *OIpkg::destinations() | 124 | OConfItemList *OIpkg::destinations() |
125 | { | 125 | { |
126 | // Retrieve only destinations | 126 | // Retrieve only destinations |
127 | return filterConfItems( OConfItem::Destination ); | 127 | return filterConfItems( OConfItem::Destination ); |
128 | } | 128 | } |
129 | 129 | ||
130 | OConfItemList *OIpkg::options() | 130 | OConfItemList *OIpkg::options() |
131 | { | 131 | { |
132 | // Retrieve only destinations | 132 | // Retrieve only destinations |
133 | return filterConfItems( OConfItem::Option ); | 133 | return filterConfItems( OConfItem::Option ); |
134 | } | 134 | } |
135 | 135 | ||
136 | void OIpkg::setConfigItems( OConfItemList *configList ) | 136 | void OIpkg::setConfigItems( OConfItemList *configList ) |
137 | { | 137 | { |
138 | if ( m_confInfo ) | 138 | if ( m_confInfo ) |
139 | delete m_confInfo; | 139 | delete m_confInfo; |
140 | 140 | ||
141 | m_confInfo = configList; | 141 | m_confInfo = configList; |
142 | 142 | ||
143 | // Write out new /etc/ipkg.conf | 143 | // Write out new /etc/ipkg.conf |
144 | QFile confFile( IPKG_CONF ); | 144 | QFile confFile( IPKG_CONF ); |
145 | if ( confFile.open( IO_WriteOnly ) ) | 145 | if ( confFile.open( IO_WriteOnly ) ) |
146 | { | 146 | { |
147 | QTextStream confStream( &confFile ); | 147 | QTextStream confStream( &confFile ); |
148 | confStream << "# Generated by Opie Package Manager\n\n"; | 148 | confStream << "# Generated by Opie Package Manager\n\n"; |
149 | 149 | ||
150 | OConfItemListIterator it( *m_confInfo ); | 150 | OConfItemListIterator it( *m_confInfo ); |
151 | for ( ; it.current(); ++it ) | 151 | for ( ; it.current(); ++it ) |
152 | { | 152 | { |
153 | OConfItem *item = it.current(); | 153 | OConfItem *item = it.current(); |
154 | 154 | ||
155 | // Only write out valid conf items | 155 | // Only write out valid conf items |
156 | if ( item->type() != OConfItem::NotDefined ) | 156 | if ( item->type() != OConfItem::NotDefined ) |
157 | { | 157 | { |
158 | QString confLine; | 158 | QString confLine; |
159 | QString name = item->name(); | 159 | QString name = item->name(); |
160 | if ( !item->active() ) | 160 | if ( !item->active() ) |
161 | confLine = "#"; | 161 | confLine = "#"; |
162 | 162 | ||
163 | switch ( item->type() ) | 163 | switch ( item->type() ) |
164 | { | 164 | { |
165 | case OConfItem::Source : | 165 | case OConfItem::Source : |
166 | { | 166 | { |
167 | if ( item->features().contains( "Compressed" ) ) | 167 | if ( item->features().contains( "Compressed" ) ) |
168 | confLine.append( "src/gz" ); | 168 | confLine.append( "src/gz" ); |
169 | else | 169 | else |
170 | confLine.append( "src" ); | 170 | confLine.append( "src" ); |
171 | } | 171 | } |
172 | break; | 172 | break; |
173 | case OConfItem::Destination : confLine.append( "dest" ); break; | 173 | case OConfItem::Destination : confLine.append( "dest" ); break; |
174 | case OConfItem::Option : confLine.append( "option" ); break; | 174 | case OConfItem::Option : confLine.append( "option" ); break; |
175 | case OConfItem::Arch : confLine.append( "arch" ); break; | 175 | case OConfItem::Arch : confLine.append( "arch" ); break; |
176 | case OConfItem::Other : | 176 | case OConfItem::Other : |
177 | { | 177 | { |
178 | // For options w/type = Other, the mapping is as follows: | 178 | // For options w/type = Other, the mapping is as follows: |
179 | // name = typeStr (e.g. "lists_dir") | 179 | // name = typeStr (e.g. "lists_dir") |
180 | // value = value | 180 | // value = value |
181 | // features = name (from configuration file) | 181 | // features = name (from configuration file) |
182 | confLine.append( item->name() ); | 182 | confLine.append( item->name() ); |
183 | name = item->features(); | 183 | name = item->features(); |
184 | } | 184 | } |
185 | break; | 185 | break; |
186 | default : break; | 186 | default : break; |
187 | }; | 187 | }; |
188 | 188 | ||
189 | confStream << confLine << " " << name << " " << item->value() << "\n"; | 189 | confStream << confLine << " " << name << " " << item->value() << "\n"; |
190 | } | 190 | } |
191 | } | 191 | } |
192 | 192 | ||
193 | confFile.close(); | 193 | confFile.close(); |
194 | } | 194 | } |
195 | else | 195 | else |
196 | { | 196 | { |
197 | // Problem writing to /etc/ipkg.conf, exit before removing other conf files | 197 | // Problem writing to /etc/ipkg.conf, exit before removing other conf files |
198 | return; | 198 | return; |
199 | } | 199 | } |
200 | 200 | ||
201 | // Delete /etc/ipkg/*.conf files (/etc/ipkg.conf should now have all settings | 201 | // Delete /etc/ipkg/*.conf files (/etc/ipkg.conf should now have all settings |
202 | QStringList confFiles; | 202 | QStringList confFiles; |
203 | QDir confDir( IPKG_CONF_DIR ); | 203 | QDir confDir( IPKG_CONF_DIR ); |
204 | if ( confDir.exists() ) | 204 | if ( confDir.exists() ) |
205 | { | 205 | { |
206 | confDir.setNameFilter( "*.conf" ); | 206 | confDir.setNameFilter( "*.conf" ); |
207 | confDir.setFilter( QDir::Files ); | 207 | confDir.setFilter( QDir::Files ); |
208 | confFiles = confDir.entryList( "*.conf", QDir::Files ); | 208 | confFiles = confDir.entryList( "*.conf", QDir::Files ); |
209 | 209 | ||
210 | QStringList::Iterator lastFile = confFiles.end(); | 210 | QStringList::Iterator lastFile = confFiles.end(); |
211 | for ( QStringList::Iterator it = confFiles.begin(); it != lastFile; ++it ) | 211 | for ( QStringList::Iterator it = confFiles.begin(); it != lastFile; ++it ) |
212 | { | 212 | { |
213 | // Create absolute file path if necessary | 213 | // Create absolute file path if necessary |
214 | QString absFile = (*it); | 214 | QString absFile = (*it); |
215 | if ( !absFile.startsWith( "/" ) ) | 215 | if ( !absFile.startsWith( "/" ) ) |
216 | absFile.prepend( QString( IPKG_CONF_DIR ) + "/" ); | 216 | absFile.prepend( QString( IPKG_CONF_DIR ) + "/" ); |
217 | 217 | ||
218 | // Delete file | 218 | // Delete file |
219 | QFile::remove( absFile ); | 219 | QFile::remove( absFile ); |
220 | } | 220 | } |
221 | } | 221 | } |
222 | 222 | ||
223 | // Reinitialize libipkg to pick up new configuration | 223 | // Reinitialize libipkg to pick up new configuration |
224 | ipkg_deinit( &m_ipkgArgs ); | 224 | ipkg_deinit( &m_ipkgArgs ); |
225 | ipkg_init( &fsignalIpkgMessage, &fIpkgResponse, &m_ipkgArgs ); | 225 | ipkg_init( &fsignalIpkgMessage, &fIpkgResponse, &m_ipkgArgs ); |
226 | m_ipkgArgs.noaction = false; | 226 | m_ipkgArgs.noaction = false; |
227 | m_ipkgArgs.force_defaults = true; | 227 | m_ipkgArgs.force_defaults = true; |
228 | } | 228 | } |
229 | 229 | ||
230 | void OIpkg::saveSettings() | 230 | void OIpkg::saveSettings() |
231 | { | 231 | { |
232 | // Save Ipkg execution options to application configuration file | 232 | // Save Ipkg execution options to application configuration file |
233 | if ( m_config ) | 233 | if ( m_config ) |
234 | { | 234 | { |
235 | m_config->setGroup( "Ipkg" ); | 235 | m_config->setGroup( "Ipkg" ); |
236 | m_config->writeEntry( "ExecOptions", m_ipkgExecOptions ); | 236 | m_config->writeEntry( "ExecOptions", m_ipkgExecOptions ); |
237 | m_config->writeEntry( "Verbosity", m_ipkgExecVerbosity ); | 237 | m_config->writeEntry( "Verbosity", m_ipkgExecVerbosity ); |
238 | } | 238 | } |
239 | } | 239 | } |
240 | 240 | ||
241 | OPackageList *OIpkg::availablePackages( const QString &server ) | 241 | OPackageList *OIpkg::availablePackages( const QString &server ) |
242 | { | 242 | { |
243 | // Load Ipkg configuration info if not already cached | 243 | // Load Ipkg configuration info if not already cached |
244 | if ( !m_confInfo ) | 244 | if ( !m_confInfo ) |
245 | loadConfiguration(); | 245 | loadConfiguration(); |
246 | 246 | ||
247 | // Build new server list (caller is responsible for deleting) | 247 | // Build new server list (caller is responsible for deleting) |
248 | OPackageList *pl = new OPackageList; | 248 | OPackageList *pl = new OPackageList; |
249 | 249 | ||
250 | // Get directory where server lists are located | 250 | // Get directory where server lists are located |
251 | QString listsDir; | 251 | QString listsDir; |
252 | OConfItem *confItem = findConfItem( OConfItem::Other, "lists_dir" ); | 252 | OConfItem *confItem = findConfItem( OConfItem::Other, "lists_dir" ); |
253 | if ( confItem ) | 253 | if ( confItem ) |
254 | listsDir = confItem->value(); | 254 | listsDir = confItem->value(); |
255 | else | 255 | else |
256 | listsDir = IPKG_PKG_PATH; | 256 | listsDir = IPKG_PKG_PATH; |
257 | 257 | ||
258 | // Open package list file | 258 | // Open package list file |
259 | QFile f( listsDir + "/" + server ); | 259 | QFile f( listsDir + "/" + server ); |
260 | if ( !f.open( IO_ReadOnly ) ) | 260 | if ( !f.open( IO_ReadOnly ) ) |
261 | return NULL; | 261 | return NULL; |
262 | QTextStream t( &f ); | 262 | QTextStream t( &f ); |
263 | 263 | ||
264 | // Process all information in package list file | 264 | // Process all information in package list file |
265 | OPackage *package = NULL; | 265 | OPackage *package = NULL; |
266 | QString line = t.readLine(); | 266 | QString line = t.readLine(); |
267 | while ( !t.eof() ) | 267 | while ( !t.eof() ) |
268 | { | 268 | { |
269 | // Determine key/value pair | 269 | // Determine key/value pair |
270 | int pos = line.find( ':', 0 ); | 270 | int pos = line.find( ':', 0 ); |
271 | QString key; | 271 | QString key; |
272 | if ( pos > -1 ) | 272 | if ( pos > -1 ) |
273 | key = line.mid( 0, pos ); | 273 | key = line.mid( 0, pos ); |
274 | else | 274 | else |
275 | key = QString::null; | 275 | key = QString::null; |
276 | QString value = line.mid( pos+2, line.length()-pos ); | 276 | QString value = line.mid( pos+2, line.length()-pos ); |
277 | 277 | ||
278 | // Allocate new package and insert into list | 278 | // Allocate new package and insert into list |
279 | if ( package == NULL && !key.isEmpty() ) | 279 | if ( package == NULL && !key.isEmpty() ) |
280 | { | 280 | { |
281 | package = new OPackage( value ); | 281 | package = new OPackage( value ); |
282 | package->setSource( server ); | 282 | package->setSource( server ); |
283 | pl->append( package ); | 283 | pl->append( package ); |
284 | } | 284 | } |
285 | 285 | ||
286 | // Update package data | 286 | // Update package data |
287 | if ( key == "Package" ) | 287 | if ( key == "Package" ) |
288 | package->setName( value ); | 288 | package->setName( value ); |
289 | else if ( key == "Version" ) | 289 | else if ( key == "Version" ) |
290 | package->setVersion( value ); | 290 | package->setVersion( value ); |
291 | else if ( key == "Section" ) | 291 | else if ( key == "Section" ) |
292 | package->setCategory( value ); | 292 | package->setCategory( value ); |
293 | //DataManager::setAvailableCategories( value ); | 293 | //DataManager::setAvailableCategories( value ); |
294 | else if ( key.isEmpty() && value.isEmpty() ) | 294 | else if ( key.isEmpty() && value.isEmpty() ) |
295 | package = NULL; | 295 | package = NULL; |
296 | 296 | ||
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 | ||
313 | OPackageList *OIpkg::installedPackages( const QString &destName, const QString &destPath ) | 313 | OPackageList *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 | ||
396 | OConfItem *OIpkg::findConfItem( OConfItem::Type type, const QString &name ) | 396 | OConfItem *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 | ||
414 | bool OIpkg::executeCommand( OPackage::Command command, const QStringList ¶meters, const QString &destination, | 414 | bool OIpkg::executeCommand( OPackage::Command command, const QStringList ¶meters, 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 | ||
524 | void OIpkg::ipkgMessage( char *msg ) | 526 | void OIpkg::ipkgMessage( char *msg ) |
525 | { | 527 | { |
526 | emit signalIpkgMessage( msg ); | 528 | emit signalIpkgMessage( msg ); |
527 | } | 529 | } |
528 | 530 | ||
529 | void OIpkg::ipkgStatus( char *status ) | 531 | void OIpkg::ipkgStatus( char *status ) |
530 | { | 532 | { |
531 | emit signalIpkgStatus( status ); | 533 | emit signalIpkgStatus( status ); |
532 | } | 534 | } |
533 | 535 | ||
534 | void OIpkg::ipkgList( char *filelist ) | 536 | void OIpkg::ipkgList( char *filelist ) |
535 | { | 537 | { |
536 | emit signalIpkgList( filelist ); | 538 | emit signalIpkgList( filelist ); |
537 | } | 539 | } |
538 | 540 | ||
539 | void OIpkg::loadConfiguration() | 541 | void 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 ); |
553 | confFiles = confDir.entryList( "*.conf", QDir::Files ); | 555 | confFiles = confDir.entryList( "*.conf", QDir::Files ); |
554 | } | 556 | } |
555 | confFiles << IPKG_CONF; | 557 | confFiles << IPKG_CONF; |
556 | 558 | ||
557 | QStringList::Iterator lastFile = confFiles.end(); | 559 | QStringList::Iterator lastFile = confFiles.end(); |
558 | for ( QStringList::Iterator it = confFiles.begin(); it != lastFile; ++it ) | 560 | for ( QStringList::Iterator it = confFiles.begin(); it != lastFile; ++it ) |
559 | { | 561 | { |
560 | // Create absolute file path if necessary | 562 | // Create absolute file path if necessary |
561 | QString absFile = (*it); | 563 | QString absFile = (*it); |
562 | if ( !absFile.startsWith( "/" ) ) | 564 | if ( !absFile.startsWith( "/" ) ) |
563 | absFile.prepend( QString( IPKG_CONF_DIR ) + "/" ); | 565 | absFile.prepend( QString( IPKG_CONF_DIR ) + "/" ); |
564 | 566 | ||
565 | // Read in file | 567 | // Read in file |
566 | QFile f( absFile ); | 568 | QFile f( absFile ); |
567 | if ( f.open( IO_ReadOnly ) ) | 569 | if ( f.open( IO_ReadOnly ) ) |
568 | { | 570 | { |
569 | QTextStream s( &f ); | 571 | QTextStream s( &f ); |
570 | while ( !s.eof() ) | 572 | while ( !s.eof() ) |
571 | { | 573 | { |
572 | 574 | ||
573 | QString line = s.readLine().simplifyWhiteSpace(); | 575 | QString line = s.readLine().simplifyWhiteSpace(); |
574 | 576 | ||
575 | // Parse line and save info to the conf options list | 577 | // Parse line and save info to the conf options list |
576 | if ( !line.isEmpty() ) | 578 | if ( !line.isEmpty() ) |
577 | { | 579 | { |
578 | // Strip leading comment marker if exists | 580 | // Strip leading comment marker if exists |
579 | bool comment = false; | 581 | bool comment = false; |
580 | if ( line.startsWith( "#" ) ) | 582 | if ( line.startsWith( "#" ) ) |
581 | { | 583 | { |
582 | line.remove( 0, 1 ); | 584 | line.remove( 0, 1 ); |
583 | line = line.simplifyWhiteSpace(); | 585 | line = line.simplifyWhiteSpace(); |
584 | comment = true; | 586 | comment = true; |
585 | } | 587 | } |
586 | 588 | ||
587 | bool recognizedOption = true; | 589 | bool recognizedOption = true; |
588 | int pos = line.find( ' ', 1 ) + 1; | 590 | int pos = line.find( ' ', 1 ) + 1; |
589 | int endpos = line.find( ' ', pos ); | 591 | int endpos = line.find( ' ', pos ); |
590 | 592 | ||
591 | // Name | 593 | // Name |
592 | QString name = line.mid( pos, endpos - pos ); | 594 | QString name = line.mid( pos, endpos - pos ); |
593 | 595 | ||
594 | // Value | 596 | // Value |
595 | QString value = ""; | 597 | QString value = ""; |
596 | if ( endpos > -1 ) | 598 | if ( endpos > -1 ) |
597 | value = line.right( line.length() - endpos - 1 ); | 599 | value = line.right( line.length() - endpos - 1 ); |
598 | 600 | ||
599 | // Active | 601 | // Active |
600 | bool active = !comment; | 602 | bool active = !comment; |
601 | 603 | ||
602 | // Type | 604 | // Type |
603 | // For options w/type = Other, the mapping is as follows: | 605 | // For options w/type = Other, the mapping is as follows: |
604 | // name = typeStr (e.g. "lists_dir") | 606 | // name = typeStr (e.g. "lists_dir") |
605 | // value = value | 607 | // value = value |
606 | // features = name (from configuration file) | 608 | // features = name (from configuration file) |
607 | 609 | ||
608 | QString typeStr = line.left( pos - 1 ); | 610 | QString typeStr = line.left( pos - 1 ); |
609 | OConfItem::Type type; | 611 | OConfItem::Type type; |
610 | QString features; | 612 | QString features; |
611 | if ( typeStr == "src" ) | 613 | if ( typeStr == "src" ) |
612 | type = OConfItem::Source; | 614 | type = OConfItem::Source; |
613 | else if ( typeStr == "src/gz" ) | 615 | else if ( typeStr == "src/gz" ) |
614 | { | 616 | { |
615 | type = OConfItem::Source; | 617 | type = OConfItem::Source; |
616 | features = "Compressed"; | 618 | features = "Compressed"; |
617 | } | 619 | } |
618 | else if ( typeStr == "dest" ) | 620 | else if ( typeStr == "dest" ) |
619 | type = OConfItem::Destination; | 621 | type = OConfItem::Destination; |
620 | else if ( typeStr == "option" ) | 622 | else if ( typeStr == "option" ) |
621 | type = OConfItem::Option; | 623 | type = OConfItem::Option; |
622 | else if ( typeStr == "arch" ) | 624 | else if ( typeStr == "arch" ) |
623 | type = OConfItem::Arch; | 625 | type = OConfItem::Arch; |
624 | else if ( typeStr == "lists_dir" ) | 626 | else if ( typeStr == "lists_dir" ) |
625 | { | 627 | { |
626 | type = OConfItem::Other; | 628 | type = OConfItem::Other; |
627 | features = name; | 629 | features = name; |
628 | name = typeStr; | 630 | name = typeStr; |
629 | 631 | ||
630 | // Default value when not defined | 632 | // Default value when not defined |
631 | if ( value == QString::null || value == "" ) | 633 | if ( value == QString::null || value == "" ) |
632 | value = IPKG_PKG_PATH; | 634 | value = IPKG_PKG_PATH; |
633 | } | 635 | } |
634 | else | 636 | else |
635 | recognizedOption = false; | 637 | recognizedOption = false; |
636 | 638 | ||
637 | // Add to list | 639 | // Add to list |
638 | if ( recognizedOption ) | 640 | if ( recognizedOption ) |
639 | m_confInfo->append( new OConfItem( type, name, value, features, active ) ); | 641 | m_confInfo->append( new OConfItem( type, name, value, features, active ) ); |
640 | } | 642 | } |
641 | } | 643 | } |
642 | 644 | ||
643 | f.close(); | 645 | f.close(); |
644 | } | 646 | } |
645 | } | 647 | } |
646 | 648 | ||
647 | // Load Ipkg execution options from application configuration file | 649 | // Load Ipkg execution options from application configuration file |
648 | if ( m_config ) | 650 | if ( m_config ) |
649 | { | 651 | { |
650 | m_config->setGroup( "Ipkg" ); | 652 | m_config->setGroup( "Ipkg" ); |
651 | m_ipkgExecOptions = m_config->readNumEntry( "ExecOptions", m_ipkgExecOptions ); | 653 | m_ipkgExecOptions = m_config->readNumEntry( "ExecOptions", m_ipkgExecOptions ); |
652 | m_ipkgExecVerbosity = m_config->readNumEntry( "Verbosity", m_ipkgExecVerbosity ); | 654 | m_ipkgExecVerbosity = m_config->readNumEntry( "Verbosity", m_ipkgExecVerbosity ); |
653 | } | 655 | } |
654 | } | 656 | } |
655 | 657 | ||
656 | OConfItemList *OIpkg::filterConfItems( OConfItem::Type typefilter ) | 658 | OConfItemList *OIpkg::filterConfItems( OConfItem::Type typefilter ) |
657 | { | 659 | { |
658 | // Load Ipkg configuration info if not already cached | 660 | // Load Ipkg configuration info if not already cached |
659 | if ( !m_confInfo ) | 661 | if ( !m_confInfo ) |
660 | loadConfiguration(); | 662 | loadConfiguration(); |
661 | 663 | ||
662 | // Build new server list (caller is responsible for deleting) | 664 | // Build new server list (caller is responsible for deleting) |
663 | OConfItemList *sl = new OConfItemList; | 665 | OConfItemList *sl = new OConfItemList; |
664 | 666 | ||
665 | // If typefilter is empty, retrieve all items | 667 | // If typefilter is empty, retrieve all items |
666 | bool retrieveAll = ( typefilter == OConfItem::NotDefined ); | 668 | bool retrieveAll = ( typefilter == OConfItem::NotDefined ); |
667 | 669 | ||
668 | // Parse configuration info for servers | 670 | // Parse configuration info for servers |
669 | OConfItemListIterator it( *m_confInfo ); | 671 | OConfItemListIterator it( *m_confInfo ); |
670 | for ( ; it.current(); ++it ) | 672 | for ( ; it.current(); ++it ) |
671 | { | 673 | { |
672 | OConfItem *item = it.current(); | 674 | OConfItem *item = it.current(); |
673 | if ( retrieveAll || item->type() == typefilter ) | 675 | if ( retrieveAll || item->type() == typefilter ) |
674 | { | 676 | { |
675 | sl->append( item ); | 677 | sl->append( item ); |
676 | } | 678 | } |
677 | } | 679 | } |
678 | 680 | ||
679 | return sl; | 681 | return sl; |
680 | } | 682 | } |
681 | 683 | ||
682 | const QString &OIpkg::rootPath() | 684 | const QString &OIpkg::rootPath() |
683 | { | 685 | { |
684 | if ( m_rootPath.isEmpty() ) | 686 | if ( m_rootPath.isEmpty() ) |
685 | { | 687 | { |
686 | OConfItem *rootDest = findConfItem( OConfItem::Destination, "root" ); | 688 | OConfItem *rootDest = findConfItem( OConfItem::Destination, "root" ); |
687 | rootDest ? m_rootPath = rootDest->value() | 689 | rootDest ? m_rootPath = rootDest->value() |
688 | : m_rootPath = '/'; | 690 | : m_rootPath = '/'; |
689 | if ( m_rootPath.right( 1 ) == '/' ) | 691 | if ( m_rootPath.right( 1 ) == '/' ) |
690 | m_rootPath.truncate( m_rootPath.length() - 1 ); | 692 | m_rootPath.truncate( m_rootPath.length() - 1 ); |
691 | } | 693 | } |
692 | return m_rootPath; | 694 | return m_rootPath; |
693 | } | 695 | } |
694 | 696 | ||
695 | void OIpkg::linkPackageDir( const QString &dest ) | 697 | void OIpkg::linkPackageDir( const QString &dest ) |
696 | { | 698 | { |
697 | if ( !dest.isNull() ) | 699 | if ( !dest.isNull() ) |
698 | { | 700 | { |
699 | OConfItem *destConfItem = findConfItem( OConfItem::Destination, dest ); | 701 | OConfItem *destConfItem = findConfItem( OConfItem::Destination, dest ); |
700 | 702 | ||
701 | emit signalIpkgMessage( tr( "Linking packages installed in: %1" ).arg( dest ) ); | 703 | emit signalIpkgMessage( tr( "Linking packages installed in: %1" ).arg( dest ) ); |
702 | 704 | ||
703 | // Set package destination directory | 705 | // Set package destination directory |
704 | QString destDir = destConfItem->value(); | 706 | QString destDir = destConfItem->value(); |
705 | QString destInfoDir = destDir; | 707 | QString destInfoDir = destDir; |
706 | if ( destInfoDir.right( 1 ) != '/' ) | 708 | if ( destInfoDir.right( 1 ) != '/' ) |
707 | destInfoDir.append( '/' ); | 709 | destInfoDir.append( '/' ); |
708 | destInfoDir.append( IPKG_INFO_PATH ); | 710 | destInfoDir.append( IPKG_INFO_PATH ); |
709 | 711 | ||
710 | // Get list of installed packages in destination | 712 | // Get list of installed packages in destination |
711 | QDir packageDir( destInfoDir ); | 713 | QDir packageDir( destInfoDir ); |
712 | QStringList packageFiles; | 714 | QStringList packageFiles; |
713 | if ( packageDir.exists() ) | 715 | if ( packageDir.exists() ) |
714 | { | 716 | { |
715 | packageDir.setNameFilter( "*.list" ); | 717 | packageDir.setNameFilter( "*.list" ); |
716 | packageDir.setFilter( QDir::Files ); | 718 | packageDir.setFilter( QDir::Files ); |
717 | packageFiles = packageDir.entryList( "*.list", QDir::Files ); | 719 | packageFiles = packageDir.entryList( "*.list", QDir::Files ); |
718 | } | 720 | } |
719 | 721 | ||
720 | // Link all files for every package installed in desination | 722 | // Link all files for every package installed in desination |
721 | QStringList::Iterator lastFile = packageFiles.end(); | 723 | QStringList::Iterator lastFile = packageFiles.end(); |
722 | for ( QStringList::Iterator it = packageFiles.begin(); it != lastFile; ++it ) | 724 | for ( QStringList::Iterator it = packageFiles.begin(); it != lastFile; ++it ) |
723 | { | 725 | { |
724 | //emit signalIpkgMessage( QString( "Processing: %1/%2" ).arg( destInfoDir ).arg (*it) ); | 726 | //emit signalIpkgMessage( QString( "Processing: %1/%2" ).arg( destInfoDir ).arg (*it) ); |
725 | QString packageFileName = destInfoDir; | 727 | QString packageFileName = destInfoDir; |
726 | packageFileName.append( '/' ); | 728 | packageFileName.append( '/' ); |
727 | packageFileName.append( (*it) ); | 729 | packageFileName.append( (*it) ); |
728 | QFile packageFile( packageFileName ); | 730 | QFile packageFile( packageFileName ); |
729 | if ( packageFile.open( IO_ReadOnly ) ) | 731 | if ( packageFile.open( IO_ReadOnly ) ) |
730 | { | 732 | { |
731 | QTextStream t( &packageFile ); | 733 | QTextStream t( &packageFile ); |
732 | QString linkFile; | 734 | QString linkFile; |
733 | while ( !t.eof() ) | 735 | while ( !t.eof() ) |
734 | { | 736 | { |
735 | // Get the name of the file to link and build the sym link filename | 737 | // Get the name of the file to link and build the sym link filename |
736 | linkFile = t.readLine(); | 738 | linkFile = t.readLine(); |
737 | QString linkDest( linkFile.right( linkFile.length() - destDir.length() ) ); | 739 | QString linkDest( linkFile.right( linkFile.length() - destDir.length() ) ); |
738 | linkDest.prepend( rootPath() ); | 740 | linkDest.prepend( rootPath() ); |
739 | 741 | ||
740 | // If file installed file is actually symbolic link, use actual file for linking | 742 | // If file installed file is actually symbolic link, use actual file for linking |
741 | QFileInfo fileInfo( linkFile ); | 743 | QFileInfo fileInfo( linkFile ); |
742 | if ( fileInfo.isSymLink() && !fileInfo.readLink().isEmpty() ) | 744 | if ( fileInfo.isSymLink() && !fileInfo.readLink().isEmpty() ) |
743 | linkFile = fileInfo.readLink(); | 745 | linkFile = fileInfo.readLink(); |
744 | 746 | ||
745 | // See if directory exists in 'root', if not, create | 747 | // See if directory exists in 'root', if not, create |
746 | fileInfo.setFile( linkDest ); | 748 | fileInfo.setFile( linkDest ); |
747 | QString linkDestDirName = fileInfo.dirPath( true ); | 749 | QString linkDestDirName = fileInfo.dirPath( true ); |
748 | QDir linkDestDir( linkDestDirName ); | 750 | QDir linkDestDir( linkDestDirName ); |
749 | if ( !linkDestDir.exists() ) | 751 | if ( !linkDestDir.exists() ) |
750 | { | 752 | { |
751 | linkDestDir.mkdir( linkDestDirName ); | 753 | linkDestDir.mkdir( linkDestDirName ); |
752 | } | 754 | } |
753 | else | 755 | else |
754 | { | 756 | { |
755 | // Remove any previous link to make sure we will be pointing to the current version | 757 | // Remove any previous link to make sure we will be pointing to the current version |
756 | if ( QFile::exists( linkDest ) ) | 758 | if ( QFile::exists( linkDest ) ) |
757 | QFile::remove( linkDest ); | 759 | QFile::remove( linkDest ); |
758 | } | 760 | } |
759 | 761 | ||
760 | // Link the file | 762 | // Link the file |
761 | //emit signalIpkgMessage( QString( "Linking '%1' to '%2'" ).arg( linkFile ).arg( linkDest ) ); | 763 | //emit signalIpkgMessage( QString( "Linking '%1' to '%2'" ).arg( linkFile ).arg( linkDest ) ); |
762 | if ( symlink( linkFile, linkDest ) == -1 ) | 764 | if ( symlink( linkFile, linkDest ) == -1 ) |
763 | emit signalIpkgMessage( tr( "Error linkling '%1' to '%2'" ) | 765 | emit signalIpkgMessage( tr( "Error linkling '%1' to '%2'" ) |
764 | .arg( linkFile ) | 766 | .arg( linkFile ) |
765 | .arg( linkDest ) ); | 767 | .arg( linkDest ) ); |
766 | } | 768 | } |
767 | packageFile.close(); | 769 | packageFile.close(); |
768 | } | 770 | } |
769 | } | 771 | } |
770 | } | 772 | } |
771 | } | 773 | } |
772 | 774 | ||
773 | void OIpkg::unlinkPackage( const QString &package, OConfItemList *destList ) | 775 | void OIpkg::unlinkPackage( const QString &package, OConfItemList *destList ) |
774 | { | 776 | { |
775 | if ( !package.isNull() ) | 777 | if ( !package.isNull() ) |
776 | { | 778 | { |
777 | // Find destination package is installed in | 779 | // Find destination package is installed in |
778 | if ( destList ) | 780 | if ( destList ) |
779 | { | 781 | { |
780 | OConfItemListIterator it( *destList ); | 782 | OConfItemListIterator it( *destList ); |
781 | for ( ; it.current(); ++it ) | 783 | for ( ; it.current(); ++it ) |
782 | { | 784 | { |
783 | OConfItem *dest = it.current(); | 785 | OConfItem *dest = it.current(); |
784 | QString destInfoFileName = QString( "%1/%2/%3.list" ).arg( dest->value() ) | 786 | QString destInfoFileName = QString( "%1/%2/%3.list" ).arg( dest->value() ) |
785 | .arg( IPKG_INFO_PATH ) | 787 | .arg( IPKG_INFO_PATH ) |
786 | .arg( package ); | 788 | .arg( package ); |
787 | //emit signalIpkgMessage( QString( "Looking for '%1'" ).arg ( destInfoFileName ) ); | 789 | //emit signalIpkgMessage( QString( "Looking for '%1'" ).arg ( destInfoFileName ) ); |
788 | 790 | ||
789 | // If found and destination is not 'root', remove symbolic links | 791 | // If found and destination is not 'root', remove symbolic links |
790 | if ( QFile::exists( destInfoFileName ) && dest->name() != "root" ) | 792 | if ( QFile::exists( destInfoFileName ) && dest->name() != "root" ) |
791 | { | 793 | { |
792 | QFile destInfoFile( destInfoFileName ); | 794 | QFile destInfoFile( destInfoFileName ); |
793 | if ( destInfoFile.open( IO_ReadOnly ) ) | 795 | if ( destInfoFile.open( IO_ReadOnly ) ) |
794 | { | 796 | { |
795 | QTextStream t( &destInfoFile ); | 797 | QTextStream t( &destInfoFile ); |
796 | QString linkFile; | 798 | QString linkFile; |
797 | while ( !t.eof() ) | 799 | while ( !t.eof() ) |
798 | { | 800 | { |
799 | // Get the name of the file to link and build the sym link filename | 801 | // Get the name of the file to link and build the sym link filename |
800 | linkFile = t.readLine(); | 802 | linkFile = t.readLine(); |
801 | QString linkDest( linkFile.right( linkFile.length() - | 803 | QString linkDest( linkFile.right( linkFile.length() - |
802 | dest->value().length() ) ); | 804 | dest->value().length() ) ); |
803 | linkDest.prepend( rootPath() ); | 805 | linkDest.prepend( rootPath() ); |
804 | 806 | ||
805 | //emit signalIpkgMessage( QString( "Deleting: '%1'" ).arg( linkDest ) ); | 807 | //emit signalIpkgMessage( QString( "Deleting: '%1'" ).arg( linkDest ) ); |
806 | QFile::remove( linkDest ); | 808 | QFile::remove( linkDest ); |
807 | } | 809 | } |
808 | destInfoFile.close(); | 810 | destInfoFile.close(); |
809 | } | 811 | } |
810 | 812 | ||
811 | emit signalIpkgMessage( tr( "Links removed for: %1" ).arg( package ) ); | 813 | emit signalIpkgMessage( tr( "Links removed for: %1" ).arg( package ) ); |
812 | return; | 814 | return; |
813 | } | 815 | } |
814 | } | 816 | } |
815 | } | 817 | } |
816 | } | 818 | } |
817 | } | 819 | } |
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 | ||
47 | class OConfItemList; | 49 | class OConfItemList; |
48 | 50 | ||
49 | class OIpkg : public QObject | 51 | class OIpkg : public QObject |
50 | { | 52 | { |
51 | Q_OBJECT | 53 | Q_OBJECT |
52 | 54 | ||
53 | public: | 55 | public: |
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 ¶meters = QStringList(), | 81 | const QStringList ¶meters = 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 | ||
90 | private: | 92 | private: |
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 | ||
104 | signals: | 106 | signals: |
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 | |||
@@ -1,700 +1,716 @@ | |||
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 | #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 | ||
48 | OIpkgConfigDlg::OIpkgConfigDlg( OIpkg *ipkg, bool installOptions, QWidget *parent ) | 48 | OIpkgConfigDlg::OIpkgConfigDlg( OIpkg *ipkg, bool installOptions, QWidget *parent ) |
49 | : QDialog( parent, QString::null, true, WStyle_ContextHelp ) | 49 | : QDialog( parent, QString::null, true, WStyle_ContextHelp ) |
50 | , m_ipkg( ipkg ) | 50 | , m_ipkg( ipkg ) |
51 | , m_configs( 0l ) | 51 | , m_configs( 0l ) |
52 | , m_installOptions( installOptions ) | 52 | , m_installOptions( installOptions ) |
53 | , m_serverCurrent( -1 ) | 53 | , m_serverCurrent( -1 ) |
54 | , m_destCurrent( -1 ) | 54 | , m_destCurrent( -1 ) |
55 | , m_layout( this, 2, 4 ) | 55 | , m_layout( this, 2, 4 ) |
56 | , m_tabWidget( this ) | 56 | , m_tabWidget( this ) |
57 | { | 57 | { |
58 | setCaption( tr( "Configuration" ) ); | 58 | setCaption( tr( "Configuration" ) ); |
59 | 59 | ||
60 | // Initialize configuration widgets | 60 | // Initialize configuration widgets |
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 | ||
88 | void OIpkgConfigDlg::accept() | 88 | void 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 | ||
159 | void OIpkgConfigDlg::reject() | 163 | void OIpkgConfigDlg::reject() |
160 | { | 164 | { |
161 | if ( m_configs ) | 165 | if ( m_configs ) |
162 | delete m_configs; | 166 | delete m_configs; |
163 | } | 167 | } |
164 | 168 | ||
165 | void OIpkgConfigDlg::initServerWidget() | 169 | void 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 | ||
209 | void OIpkgConfigDlg::initDestinationWidget() | 213 | void 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 | ||
253 | void OIpkgConfigDlg::initProxyWidget() | 257 | void 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 | ||
309 | void OIpkgConfigDlg::initOptionsWidget() | 313 | void 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 | ||
370 | void OIpkgConfigDlg::initData() | 382 | void 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 | ||
440 | void OIpkgConfigDlg::slotServerSelected( int index ) | 456 | void 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 | ||
449 | void OIpkgConfigDlg::slotServerNew() | 465 | void 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 | ||
468 | void OIpkgConfigDlg::slotServerEdit() | 484 | void 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 | ||
487 | void OIpkgConfigDlg::slotServerDelete() | 503 | void 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 | ||
500 | void OIpkgConfigDlg::slotDestSelected( int index ) | 516 | void 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 | ||
509 | void OIpkgConfigDlg::slotDestNew() | 525 | void 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 | ||
528 | void OIpkgConfigDlg::slotDestEdit() | 544 | void 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 | ||
547 | void OIpkgConfigDlg::slotDestDelete() | 563 | void 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 | ||
560 | void OIpkgConfigDlg::slotOptSelectSourceListsPath() | 576 | void 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 ) == '/' ) |
564 | path.truncate( path.length() - 1 ); | 580 | path.truncate( path.length() - 1 ); |
565 | if ( !path.isNull() ) | 581 | if ( !path.isNull() ) |
566 | m_optSourceLists->setText( path ); | 582 | m_optSourceLists->setText( path ); |
567 | } | 583 | } |
568 | 584 | ||
569 | OIpkgServerDlg::OIpkgServerDlg( OConfItem *server, QWidget *parent ) | 585 | OIpkgServerDlg::OIpkgServerDlg( OConfItem *server, QWidget *parent ) |
570 | : QDialog( parent, QString::null, true, WStyle_ContextHelp ) | 586 | : QDialog( parent, QString::null, true, WStyle_ContextHelp ) |
571 | , m_server( server ) | 587 | , m_server( server ) |
572 | { | 588 | { |
573 | setCaption( tr( "Edit Server" ) ); | 589 | setCaption( tr( "Edit Server" ) ); |
574 | 590 | ||
575 | // Initialize UI | 591 | // Initialize UI |
576 | QVBoxLayout *layout = new QVBoxLayout( this, 2, 4 ); | 592 | QVBoxLayout *layout = new QVBoxLayout( this, 2, 4 ); |
577 | 593 | ||
578 | m_active = new QCheckBox( tr( "Active" ), this ); | 594 | m_active = new QCheckBox( tr( "Active" ), this ); |
579 | QWhatsThis::add( m_active, tr( "Tap here to indicate whether this entry is active or not." ) ); | 595 | QWhatsThis::add( m_active, tr( "Tap here to indicate whether this entry is active or not." ) ); |
580 | layout->addWidget( m_active ); | 596 | layout->addWidget( m_active ); |
581 | 597 | ||
582 | layout->addStretch(); | 598 | layout->addStretch(); |
583 | 599 | ||
584 | QLabel *label = new QLabel( tr( "Name:" ), this ); | 600 | QLabel *label = new QLabel( tr( "Name:" ), this ); |
585 | QWhatsThis::add( label, tr( "Enter the name of this entry here." ) ); | 601 | QWhatsThis::add( label, tr( "Enter the name of this entry here." ) ); |
586 | layout->addWidget( label ); | 602 | layout->addWidget( label ); |
587 | m_name = new QLineEdit( this ); | 603 | m_name = new QLineEdit( this ); |
588 | QWhatsThis::add( m_name, tr( "Enter the name of this entry here." ) ); | 604 | QWhatsThis::add( m_name, tr( "Enter the name of this entry here." ) ); |
589 | layout->addWidget( m_name ); | 605 | layout->addWidget( m_name ); |
590 | 606 | ||
591 | layout->addStretch(); | 607 | layout->addStretch(); |
592 | 608 | ||
593 | label = new QLabel( tr( "Address:" ), this ); | 609 | label = new QLabel( tr( "Address:" ), this ); |
594 | QWhatsThis::add( label, tr( "Enter the URL address of this entry here." ) ); | 610 | QWhatsThis::add( label, tr( "Enter the URL address of this entry here." ) ); |
595 | layout->addWidget( label ); | 611 | layout->addWidget( label ); |
596 | m_location = new QLineEdit( this ); | 612 | m_location = new QLineEdit( this ); |
597 | QWhatsThis::add( m_location, tr( "Enter the URL address of this entry here." ) ); | 613 | QWhatsThis::add( m_location, tr( "Enter the URL address of this entry here." ) ); |
598 | layout->addWidget( m_location ); | 614 | layout->addWidget( m_location ); |
599 | 615 | ||
600 | layout->addStretch(); | 616 | layout->addStretch(); |
601 | 617 | ||
602 | m_compressed = new QCheckBox( tr( "Compressed server feed" ), this ); | 618 | m_compressed = new QCheckBox( tr( "Compressed server feed" ), this ); |
603 | QWhatsThis::add( m_compressed, tr( "Tap here to indicate whether the server support compressed archives or not." ) ); | 619 | QWhatsThis::add( m_compressed, tr( "Tap here to indicate whether the server support compressed archives or not." ) ); |
604 | layout->addWidget( m_compressed ); | 620 | layout->addWidget( m_compressed ); |
605 | 621 | ||
606 | // Populate initial information | 622 | // Populate initial information |
607 | if ( m_server ) | 623 | if ( m_server ) |
608 | { | 624 | { |
609 | m_name->setText( m_server->name() ); | 625 | m_name->setText( m_server->name() ); |
610 | m_location->setText( m_server->value() ); | 626 | m_location->setText( m_server->value() ); |
611 | m_compressed->setChecked( m_server->features().contains( "Compressed" ) ); | 627 | m_compressed->setChecked( m_server->features().contains( "Compressed" ) ); |
612 | m_active->setChecked( m_server->active() ); | 628 | m_active->setChecked( m_server->active() ); |
613 | } | 629 | } |
614 | } | 630 | } |
615 | 631 | ||
616 | void OIpkgServerDlg::accept() | 632 | void OIpkgServerDlg::accept() |
617 | { | 633 | { |
618 | // Save information entered | 634 | // Save information entered |
619 | QString name = m_name->text(); | 635 | QString name = m_name->text(); |
620 | name.replace( QRegExp( " " ), "_" ); | 636 | name.replace( QRegExp( " " ), "_" ); |
621 | m_server->setName( name ); | 637 | m_server->setName( name ); |
622 | m_server->setValue( m_location->text() ); | 638 | m_server->setValue( m_location->text() ); |
623 | m_compressed->isChecked() ? m_server->setFeatures( "Compressed" ) | 639 | m_compressed->isChecked() ? m_server->setFeatures( "Compressed" ) |
624 | : m_server->setFeatures( QString::null ); | 640 | : m_server->setFeatures( QString::null ); |
625 | m_server->setActive( m_active->isChecked() ); | 641 | m_server->setActive( m_active->isChecked() ); |
626 | 642 | ||
627 | QDialog::accept(); | 643 | QDialog::accept(); |
628 | } | 644 | } |
629 | 645 | ||
630 | OIpkgDestDlg::OIpkgDestDlg( OConfItem *dest, QWidget *parent ) | 646 | OIpkgDestDlg::OIpkgDestDlg( OConfItem *dest, QWidget *parent ) |
631 | : QDialog( parent, QString::null, true, WStyle_ContextHelp ) | 647 | : QDialog( parent, QString::null, true, WStyle_ContextHelp ) |
632 | , m_dest( dest ) | 648 | , m_dest( dest ) |
633 | { | 649 | { |
634 | setCaption( tr( "Edit Destination" ) ); | 650 | setCaption( tr( "Edit Destination" ) ); |
635 | 651 | ||
636 | // Initialize UI | 652 | // Initialize UI |
637 | QVBoxLayout *layout = new QVBoxLayout( this, 2, 4 ); | 653 | QVBoxLayout *layout = new QVBoxLayout( this, 2, 4 ); |
638 | 654 | ||
639 | m_active = new QCheckBox( tr( "Active" ), this ); | 655 | m_active = new QCheckBox( tr( "Active" ), this ); |
640 | QWhatsThis::add( m_active, tr( "Tap here to indicate whether this entry is active or not." ) ); | 656 | QWhatsThis::add( m_active, tr( "Tap here to indicate whether this entry is active or not." ) ); |
641 | layout->addWidget( m_active ); | 657 | layout->addWidget( m_active ); |
642 | 658 | ||
643 | layout->addStretch(); | 659 | layout->addStretch(); |
644 | 660 | ||
645 | QLabel *label = new QLabel( tr( "Name:" ), this ); | 661 | QLabel *label = new QLabel( tr( "Name:" ), this ); |
646 | QWhatsThis::add( label, tr( "Enter the name of this entry here." ) ); | 662 | QWhatsThis::add( label, tr( "Enter the name of this entry here." ) ); |
647 | layout->addWidget( label ); | 663 | layout->addWidget( label ); |
648 | m_name = new QLineEdit( this ); | 664 | m_name = new QLineEdit( this ); |
649 | QWhatsThis::add( m_name, tr( "Enter the name of this entry here." ) ); | 665 | QWhatsThis::add( m_name, tr( "Enter the name of this entry here." ) ); |
650 | layout->addWidget( m_name ); | 666 | layout->addWidget( m_name ); |
651 | 667 | ||
652 | layout->addStretch(); | 668 | layout->addStretch(); |
653 | 669 | ||
654 | label = new QLabel( tr( "Location:" ), this ); | 670 | label = new QLabel( tr( "Location:" ), this ); |
655 | QWhatsThis::add( label, tr( "Enter the absolute directory path of this entry here." ) ); | 671 | QWhatsThis::add( label, tr( "Enter the absolute directory path of this entry here." ) ); |
656 | layout->addWidget( label ); | 672 | layout->addWidget( label ); |
657 | 673 | ||
658 | QHBoxLayout *layout2 = new QHBoxLayout( this, 2, 4 ); | 674 | QHBoxLayout *layout2 = new QHBoxLayout( this, 2, 4 ); |
659 | layout->addLayout( layout2 ); | 675 | layout->addLayout( layout2 ); |
660 | 676 | ||
661 | m_location = new QLineEdit( this ); | 677 | m_location = new QLineEdit( this ); |
662 | QWhatsThis::add( m_location, tr( "Enter the absolute directory path of this entry here." ) ); | 678 | QWhatsThis::add( m_location, tr( "Enter the absolute directory path of this entry here." ) ); |
663 | layout2->addWidget( m_location ); | 679 | layout2->addWidget( m_location ); |
664 | QPushButton *btn = new QPushButton( Opie::Core::OResource::loadPixmap( "folder", Opie::Core::OResource::SmallIcon ), | 680 | QPushButton *btn = new QPushButton( Opie::Core::OResource::loadPixmap( "folder", Opie::Core::OResource::SmallIcon ), |
665 | QString::null, this ); | 681 | QString::null, this ); |
666 | btn->setMaximumWidth( btn->height() ); | 682 | btn->setMaximumWidth( btn->height() ); |
667 | QWhatsThis::add( btn, tr( "Tap here to select the desired location." ) ); | 683 | QWhatsThis::add( btn, tr( "Tap here to select the desired location." ) ); |
668 | connect( btn, SIGNAL(clicked()), this, SLOT(slotSelectPath()) ); | 684 | connect( btn, SIGNAL(clicked()), this, SLOT(slotSelectPath()) ); |
669 | layout2->addWidget( btn ); | 685 | layout2->addWidget( btn ); |
670 | 686 | ||
671 | // Populate initial information | 687 | // Populate initial information |
672 | if ( m_dest ) | 688 | if ( m_dest ) |
673 | { | 689 | { |
674 | m_name->setText( m_dest->name() ); | 690 | m_name->setText( m_dest->name() ); |
675 | m_location->setText( m_dest->value() ); | 691 | m_location->setText( m_dest->value() ); |
676 | m_active->setChecked( m_dest->active() ); | 692 | m_active->setChecked( m_dest->active() ); |
677 | } | 693 | } |
678 | } | 694 | } |
679 | 695 | ||
680 | void OIpkgDestDlg::accept() | 696 | void OIpkgDestDlg::accept() |
681 | { | 697 | { |
682 | // Save information entered | 698 | // Save information entered |
683 | QString name = m_name->text(); | 699 | QString name = m_name->text(); |
684 | name.replace( QRegExp( " " ), "_" ); | 700 | name.replace( QRegExp( " " ), "_" ); |
685 | m_dest->setName( name ); | 701 | m_dest->setName( name ); |
686 | m_dest->setValue( m_location->text() ); | 702 | m_dest->setValue( m_location->text() ); |
687 | m_dest->setActive( m_active->isChecked() ); | 703 | m_dest->setActive( m_active->isChecked() ); |
688 | 704 | ||
689 | QDialog::accept(); | 705 | QDialog::accept(); |
690 | } | 706 | } |
691 | 707 | ||
692 | void OIpkgDestDlg::slotSelectPath() | 708 | void OIpkgDestDlg::slotSelectPath() |
693 | { | 709 | { |
694 | QString path = Opie::Ui::OFileDialog::getDirectory( 0, m_location->text() ); | 710 | QString path = Opie::Ui::OFileDialog::getDirectory( 0, m_location->text() ); |
695 | if ( path.at( path.length() - 1 ) == '/' ) | 711 | if ( path.at( path.length() - 1 ) == '/' ) |
696 | path.truncate( path.length() - 1 ); | 712 | path.truncate( path.length() - 1 ); |
697 | if ( !path.isNull() ) | 713 | if ( !path.isNull() ) |
698 | m_location->setText( path ); | 714 | m_location->setText( path ); |
699 | } | 715 | } |
700 | 716 | ||
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 | ||
41 | class QCheckBox; | 41 | class QCheckBox; |
42 | class QComboBox; | 42 | class QComboBox; |
43 | class QLineEdit; | 43 | class QLineEdit; |
44 | class QListBox; | 44 | class QListBox; |
45 | class QPushButton; | 45 | class QPushButton; |
46 | 46 | ||
47 | class OIpkgConfigDlg : public QDialog | 47 | class OIpkgConfigDlg : public QDialog |
48 | { | 48 | { |
49 | Q_OBJECT | 49 | Q_OBJECT |
50 | 50 | ||
51 | public: | 51 | public: |
52 | OIpkgConfigDlg( OIpkg *ipkg = 0l, bool installOptions = false, QWidget *parent = 0l ); | 52 | OIpkgConfigDlg( OIpkg *ipkg = 0l, bool installOptions = false, QWidget *parent = 0l ); |
53 | 53 | ||
54 | protected slots: | 54 | protected slots: |
55 | void accept(); | 55 | void accept(); |
56 | void reject(); | 56 | void reject(); |
57 | 57 | ||
58 | private: | 58 | private: |
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 | ||
109 | private slots: | 111 | private 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 | ||
123 | class OIpkgServerDlg : public QDialog | 125 | class OIpkgServerDlg : public QDialog |
124 | { | 126 | { |
125 | Q_OBJECT | 127 | Q_OBJECT |
126 | 128 | ||
127 | public: | 129 | public: |
128 | OIpkgServerDlg( OConfItem *server = 0l, QWidget *parent = 0l ); | 130 | OIpkgServerDlg( OConfItem *server = 0l, QWidget *parent = 0l ); |
129 | 131 | ||
130 | protected slots: | 132 | protected slots: |
131 | void accept(); | 133 | void accept(); |
132 | 134 | ||
133 | private: | 135 | private: |
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 | ||
143 | class OIpkgDestDlg : public QDialog | 145 | class OIpkgDestDlg : public QDialog |
144 | { | 146 | { |
145 | Q_OBJECT | 147 | Q_OBJECT |
146 | 148 | ||
147 | public: | 149 | public: |
148 | OIpkgDestDlg( OConfItem *dest = 0l, QWidget *parent = 0l ); | 150 | OIpkgDestDlg( OConfItem *dest = 0l, QWidget *parent = 0l ); |
149 | 151 | ||
150 | protected slots: | 152 | protected slots: |
151 | void accept(); | 153 | void accept(); |
152 | 154 | ||
153 | private: | 155 | private: |
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 | ||
161 | private slots: | 163 | private slots: |
162 | void slotSelectPath(); | 164 | void slotSelectPath(); |
163 | }; | 165 | }; |
164 | 166 | ||
165 | #endif | 167 | #endif |