summaryrefslogtreecommitdiff
path: root/library
Side-by-side diff
Diffstat (limited to 'library') (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpeapplication.cpp9
-rw-r--r--library/qpedecoration_qws.cpp41
-rw-r--r--library/qpedecoration_qws.h2
3 files changed, 25 insertions, 27 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index a54fb20..c8e6e74 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -900,5 +900,5 @@ void QPEApplication::setDefaultRotation( int r )
// exported to libpreload.so
-bool opie_block_style = false;
+int opie_block_style = 0;
/*!
@@ -911,5 +911,5 @@ void QPEApplication::applyStyle()
// don't block ourselves ...
- opie_block_style = false;
+ opie_block_style = 0;
@@ -976,4 +976,6 @@ void QPEApplication::applyStyle()
dec = "";
+ //qDebug ( "Setting Deco: %s -- old %s (%d)", dec.latin1(), d-> decorationName.latin1(), nostyle);
+
if ( dec != d->decorationName ) {
qwsSetDecoration( new QPEDecoration( dec ) );
@@ -994,5 +996,6 @@ void QPEApplication::applyStyle()
// 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;
}
diff --git a/library/qpedecoration_qws.cpp b/library/qpedecoration_qws.cpp
index 6221f5b..5e0c32a 100644
--- a/library/qpedecoration_qws.cpp
+++ b/library/qpedecoration_qws.cpp
@@ -481,4 +481,5 @@ private:
static WindowDecorationInterface *wdiface = 0;
static QLibrary *wdlib = 0;
+static QString libname;
//===========================================================================
@@ -487,27 +488,5 @@ QPEDecoration::QPEDecoration()
: QWSDefaultDecoration()
{
- if ( wdlib ) {
- wdiface->release();
- wdlib->unload();
- delete wdlib;
- wdlib = 0;
- } else {
- delete wdiface;
- }
- wdiface = new DefaultWindowDecoration;
-
- helpFile = QString(qApp->argv()[0]) + ".html";
- QStringList helpPath = Global::helpPath();
- helpExists = FALSE;
- for (QStringList::ConstIterator it=helpPath.begin(); it!=helpPath.end() && !helpExists; ++it) {
- helpExists = QFile::exists( *it + "/" + helpFile );
- qDebug ( "Checking %s/%s for help: %d", (*it).latin1(), helpFile.latin1(),helpExists);
- }
- qpeManager = new QPEManager( this );
-
- // for backward compatibility:
- imageOk = *okImage ( 15 );
- imageClose = *closeImage ( 15 );
- imageHelp = *helpImage ( 15 );
+ init ( libname );
}
@@ -515,4 +494,11 @@ QPEDecoration::QPEDecoration( const QString &plugin )
: QWSDefaultDecoration()
{
+ init ( plugin );
+}
+
+void QPEDecoration::init ( const QString &plugin )
+{
+ libname = plugin;
+
if ( wdlib ) {
wdiface->release();
@@ -523,4 +509,5 @@ QPEDecoration::QPEDecoration( const QString &plugin )
delete wdiface;
}
+
WindowDecorationInterface *iface = 0;
QString path = QPEApplication::qpeDir() + "/plugins/decorations";
@@ -539,6 +526,12 @@ QPEDecoration::QPEDecoration( const QString &plugin )
for (QStringList::ConstIterator it=helpPath.begin(); it!=helpPath.end() && !helpExists; ++it) {
helpExists = QFile::exists( *it + "/" + helpFile );
- qDebug ( "Checking %s/%s for help: %d", (*it).latin1(), helpFile.latin1(),helpExists); }
+ //qDebug ( "Checking %s/%s for help: %d", (*it).latin1(), helpFile.latin1(),helpExists);
+ }
qpeManager = new QPEManager( this );
+
+ // Qtopia 1.5 compatibility
+ imageOk = *okImage ( 15 );
+ imageClose = *closeImage ( 15 );
+ imageHelp = *helpImage ( 15 );
}
diff --git a/library/qpedecoration_qws.h b/library/qpedecoration_qws.h
index 691c6f6..6628ba2 100644
--- a/library/qpedecoration_qws.h
+++ b/library/qpedecoration_qws.h
@@ -64,4 +64,6 @@ private:
void windowData( const QWidget *w, WindowDecorationInterface::WindowData &wd ) const;
+ void init ( const QString & );
+
protected:
QImage imageOk;