[pitivi] clipproperties: Hide the effects toolbar when nothing is selected
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] clipproperties: Hide the effects toolbar when nothing is selected
- Date: Fri, 15 Feb 2013 19:43:51 +0000 (UTC)
commit 00aa9479433b12a1287cc779268c96d7ead0ef3a
Author: Jean-FranÃois Fortin Tam <nekohayo gmail com>
Date: Sat Feb 9 18:30:24 2013 -0500
clipproperties: Hide the effects toolbar when nothing is selected
pitivi/clipproperties.py | 19 +++++++++----------
1 files changed, 9 insertions(+), 10 deletions(-)
---
diff --git a/pitivi/clipproperties.py b/pitivi/clipproperties.py
index 1bc42c8..e0e39f2 100644
--- a/pitivi/clipproperties.py
+++ b/pitivi/clipproperties.py
@@ -160,12 +160,11 @@ class EffectProperties(Gtk.Expander):
self._toolbar = Gtk.Toolbar()
self._toolbar.get_style_context().add_class("inline-toolbar")
self._toolbar.set_icon_size(Gtk.IconSize.SMALL_TOOLBAR)
- self._removeEffectBt = Gtk.ToolButton()
- self._removeEffectBt.set_icon_name("list-remove-symbolic")
- self._removeEffectBt.set_label(_("Remove effect"))
- self._removeEffectBt.set_is_important(True)
- self._removeEffectBt.set_sensitive(False)
- self._toolbar.insert(self._removeEffectBt, 0)
+ removeEffectButton = Gtk.ToolButton()
+ removeEffectButton.set_icon_name("list-remove-symbolic")
+ removeEffectButton.set_label(_("Remove effect"))
+ removeEffectButton.set_is_important(True)
+ self._toolbar.insert(removeEffectButton, 0)
# Treeview to display a list of effects (type and name)
self.treeview_scrollwin = Gtk.ScrolledWindow()
@@ -225,6 +224,7 @@ class EffectProperties(Gtk.Expander):
self._vcontent.show()
self._table.show_all()
self._infobar.show_all()
+ self._toolbar.hide()
self.hide()
# Connect all the widget signals
@@ -234,7 +234,7 @@ class EffectProperties(Gtk.Expander):
self.treeview.connect("drag-motion", self._dragMotionCb)
self.treeview.connect("query-tooltip", self._treeViewQueryTooltipCb)
self._vcontent.connect("notify", self._vcontentNotifyCb)
- self._removeEffectBt.connect("clicked", self._removeEffectClicked)
+ removeEffectButton.connect("clicked", self._removeEffectClicked)
self.app.connect("new-project-loaded", self._newProjectLoadedCb)
self.connect('notify::expanded', self._expandedCb)
self.connected = False
@@ -378,7 +378,6 @@ class EffectProperties(Gtk.Expander):
def updateAll(self):
if self.get_expanded():
- self._removeEffectBt.set_sensitive(False)
if len(self.clips) == 1:
self._setEffectDragable()
self._updateTreeview()
@@ -419,10 +418,10 @@ class EffectProperties(Gtk.Expander):
def _treeviewSelectionChangedCb(self, treeview):
if self.selection.count_selected_rows() == 0 and self.clips:
self.app.gui.setActionsSensitive(True)
- self._removeEffectBt.set_sensitive(False)
+ self._toolbar.hide()
else:
self.app.gui.setActionsSensitive(False)
- self._removeEffectBt.set_sensitive(True)
+ self._toolbar.show()
self._updateEffectConfigUi()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]