summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2004-10-13 10:07:38 (UTC)
committer llornkcor <llornkcor>2004-10-13 10:07:38 (UTC)
commitc931e96eb4bf7df64bca49c2343f2203bac637ba (patch) (unidiff)
tree959046acd9c989be2375df040f32ad0c83599b28
parent8289f6700e239ddf5242216c09cca9d724c17754 (diff)
downloadopie-c931e96eb4bf7df64bca49c2343f2203bac637ba.zip
opie-c931e96eb4bf7df64bca49c2343f2203bac637ba.tar.gz
opie-c931e96eb4bf7df64bca49c2343f2203bac637ba.tar.bz2
exit if no skin is found
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/main.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/core/multimedia/opieplayer/main.cpp b/core/multimedia/opieplayer/main.cpp
index 32dc1d5..4a7ac52 100644
--- a/core/multimedia/opieplayer/main.cpp
+++ b/core/multimedia/opieplayer/main.cpp
@@ -12,16 +12,19 @@
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#include <qmessagebox.h>
21
22
20#include "mediaplayerstate.h" 23#include "mediaplayerstate.h"
21#include "playlistwidget.h" 24#include "playlistwidget.h"
22#include "audiowidget.h" 25#include "audiowidget.h"
23#include "videowidget.h" 26#include "videowidget.h"
24#include "loopcontrol.h" 27#include "loopcontrol.h"
25#include "mediaplayer.h" 28#include "mediaplayer.h"
26 29
27MediaPlayerState *mediaPlayerState; 30MediaPlayerState *mediaPlayerState;
@@ -29,27 +32,33 @@ PlayListWidget *playList;
29AudioWidget *audioUI; 32AudioWidget *audioUI;
30VideoWidget *videoUI; 33VideoWidget *videoUI;
31LoopControl *loopControl; 34LoopControl *loopControl;
32 35
33 36
34int main(int argc, char **argv) { 37int main(int argc, char **argv) {
35 QPEApplication a(argc,argv); 38 QPEApplication a(argc,argv);
36 39
40 if(!QDir(QString(getenv("OPIEDIR")) +"/pics/opieplayer2/skins/").exists()) {
41 QMessageBox::critical( 0, "Opieplayer Error", "<p>opieplayer2 skin not found. Please install an opieplayer2 skin.</p>" );
42
43 return -1;
44 }
45
37 MediaPlayerState st( 0, "mediaPlayerState" ); 46 MediaPlayerState st( 0, "mediaPlayerState" );
38 mediaPlayerState = &st; 47 mediaPlayerState = &st;
39 PlayListWidget pl( 0, "playList" ); 48 PlayListWidget pl( 0, "playList" );
40 playList = &pl; 49 playList = &pl;
41 AudioWidget aw( 0, "audioUI" ); 50 AudioWidget aw( 0, "audioUI" );
42 audioUI = &aw; 51 audioUI = &aw;
43 VideoWidget vw( 0, "videoUI" ); 52 VideoWidget vw( 0, "videoUI" );
44 videoUI = &vw; 53 videoUI = &vw;
45 LoopControl lc( 0, "loopControl" ); 54 LoopControl lc( 0, "loopControl" );
55 // qDebug("loop control created");
46 loopControl = &lc; 56 loopControl = &lc;
47 MediaPlayer mp( 0, "mediaPlayer" ); 57 MediaPlayer mp( 0, "mediaPlayer" );
48 58 // qDebug("mediaplayer created");
49// pl.setCaption( MediaPlayer::tr("OpiePlayer") ); 59// pl.setCaption( MediaPlayer::tr("OpiePlayer") );
50 a.showMainDocumentWidget(&pl); 60 a.showMainDocumentWidget(&pl);
51
52 return a.exec(); 61 return a.exec();
53} 62}
54 63
55 64