summaryrefslogtreecommitdiff
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
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 (more/less context) (show 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
@@ -901,3 +901,3 @@ void QPEApplication::setDefaultRotation( int r )
// exported to libpreload.so
-bool opie_block_style = false;
+int opie_block_style = 0;
@@ -912,3 +912,3 @@ void QPEApplication::applyStyle()
// don't block ourselves ...
- opie_block_style = false;
+ opie_block_style = 0;
@@ -977,2 +977,4 @@ void QPEApplication::applyStyle()
+ //qDebug ( "Setting Deco: %s -- old %s (%d)", dec.latin1(), d-> decorationName.latin1(), nostyle);
+
if ( dec != d->decorationName ) {
@@ -995,3 +997,4 @@ 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
@@ -482,2 +482,3 @@ static WindowDecorationInterface *wdiface = 0;
static QLibrary *wdlib = 0;
+static QString libname;
@@ -488,25 +489,3 @@ QPEDecoration::QPEDecoration()
{
- 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 );
}
@@ -516,2 +495,9 @@ QPEDecoration::QPEDecoration( const QString &plugin )
{
+ init ( plugin );
+}
+
+void QPEDecoration::init ( const QString &plugin )
+{
+ libname = plugin;
+
if ( wdlib ) {
@@ -524,2 +510,3 @@ QPEDecoration::QPEDecoration( const QString &plugin )
}
+
WindowDecorationInterface *iface = 0;
@@ -540,4 +527,10 @@ QPEDecoration::QPEDecoration( const QString &plugin )
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
@@ -65,2 +65,4 @@ private:
+ void init ( const QString & );
+
protected: