Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/widgets.py
diff options
context:
space:
mode:
Diffstat (limited to 'widgets.py')
-rw-r--r--widgets.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/widgets.py b/widgets.py
index 67c5bc4..bd09a73 100644
--- a/widgets.py
+++ b/widgets.py
@@ -85,3 +85,11 @@ class PlayListWidget(gtk.ScrolledWindow):
def set_cursor(self, index):
self.listview.set_cursor((index,))
+
+ def delete_selected_items(self):
+ selection = self.listview.get_selection()
+ sel_model, sel_rows = self.listview.get_selection().get_selected_rows()
+ for row in sel_rows:
+ self._playlist.pop(row[0])
+ self.treemodel.remove(self.treemodel.get_iter(row))
+ self.update(self._playlist)