summaryrefslogtreecommitdiff
path: root/library/qpeapplication.cpp
authorsandman <sandman>2002-11-25 22:12:18 (UTC)
committer sandman <sandman>2002-11-25 22:12:18 (UTC)
commit4e6b2585987290f874697cbec7c289b4df29f82b (patch) (side-by-side diff)
treee19415ef5374ffa3730380813298111e24711590 /library/qpeapplication.cpp
parent7bd8ef9197506897d3a5287a013934f89658d60a (diff)
downloadopie-4e6b2585987290f874697cbec7c289b4df29f82b.zip
opie-4e6b2585987290f874697cbec7c289b4df29f82b.tar.gz
opie-4e6b2585987290f874697cbec7c289b4df29f82b.tar.bz2
Some changes to the QPEDecoration c'tor internals:
Since the current deco plugin is unloaded, when a new Deco is created via new (even if this new deco is never used or deleted immediatly afer- wards), we have to remember the plugin name, in case someone calls the default c'tor (without supplying a plugin name)
Diffstat (limited to 'library/qpeapplication.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpeapplication.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index a54fb20..c8e6e74 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -894,28 +894,28 @@ void QPEApplication::setDefaultRotation( int r )
e << r;
}
#endif
}
}
// exported to libpreload.so
-bool opie_block_style = false;
+int opie_block_style = 0;
/*!
\internal
*/
void QPEApplication::applyStyle()
{
Config config( "qpe" );
config.setGroup( "Appearance" );
// don't block ourselves ...
- opie_block_style = false;
+ opie_block_style = 0;
static QString appname;
if ( appname. isNull ( )) {
char src [32];
char dst [PATH_MAX + 1];
::sprintf ( src, "/proc/%d/exe", ::getpid ( ));
@@ -970,16 +970,18 @@ void QPEApplication::applyStyle()
// Window Decoration
QString dec = config.readEntry( "Decoration", "Qtopia" );
// don't set a custom deco
if ( nostyle & 0x04 )
dec = "";
+ //qDebug ( "Setting Deco: %s -- old %s (%d)", dec.latin1(), d-> decorationName.latin1(), nostyle);
+
if ( dec != d->decorationName ) {
qwsSetDecoration( new QPEDecoration( dec ) );
d->decorationName = dec;
}
// Font
QString ff = config.readEntry( "FontFamily", font().family() );
int fs = config.readNumEntry( "FontSize", font().pointSize() );
@@ -988,17 +990,18 @@ void QPEApplication::applyStyle()
if ( nostyle & 0x02 ) {
ff = "Helvetica";
fs = 10;
}
setFont( QFont(ff, fs) );
// revert to global blocking policy ...
- opie_block_style = config. readBoolEntry ( "ForceStyle", false );
+ opie_block_style = config. readBoolEntry ( "ForceStyle", false ) ? 0xff : 0x00;
+ opie_block_style -= nostyle;
}
void QPEApplication::systemMessage( const QCString& msg, const QByteArray& data )
{
#ifdef Q_WS_QWS
QDataStream stream( data, IO_ReadOnly );
if ( msg == "applyStyle()" ) {
applyStyle();