[pitivi] pitivi/ui/sourcelist.py: make insert key sensitive with both views
- From: Edward Hervey <edwardrv src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [pitivi] pitivi/ui/sourcelist.py: make insert key sensitive with both views
- Date: Mon, 8 Feb 2010 16:49:24 +0000 (UTC)
commit 5ed876909407899794daa642ac564ce4a05b41dd
Author: Stephen Griffiths <scgmk5 gmail com>
Date: Tue Feb 2 15:43:49 2010 +1100
pitivi/ui/sourcelist.py: make insert key sensitive with both views
pitivi/ui/sourcelist.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/pitivi/ui/sourcelist.py b/pitivi/ui/sourcelist.py
index 51f450e..5c6818d 100644
--- a/pitivi/ui/sourcelist.py
+++ b/pitivi/ui/sourcelist.py
@@ -161,7 +161,7 @@ class SourceList(gtk.VBox, Loggable):
self.treeview.set_property("search_column", COL_SEARCH_TEXT)
tsel = self.treeview.get_selection()
tsel.set_mode(gtk.SELECTION_MULTIPLE)
- tsel.connect("changed", self._treeSelectionChanged)
+ tsel.connect("changed", self._viewSelectionChangedCb)
pixbufcol = gtk.TreeViewColumn(_("Icon"))
pixbufcol.set_expand(False)
@@ -195,6 +195,7 @@ class SourceList(gtk.VBox, Loggable):
self.iconview = gtk.IconView(self.storemodel)
self.iconview_scrollwin.add(self.iconview)
self.iconview.connect("button-press-event", self._iconViewButtonPressEventCb)
+ self.iconview.connect("selection-changed", self._viewSelectionChangedCb)
self.iconview.set_orientation(gtk.ORIENTATION_VERTICAL)
self.iconview.set_text_column(COL_SHORT_TEXT)
self.iconview.set_pixbuf_column(COL_ICON_LARGE)
@@ -780,8 +781,8 @@ class SourceList(gtk.VBox, Loggable):
treeview.get_selection().select_path(path)
return False
- def _treeSelectionChanged(self, tsel):
- if self.getSelectedItemsTreeView():
+ def _viewSelectionChangedCb(self, unused):
+ if self._viewHasSelection():
self.selection_actions.set_sensitive(True)
else:
self.selection_actions.set_sensitive(False)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]