author | zecke <zecke> | 2004-10-16 00:01:01 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-10-16 00:01:01 (UTC) |
commit | df14f647ff1a60ca82e0fa9bd91458be146153b8 (patch) (unidiff) | |
tree | 4859961352851a4392e1442f2080c15bff8ad7bc /core/multimedia/opieplayer | |
parent | 419f9710c488f56a7a117eb1529970d3371e0094 (diff) | |
download | opie-df14f647ff1a60ca82e0fa9bd91458be146153b8.zip opie-df14f647ff1a60ca82e0fa9bd91458be146153b8.tar.gz opie-df14f647ff1a60ca82e0fa9bd91458be146153b8.tar.bz2 |
Replace QPEApplication::qpeDir() + "/ with
QPEApplication::qpeDir() + "
as it is guranteed that qpeDir() will have '/' as the last
charachter
-rw-r--r-- | core/multimedia/opieplayer/mediaplayerstate.cpp | 2 | ||||
-rw-r--r-- | core/multimedia/opieplayer/playlistwidget.cpp | 2 | ||||
-rw-r--r-- | core/multimedia/opieplayer/videowidget.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/core/multimedia/opieplayer/mediaplayerstate.cpp b/core/multimedia/opieplayer/mediaplayerstate.cpp index b700cd1..8b0fbbc 100644 --- a/core/multimedia/opieplayer/mediaplayerstate.cpp +++ b/core/multimedia/opieplayer/mediaplayerstate.cpp | |||
@@ -126,33 +126,33 @@ MediaPlayerDecoder *MediaPlayerState::libMpeg3Decoder() { | |||
126 | // ### hack to get true sample count | 126 | // ### hack to get true sample count |
127 | // MediaPlayerDecoder *MediaPlayerState::libWavDecoder() { | 127 | // MediaPlayerDecoder *MediaPlayerState::libWavDecoder() { |
128 | // return libwavdecoder; | 128 | // return libwavdecoder; |
129 | // } | 129 | // } |
130 | 130 | ||
131 | void MediaPlayerState::loadPlugins() { | 131 | void MediaPlayerState::loadPlugins() { |
132 | // odebug << "load plugins" << oendl; | 132 | // odebug << "load plugins" << oendl; |
133 | #ifndef QT_NO_COMPONENT | 133 | #ifndef QT_NO_COMPONENT |
134 | QValueList<MediaPlayerPlugin>::Iterator mit; | 134 | QValueList<MediaPlayerPlugin>::Iterator mit; |
135 | for ( mit = pluginList.begin(); mit != pluginList.end(); ++mit ) { | 135 | for ( mit = pluginList.begin(); mit != pluginList.end(); ++mit ) { |
136 | (*mit).iface->release(); | 136 | (*mit).iface->release(); |
137 | (*mit).library->unload(); | 137 | (*mit).library->unload(); |
138 | delete (*mit).library; | 138 | delete (*mit).library; |
139 | } | 139 | } |
140 | pluginList.clear(); | 140 | pluginList.clear(); |
141 | 141 | ||
142 | QString path = QPEApplication::qpeDir() + "/plugins/codecs"; | 142 | QString path = QPEApplication::qpeDir() + "plugins/codecs"; |
143 | QDir dir( path, "lib*.so" ); | 143 | QDir dir( path, "lib*.so" ); |
144 | QStringList list = dir.entryList(); | 144 | QStringList list = dir.entryList(); |
145 | QStringList::Iterator it; | 145 | QStringList::Iterator it; |
146 | for ( it = list.begin(); it != list.end(); ++it ) { | 146 | for ( it = list.begin(); it != list.end(); ++it ) { |
147 | MediaPlayerPluginInterface *iface = 0; | 147 | MediaPlayerPluginInterface *iface = 0; |
148 | QLibrary *lib = new QLibrary( path + "/" + *it ); | 148 | QLibrary *lib = new QLibrary( path + "/" + *it ); |
149 | // odebug << "querying: " << QString( path + "/" + *it ) << "" << oendl; | 149 | // odebug << "querying: " << QString( path + "/" + *it ) << "" << oendl; |
150 | 150 | ||
151 | if ( lib->queryInterface( IID_MediaPlayerPlugin, (QUnknownInterface**)&iface ) == QS_OK ) { | 151 | if ( lib->queryInterface( IID_MediaPlayerPlugin, (QUnknownInterface**)&iface ) == QS_OK ) { |
152 | 152 | ||
153 | // odebug << "loading: " << QString( path + "/" + *it ) << "" << oendl; | 153 | // odebug << "loading: " << QString( path + "/" + *it ) << "" << oendl; |
154 | 154 | ||
155 | MediaPlayerPlugin plugin; | 155 | MediaPlayerPlugin plugin; |
156 | plugin.library = lib; | 156 | plugin.library = lib; |
157 | plugin.iface = iface; | 157 | plugin.iface = iface; |
158 | plugin.decoder = plugin.iface->decoder(); | 158 | plugin.decoder = plugin.iface->decoder(); |
diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp index 46aeff2..db2bf1b 100644 --- a/core/multimedia/opieplayer/playlistwidget.cpp +++ b/core/multimedia/opieplayer/playlistwidget.cpp | |||
@@ -1369,33 +1369,33 @@ void PlayListWidget::doUnblank() { | |||
1369 | if (fd != -1) { | 1369 | if (fd != -1) { |
1370 | ioctl(fd,FBIOBLANK,0); | 1370 | ioctl(fd,FBIOBLANK,0); |
1371 | close(fd); | 1371 | close(fd); |
1372 | } | 1372 | } |
1373 | QCopEnvelope h("QPE/System", "setBacklight(int)"); | 1373 | QCopEnvelope h("QPE/System", "setBacklight(int)"); |
1374 | h <<-3;// v[1]; // -3 Force on | 1374 | h <<-3;// v[1]; // -3 Force on |
1375 | } | 1375 | } |
1376 | 1376 | ||
1377 | void PlayListWidget::populateSkinsMenu() { | 1377 | void PlayListWidget::populateSkinsMenu() { |
1378 | int item = 0; | 1378 | int item = 0; |
1379 | defaultSkinIndex = 0; | 1379 | defaultSkinIndex = 0; |
1380 | QString skinName; | 1380 | QString skinName; |
1381 | Config cfg( "OpiePlayer" ); | 1381 | Config cfg( "OpiePlayer" ); |
1382 | cfg.setGroup("Options" ); | 1382 | cfg.setGroup("Options" ); |
1383 | QString skin = cfg.readEntry( "Skin", "default" ); | 1383 | QString skin = cfg.readEntry( "Skin", "default" ); |
1384 | 1384 | ||
1385 | QDir skinsDir( QPEApplication::qpeDir() + "/pics/opieplayer2/skins" ); | 1385 | QDir skinsDir( QPEApplication::qpeDir() + "pics/opieplayer2/skins" ); |
1386 | skinsDir.setFilter( QDir::Dirs ); | 1386 | skinsDir.setFilter( QDir::Dirs ); |
1387 | skinsDir.setSorting(QDir::Name ); | 1387 | skinsDir.setSorting(QDir::Name ); |
1388 | const QFileInfoList *skinslist = skinsDir.entryInfoList(); | 1388 | const QFileInfoList *skinslist = skinsDir.entryInfoList(); |
1389 | QFileInfoListIterator it( *skinslist ); | 1389 | QFileInfoListIterator it( *skinslist ); |
1390 | QFileInfo *fi; | 1390 | QFileInfo *fi; |
1391 | while ( ( fi = it.current() ) ) { | 1391 | while ( ( fi = it.current() ) ) { |
1392 | skinName = fi->fileName(); | 1392 | skinName = fi->fileName(); |
1393 | // odebug << fi->fileName() << oendl; | 1393 | // odebug << fi->fileName() << oendl; |
1394 | if( skinName != "." && skinName != ".." && skinName !="CVS" ) { | 1394 | if( skinName != "." && skinName != ".." && skinName !="CVS" ) { |
1395 | item = skinsMenu->insertItem( fi->fileName() ) ; | 1395 | item = skinsMenu->insertItem( fi->fileName() ) ; |
1396 | } | 1396 | } |
1397 | if( skinName == "default" ) { | 1397 | if( skinName == "default" ) { |
1398 | defaultSkinIndex = item; | 1398 | defaultSkinIndex = item; |
1399 | } | 1399 | } |
1400 | if( skinName == skin ) { | 1400 | if( skinName == skin ) { |
1401 | skinsMenu->setItemChecked( item, TRUE ); | 1401 | skinsMenu->setItemChecked( item, TRUE ); |
diff --git a/core/multimedia/opieplayer/videowidget.cpp b/core/multimedia/opieplayer/videowidget.cpp index 2396ed5..c545511 100644 --- a/core/multimedia/opieplayer/videowidget.cpp +++ b/core/multimedia/opieplayer/videowidget.cpp | |||
@@ -85,33 +85,33 @@ VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) : | |||
85 | QString skinPath; | 85 | QString skinPath; |
86 | skinPath = "opieplayer2/skins/" + skin; | 86 | skinPath = "opieplayer2/skins/" + skin; |
87 | if(!QDir(QString(getenv("OPIEDIR")) +"/pics/"+skinPath).exists()) | 87 | if(!QDir(QString(getenv("OPIEDIR")) +"/pics/"+skinPath).exists()) |
88 | skinPath = "opieplayer2/skins/default"; | 88 | skinPath = "opieplayer2/skins/default"; |
89 | 89 | ||
90 | 90 | ||
91 | // QString skinPath = "opieplayer2/skins/" + skin; | 91 | // QString skinPath = "opieplayer2/skins/" + skin; |
92 | 92 | ||
93 | pixBg = new QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) ); | 93 | pixBg = new QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) ); |
94 | imgUp = new QImage( Resource::loadImage( QString("%1/skinV_up").arg(skinPath) ) ); | 94 | imgUp = new QImage( Resource::loadImage( QString("%1/skinV_up").arg(skinPath) ) ); |
95 | imgDn = new QImage( Resource::loadImage( QString("%1/skinV_down").arg(skinPath) ) ); | 95 | imgDn = new QImage( Resource::loadImage( QString("%1/skinV_down").arg(skinPath) ) ); |
96 | 96 | ||
97 | imgButtonMask = new QImage( imgUp->width(), imgUp->height(), 8, 255 ); | 97 | imgButtonMask = new QImage( imgUp->width(), imgUp->height(), 8, 255 ); |
98 | imgButtonMask->fill( 0 ); | 98 | imgButtonMask->fill( 0 ); |
99 | 99 | ||
100 | for ( int i = 0; i < 7; i++ ) { | 100 | for ( int i = 0; i < 7; i++ ) { |
101 | QString filename = QString( QPEApplication::qpeDir() + "/pics/" + skinPath + | 101 | QString filename = QString( QPEApplication::qpeDir() + "pics/" + skinPath + |
102 | "/skinV_mask_" + skinV_mask_file_names[i] + ".png" ); | 102 | "/skinV_mask_" + skinV_mask_file_names[i] + ".png" ); |
103 | // odebug << "loading "+filename << oendl; | 103 | // odebug << "loading "+filename << oendl; |
104 | masks[i] = new QBitmap( filename ); | 104 | masks[i] = new QBitmap( filename ); |
105 | 105 | ||
106 | if ( !masks[i]->isNull() ) { | 106 | if ( !masks[i]->isNull() ) { |
107 | QImage imgMask = masks[i]->convertToImage(); | 107 | QImage imgMask = masks[i]->convertToImage(); |
108 | uchar **dest = imgButtonMask->jumpTable(); | 108 | uchar **dest = imgButtonMask->jumpTable(); |
109 | for ( int y = 0; y < imgUp->height(); y++ ) { | 109 | for ( int y = 0; y < imgUp->height(); y++ ) { |
110 | uchar *line = dest[y]; | 110 | uchar *line = dest[y]; |
111 | for ( int x = 0; x < imgUp->width(); x++ ) { | 111 | for ( int x = 0; x < imgUp->width(); x++ ) { |
112 | if ( !qRed( imgMask.pixel( x, y ) ) ) | 112 | if ( !qRed( imgMask.pixel( x, y ) ) ) |
113 | line[x] = i + 1; | 113 | line[x] = i + 1; |
114 | } | 114 | } |
115 | } | 115 | } |
116 | } | 116 | } |
117 | } | 117 | } |