summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphintuka <phintuka>2010-12-19 14:38:37 +0000
committerphintuka <phintuka>2010-12-19 14:38:37 +0000
commitc204bf2c6bbf88d9b582895c488f75b1fbc4d5ea (patch)
tree87cb2b942492a8535c4d62e9fed0f2e8c586aca2
parent87056b8658e45197c5646daacf8c6045ab0bc016 (diff)
downloadxineliboutput-c204bf2c6bbf88d9b582895c488f75b1fbc4d5ea.tar.gz
xineliboutput-c204bf2c6bbf88d9b582895c488f75b1fbc4d5ea.tar.bz2
File browser: Use cPlaylist when launching image player
-rw-r--r--menu.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/menu.c b/menu.c
index d0da488a..45158ed4 100644
--- a/menu.c
+++ b/menu.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: menu.c,v 1.81 2010-12-09 13:14:55 phintuka Exp $
+ * $Id: menu.c,v 1.82 2010-12-19 14:38:37 phintuka Exp $
*
*/
@@ -360,18 +360,14 @@ eOSState cMenuBrowseFiles::Open(bool ForceOpen, bool Queue, bool Rewind)
return osContinue;
} else {
/* image */
- char **files = new char*[Count()+1];
- int i = 0, index = 0;
- memset(files, 0, sizeof(char*)*(Count()+1));
+ cPlaylist *Playlist = new cPlaylist();
for (cFileListItem *it = (cFileListItem*)First(); it; it=(cFileListItem*)Next(it)) {
- if (it == Get(Current()))
- index = i;
if (!it->IsDir())
- if (asprintf(&files[i++], "%s/%s", m_CurrentDir, it->Name()) < 0)
- i--;
+ Playlist->Read(cString::sprintf("%s/%s", *m_CurrentDir, it->Name()));
+ if (it == Get(Current()))
+ Playlist->SetCurrent(Playlist->Last());
}
- cControl::Shutdown();
- cControl::Launch(new cXinelibImagesControl(files, index, i));
+ cPlayerFactory::Launch(pmVideoOnly, Playlist, true);
}
return osEnd;
}