[pitivi: 12/14] ui/effectlist: add keyframe, prevframe and nextframe to the action sensitive/unsensitive when focus
- From: Edward Hervey <edwardrv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi: 12/14] ui/effectlist: add keyframe, prevframe and nextframe to the action sensitive/unsensitive when focus
- Date: Fri, 1 Oct 2010 12:17:11 +0000 (UTC)
commit cb461e28f53a30ab4fecbe50e13f7b871342dc5a
Author: Luis de Bethencourt <luis debethencourt com>
Date: Tue Sep 28 13:44:53 2010 +0200
ui/effectlist: add keyframe, prevframe and nextframe to the action sensitive/unsensitive when focus is in the effect list search entry.
pitivi/ui/effectlist.py | 6 ++++--
pitivi/ui/mainwindow.py | 8 ++++++++
pitivi/ui/timeline.py | 4 ++--
3 files changed, 14 insertions(+), 4 deletions(-)
---
diff --git a/pitivi/ui/effectlist.py b/pitivi/ui/effectlist.py
index 4875356..1101302 100644
--- a/pitivi/ui/effectlist.py
+++ b/pitivi/ui/effectlist.py
@@ -320,10 +320,12 @@ class EffectList(gtk.VBox, Loggable):
entry.set_text("")
def searchEntryDesactvateCb(self, entry, event):
- self.app.gui.setActionsSensitive(['FullScreen', 'Split',], True)
+ sensitive_actions = self.app.gui.sensitive_actions
+ self.app.gui.setActionsSensitive(sensitive_actions, True)
def searchEntryActivateCb(self, entry, event):
- self.app.gui.setActionsSensitive(['FullScreen', 'Split',], False)
+ sensitive_actions = self.app.gui.sensitive_actions
+ self.app.gui.setActionsSensitive(sensitive_actions, False)
def _setRowVisible(self, model, iter, data):
if self.effectType.get_active() == model.get_value(iter, COL_EFFECT_TYPE):
diff --git a/pitivi/ui/mainwindow.py b/pitivi/ui/mainwindow.py
index 18602b8..3da0de2 100644
--- a/pitivi/ui/mainwindow.py
+++ b/pitivi/ui/mainwindow.py
@@ -430,6 +430,14 @@ class PitiviMainWindow(gtk.Window, Loggable):
self.secondhpaned.pack1(self.projecttabs, resize=True, shrink=False)
self.projecttabs.show()
+ # Actions with key accelerators that will be made unsensitive while
+ # a gtk entry box is used to avoid conflicts.
+ self.sensitive_actions = []
+ for action in self.timeline.playhead_actions:
+ self.sensitive_actions.append(action[0])
+ for action in self.toggleactions:
+ self.sensitive_actions.append(action[0])
+
#Clips properties
self.propertiestabs = BaseTabs(instance, True)
self.clipconfig = ClipProperties(instance, self.uimanager)
diff --git a/pitivi/ui/timeline.py b/pitivi/ui/timeline.py
index 113f5e9..32ca228 100644
--- a/pitivi/ui/timeline.py
+++ b/pitivi/ui/timeline.py
@@ -318,7 +318,7 @@ class Timeline(gtk.Table, Loggable, Zoomable):
self.groupSelected),
)
- playhead_actions = (
+ self.playhead_actions = (
("Split", "pitivi-split", _("Split"), "S", SPLIT,
self.split),
("Keyframe", "pitivi-keyframe", _("Add a keyframe"), "K", KEYFRAME,
@@ -335,7 +335,7 @@ class Timeline(gtk.Table, Loggable, Zoomable):
actiongroup = gtk.ActionGroup("timelineselection")
actiongroup.add_actions(selection_actions)
- actiongroup.add_actions(playhead_actions)
+ actiongroup.add_actions(self.playhead_actions)
self.link_action = actiongroup.get_action("LinkObj")
self.unlink_action = actiongroup.get_action("UnlinkObj")
self.group_action = actiongroup.get_action("GroupObj")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]