[pitivi] elements: Remove static tooltip setting
- From: Alexandru Băluț <alexbalut src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] elements: Remove static tooltip setting
- Date: Fri, 11 Nov 2016 18:08:42 +0000 (UTC)
commit 41e22f3cc7e938fd06ae8298195a394cb86bbcb5
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Wed Nov 9 11:37:53 2016 +0100
elements: Remove static tooltip setting
The tooltip is already set in UriClip.do_query_tooltip.
Reviewed-by: Thibault Saunier <tsaunier gnome org>
Differential Revision: https://phabricator.freedesktop.org/D1456
pitivi/timeline/elements.py | 2 --
tests/test_timeline_elements.py | 12 ++++++++++++
2 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/pitivi/timeline/elements.py b/pitivi/timeline/elements.py
index a00242b..fd7ae09 100644
--- a/pitivi/timeline/elements.py
+++ b/pitivi/timeline/elements.py
@@ -1143,8 +1143,6 @@ class UriClip(SourceClip):
SourceClip.__init__(self, layer, ges_clip)
self.props.has_tooltip = True
- self.set_tooltip_markup(filename_from_uri(ges_clip.get_uri()))
-
def do_query_tooltip(self, x, y, keyboard_mode, tooltip):
tooltip.set_markup(filename_from_uri(
self.ges_clip.get_asset().props.id))
diff --git a/tests/test_timeline_elements.py b/tests/test_timeline_elements.py
index 6b8ff48..12ac34c 100644
--- a/tests/test_timeline_elements.py
+++ b/tests/test_timeline_elements.py
@@ -17,9 +17,12 @@
# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301, USA.
from unittest import mock
+from unittest import TestCase
+from gi.overrides import GObject
from gi.repository import GES
+from pitivi.timeline.elements import GES_TYPE_UI_TYPE
from tests.common import create_test_clip
from tests.common import create_timeline_container
from tests.test_timeline_timeline import BaseTestTimeline
@@ -193,3 +196,12 @@ class TestVideoSourceScaling(BaseTestTimeline):
height = video_source.get_child_property("height")[1]
self.assertEqual(width, 960)
self.assertEqual(height, 400)
+
+
+class TestClip(TestCase):
+
+ def test_clip_subclasses(self):
+ for gtype, widget_class in GES_TYPE_UI_TYPE.items():
+ ges_object = GObject.new(gtype)
+ widget = widget_class(mock.Mock(), ges_object)
+ self.assertEqual(ges_object.ui, widget, widget_class)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]