[pitivi] Use modelFilter to query iconview/treeview, not storemodel
- From: Jean-FranÃois Fortin Tam <jfft src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] Use modelFilter to query iconview/treeview, not storemodel
- Date: Sun, 27 May 2012 19:46:23 +0000 (UTC)
commit 099107eaa6ad39a083d468d19589d991fb46ea4c
Author: Jean-FranÃois Fortin Tam <nekohayo gmail com>
Date: Sun May 6 18:33:22 2012 -0400
Use modelFilter to query iconview/treeview, not storemodel
Otherwise, we will not get the proper ref from search results.
Fixes bug #675573
pitivi/medialibrary.py | 6 +++---
pitivi/transitions.py | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/pitivi/medialibrary.py b/pitivi/medialibrary.py
index 23285c7..315c82f 100644
--- a/pitivi/medialibrary.py
+++ b/pitivi/medialibrary.py
@@ -1163,7 +1163,7 @@ class MediaLibraryWidget(gtk.VBox, Loggable):
self.selection_actions.set_sensitive(False)
def _rowActivatedCb(self, unused_treeview, path, unused_column):
- path = self.storemodel[path][COL_URI]
+ path = self.modelFilter[path][COL_URI]
self.emit('play', path)
def _iconViewMotionNotifyEventCb(self, iconview, event):
@@ -1297,7 +1297,7 @@ class MediaLibraryWidget(gtk.VBox, Loggable):
if len(paths) < 1:
context.drag_abort(int(time.time()))
else:
- row = self.storemodel[paths[0]]
+ row = self.modelFilter[paths[0]]
context.set_icon_pixbuf(row[COL_ICON], 0, 0)
def getSelectedPaths(self):
@@ -1318,7 +1318,7 @@ class MediaLibraryWidget(gtk.VBox, Loggable):
def getSelectedItems(self):
""" Returns a list of selected items URIs """
- return [self.storemodel[path][COL_URI]
+ return [self.modelFilter[path][COL_URI]
for path in self.getSelectedPaths()]
def _dndDataGetCb(self, unused_widget, context, selection,
diff --git a/pitivi/transitions.py b/pitivi/transitions.py
index 65fe38a..5a500bd 100644
--- a/pitivi/transitions.py
+++ b/pitivi/transitions.py
@@ -348,7 +348,7 @@ class TransitionsListWidget(Signallable, gtk.VBox, Loggable):
def getSelectedItem(self):
path = self.iconview.get_selected_items()
- return self.storemodel[path[0]][COL_TRANSITION_ID]
+ return self.modelFilter[path[0]][COL_TRANSITION_ID]
def _setRowVisible(self, model, iter, data):
"""
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]