diff options
author | Anton Khirnov <wyskas@gmail.com> | 2009-02-11 16:05:18 +0100 |
---|---|---|
committer | Anton Khirnov <wyskas@gmail.com> | 2009-02-11 16:05:18 +0100 |
commit | cc6627b4efa70906ffd45bc36d576b14c37eea11 (patch) | |
tree | aee56ff243304deb7b1afac3212bbb02d2c862f1 | |
parent | 3cc52fb042c9a9fbe2f1507a8bf8d0e4c3376b86 (diff) |
Filebrowser: allow adding multiple files.
-rw-r--r-- | plugins/Filebrowser.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/Filebrowser.py b/plugins/Filebrowser.py index d91fde7..83500e3 100644 --- a/plugins/Filebrowser.py +++ b/plugins/Filebrowser.py @@ -20,6 +20,7 @@ class pluginFilebrowser(Plugin): self.view = QtGui.QListView() self.view.setModel(self.model) self.view.setRootIndex(self.model.index(os.path.expanduser('~'))) + self.view.setSelectionMode(QtGui.QTreeWidget.ExtendedSelection) self.view.connect(self.view, QtCore.SIGNAL('activated(const QModelIndex&)'), self.item_activated) def _unload(self): @@ -39,5 +40,8 @@ class pluginFilebrowser(Plugin): if not 'file://' in self.monty.urlhandlers(): self.setStatus('file:// handler not available. Connect via unix domain sockets.') return - self.monty.addToPlaylist([u'file://' + self.model.filePath(index)]) + paths = [] + for index in self.view.selectedIndexes(): + paths.append(u'file://' + self.model.filePath(index)) + self.monty.addToPlaylist(paths) |