author | mickeyl <mickeyl> | 2005-04-24 05:48:32 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2005-04-24 05:48:32 (UTC) |
commit | ceaea9869115287b48781fabc938bd51cb67625c (patch) (unidiff) | |
tree | 4590e122439ac35ded56cad8b22f327d73e72844 | |
parent | 07f375f59f19a001685db1b78e9ba9040c73bbeb (diff) | |
download | opie-ceaea9869115287b48781fabc938bd51cb67625c.zip opie-ceaea9869115287b48781fabc938bd51cb67625c.tar.gz opie-ceaea9869115287b48781fabc938bd51cb67625c.tar.bz2 |
fix crash on kernels without swap support. patch courtesy Seneca Cunningham
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | noncore/applets/memoryapplet/swapfile.cpp | 8 |
2 files changed, 9 insertions, 2 deletions
@@ -1,279 +1,280 @@ | |||
1 | 2005-??-??Opie 1.2.1 | 1 | 2005-??-??Opie 1.2.1 |
2 | 2 | ||
3 | 3 | ||
4 | New Features | 4 | New Features |
5 | ------------ | 5 | ------------ |
6 | * OpieStumbler: New application (skyhusker) | 6 | * OpieStumbler: Scans WiFi networks using the wireless extension scanning (skyhusker) |
7 | 7 | ||
8 | Fixed Bugs | 8 | Fixed Bugs |
9 | ---------- | 9 | ---------- |
10 | * #1535- Missing line break and unnecessary location shown with Today-Calendar plugin (deller) | 10 | * #1535- Missing line break and unnecessary location shown with Today-Calendar plugin (deller) |
11 | * #1565 - crash-fix in odevice.cpp while scanning the distribution table (deller) | 11 | * #1565 - crash-fix in odevice.cpp while scanning the distribution table (deller) |
12 | * #1614 - Make Opie-console start in $HOME instead of / (skyhusker) | 12 | * #1614 - Make Opie-console start in $HOME instead of / (skyhusker) |
13 | * n.a.- always show volume and wireless applet popups inside visible screen (deller) | 13 | * n.a.- always show volume and wireless applet popups inside visible screen (deller) |
14 | * n.a. - scale O-Menu-Applets appropriately (mickeyl) | 14 | * n.a. - scale O-Menu-Applets appropriately (mickeyl) |
15 | * n.a.- libopienet: fix bugs in wireless scanning and setting SSID (skyhusker) | 15 | * n.a.- libopienet: fix bugs in wireless scanning and setting SSID (skyhusker) |
16 | * n.a.- Wellenreiter: relax WE version matching test a bit (mickeyl) | 16 | * n.a.- Wellenreiter: relax WE version matching test a bit (mickeyl) |
17 | * n.a.- scale BluezApplet appropriately (mickeyl) | 17 | * n.a.- scale BluezApplet appropriately (mickeyl) |
18 | * n.a.- memoryapplet: fix crash in memoryapplet on kernels without swap support (seneca cunningham) | ||
18 | 19 | ||
19 | Internal | 20 | Internal |
20 | -------- | 21 | -------- |
21 | * make BluezApplet use OTaskbarApplet (mickeyl) | 22 | * make BluezApplet use OTaskbarApplet (mickeyl) |
22 | 23 | ||
23 | 2005-03-25Opie 1.2.0 | 24 | 2005-03-25Opie 1.2.0 |
24 | 25 | ||
25 | Fixed Bugs | 26 | Fixed Bugs |
26 | ---------- | 27 | ---------- |
27 | * #1613 - AdvancedFM - scale toolbar icons appropriately (drw) | 28 | * #1613 - AdvancedFM - scale toolbar icons appropriately (drw) |
28 | * #1620 - OFileSelector - show the button on press and not on press on hold (alwin) | 29 | * #1620 - OFileSelector - show the button on press and not on press on hold (alwin) |
29 | * #1473 - Opie-Eye - Same as #1620 but we lack a common FileSystem Button class (zecke) | 30 | * #1473 - Opie-Eye - Same as #1620 but we lack a common FileSystem Button class (zecke) |
30 | * n.a. - PackageManager - fix bug where messages show up multiple times in install dialog (drw) | 31 | * n.a. - PackageManager - fix bug where messages show up multiple times in install dialog (drw) |
31 | * n.a.- make qpeglobal.h include qglobal.h (zecke) | 32 | * n.a.- make qpeglobal.h include qglobal.h (zecke) |
32 | 33 | ||
33 | 2005-03-20Opie 1.2.0-rc1 | 34 | 2005-03-20Opie 1.2.0-rc1 |
34 | 35 | ||
35 | 36 | ||
36 | New Features | 37 | New Features |
37 | ------------ | 38 | ------------ |
38 | * Launcher: Support a static background pixmap (mickeyl) | 39 | * Launcher: Support a static background pixmap (mickeyl) |
39 | * LauncherSettings: Choose whether to have a static background pixmap (mickeyl) | 40 | * LauncherSettings: Choose whether to have a static background pixmap (mickeyl) |
40 | * PackageManager supports the 'lists_dir' ipkg configuration option (drw) | 41 | * PackageManager supports the 'lists_dir' ipkg configuration option (drw) |
41 | * Added hi-res inline images for large resolution devices (drw) | 42 | * Added hi-res inline images for large resolution devices (drw) |
42 | * Improved launcher icons for consistency (ar) | 43 | * Improved launcher icons for consistency (ar) |
43 | * Datebook: Added plugin system to datebook so holidays and birthdays from contacts may displayed in datebook (alwin) | 44 | * Datebook: Added plugin system to datebook so holidays and birthdays from contacts may displayed in datebook (alwin) |
44 | 45 | ||
45 | Fixed Bugs | 46 | Fixed Bugs |
46 | ---------- | 47 | ---------- |
47 | * #1236 - VCards contained empty home and work address entries causing Palms to crash (eilers) | 48 | * #1236 - VCards contained empty home and work address entries causing Palms to crash (eilers) |
48 | * #1412 - Launcher Settings - fixed default settings for background in Edit tab dialog (drw) | 49 | * #1412 - Launcher Settings - fixed default settings for background in Edit tab dialog (drw) |
49 | * #1472 - Opie textedit now check for unsaved changes on ESC key (ljp) | 50 | * #1472 - Opie textedit now check for unsaved changes on ESC key (ljp) |
50 | * #1474 - Implement GUI for Scrollbars on the Left in Appearance (zecke) | 51 | * #1474 - Implement GUI for Scrollbars on the Left in Appearance (zecke) |
51 | * #1482 - Fix double '/' in paths (zecke) | 52 | * #1482 - Fix double '/' in paths (zecke) |
52 | * #1536 - Autosave of custom locations in opie backup (ar) | 53 | * #1536 - Autosave of custom locations in opie backup (ar) |
53 | * #1539 - Fixed displaying too long path in the delete dialog in opie-eye (zecke) | 54 | * #1539 - Fixed displaying too long path in the delete dialog in opie-eye (zecke) |
54 | * #1540 - Implemented deletion of DocLnks in opie-eye (zecke) | 55 | * #1540 - Implemented deletion of DocLnks in opie-eye (zecke) |
55 | * #1542 - Fixed Todo crash when priority < 1 or > 5 (drw) | 56 | * #1542 - Fixed Todo crash when priority < 1 or > 5 (drw) |
56 | * #1550 - Browse for alarm sound start in QPEDIR/sounds/ (zecke) | 57 | * #1550 - Browse for alarm sound start in QPEDIR/sounds/ (zecke) |
57 | * #1554 - Fixed Opie-Console name in .desktop file (mickeyl) | 58 | * #1554 - Fixed Opie-Console name in .desktop file (mickeyl) |
58 | * #1556 - Start to look for sound files in /opt/QtPalmtop/sounds (zecke) | 59 | * #1556 - Start to look for sound files in /opt/QtPalmtop/sounds (zecke) |
59 | * #1558 - Fixed opie-login breaking opie startup (mickeyl) | 60 | * #1558 - Fixed opie-login breaking opie startup (mickeyl) |
60 | * #1560 - Fixed Opie-Console picking up the wrong shell (bluelightning) | 61 | * #1560 - Fixed Opie-Console picking up the wrong shell (bluelightning) |
61 | * #1570 - Confirmation needed befor Restore a backup and overwrite local data (ar) | 62 | * #1570 - Confirmation needed befor Restore a backup and overwrite local data (ar) |
62 | * #1591 - Addressbook sortorder changed by clicking on column 0 (eilers) | 63 | * #1591 - Addressbook sortorder changed by clicking on column 0 (eilers) |
63 | * #1599 - Security - change recommendation for opie-multiauth to opie-securityplugin (gints) | 64 | * #1599 - Security - change recommendation for opie-multiauth to opie-securityplugin (gints) |
64 | * #1604 - Checkbook crashed on startup (drw) | 65 | * #1604 - Checkbook crashed on startup (drw) |
65 | * #1608 - Addressbook crashed after search, which may caused by not initialzed member variable (eilers) | 66 | * #1608 - Addressbook crashed after search, which may caused by not initialzed member variable (eilers) |
66 | * #1608 - QueryByExampe-Datediff on SQL database did not worked properly (eilers) | 67 | * #1608 - QueryByExampe-Datediff on SQL database did not worked properly (eilers) |
67 | * n.a. - Netsystemtime - fixed UI to prevent error dialog from displaying when it shouldn't, get rid of some compiler warnings (drw) | 68 | * n.a. - Netsystemtime - fixed UI to prevent error dialog from displaying when it shouldn't, get rid of some compiler warnings (drw) |
68 | * n.a. - PackageManager - fixed where last package in status file was not shown as installed when it should be (drw) | 69 | * n.a. - PackageManager - fixed where last package in status file was not shown as installed when it should be (drw) |
69 | * n.a. - PackageManager - fixed bug where lists_dir was not being honored at startup (drw) | 70 | * n.a. - PackageManager - fixed bug where lists_dir was not being honored at startup (drw) |
70 | * n.a. - PackageManager - provided default value for lists_dir when none is entered in configuration dialog (drw) | 71 | * n.a. - PackageManager - provided default value for lists_dir when none is entered in configuration dialog (drw) |
71 | * n.a. - OTabWidget - fixed scroll buttons, fix display position of tabs (drw) | 72 | * n.a. - OTabWidget - fixed scroll buttons, fix display position of tabs (drw) |
72 | * n.a. - AddressBook - fixed sorting by 'File As' name (drw) | 73 | * n.a. - AddressBook - fixed sorting by 'File As' name (drw) |
73 | * n.a. - AddressBook - fixed category handling for 'All' and 'Unfiled' (eilers) | 74 | * n.a. - AddressBook - fixed category handling for 'All' and 'Unfiled' (eilers) |
74 | * n.a. - AddressBook - fixed letter picker record selection and sort records afterwards (drw) | 75 | * n.a. - AddressBook - fixed letter picker record selection and sort records afterwards (drw) |
75 | 76 | ||
76 | Internal | 77 | Internal |
77 | -------- | 78 | -------- |
78 | * Worked around bug in Qt/Embedded 2.3.10: qt_version() returns 231 (mickeyl) | 79 | * Worked around bug in Qt/Embedded 2.3.10: qt_version() returns 231 (mickeyl) |
79 | * Killed the need for weak symbols in QtE (zecke) | 80 | * Killed the need for weak symbols in QtE (zecke) |
80 | * Added optional building libqpe without inline images (mickeyl) | 81 | * Added optional building libqpe without inline images (mickeyl) |
81 | * OColorButton - fixed so does not emit a colorSelected signal inside of resizeEvent (drw) | 82 | * OColorButton - fixed so does not emit a colorSelected signal inside of resizeEvent (drw) |
82 | 83 | ||
83 | 2005-02-03Opie 1.1.9 | 84 | 2005-02-03Opie 1.1.9 |
84 | 85 | ||
85 | New Features | 86 | New Features |
86 | ------------ | 87 | ------------ |
87 | * Number of icon columns in Launcher is customizable through Launcher.conf (hrw,zecke,mickeyl) | 88 | * Number of icon columns in Launcher is customizable through Launcher.conf (hrw,zecke,mickeyl) |
88 | * Number of icon columns in Launcher is customizable through LauncherSettings (mickeyl) | 89 | * Number of icon columns in Launcher is customizable through LauncherSettings (mickeyl) |
89 | * Usability enhancements in OpieIRC (skyhusker) | 90 | * Usability enhancements in OpieIRC (skyhusker) |
90 | 91 | ||
91 | Fixed Bugs | 92 | Fixed Bugs |
92 | ---------- | 93 | ---------- |
93 | * #1501 - Fixed bug in todo sql backend (eilers) | 94 | * #1501 - Fixed bug in todo sql backend (eilers) |
94 | * #1505 - Added more Swap sizes in memoryapplet (mickeyl) | 95 | * #1505 - Added more Swap sizes in memoryapplet (mickeyl) |
95 | * #1525 - Hopefully fixed double alarms and not removing alarms set with the Clock application (zecke) | 96 | * #1525 - Hopefully fixed double alarms and not removing alarms set with the Clock application (zecke) |
96 | * #1533 - Security Owner Dialog (shown in case of unsuccessfull authentiacation) wasn't able to display information in non latin1 encoding (zecke) | 97 | * #1533 - Security Owner Dialog (shown in case of unsuccessfull authentiacation) wasn't able to display information in non latin1 encoding (zecke) |
97 | * n.a. - Removed hard coded font sizes in a couple of inputmethods (mickeyl) | 98 | * n.a. - Removed hard coded font sizes in a couple of inputmethods (mickeyl) |
98 | * n.a. - Removed MediumDlg appearing prior to FirstUsage wizard (i.e. calibration) (mickeyl) | 99 | * n.a. - Removed MediumDlg appearing prior to FirstUsage wizard (i.e. calibration) (mickeyl) |
99 | * n.a. - Fixed numerous buglets in OpieIRC (skyhusker) | 100 | * n.a. - Fixed numerous buglets in OpieIRC (skyhusker) |
100 | 101 | ||
101 | Internal | 102 | Internal |
102 | -------- | 103 | -------- |
103 | * Added the Qtopia 1.7 SDK macros for quick-apps to easa compilation of 3rd party apps against our headers (mickeyl) | 104 | * Added the Qtopia 1.7 SDK macros for quick-apps to easa compilation of 3rd party apps against our headers (mickeyl) |
104 | * You can now use the Opie build system in combination with a OpenEmbedded staging area which makes a nice cross development environment (mickeyl) | 105 | * You can now use the Opie build system in combination with a OpenEmbedded staging area which makes a nice cross development environment (mickeyl) |
105 | * Made Opie compilable with Qt/Embedded 2.3.10 (ar) | 106 | * Made Opie compilable with Qt/Embedded 2.3.10 (ar) |
106 | * Changed Launcher to get default orientation from ODevice w/ QWS_DISPLAY overriding (mickeyl) | 107 | * Changed Launcher to get default orientation from ODevice w/ QWS_DISPLAY overriding (mickeyl) |
107 | * Build tree cleanups (mickeyl) | 108 | * Build tree cleanups (mickeyl) |
108 | 109 | ||
109 | 2004-11-26Opie 1.1.8 | 110 | 2004-11-26Opie 1.1.8 |
110 | 111 | ||
111 | New Features | 112 | New Features |
112 | ------------ | 113 | ------------ |
113 | * PackageManager supports installation of local ipkg files (drw) | 114 | * PackageManager supports installation of local ipkg files (drw) |
114 | * PackageManager supports linking of applications to root (drw) | 115 | * PackageManager supports linking of applications to root (drw) |
115 | * PackageManager supports src/gz feeds (drw,wimpie) | 116 | * PackageManager supports src/gz feeds (drw,wimpie) |
116 | * Added a syslog information tab to sysinfo (mickeyl) | 117 | * Added a syslog information tab to sysinfo (mickeyl) |
117 | * Added new, more consistent, PIM icons + a GIMP teplate (ar) | 118 | * Added new, more consistent, PIM icons + a GIMP teplate (ar) |
118 | 119 | ||
119 | Fixed Bugs | 120 | Fixed Bugs |
120 | ---------- | 121 | ---------- |
121 | * #1017 - Tetrix doesn't display correctly for high resolution screens (drw) | 122 | * #1017 - Tetrix doesn't display correctly for high resolution screens (drw) |
122 | * #1269 - VCards were imported into personal area if it was activated (eilers) | 123 | * #1269 - VCards were imported into personal area if it was activated (eilers) |
123 | * #1464 - Packagemanager dont set active filter after install a package (drw) | 124 | * #1464 - Packagemanager dont set active filter after install a package (drw) |
124 | * #1479 - Improved VCard-Parser to import VCards created by Evolution 2 and Apple Addressbook (eilers) | 125 | * #1479 - Improved VCard-Parser to import VCards created by Evolution 2 and Apple Addressbook (eilers) |
125 | * #1493 - Fixed one column layout bug of the launcher (hrw) | 126 | * #1493 - Fixed one column layout bug of the launcher (hrw) |
126 | * n.a. - PackageManager - (Minor UI tweak) in filter dialog, when option is enabled, set focus to widget that corresponds to that option (drw) | 127 | * n.a. - PackageManager - (Minor UI tweak) in filter dialog, when option is enabled, set focus to widget that corresponds to that option (drw) |
127 | * n.a. - PackageManager - (Minor UI tweak) fix double entry in source feed configuration when adding a new feed (drw) | 128 | * n.a. - PackageManager - (Minor UI tweak) fix double entry in source feed configuration when adding a new feed (drw) |
128 | * n.a. - Battery Applet - fix sizing of battery info popup (drw,mickeyl) | 129 | * n.a. - Battery Applet - fix sizing of battery info popup (drw,mickeyl) |
129 | 130 | ||
130 | Internal | 131 | Internal |
131 | -------- | 132 | -------- |
132 | * Moved libopie1 to unsupported (mickeyl) | 133 | * Moved libopie1 to unsupported (mickeyl) |
133 | * Implemented generic queryByExample() with incremental searching. A lot of internal changes of the Pim2-library (eilers) | 134 | * Implemented generic queryByExample() with incremental searching. A lot of internal changes of the Pim2-library (eilers) |
134 | * Added fast and full featured and incremental sorted() for SQL addressbook backend (eilers) | 135 | * Added fast and full featured and incremental sorted() for SQL addressbook backend (eilers) |
135 | 136 | ||
136 | 2004-11-14Opie 1.1.7 | 137 | 2004-11-14Opie 1.1.7 |
137 | 138 | ||
138 | New Features | 139 | New Features |
139 | ------------ | 140 | ------------ |
140 | * libOpieDB now uses SQLite V3 instead V2. Remember to upgrade your database files! (eilers) | 141 | * libOpieDB now uses SQLite V3 instead V2. Remember to upgrade your database files! (eilers) |
141 | * Backup now uses the busy indicator when backing up and restore (ar) | 142 | * Backup now uses the busy indicator when backing up and restore (ar) |
142 | * OpiePlayer2 gained adding of Directories to the playlist (zecke) | 143 | * OpiePlayer2 gained adding of Directories to the playlist (zecke) |
143 | * OpiePlayer2 better error handling (zecke) | 144 | * OpiePlayer2 better error handling (zecke) |
144 | * OpiePlayer2 progress indication while streaming (zecke) | 145 | * OpiePlayer2 progress indication while streaming (zecke) |
145 | * OpiePlayer2 ported to use libxine 1.0.0-rc6a (brad,zecke) | 146 | * OpiePlayer2 ported to use libxine 1.0.0-rc6a (brad,zecke) |
146 | * Ported brightnessapplet from Qtopia 1.7 (mickeyl) | 147 | * Ported brightnessapplet from Qtopia 1.7 (mickeyl) |
147 | * Opie-Eye got a Digital Camera File Backend (alwin,zecke) | 148 | * Opie-Eye got a Digital Camera File Backend (alwin,zecke) |
148 | * Support for Tuxpad1 of Tradesquare.NL (mickeyl,zecke) | 149 | * Support for Tuxpad1 of Tradesquare.NL (mickeyl,zecke) |
149 | * Opie-Console use Custom Font and Size in a Profile (harlekin) | 150 | * Opie-Console use Custom Font and Size in a Profile (harlekin) |
150 | * Opie-Console transparently log the Output and Input to a file (harlekin) | 151 | * Opie-Console transparently log the Output and Input to a file (harlekin) |
151 | * Added new O-menu icon to lock the PDA immediately: opie-lockapplet (clem) | 152 | * Added new O-menu icon to lock the PDA immediately: opie-lockapplet (clem) |
152 | * Opie-Security now hides the plugin-based authentication tabs if no auth. plugin package is installed (clem) | 153 | * Opie-Security now hides the plugin-based authentication tabs if no auth. plugin package is installed (clem) |
153 | * Opie-Security gained a 'test authentication' button (clem) | 154 | * Opie-Security gained a 'test authentication' button (clem) |
154 | * Opie-Eye got a more unique layout (menubar), a slideshow, user can setup some defaults | 155 | * Opie-Eye got a more unique layout (menubar), a slideshow, user can setup some defaults |
155 | * Opie-Mail improve the handling of POP mail boxes (alwin) | 156 | * Opie-Mail improve the handling of POP mail boxes (alwin) |
156 | * Both Opie-Eye and Opie-Mail were greatly improved due the hard work of Rajko Albrecht(alwin) | 157 | * Both Opie-Eye and Opie-Mail were greatly improved due the hard work of Rajko Albrecht(alwin) |
157 | * Opie IRC - backports of the 'NeIRC fork' (zecke) | 158 | * Opie IRC - backports of the 'NeIRC fork' (zecke) |
158 | 159 | ||
159 | Fixed Bugs | 160 | Fixed Bugs |
160 | ---------- | 161 | ---------- |
161 | * #501 - Pickboard is able to show 'Umlaute' (TT,zecke) | 162 | * #501 - Pickboard is able to show 'Umlaute' (TT,zecke) |
162 | * #608 - Make Opie usable for left handed users (zecke) | 163 | * #608 - Make Opie usable for left handed users (zecke) |
163 | * #957 - Import of VCards/VTodos/VEvents with BASE64 encoding (ljp,zecke) | 164 | * #957 - Import of VCards/VTodos/VEvents with BASE64 encoding (ljp,zecke) |
164 | * #1245 - Opie-Go 'paused' (zecke) | 165 | * #1245 - Opie-Go 'paused' (zecke) |
165 | * #1358 - DocTab didn't show any MimeTypes (was fixed earlier) (zecke) | 166 | * #1358 - DocTab didn't show any MimeTypes (was fixed earlier) (zecke) |
166 | * #1380 - QDateBookAccess::remove() doesn't remove entries (eilers, zecke) | 167 | * #1380 - QDateBookAccess::remove() doesn't remove entries (eilers, zecke) |
167 | * #1395 - Build VNC Backend with gcc3.4 | 168 | * #1395 - Build VNC Backend with gcc3.4 |
168 | * #1440 - The icon of opie-mobilemsg is missing (CoreDump) | 169 | * #1440 - The icon of opie-mobilemsg is missing (CoreDump) |
169 | * #1426 - Add missing opie-bartender Icon (CoreDump) | 170 | * #1426 - Add missing opie-bartender Icon (CoreDump) |
170 | * #1445 - Opie-Sheet Has No Icon (CoreDump) | 171 | * #1445 - Opie-Sheet Has No Icon (CoreDump) |
171 | * #1448 - Brightness Applet added (mickeyl) | 172 | * #1448 - Brightness Applet added (mickeyl) |
172 | * #1450 - ZSame didn't clear the bonus item after winning a game (zecke) | 173 | * #1450 - ZSame didn't clear the bonus item after winning a game (zecke) |
173 | * #1482 - Fix OFileSelector to be able to sort by size (zecke) | 174 | * #1482 - Fix OFileSelector to be able to sort by size (zecke) |
174 | * n.a. - Opie-mail: fixed some crasher, some layout-problems | 175 | * n.a. - Opie-mail: fixed some crasher, some layout-problems |
175 | * n.a. - Converted applications to not hardcode /opt/QtPalmtop but to use QPEApplication::qpeDir (zecke) | 176 | * n.a. - Converted applications to not hardcode /opt/QtPalmtop but to use QPEApplication::qpeDir (zecke) |
176 | * n.a. - Converted usage of qpeDir() not to include a '/' as first charachter of the string (zecke) | 177 | * n.a. - Converted usage of qpeDir() not to include a '/' as first charachter of the string (zecke) |
177 | * n.a. - Build system: Enable distcc and ccache when crosscompiling too, and use them everywhere we can (clem) | 178 | * n.a. - Build system: Enable distcc and ccache when crosscompiling too, and use them everywhere we can (clem) |
178 | * 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) | 179 | * 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) |
179 | * n.a. - Removed hardcoded icon size in a couple of applets (mickeyl) | 180 | * n.a. - Removed hardcoded icon size in a couple of applets (mickeyl) |
180 | 181 | ||
181 | Internal | 182 | Internal |
182 | -------- | 183 | -------- |
183 | * Opie-Qashmoney has been moved to unsupported (mickeyl) | 184 | * Opie-Qashmoney has been moved to unsupported (mickeyl) |
184 | * Opie-Ubrowser has been moved to unsupported (mickeyl) | 185 | * Opie-Ubrowser has been moved to unsupported (mickeyl) |
185 | 186 | ||
186 | 2004-09-17Opie 1.1.6 | 187 | 2004-09-17Opie 1.1.6 |
187 | 188 | ||
188 | New Features | 189 | New Features |
189 | ------------ | 190 | ------------ |
190 | * Fifteen gained configurable number of items (zecke) | 191 | * Fifteen gained configurable number of items (zecke) |
191 | * Fifteen can have custom background images (zecke) | 192 | * Fifteen can have custom background images (zecke) |
192 | * Added daemonizing capabilities to QWS Server [via Qt/Embedded] (mickeyl) | 193 | * Added daemonizing capabilities to QWS Server [via Qt/Embedded] (mickeyl) |
193 | * Integrated the new security framework into libopie2 (zecke,clem) | 194 | * Integrated the new security framework into libopie2 (zecke,clem) |
194 | * Converted the launcher to use the new security framework (zecke) | 195 | * Converted the launcher to use the new security framework (zecke) |
195 | * Backup can now handle custom locations for backup and restore (ar) | 196 | * Backup can now handle custom locations for backup and restore (ar) |
196 | * Implemented right-on-hold feedback (wimpie,zecke) | 197 | * Implemented right-on-hold feedback (wimpie,zecke) |
197 | * Lots of new features in opie-reader (tim,pohly) | 198 | * Lots of new features in opie-reader (tim,pohly) |
198 | * Build system cleanups (schurig) | 199 | * Build system cleanups (schurig) |
199 | 200 | ||
200 | Fixed Bugs | 201 | Fixed Bugs |
201 | -------- | 202 | -------- |
202 | * #1005 - Fixed backup to CompactFlash (ar) | 203 | * #1005 - Fixed backup to CompactFlash (ar) |
203 | * #1167 - Fixed Opie write crashing on more text than one page (ar) | 204 | * #1167 - Fixed Opie write crashing on more text than one page (ar) |
204 | * #1225 - Fixed repeated light flashing on Zaurus with keyz (mickeyl) | 205 | * #1225 - Fixed repeated light flashing on Zaurus with keyz (mickeyl) |
205 | * #1359 - Fixed bookmarks in Gutenbrowser (ljp) | 206 | * #1359 - Fixed bookmarks in Gutenbrowser (ljp) |
206 | * #1361 - Fixed auto upercase in Opie-Addressbook (eilers) | 207 | * #1361 - Fixed auto upercase in Opie-Addressbook (eilers) |
207 | * #1370 - Pimconverter now reacts on cancel key (eilers) | 208 | * #1370 - Pimconverter now reacts on cancel key (eilers) |
208 | * #1376 - Bring back the capslock/numlock display (zecke) | 209 | * #1376 - Bring back the capslock/numlock display (zecke) |
209 | * #1383 - Language settings now warns about losing open apps (Markus Litz) | 210 | * #1383 - Language settings now warns about losing open apps (Markus Litz) |
210 | * #1393 - Fixed line wrap issues in opie-console for the default profile (mickeyl) | 211 | * #1393 - Fixed line wrap issues in opie-console for the default profile (mickeyl) |
211 | * #1394 - Fixed oversized headline in opie-login (coredump) | 212 | * #1394 - Fixed oversized headline in opie-login (coredump) |
212 | * #1396 - Opie-console captures the escape key and vim is working (zecke) | 213 | * #1396 - Opie-console captures the escape key and vim is working (zecke) |
213 | * #1401 - Scrollbar is now only visible if necessary in DocTab (mickeyl) | 214 | * #1401 - Scrollbar is now only visible if necessary in DocTab (mickeyl) |
214 | 215 | ||
215 | 2004-07-06Opie 1.1.4 | 216 | 2004-07-06Opie 1.1.4 |
216 | 217 | ||
217 | New Features | 218 | New Features |
218 | ------------ | 219 | ------------ |
219 | * Added four themes courtesy Robert Griebl (http://www.softforge.de/zstyle) | 220 | * Added four themes courtesy Robert Griebl (http://www.softforge.de/zstyle) |
220 | * Added Conversion tool for pim-data (eilers) | 221 | * Added Conversion tool for pim-data (eilers) |
221 | * Introduced new OPimAccessFactory and OBackendFactory which simplyfies database access (eilers) | 222 | * Introduced new OPimAccessFactory and OBackendFactory which simplyfies database access (eilers) |
222 | * Modified the PIM API for providing generic use of OPimRecords (eilers) | 223 | * Modified the PIM API for providing generic use of OPimRecords (eilers) |
223 | * Clicking on the application symbol now iterates over the application's top level widgets if already raised (zecke) | 224 | * Clicking on the application symbol now iterates over the application's top level widgets if already raised (zecke) |
224 | 225 | ||
225 | Fixed Bugs | 226 | Fixed Bugs |
226 | -------- | 227 | -------- |
227 | * #1068 - Country Drop Down Box Off Screen | 228 | * #1068 - Country Drop Down Box Off Screen |
228 | * #1291 - Opie tinykate does not open .desktop files (ar) | 229 | * #1291 - Opie tinykate does not open .desktop files (ar) |
229 | * #1291 - Opie sheet not saving correctly (ar) | 230 | * #1291 - Opie sheet not saving correctly (ar) |
230 | * #1294 - Opie does not know about British Summer Time | 231 | * #1294 - Opie does not know about British Summer Time |
231 | * #1314 - Drawpad initialization (mickeyl) | 232 | * #1314 - Drawpad initialization (mickeyl) |
232 | * #1317 - Packagemanager crashes on hold-down or install (chicken) | 233 | * #1317 - Packagemanager crashes on hold-down or install (chicken) |
233 | * #1321 - Batteryapplet graphic glitch (harlekin) | 234 | * #1321 - Batteryapplet graphic glitch (harlekin) |
234 | * #1324 - ZSafe not starting up (mickeyl) | 235 | * #1324 - ZSafe not starting up (mickeyl) |
235 | * #1328 - Personal Home Address fields is trimmed to 1char (eilers) | 236 | * #1328 - Personal Home Address fields is trimmed to 1char (eilers) |
236 | * #1327 - Opie-mail ipk does not depend on libopiedb2 (chicken) | 237 | * #1327 - Opie-mail ipk does not depend on libopiedb2 (chicken) |
237 | * #1345 - Networksettingsplugin wlan plugin dependency on libpcap0 (mickeyl) | 238 | * #1345 - Networksettingsplugin wlan plugin dependency on libpcap0 (mickeyl) |
238 | * #1348 - Datebook dependency on libopiedb2 (chicken) | 239 | * #1348 - Datebook dependency on libopiedb2 (chicken) |
239 | * #1328 - Switched SQLDatabase and VCards char encoding from latin1 to unicode (eilers) | 240 | * #1328 - Switched SQLDatabase and VCards char encoding from latin1 to unicode (eilers) |
240 | 241 | ||
241 | 2004-04-25Opie 1.1.3 | 242 | 2004-04-25Opie 1.1.3 |
242 | 243 | ||
243 | * Introduced first implementation of SQL-Support using SQLite (eilers) | 244 | * Introduced first implementation of SQL-Support using SQLite (eilers) |
244 | * Added a new Gutenberg Project reader app - opie-gutenbrowser (ljp) | 245 | * Added a new Gutenberg Project reader app - opie-gutenbrowser (ljp) |
245 | * Added a real system graffiti character set (brad) | 246 | * Added a real system graffiti character set (brad) |
246 | * Added Generic Keyconfig Widget (zecke) | 247 | * Added Generic Keyconfig Widget (zecke) |
247 | * Improved Screenshotapplet and Drawpad integration. You can now open a screenshot in drawpad and take notes (zecke) | 248 | * Improved Screenshotapplet and Drawpad integration. You can now open a screenshot in drawpad and take notes (zecke) |
248 | * Added new Bible reader app - opie-dagger (drw) | 249 | * Added new Bible reader app - opie-dagger (drw) |
249 | * Added a new Image Viewer. Work is ongoing (zecke,alwin) | 250 | * Added a new Image Viewer. Work is ongoing (zecke,alwin) |
250 | * Added namespace usage in libopie2 and everywhere (zecke,alwin) | 251 | * Added namespace usage in libopie2 and everywhere (zecke,alwin) |
251 | * Enabled the possibility to pass command line arguments to applications (mickeyl) | 252 | * Enabled the possibility to pass command line arguments to applications (mickeyl) |
252 | * Added an about applet showing some credits and information about Opie (mickeyl) | 253 | * Added an about applet showing some credits and information about Opie (mickeyl) |
253 | * Added benchmarking functionality to sysinfo (mickeyl) | 254 | * Added benchmarking functionality to sysinfo (mickeyl) |
254 | * Added applet and configuration application for switching hardware keyboard layouts (alwin) | 255 | * Added applet and configuration application for switching hardware keyboard layouts (alwin) |
255 | * Ported applications from libopie1 to libopie2* (drw,ar,alwin) | 256 | * Ported applications from libopie1 to libopie2* (drw,ar,alwin) |
256 | * Imported fullscreen and font improvements from the Qkonsole fork to embeddedkonsole (waspe) | 257 | * Imported fullscreen and font improvements from the Qkonsole fork to embeddedkonsole (waspe) |
257 | * Clean-up of package information in control files (drw) | 258 | * Clean-up of package information in control files (drw) |
258 | * Repaired mediummount which was broken since integrating the quicklauncher (alwin) | 259 | * Repaired mediummount which was broken since integrating the quicklauncher (alwin) |
259 | * Improved big-screen support (zecke,ar) | 260 | * Improved big-screen support (zecke,ar) |
260 | * Improved multikeyboard support, added keyboard layout switching applet (mouse) | 261 | * Improved multikeyboard support, added keyboard layout switching applet (mouse) |
261 | * Added a new mail client based on libetpan (harlekin,alwin,jgf) | 262 | * Added a new mail client based on libetpan (harlekin,alwin,jgf) |
262 | * Added new package manager - opie-packagemanager (drw) | 263 | * Added new package manager - opie-packagemanager (drw) |
263 | * Improved light-n-power for C7x0 (mickeyl) | 264 | * Improved light-n-power for C7x0 (mickeyl) |
264 | * Added automatic rotation support for C7x0 (treke) | 265 | * Added automatic rotation support for C7x0 (treke) |
265 | * Split libopie1 up into a set of smaller - functionally grouped - libraries (mickeyl) | 266 | * Split libopie1 up into a set of smaller - functionally grouped - libraries (mickeyl) |
266 | * Added scanning the wireless network neighbourhood to networksettings (mickeyl) | 267 | * Added scanning the wireless network neighbourhood to networksettings (mickeyl) |
267 | 268 | ||
268 | 2003-11-29Opie 1.0.3 | 269 | 2003-11-29Opie 1.0.3 |
269 | 270 | ||
270 | * Released as Version 1.0.3 | 271 | * Released as Version 1.0.3 |
271 | * Improved i18n (various contributors) | 272 | * Improved i18n (various contributors) |
272 | * Reduced application startup time by integrating the TT quicklauncher (zecke,harlekin) | 273 | * Reduced application startup time by integrating the TT quicklauncher (zecke,harlekin) |
273 | * Made the Documents Tab optional (mickeyl) | 274 | * Made the Documents Tab optional (mickeyl) |
274 | * Integrated basic support for HP iPAQ 54xx and the Jornada 5xx (chicken) | 275 | * Integrated basic support for HP iPAQ 54xx and the Jornada 5xx (chicken) |
275 | 276 | ||
276 | 2003-08-04Opie 1.0.0 | 277 | 2003-08-04Opie 1.0.0 |
277 | 278 | ||
278 | * Released as Version 1.0.0 | 279 | * Released as Version 1.0.0 |
279 | * Including a PPP module for easy dial up (tille,harlekin,zecke) | 280 | * Including a PPP module for easy dial up (tille,harlekin,zecke) |
diff --git a/noncore/applets/memoryapplet/swapfile.cpp b/noncore/applets/memoryapplet/swapfile.cpp index 4609c13..50c173b 100644 --- a/noncore/applets/memoryapplet/swapfile.cpp +++ b/noncore/applets/memoryapplet/swapfile.cpp | |||
@@ -1,452 +1,458 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** Copyright (C) 2002-2005 the Opie Team <opie-devel@handhelds.org> | ||
3 | ** | 4 | ** |
4 | ** This file is part of Qtopia Environment. | 5 | ** This file is part of Opie Environment. |
5 | ** | 6 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 7 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 8 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 9 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 10 | ** packaging of this file. |
10 | ** | 11 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 12 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 13 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 14 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 15 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 16 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 17 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 18 | ** not clear to you. |
18 | ** | 19 | ** |
19 | **********************************************************************/ | 20 | **********************************************************************/ |
20 | 21 | ||
21 | #include "swapfile.h" | 22 | #include "swapfile.h" |
22 | 23 | ||
23 | /* OPIE */ | 24 | /* OPIE */ |
24 | #include <opie2/odebug.h> | 25 | #include <opie2/odebug.h> |
25 | #include <qpe/resource.h> | 26 | #include <qpe/resource.h> |
26 | using namespace Opie::Core; | 27 | using namespace Opie::Core; |
27 | 28 | ||
28 | /* QT */ | 29 | /* QT */ |
29 | #include <qfile.h> | 30 | #include <qfile.h> |
30 | #include <qtextstream.h> | 31 | #include <qtextstream.h> |
31 | #include <qlabel.h> | 32 | #include <qlabel.h> |
32 | #include <qtimer.h> | 33 | #include <qtimer.h> |
33 | #include <qlayout.h> | 34 | #include <qlayout.h> |
34 | #include <qpushbutton.h> | 35 | #include <qpushbutton.h> |
35 | #include <qhbuttongroup.h> | 36 | #include <qhbuttongroup.h> |
36 | #include <qradiobutton.h> | 37 | #include <qradiobutton.h> |
37 | #include <qlineedit.h> | 38 | #include <qlineedit.h> |
38 | #include <qprogressbar.h> | 39 | #include <qprogressbar.h> |
39 | #include <qcombobox.h> | 40 | #include <qcombobox.h> |
40 | #include <qvgroupbox.h> | 41 | #include <qvgroupbox.h> |
41 | #include <qhbox.h> | 42 | #include <qhbox.h> |
42 | #include <qmessagebox.h> | 43 | #include <qmessagebox.h> |
43 | #include <qcopchannel_qws.h> | 44 | #include <qcopchannel_qws.h> |
44 | 45 | ||
45 | /* STD */ | 46 | /* STD */ |
46 | #include <stdio.h> | 47 | #include <stdio.h> |
47 | #include <stdlib.h> | 48 | #include <stdlib.h> |
48 | #include <string.h> | 49 | #include <string.h> |
49 | #include <unistd.h> | 50 | #include <unistd.h> |
50 | #include <fcntl.h> | 51 | #include <fcntl.h> |
51 | #include <sys/vfs.h> | 52 | #include <sys/vfs.h> |
52 | #include <mntent.h> | 53 | #include <mntent.h> |
53 | #include <unistd.h> | 54 | #include <unistd.h> |
54 | #include <sys/types.h> | 55 | #include <sys/types.h> |
55 | 56 | ||
56 | Swapfile::Swapfile( QWidget *parent, const char *name, WFlags f ) | 57 | Swapfile::Swapfile( QWidget *parent, const char *name, WFlags f ) |
57 | : QWidget( parent, name, f ) | 58 | : QWidget( parent, name, f ) |
58 | { | 59 | { |
60 | if ( !QFile::exists( "/proc/swaps" ) ) | ||
61 | { | ||
62 | QLabel *text = new QLabel( tr( "Swap disabled in kernel" ), this ); | ||
63 | return; | ||
64 | } | ||
59 | // are we running as root? | 65 | // are we running as root? |
60 | isRoot = geteuid() == 0; | 66 | isRoot = geteuid() == 0; |
61 | 67 | ||
62 | QVBoxLayout* vb = new QVBoxLayout(this, 5); | 68 | QVBoxLayout* vb = new QVBoxLayout(this, 5); |
63 | 69 | ||
64 | QHButtonGroup* cfsdRBG = new QHButtonGroup(tr("Swapfile location"), this); | 70 | QHButtonGroup* cfsdRBG = new QHButtonGroup(tr("Swapfile location"), this); |
65 | cfsdRBG->setRadioButtonExclusive(true); | 71 | cfsdRBG->setRadioButtonExclusive(true); |
66 | vb->addWidget(cfsdRBG); | 72 | vb->addWidget(cfsdRBG); |
67 | 73 | ||
68 | ramRB = new QRadioButton(tr("RAM"), cfsdRBG); | 74 | ramRB = new QRadioButton(tr("RAM"), cfsdRBG); |
69 | cfRB = new QRadioButton(tr("CF Card"), cfsdRBG); | 75 | cfRB = new QRadioButton(tr("CF Card"), cfsdRBG); |
70 | sdRB = new QRadioButton(tr("SD Card"), cfsdRBG); | 76 | sdRB = new QRadioButton(tr("SD Card"), cfsdRBG); |
71 | 77 | ||
72 | QHBox *hb1 = new QHBox(this); | 78 | QHBox *hb1 = new QHBox(this); |
73 | hb1->setSpacing(5); | 79 | hb1->setSpacing(5); |
74 | 80 | ||
75 | swapPath1 = new QLineEdit(hb1); | 81 | swapPath1 = new QLineEdit(hb1); |
76 | swapPath1->setEnabled(false); | 82 | swapPath1->setEnabled(false); |
77 | 83 | ||
78 | QPushButton* swapOn = new QPushButton(tr(" On "), hb1); | 84 | QPushButton* swapOn = new QPushButton(tr(" On "), hb1); |
79 | QPushButton* swapOff = new QPushButton(tr(" Off "), hb1); | 85 | QPushButton* swapOff = new QPushButton(tr(" Off "), hb1); |
80 | vb->addWidget(hb1); | 86 | vb->addWidget(hb1); |
81 | 87 | ||
82 | QVGroupBox* box1 = new QVGroupBox(tr("Manage Swapfile"), this); | 88 | QVGroupBox* box1 = new QVGroupBox(tr("Manage Swapfile"), this); |
83 | vb->addWidget(box1); | 89 | vb->addWidget(box1); |
84 | 90 | ||
85 | QHBox *hb2 = new QHBox(box1); | 91 | QHBox *hb2 = new QHBox(box1); |
86 | hb2->setSpacing(5); | 92 | hb2->setSpacing(5); |
87 | QPushButton* mkSwap = new QPushButton(tr("Generate"), hb2); | 93 | QPushButton* mkSwap = new QPushButton(tr("Generate"), hb2); |
88 | QPushButton* rmSwap = new QPushButton(tr("Remove"), hb2); | 94 | QPushButton* rmSwap = new QPushButton(tr("Remove"), hb2); |
89 | 95 | ||
90 | QHBox *hb3 = new QHBox(box1); | 96 | QHBox *hb3 = new QHBox(box1); |
91 | hb3->setSpacing(5); | 97 | hb3->setSpacing(5); |
92 | swapSize = new QComboBox(hb3); | 98 | swapSize = new QComboBox(hb3); |
93 | swapSize->insertStringList(QStringList::split(",", tr("2 Mb,4 Mb,6 Mb,8 Mb,16 Mb,32 Mb,64 Mb"))); | 99 | swapSize->insertStringList(QStringList::split(",", tr("2 Mb,4 Mb,6 Mb,8 Mb,16 Mb,32 Mb,64 Mb"))); |
94 | 100 | ||
95 | mkswapProgress = new QProgressBar(3, hb3); | 101 | mkswapProgress = new QProgressBar(3, hb3); |
96 | mkswapProgress->setCenterIndicator(true); | 102 | mkswapProgress->setCenterIndicator(true); |
97 | 103 | ||
98 | QHBox *hb4 = new QHBox(this); | 104 | QHBox *hb4 = new QHBox(this); |
99 | hb4->setSpacing(5); | 105 | hb4->setSpacing(5); |
100 | 106 | ||
101 | swapStatusIcon = new QLabel(hb4); | 107 | swapStatusIcon = new QLabel(hb4); |
102 | swapStatus = new QLabel("", hb4); | 108 | swapStatus = new QLabel("", hb4); |
103 | hb4->setStretchFactor(swapStatus, 99); | 109 | hb4->setStretchFactor(swapStatus, 99); |
104 | vb->addWidget(hb4); | 110 | vb->addWidget(hb4); |
105 | 111 | ||
106 | connect(swapOn, SIGNAL(clicked()), this, SLOT(swapon())); | 112 | connect(swapOn, SIGNAL(clicked()), this, SLOT(swapon())); |
107 | connect(swapOff, SIGNAL(clicked()), this, SLOT(swapoff())); | 113 | connect(swapOff, SIGNAL(clicked()), this, SLOT(swapoff())); |
108 | connect(cfRB, SIGNAL(clicked()), this, SLOT(cfsdchecked())); | 114 | connect(cfRB, SIGNAL(clicked()), this, SLOT(cfsdchecked())); |
109 | connect(sdRB, SIGNAL(clicked()), this, SLOT(cfsdchecked())); | 115 | connect(sdRB, SIGNAL(clicked()), this, SLOT(cfsdchecked())); |
110 | connect(ramRB, SIGNAL(clicked()), this, SLOT(cfsdchecked())); | 116 | connect(ramRB, SIGNAL(clicked()), this, SLOT(cfsdchecked())); |
111 | connect(mkSwap, SIGNAL(clicked()), this, SLOT(makeswapfile())); | 117 | connect(mkSwap, SIGNAL(clicked()), this, SLOT(makeswapfile())); |
112 | connect(rmSwap, SIGNAL(clicked()), this, SLOT(removeswapfile())); | 118 | connect(rmSwap, SIGNAL(clicked()), this, SLOT(removeswapfile())); |
113 | 119 | ||
114 | cfRB->setEnabled(FALSE); | 120 | cfRB->setEnabled(FALSE); |
115 | sdRB->setEnabled(FALSE); | 121 | sdRB->setEnabled(FALSE); |
116 | 122 | ||
117 | QCopChannel *pcmciaChannel = new QCopChannel("QPE/Card", this); | 123 | QCopChannel *pcmciaChannel = new QCopChannel("QPE/Card", this); |
118 | connect(pcmciaChannel, SIGNAL(received(const QCString&,const QByteArray&)), this, SLOT(cardnotify(const QCString&,const QByteArray&))); | 124 | connect(pcmciaChannel, SIGNAL(received(const QCString&,const QByteArray&)), this, SLOT(cardnotify(const QCString&,const QByteArray&))); |
119 | QCopChannel *sdChannel = new QCopChannel("QPE/Card", this); | 125 | QCopChannel *sdChannel = new QCopChannel("QPE/Card", this); |
120 | connect(sdChannel, SIGNAL(received(const QCString&,const QByteArray&)), this, SLOT(cardnotify(const QCString&,const QByteArray&))); | 126 | connect(sdChannel, SIGNAL(received(const QCString&,const QByteArray&)), this, SLOT(cardnotify(const QCString&,const QByteArray&))); |
121 | 127 | ||
122 | cardInPcmcia0 = FALSE; | 128 | cardInPcmcia0 = FALSE; |
123 | cardInPcmcia1 = FALSE; | 129 | cardInPcmcia1 = FALSE; |
124 | cardInSd = FALSE; | 130 | cardInSd = FALSE; |
125 | 131 | ||
126 | Swapfile::status(); | 132 | Swapfile::status(); |
127 | Swapfile::getStatusPcmcia(); | 133 | Swapfile::getStatusPcmcia(); |
128 | Swapfile::getStatusSd(); | 134 | Swapfile::getStatusSd(); |
129 | } | 135 | } |
130 | 136 | ||
131 | int Swapfile::exec(const QString& arg) | 137 | int Swapfile::exec(const QString& arg) |
132 | { | 138 | { |
133 | return system((!isRoot ? "sudo " : "") + arg); | 139 | return system((!isRoot ? "sudo " : "") + arg); |
134 | } | 140 | } |
135 | 141 | ||
136 | 142 | ||
137 | Swapfile::~Swapfile() | 143 | Swapfile::~Swapfile() |
138 | { | 144 | { |
139 | } | 145 | } |
140 | 146 | ||
141 | void Swapfile::cardnotify(const QCString & msg, const QByteArray &) | 147 | void Swapfile::cardnotify(const QCString & msg, const QByteArray &) |
142 | { | 148 | { |
143 | if (msg == "stabChanged()") | 149 | if (msg == "stabChanged()") |
144 | { | 150 | { |
145 | getStatusPcmcia(); | 151 | getStatusPcmcia(); |
146 | } | 152 | } |
147 | else if (msg == "mtabChanged()") | 153 | else if (msg == "mtabChanged()") |
148 | { | 154 | { |
149 | getStatusSd(); | 155 | getStatusSd(); |
150 | } | 156 | } |
151 | } | 157 | } |
152 | 158 | ||
153 | void Swapfile::getStatusPcmcia() | 159 | void Swapfile::getStatusPcmcia() |
154 | { | 160 | { |
155 | 161 | ||
156 | bool cardWas0 = cardInPcmcia0;// remember last state | 162 | bool cardWas0 = cardInPcmcia0;// remember last state |
157 | bool cardWas1 = cardInPcmcia1; | 163 | bool cardWas1 = cardInPcmcia1; |
158 | 164 | ||
159 | QString fileName; | 165 | QString fileName; |
160 | 166 | ||
161 | // one of these 3 files should exist | 167 | // one of these 3 files should exist |
162 | if (QFile::exists("/var/run/stab")) { | 168 | if (QFile::exists("/var/run/stab")) { |
163 | fileName = "/var/run/stab"; | 169 | fileName = "/var/run/stab"; |
164 | } else if (QFile::exists("/var/state/pcmcia/stab")) { | 170 | } else if (QFile::exists("/var/state/pcmcia/stab")) { |
165 | fileName = "/var/state/pcmcia/stab"; | 171 | fileName = "/var/state/pcmcia/stab"; |
166 | } else { | 172 | } else { |
167 | fileName = "/var/lib/pcmcia/stab"; | 173 | fileName = "/var/lib/pcmcia/stab"; |
168 | } | 174 | } |
169 | 175 | ||
170 | QFile f(fileName); | 176 | QFile f(fileName); |
171 | 177 | ||
172 | if (f.open(IO_ReadOnly)) { | 178 | if (f.open(IO_ReadOnly)) { |
173 | QStringList list; | 179 | QStringList list; |
174 | QTextStream stream(&f); | 180 | QTextStream stream(&f); |
175 | QString streamIn; | 181 | QString streamIn; |
176 | streamIn = stream.read(); | 182 | streamIn = stream.read(); |
177 | list = QStringList::split("\n", streamIn); | 183 | list = QStringList::split("\n", streamIn); |
178 | for (QStringList::Iterator line = list.begin(); line != list.end(); | 184 | for (QStringList::Iterator line = list.begin(); line != list.end(); |
179 | line++) { | 185 | line++) { |
180 | if ((*line).startsWith("Socket 0:")) { | 186 | if ((*line).startsWith("Socket 0:")) { |
181 | if ((*line).startsWith("Socket 0: empty") && cardInPcmcia0) { | 187 | if ((*line).startsWith("Socket 0: empty") && cardInPcmcia0) { |
182 | cardInPcmcia0 = FALSE; | 188 | cardInPcmcia0 = FALSE; |
183 | } else if (!(*line).startsWith("Socket 0: empty") | 189 | } else if (!(*line).startsWith("Socket 0: empty") |
184 | && !cardInPcmcia0) { | 190 | && !cardInPcmcia0) { |
185 | cardInPcmcia0 = TRUE; | 191 | cardInPcmcia0 = TRUE; |
186 | } | 192 | } |
187 | } else if ((*line).startsWith("Socket 1:")) { | 193 | } else if ((*line).startsWith("Socket 1:")) { |
188 | if ((*line).startsWith("Socket 1: empty") && cardInPcmcia1) { | 194 | if ((*line).startsWith("Socket 1: empty") && cardInPcmcia1) { |
189 | cardInPcmcia1 = FALSE; | 195 | cardInPcmcia1 = FALSE; |
190 | } else if (!(*line).startsWith("Socket 1: empty") | 196 | } else if (!(*line).startsWith("Socket 1: empty") |
191 | && !cardInPcmcia1) { | 197 | && !cardInPcmcia1) { |
192 | cardInPcmcia1 = TRUE; | 198 | cardInPcmcia1 = TRUE; |
193 | } | 199 | } |
194 | } | 200 | } |
195 | } | 201 | } |
196 | f.close(); | 202 | f.close(); |
197 | 203 | ||
198 | if (cardWas0 != cardInPcmcia0 || cardWas1 != cardInPcmcia1) { | 204 | if (cardWas0 != cardInPcmcia0 || cardWas1 != cardInPcmcia1) { |
199 | QString text = QString::null; | 205 | QString text = QString::null; |
200 | QString what = QString::null; | 206 | QString what = QString::null; |
201 | if (cardWas0 != cardInPcmcia0) { | 207 | if (cardWas0 != cardInPcmcia0) { |
202 | if (cardInPcmcia0) { | 208 | if (cardInPcmcia0) { |
203 | cfRB->setEnabled(TRUE); | 209 | cfRB->setEnabled(TRUE); |
204 | } else { | 210 | } else { |
205 | cfRB->setChecked(FALSE); | 211 | cfRB->setChecked(FALSE); |
206 | cfRB->setEnabled(FALSE); | 212 | cfRB->setEnabled(FALSE); |
207 | } | 213 | } |
208 | } | 214 | } |
209 | 215 | ||
210 | if (cardWas1 != cardInPcmcia1) { | 216 | if (cardWas1 != cardInPcmcia1) { |
211 | if (cardInPcmcia1) { | 217 | if (cardInPcmcia1) { |
212 | cfRB->setEnabled(TRUE); | 218 | cfRB->setEnabled(TRUE); |
213 | } else { | 219 | } else { |
214 | cfRB->setChecked(FALSE); | 220 | cfRB->setChecked(FALSE); |
215 | cfRB->setEnabled(FALSE); | 221 | cfRB->setEnabled(FALSE); |
216 | } | 222 | } |
217 | } | 223 | } |
218 | } | 224 | } |
219 | } else { | 225 | } else { |
220 | // no file found | 226 | // no file found |
221 | odebug << "no file found" << oendl; | 227 | odebug << "no file found" << oendl; |
222 | cardInPcmcia0 = FALSE; | 228 | cardInPcmcia0 = FALSE; |
223 | cardInPcmcia1 = FALSE; | 229 | cardInPcmcia1 = FALSE; |
224 | } | 230 | } |
225 | Swapfile::cfsdchecked(); | 231 | Swapfile::cfsdchecked(); |
226 | } | 232 | } |
227 | 233 | ||
228 | 234 | ||
229 | void Swapfile::getStatusSd() | 235 | void Swapfile::getStatusSd() |
230 | { | 236 | { |
231 | 237 | ||
232 | bool cardWas = cardInSd;// remember last state | 238 | bool cardWas = cardInSd;// remember last state |
233 | cardInSd = FALSE; | 239 | cardInSd = FALSE; |
234 | 240 | ||
235 | #if defined(_OS_LINUX_) || defined(Q_OS_LINUX) | 241 | #if defined(_OS_LINUX_) || defined(Q_OS_LINUX) |
236 | struct mntent *me; | 242 | struct mntent *me; |
237 | FILE *mntfp = setmntent("/etc/mtab", "r"); | 243 | FILE *mntfp = setmntent("/etc/mtab", "r"); |
238 | 244 | ||
239 | if (mntfp) { | 245 | if (mntfp) { |
240 | while ((me = getmntent(mntfp)) != 0) { | 246 | while ((me = getmntent(mntfp)) != 0) { |
241 | QString fs = me->mnt_fsname; | 247 | QString fs = me->mnt_fsname; |
242 | if (fs.left(14) == "/dev/mmc/part1" || fs.left(7) == "/dev/sd" | 248 | if (fs.left(14) == "/dev/mmc/part1" || fs.left(7) == "/dev/sd" |
243 | || fs.left(9) == "/dev/mmcd") { | 249 | || fs.left(9) == "/dev/mmcd") { |
244 | cardInSd = TRUE; | 250 | cardInSd = TRUE; |
245 | show(); | 251 | show(); |
246 | } | 252 | } |
247 | } | 253 | } |
248 | endmntent(mntfp); | 254 | endmntent(mntfp); |
249 | } | 255 | } |
250 | 256 | ||
251 | if (cardWas != cardInSd) { | 257 | if (cardWas != cardInSd) { |
252 | QString text = QString::null; | 258 | QString text = QString::null; |
253 | QString what = QString::null; | 259 | QString what = QString::null; |
254 | if (cardInSd) { | 260 | if (cardInSd) { |
255 | sdRB->setEnabled(TRUE); | 261 | sdRB->setEnabled(TRUE); |
256 | } else { | 262 | } else { |
257 | sdRB->setChecked(FALSE); | 263 | sdRB->setChecked(FALSE); |
258 | sdRB->setEnabled(FALSE); | 264 | sdRB->setEnabled(FALSE); |
259 | } | 265 | } |
260 | } | 266 | } |
261 | #else | 267 | #else |
262 | #error "Not on Linux" | 268 | #error "Not on Linux" |
263 | #endif | 269 | #endif |
264 | Swapfile::cfsdchecked(); | 270 | Swapfile::cfsdchecked(); |
265 | } | 271 | } |
266 | 272 | ||
267 | int rc=0; | 273 | int rc=0; |
268 | 274 | ||
269 | void Swapfile::swapon() | 275 | void Swapfile::swapon() |
270 | { | 276 | { |
271 | char swapcmd[128] ="swapon "; | 277 | char swapcmd[128] ="swapon "; |
272 | Swapfile::cfsdchecked(); | 278 | Swapfile::cfsdchecked(); |
273 | strcat(swapcmd,swapPath1->text()); | 279 | strcat(swapcmd,swapPath1->text()); |
274 | char *runcmd = swapcmd; | 280 | char *runcmd = swapcmd; |
275 | rc = exec(QString("%1").arg(runcmd)); | 281 | rc = exec(QString("%1").arg(runcmd)); |
276 | if (rc != 0) { | 282 | if (rc != 0) { |
277 | setStatusMessage("Failed to attach swapfile.", true); | 283 | setStatusMessage("Failed to attach swapfile.", true); |
278 | } | 284 | } |
279 | else { | 285 | else { |
280 | /* QMessageBox::information(this, "Information", "Swapfile is active!"); */ | 286 | /* QMessageBox::information(this, "Information", "Swapfile is active!"); */ |
281 | setStatusMessage("Swapfile activated."); | 287 | setStatusMessage("Swapfile activated."); |
282 | } | 288 | } |
283 | Swapfile::status(); | 289 | Swapfile::status(); |
284 | } | 290 | } |
285 | 291 | ||
286 | 292 | ||
287 | void Swapfile::setStatusMessage(const QString& text, bool error /* = false */) | 293 | void Swapfile::setStatusMessage(const QString& text, bool error /* = false */) |
288 | { | 294 | { |
289 | swapStatus->setText("<b>" + text + "</b>"); | 295 | swapStatus->setText("<b>" + text + "</b>"); |
290 | swapStatusIcon->setPixmap(Resource::loadPixmap(error ? "close" : "done")); | 296 | swapStatusIcon->setPixmap(Resource::loadPixmap(error ? "close" : "done")); |
291 | } | 297 | } |
292 | 298 | ||
293 | 299 | ||
294 | void Swapfile::swapoff() | 300 | void Swapfile::swapoff() |
295 | { | 301 | { |
296 | char swapcmd[128] ="swapoff "; | 302 | char swapcmd[128] ="swapoff "; |
297 | if (Swapfile::cfRB->isChecked() == TRUE) | 303 | if (Swapfile::cfRB->isChecked() == TRUE) |
298 | Swapfile::cfsdchecked(); | 304 | Swapfile::cfsdchecked(); |
299 | strcat(swapcmd,swapPath1->text()); | 305 | strcat(swapcmd,swapPath1->text()); |
300 | char *runcmd = swapcmd; | 306 | char *runcmd = swapcmd; |
301 | rc = exec(QString("%1").arg(runcmd)); | 307 | rc = exec(QString("%1").arg(runcmd)); |
302 | if (rc != 0) { | 308 | if (rc != 0) { |
303 | setStatusMessage(tr("Failed to detach swapfile."), true); | 309 | setStatusMessage(tr("Failed to detach swapfile."), true); |
304 | } | 310 | } |
305 | else { | 311 | else { |
306 | /* QMessageBox::information(this, "Information", "Swapfile is inactive!"); */ | 312 | /* QMessageBox::information(this, "Information", "Swapfile is inactive!"); */ |
307 | setStatusMessage(tr("Swapfile deactivated.")); | 313 | setStatusMessage(tr("Swapfile deactivated.")); |
308 | /* Swapfile::swapPath->clear();*/ | 314 | /* Swapfile::swapPath->clear();*/ |
309 | } | 315 | } |
310 | Swapfile::status(); | 316 | Swapfile::status(); |
311 | } | 317 | } |
312 | 318 | ||
313 | void Swapfile::cfsdchecked() | 319 | void Swapfile::cfsdchecked() |
314 | { | 320 | { |
315 | /* Swapfile::swapPath->clear();*/ | 321 | /* Swapfile::swapPath->clear();*/ |
316 | Swapfile::swapPath1->clear(); | 322 | Swapfile::swapPath1->clear(); |
317 | if (Swapfile::ramRB->isChecked() == TRUE) | 323 | if (Swapfile::ramRB->isChecked() == TRUE) |
318 | { | 324 | { |
319 | Swapfile::swapPath1->insert("/home/swapfile"); | 325 | Swapfile::swapPath1->insert("/home/swapfile"); |
320 | } | 326 | } |
321 | if (Swapfile::sdRB->isChecked() == TRUE) | 327 | if (Swapfile::sdRB->isChecked() == TRUE) |
322 | { | 328 | { |
323 | Swapfile::swapPath1->insert("/mnt/card/swapfile"); | 329 | Swapfile::swapPath1->insert("/mnt/card/swapfile"); |
324 | } | 330 | } |
325 | if (Swapfile::cfRB->isChecked() == TRUE) | 331 | if (Swapfile::cfRB->isChecked() == TRUE) |
326 | { | 332 | { |
327 | Swapfile::swapPath1->insert("/mnt/cf/swapfile"); | 333 | Swapfile::swapPath1->insert("/mnt/cf/swapfile"); |
328 | } | 334 | } |
329 | /*Swapfile::swapPath->insert(Swapfile::swapPath1->text());*/ | 335 | /*Swapfile::swapPath->insert(Swapfile::swapPath1->text());*/ |
330 | } | 336 | } |
331 | 337 | ||
332 | void Swapfile::makeswapfile() | 338 | void Swapfile::makeswapfile() |
333 | { | 339 | { |
334 | int i = swapSize->currentItem(); | 340 | int i = swapSize->currentItem(); |
335 | 341 | ||
336 | mkswapProgress->setProgress(1); | 342 | mkswapProgress->setProgress(1); |
337 | switch ( i ) { | 343 | switch ( i ) { |
338 | case 0: rc=exec(QString("dd if=/dev/zero of=%1 bs=1k count=2048").arg(swapPath1->text())); | 344 | case 0: rc=exec(QString("dd if=/dev/zero of=%1 bs=1k count=2048").arg(swapPath1->text())); |
339 | break; | 345 | break; |
340 | case 1: rc=exec(QString("dd if=/dev/zero of=%1 bs=1k count=4096").arg(swapPath1->text())); | 346 | case 1: rc=exec(QString("dd if=/dev/zero of=%1 bs=1k count=4096").arg(swapPath1->text())); |
341 | break; | 347 | break; |
342 | case 2: rc=exec(QString("dd if=/dev/zero of=%1 bs=1k count=6144").arg(swapPath1->text())); | 348 | case 2: rc=exec(QString("dd if=/dev/zero of=%1 bs=1k count=6144").arg(swapPath1->text())); |
343 | break; | 349 | break; |
344 | case 3: rc=exec(QString("dd if=/dev/zero of=%1 bs=1k count=8192").arg(swapPath1->text())); | 350 | case 3: rc=exec(QString("dd if=/dev/zero of=%1 bs=1k count=8192").arg(swapPath1->text())); |
345 | break; | 351 | break; |
346 | case 4: rc=exec(QString("dd if=/dev/zero of=%1 bs=1k count=16384").arg(swapPath1->text())); | 352 | case 4: rc=exec(QString("dd if=/dev/zero of=%1 bs=1k count=16384").arg(swapPath1->text())); |
347 | break; | 353 | break; |
348 | case 5: rc=exec(QString("dd if=/dev/zero of=%1 bs=1k count=32768").arg(swapPath1->text())); | 354 | case 5: rc=exec(QString("dd if=/dev/zero of=%1 bs=1k count=32768").arg(swapPath1->text())); |
349 | break; | 355 | break; |
350 | case 6: rc=exec(QString("dd if=/dev/zero of=%1 bs=1k count=65536").arg(swapPath1->text())); | 356 | case 6: rc=exec(QString("dd if=/dev/zero of=%1 bs=1k count=65536").arg(swapPath1->text())); |
351 | break; | 357 | break; |
352 | 358 | ||
353 | } | 359 | } |
354 | if (rc != 0) { | 360 | if (rc != 0) { |
355 | setStatusMessage(tr("Failed to create swapfile."), true); | 361 | setStatusMessage(tr("Failed to create swapfile."), true); |
356 | } | 362 | } |
357 | 363 | ||
358 | mkswapProgress->setProgress(2); | 364 | mkswapProgress->setProgress(2); |
359 | rc=exec(QString("mkswap %1").arg(swapPath1->text())); | 365 | rc=exec(QString("mkswap %1").arg(swapPath1->text())); |
360 | if (rc != 0) { | 366 | if (rc != 0) { |
361 | setStatusMessage(tr("Failed to initialize swapfile."), true); | 367 | setStatusMessage(tr("Failed to initialize swapfile."), true); |
362 | } | 368 | } |
363 | mkswapProgress->setProgress(3); | 369 | mkswapProgress->setProgress(3); |
364 | mkswapProgress->reset(); | 370 | mkswapProgress->reset(); |
365 | setStatusMessage(tr("Swapfile created.")); | 371 | setStatusMessage(tr("Swapfile created.")); |
366 | } | 372 | } |
367 | 373 | ||
368 | void Swapfile::removeswapfile() | 374 | void Swapfile::removeswapfile() |
369 | { | 375 | { |
370 | exec(QString("swapoff %1").arg(swapPath1->text())); | 376 | exec(QString("swapoff %1").arg(swapPath1->text())); |
371 | rc=exec(QString("rm -rf %1").arg(swapPath1->text())); | 377 | rc=exec(QString("rm -rf %1").arg(swapPath1->text())); |
372 | if (rc != 0) { | 378 | if (rc != 0) { |
373 | setStatusMessage(tr("Failed to remove swapfile."), true); | 379 | setStatusMessage(tr("Failed to remove swapfile."), true); |
374 | } | 380 | } |
375 | Swapfile::status(); | 381 | Swapfile::status(); |
376 | Swapfile::cfsdchecked(); | 382 | Swapfile::cfsdchecked(); |
377 | setStatusMessage(tr("Swapfile removed.")); | 383 | setStatusMessage(tr("Swapfile removed.")); |
378 | } | 384 | } |
379 | 385 | ||
380 | void Swapfile::status() | 386 | void Swapfile::status() |
381 | { | 387 | { |
382 | FILE *fp; | 388 | FILE *fp; |
383 | char buffer[128], swapfile[128], temp[128]; | 389 | char buffer[128], swapfile[128], temp[128]; |
384 | int swapsize=2000, i=1; | 390 | int swapsize=2000, i=1; |
385 | 391 | ||
386 | fp=fopen("/proc/swaps", "r"); | 392 | fp=fopen("/proc/swaps", "r"); |
387 | while ( (fgets(buffer,128,fp)) != NULL ) { | 393 | while ( (fgets(buffer,128,fp)) != NULL ) { |
388 | sscanf(buffer, "%s %s %d %s %s\n", swapfile, temp, &swapsize, temp, temp); | 394 | sscanf(buffer, "%s %s %d %s %s\n", swapfile, temp, &swapsize, temp, temp); |
389 | } | 395 | } |
390 | fclose(fp); | 396 | fclose(fp); |
391 | 397 | ||
392 | ramRB->setChecked(FALSE); | 398 | ramRB->setChecked(FALSE); |
393 | cfRB->setChecked(FALSE); | 399 | cfRB->setChecked(FALSE); |
394 | sdRB->setChecked(FALSE); | 400 | sdRB->setChecked(FALSE); |
395 | 401 | ||
396 | i=strcmp(swapfile, "/home/swapfile"); | 402 | i=strcmp(swapfile, "/home/swapfile"); |
397 | if ( i == 0 ) { | 403 | if ( i == 0 ) { |
398 | ramRB->setChecked(TRUE); | 404 | ramRB->setChecked(TRUE); |
399 | /* QMessageBox::information(this, "Information", "Swapfile is active!"); */ | 405 | /* QMessageBox::information(this, "Information", "Swapfile is active!"); */ |
400 | setStatusMessage(tr("Swapfile activated.")); | 406 | setStatusMessage(tr("Swapfile activated.")); |
401 | } | 407 | } |
402 | i=strcmp(swapfile, "/usr/mnt.rom/cf/swapfile"); | 408 | i=strcmp(swapfile, "/usr/mnt.rom/cf/swapfile"); |
403 | if ( i == 0 ) { | 409 | if ( i == 0 ) { |
404 | cfRB->setChecked(TRUE); | 410 | cfRB->setChecked(TRUE); |
405 | /* QMessageBox::information(this, "Information", "Swapfile is active!"); */ | 411 | /* QMessageBox::information(this, "Information", "Swapfile is active!"); */ |
406 | setStatusMessage(tr("Swapfile activated.")); | 412 | setStatusMessage(tr("Swapfile activated.")); |
407 | } | 413 | } |
408 | i=strcmp(swapfile, "/mnt/cf/swapfile"); | 414 | i=strcmp(swapfile, "/mnt/cf/swapfile"); |
409 | if ( i == 0 ) { | 415 | if ( i == 0 ) { |
410 | cfRB->setChecked(TRUE); | 416 | cfRB->setChecked(TRUE); |
411 | /* QMessageBox::information(this, "Information", "Swapfile is active!"); */ | 417 | /* QMessageBox::information(this, "Information", "Swapfile is active!"); */ |
412 | setStatusMessage(tr("Swapfile activated.")); | 418 | setStatusMessage(tr("Swapfile activated.")); |
413 | } | 419 | } |
414 | i=strcmp(swapfile, "/usr/mnt.rom/card/swapfile"); | 420 | i=strcmp(swapfile, "/usr/mnt.rom/card/swapfile"); |
415 | if ( i == 0 ) { | 421 | if ( i == 0 ) { |
416 | sdRB->setChecked(TRUE); | 422 | sdRB->setChecked(TRUE); |
417 | /* QMessageBox::information(this, "Information", "Swapfile is active!"); */ | 423 | /* QMessageBox::information(this, "Information", "Swapfile is active!"); */ |
418 | setStatusMessage(tr("Swapfile activated.")); | 424 | setStatusMessage(tr("Swapfile activated.")); |
419 | } | 425 | } |
420 | i=strcmp(swapfile, "/mnt/card/swapfile"); | 426 | i=strcmp(swapfile, "/mnt/card/swapfile"); |
421 | if ( i == 0 ) { | 427 | if ( i == 0 ) { |
422 | sdRB->setChecked(TRUE); | 428 | sdRB->setChecked(TRUE); |
423 | /* QMessageBox::information(this, "Information", "Swapfile is active!"); */ | 429 | /* QMessageBox::information(this, "Information", "Swapfile is active!"); */ |
424 | setStatusMessage(tr("Swapfile activated.")); | 430 | setStatusMessage(tr("Swapfile activated.")); |
425 | } | 431 | } |
426 | 432 | ||
427 | Swapfile::cfsdchecked(); | 433 | Swapfile::cfsdchecked(); |
428 | 434 | ||
429 | 435 | ||
430 | swapsize /=1000; | 436 | swapsize /=1000; |
431 | 437 | ||
432 | switch ( swapsize ) { | 438 | switch ( swapsize ) { |
433 | case 2: swapSize->setCurrentItem(0); | 439 | case 2: swapSize->setCurrentItem(0); |
434 | break; | 440 | break; |
435 | case 4: swapSize->setCurrentItem(1); | 441 | case 4: swapSize->setCurrentItem(1); |
436 | break; | 442 | break; |
437 | case 6: swapSize->setCurrentItem(2); | 443 | case 6: swapSize->setCurrentItem(2); |
438 | break; | 444 | break; |
439 | case 8: swapSize->setCurrentItem(3); | 445 | case 8: swapSize->setCurrentItem(3); |
440 | break; | 446 | break; |
441 | case 16: swapSize->setCurrentItem(4); | 447 | case 16: swapSize->setCurrentItem(4); |
442 | break; | 448 | break; |
443 | case 32: swapSize->setCurrentItem(5); | 449 | case 32: swapSize->setCurrentItem(5); |
444 | break; | 450 | break; |
445 | case 64: swapSize->setCurrentItem(6); | 451 | case 64: swapSize->setCurrentItem(6); |
446 | break; | 452 | break; |
447 | } | 453 | } |
448 | 454 | ||
449 | 455 | ||
450 | } | 456 | } |
451 | 457 | ||
452 | 458 | ||