-rw-r--r-- | library/qpeapplication.cpp | 52 |
1 files changed, 33 insertions, 19 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp index 619b4cb..4e08a1f 100644 --- a/library/qpeapplication.cpp +++ b/library/qpeapplication.cpp @@ -272,3 +272,3 @@ class ResourceMimeFactory : public QMimeSourceFactory public: - ResourceMimeFactory() + ResourceMimeFactory() : resImage( 0 ) { @@ -277,2 +277,5 @@ public: } + ~ResourceMimeFactory() { + delete resImage; + } @@ -290,4 +293,7 @@ public: QImage img = Resource::loadImage( name ); - if ( !img.isNull() ) - r = new QImageDrag( img ); + if ( !img.isNull() ) { + delete resImage; + resImage = new QImageDrag( img ); + r = resImage; + } } @@ -297,2 +303,4 @@ public: } +private: + mutable QImageDrag *resImage; }; @@ -985,3 +993,3 @@ void QPEApplication::applyStyle() // Widget style - QString style = config.readEntry( "Style", "Light" ); + QString style = config.readEntry( "Style", "FlatStyle" ); @@ -989,3 +997,3 @@ void QPEApplication::applyStyle() if ( nostyle & Opie::Force_Style ) - style = "Light"; + style = "FlatStyle"; @@ -993,7 +1001,7 @@ void QPEApplication::applyStyle() - // Colors - QColor bgcolor( config.readEntry( "Background", "#E5E1D5" ) ); - QColor btncolor( config.readEntry( "Button", "#D6CDBB" ) ); + // Colors - from /etc/colors/Liquid.scheme + QColor bgcolor( config.readEntry( "Background", "#E0E0E0" ) ); + QColor btncolor( config.readEntry( "Button", "#96c8fa" ) ); QPalette pal( btncolor, bgcolor ); - QString color = config.readEntry( "Highlight", "#800000" ); + QString color = config.readEntry( "Highlight", "#73adef" ); pal.setColor( QColorGroup::Highlight, QColor( color ) ); @@ -1014,3 +1022,3 @@ void QPEApplication::applyStyle() // Window Decoration - QString dec = config.readEntry( "Decoration", "Qtopia" ); + QString dec = config.readEntry( "Decoration", "Flat" ); @@ -1300,14 +1308,20 @@ void QPEApplication::pidMessage( const QCString& msg, const QByteArray& data) Global::setDocument( mw, doc ); - } - else if ( msg == "nextView()" ) { - qDebug("got nextView()"); - /* - if ( raiseAppropriateWindow() ) - */ + } else { + bool p = d->keep_running; + d->keep_running = FALSE; emit appMessage( msg, data); + if ( d->keep_running ) { + d->notbusysent = FALSE; + raiseAppropriateWindow(); + if ( !p ) { + // Tell the system we're still chugging along... +#ifndef QT_NO_COP + QCopEnvelope e("QPE/System", "appRaised(QString)"); + e << d->appName; +#endif } - else { - emit appMessage( msg, data); } - + if ( p ) + d->keep_running = p; + } #endif |