summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2005-06-11 12:22:30 (UTC)
committer mickeyl <mickeyl>2005-06-11 12:22:30 (UTC)
commitd13a1a3345270ea71215d421627665a40f16454c (patch) (side-by-side diff)
tree58aa21f57fd6d08547756a9e68e78282ce554568
parent9fe80ebf4fbe9b31d9f91a33e4cfc163b7236a62 (diff)
downloadopie-d13a1a3345270ea71215d421627665a40f16454c.zip
opie-d13a1a3345270ea71215d421627665a40f16454c.tar.gz
opie-d13a1a3345270ea71215d421627665a40f16454c.tar.bz2
- read default profile fixed font specs from qpe.conf, if profile doesn't exist
- fix initial background color
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--ChangeLog1
-rw-r--r--noncore/apps/opie-console/emulation_handler.cpp20
2 files changed, 18 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 4ee76e8..2828fcb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,24 +3,25 @@
New Features
------------
* OpieStumbler: Scans WiFi networks using the wireless extension scanning (skyhusker)
* Opie-Reader: Support for document formats ArriereGo and Reb, add flite output (tim,pohly)
* Opie-Networksettings: Add support for wlan-ng devices and improve WEP handling (Dirk Opfer)
* Wellenreiter: Remove Joining networks - use OpieStumbler for that (mickeyl)
* Opie-Mobilemsg has gone unsupported - it never really worked and there will be a replacement (mickeyl)
* Opie-Tabmanager has gone unsupported - it barely works and there is not much of a use of it anyway (mickeyl)
* Checkbook - added configuration option to use smaller font for checkbook transaction tab (hrw)
* ZSafe - make UI conform to Opie standards (drw)
* Today Addressbook plugin - fix configuration to show/not show birthdays, use checkboxes for selection (hrw)
+ * Opie-Console: read initial fixed font configuration from qpe.conf (mickeyl)
Fixed Bugs
----------
* #1476 - Wrong order of application entries in the O-menu (skyhusker)
* #1535 - Missing line break and unnecessary location shown with Today-Calendar plugin (deller)
* #1565 - crash-fix in odevice.cpp while scanning the distribution table (deller)
* #1614 - Make Opie-console start in $HOME instead of / (skyhusker)
* #1665 - Opie-IRC diplays the host prepended to the message when peer is using and ipv6 address (skyhusker)
* #1666 - Opie-IRC does not allow to add !channels in config as autojoin ones (skyhusker)
* #1667 - Opie-IRC does not show messages from !channel (skyhusker)
* n.a. - always show volume and wireless applet popups inside visible screen (deller)
* n.a. - scale O-Menu-Applets appropriately (mickeyl)
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,18 +1,22 @@
#include "TEmuVt102.h"
#include "profile.h"
#include "emulation_handler.h"
#include "script.h"
#include "logger.h"
+/* OPIE */
+#include <qpe/config.h>
+
+/* QT */
#include <qfile.h>
#include <qtextstream.h>
EmulationHandler::EmulationHandler( const Profile& prof, QWidget* parent,const char* name )
: QObject(0, name )
{
m_teWid = new TEWidget( parent, "TerminalMain");
// use setWrapAt(0) for classic behaviour (wrap at screen width, no scrollbar)
// use setWrapAt(80) for normal console with scrollbar
setWrap(prof.readNumEntry("Wrap", 80) ? 0 : 80);
m_teWid->setMinimumSize(150, 70 );
m_script = 0;
@@ -35,30 +39,40 @@ TEmulation* EmulationHandler::emulation() {
return m_teEmu;
}
EmulationHandler::~EmulationHandler() {
if (isRecording())
clearScript();
delete m_teEmu;
delete m_teWid;
delete m_log;
}
void EmulationHandler::load( const Profile& prof) {
-// m_teWid->setVTFont( font( prof.readNumEntry("Font") ) );
- QFont font( prof.readEntry("Font"), prof.readNumEntry( "FontSize" ), QFont::Normal );
+ // try to read the fontconfig from the profile
+ QString aFont = prof.readEntry( "Font" );
+ int aFontSize = prof.readNumEntry( "FontSize" );
+ // use defaults from qpe.conf if no profile yet
+ if ( ( aFontSize == -1 ) || ( aFont == QString::null ) )
+ {
+ Config c( "qpe" );
+ c.setGroup( "Appearance" );
+ aFont = c.readEntry( "FixedFontFamily", "Fixed" );
+ aFontSize = c.readNumEntry( "FixedFontSize", 7 );
+ }
+ QFont font( aFont, aFontSize );
font.setFixedPitch( TRUE );
m_teWid->setVTFont( font );
- int num = prof.readNumEntry("Color");
+ int num = prof.readNumEntry("Color", 0);
setColor( foreColor(num), backColor(num) );
m_teWid->setBackgroundColor(backColor(num) );
int term = prof.readNumEntry("Terminal", 0) ;
switch(term) {
default:
case Profile::VT102:
case Profile::VT100:
m_teEmu->setKeytrans("vt100.keytab");
break;
case Profile::Linux:
m_teEmu->setKeytrans("linux.keytab");