summaryrefslogtreecommitdiff
path: root/library/qpeapplication.cpp
authoreilers <eilers>2003-08-08 14:45:49 (UTC)
committer eilers <eilers>2003-08-08 14:45:49 (UTC)
commit14d394e6c107b037a09a31a92605034fe50f7813 (patch) (side-by-side diff)
tree800699cf4dc9681c3eb023340634dd6a15fd04c8 /library/qpeapplication.cpp
parentdbc6ea35f5535a1f69deb7ebbafc0f721721dbf2 (diff)
downloadopie-14d394e6c107b037a09a31a92605034fe50f7813.zip
opie-14d394e6c107b037a09a31a92605034fe50f7813.tar.gz
opie-14d394e6c107b037a09a31a92605034fe50f7813.tar.bz2
Merged branches from BRANCH_1_0
Diffstat (limited to 'library/qpeapplication.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpeapplication.cpp56
1 files changed, 35 insertions, 21 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index 619b4cb..4e08a1f 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -270,11 +270,14 @@ public:
class ResourceMimeFactory : public QMimeSourceFactory
{
public:
- ResourceMimeFactory()
+ ResourceMimeFactory() : resImage( 0 )
{
setFilePath( Global::helpPath() );
setExtensionType( "html", "text/html;charset=UTF-8" );
}
+ ~ResourceMimeFactory() {
+ delete resImage;
+ }
const QMimeSource* data( const QString& abs_name ) const
{
@@ -288,13 +291,18 @@ public:
if ( dot >= 0 )
name = name.left( dot );
QImage img = Resource::loadImage( name );
- if ( !img.isNull() )
- r = new QImageDrag( img );
+ if ( !img.isNull() ) {
+ delete resImage;
+ resImage = new QImageDrag( img );
+ r = resImage;
+ }
}
while ( !r && sl > 0 );
}
return r;
}
+private:
+ mutable QImageDrag *resImage;
};
static int muted = 0;
@@ -983,19 +991,19 @@ void QPEApplication::applyStyle()
}
// Widget style
- QString style = config.readEntry( "Style", "Light" );
+ QString style = config.readEntry( "Style", "FlatStyle" );
// don't set a custom style
if ( nostyle & Opie::Force_Style )
- style = "Light";
+ style = "FlatStyle";
internalSetStyle ( style );
- // 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 ) );
color = config.readEntry( "HighlightedText", "#FFFFFF" );
pal.setColor( QColorGroup::HighlightedText, QColor( color ) );
@@ -1012,7 +1020,7 @@ void QPEApplication::applyStyle()
setPalette( pal, TRUE );
// Window Decoration
- QString dec = config.readEntry( "Decoration", "Qtopia" );
+ QString dec = config.readEntry( "Decoration", "Flat" );
// don't set a custom deco
if ( nostyle & Opie::Force_Decoration )
@@ -1298,18 +1306,24 @@ void QPEApplication::pidMessage( const QCString& msg, const QByteArray& data)
mw = d->qpe_main_widget;
if ( mw )
Global::setDocument( mw, doc );
+ } 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
+ }
+ }
+ if ( p )
+ d->keep_running = p;
}
- else if ( msg == "nextView()" ) {
- qDebug("got nextView()");
- /*
- if ( raiseAppropriateWindow() )
- */
- emit appMessage( msg, data);
- }
- else {
- emit appMessage( msg, data);
- }
-
#endif
}