summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--ChangeLog1
-rw-r--r--noncore/apps/opie-console/emulation_handler.cpp3
-rw-r--r--noncore/apps/opie-console/emulation_handler.h1
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp41
-rw-r--r--noncore/apps/opie-console/mainwindow.h9
5 files changed, 55 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 07be30b..b817062 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,339 +1,340 @@
1 2005-??-??Opie 1.2.2 1 2005-??-??Opie 1.2.2
2 2
3 3
4 New Features 4 New Features
5 ------------ 5 ------------
6 6
7 7
8 Fixed Bugs 8 Fixed Bugs
9 ---------- 9 ----------
10 * #1695 - Date selector use too small fontsize on VGA screen (hrw) 10 * #1695 - Date selector use too small fontsize on VGA screen (hrw)
11 * #1686 - opie-console lack UI setting for switching scrollbar (hrw)
11 * n.a. - remove hardcoded font size from wellenreiter (hrw) 12 * n.a. - remove hardcoded font size from wellenreiter (hrw)
12 * n.a. - added patch to build QT/E 2.3.10 with gc 4.x.x (hrw) 13 * n.a. - added patch to build QT/E 2.3.10 with gc 4.x.x (hrw)
13 14
14 2005-09-11Opie 1.2.1 15 2005-09-11Opie 1.2.1
15 16
16 17
17 New Features 18 New Features
18 ------------ 19 ------------
19 * OpieStumbler: Scans WiFi networks using the wireless extension scanning (skyhusker) 20 * OpieStumbler: Scans WiFi networks using the wireless extension scanning (skyhusker)
20 * Opie-Reader: Support for document formats ArriereGo and Reb, add flite output (tim,pohly) 21 * Opie-Reader: Support for document formats ArriereGo and Reb, add flite output (tim,pohly)
21 * Opie-Networksettings: Add support for wlan-ng devices and improve WEP handling (Dirk Opfer) 22 * Opie-Networksettings: Add support for wlan-ng devices and improve WEP handling (Dirk Opfer)
22 * Wellenreiter: Remove Joining networks - use OpieStumbler for that (mickeyl) 23 * Wellenreiter: Remove Joining networks - use OpieStumbler for that (mickeyl)
23 * Opie-Mobilemsg has gone unsupported - it never really worked and there will be a replacement (mickeyl) 24 * Opie-Mobilemsg has gone unsupported - it never really worked and there will be a replacement (mickeyl)
24 * Opie-Tabmanager has gone unsupported - it barely works and there is not much of a use of it anyway (mickeyl) 25 * Opie-Tabmanager has gone unsupported - it barely works and there is not much of a use of it anyway (mickeyl)
25 * Checkbook: Added configuration option to use smaller font for checkbook transaction tab (hrw) 26 * Checkbook: Added configuration option to use smaller font for checkbook transaction tab (hrw)
26 * ZSafe: Made UI conform to Opie standards (drw) 27 * ZSafe: Made UI conform to Opie standards (drw)
27 * Today Addressbook plugin: Fixed configuration to show/not show birthdays, use checkboxes for selection (hrw) 28 * Today Addressbook plugin: Fixed configuration to show/not show birthdays, use checkboxes for selection (hrw)
28 * Opie-Console: Read initial fixed font configuration from qpe.conf (mickeyl) 29 * Opie-Console: Read initial fixed font configuration from qpe.conf (mickeyl)
29 * Opie-PcmciaApplet: Configure insert/resume actions and bind unsupported cards (mickeyl) 30 * Opie-PcmciaApplet: Configure insert/resume actions and bind unsupported cards (mickeyl)
30 * SysInfo: Remove CPU tab and add Devices tab instead (mickeyl) 31 * SysInfo: Remove CPU tab and add Devices tab instead (mickeyl)
31 * Opie-smb: Added Opie front end for Samba (ljp) 32 * Opie-smb: Added Opie front end for Samba (ljp)
32 * Opie-Bluetooth: Replace obex send implementation and patch libopieobex and the bluetoothapplet (Michael Haynie) 33 * Opie-Bluetooth: Replace obex send implementation and patch libopieobex and the bluetoothapplet (Michael Haynie)
33 * Opieplayer: rudimentary podcast support (ljp) 34 * Opieplayer: rudimentary podcast support (ljp)
34 35
35 Fixed Bugs 36 Fixed Bugs
36 ---------- 37 ----------
37 * #1377 - Suspend Powermanagement when switched to another VT (mickeyl) 38 * #1377 - Suspend Powermanagement when switched to another VT (mickeyl)
38 - We actually suspend the complete Opie now in that case. 39 - We actually suspend the complete Opie now in that case.
39 * #1384 - Battery status updated improperly when charging (skyhusker) 40 * #1384 - Battery status updated improperly when charging (skyhusker)
40 * #1476 - Wrong order of application entries in the O-menu (skyhusker) 41 * #1476 - Wrong order of application entries in the O-menu (skyhusker)
41 * #1514 - Remove usage of cardmon/pcmcia picture in applications. pcmcia is now an inline picture (mickeyl) 42 * #1514 - Remove usage of cardmon/pcmcia picture in applications. pcmcia is now an inline picture (mickeyl)
42 * #1535- Missing line break and unnecessary location shown with Today-Calendar plugin (deller) 43 * #1535- Missing line break and unnecessary location shown with Today-Calendar plugin (deller)
43 * #1543 - Time Settings: "predict" tab is displayed twice after reopen (hrw) 44 * #1543 - Time Settings: "predict" tab is displayed twice after reopen (hrw)
44 * #1546 - Battery applet popup is not always large enough to show jacket remaining info (skyhusker) 45 * #1546 - Battery applet popup is not always large enough to show jacket remaining info (skyhusker)
45 * #1557 - Light&Power-Settings don't store warning intervall and warning levels (skyhusker) 46 * #1557 - Light&Power-Settings don't store warning intervall and warning levels (skyhusker)
46 * #1565 - crash-fix in odevice.cpp while scanning the distribution table (deller) 47 * #1565 - crash-fix in odevice.cpp while scanning the distribution table (deller)
47 * #1614 - Make Opie-console start in $HOME instead of / (skyhusker) 48 * #1614 - Make Opie-console start in $HOME instead of / (skyhusker)
48 * #1635 - opie-today, datebook-plugin does not show notes (skyhusker) 49 * #1635 - opie-today, datebook-plugin does not show notes (skyhusker)
49 * #1665 - Opie-IRC displays the host prepended to the message when peer is using and ipv6 address (skyhusker) 50 * #1665 - Opie-IRC displays the host prepended to the message when peer is using and ipv6 address (skyhusker)
50 * #1666 - Opie-IRC does not allow to add !channels in config asautojoin ones (skyhusker) 51 * #1666 - Opie-IRC does not allow to add !channels in config asautojoin ones (skyhusker)
51 * #1667 - Opie-IRC does not show messages from !channel (skyhusker) 52 * #1667 - Opie-IRC does not show messages from !channel (skyhusker)
52 * #1679 - Security PIN plugin is QVGA sized (hrw) 53 * #1679 - Security PIN plugin is QVGA sized (hrw)
53 * #1682 - Properly resize tab control in OTabWidget (drw) 54 * #1682 - Properly resize tab control in OTabWidget (drw)
54 * n.a. - always show volume and wireless applet popups inside visible screen (deller) 55 * n.a. - always show volume and wireless applet popups inside visible screen (deller)
55 * n.a. - scale O-Menu-Applets appropriately (mickeyl) 56 * n.a. - scale O-Menu-Applets appropriately (mickeyl)
56 * n.a. - libopienet: fix bugs in wireless scanning and setting SSID (skyhusker) 57 * n.a. - libopienet: fix bugs in wireless scanning and setting SSID (skyhusker)
57 * n.a. - Wellenreiter: relax WE version matching test a bit (mickeyl) 58 * n.a. - Wellenreiter: relax WE version matching test a bit (mickeyl)
58 * n.a. - scale BluezApplet appropriately and use larger icons (mickeyl) 59 * n.a. - scale BluezApplet appropriately and use larger icons (mickeyl)
59 * n.a. - memoryapplet: fix crash in memoryapplet on kernels without swap support (seneca cunningham) 60 * n.a. - memoryapplet: fix crash in memoryapplet on kernels without swap support (seneca cunningham)
60 * n.a. - networksettings: ignore hostap control interfaces wifi* (mickeyl) 61 * n.a. - networksettings: ignore hostap control interfaces wifi* (mickeyl)
61 * n.a. - Today Addressbook plugin fix configuration to show/not show birthdays, use checkboxes for selection (hrw) 62 * n.a. - Today Addressbook plugin fix configuration to show/not show birthdays, use checkboxes for selection (hrw)
62 * n.a. - remove hardcoded font size from netsystemtime (hrw) 63 * n.a. - remove hardcoded font size from netsystemtime (hrw)
63 * n.a. - remove hardcoded font size from checkbook graphs (hrw) 64 * n.a. - remove hardcoded font size from checkbook graphs (hrw)
64 * n.a. - Dagger - fixes for Sword 1.5.8, morph tag x-refs, closing last tab crash (drw) 65 * n.a. - Dagger - fixes for Sword 1.5.8, morph tag x-refs, closing last tab crash (drw)
65 66
66 67
67 Internal 68 Internal
68 -------- 69 --------
69 * Make BluezApplet use OTaskbarApplet (mickeyl) 70 * Make BluezApplet use OTaskbarApplet (mickeyl)
70 * libopiecore: rewrite OFileNotification to use the Linux 2.6 inotify interface (mickeyl) 71 * libopiecore: rewrite OFileNotification to use the Linux 2.6 inotify interface (mickeyl)
71 * libopiecore: add ODirNotification - recursive directory notifications (mickeyl) 72 * libopiecore: add ODirNotification - recursive directory notifications (mickeyl)
72 * libopienet: Skip hostap control interfaces 'wifi' and improve robustness in ONetworkInterface (mickeyl) 73 * libopienet: Skip hostap control interfaces 'wifi' and improve robustness in ONetworkInterface (mickeyl)
73 * libopieui: Remove OVersatileView and OVersatileViewItem (mickeyl) 74 * libopieui: Remove OVersatileView and OVersatileViewItem (mickeyl)
74 * libopienet: Miscellaneous API cleanups (mickeyl) 75 * libopienet: Miscellaneous API cleanups (mickeyl)
75 * libopiecore: Add linux pcmcia system abstraction classes (mickeyl) 76 * libopiecore: Add linux pcmcia system abstraction classes (mickeyl)
76 * libopiecore: ODevice now knows the default gfx driver to use (mteira,mickeyl) 77 * libopiecore: ODevice now knows the default gfx driver to use (mteira,mickeyl)
77 * libopiecore: Add support for the Sharp SL-C3100 "Borzoi" (mickeyl) 78 * libopiecore: Add support for the Sharp SL-C3100 "Borzoi" (mickeyl)
78 * libopiecore: Add support for the new Linux Inputsystem Switches type [necessary for auto rotation in 2.6.13] (mickeyl) 79 * libopiecore: Add support for the new Linux Inputsystem Switches type [necessary for auto rotation in 2.6.13] (mickeyl)
79 * Remove assumptions about default gfx driver ("Transformed") all over the place (mteira,mickeyl) 80 * Remove assumptions about default gfx driver ("Transformed") all over the place (mteira,mickeyl)
80 * Fix / Optimize number of scanned directories (ljp) 81 * Fix / Optimize number of scanned directories (ljp)
81 * Use five point mouse calibration to make calibrated mouse drivers work on newer Zaurii (rp,mickeyl) 82 * Use five point mouse calibration to make calibrated mouse drivers work on newer Zaurii (rp,mickeyl)
82 83
83 2005-03-25Opie 1.2.0 84 2005-03-25Opie 1.2.0
84 85
85 Fixed Bugs 86 Fixed Bugs
86 ---------- 87 ----------
87 * #1613 - AdvancedFM - scale toolbar icons appropriately (drw) 88 * #1613 - AdvancedFM - scale toolbar icons appropriately (drw)
88 * #1620 - OFileSelector - show the button on press and not on press on hold (alwin) 89 * #1620 - OFileSelector - show the button on press and not on press on hold (alwin)
89 * #1473 - Opie-Eye - Same as #1620 but we lack a common FileSystem Button class (zecke) 90 * #1473 - Opie-Eye - Same as #1620 but we lack a common FileSystem Button class (zecke)
90 * n.a. - PackageManager - fix bug where messages show up multiple times in install dialog (drw) 91 * n.a. - PackageManager - fix bug where messages show up multiple times in install dialog (drw)
91 * n.a.- make qpeglobal.h include qglobal.h (zecke) 92 * n.a.- make qpeglobal.h include qglobal.h (zecke)
92 93
93 2005-03-20Opie 1.2.0-rc1 94 2005-03-20Opie 1.2.0-rc1
94 95
95 96
96 New Features 97 New Features
97 ------------ 98 ------------
98 * Launcher: Support a static background pixmap (mickeyl) 99 * Launcher: Support a static background pixmap (mickeyl)
99 * LauncherSettings: Choose whether to have a static background pixmap (mickeyl) 100 * LauncherSettings: Choose whether to have a static background pixmap (mickeyl)
100 * PackageManager supports the 'lists_dir' ipkg configuration option (drw) 101 * PackageManager supports the 'lists_dir' ipkg configuration option (drw)
101 * Added hi-res inline images for large resolution devices (drw) 102 * Added hi-res inline images for large resolution devices (drw)
102 * Improved launcher icons for consistency (ar) 103 * Improved launcher icons for consistency (ar)
103 * Datebook: Added plugin system to datebook so holidays and birthdays from contacts may displayed in datebook (alwin) 104 * Datebook: Added plugin system to datebook so holidays and birthdays from contacts may displayed in datebook (alwin)
104 105
105 Fixed Bugs 106 Fixed Bugs
106 ---------- 107 ----------
107 * #1236 - VCards contained empty home and work address entries causing Palms to crash (eilers) 108 * #1236 - VCards contained empty home and work address entries causing Palms to crash (eilers)
108 * #1412 - Launcher Settings - fixed default settings for background in Edit tab dialog (drw) 109 * #1412 - Launcher Settings - fixed default settings for background in Edit tab dialog (drw)
109 * #1472 - Opie textedit now check for unsaved changes on ESC key (ljp) 110 * #1472 - Opie textedit now check for unsaved changes on ESC key (ljp)
110 * #1474 - Implement GUI for Scrollbars on the Left in Appearance (zecke) 111 * #1474 - Implement GUI for Scrollbars on the Left in Appearance (zecke)
111 * #1482 - Fix double '/' in paths (zecke) 112 * #1482 - Fix double '/' in paths (zecke)
112 * #1536 - Autosave of custom locations in opie backup (ar) 113 * #1536 - Autosave of custom locations in opie backup (ar)
113 * #1539 - Fixed displaying too long path in the delete dialog in opie-eye (zecke) 114 * #1539 - Fixed displaying too long path in the delete dialog in opie-eye (zecke)
114 * #1540 - Implemented deletion of DocLnks in opie-eye (zecke) 115 * #1540 - Implemented deletion of DocLnks in opie-eye (zecke)
115 * #1542 - Fixed Todo crash when priority < 1 or > 5 (drw) 116 * #1542 - Fixed Todo crash when priority < 1 or > 5 (drw)
116 * #1550 - Browse for alarm sound start in QPEDIR/sounds/ (zecke) 117 * #1550 - Browse for alarm sound start in QPEDIR/sounds/ (zecke)
117 * #1554 - Fixed Opie-Console name in .desktop file (mickeyl) 118 * #1554 - Fixed Opie-Console name in .desktop file (mickeyl)
118 * #1556 - Start to look for sound files in /opt/QtPalmtop/sounds (zecke) 119 * #1556 - Start to look for sound files in /opt/QtPalmtop/sounds (zecke)
119 * #1558 - Fixed opie-login breaking opie startup (mickeyl) 120 * #1558 - Fixed opie-login breaking opie startup (mickeyl)
120 * #1560 - Fixed Opie-Console picking up the wrong shell (bluelightning) 121 * #1560 - Fixed Opie-Console picking up the wrong shell (bluelightning)
121 * #1570 - Confirmation needed befor Restore a backup and overwrite local data (ar) 122 * #1570 - Confirmation needed befor Restore a backup and overwrite local data (ar)
122 * #1591 - Addressbook sortorder changed by clicking on column 0 (eilers) 123 * #1591 - Addressbook sortorder changed by clicking on column 0 (eilers)
123 * #1599 - Security - change recommendation for opie-multiauth to opie-securityplugin (gints) 124 * #1599 - Security - change recommendation for opie-multiauth to opie-securityplugin (gints)
124 * #1604 - Checkbook crashed on startup (drw) 125 * #1604 - Checkbook crashed on startup (drw)
125 * #1608 - Addressbook crashed after search, which may caused by not initialzed member variable (eilers) 126 * #1608 - Addressbook crashed after search, which may caused by not initialzed member variable (eilers)
126 * #1608 - QueryByExampe-Datediff on SQL database did not worked properly (eilers) 127 * #1608 - QueryByExampe-Datediff on SQL database did not worked properly (eilers)
127 * n.a. - Netsystemtime - fixed UI to prevent error dialog from displaying when it shouldn't, get rid of some compiler warnings (drw) 128 * n.a. - Netsystemtime - fixed UI to prevent error dialog from displaying when it shouldn't, get rid of some compiler warnings (drw)
128 * n.a. - PackageManager - fixed where last package in status file was not shown as installed when it should be (drw) 129 * n.a. - PackageManager - fixed where last package in status file was not shown as installed when it should be (drw)
129 * n.a. - PackageManager - fixed bug where lists_dir was not being honored at startup (drw) 130 * n.a. - PackageManager - fixed bug where lists_dir was not being honored at startup (drw)
130 * n.a. - PackageManager - provided default value for lists_dir when none is entered in configuration dialog (drw) 131 * n.a. - PackageManager - provided default value for lists_dir when none is entered in configuration dialog (drw)
131 * n.a. - OTabWidget - fixed scroll buttons, fix display position of tabs (drw) 132 * n.a. - OTabWidget - fixed scroll buttons, fix display position of tabs (drw)
132 * n.a. - AddressBook - fixed sorting by 'File As' name (drw) 133 * n.a. - AddressBook - fixed sorting by 'File As' name (drw)
133 * n.a. - AddressBook - fixed category handling for 'All' and 'Unfiled' (eilers) 134 * n.a. - AddressBook - fixed category handling for 'All' and 'Unfiled' (eilers)
134 * n.a. - AddressBook - fixed letter picker record selection and sort records afterwards (drw) 135 * n.a. - AddressBook - fixed letter picker record selection and sort records afterwards (drw)
135 136
136 Internal 137 Internal
137 -------- 138 --------
138 * Worked around bug in Qt/Embedded 2.3.10: qt_version() returns 231 (mickeyl) 139 * Worked around bug in Qt/Embedded 2.3.10: qt_version() returns 231 (mickeyl)
139 * Killed the need for weak symbols in QtE (zecke) 140 * Killed the need for weak symbols in QtE (zecke)
140 * Added optional building libqpe without inline images (mickeyl) 141 * Added optional building libqpe without inline images (mickeyl)
141 * OColorButton - fixed so does not emit a colorSelected signal inside of resizeEvent (drw) 142 * OColorButton - fixed so does not emit a colorSelected signal inside of resizeEvent (drw)
142 143
143 2005-02-03Opie 1.1.9 144 2005-02-03Opie 1.1.9
144 145
145 New Features 146 New Features
146 ------------ 147 ------------
147 * Number of icon columns in Launcher is customizable through Launcher.conf (hrw,zecke,mickeyl) 148 * Number of icon columns in Launcher is customizable through Launcher.conf (hrw,zecke,mickeyl)
148 * Number of icon columns in Launcher is customizable through LauncherSettings (mickeyl) 149 * Number of icon columns in Launcher is customizable through LauncherSettings (mickeyl)
149 * Usability enhancements in OpieIRC (skyhusker) 150 * Usability enhancements in OpieIRC (skyhusker)
150 151
151 Fixed Bugs 152 Fixed Bugs
152 ---------- 153 ----------
153 * #1501 - Fixed bug in todo sql backend (eilers) 154 * #1501 - Fixed bug in todo sql backend (eilers)
154 * #1505 - Added more Swap sizes in memoryapplet (mickeyl) 155 * #1505 - Added more Swap sizes in memoryapplet (mickeyl)
155 * #1525 - Hopefully fixed double alarms and not removing alarms set with the Clock application (zecke) 156 * #1525 - Hopefully fixed double alarms and not removing alarms set with the Clock application (zecke)
156 * #1533 - Security Owner Dialog (shown in case of unsuccessfull authentiacation) wasn't able to display information in non latin1 encoding (zecke) 157 * #1533 - Security Owner Dialog (shown in case of unsuccessfull authentiacation) wasn't able to display information in non latin1 encoding (zecke)
157 * n.a. - Removed hard coded font sizes in a couple of inputmethods (mickeyl) 158 * n.a. - Removed hard coded font sizes in a couple of inputmethods (mickeyl)
158 * n.a. - Removed MediumDlg appearing prior to FirstUsage wizard (i.e. calibration) (mickeyl) 159 * n.a. - Removed MediumDlg appearing prior to FirstUsage wizard (i.e. calibration) (mickeyl)
159 * n.a. - Fixed numerous buglets in OpieIRC (skyhusker) 160 * n.a. - Fixed numerous buglets in OpieIRC (skyhusker)
160 161
161 Internal 162 Internal
162 -------- 163 --------
163 * Added the Qtopia 1.7 SDK macros for quick-apps to easa compilation of 3rd party apps against our headers (mickeyl) 164 * Added the Qtopia 1.7 SDK macros for quick-apps to easa compilation of 3rd party apps against our headers (mickeyl)
164 * You can now use the Opie build system in combination with a OpenEmbedded staging area which makes a nice cross development environment (mickeyl) 165 * You can now use the Opie build system in combination with a OpenEmbedded staging area which makes a nice cross development environment (mickeyl)
165 * Made Opie compilable with Qt/Embedded 2.3.10 (ar) 166 * Made Opie compilable with Qt/Embedded 2.3.10 (ar)
166 * Changed Launcher to get default orientation from ODevice w/ QWS_DISPLAY overriding (mickeyl) 167 * Changed Launcher to get default orientation from ODevice w/ QWS_DISPLAY overriding (mickeyl)
167 * Build tree cleanups (mickeyl) 168 * Build tree cleanups (mickeyl)
168 169
169 2004-11-26Opie 1.1.8 170 2004-11-26Opie 1.1.8
170 171
171 New Features 172 New Features
172 ------------ 173 ------------
173 * PackageManager supports installation of local ipkg files (drw) 174 * PackageManager supports installation of local ipkg files (drw)
174 * PackageManager supports linking of applications to root (drw) 175 * PackageManager supports linking of applications to root (drw)
175 * PackageManager supports src/gz feeds (drw,wimpie) 176 * PackageManager supports src/gz feeds (drw,wimpie)
176 * Added a syslog information tab to sysinfo (mickeyl) 177 * Added a syslog information tab to sysinfo (mickeyl)
177 * Added new, more consistent, PIM icons + a GIMP teplate (ar) 178 * Added new, more consistent, PIM icons + a GIMP teplate (ar)
178 179
179 Fixed Bugs 180 Fixed Bugs
180 ---------- 181 ----------
181 * #1017 - Tetrix doesn't display correctly for high resolution screens (drw) 182 * #1017 - Tetrix doesn't display correctly for high resolution screens (drw)
182 * #1269 - VCards were imported into personal area if it was activated (eilers) 183 * #1269 - VCards were imported into personal area if it was activated (eilers)
183 * #1464 - Packagemanager dont set active filter after install a package (drw) 184 * #1464 - Packagemanager dont set active filter after install a package (drw)
184 * #1479 - Improved VCard-Parser to import VCards created by Evolution 2 and Apple Addressbook (eilers) 185 * #1479 - Improved VCard-Parser to import VCards created by Evolution 2 and Apple Addressbook (eilers)
185 * #1493 - Fixed one column layout bug of the launcher (hrw) 186 * #1493 - Fixed one column layout bug of the launcher (hrw)
186 * n.a. - PackageManager - (Minor UI tweak) in filter dialog, when option is enabled, set focus to widget that corresponds to that option (drw) 187 * n.a. - PackageManager - (Minor UI tweak) in filter dialog, when option is enabled, set focus to widget that corresponds to that option (drw)
187 * n.a. - PackageManager - (Minor UI tweak) fix double entry in source feed configuration when adding a new feed (drw) 188 * n.a. - PackageManager - (Minor UI tweak) fix double entry in source feed configuration when adding a new feed (drw)
188 * n.a. - Battery Applet - fix sizing of battery info popup (drw,mickeyl) 189 * n.a. - Battery Applet - fix sizing of battery info popup (drw,mickeyl)
189 190
190 Internal 191 Internal
191 -------- 192 --------
192 * Moved libopie1 to unsupported (mickeyl) 193 * Moved libopie1 to unsupported (mickeyl)
193 * Implemented generic queryByExample() with incremental searching. A lot of internal changes of the Pim2-library (eilers) 194 * Implemented generic queryByExample() with incremental searching. A lot of internal changes of the Pim2-library (eilers)
194 * Added fast and full featured and incremental sorted() for SQL addressbook backend (eilers) 195 * Added fast and full featured and incremental sorted() for SQL addressbook backend (eilers)
195 196
196 2004-11-14Opie 1.1.7 197 2004-11-14Opie 1.1.7
197 198
198 New Features 199 New Features
199 ------------ 200 ------------
200 * libOpieDB now uses SQLite V3 instead V2. Remember to upgrade your database files! (eilers) 201 * libOpieDB now uses SQLite V3 instead V2. Remember to upgrade your database files! (eilers)
201 * Backup now uses the busy indicator when backing up and restore (ar) 202 * Backup now uses the busy indicator when backing up and restore (ar)
202 * OpiePlayer2 gained adding of Directories to the playlist (zecke) 203 * OpiePlayer2 gained adding of Directories to the playlist (zecke)
203 * OpiePlayer2 better error handling (zecke) 204 * OpiePlayer2 better error handling (zecke)
204 * OpiePlayer2 progress indication while streaming (zecke) 205 * OpiePlayer2 progress indication while streaming (zecke)
205 * OpiePlayer2 ported to use libxine 1.0.0-rc6a (brad,zecke) 206 * OpiePlayer2 ported to use libxine 1.0.0-rc6a (brad,zecke)
206 * Ported brightnessapplet from Qtopia 1.7 (mickeyl) 207 * Ported brightnessapplet from Qtopia 1.7 (mickeyl)
207 * Opie-Eye got a Digital Camera File Backend (alwin,zecke) 208 * Opie-Eye got a Digital Camera File Backend (alwin,zecke)
208 * Support for Tuxpad1 of Tradesquare.NL (mickeyl,zecke) 209 * Support for Tuxpad1 of Tradesquare.NL (mickeyl,zecke)
209 * Opie-Console use Custom Font and Size in a Profile (harlekin) 210 * Opie-Console use Custom Font and Size in a Profile (harlekin)
210 * Opie-Console transparently log the Output and Input to a file (harlekin) 211 * Opie-Console transparently log the Output and Input to a file (harlekin)
211 * Added new O-menu icon to lock the PDA immediately: opie-lockapplet (clem) 212 * Added new O-menu icon to lock the PDA immediately: opie-lockapplet (clem)
212 * Opie-Security now hides the plugin-based authentication tabs if no auth. plugin package is installed (clem) 213 * Opie-Security now hides the plugin-based authentication tabs if no auth. plugin package is installed (clem)
213 * Opie-Security gained a 'test authentication' button (clem) 214 * Opie-Security gained a 'test authentication' button (clem)
214 * Opie-Eye got a more unique layout (menubar), a slideshow, user can setup some defaults 215 * Opie-Eye got a more unique layout (menubar), a slideshow, user can setup some defaults
215 * Opie-Mail improve the handling of POP mail boxes (alwin) 216 * Opie-Mail improve the handling of POP mail boxes (alwin)
216 * Both Opie-Eye and Opie-Mail were greatly improved due the hard work of Rajko Albrecht(alwin) 217 * Both Opie-Eye and Opie-Mail were greatly improved due the hard work of Rajko Albrecht(alwin)
217 * Opie IRC - backports of the 'NeIRC fork' (zecke) 218 * Opie IRC - backports of the 'NeIRC fork' (zecke)
218 219
219 Fixed Bugs 220 Fixed Bugs
220 ---------- 221 ----------
221 * #501 - Pickboard is able to show 'Umlaute' (TT,zecke) 222 * #501 - Pickboard is able to show 'Umlaute' (TT,zecke)
222 * #608 - Make Opie usable for left handed users (zecke) 223 * #608 - Make Opie usable for left handed users (zecke)
223 * #957 - Import of VCards/VTodos/VEvents with BASE64 encoding (ljp,zecke) 224 * #957 - Import of VCards/VTodos/VEvents with BASE64 encoding (ljp,zecke)
224 * #1245 - Opie-Go 'paused' (zecke) 225 * #1245 - Opie-Go 'paused' (zecke)
225 * #1358 - DocTab didn't show any MimeTypes (was fixed earlier) (zecke) 226 * #1358 - DocTab didn't show any MimeTypes (was fixed earlier) (zecke)
226 * #1380 - QDateBookAccess::remove() doesn't remove entries (eilers, zecke) 227 * #1380 - QDateBookAccess::remove() doesn't remove entries (eilers, zecke)
227 * #1395 - Build VNC Backend with gcc3.4 228 * #1395 - Build VNC Backend with gcc3.4
228 * #1440 - The icon of opie-mobilemsg is missing (CoreDump) 229 * #1440 - The icon of opie-mobilemsg is missing (CoreDump)
229 * #1426 - Add missing opie-bartender Icon (CoreDump) 230 * #1426 - Add missing opie-bartender Icon (CoreDump)
230 * #1445 - Opie-Sheet Has No Icon (CoreDump) 231 * #1445 - Opie-Sheet Has No Icon (CoreDump)
231 * #1448 - Brightness Applet added (mickeyl) 232 * #1448 - Brightness Applet added (mickeyl)
232 * #1450 - ZSame didn't clear the bonus item after winning a game (zecke) 233 * #1450 - ZSame didn't clear the bonus item after winning a game (zecke)
233 * #1482 - Fix OFileSelector to be able to sort by size (zecke) 234 * #1482 - Fix OFileSelector to be able to sort by size (zecke)
234 * n.a. - Opie-mail: fixed some crasher, some layout-problems 235 * n.a. - Opie-mail: fixed some crasher, some layout-problems
235 * n.a. - Converted applications to not hardcode /opt/QtPalmtop but to use QPEApplication::qpeDir (zecke) 236 * n.a. - Converted applications to not hardcode /opt/QtPalmtop but to use QPEApplication::qpeDir (zecke)
236 * n.a. - Converted usage of qpeDir() not to include a '/' as first charachter of the string (zecke) 237 * n.a. - Converted usage of qpeDir() not to include a '/' as first charachter of the string (zecke)
237 * n.a. - Build system: Enable distcc and ccache when crosscompiling too, and use them everywhere we can (clem) 238 * n.a. - Build system: Enable distcc and ccache when crosscompiling too, and use them everywhere we can (clem)
238 * 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) 239 * 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)
239 * n.a. - Removed hardcoded icon size in a couple of applets (mickeyl) 240 * n.a. - Removed hardcoded icon size in a couple of applets (mickeyl)
240 241
241 Internal 242 Internal
242 -------- 243 --------
243 * Opie-Qashmoney has been moved to unsupported (mickeyl) 244 * Opie-Qashmoney has been moved to unsupported (mickeyl)
244 * Opie-Ubrowser has been moved to unsupported (mickeyl) 245 * Opie-Ubrowser has been moved to unsupported (mickeyl)
245 246
246 2004-09-17Opie 1.1.6 247 2004-09-17Opie 1.1.6
247 248
248 New Features 249 New Features
249 ------------ 250 ------------
250 * Fifteen gained configurable number of items (zecke) 251 * Fifteen gained configurable number of items (zecke)
251 * Fifteen can have custom background images (zecke) 252 * Fifteen can have custom background images (zecke)
252 * Added daemonizing capabilities to QWS Server [via Qt/Embedded] (mickeyl) 253 * Added daemonizing capabilities to QWS Server [via Qt/Embedded] (mickeyl)
253 * Integrated the new security framework into libopie2 (zecke,clem) 254 * Integrated the new security framework into libopie2 (zecke,clem)
254 * Converted the launcher to use the new security framework (zecke) 255 * Converted the launcher to use the new security framework (zecke)
255 * Backup can now handle custom locations for backup and restore (ar) 256 * Backup can now handle custom locations for backup and restore (ar)
256 * Implemented right-on-hold feedback (wimpie,zecke) 257 * Implemented right-on-hold feedback (wimpie,zecke)
257 * Lots of new features in opie-reader (tim,pohly) 258 * Lots of new features in opie-reader (tim,pohly)
258 * Build system cleanups (schurig) 259 * Build system cleanups (schurig)
259 260
260 Fixed Bugs 261 Fixed Bugs
261 -------- 262 --------
262 * #1005 - Fixed backup to CompactFlash (ar) 263 * #1005 - Fixed backup to CompactFlash (ar)
263 * #1167 - Fixed Opie write crashing on more text than one page (ar) 264 * #1167 - Fixed Opie write crashing on more text than one page (ar)
264 * #1225 - Fixed repeated light flashing on Zaurus with keyz (mickeyl) 265 * #1225 - Fixed repeated light flashing on Zaurus with keyz (mickeyl)
265 * #1359 - Fixed bookmarks in Gutenbrowser (ljp) 266 * #1359 - Fixed bookmarks in Gutenbrowser (ljp)
266 * #1361 - Fixed auto upercase in Opie-Addressbook (eilers) 267 * #1361 - Fixed auto upercase in Opie-Addressbook (eilers)
267 * #1370 - Pimconverter now reacts on cancel key (eilers) 268 * #1370 - Pimconverter now reacts on cancel key (eilers)
268 * #1376 - Bring back the capslock/numlock display (zecke) 269 * #1376 - Bring back the capslock/numlock display (zecke)
269 * #1383 - Language settings now warns about losing open apps (Markus Litz) 270 * #1383 - Language settings now warns about losing open apps (Markus Litz)
270 * #1393 - Fixed line wrap issues in opie-console for the default profile (mickeyl) 271 * #1393 - Fixed line wrap issues in opie-console for the default profile (mickeyl)
271 * #1394 - Fixed oversized headline in opie-login (coredump) 272 * #1394 - Fixed oversized headline in opie-login (coredump)
272 * #1396 - Opie-console captures the escape key and vim is working (zecke) 273 * #1396 - Opie-console captures the escape key and vim is working (zecke)
273 * #1401 - Scrollbar is now only visible if necessary in DocTab (mickeyl) 274 * #1401 - Scrollbar is now only visible if necessary in DocTab (mickeyl)
274 275
275 2004-07-06Opie 1.1.4 276 2004-07-06Opie 1.1.4
276 277
277 New Features 278 New Features
278 ------------ 279 ------------
279 * Added four themes courtesy Robert Griebl (http://www.softforge.de/zstyle) 280 * Added four themes courtesy Robert Griebl (http://www.softforge.de/zstyle)
280 * Added Conversion tool for pim-data (eilers) 281 * Added Conversion tool for pim-data (eilers)
281 * Introduced new OPimAccessFactory and OBackendFactory which simplyfies database access (eilers) 282 * Introduced new OPimAccessFactory and OBackendFactory which simplyfies database access (eilers)
282 * Modified the PIM API for providing generic use of OPimRecords (eilers) 283 * Modified the PIM API for providing generic use of OPimRecords (eilers)
283 * Clicking on the application symbol now iterates over the application's top level widgets if already raised (zecke) 284 * Clicking on the application symbol now iterates over the application's top level widgets if already raised (zecke)
284 285
285 Fixed Bugs 286 Fixed Bugs
286 -------- 287 --------
287 * #1068 - Country Drop Down Box Off Screen 288 * #1068 - Country Drop Down Box Off Screen
288 * #1291 - Opie tinykate does not open .desktop files (ar) 289 * #1291 - Opie tinykate does not open .desktop files (ar)
289 * #1291 - Opie sheet not saving correctly (ar) 290 * #1291 - Opie sheet not saving correctly (ar)
290 * #1294 - Opie does not know about British Summer Time 291 * #1294 - Opie does not know about British Summer Time
291 * #1314 - Drawpad initialization (mickeyl) 292 * #1314 - Drawpad initialization (mickeyl)
292 * #1317 - Packagemanager crashes on hold-down or install (chicken) 293 * #1317 - Packagemanager crashes on hold-down or install (chicken)
293 * #1321 - Batteryapplet graphic glitch (harlekin) 294 * #1321 - Batteryapplet graphic glitch (harlekin)
294 * #1324 - ZSafe not starting up (mickeyl) 295 * #1324 - ZSafe not starting up (mickeyl)
295 * #1328 - Personal Home Address fields is trimmed to 1char (eilers) 296 * #1328 - Personal Home Address fields is trimmed to 1char (eilers)
296 * #1327 - Opie-mail ipk does not depend on libopiedb2 (chicken) 297 * #1327 - Opie-mail ipk does not depend on libopiedb2 (chicken)
297 * #1345 - Networksettingsplugin wlan plugin dependency on libpcap0 (mickeyl) 298 * #1345 - Networksettingsplugin wlan plugin dependency on libpcap0 (mickeyl)
298 * #1348 - Datebook dependency on libopiedb2 (chicken) 299 * #1348 - Datebook dependency on libopiedb2 (chicken)
299 * #1328 - Switched SQLDatabase and VCards char encoding from latin1 to unicode (eilers) 300 * #1328 - Switched SQLDatabase and VCards char encoding from latin1 to unicode (eilers)
300 301
301 2004-04-25Opie 1.1.3 302 2004-04-25Opie 1.1.3
302 303
303 * Introduced first implementation of SQL-Support using SQLite (eilers) 304 * Introduced first implementation of SQL-Support using SQLite (eilers)
304 * Added a new Gutenberg Project reader app - opie-gutenbrowser (ljp) 305 * Added a new Gutenberg Project reader app - opie-gutenbrowser (ljp)
305 * Added a real system graffiti character set (brad) 306 * Added a real system graffiti character set (brad)
306 * Added Generic Keyconfig Widget (zecke) 307 * Added Generic Keyconfig Widget (zecke)
307 * Improved Screenshotapplet and Drawpad integration. You can now open a screenshot in drawpad and take notes (zecke) 308 * Improved Screenshotapplet and Drawpad integration. You can now open a screenshot in drawpad and take notes (zecke)
308 * Added new Bible reader app - opie-dagger (drw) 309 * Added new Bible reader app - opie-dagger (drw)
309 * Added a new Image Viewer. Work is ongoing (zecke,alwin) 310 * Added a new Image Viewer. Work is ongoing (zecke,alwin)
310 * Added namespace usage in libopie2 and everywhere (zecke,alwin) 311 * Added namespace usage in libopie2 and everywhere (zecke,alwin)
311 * Enabled the possibility to pass command line arguments to applications (mickeyl) 312 * Enabled the possibility to pass command line arguments to applications (mickeyl)
312 * Added an about applet showing some credits and information about Opie (mickeyl) 313 * Added an about applet showing some credits and information about Opie (mickeyl)
313 * Added benchmarking functionality to sysinfo (mickeyl) 314 * Added benchmarking functionality to sysinfo (mickeyl)
314 * Added applet and configuration application for switching hardware keyboard layouts (alwin) 315 * Added applet and configuration application for switching hardware keyboard layouts (alwin)
315 * Ported applications from libopie1 to libopie2* (drw,ar,alwin) 316 * Ported applications from libopie1 to libopie2* (drw,ar,alwin)
316 * Imported fullscreen and font improvements from the Qkonsole fork to embeddedkonsole (waspe) 317 * Imported fullscreen and font improvements from the Qkonsole fork to embeddedkonsole (waspe)
317 * Clean-up of package information in control files (drw) 318 * Clean-up of package information in control files (drw)
318 * Repaired mediummount which was broken since integrating the quicklauncher (alwin) 319 * Repaired mediummount which was broken since integrating the quicklauncher (alwin)
319 * Improved big-screen support (zecke,ar) 320 * Improved big-screen support (zecke,ar)
320 * Improved multikeyboard support, added keyboard layout switching applet (mouse) 321 * Improved multikeyboard support, added keyboard layout switching applet (mouse)
321 * Added a new mail client based on libetpan (harlekin,alwin,jgf) 322 * Added a new mail client based on libetpan (harlekin,alwin,jgf)
322 * Added new package manager - opie-packagemanager (drw) 323 * Added new package manager - opie-packagemanager (drw)
323 * Improved light-n-power for C7x0 (mickeyl) 324 * Improved light-n-power for C7x0 (mickeyl)
324 * Added automatic rotation support for C7x0 (treke) 325 * Added automatic rotation support for C7x0 (treke)
325 * Split libopie1 up into a set of smaller - functionally grouped - libraries (mickeyl) 326 * Split libopie1 up into a set of smaller - functionally grouped - libraries (mickeyl)
326 * Added scanning the wireless network neighbourhood to networksettings (mickeyl) 327 * Added scanning the wireless network neighbourhood to networksettings (mickeyl)
327 328
328 2003-11-29Opie 1.0.3 329 2003-11-29Opie 1.0.3
329 330
330 * Released as Version 1.0.3 331 * Released as Version 1.0.3
331 * Improved i18n (various contributors) 332 * Improved i18n (various contributors)
332 * Reduced application startup time by integrating the TT quicklauncher (zecke,harlekin) 333 * Reduced application startup time by integrating the TT quicklauncher (zecke,harlekin)
333 * Made the Documents Tab optional (mickeyl) 334 * Made the Documents Tab optional (mickeyl)
334 * Integrated basic support for HP iPAQ 54xx and the Jornada 5xx (chicken) 335 * Integrated basic support for HP iPAQ 54xx and the Jornada 5xx (chicken)
335 336
336 2003-08-04Opie 1.0.0 337 2003-08-04Opie 1.0.0
337 338
338 * Released as Version 1.0.0 339 * Released as Version 1.0.0
339 * Including a PPP module for easy dial up (tille,harlekin,zecke) 340 * Including a PPP module for easy dial up (tille,harlekin,zecke)
diff --git a/noncore/apps/opie-console/emulation_handler.cpp b/noncore/apps/opie-console/emulation_handler.cpp
index 2087f57..d5a435e 100644
--- a/noncore/apps/opie-console/emulation_handler.cpp
+++ b/noncore/apps/opie-console/emulation_handler.cpp
@@ -1,252 +1,255 @@
1#include "TEmuVt102.h" 1#include "TEmuVt102.h"
2#include "profile.h" 2#include "profile.h"
3#include "emulation_handler.h" 3#include "emulation_handler.h"
4#include "script.h" 4#include "script.h"
5#include "logger.h" 5#include "logger.h"
6 6
7/* OPIE */ 7/* OPIE */
8#include <qpe/config.h> 8#include <qpe/config.h>
9 9
10/* QT */ 10/* QT */
11#include <qfile.h> 11#include <qfile.h>
12#include <qtextstream.h> 12#include <qtextstream.h>
13 13
14EmulationHandler::EmulationHandler( const Profile& prof, QWidget* parent,const char* name ) 14EmulationHandler::EmulationHandler( const Profile& prof, QWidget* parent,const char* name )
15 : QObject(0, name ) 15 : QObject(0, name )
16{ 16{
17 m_teWid = new TEWidget( parent, "TerminalMain"); 17 m_teWid = new TEWidget( parent, "TerminalMain");
18 // use setWrapAt(0) for classic behaviour (wrap at screen width, no scrollbar) 18 // use setWrapAt(0) for classic behaviour (wrap at screen width, no scrollbar)
19 // use setWrapAt(80) for normal console with scrollbar 19 // use setWrapAt(80) for normal console with scrollbar
20 setWrap(prof.readNumEntry("Wrap", 80) ? 0 : 80); 20 setWrap(prof.readNumEntry("Wrap", 80) ? 0 : 80);
21 m_teWid->setMinimumSize(150, 70 ); 21 m_teWid->setMinimumSize(150, 70 );
22 m_script = 0; 22 m_script = 0;
23 m_log = 0; 23 m_log = 0;
24 parent->resize( m_teWid->calcSize(80, 24 ) ); 24 parent->resize( m_teWid->calcSize(80, 24 ) );
25 m_teEmu = new TEmuVt102(m_teWid ); 25 m_teEmu = new TEmuVt102(m_teWid );
26 26
27 connect(m_teEmu,SIGNAL(ImageSizeChanged(int,int) ), 27 connect(m_teEmu,SIGNAL(ImageSizeChanged(int,int) ),
28 this, SIGNAL(changeSize(int,int) ) ); 28 this, SIGNAL(changeSize(int,int) ) );
29 connect(m_teEmu, SIGNAL(sndBlock(const char*,int) ), 29 connect(m_teEmu, SIGNAL(sndBlock(const char*,int) ),
30 this, SLOT(recvEmulation(const char*,int) ) ); 30 this, SLOT(recvEmulation(const char*,int) ) );
31 m_teEmu->setConnect( true ); 31 m_teEmu->setConnect( true );
32 m_teEmu->setHistory( TRUE ); 32 m_teEmu->setHistory( TRUE );
33 load( prof ); 33 load( prof );
34 34
35 35
36 36
37} 37}
38TEmulation* EmulationHandler::emulation() { 38TEmulation* EmulationHandler::emulation() {
39 return m_teEmu; 39 return m_teEmu;
40} 40}
41EmulationHandler::~EmulationHandler() { 41EmulationHandler::~EmulationHandler() {
42 if (isRecording()) 42 if (isRecording())
43 clearScript(); 43 clearScript();
44 delete m_teEmu; 44 delete m_teEmu;
45 delete m_teWid; 45 delete m_teWid;
46 delete m_log; 46 delete m_log;
47} 47}
48 48
49void EmulationHandler::load( const Profile& prof) { 49void EmulationHandler::load( const Profile& prof) {
50 50
51 // try to read the fontconfig from the profile 51 // try to read the fontconfig from the profile
52 QString aFont = prof.readEntry( "Font" ); 52 QString aFont = prof.readEntry( "Font" );
53 int aFontSize = prof.readNumEntry( "FontSize" ); 53 int aFontSize = prof.readNumEntry( "FontSize" );
54 // use defaults from qpe.conf if no profile yet 54 // use defaults from qpe.conf if no profile yet
55 if ( ( aFontSize == -1 ) || ( aFont == QString::null ) ) 55 if ( ( aFontSize == -1 ) || ( aFont == QString::null ) )
56 { 56 {
57 Config c( "qpe" ); 57 Config c( "qpe" );
58 c.setGroup( "Appearance" ); 58 c.setGroup( "Appearance" );
59 aFont = c.readEntry( "FixedFontFamily", "Fixed" ); 59 aFont = c.readEntry( "FixedFontFamily", "Fixed" );
60 aFontSize = c.readNumEntry( "FixedFontSize", 7 ); 60 aFontSize = c.readNumEntry( "FixedFontSize", 7 );
61 } 61 }
62 QFont font( aFont, aFontSize ); 62 QFont font( aFont, aFontSize );
63 font.setFixedPitch( TRUE ); 63 font.setFixedPitch( TRUE );
64 m_teWid->setVTFont( font ); 64 m_teWid->setVTFont( font );
65 65
66 int num = prof.readNumEntry("Color", 0); 66 int num = prof.readNumEntry("Color", 0);
67 setColor( foreColor(num), backColor(num) ); 67 setColor( foreColor(num), backColor(num) );
68 m_teWid->setBackgroundColor(backColor(num) ); 68 m_teWid->setBackgroundColor(backColor(num) );
69 69
70 int term = prof.readNumEntry("Terminal", 0) ; 70 int term = prof.readNumEntry("Terminal", 0) ;
71 switch(term) { 71 switch(term) {
72 default: 72 default:
73 case Profile::VT102: 73 case Profile::VT102:
74 case Profile::VT100: 74 case Profile::VT100:
75 m_teEmu->setKeytrans("vt100.keytab"); 75 m_teEmu->setKeytrans("vt100.keytab");
76 break; 76 break;
77 case Profile::Linux: 77 case Profile::Linux:
78 m_teEmu->setKeytrans("linux.keytab"); 78 m_teEmu->setKeytrans("linux.keytab");
79 break; 79 break;
80 case Profile::XTerm: 80 case Profile::XTerm:
81 m_teEmu->setKeytrans("default.Keytab"); 81 m_teEmu->setKeytrans("default.Keytab");
82 break; 82 break;
83 } 83 }
84} 84}
85void EmulationHandler::recv( const QByteArray& ar) { 85void EmulationHandler::recv( const QByteArray& ar) {
86 m_teEmu->onRcvBlock(ar.data(), ar.count() ); 86 m_teEmu->onRcvBlock(ar.data(), ar.count() );
87 if ( isLogging() ) { 87 if ( isLogging() ) {
88 m_log->append( ar ); 88 m_log->append( ar );
89 } 89 }
90} 90}
91 91
92void EmulationHandler::recvEmulation(const char* src, int len ) { 92void EmulationHandler::recvEmulation(const char* src, int len ) {
93 QByteArray ar(len); 93 QByteArray ar(len);
94 94
95 memcpy(ar.data(), src, sizeof(char) * len ); 95 memcpy(ar.data(), src, sizeof(char) * len );
96 if (isRecording()) 96 if (isRecording())
97 m_script->append(ar); 97 m_script->append(ar);
98 emit send(ar); 98 emit send(ar);
99} 99}
100 100
101 101
102QWidget* EmulationHandler::widget() { 102QWidget* EmulationHandler::widget() {
103 return m_teWid; 103 return m_teWid;
104} 104}
105/* 105/*
106 * allocate a new table of colors 106 * allocate a new table of colors
107 */ 107 */
108void EmulationHandler::setColor( const QColor& fore, const QColor& back ) { 108void EmulationHandler::setColor( const QColor& fore, const QColor& back ) {
109 ColorEntry table[TABLE_COLORS]; 109 ColorEntry table[TABLE_COLORS];
110 const ColorEntry *defaultCt = m_teWid->getdefaultColorTable(); 110 const ColorEntry *defaultCt = m_teWid->getdefaultColorTable();
111 111
112 for (int i = 0; i < TABLE_COLORS; i++ ) { 112 for (int i = 0; i < TABLE_COLORS; i++ ) {
113 if ( i == 0 || i == 10 ) { 113 if ( i == 0 || i == 10 ) {
114 table[i].color = fore; 114 table[i].color = fore;
115 }else if ( i == 1 || i == 11 ) { 115 }else if ( i == 1 || i == 11 ) {
116 table[i].color = back; 116 table[i].color = back;
117 table[i].transparent = 0; 117 table[i].transparent = 0;
118 }else { 118 }else {
119 table[i].color = defaultCt[i].color; 119 table[i].color = defaultCt[i].color;
120 } 120 }
121 } 121 }
122 m_teWid->setColorTable(table ); 122 m_teWid->setColorTable(table );
123 m_teWid->update(); 123 m_teWid->update();
124} 124}
125QFont EmulationHandler::font( int id ) { 125QFont EmulationHandler::font( int id ) {
126 QString name; 126 QString name;
127 int size = 0; 127 int size = 0;
128 switch(id ) { 128 switch(id ) {
129 default: // fall through 129 default: // fall through
130 case 0: 130 case 0:
131 name = QString::fromLatin1("Micro"); 131 name = QString::fromLatin1("Micro");
132 size = 4; 132 size = 4;
133 break; 133 break;
134 case 1: 134 case 1:
135 name = QString::fromLatin1("Fixed"); 135 name = QString::fromLatin1("Fixed");
136 size = 7; 136 size = 7;
137 break; 137 break;
138 case 2: 138 case 2:
139 name = QString::fromLatin1("Fixed"); 139 name = QString::fromLatin1("Fixed");
140 size = 12; 140 size = 12;
141 break; 141 break;
142 } 142 }
143 QFont font(name, size, QFont::Normal ); 143 QFont font(name, size, QFont::Normal );
144 font.setFixedPitch(TRUE ); 144 font.setFixedPitch(TRUE );
145 return font; 145 return font;
146} 146}
147QColor EmulationHandler::foreColor(int col) { 147QColor EmulationHandler::foreColor(int col) {
148 QColor co; 148 QColor co;
149 /* we need to switch it */ 149 /* we need to switch it */
150 switch( col ) { 150 switch( col ) {
151 default: 151 default:
152 case Profile::White: 152 case Profile::White:
153 /* color is black */ 153 /* color is black */
154 co = Qt::white; 154 co = Qt::white;
155 break; 155 break;
156 case Profile::Black: 156 case Profile::Black:
157 co = Qt::black; 157 co = Qt::black;
158 break; 158 break;
159 case Profile::Green: 159 case Profile::Green:
160 co = Qt::green; 160 co = Qt::green;
161 break; 161 break;
162 case Profile::Orange: 162 case Profile::Orange:
163 co.setRgb( 231, 184, 98 ); 163 co.setRgb( 231, 184, 98 );
164 break; 164 break;
165 } 165 }
166 166
167 return co; 167 return co;
168} 168}
169QColor EmulationHandler::backColor(int col ) { 169QColor EmulationHandler::backColor(int col ) {
170 QColor co; 170 QColor co;
171 /* we need to switch it */ 171 /* we need to switch it */
172 switch( col ) { 172 switch( col ) {
173 default: 173 default:
174 case Profile::White: 174 case Profile::White:
175 /* color is white */ 175 /* color is white */
176 co = Qt::black; 176 co = Qt::black;
177 break; 177 break;
178 case Profile::Black: 178 case Profile::Black:
179 co = Qt::white; 179 co = Qt::white;
180 break; 180 break;
181 case Profile::Green: 181 case Profile::Green:
182 co = Qt::black; 182 co = Qt::black;
183 break; 183 break;
184 case Profile::Orange: 184 case Profile::Orange:
185 co = Qt::black; 185 co = Qt::black;
186 break; 186 break;
187 } 187 }
188 188
189 return co; 189 return co;
190} 190}
191 191
192QPushButton* EmulationHandler::cornerButton() { 192QPushButton* EmulationHandler::cornerButton() {
193 return m_teWid->cornerButton(); 193 return m_teWid->cornerButton();
194} 194}
195 195
196 196
197Script *EmulationHandler::script() { 197Script *EmulationHandler::script() {
198 return m_script; 198 return m_script;
199} 199}
200 200
201bool EmulationHandler::isRecording() { 201bool EmulationHandler::isRecording() {
202 return (m_script != 0); 202 return (m_script != 0);
203} 203}
204 204
205bool EmulationHandler::isLogging() { 205bool EmulationHandler::isLogging() {
206 return (m_log != 0); 206 return (m_log != 0);
207} 207}
208 208
209void EmulationHandler::startRecording() { 209void EmulationHandler::startRecording() {
210 if (!isRecording()) 210 if (!isRecording())
211 m_script = new Script(); 211 m_script = new Script();
212} 212}
213 213
214void EmulationHandler::startLogging(const QString fileName) { 214void EmulationHandler::startLogging(const QString fileName) {
215 m_logFileName = fileName; 215 m_logFileName = fileName;
216 if (!isLogging()) 216 if (!isLogging())
217 m_log = new Logger(m_logFileName); 217 m_log = new Logger(m_logFileName);
218} 218}
219 219
220QString EmulationHandler::logFileName() { 220QString EmulationHandler::logFileName() {
221 return m_logFileName; 221 return m_logFileName;
222} 222}
223 223
224void EmulationHandler::clearScript() { 224void EmulationHandler::clearScript() {
225 if (isRecording()) { 225 if (isRecording()) {
226 delete m_script; 226 delete m_script;
227 m_script = 0; 227 m_script = 0;
228 } 228 }
229} 229}
230 230
231void EmulationHandler::clearLog() { 231void EmulationHandler::clearLog() {
232 if (isLogging()) { 232 if (isLogging()) {
233 delete m_log; 233 delete m_log;
234 m_log = 0; 234 m_log = 0;
235 } 235 }
236} 236}
237 237
238void EmulationHandler::runScript(const Script *script) { 238void EmulationHandler::runScript(const Script *script) {
239 emit send(script->script()); 239 emit send(script->script());
240} 240}
241 241
242void EmulationHandler::copy() { 242void EmulationHandler::copy() {
243 m_teWid->emitSelection(); 243 m_teWid->emitSelection();
244} 244}
245void EmulationHandler::paste() { 245void EmulationHandler::paste() {
246 m_teWid->pasteClipboard(); 246 m_teWid->pasteClipboard();
247} 247}
248 248
249void EmulationHandler::setWrap(int columns) { 249void EmulationHandler::setWrap(int columns) {
250 m_teWid->setWrapAt(columns); 250 m_teWid->setWrapAt(columns);
251} 251}
252 252
253void EmulationHandler::setScrollbarLocation(int index) {
254 m_teWid->setScrollbarLocation(index);
255}
diff --git a/noncore/apps/opie-console/emulation_handler.h b/noncore/apps/opie-console/emulation_handler.h
index 1092c82..dabdb15 100644
--- a/noncore/apps/opie-console/emulation_handler.h
+++ b/noncore/apps/opie-console/emulation_handler.h
@@ -1,111 +1,112 @@
1#ifndef OPIE_EMULATION_HANDLER_H 1#ifndef OPIE_EMULATION_HANDLER_H
2#define OPIE_EMULATION_HANDLER_H 2#define OPIE_EMULATION_HANDLER_H
3 3
4#include <qobject.h> 4#include <qobject.h>
5#include <qcolor.h> 5#include <qcolor.h>
6#include <qcstring.h> 6#include <qcstring.h>
7 7
8/* 8/*
9 * Badly ibotty lacks the time to finish 9 * Badly ibotty lacks the time to finish
10 * his widget in time.. 10 * his widget in time..
11 * Never the less we've to have an EmulationWidget 11 * Never the less we've to have an EmulationWidget
12 * This is why I'm taking the inferior not cleaned 12 * This is why I'm taking the inferior not cleaned
13 * up TE* KDE STUFF 13 * up TE* KDE STUFF
14 */ 14 */
15 15
16/** 16/**
17 * This is the layer above the IOLayer* 17 * This is the layer above the IOLayer*
18 * This nice QObject here will get stuff from 18 * This nice QObject here will get stuff from
19 * got a slot and a signal 19 * got a slot and a signal
20 * the signal for data 20 * the signal for data
21 * the slot for receiving 21 * the slot for receiving
22 * it'll set up the widget internally 22 * it'll set up the widget internally
23 * and manage the communication between 23 * and manage the communication between
24 * the pre QByteArray world! 24 * the pre QByteArray world!
25 */ 25 */
26class Profile; 26class Profile;
27class QWidget; 27class QWidget;
28class QPushButton; 28class QPushButton;
29class TEWidget; 29class TEWidget;
30class QFile; 30class QFile;
31class TEmulation; 31class TEmulation;
32class QFont; 32class QFont;
33class QTextStream; 33class QTextStream;
34class Script; 34class Script;
35class Logger; 35class Logger;
36 36
37class EmulationHandler : public QObject { 37class EmulationHandler : public QObject {
38 Q_OBJECT 38 Q_OBJECT
39public: 39public:
40 /** 40 /**
41 * simple c'tor the parent of the TEWdiget 41 * simple c'tor the parent of the TEWdiget
42 * and a name 42 * and a name
43 * and a Profile 43 * and a Profile
44 */ 44 */
45 EmulationHandler( const Profile&, QWidget* parent, const char* name = 0l ); 45 EmulationHandler( const Profile&, QWidget* parent, const char* name = 0l );
46 46
47 /** 47 /**
48 * delete all components 48 * delete all components
49 */ 49 */
50 ~EmulationHandler(); 50 ~EmulationHandler();
51 51
52 void load( const Profile& ); 52 void load( const Profile& );
53 QWidget* widget(); 53 QWidget* widget();
54 TEmulation *emulation(); 54 TEmulation *emulation();
55 void setColor( const QColor& fore, const QColor& back ); 55 void setColor( const QColor& fore, const QColor& back );
56 QPushButton* cornerButton(); 56 QPushButton* cornerButton();
57 57
58 /* Scripts */ 58 /* Scripts */
59 /* Create a new script and record all typed characters */ 59 /* Create a new script and record all typed characters */
60 void startRecording(); 60 void startRecording();
61 61
62 void startLogging(const QString); 62 void startLogging(const QString);
63 63
64 /* Return whether we are currently recording a script */ 64 /* Return whether we are currently recording a script */
65 bool isRecording(); 65 bool isRecording();
66 66
67 /* Return whether we are currently recording a log */ 67 /* Return whether we are currently recording a log */
68 bool isLogging(); 68 bool isLogging();
69 69
70 QString logFileName(); 70 QString logFileName();
71 71
72 /* Return the current script (or NULL) */ 72 /* Return the current script (or NULL) */
73 Script *script(); 73 Script *script();
74 74
75 /* Stop recording and remove the current script from memory */ 75 /* Stop recording and remove the current script from memory */
76 void clearScript(); 76 void clearScript();
77 77
78 /* Stop logging and remove the current log from memory */ 78 /* Stop logging and remove the current log from memory */
79 void clearLog(); 79 void clearLog();
80 80
81 /* Run a script by forwarding its keys to the EmulationLayer */ 81 /* Run a script by forwarding its keys to the EmulationLayer */
82 void runScript(const Script *); 82 void runScript(const Script *);
83 83
84 /* Propagate change to widget */ 84 /* Propagate change to widget */
85 void setWrap(int columns); 85 void setWrap(int columns);
86 void setScrollbarLocation(int index);
86signals: 87signals:
87 void send( const QByteArray& ); 88 void send( const QByteArray& );
88 void changeSize(int rows, int cols ); 89 void changeSize(int rows, int cols );
89 90
90 91
91public slots: 92public slots:
92 void recv( const QByteArray& ); 93 void recv( const QByteArray& );
93 void paste(); 94 void paste();
94 void copy(); 95 void copy();
95 96
96private slots: 97private slots:
97 void recvEmulation( const char*, int len ); 98 void recvEmulation( const char*, int len );
98private: 99private:
99 QFont font( int ); 100 QFont font( int );
100 QColor foreColor(int ); 101 QColor foreColor(int );
101 QColor backColor(int ); 102 QColor backColor(int );
102 103
103private: 104private:
104 TEWidget* m_teWid; 105 TEWidget* m_teWid;
105 TEmulation* m_teEmu; 106 TEmulation* m_teEmu;
106 Script * m_script; 107 Script * m_script;
107 Logger *m_log; 108 Logger *m_log;
108 QString m_logFileName; 109 QString m_logFileName;
109}; 110};
110 111
111#endif 112#endif
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp
index 45a662c..18c0434 100644
--- a/noncore/apps/opie-console/mainwindow.cpp
+++ b/noncore/apps/opie-console/mainwindow.cpp
@@ -1,793 +1,834 @@
1#include "TEmulation.h" 1#include "TEmulation.h"
2#include "profileeditordialog.h" 2#include "profileeditordialog.h"
3#include "configdialog.h" 3#include "configdialog.h"
4#include "default.h" 4#include "default.h"
5#include "profilemanager.h" 5#include "profilemanager.h"
6#include "mainwindow.h" 6#include "mainwindow.h"
7#include "tabwidget.h" 7#include "tabwidget.h"
8#include "transferdialog.h" 8#include "transferdialog.h"
9#include "function_keyboard.h" 9#include "function_keyboard.h"
10#include "emulation_handler.h" 10#include "emulation_handler.h"
11#include "script.h" 11#include "script.h"
12#include "fixit.h" 12#include "fixit.h"
13 13
14/* OPIE */ 14/* OPIE */
15#include <opie2/ofiledialog.h> 15#include <opie2/ofiledialog.h>
16#include <opie2/oresource.h> 16#include <opie2/oresource.h>
17#include <qpe/filemanager.h> 17#include <qpe/filemanager.h>
18using namespace Opie::Ui; 18using namespace Opie::Ui;
19 19
20/* QT */ 20/* QT */
21#include <qaction.h> 21#include <qaction.h>
22#include <qmenubar.h> 22#include <qmenubar.h>
23#include <qtoolbar.h> 23#include <qtoolbar.h>
24#include <qmessagebox.h> 24#include <qmessagebox.h>
25#include <qwhatsthis.h> 25#include <qwhatsthis.h>
26#include <qfileinfo.h> 26#include <qfileinfo.h>
27 27
28/* STD */ 28/* STD */
29#include <assert.h> 29#include <assert.h>
30 30
31#include <opie2/oconfig.h> 31#include <opie2/oconfig.h>
32 32
33MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow(parent, name, WStyle_ContextHelp) { 33MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow(parent, name, WStyle_ContextHelp) {
34 34
35#ifdef FSCKED_DISTRI 35#ifdef FSCKED_DISTRI
36 FixIt fix; 36 FixIt fix;
37 fix.fixIt(); 37 fix.fixIt();
38#endif 38#endif
39 39
40 setCaption(QObject::tr("Opie Console") ); 40 setCaption(QObject::tr("Opie Console") );
41 KeyTrans::loadAll(); 41 KeyTrans::loadAll();
42 for (int i = 0; i < KeyTrans::count(); i++ ) { 42 for (int i = 0; i < KeyTrans::count(); i++ ) {
43 KeyTrans* s = KeyTrans::find(i ); 43 KeyTrans* s = KeyTrans::find(i );
44 assert( s ); 44 assert( s );
45 } 45 }
46 m_factory = new MetaFactory(); 46 m_factory = new MetaFactory();
47 Default def(m_factory); 47 Default def(m_factory);
48 m_sessions.setAutoDelete( TRUE ); 48 m_sessions.setAutoDelete( TRUE );
49 m_curSession = 0; 49 m_curSession = 0;
50 m_manager = new ProfileManager( m_factory ); 50 m_manager = new ProfileManager( m_factory );
51 m_manager->load(); 51 m_manager->load();
52 m_scriptsData.setAutoDelete(TRUE); 52 m_scriptsData.setAutoDelete(TRUE);
53 53
54 initUI(); 54 initUI();
55 populateProfiles(); 55 populateProfiles();
56 populateScripts(); 56 populateScripts();
57} 57}
58 58
59void MainWindow::initUI() { 59void MainWindow::initUI() {
60 60
61 setToolBarsMovable( FALSE ); 61 setToolBarsMovable( FALSE );
62 62
63 /* tool bar for the menu */ 63 /* tool bar for the menu */
64 m_tool = new QToolBar( this ); 64 m_tool = new QToolBar( this );
65 m_tool->setHorizontalStretchable( TRUE ); 65 m_tool->setHorizontalStretchable( TRUE );
66 66
67 m_bar = new QMenuBar( m_tool ); 67 m_bar = new QMenuBar( m_tool );
68 m_console = new QPopupMenu( this ); 68 m_console = new QPopupMenu( this );
69 m_scripts = new QPopupMenu( this ); 69 m_scripts = new QPopupMenu( this );
70 m_sessionsPop= new QPopupMenu( this ); 70 m_sessionsPop= new QPopupMenu( this );
71 m_scriptsPop = new QPopupMenu( this ); 71 m_scriptsPop = new QPopupMenu( this );
72 m_scrollbar = new QPopupMenu( this );
72 73
73 /* add a toolbar for icons */ 74 /* add a toolbar for icons */
74 m_icons = new QToolBar(this); 75 m_icons = new QToolBar(this);
75 76
76 /* 77 /*
77 * the settings action 78 * the settings action
78 */ 79 */
79 m_setProfiles = new QAction(tr("Configure Profiles"), 80 m_setProfiles = new QAction(tr("Configure Profiles"),
80 Opie::Core::OResource::loadPixmap( "SettingsIcon", Opie::Core::OResource::SmallIcon ), 81 Opie::Core::OResource::loadPixmap( "SettingsIcon", Opie::Core::OResource::SmallIcon ),
81 QString::null, 0, this, 0); 82 QString::null, 0, this, 0);
82 m_setProfiles->addTo( m_console ); 83 m_setProfiles->addTo( m_console );
83 connect( m_setProfiles, SIGNAL(activated() ), 84 connect( m_setProfiles, SIGNAL(activated() ),
84 this, SLOT(slotConfigure() ) ); 85 this, SLOT(slotConfigure() ) );
85 86
86 m_console->insertSeparator(); 87 m_console->insertSeparator();
87 /* 88 /*
88 * new Action for new sessions 89 * new Action for new sessions
89 */ 90 */
90 QAction* newCon = new QAction(tr("New Profile"), 91 QAction* newCon = new QAction(tr("New Profile"),
91 Opie::Core::OResource::loadPixmap( "new", Opie::Core::OResource::SmallIcon ), 92 Opie::Core::OResource::loadPixmap( "new", Opie::Core::OResource::SmallIcon ),
92 QString::null, 0, this, 0); 93 QString::null, 0, this, 0);
93 newCon->addTo( m_console ); 94 newCon->addTo( m_console );
94 connect( newCon, SIGNAL(activated() ), 95 connect( newCon, SIGNAL(activated() ),
95 this, SLOT(slotNew() ) ); 96 this, SLOT(slotNew() ) );
96 97
97 m_console->insertSeparator(); 98 m_console->insertSeparator();
98 99
99 QAction *saveCon = new QAction( tr("Save Profile" ), 100 QAction *saveCon = new QAction( tr("Save Profile" ),
100 Opie::Core::OResource::loadPixmap( "save", Opie::Core::OResource::SmallIcon ), QString::null, 101 Opie::Core::OResource::loadPixmap( "save", Opie::Core::OResource::SmallIcon ), QString::null,
101 0, this, 0 ); 102 0, this, 0 );
102 saveCon->addTo( m_console ); 103 saveCon->addTo( m_console );
103 connect( saveCon, SIGNAL(activated() ), 104 connect( saveCon, SIGNAL(activated() ),
104 this, SLOT(slotSaveSession() ) ); 105 this, SLOT(slotSaveSession() ) );
105 m_console->insertSeparator(); 106 m_console->insertSeparator();
106 107
107 /* 108 /*
108 * connect action 109 * connect action
109 */ 110 */
110 m_connect = new QAction( tr("Connect"), Opie::Core::OResource::loadPixmap("console/connected", 111 m_connect = new QAction( tr("Connect"), Opie::Core::OResource::loadPixmap("console/connected",
111 Opie::Core::OResource::SmallIcon ), QString::null, 0, this, 0 ); 112 Opie::Core::OResource::SmallIcon ), QString::null, 0, this, 0 );
112 m_connect->addTo( m_console ); 113 m_connect->addTo( m_console );
113 connect(m_connect, SIGNAL(activated() ), 114 connect(m_connect, SIGNAL(activated() ),
114 this, SLOT(slotConnect() ) ); 115 this, SLOT(slotConnect() ) );
115 116
116 /* 117 /*
117 * disconnect action 118 * disconnect action
118 */ 119 */
119 m_disconnect = new QAction( tr("Disconnect"), Opie::Core::OResource::loadPixmap("console/notconnected", 120 m_disconnect = new QAction( tr("Disconnect"), Opie::Core::OResource::loadPixmap("console/notconnected",
120 Opie::Core::OResource::SmallIcon ), QString::null, 0, this, 0 ); 121 Opie::Core::OResource::SmallIcon ), QString::null, 0, this, 0 );
121 m_disconnect->addTo( m_console ); 122 m_disconnect->addTo( m_console );
122 connect(m_disconnect, SIGNAL(activated() ), 123 connect(m_disconnect, SIGNAL(activated() ),
123 this, SLOT(slotDisconnect() ) ); 124 this, SLOT(slotDisconnect() ) );
124 125
125 m_console->insertSeparator(); 126 m_console->insertSeparator();
126 127
127#ifndef EAST 128#ifndef EAST
128 m_quickLaunch = new QAction( tr("QuickLaunch"), 129 m_quickLaunch = new QAction( tr("QuickLaunch"),
129 Opie::Core::OResource::loadPixmap("console/konsole_mini", Opie::Core::OResource::SmallIcon ), 130 Opie::Core::OResource::loadPixmap("console/konsole_mini", Opie::Core::OResource::SmallIcon ),
130 QString::null, 0, this, 0 ); 131 QString::null, 0, this, 0 );
131 m_quickLaunch->addTo( m_icons ); 132 m_quickLaunch->addTo( m_icons );
132 connect( m_quickLaunch, SIGNAL( activated() ), 133 connect( m_quickLaunch, SIGNAL( activated() ),
133 this, SLOT( slotQuickLaunch() ) ); 134 this, SLOT( slotQuickLaunch() ) );
134#endif 135#endif
135 136
136 QWhatsThis::add( m_icons, tr( "The shell button launches the \"default\" profile. If there is none default values are taken" ) ); 137 QWhatsThis::add( m_icons, tr( "The shell button launches the \"default\" profile. If there is none default values are taken" ) );
137 138
138 m_transfer = new QAction( tr("Transfer file..."), Opie::Core::OResource::loadPixmap("pass", Opie::Core::OResource::SmallIcon ), 139 m_transfer = new QAction( tr("Transfer file..."), Opie::Core::OResource::loadPixmap("pass", Opie::Core::OResource::SmallIcon ),
139 QString::null, 0, this, 0 ); 140 QString::null, 0, this, 0 );
140 m_transfer->addTo( m_console ); 141 m_transfer->addTo( m_console );
141 connect(m_transfer, SIGNAL(activated() ), 142 connect(m_transfer, SIGNAL(activated() ),
142 this, SLOT(slotTransfer() ) ); 143 this, SLOT(slotTransfer() ) );
143 144
144 145
145 146
146 /* 147 /*
147 * immediate change of line wrap policy 148 * immediate change of line wrap policy
148 */ 149 */
149 m_isWrapped = true; 150 m_isWrapped = true;
150 m_wrap = new QAction( tr("Line wrap"), Opie::Core::OResource::loadPixmap( "linewrap", Opie::Core::OResource::SmallIcon ), 151 m_wrap = new QAction( tr("Line wrap"), Opie::Core::OResource::loadPixmap( "linewrap", Opie::Core::OResource::SmallIcon ),
151 QString::null, 0, this, 0, true ); 152 QString::null, 0, this, 0, true );
152 m_wrap->addTo( m_console ); 153 m_wrap->addTo( m_console );
153 m_wrap->setOn( true ); 154 m_wrap->setOn( true );
154 connect( m_wrap, SIGNAL( activated() ), SLOT( slotWrap() ) ); 155 connect( m_wrap, SIGNAL( activated() ), SLOT( slotWrap() ) );
155 156
156 /* 157 /*
157 * fullscreen 158 * fullscreen
158 */ 159 */
159 m_isFullscreen = false; 160 m_isFullscreen = false;
160 161
161 m_fullscreen = new QAction( tr("Full screen"), Opie::Core::OResource::loadPixmap( "fullscreen", 162 m_fullscreen = new QAction( tr("Full screen"), Opie::Core::OResource::loadPixmap( "fullscreen",
162 Opie::Core::OResource::SmallIcon ), QString::null, 0, this, 0 ); 163 Opie::Core::OResource::SmallIcon ), QString::null, 0, this, 0 );
163 m_fullscreen->addTo( m_console ); 164 m_fullscreen->addTo( m_console );
164 connect( m_fullscreen, SIGNAL( activated() ), 165 connect( m_fullscreen, SIGNAL( activated() ),
165 this, SLOT( slotFullscreen() ) ); 166 this, SLOT( slotFullscreen() ) );
166 167
168 /*
169 * scrollbar
170 */
171 sm_none = m_scrollbar->insertItem(tr( "None" ));
172 sm_left = m_scrollbar->insertItem(tr( "Left" ));
173 sm_right = m_scrollbar->insertItem(tr( "Right" ));
174
175 m_console->insertItem(tr("Scrollbar"), m_scrollbar, -1, 0);
176 connect( m_scrollbar, SIGNAL(activated(int)),
177 this, SLOT(slotScrollbarSelected(int)));
178
167 m_console->insertSeparator(); 179 m_console->insertSeparator();
168 180
169 m_recordLog = new QAction(); 181 m_recordLog = new QAction();
170 m_recordLog->setText( tr("Start log") ); 182 m_recordLog->setText( tr("Start log") );
171 m_recordLog->addTo( m_console ); 183 m_recordLog->addTo( m_console );
172 connect(m_recordLog, SIGNAL(activated() ), 184 connect(m_recordLog, SIGNAL(activated() ),
173 this, SLOT( slotSaveLog() ) ); 185 this, SLOT( slotSaveLog() ) );
174 m_recordingLog = false; 186 m_recordingLog = false;
175 187
176 QAction *a = new QAction(); 188 QAction *a = new QAction();
177 a->setText( tr("Save history") ); 189 a->setText( tr("Save history") );
178 a->addTo( m_console ); 190 a->addTo( m_console );
179 connect(a, SIGNAL(activated() ), 191 connect(a, SIGNAL(activated() ),
180 this, SLOT(slotSaveHistory() ) ); 192 this, SLOT(slotSaveHistory() ) );
181 /* 193 /*
182 * terminate action 194 * terminate action
183 */ 195 */
184 m_terminate = new QAction(); 196 m_terminate = new QAction();
185 m_terminate->setText( tr("Terminate") ); 197 m_terminate->setText( tr("Terminate") );
186 m_terminate->addTo( m_console ); 198 m_terminate->addTo( m_console );
187 connect(m_terminate, SIGNAL(activated() ), 199 connect(m_terminate, SIGNAL(activated() ),
188 this, SLOT(slotTerminate() ) ); 200 this, SLOT(slotTerminate() ) );
189 201
190 m_closewindow = new QAction(); 202 m_closewindow = new QAction();
191 m_closewindow->setText( tr("Close Window") ); 203 m_closewindow->setText( tr("Close Window") );
192 m_closewindow->addTo( m_console ); 204 m_closewindow->addTo( m_console );
193 connect( m_closewindow, SIGNAL(activated() ), 205 connect( m_closewindow, SIGNAL(activated() ),
194 this, SLOT(slotClose() ) ); 206 this, SLOT(slotClose() ) );
195 207
196 208
197 /* 209 /*
198 * script actions 210 * script actions
199 */ 211 */
200 m_runScript_id = m_scripts->insertItem(tr("Run Script"), m_scriptsPop, -1, 0); 212 m_runScript_id = m_scripts->insertItem(tr("Run Script"), m_scriptsPop, -1, 0);
201 connect(m_scriptsPop, SIGNAL(activated(int)), this, SLOT(slotRunScript(int))); 213 connect(m_scriptsPop, SIGNAL(activated(int)), this, SLOT(slotRunScript(int)));
202 214
203 m_recordScript = new QAction(tr("Record Script"), QString::null, 0, this, 0); 215 m_recordScript = new QAction(tr("Record Script"), QString::null, 0, this, 0);
204 m_recordScript->addTo(m_scripts); 216 m_recordScript->addTo(m_scripts);
205 connect(m_recordScript, SIGNAL(activated()), this, SLOT(slotRecordScript())); 217 connect(m_recordScript, SIGNAL(activated()), this, SLOT(slotRecordScript()));
206 218
207 m_saveScript = new QAction(tr("Save Script"), QString::null, 0, this, 0); 219 m_saveScript = new QAction(tr("Save Script"), QString::null, 0, this, 0);
208 m_saveScript->addTo(m_scripts); 220 m_saveScript->addTo(m_scripts);
209 connect(m_saveScript, SIGNAL(activated()), this, SLOT(slotSaveScript())); 221 connect(m_saveScript, SIGNAL(activated()), this, SLOT(slotSaveScript()));
210 222
211 223
212 224
213 225
214 /* 226 /*
215 * action that open/closes the keyboard 227 * action that open/closes the keyboard
216 */ 228 */
217 m_openKeys = new QAction (tr("Open Keyboard..."), 229 m_openKeys = new QAction (tr("Open Keyboard..."),
218 Opie::Core::OResource::loadPixmap( "console/keys/keyboard_icon", Opie::Core::OResource::SmallIcon ), 230 Opie::Core::OResource::loadPixmap( "console/keys/keyboard_icon", Opie::Core::OResource::SmallIcon ),
219 QString::null, 0, this, 0); 231 QString::null, 0, this, 0);
220 m_openKeys->setToggleAction(true); 232 m_openKeys->setToggleAction(true);
221 connect (m_openKeys, SIGNAL(toggled(bool)), this, SLOT(slotOpenKeb(bool))); 233 connect (m_openKeys, SIGNAL(toggled(bool)), this, SLOT(slotOpenKeb(bool)));
222 234
223 /* insert the submenu */ 235 /* insert the submenu */
224 m_console->insertItem(tr("New from Profile"), m_sessionsPop, 236 m_console->insertItem(tr("New from Profile"), m_sessionsPop,
225 -1, 0); 237 -1, 0);
226 238
227 /* insert the connection menu */ 239 /* insert the connection menu */
228 m_bar->insertItem( tr("Connection"), m_console ); 240 m_bar->insertItem( tr("Connection"), m_console );
229 241
230 /* the scripts menu */ 242 /* the scripts menu */
231#ifdef EAST 243#ifdef EAST
232 Opie::Core::OConfig cfg("opie-console"); 244 Opie::Core::OConfig cfg("opie-console");
233 cfg.setGroup("10east"); 245 cfg.setGroup("10east");
234 if( !cfg.readEntry("scripthide",0) ) { 246 if( !cfg.readEntry("scripthide",0) ) {
235 m_bar->insertItem( tr("Scripts"), m_scripts ); 247 m_bar->insertItem( tr("Scripts"), m_scripts );
236 } 248 }
237#endif 249#endif
238 250
239 /* and the keyboard */ 251 /* and the keyboard */
240 m_keyBar = new QToolBar(this); 252 m_keyBar = new QToolBar(this);
241 addToolBar( m_keyBar, "Keyboard", QMainWindow::Top, TRUE ); 253 addToolBar( m_keyBar, "Keyboard", QMainWindow::Top, TRUE );
242 m_keyBar->setHorizontalStretchable( TRUE ); 254 m_keyBar->setHorizontalStretchable( TRUE );
243 m_keyBar->hide(); 255 m_keyBar->hide();
244 256
245 m_kb = new FunctionKeyboard(m_keyBar); 257 m_kb = new FunctionKeyboard(m_keyBar);
246 connect(m_kb, SIGNAL(keyPressed(FKey,ushort,ushort,bool)), 258 connect(m_kb, SIGNAL(keyPressed(FKey,ushort,ushort,bool)),
247 this, SLOT(slotKeyReceived(FKey,ushort,ushort,bool))); 259 this, SLOT(slotKeyReceived(FKey,ushort,ushort,bool)));
248 260
249 261
250 a = new QAction(tr("Copy"), 262 a = new QAction(tr("Copy"),
251 Opie::Core::OResource::loadPixmap("copy", Opie::Core::OResource::SmallIcon ), QString::null, 263 Opie::Core::OResource::loadPixmap("copy", Opie::Core::OResource::SmallIcon ), QString::null,
252 0, this, 0 ); 264 0, this, 0 );
253 //a->addTo( m_icons ); 265 //a->addTo( m_icons );
254 connect( a, SIGNAL(activated() ), 266 connect( a, SIGNAL(activated() ),
255 this, SLOT(slotCopy() ) ); 267 this, SLOT(slotCopy() ) );
256 268
257 QAction *paste = new QAction(tr("Paste"), 269 QAction *paste = new QAction(tr("Paste"),
258 Opie::Core::OResource::loadPixmap("paste", Opie::Core::OResource::SmallIcon ), QString::null, 270 Opie::Core::OResource::loadPixmap("paste", Opie::Core::OResource::SmallIcon ), QString::null,
259 0, this, 0 ); 271 0, this, 0 );
260 connect( paste, SIGNAL(activated() ), 272 connect( paste, SIGNAL(activated() ),
261 this, SLOT(slotPaste() ) ); 273 this, SLOT(slotPaste() ) );
262 274
263 275
264 newCon->addTo( m_icons ); 276 newCon->addTo( m_icons );
265 //m_setProfiles->addTo( m_icons ); 277 //m_setProfiles->addTo( m_icons );
266 paste->addTo( m_icons ); 278 paste->addTo( m_icons );
267 m_openKeys->addTo(m_icons); 279 m_openKeys->addTo(m_icons);
268 m_fullscreen->addTo( m_icons ); 280 m_fullscreen->addTo( m_icons );
269 281
270 m_connect->setEnabled( false ); 282 m_connect->setEnabled( false );
271 m_disconnect->setEnabled( false ); 283 m_disconnect->setEnabled( false );
272 m_terminate->setEnabled( false ); 284 m_terminate->setEnabled( false );
273 m_transfer->setEnabled( false ); 285 m_transfer->setEnabled( false );
274 m_scripts->setItemEnabled(m_runScript_id, false); 286 m_scripts->setItemEnabled(m_runScript_id, false);
275 m_recordScript->setEnabled( false ); 287 m_recordScript->setEnabled( false );
276 m_saveScript->setEnabled( false ); 288 m_saveScript->setEnabled( false );
277 m_fullscreen->setEnabled( false ); 289 m_fullscreen->setEnabled( false );
278 m_closewindow->setEnabled( false ); 290 m_closewindow->setEnabled( false );
279 m_wrap->setEnabled( false ); 291 m_wrap->setEnabled( false );
280 292
281 /* 293 /*
282 * connect to the menu activation 294 * connect to the menu activation
283 */ 295 */
284 connect( m_sessionsPop, SIGNAL(activated(int) ), 296 connect( m_sessionsPop, SIGNAL(activated(int) ),
285 this, SLOT(slotProfile(int) ) ); 297 this, SLOT(slotProfile(int) ) );
286 298
287 m_consoleWindow = new TabWidget( this, "blah"); 299 m_consoleWindow = new TabWidget( this, "blah");
288 connect(m_consoleWindow, SIGNAL(activated(Session*) ), 300 connect(m_consoleWindow, SIGNAL(activated(Session*) ),
289 this, SLOT(slotSessionChanged(Session*) ) ); 301 this, SLOT(slotSessionChanged(Session*) ) );
290 setCentralWidget( m_consoleWindow ); 302 setCentralWidget( m_consoleWindow );
291 303
292 slotQuickLaunch(); 304 slotQuickLaunch();
293} 305}
294 306
295ProfileManager* MainWindow::manager() { 307ProfileManager* MainWindow::manager() {
296 return m_manager; 308 return m_manager;
297} 309}
298TabWidget* MainWindow::tabWidget() { 310TabWidget* MainWindow::tabWidget() {
299 return m_consoleWindow; 311 return m_consoleWindow;
300} 312}
301void MainWindow::populateProfiles() { 313void MainWindow::populateProfiles() {
302 m_sessionsPop->clear(); 314 m_sessionsPop->clear();
303 Profile::ValueList list = manager()->all(); 315 Profile::ValueList list = manager()->all();
304 for (Profile::ValueList::Iterator it = list.begin(); it != list.end(); ++it ) { 316 for (Profile::ValueList::Iterator it = list.begin(); it != list.end(); ++it ) {
305 m_sessionsPop->insertItem( (*it).name() ); 317 m_sessionsPop->insertItem( (*it).name() );
306 } 318 }
307 319
308} 320}
309 321
310void MainWindow::populateScripts() { 322void MainWindow::populateScripts() {
311 m_scriptsPop->clear(); 323 m_scriptsPop->clear();
312 m_scriptsData.clear(); 324 m_scriptsData.clear();
313 DocLnkSet files(QPEApplication::documentDir(), "text/plain"); 325 DocLnkSet files(QPEApplication::documentDir(), "text/plain");
314 QListIterator<DocLnk> dit(files.children()); 326 QListIterator<DocLnk> dit(files.children());
315 for (; dit.current(); ++dit) { 327 for (; dit.current(); ++dit) {
316 if (*dit && (*dit)->name().length()>0) { 328 if (*dit && (*dit)->name().length()>0) {
317 QFileInfo info((*dit)->file()); 329 QFileInfo info((*dit)->file());
318 if (info.extension(false) == "script") { 330 if (info.extension(false) == "script") {
319 m_scriptsData.append(new DocLnk(**dit)); 331 m_scriptsData.append(new DocLnk(**dit));
320 m_scriptsPop->insertItem((*dit)->name()); 332 m_scriptsPop->insertItem((*dit)->name());
321 } 333 }
322 } 334 }
323 } 335 }
324 336
325} 337}
326 338
327MainWindow::~MainWindow() { 339MainWindow::~MainWindow() {
328 delete m_factory; 340 delete m_factory;
329 manager()->save(); 341 manager()->save();
330#ifdef FSCKED_DISTRI 342#ifdef FSCKED_DISTRI
331 FixIt fix; 343 FixIt fix;
332 fix.breakIt(); 344 fix.breakIt();
333#endif 345#endif
334} 346}
335 347
336MetaFactory* MainWindow::factory() { 348MetaFactory* MainWindow::factory() {
337 return m_factory; 349 return m_factory;
338} 350}
339 351
340Session* MainWindow::currentSession() { 352Session* MainWindow::currentSession() {
341 return m_curSession; 353 return m_curSession;
342} 354}
343 355
344QList<Session> MainWindow::sessions() { 356QList<Session> MainWindow::sessions() {
345 return m_sessions; 357 return m_sessions;
346} 358}
347 359
348void MainWindow::slotNew() { 360void MainWindow::slotNew() {
349 ProfileEditorDialog dlg(factory() ); 361 ProfileEditorDialog dlg(factory() );
350 dlg.setCaption( tr("New Connection") ); 362 dlg.setCaption( tr("New Connection") );
351 int ret = QPEApplication::execDialog( &dlg ); 363 int ret = QPEApplication::execDialog( &dlg );
352 364
353 if ( ret == QDialog::Accepted ) { 365 if ( ret == QDialog::Accepted ) {
354 create( dlg.profile() ); 366 create( dlg.profile() );
355 } 367 }
356} 368}
357 369
358void MainWindow::slotRecordScript() { 370void MainWindow::slotRecordScript() {
359 if (currentSession()) { 371 if (currentSession()) {
360 currentSession()->emulationHandler()->startRecording(); 372 currentSession()->emulationHandler()->startRecording();
361 m_saveScript->setEnabled(true); 373 m_saveScript->setEnabled(true);
362 m_recordScript->setEnabled(false); 374 m_recordScript->setEnabled(false);
363 } 375 }
364} 376}
365 377
366void MainWindow::slotSaveScript() { 378void MainWindow::slotSaveScript() {
367 if (currentSession() && currentSession()->emulationHandler()->isRecording()) { 379 if (currentSession() && currentSession()->emulationHandler()->isRecording()) {
368 QMap<QString, QStringList> map; 380 QMap<QString, QStringList> map;
369 QStringList text; 381 QStringList text;
370 text << "text/plain"; 382 text << "text/plain";
371 map.insert(tr("Script"), text ); 383 map.insert(tr("Script"), text );
372 QString filename = OFileDialog::getSaveFileName(2, QPEApplication::documentDir(), QString::null, map); 384 QString filename = OFileDialog::getSaveFileName(2, QPEApplication::documentDir(), QString::null, map);
373 if (!filename.isEmpty()) { 385 if (!filename.isEmpty()) {
374 QFileInfo info(filename); 386 QFileInfo info(filename);
375 if (info.extension(FALSE) != "script") 387 if (info.extension(FALSE) != "script")
376 filename += ".script"; 388 filename += ".script";
377 DocLnk nf; 389 DocLnk nf;
378 nf.setType("text/plain"); 390 nf.setType("text/plain");
379 nf.setFile(filename); 391 nf.setFile(filename);
380 nf.setName(info.fileName()); 392 nf.setName(info.fileName());
381 FileManager fm; 393 FileManager fm;
382 fm.saveFile(nf, currentSession()->emulationHandler()->script()->script()); 394 fm.saveFile(nf, currentSession()->emulationHandler()->script()->script());
383 currentSession()->emulationHandler()->clearScript(); 395 currentSession()->emulationHandler()->clearScript();
384 m_saveScript->setEnabled(false); 396 m_saveScript->setEnabled(false);
385 m_recordScript->setEnabled(true); 397 m_recordScript->setEnabled(true);
386 populateScripts(); 398 populateScripts();
387 } 399 }
388 } 400 }
389} 401}
390 402
391void MainWindow::slotRunScript(int id) { 403void MainWindow::slotRunScript(int id) {
392 if (currentSession()) { 404 if (currentSession()) {
393 int index = m_scriptsPop->indexOf(id); 405 int index = m_scriptsPop->indexOf(id);
394 DocLnk *lnk = m_scriptsData.at(index); 406 DocLnk *lnk = m_scriptsData.at(index);
395 QString filePath = lnk->file(); 407 QString filePath = lnk->file();
396 Script script(filePath); 408 Script script(filePath);
397 currentSession()->emulationHandler()->runScript(&script); 409 currentSession()->emulationHandler()->runScript(&script);
398 } 410 }
399} 411}
400 412
401void MainWindow::slotConnect() { 413void MainWindow::slotConnect() {
402 if ( currentSession() ) { 414 if ( currentSession() ) {
403 bool ret = currentSession()->layer()->open(); 415 bool ret = currentSession()->layer()->open();
404 if(!ret) QMessageBox::warning(currentSession()->widgetStack(), 416 if(!ret) QMessageBox::warning(currentSession()->widgetStack(),
405 QObject::tr("Failed"), 417 QObject::tr("Failed"),
406 QObject::tr("Connecting failed for this session.")); 418 QObject::tr("Connecting failed for this session."));
407 else { 419 else {
408 m_connect->setEnabled( false ); 420 m_connect->setEnabled( false );
409 m_disconnect->setEnabled( true ); 421 m_disconnect->setEnabled( true );
410 422
411 // if it does not support file transfer, disable the menu entry 423 // if it does not support file transfer, disable the menu entry
412 if ( ( m_curSession->layer() )->supports()[1] == 0 ) { 424 if ( ( m_curSession->layer() )->supports()[1] == 0 ) {
413 m_transfer->setEnabled( false ); 425 m_transfer->setEnabled( false );
414 } else { 426 } else {
415 m_transfer->setEnabled( true ); 427 m_transfer->setEnabled( true );
416 } 428 }
417 429
418 m_recordScript->setEnabled( true ); 430 m_recordScript->setEnabled( true );
419 m_scripts->setItemEnabled(m_runScript_id, true); 431 m_scripts->setItemEnabled(m_runScript_id, true);
420 } 432 }
421 } 433 }
422} 434}
423 435
424void MainWindow::slotDisconnect() { 436void MainWindow::slotDisconnect() {
425 if ( currentSession() ) { 437 if ( currentSession() ) {
426 currentSession()->layer()->close(); 438 currentSession()->layer()->close();
427 m_connect->setEnabled( true ); 439 m_connect->setEnabled( true );
428 m_disconnect->setEnabled( false ); 440 m_disconnect->setEnabled( false );
429 m_transfer->setEnabled( false ); 441 m_transfer->setEnabled( false );
430 m_recordScript->setEnabled( false); 442 m_recordScript->setEnabled( false);
431 m_saveScript->setEnabled( false ); 443 m_saveScript->setEnabled( false );
432 m_scripts->setItemEnabled(m_runScript_id, false); 444 m_scripts->setItemEnabled(m_runScript_id, false);
433 } 445 }
434} 446}
435 447
436void MainWindow::slotTerminate() { 448void MainWindow::slotTerminate() {
437 if ( currentSession() ) 449 if ( currentSession() )
438 currentSession()->layer()->close(); 450 currentSession()->layer()->close();
439 451
440 slotClose(); 452 slotClose();
441 /* FIXME move to the next session */ 453 /* FIXME move to the next session */
442} 454}
443 455
444 456
445 457
446void MainWindow::slotQuickLaunch() { 458void MainWindow::slotQuickLaunch() {
447 459
448 Profile prof = manager()->profile( "default" ); 460 Profile prof = manager()->profile( "default" );
449 if ( prof.name() == "default" ) { 461 if ( prof.name() == "default" ) {
450 create( prof ); 462 create( prof );
451 } else { 463 } else {
452 #ifndef EAST 464 #ifndef EAST
453 Profile newProf = Profile( "default", "console", "default" , 0, 3, 0 ); 465 Profile newProf = Profile( "default", "console", "default" , 0, 3, 0 );
454 newProf.setAutoConnect( true ); 466 newProf.setAutoConnect( true );
455 create( newProf ); 467 create( newProf );
456 slotSaveSession(); 468 slotSaveSession();
457 #endif 469 #endif
458 } 470 }
459} 471}
460 472
461void MainWindow::slotConfigure() { 473void MainWindow::slotConfigure() {
462 ConfigDialog conf( manager()->all(), factory() ); 474 ConfigDialog conf( manager()->all(), factory() );
463 475
464 int ret = QPEApplication::execDialog( &conf ); 476 int ret = QPEApplication::execDialog( &conf );
465 477
466 if ( QDialog::Accepted == ret ) { 478 if ( QDialog::Accepted == ret ) {
467 manager()->setProfiles( conf.list() ); 479 manager()->setProfiles( conf.list() );
468 manager()->save(); 480 manager()->save();
469 populateProfiles(); 481 populateProfiles();
470 } 482 }
471} 483}
472/* 484/*
473 * we will remove 485 * we will remove
474 * this window from the tabwidget 486 * this window from the tabwidget
475 * remove it from the list 487 * remove it from the list
476 * delete it 488 * delete it
477 * and set the currentSession() 489 * and set the currentSession()
478 */ 490 */
479void MainWindow::slotClose() { 491void MainWindow::slotClose() {
480 if (!currentSession() ) 492 if (!currentSession() )
481 return; 493 return;
482 494
483 Session* ses = currentSession(); 495 Session* ses = currentSession();
484 /* set to NULL to be safe, if its needed slotSessionChanged resets it automatically */ 496 /* set to NULL to be safe, if its needed slotSessionChanged resets it automatically */
485 m_curSession = NULL; 497 m_curSession = NULL;
486 tabWidget()->remove( /*currentSession()*/ses ); 498 tabWidget()->remove( /*currentSession()*/ses );
487 /*it's autodelete */ 499 /*it's autodelete */
488 m_sessions.remove( ses ); 500 m_sessions.remove( ses );
489 501
490 if (!currentSession() ) { 502 if (!currentSession() ) {
491 m_connect->setEnabled( false ); 503 m_connect->setEnabled( false );
492 m_disconnect->setEnabled( false ); 504 m_disconnect->setEnabled( false );
493 m_terminate->setEnabled( false ); 505 m_terminate->setEnabled( false );
494 m_transfer->setEnabled( false ); 506 m_transfer->setEnabled( false );
495 m_recordScript->setEnabled( false ); 507 m_recordScript->setEnabled( false );
496 m_saveScript->setEnabled( false ); 508 m_saveScript->setEnabled( false );
497 m_scripts->setItemEnabled(m_runScript_id, false); 509 m_scripts->setItemEnabled(m_runScript_id, false);
498 m_fullscreen->setEnabled( false ); 510 m_fullscreen->setEnabled( false );
499 m_wrap->setEnabled( false ); 511 m_wrap->setEnabled( false );
500 m_closewindow->setEnabled( false ); 512 m_closewindow->setEnabled( false );
501 } 513 }
502 514
503 m_kb->loadDefaults(); 515 m_kb->loadDefaults();
504} 516}
505 517
506/* 518/*
507 * We will get the name 519 * We will get the name
508 * Then the profile 520 * Then the profile
509 * and then we will make a profile 521 * and then we will make a profile
510 */ 522 */
511void MainWindow::slotProfile( int id) { 523void MainWindow::slotProfile( int id) {
512 Profile prof = manager()->profile( m_sessionsPop->text( id) ); 524 Profile prof = manager()->profile( m_sessionsPop->text( id) );
513 create( prof ); 525 create( prof );
514} 526}
515 527
516 528
517 529
518void MainWindow::create( const Profile& prof ) { 530void MainWindow::create( const Profile& prof ) {
519 char *homeDir = getenv("HOME"); 531 char *homeDir = getenv("HOME");
520 532
521 if ( homeDir ) 533 if ( homeDir )
522 ::chdir( homeDir ); 534 ::chdir( homeDir );
523 535
524 if(m_curSession) 536 if(m_curSession)
525 if(m_curSession->transferDialog()) m_curSession->transferDialog()->hide(); 537 if(m_curSession->transferDialog()) m_curSession->transferDialog()->hide();
526 538
527 Session *ses = manager()->fromProfile( prof, tabWidget() ); 539 Session *ses = manager()->fromProfile( prof, tabWidget() );
528 540
529 if((!ses) || (!ses->layer()) || (!ses->widgetStack())) 541 if((!ses) || (!ses->layer()) || (!ses->widgetStack()))
530 { 542 {
531 QMessageBox::warning(this, 543 QMessageBox::warning(this,
532 QObject::tr("Session failed"), 544 QObject::tr("Session failed"),
533 QObject::tr("<qt>Cannot open session: Not all components were found.</qt>")); 545 QObject::tr("<qt>Cannot open session: Not all components were found.</qt>"));
534 //if(ses) delete ses; 546 //if(ses) delete ses;
535 return; 547 return;
536 } 548 }
537 549
538 m_sessions.append( ses ); 550 m_sessions.append( ses );
539 tabWidget()->add( ses ); 551 tabWidget()->add( ses );
540 tabWidget()->repaint(); 552 tabWidget()->repaint();
541 m_curSession = ses; 553 m_curSession = ses;
542 554
543 // dicide if its a local term ( then no connction and no tranfer), maybe make a wrapper method out of it 555 // dicide if its a local term ( then no connction and no tranfer), maybe make a wrapper method out of it
544 m_connect->setEnabled( true ); 556 m_connect->setEnabled( true );
545 m_disconnect->setEnabled( false ); 557 m_disconnect->setEnabled( false );
546 m_terminate->setEnabled( true ); 558 m_terminate->setEnabled( true );
547 m_fullscreen->setEnabled( true ); 559 m_fullscreen->setEnabled( true );
548 m_wrap->setEnabled( true ); 560 m_wrap->setEnabled( true );
549 m_closewindow->setEnabled( true ); 561 m_closewindow->setEnabled( true );
550 m_transfer->setEnabled( false ); 562 m_transfer->setEnabled( false );
551 m_recordScript->setEnabled( false ); 563 m_recordScript->setEnabled( false );
552 m_saveScript->setEnabled( false ); 564 m_saveScript->setEnabled( false );
553 m_scripts->setItemEnabled(m_runScript_id, false); 565 m_scripts->setItemEnabled(m_runScript_id, false);
554 566
555 // is io_layer wants direct connection, then autoconnect 567 // is io_layer wants direct connection, then autoconnect
556 //if ( ( m_curSession->layer() )->supports()[0] == 1 ) { 568 //if ( ( m_curSession->layer() )->supports()[0] == 1 ) {
557 if (prof.autoConnect()) { 569 if (prof.autoConnect()) {
558 slotConnect(); 570 slotConnect();
559 } 571 }
560 572
561 QWidget *w = currentSession()->widget(); 573 QWidget *w = currentSession()->widget();
562 if(w) w->setFocus(); 574 if(w) w->setFocus();
563 575
564 if(currentSession()->profile().readNumEntry("Wrap", 80)){ 576 if(currentSession()->profile().readNumEntry("Wrap", 80)){
565 m_isWrapped = true; 577 m_isWrapped = true;
566 } else { 578 } else {
567 m_isWrapped = false; 579 m_isWrapped = false;
568 } 580 }
569 581
570 m_kb->load(currentSession()->profile()); 582 m_kb->load(currentSession()->profile());
571} 583}
572 584
573void MainWindow::slotTransfer() 585void MainWindow::slotTransfer()
574{ 586{
575 if ( currentSession() ) { 587 if ( currentSession() ) {
576 Session *mysession = currentSession(); 588 Session *mysession = currentSession();
577 TransferDialog dlg(/*mysession->widgetStack()*/this, this); 589 TransferDialog dlg(/*mysession->widgetStack()*/this, this);
578 mysession->setTransferDialog(&dlg); 590 mysession->setTransferDialog(&dlg);
579 //dlg.reparent(mysession->widgetStack(), QPoint(0, 0)); 591 //dlg.reparent(mysession->widgetStack(), QPoint(0, 0));
580 //dlg.showMaximized(); 592 //dlg.showMaximized();
581 currentSession()->widgetStack()->addWidget(&dlg, -1); 593 currentSession()->widgetStack()->addWidget(&dlg, -1);
582 dlg.show(); 594 dlg.show();
583 //dlg.exec(); 595 //dlg.exec();
584 while(dlg.isRunning()) qApp->processEvents(); 596 while(dlg.isRunning()) qApp->processEvents();
585 mysession->setTransferDialog(0l); 597 mysession->setTransferDialog(0l);
586 } 598 }
587} 599}
588 600
589 601
590void MainWindow::slotOpenKeb(bool state) { 602void MainWindow::slotOpenKeb(bool state) {
591 603
592 if (state) m_keyBar->show(); 604 if (state) m_keyBar->show();
593 else m_keyBar->hide(); 605 else m_keyBar->hide();
594 606
595} 607}
596 608
597 609
598void MainWindow::slotOpenButtons( bool state ) { 610void MainWindow::slotOpenButtons( bool state ) {
599 611
600 if ( state ) { 612 if ( state ) {
601 m_buttonBar->show(); 613 m_buttonBar->show();
602 } else { 614 } else {
603 m_buttonBar->hide(); 615 m_buttonBar->hide();
604 } 616 }
605} 617}
606 618
607 619
608 620
609void MainWindow::slotSessionChanged( Session* ses ) { 621void MainWindow::slotSessionChanged( Session* ses ) {
610 if(m_curSession) 622 if(m_curSession)
611 if(m_curSession->transferDialog()) m_curSession->transferDialog()->hide(); 623 if(m_curSession->transferDialog()) m_curSession->transferDialog()->hide();
612 if(ses) 624 if(ses)
613 if(ses->transferDialog()) ses->transferDialog()->show(); 625 if(ses->transferDialog()) ses->transferDialog()->show();
614 626
615 if ( ses ) { 627 if ( ses ) {
616 m_curSession = ses; 628 m_curSession = ses;
617 if ( m_curSession->layer()->isConnected() ) { 629 if ( m_curSession->layer()->isConnected() ) {
618 m_connect->setEnabled( false ); 630 m_connect->setEnabled( false );
619 m_disconnect->setEnabled( true ); 631 m_disconnect->setEnabled( true );
620 m_recordScript->setEnabled(!m_curSession->emulationHandler()->isRecording()); 632 m_recordScript->setEnabled(!m_curSession->emulationHandler()->isRecording());
621 m_saveScript->setEnabled(m_curSession->emulationHandler()->isRecording()); 633 m_saveScript->setEnabled(m_curSession->emulationHandler()->isRecording());
622 m_scripts->setItemEnabled(m_runScript_id, true); 634 m_scripts->setItemEnabled(m_runScript_id, true);
623 } else { 635 } else {
624 m_connect->setEnabled( true ); 636 m_connect->setEnabled( true );
625 m_disconnect->setEnabled( false ); 637 m_disconnect->setEnabled( false );
626 m_recordScript->setEnabled( false ); 638 m_recordScript->setEnabled( false );
627 m_saveScript->setEnabled( false ); 639 m_saveScript->setEnabled( false );
628 m_scripts->setItemEnabled(m_runScript_id, false); 640 m_scripts->setItemEnabled(m_runScript_id, false);
629 } 641 }
630 642
631 if ( ( currentSession()->emulationHandler()->isLogging() ) ) { 643 if ( ( currentSession()->emulationHandler()->isLogging() ) ) {
632 m_recordLog->setText( tr("Stop log") ); 644 m_recordLog->setText( tr("Stop log") );
633 } else { 645 } else {
634 m_recordLog->setText( tr("Start log") ); 646 m_recordLog->setText( tr("Start log") );
635 } 647 }
636 648
637 if ( ( m_curSession->layer() )->supports()[1] == 0 ) { 649 if ( ( m_curSession->layer() )->supports()[1] == 0 ) {
638 m_transfer->setEnabled( false ); 650 m_transfer->setEnabled( false );
639 } else { 651 } else {
640 m_transfer->setEnabled( true ); 652 m_transfer->setEnabled( true );
641 } 653 }
642 654
643 QWidget *w = m_curSession->widget(); 655 QWidget *w = m_curSession->widget();
644 if(w) w->setFocus(); 656 if(w) w->setFocus();
645 657
646 if(currentSession()->profile().readNumEntry("Wrap", 80)){ 658 if(currentSession()->profile().readNumEntry("Wrap", 80)){
647 m_isWrapped = true; 659 m_isWrapped = true;
648 } else { 660 } else {
649 m_isWrapped = false; 661 m_isWrapped = false;
650 } 662 }
651 663
652 m_kb->load(currentSession()->profile()); 664 m_kb->load(currentSession()->profile());
653 } 665 }
654} 666}
655 667
656void MainWindow::slotWrap() 668void MainWindow::slotWrap()
657{ 669{
658 if(m_curSession) 670 if(m_curSession)
659 { 671 {
660 EmulationHandler *e = m_curSession->emulationHandler(); 672 EmulationHandler *e = m_curSession->emulationHandler();
661 if(e) 673 if(e)
662 { 674 {
663 e->setWrap( m_isWrapped ? 80:0 ); 675 e->setWrap( m_isWrapped ? 80:0 );
664 m_isWrapped = !m_isWrapped; 676 m_isWrapped = !m_isWrapped;
665 } 677 }
666 } 678 }
667} 679}
668 680
669void MainWindow::slotFullscreen() { 681void MainWindow::slotFullscreen() {
670 682
671 683
672 684
673 if ( m_isFullscreen ) { 685 if ( m_isFullscreen ) {
674 ( m_curSession->widgetStack() )->reparent( savedParentFullscreen, 0, QPoint(0,0), true ); 686 ( m_curSession->widgetStack() )->reparent( savedParentFullscreen, 0, QPoint(0,0), true );
675 ( m_curSession->widgetStack() )->resize( savedParentFullscreen->width(), savedParentFullscreen->height() ); 687 ( m_curSession->widgetStack() )->resize( savedParentFullscreen->width(), savedParentFullscreen->height() );
676 ( m_curSession->emulationHandler() )->cornerButton()->hide(); 688 ( m_curSession->emulationHandler() )->cornerButton()->hide();
677 disconnect( ( m_curSession->emulationHandler() )->cornerButton(), SIGNAL( pressed() ), this, SLOT( slotFullscreen() ) ); 689 disconnect( ( m_curSession->emulationHandler() )->cornerButton(), SIGNAL( pressed() ), this, SLOT( slotFullscreen() ) );
678 690
679 } else { 691 } else {
680 savedParentFullscreen = ( m_curSession->widgetStack() )->parentWidget(); 692 savedParentFullscreen = ( m_curSession->widgetStack() )->parentWidget();
681 ( m_curSession->widgetStack() )->setFrameStyle( QFrame::NoFrame ); 693 ( m_curSession->widgetStack() )->setFrameStyle( QFrame::NoFrame );
682 ( m_curSession->widgetStack() )->reparent( 0, WStyle_Tool | WStyle_Customize | WStyle_StaysOnTop 694 ( m_curSession->widgetStack() )->reparent( 0, WStyle_Tool | WStyle_Customize | WStyle_StaysOnTop
683 , QPoint(0,0), false ); 695 , QPoint(0,0), false );
684 ( m_curSession->widgetStack() )->resize( qApp->desktop()->width(), qApp->desktop()->height() ); 696 ( m_curSession->widgetStack() )->resize( qApp->desktop()->width(), qApp->desktop()->height() );
685 ( m_curSession->widgetStack() )->setFocus(); 697 ( m_curSession->widgetStack() )->setFocus();
686 ( m_curSession->widgetStack() )->show(); 698 ( m_curSession->widgetStack() )->show();
687 699
688 ( ( m_curSession->emulationHandler() )->cornerButton() )->show(); 700 ( ( m_curSession->emulationHandler() )->cornerButton() )->show();
689 701
690 connect( ( m_curSession->emulationHandler() )->cornerButton(), SIGNAL( pressed() ), this, SLOT( slotFullscreen() ) ); 702 connect( ( m_curSession->emulationHandler() )->cornerButton(), SIGNAL( pressed() ), this, SLOT( slotFullscreen() ) );
691 } 703 }
692 704
693 m_isFullscreen = !m_isFullscreen; 705 m_isFullscreen = !m_isFullscreen;
694} 706}
695 707
708void MainWindow::slotScrollbarSelected(int index)
709{
710 int loc;
711
712 Config cfg( "Konsole" );
713 cfg.setGroup("ScrollBar");
714 if(index == sm_none)
715 {
716 loc = 0;
717 }
718 else if(index == sm_left)
719 {
720 loc = 1;
721 }
722 else if(index == sm_right)
723 {
724 loc = 2;
725 }
726
727 cfg.writeEntry("Position", loc);
728
729 if (currentSession()) {
730 currentSession()->emulationHandler()->setScrollbarLocation(loc);
731 }
732
733 m_scrollbar->setItemChecked(sm_none, index == sm_none);
734 m_scrollbar->setItemChecked(sm_left, index == sm_left);
735 m_scrollbar->setItemChecked(sm_right, index == sm_right);
736}
696 737
697void MainWindow::slotKeyReceived(FKey k, ushort, ushort, bool pressed) { 738void MainWindow::slotKeyReceived(FKey k, ushort, ushort, bool pressed) {
698 739
699 if ( m_curSession ) { 740 if ( m_curSession ) {
700 741
701 QEvent::Type state; 742 QEvent::Type state;
702 743
703 if (pressed) state = QEvent::KeyPress; 744 if (pressed) state = QEvent::KeyPress;
704 else state = QEvent::KeyRelease; 745 else state = QEvent::KeyRelease;
705 746
706 QKeyEvent ke(state, k.qcode, k.unicode, 0, QString(QChar(k.unicode))); 747 QKeyEvent ke(state, k.qcode, k.unicode, 0, QString(QChar(k.unicode)));
707 748
708 // is this the best way to do this? cant figure out any other way to work 749 // is this the best way to do this? cant figure out any other way to work
709 QApplication::sendEvent((QObject *)m_curSession->widget(), &ke); 750 QApplication::sendEvent((QObject *)m_curSession->widget(), &ke);
710 ke.ignore(); 751 ke.ignore();
711 } 752 }
712} 753}
713void MainWindow::slotCopy() { 754void MainWindow::slotCopy() {
714 if (!currentSession() ) return; 755 if (!currentSession() ) return;
715 currentSession()->emulationHandler()->copy(); 756 currentSession()->emulationHandler()->copy();
716} 757}
717void MainWindow::slotPaste() { 758void MainWindow::slotPaste() {
718 if (!currentSession() ) return; 759 if (!currentSession() ) return;
719 currentSession()->emulationHandler()->paste(); 760 currentSession()->emulationHandler()->paste();
720} 761}
721 762
722/* 763/*
723 * Save the session 764 * Save the session
724 */ 765 */
725 766
726void MainWindow::slotSaveSession() { 767void MainWindow::slotSaveSession() {
727 if (!currentSession() ) { 768 if (!currentSession() ) {
728 QMessageBox::information(this, tr("Save Connection"), 769 QMessageBox::information(this, tr("Save Connection"),
729 tr("<qt>There is no Connection.</qt>"), 1 ); 770 tr("<qt>There is no Connection.</qt>"), 1 );
730 return; 771 return;
731 } 772 }
732 manager()->add( currentSession()->profile() ); 773 manager()->add( currentSession()->profile() );
733 manager()->save(); 774 manager()->save();
734 populateProfiles(); 775 populateProfiles();
735} 776}
736 777
737 778
738 779
739void MainWindow::slotSaveLog() { 780void MainWindow::slotSaveLog() {
740 781
741 if( currentSession()->emulationHandler()->isLogging() ) { 782 if( currentSession()->emulationHandler()->isLogging() ) {
742 DocLnk nf; 783 DocLnk nf;
743 QString m_logName = currentSession()->emulationHandler()->logFileName(); 784 QString m_logName = currentSession()->emulationHandler()->logFileName();
744 QFileInfo info(m_logName); 785 QFileInfo info(m_logName);
745 nf.setType("text/plain"); 786 nf.setType("text/plain");
746 nf.setFile(m_logName); 787 nf.setFile(m_logName);
747 nf.setName(info.fileName()); 788 nf.setName(info.fileName());
748 nf.writeLink(); 789 nf.writeLink();
749 m_recordLog->setText( tr("Start log") ); 790 m_recordLog->setText( tr("Start log") );
750 m_recordingLog = false; 791 m_recordingLog = false;
751 currentSession()->emulationHandler()->clearLog(); 792 currentSession()->emulationHandler()->clearLog();
752 } else { 793 } else {
753 QMap<QString, QStringList> map; 794 QMap<QString, QStringList> map;
754 QStringList text; 795 QStringList text;
755 text << "text/plain"; 796 text << "text/plain";
756 map.insert(tr("Log"), text ); 797 map.insert(tr("Log"), text );
757 Opie::Core::OConfig cfg("opie-console"); 798 Opie::Core::OConfig cfg("opie-console");
758 cfg.setGroup("defaults"); 799 cfg.setGroup("defaults");
759 QString startDir = cfg.readEntry("defaultlogdir", QPEApplication::documentDir() ); 800 QString startDir = cfg.readEntry("defaultlogdir", QPEApplication::documentDir() );
760 QString m_logName = OFileDialog::getSaveFileName(2, startDir, QString::null, map, 0, startDir); 801 QString m_logName = OFileDialog::getSaveFileName(2, startDir, QString::null, map, 0, startDir);
761 if (m_logName.isEmpty() ) return; 802 if (m_logName.isEmpty() ) return;
762 803
763 m_recordLog->setText( tr("Stop log") ); 804 m_recordLog->setText( tr("Stop log") );
764 m_recordingLog = true; 805 m_recordingLog = true;
765 currentSession()->emulationHandler()->startLogging(m_logName); 806 currentSession()->emulationHandler()->startLogging(m_logName);
766 } 807 }
767} 808}
768 809
769void MainWindow::slotSaveHistory() { 810void MainWindow::slotSaveHistory() {
770 QMap<QString, QStringList> map; 811 QMap<QString, QStringList> map;
771 QStringList text; 812 QStringList text;
772 text << "text/plain"; 813 text << "text/plain";
773 map.insert(tr("History"), text ); 814 map.insert(tr("History"), text );
774 QString filename = OFileDialog::getSaveFileName(2, QPEApplication::documentDir(), QString::null, map); 815 QString filename = OFileDialog::getSaveFileName(2, QPEApplication::documentDir(), QString::null, map);
775 if (filename.isEmpty() ) return; 816 if (filename.isEmpty() ) return;
776 817
777 QFileInfo info(filename); 818 QFileInfo info(filename);
778 819
779 DocLnk nf; 820 DocLnk nf;
780 nf.setType("text/plain"); 821 nf.setType("text/plain");
781 nf.setFile(filename); 822 nf.setFile(filename);
782 nf.setName(info.fileName()); 823 nf.setName(info.fileName());
783 824
784 825
785 QFile file(filename); 826 QFile file(filename);
786 file.open(IO_WriteOnly ); 827 file.open(IO_WriteOnly );
787 QTextStream str(&file ); 828 QTextStream str(&file );
788 if ( currentSession() ) 829 if ( currentSession() )
789 currentSession()->emulationHandler()->emulation()->streamHistory(&str); 830 currentSession()->emulationHandler()->emulation()->streamHistory(&str);
790 831
791 file.close(); 832 file.close();
792 nf.writeLink(); 833 nf.writeLink();
793} 834}
diff --git a/noncore/apps/opie-console/mainwindow.h b/noncore/apps/opie-console/mainwindow.h
index f3c8b81..abdf6ee 100644
--- a/noncore/apps/opie-console/mainwindow.h
+++ b/noncore/apps/opie-console/mainwindow.h
@@ -1,143 +1,152 @@
1#ifndef OPIE_MAIN_WINDOW_H 1#ifndef OPIE_MAIN_WINDOW_H
2#define OPIE_MAIN_WINDOW_H 2#define OPIE_MAIN_WINDOW_H
3 3
4#include <qmainwindow.h> 4#include <qmainwindow.h>
5#include <qlist.h> 5#include <qlist.h>
6#include <qfile.h> 6#include <qfile.h>
7 7
8#include "session.h" 8#include "session.h"
9 9
10/** 10/**
11 * this is the MainWindow of the new opie console 11 * this is the MainWindow of the new opie console
12 * it's also the dispatcher between the different 12 * it's also the dispatcher between the different
13 * actions supported by the gui 13 * actions supported by the gui
14 */ 14 */
15class QToolBar; 15class QToolBar;
16class QToolButton; 16class QToolButton;
17class QMenuBar; 17class QMenuBar;
18class QAction; 18class QAction;
19class MetaFactory; 19class MetaFactory;
20class TabWidget; 20class TabWidget;
21class ProfileManager; 21class ProfileManager;
22class Profile; 22class Profile;
23class FunctionKeyboard; 23class FunctionKeyboard;
24class FKey; 24class FKey;
25class DocLnk; 25class DocLnk;
26 26
27
27class MainWindow : public QMainWindow { 28class MainWindow : public QMainWindow {
28 Q_OBJECT 29 Q_OBJECT
29public: 30public:
30 MainWindow( QWidget *parent = 0, const char *name = 0, WFlags fl = 0 ); 31 MainWindow( QWidget *parent = 0, const char *name = 0, WFlags fl = 0 );
31 ~MainWindow(); 32 ~MainWindow();
32 static QString appName() {return QString::fromLatin1("opie-console"); } 33 static QString appName() {return QString::fromLatin1("opie-console"); }
33 34
34 /** 35 /**
35 * our factory to generate IOLayer and so on 36 * our factory to generate IOLayer and so on
36 * 37 *
37 */ 38 */
38 MetaFactory* factory(); 39 MetaFactory* factory();
39 40
40 /** 41 /**
41 * A session contains a QWidget*, 42 * A session contains a QWidget*,
42 * an IOLayer* and some infos for us 43 * an IOLayer* and some infos for us
43 */ 44 */
44 Session* currentSession(); 45 Session* currentSession();
45 46
46 /** 47 /**
47 * the session list 48 * the session list
48 */ 49 */
49 QList<Session> sessions(); 50 QList<Session> sessions();
50 51
51 /** 52 /**
52 * 53 *
53 */ 54 */
54 ProfileManager* manager(); 55 ProfileManager* manager();
55 TabWidget* tabWidget(); 56 TabWidget* tabWidget();
56 57
57private slots: 58private slots:
58 void slotNew(); 59 void slotNew();
59 void slotConnect(); 60 void slotConnect();
60 void slotDisconnect(); 61 void slotDisconnect();
61 void slotTerminate(); 62 void slotTerminate();
62 void slotConfigure(); 63 void slotConfigure();
63 void slotClose(); 64 void slotClose();
64 void slotProfile(int); 65 void slotProfile(int);
65 void slotTransfer(); 66 void slotTransfer();
66 void slotOpenKeb(bool); 67 void slotOpenKeb(bool);
67 void slotOpenButtons(bool); 68 void slotOpenButtons(bool);
68 void slotRecordScript(); 69 void slotRecordScript();
69 void slotSaveScript(); 70 void slotSaveScript();
70 void slotRunScript(int); 71 void slotRunScript(int);
71 void slotFullscreen(); 72 void slotFullscreen();
72 void slotQuickLaunch(); 73 void slotQuickLaunch();
73 void slotWrap(); 74 void slotWrap();
74 void slotSessionChanged( Session* ); 75 void slotSessionChanged( Session* );
75 void slotKeyReceived(FKey, ushort, ushort, bool); 76 void slotKeyReceived(FKey, ushort, ushort, bool);
76 void slotSaveHistory(); 77 void slotSaveHistory();
77 void slotSaveLog(); 78 void slotSaveLog();
79 void slotScrollbarSelected(int);
78 80
79 /* what could these both slot do? */ 81 /* what could these both slot do? */
80 void slotCopy(); 82 void slotCopy();
81 void slotPaste(); 83 void slotPaste();
82 84
83 /* save the currentSession() to Profiles */ 85 /* save the currentSession() to Profiles */
84 void slotSaveSession(); 86 void slotSaveSession();
85 87
86private: 88private:
87 void initUI(); 89 void initUI();
88 void populateProfiles(); 90 void populateProfiles();
89 void populateScripts(); 91 void populateScripts();
90 void create( const Profile& ); 92 void create( const Profile& );
91 /** 93 /**
92 * the current session 94 * the current session
93 */ 95 */
94 Session* m_curSession; 96 Session* m_curSession;
95 97
96 /** 98 /**
97 * the session list 99 * the session list
98 */ 100 */
99 QList<Session> m_sessions; 101 QList<Session> m_sessions;
100 QList<DocLnk> m_scriptsData; 102 QList<DocLnk> m_scriptsData;
101 103
102 /** 104 /**
103 * the metafactory 105 * the metafactory
104 */ 106 */
105 MetaFactory* m_factory; 107 MetaFactory* m_factory;
106 ProfileManager* m_manager; 108 ProfileManager* m_manager;
107 109
110 /*
111 * scrollbar
112 */
113
114 int sm_none, sm_left, sm_right;
115
108 TabWidget* m_consoleWindow; 116 TabWidget* m_consoleWindow;
109 QToolBar* m_tool; 117 QToolBar* m_tool;
110 QToolBar* m_icons; 118 QToolBar* m_icons;
111 QToolBar* m_keyBar; 119 QToolBar* m_keyBar;
112 QToolBar* m_buttonBar; 120 QToolBar* m_buttonBar;
113 QMenuBar* m_bar; 121 QMenuBar* m_bar;
114 QPopupMenu* m_console; 122 QPopupMenu* m_console;
115 QPopupMenu* m_sessionsPop; 123 QPopupMenu* m_sessionsPop;
116 QPopupMenu* m_scriptsPop; 124 QPopupMenu* m_scriptsPop;
117 QPopupMenu* m_scripts; 125 QPopupMenu* m_scripts;
126 QPopupMenu* m_scrollbar;
118 QAction* m_connect; 127 QAction* m_connect;
119 QAction* m_disconnect; 128 QAction* m_disconnect;
120 QAction* m_quickLaunch; 129 QAction* m_quickLaunch;
121 QAction* m_terminate; 130 QAction* m_terminate;
122 QAction* m_transfer; 131 QAction* m_transfer;
123 QAction* m_setProfiles; 132 QAction* m_setProfiles;
124 QAction* m_openKeys; 133 QAction* m_openKeys;
125 QAction* m_openButtons; 134 QAction* m_openButtons;
126 QAction* m_recordScript; 135 QAction* m_recordScript;
127 QAction* m_saveScript; 136 QAction* m_saveScript;
128 QAction* m_fullscreen; 137 QAction* m_fullscreen;
129 QAction* m_wrap; 138 QAction* m_wrap;
130 QAction* m_closewindow; 139 QAction* m_closewindow;
131 QAction* m_recordLog; 140 QAction* m_recordLog;
132 141
133 FunctionKeyboard *m_kb; 142 FunctionKeyboard *m_kb;
134 int m_runScript_id; 143 int m_runScript_id;
135 bool m_isFullscreen; 144 bool m_isFullscreen;
136 bool m_isWrapped; 145 bool m_isWrapped;
137 bool m_recordingLog; 146 bool m_recordingLog;
138 147
139 QWidget* savedParentFullscreen; 148 QWidget* savedParentFullscreen;
140}; 149};
141 150
142 151
143#endif 152#endif