[pitivi] When not usable, hide widgets in clip properties and transitions
- From: Jean-FranÃois Fortin Tam <jfft src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] When not usable, hide widgets in clip properties and transitions
- Date: Sun, 2 Sep 2012 04:03:46 +0000 (UTC)
commit 16e208776543419ea4f85c779d4335ac19f88bbc
Author: Jean-FranÃois Fortin Tam <nekohayo gmail com>
Date: Wed Aug 22 00:31:13 2012 -0400
When not usable, hide widgets in clip properties and transitions
Compared to making the widgets insensitive, simply hiding them
makes the UI look less cluttered and awkward, no more widgets
jumping all over the place around infobars.
pitivi/clipproperties.py | 21 +++++++++++----------
pitivi/transitions.py | 19 ++++++++++---------
2 files changed, 21 insertions(+), 19 deletions(-)
---
diff --git a/pitivi/clipproperties.py b/pitivi/clipproperties.py
index 77a2c67..4a93fad 100644
--- a/pitivi/clipproperties.py
+++ b/pitivi/clipproperties.py
@@ -94,7 +94,9 @@ class ClipProperties(gtk.ScrolledWindow, Loggable):
viewport.add(vbox)
self.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC)
self.add(viewport)
- self.show_all()
+ viewport.show()
+ vbox.show()
+ self.infobar_box.show()
def _setProject(self, project):
self._project = project
@@ -232,10 +234,12 @@ class EffectProperties(gtk.Expander):
self._vcontent.pack1(self._table, resize=True, shrink=False)
self._showInfoBar()
self._vcontent.show()
+ self._table.show_all()
self.set_expanded(True)
self.set_label(_("Effects"))
self.connect('notify::expanded', self._expandedCb)
self.connected = False
+ self.hide()
def _newProjectLoadedCb(self, app, project):
self.clip_properties.project = project
@@ -276,10 +280,10 @@ class EffectProperties(gtk.Expander):
for timeline_object in self.timeline_objects:
timeline_object.connect("track-object-added", self._trackObjectAddedCb)
timeline_object.connect("track-object-removed", self._trackRemovedRemovedCb)
- self.set_sensitive(True)
+ self.show()
else:
self.timeline_objects = []
- self.set_sensitive(False)
+ self.hide()
self.updateAll()
def _trackObjectAddedCb(self, unused_timeline_object, track_object):
@@ -417,12 +421,9 @@ class EffectProperties(gtk.Expander):
_("Select a clip on the timeline "
"to configure its associated effects"))
self._info_bar.show_all()
- self.set_sensitive(False)
- self._table.show_all()
def _setEffectDragable(self):
- self.set_sensitive(True)
- self._table.show_all()
+ self.show()
self._info_bar.hide_all()
def _treeviewSelectionChangedCb(self, treeview):
@@ -485,7 +486,6 @@ class TransformationProperties(gtk.Expander):
self.spin_buttons = {}
self.default_values = {}
self.set_label(_("Transformation"))
- self.set_sensitive(False)
if not "Frei0r" in soft_deps:
self.builder = gtk.Builder()
@@ -496,6 +496,7 @@ class TransformationProperties(gtk.Expander):
self.show_all()
self._initButtons()
self.connect('notify::expanded', self._expandedCb)
+ self.hide()
def _initButtons(self):
self.zoom_scale = self.builder.get_object("zoom_scale")
@@ -622,7 +623,7 @@ class TransformationProperties(gtk.Expander):
self._current_tl_obj = tl_obj
self.effect = None
- self.set_sensitive(True)
+ self.show()
if self.get_expanded():
self.effect = self._findOrCreateEffect("frei0r-filter-scale0tilt")
self._updateSpinButtons()
@@ -632,7 +633,7 @@ class TransformationProperties(gtk.Expander):
self.zoom_scale.set_value(1.0)
self.app.current.pipeline.flushSeek()
self.effect = None
- self.set_sensitive(False)
+ self.hide()
self._updateBoxVisibility()
def _updateBoxVisibility(self):
diff --git a/pitivi/transitions.py b/pitivi/transitions.py
index 32eb945..1e1333e 100644
--- a/pitivi/transitions.py
+++ b/pitivi/transitions.py
@@ -142,10 +142,10 @@ class TransitionsListWidget(Signallable, gtk.VBox, Loggable):
self.infobar.show()
self.iconview_scrollwin.show_all()
- self.iconview.set_sensitive(False)
+ self.iconview.hide()
self.props_widgets.set_sensitive(False)
- self.props_widgets.show_all()
- self.searchbar.hide_all()
+ self.props_widgets.hide()
+ self.searchbar.hide()
# UI callbacks
@@ -284,7 +284,7 @@ class TransitionsListWidget(Signallable, gtk.VBox, Loggable):
def activate(self, element):
"""
- Hide the infobar and make the transitions UI sensitive.
+ Hide the infobar and show the transitions UI.
"""
self.element = element
self.element.connect("notify::border", self._borderChangedCb)
@@ -295,7 +295,8 @@ class TransitionsListWidget(Signallable, gtk.VBox, Loggable):
self.props_widgets.set_sensitive(False)
else:
self.props_widgets.set_sensitive(True)
- self.iconview.set_sensitive(True)
+ self.iconview.show_all()
+ self.props_widgets.show_all()
self.infobar.hide()
self.searchbar.show_all()
self.selectTransition(transition)
@@ -314,7 +315,7 @@ class TransitionsListWidget(Signallable, gtk.VBox, Loggable):
def deactivate(self):
"""
- Show the infobar and make the transitions UI insensitive.
+ Show the infobar and hide the transitions UI.
"""
try:
self.element.disconnect_by_func(self._borderChangedCb)
@@ -329,10 +330,10 @@ class TransitionsListWidget(Signallable, gtk.VBox, Loggable):
# to deactivate the UI now.
pass
self.iconview.unselect_all()
- self.iconview.set_sensitive(False)
- self.props_widgets.set_sensitive(False)
+ self.iconview.hide()
+ self.props_widgets.hide()
+ self.searchbar.hide()
self.infobar.show()
- self.searchbar.hide_all()
def _getIcon(self, transition_nick):
"""
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]