summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/audiowidget.cpp
authorllornkcor <llornkcor>2003-02-25 23:38:02 (UTC)
committer llornkcor <llornkcor>2003-02-25 23:38:02 (UTC)
commit94cb45ce60cc00d719a802baeb8acf74f42150d2 (patch) (unidiff)
tree27f70d60579a5301f04986e56cf4bfa2067dad9c /core/multimedia/opieplayer/audiowidget.cpp
parentbde9ed97c92b6f7eefa8a66d9f58aa4c78127733 (diff)
downloadopie-94cb45ce60cc00d719a802baeb8acf74f42150d2.zip
opie-94cb45ce60cc00d719a802baeb8acf74f42150d2.tar.gz
opie-94cb45ce60cc00d719a802baeb8acf74f42150d2.tar.bz2
remove libmad depending on libmpeg3, and fix crash when skin not found
Diffstat (limited to 'core/multimedia/opieplayer/audiowidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/audiowidget.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/core/multimedia/opieplayer/audiowidget.cpp b/core/multimedia/opieplayer/audiowidget.cpp
index 9a55608..3dfe182 100644
--- a/core/multimedia/opieplayer/audiowidget.cpp
+++ b/core/multimedia/opieplayer/audiowidget.cpp
@@ -24,13 +24,13 @@
24#include <qwidget.h> 24#include <qwidget.h>
25#include <qpixmap.h> 25#include <qpixmap.h>
26#include <qbutton.h> 26#include <qbutton.h>
27#include <qpainter.h> 27#include <qpainter.h>
28#include <qframe.h> 28#include <qframe.h>
29#include <qlayout.h> 29#include <qlayout.h>
30 30#include <qdir.h>
31#include "audiowidget.h" 31#include "audiowidget.h"
32#include "mediaplayerstate.h" 32#include "mediaplayerstate.h"
33 33
34#include <stdlib.h> 34#include <stdlib.h>
35#include <stdio.h> 35#include <stdio.h>
36 36
@@ -78,18 +78,22 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) :
78 setCaption( tr("OpiePlayer") ); 78 setCaption( tr("OpiePlayer") );
79 qDebug("<<<<<audioWidget"); 79 qDebug("<<<<<audioWidget");
80 80
81 Config cfg("OpiePlayer"); 81 Config cfg("OpiePlayer");
82 cfg.setGroup("Options"); 82 cfg.setGroup("Options");
83 skin = cfg.readEntry("Skin","default"); 83 skin = cfg.readEntry("Skin","default");
84 //skin = "scaleTest"; 84 //skin = "scaleTest";
85// color of background, frame, degree of transparency 85// color of background, frame, degree of transparency
86 86
87// QString skinPath = "opieplayer/skins/" + skin; 87// QString skinPath = "opieplayer/skins/" + skin;
88 QString skinPath = "opieplayer2/skins/" + skin; 88 QString skinPath;
89 qDebug("skin path "+skinPath); 89 skinPath = "opieplayer2/skins/" + skin;
90 if(!QDir(skinPath).exists())
91 skinPath = "opieplayer2/skins/default";
92
93 qDebug("skin path " + skinPath);
90 94
91 pixBg = new QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) ); 95 pixBg = new QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) );
92 imgUp = new QImage( Resource::loadImage( QString("%1/skin_up").arg(skinPath) ) ); 96 imgUp = new QImage( Resource::loadImage( QString("%1/skin_up").arg(skinPath) ) );
93 imgDn = new QImage( Resource::loadImage( QString("%1/skin_down").arg(skinPath) ) ); 97 imgDn = new QImage( Resource::loadImage( QString("%1/skin_down").arg(skinPath) ) );
94 98
95 imgButtonMask = new QImage( imgUp->width(), imgUp->height(), 8, 255 ); 99 imgButtonMask = new QImage( imgUp->width(), imgUp->height(), 8, 255 );