[pitivi/gtktimeline] timeline: Properly set transition tooltip text
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi/gtktimeline] timeline: Properly set transition tooltip text
- Date: Fri, 5 Jun 2015 04:00:29 +0000 (UTC)
commit 0158897895e5601c70068e6707f0a7af41f60392
Author: Thibault Saunier <tsaunier gnome org>
Date: Fri Jun 5 05:50:32 2015 +0200
timeline: Properly set transition tooltip text
Fixes http://phabricator.freedesktop.org/T85
pitivi/timeline/elements.py | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/pitivi/timeline/elements.py b/pitivi/timeline/elements.py
index bdc7952..108b1b5 100644
--- a/pitivi/timeline/elements.py
+++ b/pitivi/timeline/elements.py
@@ -27,6 +27,8 @@ is prefixed with a little b, example : bTimeline
"""
import os
+from gettext import gettext as _
+
from gi.repository import GES
from gi.repository import Gtk
from gi.repository import Gdk
@@ -860,8 +862,15 @@ class TransitionClip(Clip):
self.handles.append(self.leftHandle)
self.handles.append(self.rightHandle)
- self.set_tooltip_markup("<span>%s</span>" %
- str(bClip.props.vtype.value_nick))
+ self.set_tooltip_markup("%s" % str(bClip.props.vtype.value_nick))
+
+ def do_query_tooltip(self, x, y, keyboard_mode, tooltip):
+ if self.__has_video:
+ self.set_tooltip_markup("%s" % str(self.bClip.props.vtype.value_nick))
+ else:
+ self.set_tooltip_markup(_("Audio crossfade"))
+
+ return Clip.do_query_tooltip(self, x, y, keyboard_mode, tooltip)
def _childAdded(self, clip, child):
super(TransitionClip, self)._childAdded(clip, child)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]