summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp
index 2e9553f..5f4159c 100644
--- a/noncore/multimedia/opieplayer2/playlistwidget.cpp
+++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp
@@ -929,48 +929,53 @@ void PlayListWidget::keyReleaseEvent( QKeyEvent *e ) {
void PlayListWidget::pmViewActivated(int index) {
// odebug << "" << index << "" << oendl;
switch(index) {
case -16:
{
mediaPlayerState->toggleFullscreen();
bool b=mediaPlayerState->isFullscreen();
pmView->setItemChecked( index, b);
Config cfg( "OpiePlayer" );
cfg.writeEntry( "FullScreen", b );
}
break;
};
}
void PlayListWidget::populateSkinsMenu() {
int item = 0;
defaultSkinIndex = 0;
QString skinName;
Config cfg( "OpiePlayer" );
cfg.setGroup("Options" );
QString skin = cfg.readEntry( "Skin", "default" );
QDir skinsDir( QPEApplication::qpeDir() + "pics/opieplayer2/skins" );
+ if(!skinsDir.exists()) {
+ QMessageBox::critical( 0, tr("Opieplayer Error"),
+ tr("<p><b>Opieplayer2 skin not found!</b></p><p>Please install an opieplayer2 skin package.</p>") );
+ exit(1) ;
+ }
skinsDir.setFilter( QDir::Dirs );
skinsDir.setSorting(QDir::Name );
const QFileInfoList *skinslist = skinsDir.entryInfoList();
QFileInfoListIterator it( *skinslist );
QFileInfo *fi;
while ( ( fi = it.current() ) ) {
skinName = fi->fileName();
// odebug << fi->fileName() << oendl;
if( skinName != "." && skinName != ".." && skinName !="CVS" ) {
item = skinsMenu->insertItem( fi->fileName() ) ;
}
if( skinName == "default" ) {
defaultSkinIndex = item;
}
if( skinName == skin ) {
skinsMenu->setItemChecked( item, TRUE );
}
++it;
}
}
void PlayListWidget::skinsMenuActivated( int item ) {
for(unsigned int i = defaultSkinIndex; i > defaultSkinIndex - skinsMenu->count(); i-- ) {
skinsMenu->setItemChecked( i, FALSE );