Merge lp:~mblayman/entertainer/rss-1.0 into lp:entertainer/future

Proposed by Matt Layman
Status: Merged
Merged at revision: not available
Proposed branch: lp:~mblayman/entertainer/rss-1.0
Merge into: lp:entertainer/future
Prerequisite: lp:~mblayman/entertainer/text-menu-1.0
Diff against target: 138 lines (+32/-24)
4 files modified
entertainerlib/gui/screens/factory.py (+4/-4)
entertainerlib/gui/widgets/arrow_texture.py (+20/-12)
entertainerlib/gui/widgets/grid_menu.py (+6/-6)
entertainerlib/gui/widgets/scroll_area.py (+2/-2)
To merge this branch: bzr merge lp:~mblayman/entertainer/rss-1.0
Reviewer Review Type Date Requested Status
Entertainer Release Team Pending
Review via email: mp+16466@code.launchpad.net

Commit message

All screens related to RSS have been fixed for clutter 1.0

To post a comment you must log in.
Revision history for this message
Matt Layman (mblayman) wrote :

Branch 3 of clutter 1.0 transition.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'entertainerlib/gui/screens/factory.py'
2--- entertainerlib/gui/screens/factory.py 2009-12-22 03:13:11 +0000
3+++ entertainerlib/gui/screens/factory.py 2009-12-22 03:13:12 +0000
4@@ -7,8 +7,8 @@
5 #from entertainerlib.gui.screens.album import Album
6 #from entertainerlib.gui.screens.audio_play import AudioPlay
7 #from entertainerlib.gui.screens.disc import Disc
8-#from entertainerlib.gui.screens.feed import Feed
9-#from entertainerlib.gui.screens.feed_entry import FeedEntry
10+from entertainerlib.gui.screens.feed import Feed
11+from entertainerlib.gui.screens.feed_entry import FeedEntry
12 from entertainerlib.gui.screens.main import Main
13 #from entertainerlib.gui.screens.movie import Movie
14 #from entertainerlib.gui.screens.music import Music
15@@ -16,12 +16,12 @@
16 #from entertainerlib.gui.screens.photo_albums import PhotoAlbums
17 #from entertainerlib.gui.screens.photographs import Photographs
18 from entertainerlib.gui.screens.question import Question
19-#from entertainerlib.gui.screens.rss import Rss
20+from entertainerlib.gui.screens.rss import Rss
21 #from entertainerlib.gui.screens.tv_episodes import TvEpisodes
22 #from entertainerlib.gui.screens.tv_series import TvSeries
23 #from entertainerlib.gui.screens.video import Video
24 #from entertainerlib.gui.screens.video_osd import VideoOSD
25-#from entertainerlib.gui.screens.weather import WeatherScreen
26+from entertainerlib.gui.screens.weather import WeatherScreen
27
28
29 class ScreenFactory(object):
30
31=== modified file 'entertainerlib/gui/widgets/arrow_texture.py'
32--- entertainerlib/gui/widgets/arrow_texture.py 2009-07-12 17:02:32 +0000
33+++ entertainerlib/gui/widgets/arrow_texture.py 2009-12-22 03:13:12 +0000
34@@ -2,12 +2,11 @@
35 '''Displays text in rounded rectangle box'''
36
37 import clutter
38-from cluttercairo import CairoTexture
39
40 from entertainerlib.gui.widgets.base import Base
41
42
43-class ArrowTexture(Base, CairoTexture):
44+class ArrowTexture(Base, clutter.CairoTexture):
45 """Clutter CairoTexture which represents an arrow."""
46
47 # Arrow direction (One of these should be passed as a paramter)
48@@ -22,7 +21,7 @@
49
50 abs_size = self.get_abs_x(size)
51
52- CairoTexture.__init__(self, abs_size, abs_size)
53+ clutter.CairoTexture.__init__(self, abs_size, abs_size)
54
55 context = self.cairo_create()
56 context.scale(abs_size, abs_size)
57@@ -64,20 +63,29 @@
58 del(context) # Updates texture
59
60 # Create bounce effect
61- self.timeline = clutter.Timeline(30)
62- self.alpha = clutter.Alpha(self.timeline, clutter.sine_func)
63 self.set_anchor_point_from_gravity(clutter.GRAVITY_CENTER)
64- self.behaviour = clutter.BehaviourScale(1.0, 1.0, 1.5, 1.5, self.alpha)
65- self.behaviour.apply(self)
66+
67+ in_time = clutter.Timeline(300)
68+ in_alpha = clutter.Alpha(in_time, clutter.EASE_OUT_SINE)
69+ self.in_behaviour = clutter.BehaviourScale(1.0, 1.0, 1.5, 1.5, in_alpha)
70+ self.in_behaviour.apply(self)
71+
72+ out_time = clutter.Timeline(300)
73+ out_alpha = clutter.Alpha(out_time, clutter.EASE_OUT_SINE)
74+ self.out_behaviour = clutter.BehaviourScale(1.5, 1.5, 1.0, 1.0,
75+ out_alpha)
76+ self.out_behaviour.apply(self)
77+
78+ self.score = clutter.Score()
79+ self.score.append(timeline=in_time)
80+ self.score.append(timeline=out_time, parent=in_time)
81
82 self.set_position(self.get_abs_x(x), self.get_abs_y(y))
83
84 def bounce(self):
85- """
86- Execute bounce effect for this array.
87- """
88- if not self.timeline.is_playing():
89- self.timeline.start()
90+ """Execute bounce effect for this array."""
91+ if not self.score.is_playing():
92+ self.score.start()
93
94 def _color_to_cairo_color(self, color):
95 """
96
97=== modified file 'entertainerlib/gui/widgets/grid_menu.py'
98--- entertainerlib/gui/widgets/grid_menu.py 2009-12-22 03:13:11 +0000
99+++ entertainerlib/gui/widgets/grid_menu.py 2009-12-22 03:13:12 +0000
100@@ -411,14 +411,14 @@
101 if (x, y) == (self._moving_group_x, self._moving_group_y):
102 return
103
104- self._moving_group_behaviour.clear()
105-
106- start_knot = (self._moving_group_x * self._item_width_abs,
107+ path = clutter.Path()
108+ path.add_move_to(
109+ self._moving_group_x * self._item_width_abs,
110 self._moving_group_y * self._item_height_abs)
111- stop_knot = (x * self._item_width_abs,
112+ path.add_line_to(
113+ x * self._item_width_abs,
114 y * self._item_height_abs)
115-
116- self._moving_group_behaviour.append_knots(start_knot, stop_knot)
117+ self._moving_group_behaviour.set_path(path)
118
119 self._moving_group_x, self._moving_group_y = x, y
120 self._moving_group_timeline.set_duration(duration)
121
122=== modified file 'entertainerlib/gui/widgets/scroll_area.py'
123--- entertainerlib/gui/widgets/scroll_area.py 2009-08-04 01:09:03 +0000
124+++ entertainerlib/gui/widgets/scroll_area.py 2009-12-22 03:13:12 +0000
125@@ -53,11 +53,11 @@
126 self.add(self._fixed_group)
127 self.content = None
128
129- self._motion_timeline = clutter.Timeline(fps=200, duration=500)
130+ self._motion_timeline = clutter.Timeline(500)
131 self._motion_timeline.connect('completed',
132 self._motion_timeline_callback, None)
133 self._motion_alpha = clutter.Alpha(self._motion_timeline,
134- clutter.sine_inc_func)
135+ clutter.EASE_OUT_SINE)
136 self._motion_behaviour = LoopedPathBehaviour(self._motion_alpha)
137
138 self.set_content(content)

Subscribers

People subscribed via source and target branches