-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | noncore/apps/opie-console/emulation_handler.cpp | 20 |
2 files changed, 18 insertions, 3 deletions
@@ -1,142 +1,143 @@ | |||
1 | 2005-??-??Opie 1.2.1 | 1 | 2005-??-??Opie 1.2.1 |
2 | 2 | ||
3 | 3 | ||
4 | New Features | 4 | New Features |
5 | ------------ | 5 | ------------ |
6 | * OpieStumbler: Scans WiFi networks using the wireless extension scanning (skyhusker) | 6 | * OpieStumbler: Scans WiFi networks using the wireless extension scanning (skyhusker) |
7 | * Opie-Reader: Support for document formats ArriereGo and Reb, add flite output (tim,pohly) | 7 | * Opie-Reader: Support for document formats ArriereGo and Reb, add flite output (tim,pohly) |
8 | * Opie-Networksettings: Add support for wlan-ng devices and improve WEP handling (Dirk Opfer) | 8 | * Opie-Networksettings: Add support for wlan-ng devices and improve WEP handling (Dirk Opfer) |
9 | * Wellenreiter: Remove Joining networks - use OpieStumbler for that (mickeyl) | 9 | * Wellenreiter: Remove Joining networks - use OpieStumbler for that (mickeyl) |
10 | * Opie-Mobilemsg has gone unsupported - it never really worked and there will be a replacement (mickeyl) | 10 | * Opie-Mobilemsg has gone unsupported - it never really worked and there will be a replacement (mickeyl) |
11 | * Opie-Tabmanager has gone unsupported - it barely works and there is not much of a use of it anyway (mickeyl) | 11 | * Opie-Tabmanager has gone unsupported - it barely works and there is not much of a use of it anyway (mickeyl) |
12 | * Checkbook - added configuration option to use smaller font for checkbook transaction tab (hrw) | 12 | * Checkbook - added configuration option to use smaller font for checkbook transaction tab (hrw) |
13 | * ZSafe - make UI conform to Opie standards (drw) | 13 | * ZSafe - make UI conform to Opie standards (drw) |
14 | * Today Addressbook plugin - fix configuration to show/not show birthdays, use checkboxes for selection (hrw) | 14 | * Today Addressbook plugin - fix configuration to show/not show birthdays, use checkboxes for selection (hrw) |
15 | * Opie-Console: read initial fixed font configuration from qpe.conf (mickeyl) | ||
15 | 16 | ||
16 | Fixed Bugs | 17 | Fixed Bugs |
17 | ---------- | 18 | ---------- |
18 | * #1476 - Wrong order of application entries in the O-menu (skyhusker) | 19 | * #1476 - Wrong order of application entries in the O-menu (skyhusker) |
19 | * #1535- Missing line break and unnecessary location shown with Today-Calendar plugin (deller) | 20 | * #1535- Missing line break and unnecessary location shown with Today-Calendar plugin (deller) |
20 | * #1565 - crash-fix in odevice.cpp while scanning the distribution table (deller) | 21 | * #1565 - crash-fix in odevice.cpp while scanning the distribution table (deller) |
21 | * #1614 - Make Opie-console start in $HOME instead of / (skyhusker) | 22 | * #1614 - Make Opie-console start in $HOME instead of / (skyhusker) |
22 | * #1665 - Opie-IRC diplays the host prepended to the message when peer is using and ipv6 address (skyhusker) | 23 | * #1665 - Opie-IRC diplays the host prepended to the message when peer is using and ipv6 address (skyhusker) |
23 | * #1666 - Opie-IRC does not allow to add !channels in config asautojoin ones (skyhusker) | 24 | * #1666 - Opie-IRC does not allow to add !channels in config asautojoin ones (skyhusker) |
24 | * #1667 - Opie-IRC does not show messages from !channel (skyhusker) | 25 | * #1667 - Opie-IRC does not show messages from !channel (skyhusker) |
25 | * n.a.- always show volume and wireless applet popups inside visible screen (deller) | 26 | * n.a.- always show volume and wireless applet popups inside visible screen (deller) |
26 | * n.a. - scale O-Menu-Applets appropriately (mickeyl) | 27 | * n.a. - scale O-Menu-Applets appropriately (mickeyl) |
27 | * n.a.- libopienet: fix bugs in wireless scanning and setting SSID (skyhusker) | 28 | * n.a.- libopienet: fix bugs in wireless scanning and setting SSID (skyhusker) |
28 | * n.a.- Wellenreiter: relax WE version matching test a bit (mickeyl) | 29 | * n.a.- Wellenreiter: relax WE version matching test a bit (mickeyl) |
29 | * n.a.- scale BluezApplet appropriately and use larger icons (mickeyl) | 30 | * n.a.- scale BluezApplet appropriately and use larger icons (mickeyl) |
30 | * n.a.- memoryapplet: fix crash in memoryapplet on kernels without swap support (seneca cunningham) | 31 | * n.a.- memoryapplet: fix crash in memoryapplet on kernels without swap support (seneca cunningham) |
31 | * n.a. - networksettings: ignore hostap control interfaces wifi* (mickeyl) | 32 | * n.a. - networksettings: ignore hostap control interfaces wifi* (mickeyl) |
32 | * n.a. - Today Addressbook plugin fix configuration to show/not show birthdays, use checkboxes for selection (hrw) | 33 | * n.a. - Today Addressbook plugin fix configuration to show/not show birthdays, use checkboxes for selection (hrw) |
33 | 34 | ||
34 | Internal | 35 | Internal |
35 | -------- | 36 | -------- |
36 | * Make BluezApplet use OTaskbarApplet (mickeyl) | 37 | * Make BluezApplet use OTaskbarApplet (mickeyl) |
37 | * libopiecore: rewrite OFileNotification to use the Linux 2.6 inotify interface (mickeyl) | 38 | * libopiecore: rewrite OFileNotification to use the Linux 2.6 inotify interface (mickeyl) |
38 | * libopiecore: add ODirNotification - recursive directory notifications (mickeyl) | 39 | * libopiecore: add ODirNotification - recursive directory notifications (mickeyl) |
39 | * libopienet: Skip hostap control interfaces 'wifi' and improve robustness in ONetworkInterface (mickeyl) | 40 | * libopienet: Skip hostap control interfaces 'wifi' and improve robustness in ONetworkInterface (mickeyl) |
40 | * libopieui: Remove OVersatileView and OVersatileViewItem (mickeyl) | 41 | * libopieui: Remove OVersatileView and OVersatileViewItem (mickeyl) |
41 | * libopienet: Miscellaneous API cleanups (mickeyl) | 42 | * libopienet: Miscellaneous API cleanups (mickeyl) |
42 | * libopiecore: Add linux pcmcia system abstraction classes (mickeyl) | 43 | * libopiecore: Add linux pcmcia system abstraction classes (mickeyl) |
43 | 44 | ||
44 | 2005-03-25Opie 1.2.0 | 45 | 2005-03-25Opie 1.2.0 |
45 | 46 | ||
46 | Fixed Bugs | 47 | Fixed Bugs |
47 | ---------- | 48 | ---------- |
48 | * #1613 - AdvancedFM - scale toolbar icons appropriately (drw) | 49 | * #1613 - AdvancedFM - scale toolbar icons appropriately (drw) |
49 | * #1620 - OFileSelector - show the button on press and not on press on hold (alwin) | 50 | * #1620 - OFileSelector - show the button on press and not on press on hold (alwin) |
50 | * #1473 - Opie-Eye - Same as #1620 but we lack a common FileSystem Button class (zecke) | 51 | * #1473 - Opie-Eye - Same as #1620 but we lack a common FileSystem Button class (zecke) |
51 | * n.a. - PackageManager - fix bug where messages show up multiple times in install dialog (drw) | 52 | * n.a. - PackageManager - fix bug where messages show up multiple times in install dialog (drw) |
52 | * n.a.- make qpeglobal.h include qglobal.h (zecke) | 53 | * n.a.- make qpeglobal.h include qglobal.h (zecke) |
53 | 54 | ||
54 | 2005-03-20Opie 1.2.0-rc1 | 55 | 2005-03-20Opie 1.2.0-rc1 |
55 | 56 | ||
56 | 57 | ||
57 | New Features | 58 | New Features |
58 | ------------ | 59 | ------------ |
59 | * Launcher: Support a static background pixmap (mickeyl) | 60 | * Launcher: Support a static background pixmap (mickeyl) |
60 | * LauncherSettings: Choose whether to have a static background pixmap (mickeyl) | 61 | * LauncherSettings: Choose whether to have a static background pixmap (mickeyl) |
61 | * PackageManager supports the 'lists_dir' ipkg configuration option (drw) | 62 | * PackageManager supports the 'lists_dir' ipkg configuration option (drw) |
62 | * Added hi-res inline images for large resolution devices (drw) | 63 | * Added hi-res inline images for large resolution devices (drw) |
63 | * Improved launcher icons for consistency (ar) | 64 | * Improved launcher icons for consistency (ar) |
64 | * Datebook: Added plugin system to datebook so holidays and birthdays from contacts may displayed in datebook (alwin) | 65 | * Datebook: Added plugin system to datebook so holidays and birthdays from contacts may displayed in datebook (alwin) |
65 | 66 | ||
66 | Fixed Bugs | 67 | Fixed Bugs |
67 | ---------- | 68 | ---------- |
68 | * #1236 - VCards contained empty home and work address entries causing Palms to crash (eilers) | 69 | * #1236 - VCards contained empty home and work address entries causing Palms to crash (eilers) |
69 | * #1412 - Launcher Settings - fixed default settings for background in Edit tab dialog (drw) | 70 | * #1412 - Launcher Settings - fixed default settings for background in Edit tab dialog (drw) |
70 | * #1472 - Opie textedit now check for unsaved changes on ESC key (ljp) | 71 | * #1472 - Opie textedit now check for unsaved changes on ESC key (ljp) |
71 | * #1474 - Implement GUI for Scrollbars on the Left in Appearance (zecke) | 72 | * #1474 - Implement GUI for Scrollbars on the Left in Appearance (zecke) |
72 | * #1482 - Fix double '/' in paths (zecke) | 73 | * #1482 - Fix double '/' in paths (zecke) |
73 | * #1536 - Autosave of custom locations in opie backup (ar) | 74 | * #1536 - Autosave of custom locations in opie backup (ar) |
74 | * #1539 - Fixed displaying too long path in the delete dialog in opie-eye (zecke) | 75 | * #1539 - Fixed displaying too long path in the delete dialog in opie-eye (zecke) |
75 | * #1540 - Implemented deletion of DocLnks in opie-eye (zecke) | 76 | * #1540 - Implemented deletion of DocLnks in opie-eye (zecke) |
76 | * #1542 - Fixed Todo crash when priority < 1 or > 5 (drw) | 77 | * #1542 - Fixed Todo crash when priority < 1 or > 5 (drw) |
77 | * #1550 - Browse for alarm sound start in QPEDIR/sounds/ (zecke) | 78 | * #1550 - Browse for alarm sound start in QPEDIR/sounds/ (zecke) |
78 | * #1554 - Fixed Opie-Console name in .desktop file (mickeyl) | 79 | * #1554 - Fixed Opie-Console name in .desktop file (mickeyl) |
79 | * #1556 - Start to look for sound files in /opt/QtPalmtop/sounds (zecke) | 80 | * #1556 - Start to look for sound files in /opt/QtPalmtop/sounds (zecke) |
80 | * #1558 - Fixed opie-login breaking opie startup (mickeyl) | 81 | * #1558 - Fixed opie-login breaking opie startup (mickeyl) |
81 | * #1560 - Fixed Opie-Console picking up the wrong shell (bluelightning) | 82 | * #1560 - Fixed Opie-Console picking up the wrong shell (bluelightning) |
82 | * #1570 - Confirmation needed befor Restore a backup and overwrite local data (ar) | 83 | * #1570 - Confirmation needed befor Restore a backup and overwrite local data (ar) |
83 | * #1591 - Addressbook sortorder changed by clicking on column 0 (eilers) | 84 | * #1591 - Addressbook sortorder changed by clicking on column 0 (eilers) |
84 | * #1599 - Security - change recommendation for opie-multiauth to opie-securityplugin (gints) | 85 | * #1599 - Security - change recommendation for opie-multiauth to opie-securityplugin (gints) |
85 | * #1604 - Checkbook crashed on startup (drw) | 86 | * #1604 - Checkbook crashed on startup (drw) |
86 | * #1608 - Addressbook crashed after search, which may caused by not initialzed member variable (eilers) | 87 | * #1608 - Addressbook crashed after search, which may caused by not initialzed member variable (eilers) |
87 | * #1608 - QueryByExampe-Datediff on SQL database did not worked properly (eilers) | 88 | * #1608 - QueryByExampe-Datediff on SQL database did not worked properly (eilers) |
88 | * n.a. - Netsystemtime - fixed UI to prevent error dialog from displaying when it shouldn't, get rid of some compiler warnings (drw) | 89 | * n.a. - Netsystemtime - fixed UI to prevent error dialog from displaying when it shouldn't, get rid of some compiler warnings (drw) |
89 | * n.a. - PackageManager - fixed where last package in status file was not shown as installed when it should be (drw) | 90 | * n.a. - PackageManager - fixed where last package in status file was not shown as installed when it should be (drw) |
90 | * n.a. - PackageManager - fixed bug where lists_dir was not being honored at startup (drw) | 91 | * n.a. - PackageManager - fixed bug where lists_dir was not being honored at startup (drw) |
91 | * n.a. - PackageManager - provided default value for lists_dir when none is entered in configuration dialog (drw) | 92 | * n.a. - PackageManager - provided default value for lists_dir when none is entered in configuration dialog (drw) |
92 | * n.a. - OTabWidget - fixed scroll buttons, fix display position of tabs (drw) | 93 | * n.a. - OTabWidget - fixed scroll buttons, fix display position of tabs (drw) |
93 | * n.a. - AddressBook - fixed sorting by 'File As' name (drw) | 94 | * n.a. - AddressBook - fixed sorting by 'File As' name (drw) |
94 | * n.a. - AddressBook - fixed category handling for 'All' and 'Unfiled' (eilers) | 95 | * n.a. - AddressBook - fixed category handling for 'All' and 'Unfiled' (eilers) |
95 | * n.a. - AddressBook - fixed letter picker record selection and sort records afterwards (drw) | 96 | * n.a. - AddressBook - fixed letter picker record selection and sort records afterwards (drw) |
96 | 97 | ||
97 | Internal | 98 | Internal |
98 | -------- | 99 | -------- |
99 | * Worked around bug in Qt/Embedded 2.3.10: qt_version() returns 231 (mickeyl) | 100 | * Worked around bug in Qt/Embedded 2.3.10: qt_version() returns 231 (mickeyl) |
100 | * Killed the need for weak symbols in QtE (zecke) | 101 | * Killed the need for weak symbols in QtE (zecke) |
101 | * Added optional building libqpe without inline images (mickeyl) | 102 | * Added optional building libqpe without inline images (mickeyl) |
102 | * OColorButton - fixed so does not emit a colorSelected signal inside of resizeEvent (drw) | 103 | * OColorButton - fixed so does not emit a colorSelected signal inside of resizeEvent (drw) |
103 | 104 | ||
104 | 2005-02-03Opie 1.1.9 | 105 | 2005-02-03Opie 1.1.9 |
105 | 106 | ||
106 | New Features | 107 | New Features |
107 | ------------ | 108 | ------------ |
108 | * Number of icon columns in Launcher is customizable through Launcher.conf (hrw,zecke,mickeyl) | 109 | * Number of icon columns in Launcher is customizable through Launcher.conf (hrw,zecke,mickeyl) |
109 | * Number of icon columns in Launcher is customizable through LauncherSettings (mickeyl) | 110 | * Number of icon columns in Launcher is customizable through LauncherSettings (mickeyl) |
110 | * Usability enhancements in OpieIRC (skyhusker) | 111 | * Usability enhancements in OpieIRC (skyhusker) |
111 | 112 | ||
112 | Fixed Bugs | 113 | Fixed Bugs |
113 | ---------- | 114 | ---------- |
114 | * #1501 - Fixed bug in todo sql backend (eilers) | 115 | * #1501 - Fixed bug in todo sql backend (eilers) |
115 | * #1505 - Added more Swap sizes in memoryapplet (mickeyl) | 116 | * #1505 - Added more Swap sizes in memoryapplet (mickeyl) |
116 | * #1525 - Hopefully fixed double alarms and not removing alarms set with the Clock application (zecke) | 117 | * #1525 - Hopefully fixed double alarms and not removing alarms set with the Clock application (zecke) |
117 | * #1533 - Security Owner Dialog (shown in case of unsuccessfull authentiacation) wasn't able to display information in non latin1 encoding (zecke) | 118 | * #1533 - Security Owner Dialog (shown in case of unsuccessfull authentiacation) wasn't able to display information in non latin1 encoding (zecke) |
118 | * n.a. - Removed hard coded font sizes in a couple of inputmethods (mickeyl) | 119 | * n.a. - Removed hard coded font sizes in a couple of inputmethods (mickeyl) |
119 | * n.a. - Removed MediumDlg appearing prior to FirstUsage wizard (i.e. calibration) (mickeyl) | 120 | * n.a. - Removed MediumDlg appearing prior to FirstUsage wizard (i.e. calibration) (mickeyl) |
120 | * n.a. - Fixed numerous buglets in OpieIRC (skyhusker) | 121 | * n.a. - Fixed numerous buglets in OpieIRC (skyhusker) |
121 | 122 | ||
122 | Internal | 123 | Internal |
123 | -------- | 124 | -------- |
124 | * Added the Qtopia 1.7 SDK macros for quick-apps to easa compilation of 3rd party apps against our headers (mickeyl) | 125 | * Added the Qtopia 1.7 SDK macros for quick-apps to easa compilation of 3rd party apps against our headers (mickeyl) |
125 | * You can now use the Opie build system in combination with a OpenEmbedded staging area which makes a nice cross development environment (mickeyl) | 126 | * You can now use the Opie build system in combination with a OpenEmbedded staging area which makes a nice cross development environment (mickeyl) |
126 | * Made Opie compilable with Qt/Embedded 2.3.10 (ar) | 127 | * Made Opie compilable with Qt/Embedded 2.3.10 (ar) |
127 | * Changed Launcher to get default orientation from ODevice w/ QWS_DISPLAY overriding (mickeyl) | 128 | * Changed Launcher to get default orientation from ODevice w/ QWS_DISPLAY overriding (mickeyl) |
128 | * Build tree cleanups (mickeyl) | 129 | * Build tree cleanups (mickeyl) |
129 | 130 | ||
130 | 2004-11-26Opie 1.1.8 | 131 | 2004-11-26Opie 1.1.8 |
131 | 132 | ||
132 | New Features | 133 | New Features |
133 | ------------ | 134 | ------------ |
134 | * PackageManager supports installation of local ipkg files (drw) | 135 | * PackageManager supports installation of local ipkg files (drw) |
135 | * PackageManager supports linking of applications to root (drw) | 136 | * PackageManager supports linking of applications to root (drw) |
136 | * PackageManager supports src/gz feeds (drw,wimpie) | 137 | * PackageManager supports src/gz feeds (drw,wimpie) |
137 | * Added a syslog information tab to sysinfo (mickeyl) | 138 | * Added a syslog information tab to sysinfo (mickeyl) |
138 | * Added new, more consistent, PIM icons + a GIMP teplate (ar) | 139 | * Added new, more consistent, PIM icons + a GIMP teplate (ar) |
139 | 140 | ||
140 | Fixed Bugs | 141 | Fixed Bugs |
141 | ---------- | 142 | ---------- |
142 | * #1017 - Tetrix doesn't display correctly for high resolution screens (drw) | 143 | * #1017 - Tetrix doesn't display correctly for high resolution screens (drw) |
diff --git a/noncore/apps/opie-console/emulation_handler.cpp b/noncore/apps/opie-console/emulation_handler.cpp index 986ae8d..2087f57 100644 --- a/noncore/apps/opie-console/emulation_handler.cpp +++ b/noncore/apps/opie-console/emulation_handler.cpp | |||
@@ -1,180 +1,194 @@ | |||
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 */ | ||
8 | #include <qpe/config.h> | ||
9 | |||
10 | /* QT */ | ||
7 | #include <qfile.h> | 11 | #include <qfile.h> |
8 | #include <qtextstream.h> | 12 | #include <qtextstream.h> |
9 | 13 | ||
10 | EmulationHandler::EmulationHandler( const Profile& prof, QWidget* parent,const char* name ) | 14 | EmulationHandler::EmulationHandler( const Profile& prof, QWidget* parent,const char* name ) |
11 | : QObject(0, name ) | 15 | : QObject(0, name ) |
12 | { | 16 | { |
13 | m_teWid = new TEWidget( parent, "TerminalMain"); | 17 | m_teWid = new TEWidget( parent, "TerminalMain"); |
14 | // 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) |
15 | // use setWrapAt(80) for normal console with scrollbar | 19 | // use setWrapAt(80) for normal console with scrollbar |
16 | setWrap(prof.readNumEntry("Wrap", 80) ? 0 : 80); | 20 | setWrap(prof.readNumEntry("Wrap", 80) ? 0 : 80); |
17 | m_teWid->setMinimumSize(150, 70 ); | 21 | m_teWid->setMinimumSize(150, 70 ); |
18 | m_script = 0; | 22 | m_script = 0; |
19 | m_log = 0; | 23 | m_log = 0; |
20 | parent->resize( m_teWid->calcSize(80, 24 ) ); | 24 | parent->resize( m_teWid->calcSize(80, 24 ) ); |
21 | m_teEmu = new TEmuVt102(m_teWid ); | 25 | m_teEmu = new TEmuVt102(m_teWid ); |
22 | 26 | ||
23 | connect(m_teEmu,SIGNAL(ImageSizeChanged(int,int) ), | 27 | connect(m_teEmu,SIGNAL(ImageSizeChanged(int,int) ), |
24 | this, SIGNAL(changeSize(int,int) ) ); | 28 | this, SIGNAL(changeSize(int,int) ) ); |
25 | connect(m_teEmu, SIGNAL(sndBlock(const char*,int) ), | 29 | connect(m_teEmu, SIGNAL(sndBlock(const char*,int) ), |
26 | this, SLOT(recvEmulation(const char*,int) ) ); | 30 | this, SLOT(recvEmulation(const char*,int) ) ); |
27 | m_teEmu->setConnect( true ); | 31 | m_teEmu->setConnect( true ); |
28 | m_teEmu->setHistory( TRUE ); | 32 | m_teEmu->setHistory( TRUE ); |
29 | load( prof ); | 33 | load( prof ); |
30 | 34 | ||
31 | 35 | ||
32 | 36 | ||
33 | } | 37 | } |
34 | TEmulation* EmulationHandler::emulation() { | 38 | TEmulation* EmulationHandler::emulation() { |
35 | return m_teEmu; | 39 | return m_teEmu; |
36 | } | 40 | } |
37 | EmulationHandler::~EmulationHandler() { | 41 | EmulationHandler::~EmulationHandler() { |
38 | if (isRecording()) | 42 | if (isRecording()) |
39 | clearScript(); | 43 | clearScript(); |
40 | delete m_teEmu; | 44 | delete m_teEmu; |
41 | delete m_teWid; | 45 | delete m_teWid; |
42 | delete m_log; | 46 | delete m_log; |
43 | } | 47 | } |
44 | 48 | ||
45 | void EmulationHandler::load( const Profile& prof) { | 49 | void EmulationHandler::load( const Profile& prof) { |
46 | 50 | ||
47 | // m_teWid->setVTFont( font( prof.readNumEntry("Font") ) ); | 51 | // try to read the fontconfig from the profile |
48 | QFont font( prof.readEntry("Font"), prof.readNumEntry( "FontSize" ), QFont::Normal ); | 52 | QString aFont = prof.readEntry( "Font" ); |
53 | int aFontSize = prof.readNumEntry( "FontSize" ); | ||
54 | // use defaults from qpe.conf if no profile yet | ||
55 | if ( ( aFontSize == -1 ) || ( aFont == QString::null ) ) | ||
56 | { | ||
57 | Config c( "qpe" ); | ||
58 | c.setGroup( "Appearance" ); | ||
59 | aFont = c.readEntry( "FixedFontFamily", "Fixed" ); | ||
60 | aFontSize = c.readNumEntry( "FixedFontSize", 7 ); | ||
61 | } | ||
62 | QFont font( aFont, aFontSize ); | ||
49 | font.setFixedPitch( TRUE ); | 63 | font.setFixedPitch( TRUE ); |
50 | m_teWid->setVTFont( font ); | 64 | m_teWid->setVTFont( font ); |
51 | 65 | ||
52 | int num = prof.readNumEntry("Color"); | 66 | int num = prof.readNumEntry("Color", 0); |
53 | setColor( foreColor(num), backColor(num) ); | 67 | setColor( foreColor(num), backColor(num) ); |
54 | m_teWid->setBackgroundColor(backColor(num) ); | 68 | m_teWid->setBackgroundColor(backColor(num) ); |
55 | 69 | ||
56 | int term = prof.readNumEntry("Terminal", 0) ; | 70 | int term = prof.readNumEntry("Terminal", 0) ; |
57 | switch(term) { | 71 | switch(term) { |
58 | default: | 72 | default: |
59 | case Profile::VT102: | 73 | case Profile::VT102: |
60 | case Profile::VT100: | 74 | case Profile::VT100: |
61 | m_teEmu->setKeytrans("vt100.keytab"); | 75 | m_teEmu->setKeytrans("vt100.keytab"); |
62 | break; | 76 | break; |
63 | case Profile::Linux: | 77 | case Profile::Linux: |
64 | m_teEmu->setKeytrans("linux.keytab"); | 78 | m_teEmu->setKeytrans("linux.keytab"); |
65 | break; | 79 | break; |
66 | case Profile::XTerm: | 80 | case Profile::XTerm: |
67 | m_teEmu->setKeytrans("default.Keytab"); | 81 | m_teEmu->setKeytrans("default.Keytab"); |
68 | break; | 82 | break; |
69 | } | 83 | } |
70 | } | 84 | } |
71 | void EmulationHandler::recv( const QByteArray& ar) { | 85 | void EmulationHandler::recv( const QByteArray& ar) { |
72 | m_teEmu->onRcvBlock(ar.data(), ar.count() ); | 86 | m_teEmu->onRcvBlock(ar.data(), ar.count() ); |
73 | if ( isLogging() ) { | 87 | if ( isLogging() ) { |
74 | m_log->append( ar ); | 88 | m_log->append( ar ); |
75 | } | 89 | } |
76 | } | 90 | } |
77 | 91 | ||
78 | void EmulationHandler::recvEmulation(const char* src, int len ) { | 92 | void EmulationHandler::recvEmulation(const char* src, int len ) { |
79 | QByteArray ar(len); | 93 | QByteArray ar(len); |
80 | 94 | ||
81 | memcpy(ar.data(), src, sizeof(char) * len ); | 95 | memcpy(ar.data(), src, sizeof(char) * len ); |
82 | if (isRecording()) | 96 | if (isRecording()) |
83 | m_script->append(ar); | 97 | m_script->append(ar); |
84 | emit send(ar); | 98 | emit send(ar); |
85 | } | 99 | } |
86 | 100 | ||
87 | 101 | ||
88 | QWidget* EmulationHandler::widget() { | 102 | QWidget* EmulationHandler::widget() { |
89 | return m_teWid; | 103 | return m_teWid; |
90 | } | 104 | } |
91 | /* | 105 | /* |
92 | * allocate a new table of colors | 106 | * allocate a new table of colors |
93 | */ | 107 | */ |
94 | void EmulationHandler::setColor( const QColor& fore, const QColor& back ) { | 108 | void EmulationHandler::setColor( const QColor& fore, const QColor& back ) { |
95 | ColorEntry table[TABLE_COLORS]; | 109 | ColorEntry table[TABLE_COLORS]; |
96 | const ColorEntry *defaultCt = m_teWid->getdefaultColorTable(); | 110 | const ColorEntry *defaultCt = m_teWid->getdefaultColorTable(); |
97 | 111 | ||
98 | for (int i = 0; i < TABLE_COLORS; i++ ) { | 112 | for (int i = 0; i < TABLE_COLORS; i++ ) { |
99 | if ( i == 0 || i == 10 ) { | 113 | if ( i == 0 || i == 10 ) { |
100 | table[i].color = fore; | 114 | table[i].color = fore; |
101 | }else if ( i == 1 || i == 11 ) { | 115 | }else if ( i == 1 || i == 11 ) { |
102 | table[i].color = back; | 116 | table[i].color = back; |
103 | table[i].transparent = 0; | 117 | table[i].transparent = 0; |
104 | }else { | 118 | }else { |
105 | table[i].color = defaultCt[i].color; | 119 | table[i].color = defaultCt[i].color; |
106 | } | 120 | } |
107 | } | 121 | } |
108 | m_teWid->setColorTable(table ); | 122 | m_teWid->setColorTable(table ); |
109 | m_teWid->update(); | 123 | m_teWid->update(); |
110 | } | 124 | } |
111 | QFont EmulationHandler::font( int id ) { | 125 | QFont EmulationHandler::font( int id ) { |
112 | QString name; | 126 | QString name; |
113 | int size = 0; | 127 | int size = 0; |
114 | switch(id ) { | 128 | switch(id ) { |
115 | default: // fall through | 129 | default: // fall through |
116 | case 0: | 130 | case 0: |
117 | name = QString::fromLatin1("Micro"); | 131 | name = QString::fromLatin1("Micro"); |
118 | size = 4; | 132 | size = 4; |
119 | break; | 133 | break; |
120 | case 1: | 134 | case 1: |
121 | name = QString::fromLatin1("Fixed"); | 135 | name = QString::fromLatin1("Fixed"); |
122 | size = 7; | 136 | size = 7; |
123 | break; | 137 | break; |
124 | case 2: | 138 | case 2: |
125 | name = QString::fromLatin1("Fixed"); | 139 | name = QString::fromLatin1("Fixed"); |
126 | size = 12; | 140 | size = 12; |
127 | break; | 141 | break; |
128 | } | 142 | } |
129 | QFont font(name, size, QFont::Normal ); | 143 | QFont font(name, size, QFont::Normal ); |
130 | font.setFixedPitch(TRUE ); | 144 | font.setFixedPitch(TRUE ); |
131 | return font; | 145 | return font; |
132 | } | 146 | } |
133 | QColor EmulationHandler::foreColor(int col) { | 147 | QColor EmulationHandler::foreColor(int col) { |
134 | QColor co; | 148 | QColor co; |
135 | /* we need to switch it */ | 149 | /* we need to switch it */ |
136 | switch( col ) { | 150 | switch( col ) { |
137 | default: | 151 | default: |
138 | case Profile::White: | 152 | case Profile::White: |
139 | /* color is black */ | 153 | /* color is black */ |
140 | co = Qt::white; | 154 | co = Qt::white; |
141 | break; | 155 | break; |
142 | case Profile::Black: | 156 | case Profile::Black: |
143 | co = Qt::black; | 157 | co = Qt::black; |
144 | break; | 158 | break; |
145 | case Profile::Green: | 159 | case Profile::Green: |
146 | co = Qt::green; | 160 | co = Qt::green; |
147 | break; | 161 | break; |
148 | case Profile::Orange: | 162 | case Profile::Orange: |
149 | co.setRgb( 231, 184, 98 ); | 163 | co.setRgb( 231, 184, 98 ); |
150 | break; | 164 | break; |
151 | } | 165 | } |
152 | 166 | ||
153 | return co; | 167 | return co; |
154 | } | 168 | } |
155 | QColor EmulationHandler::backColor(int col ) { | 169 | QColor EmulationHandler::backColor(int col ) { |
156 | QColor co; | 170 | QColor co; |
157 | /* we need to switch it */ | 171 | /* we need to switch it */ |
158 | switch( col ) { | 172 | switch( col ) { |
159 | default: | 173 | default: |
160 | case Profile::White: | 174 | case Profile::White: |
161 | /* color is white */ | 175 | /* color is white */ |
162 | co = Qt::black; | 176 | co = Qt::black; |
163 | break; | 177 | break; |
164 | case Profile::Black: | 178 | case Profile::Black: |
165 | co = Qt::white; | 179 | co = Qt::white; |
166 | break; | 180 | break; |
167 | case Profile::Green: | 181 | case Profile::Green: |
168 | co = Qt::black; | 182 | co = Qt::black; |
169 | break; | 183 | break; |
170 | case Profile::Orange: | 184 | case Profile::Orange: |
171 | co = Qt::black; | 185 | co = Qt::black; |
172 | break; | 186 | break; |
173 | } | 187 | } |
174 | 188 | ||
175 | return co; | 189 | return co; |
176 | } | 190 | } |
177 | 191 | ||
178 | QPushButton* EmulationHandler::cornerButton() { | 192 | QPushButton* EmulationHandler::cornerButton() { |
179 | return m_teWid->cornerButton(); | 193 | return m_teWid->cornerButton(); |
180 | } | 194 | } |