summaryrefslogtreecommitdiff
Side-by-side diff
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
@@ -11,8 +11,9 @@
* 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)
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
@@ -3,8 +3,12 @@
#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 )
@@ -43,14 +47,24 @@ EmulationHandler::~EmulationHandler() {
}
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) ;