author | mickeyl <mickeyl> | 2005-04-01 23:30:07 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2005-04-01 23:30:07 (UTC) |
commit | 8a1c307f9dfc26a31d42f29f29a5b1c048b99102 (patch) (unidiff) | |
tree | 8e8925baf6a77e01379264afb540f33a3c07bec7 | |
parent | 88cc0cc17864de6e36bdeedaae6df0a5cc738c5a (diff) | |
download | opie-8a1c307f9dfc26a31d42f29f29a5b1c048b99102.zip opie-8a1c307f9dfc26a31d42f29f29a5b1c048b99102.tar.gz opie-8a1c307f9dfc26a31d42f29f29a5b1c048b99102.tar.bz2 |
scale O-Menu-Applet pixmaps according to AppLnk::smallIconSize
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | core/applets/aboutapplet/about.cpp | 7 | ||||
-rw-r--r-- | core/applets/homeapplet/home.cpp | 8 | ||||
-rw-r--r-- | core/applets/homeapplet/home.h | 1 | ||||
-rw-r--r-- | core/applets/logoutapplet/logout.cpp | 8 | ||||
-rw-r--r-- | core/applets/logoutapplet/logout.h | 1 | ||||
-rw-r--r-- | core/applets/restartapplet2/restart.cpp | 11 | ||||
-rw-r--r-- | core/applets/rotateapplet/rotate.cpp | 6 | ||||
-rw-r--r-- | core/applets/suspendapplet/suspend.cpp | 8 | ||||
-rw-r--r-- | core/applets/suspendapplet/suspend.h | 1 | ||||
-rw-r--r-- | core/applets/vtapplet/vt.cpp | 3 |
11 files changed, 30 insertions, 27 deletions
@@ -1,206 +1,207 @@ | |||
1 | 2005-??-??Opie 1.2.1 | 1 | 2005-??-??Opie 1.2.1 |
2 | 2 | ||
3 | Fixed Bugs | 3 | Fixed Bugs |
4 | ---------- | 4 | ---------- |
5 | * n.a.- scale O-Menu-Applets appropriately (mickeyl) | ||
5 | 6 | ||
6 | 2005-03-25Opie 1.2.0 | 7 | 2005-03-25Opie 1.2.0 |
7 | 8 | ||
8 | Fixed Bugs | 9 | Fixed Bugs |
9 | ---------- | 10 | ---------- |
10 | * #1613 - AdvancedFM - scale toolbar icons appropriately (drw) | 11 | * #1613 - AdvancedFM - scale toolbar icons appropriately (drw) |
11 | * #1620 - OFileSelector - show the button on press and not on press on hold (alwin) | 12 | * #1620 - OFileSelector - show the button on press and not on press on hold (alwin) |
12 | * #1473 - Opie-Eye - Same as #1620 but we lack a common FileSystem Button class (zecke) | 13 | * #1473 - Opie-Eye - Same as #1620 but we lack a common FileSystem Button class (zecke) |
13 | * n.a. - PackageManager - fix bug where messages show up multiple times in install dialog (drw) | 14 | * n.a. - PackageManager - fix bug where messages show up multiple times in install dialog (drw) |
14 | * n.a - make qpeglobal.h include qglobal.h (zecke) | 15 | * n.a. - make qpeglobal.h include qglobal.h (zecke) |
15 | 16 | ||
16 | 2005-03-20Opie 1.2.0-rc1 | 17 | 2005-03-20Opie 1.2.0-rc1 |
17 | 18 | ||
18 | 19 | ||
19 | New Features | 20 | New Features |
20 | ------------ | 21 | ------------ |
21 | * Launcher: Support a static background pixmap (mickeyl) | 22 | * Launcher: Support a static background pixmap (mickeyl) |
22 | * LauncherSettings: Choose whether to have a static background pixmap (mickeyl) | 23 | * LauncherSettings: Choose whether to have a static background pixmap (mickeyl) |
23 | * PackageManager supports the 'lists_dir' ipkg configuration option (drw) | 24 | * PackageManager supports the 'lists_dir' ipkg configuration option (drw) |
24 | * Added hi-res inline images for large resolution devices (drw) | 25 | * Added hi-res inline images for large resolution devices (drw) |
25 | * Improved launcher icons for consistency (ar) | 26 | * Improved launcher icons for consistency (ar) |
26 | * Datebook: Added plugin system to datebook so holidays and birthdays from contacts may displayed in datebook (alwin) | 27 | * Datebook: Added plugin system to datebook so holidays and birthdays from contacts may displayed in datebook (alwin) |
27 | 28 | ||
28 | Fixed Bugs | 29 | Fixed Bugs |
29 | ---------- | 30 | ---------- |
30 | * #1236 - VCards contained empty home and work address entries causing Palms to crash (eilers) | 31 | * #1236 - VCards contained empty home and work address entries causing Palms to crash (eilers) |
31 | * #1412 - Launcher Settings - fixed default settings for background in Edit tab dialog (drw) | 32 | * #1412 - Launcher Settings - fixed default settings for background in Edit tab dialog (drw) |
32 | * #1472 - Opie textedit now check for unsaved changes on ESC key (ljp) | 33 | * #1472 - Opie textedit now check for unsaved changes on ESC key (ljp) |
33 | * #1474 - Implement GUI for Scrollbars on the Left in Appearance (zecke) | 34 | * #1474 - Implement GUI for Scrollbars on the Left in Appearance (zecke) |
34 | * #1482 - Fix double '/' in paths (zecke) | 35 | * #1482 - Fix double '/' in paths (zecke) |
35 | * #1536 - Autosave of custom locations in opie backup (ar) | 36 | * #1536 - Autosave of custom locations in opie backup (ar) |
36 | * #1539 - Fixed displaying too long path in the delete dialog in opie-eye (zecke) | 37 | * #1539 - Fixed displaying too long path in the delete dialog in opie-eye (zecke) |
37 | * #1540 - Implemented deletion of DocLnks in opie-eye (zecke) | 38 | * #1540 - Implemented deletion of DocLnks in opie-eye (zecke) |
38 | * #1542 - Fixed Todo crash when priority < 1 or > 5 (drw) | 39 | * #1542 - Fixed Todo crash when priority < 1 or > 5 (drw) |
39 | * #1550 - Browse for alarm sound start in QPEDIR/sounds/ (zecke) | 40 | * #1550 - Browse for alarm sound start in QPEDIR/sounds/ (zecke) |
40 | * #1554 - Fixed Opie-Console name in .desktop file (mickeyl) | 41 | * #1554 - Fixed Opie-Console name in .desktop file (mickeyl) |
41 | * #1556 - Start to look for sound files in /opt/QtPalmtop/sounds (zecke) | 42 | * #1556 - Start to look for sound files in /opt/QtPalmtop/sounds (zecke) |
42 | * #1558 - Fixed opie-login breaking opie startup (mickeyl) | 43 | * #1558 - Fixed opie-login breaking opie startup (mickeyl) |
43 | * #1560 - Fixed Opie-Console picking up the wrong shell (bluelightning) | 44 | * #1560 - Fixed Opie-Console picking up the wrong shell (bluelightning) |
44 | * #1570 - Confirmation needed befor Restore a backup and overwrite local data (ar) | 45 | * #1570 - Confirmation needed befor Restore a backup and overwrite local data (ar) |
45 | * #1591 - Addressbook sortorder changed by clicking on column 0 (eilers) | 46 | * #1591 - Addressbook sortorder changed by clicking on column 0 (eilers) |
46 | * #1599 - Security - change recommendation for opie-multiauth to opie-securityplugin (gints) | 47 | * #1599 - Security - change recommendation for opie-multiauth to opie-securityplugin (gints) |
47 | * #1604 - Checkbook crashed on startup (drw) | 48 | * #1604 - Checkbook crashed on startup (drw) |
48 | * #1608 - Addressbook crashed after search, which may caused by not initialzed member variable (eilers) | 49 | * #1608 - Addressbook crashed after search, which may caused by not initialzed member variable (eilers) |
49 | * #1608 - QueryByExampe-Datediff on SQL database did not worked properly (eilers) | 50 | * #1608 - QueryByExampe-Datediff on SQL database did not worked properly (eilers) |
50 | * n.a. - Netsystemtime - fixed UI to prevent error dialog from displaying when it shouldn't, get rid of some compiler warnings (drw) | 51 | * n.a. - Netsystemtime - fixed UI to prevent error dialog from displaying when it shouldn't, get rid of some compiler warnings (drw) |
51 | * n.a. - PackageManager - fixed where last package in status file was not shown as installed when it should be (drw) | 52 | * n.a. - PackageManager - fixed where last package in status file was not shown as installed when it should be (drw) |
52 | * n.a. - PackageManager - fixed bug where lists_dir was not being honored at startup (drw) | 53 | * n.a. - PackageManager - fixed bug where lists_dir was not being honored at startup (drw) |
53 | * n.a. - PackageManager - provided default value for lists_dir when none is entered in configuration dialog (drw) | 54 | * n.a. - PackageManager - provided default value for lists_dir when none is entered in configuration dialog (drw) |
54 | * n.a. - OTabWidget - fixed scroll buttons, fix display position of tabs (drw) | 55 | * n.a. - OTabWidget - fixed scroll buttons, fix display position of tabs (drw) |
55 | * n.a. - AddressBook - fixed sorting by 'File As' name (drw) | 56 | * n.a. - AddressBook - fixed sorting by 'File As' name (drw) |
56 | * n.a. - AddressBook - fixed category handling for 'All' and 'Unfiled' (eilers) | 57 | * n.a. - AddressBook - fixed category handling for 'All' and 'Unfiled' (eilers) |
57 | * n.a. - AddressBook - fixed letter picker record selection and sort records afterwards (drw) | 58 | * n.a. - AddressBook - fixed letter picker record selection and sort records afterwards (drw) |
58 | 59 | ||
59 | Internal | 60 | Internal |
60 | -------- | 61 | -------- |
61 | * Worked around bug in Qt/Embedded 2.3.10: qt_version() returns 231 (mickeyl) | 62 | * Worked around bug in Qt/Embedded 2.3.10: qt_version() returns 231 (mickeyl) |
62 | * Killed the need for weak symbols in QtE (zecke) | 63 | * Killed the need for weak symbols in QtE (zecke) |
63 | * Added optional building libqpe without inline images (mickeyl) | 64 | * Added optional building libqpe without inline images (mickeyl) |
64 | * OColorButton - fixed so does not emit a colorSelected signal inside of resizeEvent (drw) | 65 | * OColorButton - fixed so does not emit a colorSelected signal inside of resizeEvent (drw) |
65 | 66 | ||
66 | 2005-02-03Opie 1.1.9 | 67 | 2005-02-03Opie 1.1.9 |
67 | 68 | ||
68 | New Features | 69 | New Features |
69 | ------------ | 70 | ------------ |
70 | * Number of icon columns in Launcher is customizable through Launcher.conf (hrw,zecke,mickeyl) | 71 | * Number of icon columns in Launcher is customizable through Launcher.conf (hrw,zecke,mickeyl) |
71 | * Number of icon columns in Launcher is customizable through LauncherSettings (mickeyl) | 72 | * Number of icon columns in Launcher is customizable through LauncherSettings (mickeyl) |
72 | * Usability enhancements in OpieIRC (skyhusker) | 73 | * Usability enhancements in OpieIRC (skyhusker) |
73 | 74 | ||
74 | Fixed Bugs | 75 | Fixed Bugs |
75 | ---------- | 76 | ---------- |
76 | * #1501 - Fixed bug in todo sql backend (eilers) | 77 | * #1501 - Fixed bug in todo sql backend (eilers) |
77 | * #1505 - Added more Swap sizes in memoryapplet (mickeyl) | 78 | * #1505 - Added more Swap sizes in memoryapplet (mickeyl) |
78 | * #1525 - Hopefully fixed double alarms and not removing alarms set with the Clock application (zecke) | 79 | * #1525 - Hopefully fixed double alarms and not removing alarms set with the Clock application (zecke) |
79 | * #1533 - Security Owner Dialog (shown in case of unsuccessfull authentiacation) wasn't able to display information in non latin1 encoding (zecke) | 80 | * #1533 - Security Owner Dialog (shown in case of unsuccessfull authentiacation) wasn't able to display information in non latin1 encoding (zecke) |
80 | * n.a. - Removed hard coded font sizes in a couple of inputmethods (mickeyl) | 81 | * n.a. - Removed hard coded font sizes in a couple of inputmethods (mickeyl) |
81 | * n.a. - Removed MediumDlg appearing prior to FirstUsage wizard (i.e. calibration) (mickeyl) | 82 | * n.a. - Removed MediumDlg appearing prior to FirstUsage wizard (i.e. calibration) (mickeyl) |
82 | * n.a. - Fixed numerous buglets in OpieIRC (skyhusker) | 83 | * n.a. - Fixed numerous buglets in OpieIRC (skyhusker) |
83 | 84 | ||
84 | Internal | 85 | Internal |
85 | -------- | 86 | -------- |
86 | * Added the Qtopia 1.7 SDK macros for quick-apps to easa compilation of 3rd party apps against our headers (mickeyl) | 87 | * Added the Qtopia 1.7 SDK macros for quick-apps to easa compilation of 3rd party apps against our headers (mickeyl) |
87 | * You can now use the Opie build system in combination with a OpenEmbedded staging area which makes a nice cross development environment (mickeyl) | 88 | * You can now use the Opie build system in combination with a OpenEmbedded staging area which makes a nice cross development environment (mickeyl) |
88 | * Made Opie compilable with Qt/Embedded 2.3.10 (ar) | 89 | * Made Opie compilable with Qt/Embedded 2.3.10 (ar) |
89 | * Changed Launcher to get default orientation from ODevice w/ QWS_DISPLAY overriding (mickeyl) | 90 | * Changed Launcher to get default orientation from ODevice w/ QWS_DISPLAY overriding (mickeyl) |
90 | * Build tree cleanups (mickeyl) | 91 | * Build tree cleanups (mickeyl) |
91 | 92 | ||
92 | 2004-11-26Opie 1.1.8 | 93 | 2004-11-26Opie 1.1.8 |
93 | 94 | ||
94 | New Features | 95 | New Features |
95 | ------------ | 96 | ------------ |
96 | * PackageManager supports installation of local ipkg files (drw) | 97 | * PackageManager supports installation of local ipkg files (drw) |
97 | * PackageManager supports linking of applications to root (drw) | 98 | * PackageManager supports linking of applications to root (drw) |
98 | * PackageManager supports src/gz feeds (drw,wimpie) | 99 | * PackageManager supports src/gz feeds (drw,wimpie) |
99 | * Added a syslog information tab to sysinfo (mickeyl) | 100 | * Added a syslog information tab to sysinfo (mickeyl) |
100 | * Added new, more consistent, PIM icons + a GIMP teplate (ar) | 101 | * Added new, more consistent, PIM icons + a GIMP teplate (ar) |
101 | 102 | ||
102 | Fixed Bugs | 103 | Fixed Bugs |
103 | ---------- | 104 | ---------- |
104 | * #1017 - Tetrix doesn't display correctly for high resolution screens (drw) | 105 | * #1017 - Tetrix doesn't display correctly for high resolution screens (drw) |
105 | * #1269 - VCards were imported into personal area if it was activated (eilers) | 106 | * #1269 - VCards were imported into personal area if it was activated (eilers) |
106 | * #1464 - Packagemanager dont set active filter after install a package (drw) | 107 | * #1464 - Packagemanager dont set active filter after install a package (drw) |
107 | * #1479 - Improved VCard-Parser to import VCards created by Evolution 2 and Apple Addressbook (eilers) | 108 | * #1479 - Improved VCard-Parser to import VCards created by Evolution 2 and Apple Addressbook (eilers) |
108 | * #1493 - Fixed one column layout bug of the launcher (hrw) | 109 | * #1493 - Fixed one column layout bug of the launcher (hrw) |
109 | * n.a. - PackageManager - (Minor UI tweak) in filter dialog, when option is enabled, set focus to widget that corresponds to that option (drw) | 110 | * n.a. - PackageManager - (Minor UI tweak) in filter dialog, when option is enabled, set focus to widget that corresponds to that option (drw) |
110 | * n.a. - PackageManager - (Minor UI tweak) fix double entry in source feed configuration when adding a new feed (drw) | 111 | * n.a. - PackageManager - (Minor UI tweak) fix double entry in source feed configuration when adding a new feed (drw) |
111 | * n.a. - Battery Applet - fix sizing of battery info popup (drw,mickeyl) | 112 | * n.a. - Battery Applet - fix sizing of battery info popup (drw,mickeyl) |
112 | 113 | ||
113 | Internal | 114 | Internal |
114 | -------- | 115 | -------- |
115 | * Moved libopie1 to unsupported (mickeyl) | 116 | * Moved libopie1 to unsupported (mickeyl) |
116 | * Implemented generic queryByExample() with incremental searching. A lot of internal changes of the Pim2-library (eilers) | 117 | * Implemented generic queryByExample() with incremental searching. A lot of internal changes of the Pim2-library (eilers) |
117 | * Added fast and full featured and incremental sorted() for SQL addressbook backend (eilers) | 118 | * Added fast and full featured and incremental sorted() for SQL addressbook backend (eilers) |
118 | 119 | ||
119 | 2004-11-14Opie 1.1.7 | 120 | 2004-11-14Opie 1.1.7 |
120 | 121 | ||
121 | New Features | 122 | New Features |
122 | ------------ | 123 | ------------ |
123 | * libOpieDB now uses SQLite V3 instead V2. Remember to upgrade your database files! (eilers) | 124 | * libOpieDB now uses SQLite V3 instead V2. Remember to upgrade your database files! (eilers) |
124 | * Backup now uses the busy indicator when backing up and restore (ar) | 125 | * Backup now uses the busy indicator when backing up and restore (ar) |
125 | * OpiePlayer2 gained adding of Directories to the playlist (zecke) | 126 | * OpiePlayer2 gained adding of Directories to the playlist (zecke) |
126 | * OpiePlayer2 better error handling (zecke) | 127 | * OpiePlayer2 better error handling (zecke) |
127 | * OpiePlayer2 progress indication while streaming (zecke) | 128 | * OpiePlayer2 progress indication while streaming (zecke) |
128 | * OpiePlayer2 ported to use libxine 1.0.0-rc6a (brad,zecke) | 129 | * OpiePlayer2 ported to use libxine 1.0.0-rc6a (brad,zecke) |
129 | * Ported brightnessapplet from Qtopia 1.7 (mickeyl) | 130 | * Ported brightnessapplet from Qtopia 1.7 (mickeyl) |
130 | * Opie-Eye got a Digital Camera File Backend (alwin,zecke) | 131 | * Opie-Eye got a Digital Camera File Backend (alwin,zecke) |
131 | * Support for Tuxpad1 of Tradesquare.NL (mickeyl,zecke) | 132 | * Support for Tuxpad1 of Tradesquare.NL (mickeyl,zecke) |
132 | * Opie-Console use Custom Font and Size in a Profile (harlekin) | 133 | * Opie-Console use Custom Font and Size in a Profile (harlekin) |
133 | * Opie-Console transparently log the Output and Input to a file (harlekin) | 134 | * Opie-Console transparently log the Output and Input to a file (harlekin) |
134 | * Added new O-menu icon to lock the PDA immediately: opie-lockapplet (clem) | 135 | * Added new O-menu icon to lock the PDA immediately: opie-lockapplet (clem) |
135 | * Opie-Security now hides the plugin-based authentication tabs if no auth. plugin package is installed (clem) | 136 | * Opie-Security now hides the plugin-based authentication tabs if no auth. plugin package is installed (clem) |
136 | * Opie-Security gained a 'test authentication' button (clem) | 137 | * Opie-Security gained a 'test authentication' button (clem) |
137 | * Opie-Eye got a more unique layout (menubar), a slideshow, user can setup some defaults | 138 | * Opie-Eye got a more unique layout (menubar), a slideshow, user can setup some defaults |
138 | * Opie-Mail improve the handling of POP mail boxes (alwin) | 139 | * Opie-Mail improve the handling of POP mail boxes (alwin) |
139 | * Both Opie-Eye and Opie-Mail were greatly improved due the hard work of Rajko Albrecht(alwin) | 140 | * Both Opie-Eye and Opie-Mail were greatly improved due the hard work of Rajko Albrecht(alwin) |
140 | * Opie IRC - backports of the 'NeIRC fork' (zecke) | 141 | * Opie IRC - backports of the 'NeIRC fork' (zecke) |
141 | 142 | ||
142 | Fixed Bugs | 143 | Fixed Bugs |
143 | ---------- | 144 | ---------- |
144 | * #501 - Pickboard is able to show 'Umlaute' (TT,zecke) | 145 | * #501 - Pickboard is able to show 'Umlaute' (TT,zecke) |
145 | * #608 - Make Opie usable for left handed users (zecke) | 146 | * #608 - Make Opie usable for left handed users (zecke) |
146 | * #957 - Import of VCards/VTodos/VEvents with BASE64 encoding (ljp,zecke) | 147 | * #957 - Import of VCards/VTodos/VEvents with BASE64 encoding (ljp,zecke) |
147 | * #1245 - Opie-Go 'paused' (zecke) | 148 | * #1245 - Opie-Go 'paused' (zecke) |
148 | * #1358 - DocTab didn't show any MimeTypes (was fixed earlier) (zecke) | 149 | * #1358 - DocTab didn't show any MimeTypes (was fixed earlier) (zecke) |
149 | * #1380 - QDateBookAccess::remove() doesn't remove entries (eilers, zecke) | 150 | * #1380 - QDateBookAccess::remove() doesn't remove entries (eilers, zecke) |
150 | * #1395 - Build VNC Backend with gcc3.4 | 151 | * #1395 - Build VNC Backend with gcc3.4 |
151 | * #1440 - The icon of opie-mobilemsg is missing (CoreDump) | 152 | * #1440 - The icon of opie-mobilemsg is missing (CoreDump) |
152 | * #1426 - Add missing opie-bartender Icon (CoreDump) | 153 | * #1426 - Add missing opie-bartender Icon (CoreDump) |
153 | * #1445 - Opie-Sheet Has No Icon (CoreDump) | 154 | * #1445 - Opie-Sheet Has No Icon (CoreDump) |
154 | * #1448 - Brightness Applet added (mickeyl) | 155 | * #1448 - Brightness Applet added (mickeyl) |
155 | * #1450 - ZSame didn't clear the bonus item after winning a game (zecke) | 156 | * #1450 - ZSame didn't clear the bonus item after winning a game (zecke) |
156 | * #1482 - Fix OFileSelector to be able to sort by size (zecke) | 157 | * #1482 - Fix OFileSelector to be able to sort by size (zecke) |
157 | * n.a. - Opie-mail: fixed some crasher, some layout-problems | 158 | * n.a. - Opie-mail: fixed some crasher, some layout-problems |
158 | * n.a. - Converted applications to not hardcode /opt/QtPalmtop but to use QPEApplication::qpeDir (zecke) | 159 | * n.a. - Converted applications to not hardcode /opt/QtPalmtop but to use QPEApplication::qpeDir (zecke) |
159 | * n.a. - Converted usage of qpeDir() not to include a '/' as first charachter of the string (zecke) | 160 | * n.a. - Converted usage of qpeDir() not to include a '/' as first charachter of the string (zecke) |
160 | * n.a. - Build system: Enable distcc and ccache when crosscompiling too, and use them everywhere we can (clem) | 161 | * n.a. - Build system: Enable distcc and ccache when crosscompiling too, and use them everywhere we can (clem) |
161 | * 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) | 162 | * 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) |
162 | * n.a. - Removed hardcoded icon size in a couple of applets (mickeyl) | 163 | * n.a. - Removed hardcoded icon size in a couple of applets (mickeyl) |
163 | 164 | ||
164 | Internal | 165 | Internal |
165 | -------- | 166 | -------- |
166 | * Opie-Qashmoney has been moved to unsupported (mickeyl) | 167 | * Opie-Qashmoney has been moved to unsupported (mickeyl) |
167 | * Opie-Ubrowser has been moved to unsupported (mickeyl) | 168 | * Opie-Ubrowser has been moved to unsupported (mickeyl) |
168 | 169 | ||
169 | 2004-09-17Opie 1.1.6 | 170 | 2004-09-17Opie 1.1.6 |
170 | 171 | ||
171 | New Features | 172 | New Features |
172 | ------------ | 173 | ------------ |
173 | * Fifteen gained configurable number of items (zecke) | 174 | * Fifteen gained configurable number of items (zecke) |
174 | * Fifteen can have custom background images (zecke) | 175 | * Fifteen can have custom background images (zecke) |
175 | * Added daemonizing capabilities to QWS Server [via Qt/Embedded] (mickeyl) | 176 | * Added daemonizing capabilities to QWS Server [via Qt/Embedded] (mickeyl) |
176 | * Integrated the new security framework into libopie2 (zecke,clem) | 177 | * Integrated the new security framework into libopie2 (zecke,clem) |
177 | * Converted the launcher to use the new security framework (zecke) | 178 | * Converted the launcher to use the new security framework (zecke) |
178 | * Backup can now handle custom locations for backup and restore (ar) | 179 | * Backup can now handle custom locations for backup and restore (ar) |
179 | * Implemented right-on-hold feedback (wimpie,zecke) | 180 | * Implemented right-on-hold feedback (wimpie,zecke) |
180 | * Lots of new features in opie-reader (tim,pohly) | 181 | * Lots of new features in opie-reader (tim,pohly) |
181 | * Build system cleanups (schurig) | 182 | * Build system cleanups (schurig) |
182 | 183 | ||
183 | Fixed Bugs | 184 | Fixed Bugs |
184 | -------- | 185 | -------- |
185 | * #1005 - Fixed backup to CompactFlash (ar) | 186 | * #1005 - Fixed backup to CompactFlash (ar) |
186 | * #1167 - Fixed Opie write crashing on more text than one page (ar) | 187 | * #1167 - Fixed Opie write crashing on more text than one page (ar) |
187 | * #1225 - Fixed repeated light flashing on Zaurus with keyz (mickeyl) | 188 | * #1225 - Fixed repeated light flashing on Zaurus with keyz (mickeyl) |
188 | * #1359 - Fixed bookmarks in Gutenbrowser (ljp) | 189 | * #1359 - Fixed bookmarks in Gutenbrowser (ljp) |
189 | * #1361 - Fixed auto upercase in Opie-Addressbook (eilers) | 190 | * #1361 - Fixed auto upercase in Opie-Addressbook (eilers) |
190 | * #1370 - Pimconverter now reacts on cancel key (eilers) | 191 | * #1370 - Pimconverter now reacts on cancel key (eilers) |
191 | * #1376 - Bring back the capslock/numlock display (zecke) | 192 | * #1376 - Bring back the capslock/numlock display (zecke) |
192 | * #1383 - Language settings now warns about losing open apps (Markus Litz) | 193 | * #1383 - Language settings now warns about losing open apps (Markus Litz) |
193 | * #1393 - Fixed line wrap issues in opie-console for the default profile (mickeyl) | 194 | * #1393 - Fixed line wrap issues in opie-console for the default profile (mickeyl) |
194 | * #1394 - Fixed oversized headline in opie-login (coredump) | 195 | * #1394 - Fixed oversized headline in opie-login (coredump) |
195 | * #1396 - Opie-console captures the escape key and vim is working (zecke) | 196 | * #1396 - Opie-console captures the escape key and vim is working (zecke) |
196 | * #1401 - Scrollbar is now only visible if necessary in DocTab (mickeyl) | 197 | * #1401 - Scrollbar is now only visible if necessary in DocTab (mickeyl) |
197 | 198 | ||
198 | 2004-07-06Opie 1.1.4 | 199 | 2004-07-06Opie 1.1.4 |
199 | 200 | ||
200 | New Features | 201 | New Features |
201 | ------------ | 202 | ------------ |
202 | * Added four themes courtesy Robert Griebl (http://www.softforge.de/zstyle) | 203 | * Added four themes courtesy Robert Griebl (http://www.softforge.de/zstyle) |
203 | * Added Conversion tool for pim-data (eilers) | 204 | * Added Conversion tool for pim-data (eilers) |
204 | * Introduced new OPimAccessFactory and OBackendFactory which simplyfies database access (eilers) | 205 | * Introduced new OPimAccessFactory and OBackendFactory which simplyfies database access (eilers) |
205 | * Modified the PIM API for providing generic use of OPimRecords (eilers) | 206 | * Modified the PIM API for providing generic use of OPimRecords (eilers) |
206 | * Clicking on the application symbol now iterates over the application's top level widgets if already raised (zecke) | 207 | * Clicking on the application symbol now iterates over the application's top level widgets if already raised (zecke) |
diff --git a/core/applets/aboutapplet/about.cpp b/core/applets/aboutapplet/about.cpp index 1dbd4c4..ec214f3 100644 --- a/core/applets/aboutapplet/about.cpp +++ b/core/applets/aboutapplet/about.cpp | |||
@@ -1,87 +1,88 @@ | |||
1 | #include "about.h" | 1 | #include "about.h" |
2 | #include "widget.h" | 2 | #include "widget.h" |
3 | 3 | ||
4 | #include <qpe/applnk.h> | ||
4 | #include <qpe/qpeapplication.h> | 5 | #include <qpe/qpeapplication.h> |
5 | #include <qpe/resource.h> | 6 | #include <qpe/resource.h> |
6 | #include <qpe/qcopenvelope_qws.h> | 7 | #include <qpe/qcopenvelope_qws.h> |
7 | 8 | ||
8 | #include <qlabel.h> | 9 | #include <qlabel.h> |
9 | 10 | ||
10 | AboutApplet::AboutApplet ( ) | 11 | AboutApplet::AboutApplet ( ) |
11 | : QObject ( 0, "AboutApplet" ), m_ad( 0l ) | 12 | : QObject ( 0, "AboutApplet" ), m_ad( 0l ) |
12 | {} | 13 | {} |
13 | 14 | ||
14 | AboutApplet::~AboutApplet ( ) | 15 | AboutApplet::~AboutApplet ( ) |
15 | { | 16 | { |
16 | delete m_ad; | 17 | delete m_ad; |
17 | } | 18 | } |
18 | 19 | ||
19 | int AboutApplet::position ( ) const | 20 | int AboutApplet::position ( ) const |
20 | { | 21 | { |
21 | return 1; | 22 | return 1; |
22 | } | 23 | } |
23 | 24 | ||
24 | QString AboutApplet::name ( ) const | 25 | QString AboutApplet::name ( ) const |
25 | { | 26 | { |
26 | return tr( "About shortcut" ); | 27 | return tr( "About shortcut" ); |
27 | } | 28 | } |
28 | 29 | ||
29 | QString AboutApplet::text ( ) const | 30 | QString AboutApplet::text ( ) const |
30 | { | 31 | { |
31 | return tr( "About" ); | 32 | return tr( "About" ); |
32 | } | 33 | } |
33 | 34 | ||
34 | QString AboutApplet::tr( const char* s ) const | 35 | QString AboutApplet::tr( const char* s ) const |
35 | { | 36 | { |
36 | return qApp->translate( "AboutApplet", s, 0 ); | 37 | return qApp->translate( "AboutApplet", s, 0 ); |
37 | } | 38 | } |
38 | 39 | ||
39 | QString AboutApplet::tr( const char* s, const char* p ) const | 40 | QString AboutApplet::tr( const char* s, const char* p ) const |
40 | { | 41 | { |
41 | return qApp->translate( "AboutApplet", s, p ); | 42 | return qApp->translate( "AboutApplet", s, p ); |
42 | } | 43 | } |
43 | 44 | ||
44 | QIconSet AboutApplet::icon ( ) const | 45 | QIconSet AboutApplet::icon() const |
45 | { | 46 | { |
46 | QPixmap pix; | 47 | QPixmap pix; |
47 | QImage img = Resource::loadImage ( "logo/opielogo" ); | 48 | QImage img = Resource::loadImage ( "logo/opielogo" ); |
48 | 49 | ||
49 | if ( !img. isNull ( ) ) | 50 | if ( !img.isNull() ) |
50 | pix. convertFromImage ( img. smoothScale ( 14, 14 ) ); | 51 | pix.convertFromImage( img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); |
51 | return pix; | 52 | return pix; |
52 | } | 53 | } |
53 | 54 | ||
54 | QPopupMenu *AboutApplet::popup ( QWidget * ) const | 55 | QPopupMenu *AboutApplet::popup ( QWidget * ) const |
55 | { | 56 | { |
56 | return 0; | 57 | return 0; |
57 | } | 58 | } |
58 | 59 | ||
59 | void AboutApplet::activated() | 60 | void AboutApplet::activated() |
60 | { | 61 | { |
61 | if ( !m_ad ) | 62 | if ( !m_ad ) |
62 | m_ad = new AboutWidget( 0, "aboutDialog" ); | 63 | m_ad = new AboutWidget( 0, "aboutDialog" ); |
63 | 64 | ||
64 | QPEApplication::showWidget( m_ad ); | 65 | QPEApplication::showWidget( m_ad ); |
65 | } | 66 | } |
66 | 67 | ||
67 | QRESULT AboutApplet::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) | 68 | QRESULT AboutApplet::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) |
68 | { | 69 | { |
69 | *iface = 0; | 70 | *iface = 0; |
70 | if ( uuid == IID_QUnknown ) | 71 | if ( uuid == IID_QUnknown ) |
71 | * iface = this; | 72 | * iface = this; |
72 | else if ( uuid == IID_MenuApplet ) | 73 | else if ( uuid == IID_MenuApplet ) |
73 | * iface = this; | 74 | * iface = this; |
74 | else | 75 | else |
75 | return QS_FALSE; | 76 | return QS_FALSE; |
76 | 77 | ||
77 | if ( *iface ) | 78 | if ( *iface ) |
78 | ( *iface ) -> addRef ( ); | 79 | ( *iface ) -> addRef ( ); |
79 | return QS_OK; | 80 | return QS_OK; |
80 | } | 81 | } |
81 | 82 | ||
82 | Q_EXPORT_INTERFACE( ) | 83 | Q_EXPORT_INTERFACE( ) |
83 | { | 84 | { |
84 | Q_CREATE_INSTANCE( AboutApplet ) | 85 | Q_CREATE_INSTANCE( AboutApplet ) |
85 | } | 86 | } |
86 | 87 | ||
87 | 88 | ||
diff --git a/core/applets/homeapplet/home.cpp b/core/applets/homeapplet/home.cpp index 8a930be..02d1265 100644 --- a/core/applets/homeapplet/home.cpp +++ b/core/applets/homeapplet/home.cpp | |||
@@ -1,85 +1,85 @@ | |||
1 | #include "home.h" | ||
2 | |||
3 | #include <qpe/applnk.h> | ||
1 | #include <qpe/resource.h> | 4 | #include <qpe/resource.h> |
2 | #include <qpe/qcopenvelope_qws.h> | 5 | #include <qpe/qcopenvelope_qws.h> |
3 | 6 | ||
4 | #include <qapplication.h> | 7 | #include <qapplication.h> |
5 | 8 | ||
6 | #include "home.h" | ||
7 | |||
8 | |||
9 | HomeApplet::HomeApplet ( ) | 9 | HomeApplet::HomeApplet ( ) |
10 | : QObject ( 0, "HomeApplet" ) | 10 | : QObject ( 0, "HomeApplet" ) |
11 | { | 11 | { |
12 | } | 12 | } |
13 | 13 | ||
14 | HomeApplet::~HomeApplet ( ) | 14 | HomeApplet::~HomeApplet ( ) |
15 | { | 15 | { |
16 | } | 16 | } |
17 | 17 | ||
18 | int HomeApplet::position ( ) const | 18 | int HomeApplet::position ( ) const |
19 | { | 19 | { |
20 | return 4; | 20 | return 4; |
21 | } | 21 | } |
22 | 22 | ||
23 | QString HomeApplet::name ( ) const | 23 | QString HomeApplet::name ( ) const |
24 | { | 24 | { |
25 | return tr( "Home shortcut" ); | 25 | return tr( "Home shortcut" ); |
26 | } | 26 | } |
27 | 27 | ||
28 | QString HomeApplet::text ( ) const | 28 | QString HomeApplet::text ( ) const |
29 | { | 29 | { |
30 | return tr( "Desktop" ); | 30 | return tr( "Desktop" ); |
31 | } | 31 | } |
32 | 32 | ||
33 | QString HomeApplet::tr( const char* s ) const | 33 | QString HomeApplet::tr( const char* s ) const |
34 | { | 34 | { |
35 | return qApp->translate( "HomeApplet", s, 0 ); | 35 | return qApp->translate( "HomeApplet", s, 0 ); |
36 | } | 36 | } |
37 | 37 | ||
38 | QString HomeApplet::tr( const char* s, const char* p ) const | 38 | QString HomeApplet::tr( const char* s, const char* p ) const |
39 | { | 39 | { |
40 | return qApp->translate( "HomeApplet", s, p ); | 40 | return qApp->translate( "HomeApplet", s, p ); |
41 | } | 41 | } |
42 | 42 | ||
43 | QIconSet HomeApplet::icon ( ) const | 43 | QIconSet HomeApplet::icon ( ) const |
44 | { | 44 | { |
45 | QPixmap pix; | 45 | QPixmap pix; |
46 | QImage img = Resource::loadImage ( "home" ); | 46 | QImage img = Resource::loadImage ( "home" ); |
47 | 47 | ||
48 | if ( !img. isNull ( )) | 48 | if ( !img. isNull ( )) |
49 | pix. convertFromImage ( img. smoothScale ( 14, 14 )); | 49 | pix.convertFromImage( img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); |
50 | return pix; | 50 | return pix; |
51 | } | 51 | } |
52 | 52 | ||
53 | QPopupMenu *HomeApplet::popup ( QWidget * ) const | 53 | QPopupMenu *HomeApplet::popup ( QWidget * ) const |
54 | { | 54 | { |
55 | return 0; | 55 | return 0; |
56 | } | 56 | } |
57 | 57 | ||
58 | void HomeApplet::activated ( ) | 58 | void HomeApplet::activated ( ) |
59 | { | 59 | { |
60 | // to desktop (home) | 60 | // to desktop (home) |
61 | QCopEnvelope ( "QPE/Application/qpe", "raise()" ); | 61 | QCopEnvelope ( "QPE/Application/qpe", "raise()" ); |
62 | } | 62 | } |
63 | 63 | ||
64 | 64 | ||
65 | QRESULT HomeApplet::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) | 65 | QRESULT HomeApplet::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) |
66 | { | 66 | { |
67 | *iface = 0; | 67 | *iface = 0; |
68 | if ( uuid == IID_QUnknown ) | 68 | if ( uuid == IID_QUnknown ) |
69 | *iface = this; | 69 | *iface = this; |
70 | else if ( uuid == IID_MenuApplet ) | 70 | else if ( uuid == IID_MenuApplet ) |
71 | *iface = this; | 71 | *iface = this; |
72 | else | 72 | else |
73 | return QS_FALSE; | 73 | return QS_FALSE; |
74 | 74 | ||
75 | if ( *iface ) | 75 | if ( *iface ) |
76 | (*iface)-> addRef ( ); | 76 | (*iface)-> addRef ( ); |
77 | return QS_OK; | 77 | return QS_OK; |
78 | } | 78 | } |
79 | 79 | ||
80 | Q_EXPORT_INTERFACE( ) | 80 | Q_EXPORT_INTERFACE( ) |
81 | { | 81 | { |
82 | Q_CREATE_INSTANCE( HomeApplet ) | 82 | Q_CREATE_INSTANCE( HomeApplet ) |
83 | } | 83 | } |
84 | 84 | ||
85 | 85 | ||
diff --git a/core/applets/homeapplet/home.h b/core/applets/homeapplet/home.h index 22ecd47..7f1f006 100644 --- a/core/applets/homeapplet/home.h +++ b/core/applets/homeapplet/home.h | |||
@@ -1,47 +1,48 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** 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 | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** 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. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #ifndef __OPIE_HOME_APPLET_H__ | 20 | #ifndef __OPIE_HOME_APPLET_H__ |
21 | #define __OPIE_HOME_APPLET_H__ | 21 | #define __OPIE_HOME_APPLET_H__ |
22 | 22 | ||
23 | #include <qpe/menuappletinterface.h> | 23 | #include <qpe/menuappletinterface.h> |
24 | #include <qobject.h> | ||
24 | 25 | ||
25 | class HomeApplet : public QObject, public MenuAppletInterface | 26 | class HomeApplet : public QObject, public MenuAppletInterface |
26 | { | 27 | { |
27 | public: | 28 | public: |
28 | HomeApplet ( ); | 29 | HomeApplet ( ); |
29 | virtual ~HomeApplet ( ); | 30 | virtual ~HomeApplet ( ); |
30 | 31 | ||
31 | QRESULT queryInterface( const QUuid&, QUnknownInterface** ); | 32 | QRESULT queryInterface( const QUuid&, QUnknownInterface** ); |
32 | Q_REFCOUNT | 33 | Q_REFCOUNT |
33 | 34 | ||
34 | virtual int position() const; | 35 | virtual int position() const; |
35 | 36 | ||
36 | virtual QString name ( ) const; | 37 | virtual QString name ( ) const; |
37 | virtual QIconSet icon ( ) const; | 38 | virtual QIconSet icon ( ) const; |
38 | virtual QString text ( ) const; | 39 | virtual QString text ( ) const; |
39 | virtual QString tr( const char* ) const; | 40 | virtual QString tr( const char* ) const; |
40 | virtual QString tr( const char*, const char* ) const; | 41 | virtual QString tr( const char*, const char* ) const; |
41 | virtual QPopupMenu *popup ( QWidget *parent ) const; | 42 | virtual QPopupMenu *popup ( QWidget *parent ) const; |
42 | 43 | ||
43 | virtual void activated ( ); | 44 | virtual void activated ( ); |
44 | 45 | ||
45 | }; | 46 | }; |
46 | 47 | ||
47 | #endif | 48 | #endif |
diff --git a/core/applets/logoutapplet/logout.cpp b/core/applets/logoutapplet/logout.cpp index 0ac0067..0f36f16 100644 --- a/core/applets/logoutapplet/logout.cpp +++ b/core/applets/logoutapplet/logout.cpp | |||
@@ -1,124 +1,124 @@ | |||
1 | #include "logout.h" | ||
2 | |||
3 | #include <qpe/applnk.h> | ||
1 | #include <qpe/resource.h> | 4 | #include <qpe/resource.h> |
2 | #include <qpe/qcopenvelope_qws.h> | 5 | #include <qpe/qcopenvelope_qws.h> |
3 | 6 | ||
4 | #include <qapplication.h> | 7 | #include <qapplication.h> |
5 | #include <qmessagebox.h> | 8 | #include <qmessagebox.h> |
6 | 9 | ||
7 | #include <unistd.h> | 10 | #include <unistd.h> |
8 | 11 | ||
9 | #include "logout.h" | ||
10 | |||
11 | |||
12 | LogoutApplet::LogoutApplet ( ) | 12 | LogoutApplet::LogoutApplet ( ) |
13 | : QObject ( 0, "LogoutApplet" ) | 13 | : QObject ( 0, "LogoutApplet" ) |
14 | { | 14 | { |
15 | } | 15 | } |
16 | 16 | ||
17 | LogoutApplet::~LogoutApplet ( ) | 17 | LogoutApplet::~LogoutApplet ( ) |
18 | { | 18 | { |
19 | } | 19 | } |
20 | 20 | ||
21 | int LogoutApplet::position ( ) const | 21 | int LogoutApplet::position ( ) const |
22 | { | 22 | { |
23 | return 0; | 23 | return 0; |
24 | } | 24 | } |
25 | 25 | ||
26 | QString LogoutApplet::name ( ) const | 26 | QString LogoutApplet::name ( ) const |
27 | { | 27 | { |
28 | return tr( "Logout shortcut" ); | 28 | return tr( "Logout shortcut" ); |
29 | } | 29 | } |
30 | 30 | ||
31 | QString LogoutApplet::text ( ) const | 31 | QString LogoutApplet::text ( ) const |
32 | { | 32 | { |
33 | return tr( "Logout" ); | 33 | return tr( "Logout" ); |
34 | } | 34 | } |
35 | 35 | ||
36 | QString LogoutApplet::tr( const char* s ) const | 36 | QString LogoutApplet::tr( const char* s ) const |
37 | { | 37 | { |
38 | return qApp->translate( "LogoutApplet", s, 0 ); | 38 | return qApp->translate( "LogoutApplet", s, 0 ); |
39 | } | 39 | } |
40 | 40 | ||
41 | QString LogoutApplet::tr( const char* s, const char* p ) const | 41 | QString LogoutApplet::tr( const char* s, const char* p ) const |
42 | { | 42 | { |
43 | return qApp->translate( "LogoutApplet", s, p ); | 43 | return qApp->translate( "LogoutApplet", s, p ); |
44 | } | 44 | } |
45 | 45 | ||
46 | QIconSet LogoutApplet::icon ( ) const | 46 | QIconSet LogoutApplet::icon ( ) const |
47 | { | 47 | { |
48 | QPixmap pix; | 48 | QPixmap pix; |
49 | QImage img = Resource::loadImage ( "logout" ); | 49 | QImage img = Resource::loadImage ( "logout" ); |
50 | 50 | ||
51 | if ( !img. isNull ( )) | 51 | if ( !img. isNull ( )) |
52 | pix. convertFromImage ( img. smoothScale ( 14, 14 )); | 52 | pix.convertFromImage( img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); |
53 | return pix; | 53 | return pix; |
54 | } | 54 | } |
55 | 55 | ||
56 | QPopupMenu *LogoutApplet::popup ( QWidget * ) const | 56 | QPopupMenu *LogoutApplet::popup ( QWidget * ) const |
57 | { | 57 | { |
58 | return 0; | 58 | return 0; |
59 | } | 59 | } |
60 | 60 | ||
61 | // This is a workaround for a Qt bug | 61 | // This is a workaround for a Qt bug |
62 | // clipboard applet has to stop its poll timer, or Qt/E | 62 | // clipboard applet has to stop its poll timer, or Qt/E |
63 | // will hang on quit() right before it emits aboutToQuit() | 63 | // will hang on quit() right before it emits aboutToQuit() |
64 | 64 | ||
65 | class HackApplication : public QApplication { | 65 | class HackApplication : public QApplication { |
66 | public: | 66 | public: |
67 | HackApplication ( ) : QApplication ( dummy, 0 ) | 67 | HackApplication ( ) : QApplication ( dummy, 0 ) |
68 | { | 68 | { |
69 | } | 69 | } |
70 | 70 | ||
71 | void emit_about_to_quit ( ) | 71 | void emit_about_to_quit ( ) |
72 | { | 72 | { |
73 | emit aboutToQuit ( ); | 73 | emit aboutToQuit ( ); |
74 | } | 74 | } |
75 | 75 | ||
76 | int dummy; | 76 | int dummy; |
77 | }; | 77 | }; |
78 | 78 | ||
79 | 79 | ||
80 | void LogoutApplet::activated ( ) | 80 | void LogoutApplet::activated ( ) |
81 | { | 81 | { |
82 | QMessageBox mb ( tr( "Logout" ), | 82 | QMessageBox mb ( tr( "Logout" ), |
83 | tr( "Do you really want to\nend this session ?" ), | 83 | tr( "Do you really want to\nend this session ?" ), |
84 | QMessageBox::NoIcon, | 84 | QMessageBox::NoIcon, |
85 | QMessageBox::Yes | QMessageBox::Default, | 85 | QMessageBox::Yes | QMessageBox::Default, |
86 | QMessageBox::No | QMessageBox::Escape, | 86 | QMessageBox::No | QMessageBox::Escape, |
87 | QMessageBox::NoButton ); | 87 | QMessageBox::NoButton ); |
88 | 88 | ||
89 | mb. setButtonText ( QMessageBox::Yes, "Yes" ); | 89 | mb. setButtonText ( QMessageBox::Yes, "Yes" ); |
90 | mb. setButtonText ( QMessageBox::No, "No" ); | 90 | mb. setButtonText ( QMessageBox::No, "No" ); |
91 | mb. setIconPixmap ( icon ( ). pixmap ( )); | 91 | mb. setIconPixmap ( icon ( ). pixmap ( )); |
92 | 92 | ||
93 | if ( mb. exec ( ) == QMessageBox::Yes ) { | 93 | if ( mb. exec ( ) == QMessageBox::Yes ) { |
94 | { QCopEnvelope envelope( "QPE/System", "forceQuit()" ); } | 94 | { QCopEnvelope envelope( "QPE/System", "forceQuit()" ); } |
95 | 95 | ||
96 | qApp-> processEvents ( ); // ensure the message goes out. | 96 | qApp-> processEvents ( ); // ensure the message goes out. |
97 | sleep ( 1 ); // You have 1 second to comply. | 97 | sleep ( 1 ); // You have 1 second to comply. |
98 | 98 | ||
99 | ((HackApplication *) qApp )-> emit_about_to_quit ( ); | 99 | ((HackApplication *) qApp )-> emit_about_to_quit ( ); |
100 | qApp-> quit(); | 100 | qApp-> quit(); |
101 | } | 101 | } |
102 | } | 102 | } |
103 | 103 | ||
104 | 104 | ||
105 | QRESULT LogoutApplet::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) | 105 | QRESULT LogoutApplet::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) |
106 | { | 106 | { |
107 | *iface = 0; | 107 | *iface = 0; |
108 | if ( uuid == IID_QUnknown ) | 108 | if ( uuid == IID_QUnknown ) |
109 | *iface = this; | 109 | *iface = this; |
110 | else if ( uuid == IID_MenuApplet ) | 110 | else if ( uuid == IID_MenuApplet ) |
111 | *iface = this; | 111 | *iface = this; |
112 | else | 112 | else |
113 | return QS_FALSE; | 113 | return QS_FALSE; |
114 | 114 | ||
115 | if ( *iface ) | 115 | if ( *iface ) |
116 | (*iface)-> addRef ( ); | 116 | (*iface)-> addRef ( ); |
117 | return QS_OK; | 117 | return QS_OK; |
118 | } | 118 | } |
119 | 119 | ||
120 | Q_EXPORT_INTERFACE( ) | 120 | Q_EXPORT_INTERFACE( ) |
121 | { | 121 | { |
122 | Q_CREATE_INSTANCE( LogoutApplet ) | 122 | Q_CREATE_INSTANCE( LogoutApplet ) |
123 | } | 123 | } |
124 | 124 | ||
diff --git a/core/applets/logoutapplet/logout.h b/core/applets/logoutapplet/logout.h index a991f65..3c17278 100644 --- a/core/applets/logoutapplet/logout.h +++ b/core/applets/logoutapplet/logout.h | |||
@@ -1,47 +1,48 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** 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 | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** 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. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #ifndef __OPIE_LOGOUT_APPLET_H__ | 20 | #ifndef __OPIE_LOGOUT_APPLET_H__ |
21 | #define __OPIE_LOGOUT_APPLET_H__ | 21 | #define __OPIE_LOGOUT_APPLET_H__ |
22 | 22 | ||
23 | #include <qpe/menuappletinterface.h> | 23 | #include <qpe/menuappletinterface.h> |
24 | #include <qobject.h> | ||
24 | 25 | ||
25 | class LogoutApplet : public QObject, public MenuAppletInterface | 26 | class LogoutApplet : public QObject, public MenuAppletInterface |
26 | { | 27 | { |
27 | public: | 28 | public: |
28 | LogoutApplet ( ); | 29 | LogoutApplet ( ); |
29 | virtual ~LogoutApplet ( ); | 30 | virtual ~LogoutApplet ( ); |
30 | 31 | ||
31 | QRESULT queryInterface( const QUuid&, QUnknownInterface** ); | 32 | QRESULT queryInterface( const QUuid&, QUnknownInterface** ); |
32 | Q_REFCOUNT | 33 | Q_REFCOUNT |
33 | 34 | ||
34 | virtual int position() const; | 35 | virtual int position() const; |
35 | 36 | ||
36 | virtual QString name ( ) const; | 37 | virtual QString name ( ) const; |
37 | virtual QIconSet icon ( ) const; | 38 | virtual QIconSet icon ( ) const; |
38 | virtual QString text ( ) const; | 39 | virtual QString text ( ) const; |
39 | virtual QString tr( const char* ) const; | 40 | virtual QString tr( const char* ) const; |
40 | virtual QString tr( const char*, const char* ) const; | 41 | virtual QString tr( const char*, const char* ) const; |
41 | virtual QPopupMenu *popup ( QWidget *parent ) const; | 42 | virtual QPopupMenu *popup ( QWidget *parent ) const; |
42 | 43 | ||
43 | virtual void activated ( ); | 44 | virtual void activated ( ); |
44 | 45 | ||
45 | }; | 46 | }; |
46 | 47 | ||
47 | #endif | 48 | #endif |
diff --git a/core/applets/restartapplet2/restart.cpp b/core/applets/restartapplet2/restart.cpp index a169505..eda0005 100644 --- a/core/applets/restartapplet2/restart.cpp +++ b/core/applets/restartapplet2/restart.cpp | |||
@@ -1,109 +1,106 @@ | |||
1 | // coptright Mon 10-21-2002 01:14:03 by L. Potter <ljp@llornkcor.com> | 1 | // coptright Mon 10-21-2002 01:14:03 by L. Potter <ljp@llornkcor.com> |
2 | 2 | ||
3 | #include "restart.h" | ||
4 | |||
5 | #include <qpe/applnk.h> | ||
3 | #include <qpe/qpeapplication.h> | 6 | #include <qpe/qpeapplication.h> |
4 | #include <qpe/resource.h> | 7 | #include <qpe/resource.h> |
5 | #include <qpe/qcopenvelope_qws.h> | 8 | #include <qpe/qcopenvelope_qws.h> |
6 | 9 | ||
7 | #include "restart.h" | ||
8 | |||
9 | // #include <stdlib.h> | ||
10 | // #include <unistd.h> | ||
11 | // #include <sys/stat.h> | ||
12 | //#include <dirent.h> | ||
13 | /* XPM */ | 10 | /* XPM */ |
14 | static char *restart_xpm[] = { | 11 | static char *restart_xpm[] = { |
15 | "16 16 11 1", | 12 | "16 16 11 1", |
16 | " c None", | 13 | " c None", |
17 | ". c #000000", | 14 | ". c #000000", |
18 | "+ c #DCDCDC", | 15 | "+ c #DCDCDC", |
19 | "@ c #A0A0A0", | 16 | "@ c #A0A0A0", |
20 | "# c #C3C3C3", | 17 | "# c #C3C3C3", |
21 | "$ c #808080", | 18 | "$ c #808080", |
22 | "% c #FFA858", | 19 | "% c #FFA858", |
23 | "& c #FFDCA8", | 20 | "& c #FFDCA8", |
24 | "* c #FFFFC0", | 21 | "* c #FFFFC0", |
25 | "= c #FFFFFF", | 22 | "= c #FFFFFF", |
26 | "- c #585858", | 23 | "- c #585858", |
27 | " .. ", | 24 | " .. ", |
28 | " .. .++. .. ", | 25 | " .. .++. .. ", |
29 | " .+@.@##@.@+. ", | 26 | " .+@.@##@.@+. ", |
30 | " .@+$@%%@$+@. ", | 27 | " .@+$@%%@$+@. ", |
31 | " .$%%&%&%$. ", | 28 | " .$%%&%&%$. ", |
32 | " ..+@%&$$%&@+.. ", | 29 | " ..+@%&$$%&@+.. ", |
33 | ".+#@%&%@@&*%@#+.", | 30 | ".+#@%&%@@&*%@#+.", |
34 | ".$@+$&*&&=*$+@$.", | 31 | ".$@+$&*&&=*$+@$.", |
35 | " .--+$&*=&$+--. ", | 32 | " .--+$&*=&$+--. ", |
36 | " .$#++$$++#$. ", | 33 | " .$#++$$++#$. ", |
37 | " .@=$-$++$-$=@. ", | 34 | " .@=$-$++$-$=@. ", |
38 | " .+@-..@@..-@+. ", | 35 | " .+@-..@@..-@+. ", |
39 | " ... .+=. ... ", | 36 | " ... .+=. ... ", |
40 | " .-$. ", | 37 | " .-$. ", |
41 | " .. ", | 38 | " .. ", |
42 | " "}; | 39 | " "}; |
43 | 40 | ||
44 | RestartApplet::RestartApplet ( ) | 41 | RestartApplet::RestartApplet ( ) |
45 | : QObject ( 0, "RestartApplet" ) | 42 | : QObject ( 0, "RestartApplet" ) |
46 | { | 43 | { |
47 | } | 44 | } |
48 | 45 | ||
49 | RestartApplet::~RestartApplet ( ) | 46 | RestartApplet::~RestartApplet ( ) |
50 | { | 47 | { |
51 | } | 48 | } |
52 | 49 | ||
53 | int RestartApplet::position ( ) const | 50 | int RestartApplet::position ( ) const |
54 | { | 51 | { |
55 | return 4; | 52 | return 4; |
56 | } | 53 | } |
57 | 54 | ||
58 | QString RestartApplet::name ( ) const | 55 | QString RestartApplet::name ( ) const |
59 | { | 56 | { |
60 | return tr( "Restart" ); | 57 | return tr( "Restart" ); |
61 | } | 58 | } |
62 | 59 | ||
63 | QString RestartApplet::text ( ) const | 60 | QString RestartApplet::text ( ) const |
64 | { | 61 | { |
65 | return tr( "Restart Opie" ); | 62 | return tr( "Restart Opie" ); |
66 | } | 63 | } |
67 | 64 | ||
68 | QIconSet RestartApplet::icon ( ) const | 65 | QIconSet RestartApplet::icon ( ) const |
69 | { | 66 | { |
70 | QPixmap pix; | 67 | QPixmap pix; |
71 | QImage img = ( const char** ) restart_xpm ;//Resource::loadImage ( "Run" ); | 68 | QImage img = ( const char** ) restart_xpm ;//Resource::loadImage ( "Run" ); |
72 | 69 | ||
73 | if ( !img. isNull ( )) | 70 | if ( !img. isNull ( )) |
74 | pix. convertFromImage ( img. smoothScale ( 14, 14 )); | 71 | pix.convertFromImage( img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); |
75 | return pix; | 72 | return pix; |
76 | } | 73 | } |
77 | 74 | ||
78 | QPopupMenu *RestartApplet::popup ( QWidget * ) const | 75 | QPopupMenu *RestartApplet::popup ( QWidget * ) const |
79 | { | 76 | { |
80 | return 0; | 77 | return 0; |
81 | } | 78 | } |
82 | 79 | ||
83 | void RestartApplet::activated ( ) | 80 | void RestartApplet::activated ( ) |
84 | { | 81 | { |
85 | QCopEnvelope e("QPE/System", "restart()"); | 82 | QCopEnvelope e("QPE/System", "restart()"); |
86 | } | 83 | } |
87 | 84 | ||
88 | 85 | ||
89 | QRESULT RestartApplet::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) | 86 | QRESULT RestartApplet::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) |
90 | { | 87 | { |
91 | *iface = 0; | 88 | *iface = 0; |
92 | if ( uuid == IID_QUnknown ) | 89 | if ( uuid == IID_QUnknown ) |
93 | *iface = this; | 90 | *iface = this; |
94 | else if ( uuid == IID_MenuApplet ) | 91 | else if ( uuid == IID_MenuApplet ) |
95 | *iface = this; | 92 | *iface = this; |
96 | else | 93 | else |
97 | return QS_FALSE; | 94 | return QS_FALSE; |
98 | 95 | ||
99 | if ( *iface ) | 96 | if ( *iface ) |
100 | (*iface)-> addRef ( ); | 97 | (*iface)-> addRef ( ); |
101 | return QS_OK; | 98 | return QS_OK; |
102 | } | 99 | } |
103 | 100 | ||
104 | Q_EXPORT_INTERFACE( ) | 101 | Q_EXPORT_INTERFACE( ) |
105 | { | 102 | { |
106 | Q_CREATE_INSTANCE( RestartApplet ) | 103 | Q_CREATE_INSTANCE( RestartApplet ) |
107 | } | 104 | } |
108 | 105 | ||
109 | 106 | ||
diff --git a/core/applets/rotateapplet/rotate.cpp b/core/applets/rotateapplet/rotate.cpp index f23423d..d13c2c0 100644 --- a/core/applets/rotateapplet/rotate.cpp +++ b/core/applets/rotateapplet/rotate.cpp | |||
@@ -1,253 +1,253 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the OPIE Project | 2 | This file is part of the OPIE Project |
3 | Copyright (C) 2003 Maximilian Reiss <harlekin@handhelds.org> | 3 | Copyright (C) 2003 Maximilian Reiss <harlekin@handhelds.org> |
4 | Copyright (C) 2003 Greg Gilbert <ggilbert@treke.net> | 4 | Copyright (C) 2003 Greg Gilbert <ggilbert@treke.net> |
5 | =. Copyright (C) 2004 Michael Lauer <mickey@Vanille.de> | 5 | =. Copyright (C) 2004 Michael Lauer <mickey@Vanille.de> |
6 | .=l. | 6 | .=l. |
7 | .>+-= | 7 | .>+-= |
8 | _;:, .> :=|. This library is free software; you can | 8 | _;:, .> :=|. This library 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 library is distributed in the hope that | 15 | .i_,=:_. -<s. This library 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 "rotate.h" | 31 | #include "rotate.h" |
32 | 32 | ||
33 | /* OPIE */ | 33 | /* OPIE */ |
34 | #include <opie2/odebug.h> | 34 | #include <opie2/odebug.h> |
35 | #include <opie2/odevice.h> | 35 | #include <opie2/odevice.h> |
36 | #include <qpe/applnk.h> | ||
36 | #include <qpe/config.h> | 37 | #include <qpe/config.h> |
37 | #include <qpe/power.h> | 38 | #include <qpe/power.h> |
38 | #include <qpe/qcopenvelope_qws.h> | 39 | #include <qpe/qcopenvelope_qws.h> |
39 | #include <qpe/resource.h> | 40 | #include <qpe/resource.h> |
40 | using namespace Opie::Core; | 41 | using namespace Opie::Core; |
41 | 42 | ||
42 | /* QT */ | 43 | /* STD */ |
43 | |||
44 | #include <time.h> | 44 | #include <time.h> |
45 | 45 | ||
46 | RotateApplet::RotateApplet() | 46 | RotateApplet::RotateApplet() |
47 | :QObject( 0, "RotateApplet" ), m_flipped( false ) | 47 | :QObject( 0, "RotateApplet" ), m_flipped( false ) |
48 | { | 48 | { |
49 | 49 | ||
50 | #if !defined(QT_NO_COP) | 50 | #if !defined(QT_NO_COP) |
51 | QCopChannel *rotateChannel = new QCopChannel( "QPE/Rotation" , this ); | 51 | QCopChannel *rotateChannel = new QCopChannel( "QPE/Rotation" , this ); |
52 | connect ( rotateChannel, SIGNAL( received(const QCString&,const QByteArray&) ), | 52 | connect ( rotateChannel, SIGNAL( received(const QCString&,const QByteArray&) ), |
53 | this, SLOT ( channelReceived(const QCString&,const QByteArray&) ) ); | 53 | this, SLOT ( channelReceived(const QCString&,const QByteArray&) ) ); |
54 | #endif | 54 | #endif |
55 | 55 | ||
56 | } | 56 | } |
57 | 57 | ||
58 | RotateApplet::~RotateApplet ( ) | 58 | RotateApplet::~RotateApplet ( ) |
59 | {} | 59 | {} |
60 | 60 | ||
61 | /** | 61 | /** |
62 | * Qcop receive method. | 62 | * Qcop receive method. |
63 | */ | 63 | */ |
64 | void RotateApplet::channelReceived( const QCString &msg, const QByteArray & data ) | 64 | void RotateApplet::channelReceived( const QCString &msg, const QByteArray & data ) |
65 | { | 65 | { |
66 | odebug << "RotateApplet::channelReceived( '" << msg << "' )" << oendl; | 66 | odebug << "RotateApplet::channelReceived( '" << msg << "' )" << oendl; |
67 | 67 | ||
68 | if ( ODevice::inst()->hasHingeSensor() ) | 68 | if ( ODevice::inst()->hasHingeSensor() ) |
69 | { | 69 | { |
70 | struct timespec interval; | 70 | struct timespec interval; |
71 | struct timespec remain; | 71 | struct timespec remain; |
72 | interval.tv_sec = 0; | 72 | interval.tv_sec = 0; |
73 | interval.tv_nsec = 600000; | 73 | interval.tv_nsec = 600000; |
74 | ::nanosleep( &interval, &remain ); | 74 | ::nanosleep( &interval, &remain ); |
75 | OHingeStatus status = ODevice::inst()->readHingeSensor(); | 75 | OHingeStatus status = ODevice::inst()->readHingeSensor(); |
76 | odebug << "RotateApplet::readHingeSensor = " << (int) status << "" << oendl; | 76 | odebug << "RotateApplet::readHingeSensor = " << (int) status << "" << oendl; |
77 | 77 | ||
78 | Config cfg( "apm" ); | 78 | Config cfg( "apm" ); |
79 | cfg.setGroup( PowerStatusManager::readStatus().acStatus() == PowerStatus::Online ? "AC" : "Battery" ); | 79 | cfg.setGroup( PowerStatusManager::readStatus().acStatus() == PowerStatus::Online ? "AC" : "Battery" ); |
80 | int action = cfg.readNumEntry( "CloseHingeAction", 0 ); | 80 | int action = cfg.readNumEntry( "CloseHingeAction", 0 ); |
81 | 81 | ||
82 | if ( status == CASE_CLOSED ) | 82 | if ( status == CASE_CLOSED ) |
83 | { | 83 | { |
84 | switch ( action ) | 84 | switch ( action ) |
85 | { | 85 | { |
86 | case 1: /* DISPLAY OFF */ ODevice::inst()->setDisplayBrightness( 0 ); break; | 86 | case 1: /* DISPLAY OFF */ ODevice::inst()->setDisplayBrightness( 0 ); break; |
87 | case 2: /* SUSPEND */ ODevice::inst()->suspend(); break; | 87 | case 2: /* SUSPEND */ ODevice::inst()->suspend(); break; |
88 | default: /* IGNORE */ break; | 88 | default: /* IGNORE */ break; |
89 | } | 89 | } |
90 | } | 90 | } |
91 | else /* status != CASE_CLOSED */ | 91 | else /* status != CASE_CLOSED */ |
92 | { | 92 | { |
93 | switch ( action ) | 93 | switch ( action ) |
94 | { | 94 | { |
95 | case 1: /* DISPLAY OFF */ ODevice::inst()->setDisplayBrightness( 127 ); break; | 95 | case 1: /* DISPLAY OFF */ ODevice::inst()->setDisplayBrightness( 127 ); break; |
96 | case 2: /* SUSPEND */ /* How to wake up the device from kernel? */; break; | 96 | case 2: /* SUSPEND */ /* How to wake up the device from kernel? */; break; |
97 | default: /* IGNORE */ break; | 97 | default: /* IGNORE */ break; |
98 | } | 98 | } |
99 | } | 99 | } |
100 | odebug << "RotateApplet::switchAction " << cfg.readNumEntry( "CloseHingeAction" ) << " performed." << oendl; | 100 | odebug << "RotateApplet::switchAction " << cfg.readNumEntry( "CloseHingeAction" ) << " performed." << oendl; |
101 | } | 101 | } |
102 | 102 | ||
103 | QDataStream stream( data, IO_ReadOnly ); | 103 | QDataStream stream( data, IO_ReadOnly ); |
104 | if ( msg == "flip()" ) | 104 | if ( msg == "flip()" ) |
105 | { | 105 | { |
106 | activated ( ); | 106 | activated ( ); |
107 | } | 107 | } |
108 | else if ( msg == "rotateDefault()") | 108 | else if ( msg == "rotateDefault()") |
109 | { | 109 | { |
110 | rotateDefault(); | 110 | rotateDefault(); |
111 | } | 111 | } |
112 | } | 112 | } |
113 | 113 | ||
114 | int RotateApplet::position() const | 114 | int RotateApplet::position() const |
115 | { | 115 | { |
116 | return 3; | 116 | return 3; |
117 | } | 117 | } |
118 | 118 | ||
119 | QString RotateApplet::name() const | 119 | QString RotateApplet::name() const |
120 | { | 120 | { |
121 | return tr( "Rotate shortcut" ); | 121 | return tr( "Rotate shortcut" ); |
122 | } | 122 | } |
123 | 123 | ||
124 | QString RotateApplet::text() const | 124 | QString RotateApplet::text() const |
125 | { | 125 | { |
126 | return tr( "Rotate" ); | 126 | return tr( "Rotate" ); |
127 | } | 127 | } |
128 | 128 | ||
129 | /*QString RotateApplet::tr( const char* s ) const | 129 | /*QString RotateApplet::tr( const char* s ) const |
130 | { | 130 | { |
131 | return qApp->translate( "RotateApplet", s, 0 ); | 131 | return qApp->translate( "RotateApplet", s, 0 ); |
132 | } | 132 | } |
133 | 133 | ||
134 | QString RotateApplet::tr( const char* s, const char* p ) const | 134 | QString RotateApplet::tr( const char* s, const char* p ) const |
135 | { | 135 | { |
136 | return qApp->translate( "RotateApplet", s, p ); | 136 | return qApp->translate( "RotateApplet", s, p ); |
137 | } | 137 | } |
138 | */ | 138 | */ |
139 | 139 | ||
140 | QIconSet RotateApplet::icon() const | 140 | QIconSet RotateApplet::icon() const |
141 | { | 141 | { |
142 | QPixmap pix; | 142 | QPixmap pix; |
143 | QImage img = Resource::loadImage( "Rotation" ); | 143 | QImage img = Resource::loadImage( "Rotation" ); |
144 | if ( !img.isNull() ) | 144 | if ( !img.isNull() ) |
145 | pix.convertFromImage( img.smoothScale( 14, 14 ) ); | 145 | pix.convertFromImage( img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); |
146 | return pix; | 146 | return pix; |
147 | } | 147 | } |
148 | 148 | ||
149 | QPopupMenu* RotateApplet::popup(QWidget*) const | 149 | QPopupMenu* RotateApplet::popup(QWidget*) const |
150 | { | 150 | { |
151 | return 0; | 151 | return 0; |
152 | } | 152 | } |
153 | 153 | ||
154 | void RotateApplet::rotateDefault() | 154 | void RotateApplet::rotateDefault() |
155 | { | 155 | { |
156 | int rot = ODevice::inst()->rotation(); | 156 | int rot = ODevice::inst()->rotation(); |
157 | 157 | ||
158 | switch (rot) | 158 | switch (rot) |
159 | { | 159 | { |
160 | case Rot0: rot=0; break; | 160 | case Rot0: rot=0; break; |
161 | case Rot90: rot=90; break; | 161 | case Rot90: rot=90; break; |
162 | case Rot180: rot=180; break; | 162 | case Rot180: rot=180; break; |
163 | case Rot270: rot=270; break; | 163 | case Rot270: rot=270; break; |
164 | default: rot=0; break; | 164 | default: rot=0; break; |
165 | } | 165 | } |
166 | 166 | ||
167 | Config cfg( "qpe" ); | 167 | Config cfg( "qpe" ); |
168 | cfg.setGroup( "Appearance" ); | 168 | cfg.setGroup( "Appearance" ); |
169 | 169 | ||
170 | bool rotateEnabled = cfg.readBoolEntry( "rotateEnabled",true ); | 170 | bool rotateEnabled = cfg.readBoolEntry( "rotateEnabled",true ); |
171 | 171 | ||
172 | if ( !rotateEnabled) return; | 172 | if ( !rotateEnabled) return; |
173 | 173 | ||
174 | // hide inputs methods before rotation | 174 | // hide inputs methods before rotation |
175 | QCopEnvelope en( "QPE/TaskBar", "hideInputMethod()" ); | 175 | QCopEnvelope en( "QPE/TaskBar", "hideInputMethod()" ); |
176 | 176 | ||
177 | QCopEnvelope env( "QPE/System", "setCurrentRotation(int)" ); | 177 | QCopEnvelope env( "QPE/System", "setCurrentRotation(int)" ); |
178 | env << rot; | 178 | env << rot; |
179 | 179 | ||
180 | m_flipped = false; | 180 | m_flipped = false; |
181 | 181 | ||
182 | } | 182 | } |
183 | void RotateApplet::activated() | 183 | void RotateApplet::activated() |
184 | { | 184 | { |
185 | int defaultRotation = QPEApplication::defaultRotation(); | 185 | int defaultRotation = QPEApplication::defaultRotation(); |
186 | int newRotation = defaultRotation; | 186 | int newRotation = defaultRotation; |
187 | 187 | ||
188 | Config cfg( "qpe" ); | 188 | Config cfg( "qpe" ); |
189 | cfg.setGroup( "Appearance" ); | 189 | cfg.setGroup( "Appearance" ); |
190 | 190 | ||
191 | int rotDirection = cfg.readNumEntry( "rotatedir" ); | 191 | int rotDirection = cfg.readNumEntry( "rotatedir" ); |
192 | ODirection rot = CW; | 192 | ODirection rot = CW; |
193 | 193 | ||
194 | if (rotDirection == -1) | 194 | if (rotDirection == -1) |
195 | { | 195 | { |
196 | rot = ODevice::inst()->direction(); | 196 | rot = ODevice::inst()->direction(); |
197 | } | 197 | } |
198 | else | 198 | else |
199 | { | 199 | { |
200 | rot = (ODirection) rotDirection; | 200 | rot = (ODirection) rotDirection; |
201 | } | 201 | } |
202 | 202 | ||
203 | // hide inputs methods before rotation | 203 | // hide inputs methods before rotation |
204 | QCopEnvelope en( "QPE/TaskBar", "hideInputMethod()" ); | 204 | QCopEnvelope en( "QPE/TaskBar", "hideInputMethod()" ); |
205 | 205 | ||
206 | if ( m_flipped ) | 206 | if ( m_flipped ) |
207 | { | 207 | { |
208 | // if flipped, flip back to the original state, | 208 | // if flipped, flip back to the original state, |
209 | // regardless of rotation direction | 209 | // regardless of rotation direction |
210 | newRotation = defaultRotation; | 210 | newRotation = defaultRotation; |
211 | } | 211 | } |
212 | else | 212 | else |
213 | { | 213 | { |
214 | if ( rot == CCW ) | 214 | if ( rot == CCW ) |
215 | { | 215 | { |
216 | newRotation = ( defaultRotation + 90 ) % 360; | 216 | newRotation = ( defaultRotation + 90 ) % 360; |
217 | } | 217 | } |
218 | else if ( rot == CW ) | 218 | else if ( rot == CW ) |
219 | { | 219 | { |
220 | newRotation = ( defaultRotation + 270 ) % 360; | 220 | newRotation = ( defaultRotation + 270 ) % 360; |
221 | } | 221 | } |
222 | else if ( rot == Flip ) | 222 | else if ( rot == Flip ) |
223 | { | 223 | { |
224 | newRotation = ( defaultRotation + 180 ) % 360; | 224 | newRotation = ( defaultRotation + 180 ) % 360; |
225 | } | 225 | } |
226 | } | 226 | } |
227 | 227 | ||
228 | QCopEnvelope env( "QPE/System", "setCurrentRotation(int)" ); | 228 | QCopEnvelope env( "QPE/System", "setCurrentRotation(int)" ); |
229 | env << newRotation; | 229 | env << newRotation; |
230 | 230 | ||
231 | m_flipped = !m_flipped; | 231 | m_flipped = !m_flipped; |
232 | } | 232 | } |
233 | 233 | ||
234 | 234 | ||
235 | QRESULT RotateApplet::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) | 235 | QRESULT RotateApplet::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) |
236 | { | 236 | { |
237 | *iface = 0; | 237 | *iface = 0; |
238 | if ( uuid == IID_QUnknown ) | 238 | if ( uuid == IID_QUnknown ) |
239 | *iface = this; | 239 | *iface = this; |
240 | else if ( uuid == IID_MenuApplet ) | 240 | else if ( uuid == IID_MenuApplet ) |
241 | *iface = this; | 241 | *iface = this; |
242 | else | 242 | else |
243 | return QS_FALSE; | 243 | return QS_FALSE; |
244 | 244 | ||
245 | if ( *iface ) | 245 | if ( *iface ) |
246 | (*iface)->addRef(); | 246 | (*iface)->addRef(); |
247 | return QS_OK; | 247 | return QS_OK; |
248 | } | 248 | } |
249 | 249 | ||
250 | Q_EXPORT_INTERFACE() | 250 | Q_EXPORT_INTERFACE() |
251 | { | 251 | { |
252 | Q_CREATE_INSTANCE( RotateApplet ) | 252 | Q_CREATE_INSTANCE( RotateApplet ) |
253 | } | 253 | } |
diff --git a/core/applets/suspendapplet/suspend.cpp b/core/applets/suspendapplet/suspend.cpp index 0eb94cb..4fbd704 100644 --- a/core/applets/suspendapplet/suspend.cpp +++ b/core/applets/suspendapplet/suspend.cpp | |||
@@ -1,85 +1,85 @@ | |||
1 | #include "suspend.h" | ||
2 | |||
3 | #include <qpe/applnk.h> | ||
1 | #include <qpe/resource.h> | 4 | #include <qpe/resource.h> |
2 | #include <qpe/qcopenvelope_qws.h> | 5 | #include <qpe/qcopenvelope_qws.h> |
3 | 6 | ||
4 | #include <qapplication.h> | 7 | #include <qapplication.h> |
5 | 8 | ||
6 | #include "suspend.h" | ||
7 | |||
8 | |||
9 | SuspendApplet::SuspendApplet ( ) | 9 | SuspendApplet::SuspendApplet ( ) |
10 | : QObject ( 0, "SuspendApplet" ) | 10 | : QObject ( 0, "SuspendApplet" ) |
11 | { | 11 | { |
12 | } | 12 | } |
13 | 13 | ||
14 | SuspendApplet::~SuspendApplet ( ) | 14 | SuspendApplet::~SuspendApplet ( ) |
15 | { | 15 | { |
16 | } | 16 | } |
17 | 17 | ||
18 | int SuspendApplet::position ( ) const | 18 | int SuspendApplet::position ( ) const |
19 | { | 19 | { |
20 | return 2; | 20 | return 2; |
21 | } | 21 | } |
22 | 22 | ||
23 | QString SuspendApplet::name ( ) const | 23 | QString SuspendApplet::name ( ) const |
24 | { | 24 | { |
25 | return tr( "Suspend shortcut" ); | 25 | return tr( "Suspend shortcut" ); |
26 | } | 26 | } |
27 | 27 | ||
28 | QString SuspendApplet::text ( ) const | 28 | QString SuspendApplet::text ( ) const |
29 | { | 29 | { |
30 | return tr( "Suspend" ); | 30 | return tr( "Suspend" ); |
31 | } | 31 | } |
32 | 32 | ||
33 | QString SuspendApplet::tr( const char* s ) const | 33 | QString SuspendApplet::tr( const char* s ) const |
34 | { | 34 | { |
35 | return qApp->translate( "SuspendApplet", s, 0 ); | 35 | return qApp->translate( "SuspendApplet", s, 0 ); |
36 | } | 36 | } |
37 | 37 | ||
38 | QString SuspendApplet::tr( const char* s, const char* p ) const | 38 | QString SuspendApplet::tr( const char* s, const char* p ) const |
39 | { | 39 | { |
40 | return qApp->translate( "SuspendApplet", s, p ); | 40 | return qApp->translate( "SuspendApplet", s, p ); |
41 | } | 41 | } |
42 | 42 | ||
43 | QIconSet SuspendApplet::icon ( ) const | 43 | QIconSet SuspendApplet::icon ( ) const |
44 | { | 44 | { |
45 | QPixmap pix; | 45 | QPixmap pix; |
46 | QImage img = Resource::loadImage ( "suspend" ); | 46 | QImage img = Resource::loadImage ( "suspend" ); |
47 | 47 | ||
48 | if ( !img. isNull ( )) | 48 | if ( !img. isNull ( )) |
49 | pix. convertFromImage ( img. smoothScale ( 14, 14 )); | 49 | pix.convertFromImage( img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); |
50 | return pix; | 50 | return pix; |
51 | } | 51 | } |
52 | 52 | ||
53 | QPopupMenu *SuspendApplet::popup ( QWidget * ) const | 53 | QPopupMenu *SuspendApplet::popup ( QWidget * ) const |
54 | { | 54 | { |
55 | return 0; | 55 | return 0; |
56 | } | 56 | } |
57 | 57 | ||
58 | void SuspendApplet::activated ( ) | 58 | void SuspendApplet::activated ( ) |
59 | { | 59 | { |
60 | // suspend | 60 | // suspend |
61 | QCopEnvelope ( "QPE/System", "suspend()" ); | 61 | QCopEnvelope ( "QPE/System", "suspend()" ); |
62 | } | 62 | } |
63 | 63 | ||
64 | 64 | ||
65 | QRESULT SuspendApplet::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) | 65 | QRESULT SuspendApplet::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) |
66 | { | 66 | { |
67 | *iface = 0; | 67 | *iface = 0; |
68 | if ( uuid == IID_QUnknown ) | 68 | if ( uuid == IID_QUnknown ) |
69 | *iface = this; | 69 | *iface = this; |
70 | else if ( uuid == IID_MenuApplet ) | 70 | else if ( uuid == IID_MenuApplet ) |
71 | *iface = this; | 71 | *iface = this; |
72 | else | 72 | else |
73 | return QS_FALSE; | 73 | return QS_FALSE; |
74 | 74 | ||
75 | if ( *iface ) | 75 | if ( *iface ) |
76 | (*iface)-> addRef ( ); | 76 | (*iface)-> addRef ( ); |
77 | return QS_OK; | 77 | return QS_OK; |
78 | } | 78 | } |
79 | 79 | ||
80 | Q_EXPORT_INTERFACE( ) | 80 | Q_EXPORT_INTERFACE( ) |
81 | { | 81 | { |
82 | Q_CREATE_INSTANCE( SuspendApplet ) | 82 | Q_CREATE_INSTANCE( SuspendApplet ) |
83 | } | 83 | } |
84 | 84 | ||
85 | 85 | ||
diff --git a/core/applets/suspendapplet/suspend.h b/core/applets/suspendapplet/suspend.h index 8c54cde..c037adc 100644 --- a/core/applets/suspendapplet/suspend.h +++ b/core/applets/suspendapplet/suspend.h | |||
@@ -1,47 +1,48 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** 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 | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** 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. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #ifndef __OPIE_SUSPEND_APPLET_H__ | 20 | #ifndef __OPIE_SUSPEND_APPLET_H__ |
21 | #define __OPIE_SUSPEND_APPLET_H__ | 21 | #define __OPIE_SUSPEND_APPLET_H__ |
22 | 22 | ||
23 | #include <qpe/menuappletinterface.h> | 23 | #include <qpe/menuappletinterface.h> |
24 | #include <qobject.h> | ||
24 | 25 | ||
25 | class SuspendApplet : public QObject, public MenuAppletInterface | 26 | class SuspendApplet : public QObject, public MenuAppletInterface |
26 | { | 27 | { |
27 | public: | 28 | public: |
28 | SuspendApplet ( ); | 29 | SuspendApplet ( ); |
29 | virtual ~SuspendApplet ( ); | 30 | virtual ~SuspendApplet ( ); |
30 | 31 | ||
31 | QRESULT queryInterface( const QUuid&, QUnknownInterface** ); | 32 | QRESULT queryInterface( const QUuid&, QUnknownInterface** ); |
32 | Q_REFCOUNT | 33 | Q_REFCOUNT |
33 | 34 | ||
34 | virtual int position() const; | 35 | virtual int position() const; |
35 | 36 | ||
36 | virtual QString name ( ) const; | 37 | virtual QString name ( ) const; |
37 | virtual QIconSet icon ( ) const; | 38 | virtual QIconSet icon ( ) const; |
38 | virtual QString text ( ) const; | 39 | virtual QString text ( ) const; |
39 | virtual QString tr( const char* ) const; | 40 | virtual QString tr( const char* ) const; |
40 | virtual QString tr( const char*, const char* ) const; | 41 | virtual QString tr( const char*, const char* ) const; |
41 | virtual QPopupMenu *popup ( QWidget *parent ) const; | 42 | virtual QPopupMenu *popup ( QWidget *parent ) const; |
42 | 43 | ||
43 | virtual void activated ( ); | 44 | virtual void activated ( ); |
44 | 45 | ||
45 | }; | 46 | }; |
46 | 47 | ||
47 | #endif | 48 | #endif |
diff --git a/core/applets/vtapplet/vt.cpp b/core/applets/vtapplet/vt.cpp index 7832ee0..ae89635 100644 --- a/core/applets/vtapplet/vt.cpp +++ b/core/applets/vtapplet/vt.cpp | |||
@@ -1,172 +1,173 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2003-2004 Michael 'Mickey' Lauer <mickey@Vanille.de> | 2 | ** Copyright (C) 2003-2004 Michael 'Mickey' Lauer <mickey@Vanille.de> |
3 | ** | 3 | ** |
4 | ** This file may be distributed and/or modified under the terms of the | 4 | ** This file may be distributed and/or modified under the terms of the |
5 | ** GNU General Public License version 2 as published by the Free Software | 5 | ** GNU General Public License version 2 as published by the Free Software |
6 | ** Foundation and appearing in the file LICENSE.GPL included in the | 6 | ** Foundation and appearing in the file LICENSE.GPL included in the |
7 | ** packaging of this file. | 7 | ** packaging of this file. |
8 | ** | 8 | ** |
9 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 9 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
10 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 10 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
11 | ** | 11 | ** |
12 | **********************************************************************/ | 12 | **********************************************************************/ |
13 | 13 | ||
14 | #include "vt.h" | 14 | #include "vt.h" |
15 | 15 | ||
16 | /* OPIE */ | 16 | /* OPIE */ |
17 | #include <opie2/odebug.h> | 17 | #include <opie2/odebug.h> |
18 | #include <qpe/applnk.h> | ||
18 | #include <qpe/resource.h> | 19 | #include <qpe/resource.h> |
19 | using namespace Opie::Core; | 20 | using namespace Opie::Core; |
20 | 21 | ||
21 | /* QT */ | 22 | /* QT */ |
22 | #include <qpopupmenu.h> | 23 | #include <qpopupmenu.h> |
23 | 24 | ||
24 | /* STD */ | 25 | /* STD */ |
25 | #include <fcntl.h> | 26 | #include <fcntl.h> |
26 | #include <unistd.h> | 27 | #include <unistd.h> |
27 | #include <sys/types.h> | 28 | #include <sys/types.h> |
28 | #include <sys/stat.h> | 29 | #include <sys/stat.h> |
29 | #include <sys/ioctl.h> | 30 | #include <sys/ioctl.h> |
30 | #include <linux/vt.h> | 31 | #include <linux/vt.h> |
31 | 32 | ||
32 | VTApplet::VTApplet ( ) | 33 | VTApplet::VTApplet ( ) |
33 | : QObject ( 0, "VTApplet" ) | 34 | : QObject ( 0, "VTApplet" ) |
34 | { | 35 | { |
35 | } | 36 | } |
36 | 37 | ||
37 | VTApplet::~VTApplet ( ) | 38 | VTApplet::~VTApplet ( ) |
38 | { | 39 | { |
39 | } | 40 | } |
40 | 41 | ||
41 | int VTApplet::position ( ) const | 42 | int VTApplet::position ( ) const |
42 | { | 43 | { |
43 | return 2; | 44 | return 2; |
44 | } | 45 | } |
45 | 46 | ||
46 | QString VTApplet::name ( ) const | 47 | QString VTApplet::name ( ) const |
47 | { | 48 | { |
48 | return tr( "VT shortcut" ); | 49 | return tr( "VT shortcut" ); |
49 | } | 50 | } |
50 | 51 | ||
51 | QString VTApplet::text ( ) const | 52 | QString VTApplet::text ( ) const |
52 | { | 53 | { |
53 | return tr( "Terminal" ); | 54 | return tr( "Terminal" ); |
54 | } | 55 | } |
55 | 56 | ||
56 | /* | 57 | /* |
57 | QString VTApplet::tr( const char* s ) const | 58 | QString VTApplet::tr( const char* s ) const |
58 | { | 59 | { |
59 | return qApp->translate( "VTApplet", s, 0 ); | 60 | return qApp->translate( "VTApplet", s, 0 ); |
60 | } | 61 | } |
61 | 62 | ||
62 | QString VTApplet::tr( const char* s, const char* p ) const | 63 | QString VTApplet::tr( const char* s, const char* p ) const |
63 | { | 64 | { |
64 | return qApp->translate( "VTApplet", s, p ); | 65 | return qApp->translate( "VTApplet", s, p ); |
65 | } | 66 | } |
66 | */ | 67 | */ |
67 | 68 | ||
68 | QIconSet VTApplet::icon ( ) const | 69 | QIconSet VTApplet::icon ( ) const |
69 | { | 70 | { |
70 | QPixmap pix; | 71 | QPixmap pix; |
71 | QImage img = Resource::loadImage ( "terminal" ); | 72 | QImage img = Resource::loadImage ( "terminal" ); |
72 | 73 | ||
73 | if ( !img. isNull ( )) | 74 | if ( !img. isNull ( )) |
74 | pix. convertFromImage ( img. smoothScale ( 14, 14 )); | 75 | pix.convertFromImage( img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); |
75 | return pix; | 76 | return pix; |
76 | } | 77 | } |
77 | 78 | ||
78 | QPopupMenu *VTApplet::popup ( QWidget* parent ) const | 79 | QPopupMenu *VTApplet::popup ( QWidget* parent ) const |
79 | { | 80 | { |
80 | odebug << "VTApplet::popup" << oendl; | 81 | odebug << "VTApplet::popup" << oendl; |
81 | 82 | ||
82 | struct vt_stat vtstat; | 83 | struct vt_stat vtstat; |
83 | #ifdef QT_QWS_DEVFS | 84 | #ifdef QT_QWS_DEVFS |
84 | int fd = ::open( "/dev/vc/0", O_RDWR ); | 85 | int fd = ::open( "/dev/vc/0", O_RDWR ); |
85 | #else | 86 | #else |
86 | int fd = ::open( "/dev/tty0", O_RDWR ); | 87 | int fd = ::open( "/dev/tty0", O_RDWR ); |
87 | #endif | 88 | #endif |
88 | if ( fd == -1 ) return 0; | 89 | if ( fd == -1 ) return 0; |
89 | if ( ioctl( fd, VT_GETSTATE, &vtstat ) == -1 ) return 0; | 90 | if ( ioctl( fd, VT_GETSTATE, &vtstat ) == -1 ) return 0; |
90 | 91 | ||
91 | m_subMenu = new QPopupMenu( parent ); | 92 | m_subMenu = new QPopupMenu( parent ); |
92 | m_subMenu->setCheckable( true ); | 93 | m_subMenu->setCheckable( true ); |
93 | for ( int i = 1; i < 10; ++i ) | 94 | for ( int i = 1; i < 10; ++i ) |
94 | { | 95 | { |
95 | int id = m_subMenu->insertItem( QString::number( i ), 500+i ); | 96 | int id = m_subMenu->insertItem( QString::number( i ), 500+i ); |
96 | m_subMenu->setItemChecked( id, id-500 == vtstat.v_active ); | 97 | m_subMenu->setItemChecked( id, id-500 == vtstat.v_active ); |
97 | } | 98 | } |
98 | ::close( fd ); | 99 | ::close( fd ); |
99 | 100 | ||
100 | connect( m_subMenu, SIGNAL( activated(int) ), this, SLOT( changeVT(int) ) ); | 101 | connect( m_subMenu, SIGNAL( activated(int) ), this, SLOT( changeVT(int) ) ); |
101 | connect( m_subMenu, SIGNAL( aboutToShow() ), this, SLOT( updateMenu() ) ); | 102 | connect( m_subMenu, SIGNAL( aboutToShow() ), this, SLOT( updateMenu() ) ); |
102 | 103 | ||
103 | return m_subMenu; | 104 | return m_subMenu; |
104 | } | 105 | } |
105 | 106 | ||
106 | 107 | ||
107 | void VTApplet::changeVT( int index ) | 108 | void VTApplet::changeVT( int index ) |
108 | { | 109 | { |
109 | //odebug << "VTApplet::changeVT( " << index-500 << " )" << oendl; | 110 | //odebug << "VTApplet::changeVT( " << index-500 << " )" << oendl; |
110 | 111 | ||
111 | #ifdef QT_QWS_DEVFS | 112 | #ifdef QT_QWS_DEVFS |
112 | int fd = ::open("/dev/vc/0", O_RDWR); | 113 | int fd = ::open("/dev/vc/0", O_RDWR); |
113 | #else | 114 | #else |
114 | int fd = ::open("/dev/tty0", O_RDWR); | 115 | int fd = ::open("/dev/tty0", O_RDWR); |
115 | #endif | 116 | #endif |
116 | if ( fd == -1 ) return; | 117 | if ( fd == -1 ) return; |
117 | ioctl( fd, VT_ACTIVATE, index-500 ); | 118 | ioctl( fd, VT_ACTIVATE, index-500 ); |
118 | } | 119 | } |
119 | 120 | ||
120 | 121 | ||
121 | void VTApplet::updateMenu() | 122 | void VTApplet::updateMenu() |
122 | { | 123 | { |
123 | //odebug << "VTApplet::updateMenu()" << oendl; | 124 | //odebug << "VTApplet::updateMenu()" << oendl; |
124 | 125 | ||
125 | int fd = ::open( "/dev/console", O_RDONLY ); | 126 | int fd = ::open( "/dev/console", O_RDONLY ); |
126 | if ( fd == -1 ) return; | 127 | if ( fd == -1 ) return; |
127 | 128 | ||
128 | for ( int i = 1; i < 10; ++i ) | 129 | for ( int i = 1; i < 10; ++i ) |
129 | { | 130 | { |
130 | int result = ioctl( fd, VT_DISALLOCATE, i ); | 131 | int result = ioctl( fd, VT_DISALLOCATE, i ); |
131 | 132 | ||
132 | /* | 133 | /* |
133 | if ( result == -1 ) | 134 | if ( result == -1 ) |
134 | odebug << "VT " << i << " disallocated == free" << oendl; | 135 | odebug << "VT " << i << " disallocated == free" << oendl; |
135 | else | 136 | else |
136 | odebug << "VT " << i << " _not_ disallocated == busy" << oendl; | 137 | odebug << "VT " << i << " _not_ disallocated == busy" << oendl; |
137 | */ | 138 | */ |
138 | 139 | ||
139 | m_subMenu->setItemEnabled( 500+i, result == -1 ); | 140 | m_subMenu->setItemEnabled( 500+i, result == -1 ); |
140 | } | 141 | } |
141 | 142 | ||
142 | ::close( fd ); | 143 | ::close( fd ); |
143 | } | 144 | } |
144 | 145 | ||
145 | 146 | ||
146 | void VTApplet::activated() | 147 | void VTApplet::activated() |
147 | { | 148 | { |
148 | odebug << "VTApplet::activated()" << oendl; | 149 | odebug << "VTApplet::activated()" << oendl; |
149 | } | 150 | } |
150 | 151 | ||
151 | 152 | ||
152 | QRESULT VTApplet::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) | 153 | QRESULT VTApplet::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) |
153 | { | 154 | { |
154 | *iface = 0; | 155 | *iface = 0; |
155 | if ( uuid == IID_QUnknown ) | 156 | if ( uuid == IID_QUnknown ) |
156 | *iface = this; | 157 | *iface = this; |
157 | else if ( uuid == IID_MenuApplet ) | 158 | else if ( uuid == IID_MenuApplet ) |
158 | *iface = this; | 159 | *iface = this; |
159 | else | 160 | else |
160 | return QS_FALSE; | 161 | return QS_FALSE; |
161 | 162 | ||
162 | if ( *iface ) | 163 | if ( *iface ) |
163 | (*iface)-> addRef ( ); | 164 | (*iface)-> addRef ( ); |
164 | return QS_OK; | 165 | return QS_OK; |
165 | } | 166 | } |
166 | 167 | ||
167 | Q_EXPORT_INTERFACE( ) | 168 | Q_EXPORT_INTERFACE( ) |
168 | { | 169 | { |
169 | Q_CREATE_INSTANCE( VTApplet ) | 170 | Q_CREATE_INSTANCE( VTApplet ) |
170 | } | 171 | } |
171 | 172 | ||
172 | 173 | ||