Merge lp:~mblayman/entertainer/music-1.0 into lp:entertainer/future
- music-1.0
- Merge into entertainer-future
Proposed by
Matt Layman
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp:~mblayman/entertainer/music-1.0 |
Merge into: | lp:entertainer/future |
Prerequisite: | lp:~mblayman/entertainer/rss-1.0 |
Diff against target: |
404 lines (+56/-51) 14 files modified
entertainerlib/client/media_player.py (+9/-3) entertainerlib/gui/screens/factory.py (+4/-4) entertainerlib/gui/tabs/albums_tab.py (+2/-0) entertainerlib/gui/tabs/artists_tab.py (+2/-1) entertainerlib/gui/tabs/tab.py (+2/-2) entertainerlib/gui/tabs/tracks_tab.py (+2/-0) entertainerlib/gui/widgets/image_menu.py (+10/-2) entertainerlib/gui/widgets/loading_animation.py (+8/-13) entertainerlib/gui/widgets/progress_bar.py (+4/-5) entertainerlib/gui/widgets/reflection_texture.py (+2/-3) entertainerlib/gui/widgets/rounded_texture.py (+3/-3) entertainerlib/gui/widgets/special_behaviours.py (+0/-6) entertainerlib/gui/widgets/tab_group.py (+2/-2) entertainerlib/gui/widgets/text_menu.py (+6/-7) |
To merge this branch: | bzr merge lp:~mblayman/entertainer/music-1.0 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Entertainer Release Team | Pending | ||
Review via email: mp+16467@code.launchpad.net |
Commit message
All music screens have been fixed for clutter 1.0.
Description of the change
To post a comment you must log in.
Revision history for this message
Matt Layman (mblayman) wrote : | # |
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'entertainerlib/client/media_player.py' |
2 | --- entertainerlib/client/media_player.py 2009-06-30 01:06:01 +0000 |
3 | +++ entertainerlib/client/media_player.py 2009-12-22 03:13:15 +0000 |
4 | @@ -105,7 +105,9 @@ |
5 | self.next() |
6 | elif message.type == gst.MESSAGE_ERROR: |
7 | self.video_texture.set_playing(False) |
8 | - self.video_texture.set_property("position", 0) |
9 | + # XXX: laymansterms - I don't know the implications of removing the |
10 | + # position property. |
11 | + #self.video_texture.set_property("position", 0) |
12 | err, debug = message.parse_error() |
13 | self.logger.error("Error: %(err)s, %(debug)s" % \ |
14 | {'err': err, 'debug': debug}) |
15 | @@ -167,7 +169,9 @@ |
16 | or self.media.get_type() == Playable.VIDEO_STREAM: |
17 | self.video_texture.set_playing(False) |
18 | self.video_texture.set_uri(playable.get_uri()) |
19 | - self.video_texture.set_property("position", 0) |
20 | + # XXX: laymansterms - I don't know the implications of removing the |
21 | + # position property. |
22 | + #self.video_texture.set_property("position", 0) |
23 | |
24 | def get_media(self): |
25 | '''Get URI of the current media stream.''' |
26 | @@ -248,7 +252,9 @@ |
27 | self.stage.set_color(self.bgcolor) |
28 | self.stage.remove(self.video_texture) |
29 | self.video_texture.set_playing(False) |
30 | - self.video_texture.set_property("position", 0) |
31 | + # XXX: laymansterms - I don't know the implications of removing the |
32 | + # position property. |
33 | + #self.video_texture.set_property("position", 0) |
34 | self.emit('stop') |
35 | |
36 | if self._internal_callback_timeout_key is not None: |
37 | |
38 | === modified file 'entertainerlib/gui/screens/factory.py' |
39 | --- entertainerlib/gui/screens/factory.py 2009-12-22 03:13:15 +0000 |
40 | +++ entertainerlib/gui/screens/factory.py 2009-12-22 03:13:15 +0000 |
41 | @@ -3,15 +3,15 @@ |
42 | |
43 | # XXX: laymansterms - comment out most of the imports to control how much of |
44 | # clutter needs to be converted |
45 | -#from entertainerlib.gui.screens.artist import Artist |
46 | -#from entertainerlib.gui.screens.album import Album |
47 | -#from entertainerlib.gui.screens.audio_play import AudioPlay |
48 | +from entertainerlib.gui.screens.artist import Artist |
49 | +from entertainerlib.gui.screens.album import Album |
50 | +from entertainerlib.gui.screens.audio_play import AudioPlay |
51 | #from entertainerlib.gui.screens.disc import Disc |
52 | from entertainerlib.gui.screens.feed import Feed |
53 | from entertainerlib.gui.screens.feed_entry import FeedEntry |
54 | from entertainerlib.gui.screens.main import Main |
55 | #from entertainerlib.gui.screens.movie import Movie |
56 | -#from entertainerlib.gui.screens.music import Music |
57 | +from entertainerlib.gui.screens.music import Music |
58 | #from entertainerlib.gui.screens.photo import Photo |
59 | #from entertainerlib.gui.screens.photo_albums import PhotoAlbums |
60 | #from entertainerlib.gui.screens.photographs import Photographs |
61 | |
62 | === modified file 'entertainerlib/gui/tabs/albums_tab.py' |
63 | --- entertainerlib/gui/tabs/albums_tab.py 2009-07-29 03:09:34 +0000 |
64 | +++ entertainerlib/gui/tabs/albums_tab.py 2009-12-22 03:13:15 +0000 |
65 | @@ -54,11 +54,13 @@ |
66 | # Create album information (displays current menuitem information) |
67 | self.album_title = Label(0.045, "title", 0.22, 0.79, "") |
68 | self.album_title.set_ellipsize(pango.ELLIPSIZE_END) |
69 | + self.album_title.set_line_wrap(False) |
70 | self.album_title.width = 0.366 |
71 | self.add(self.album_title) |
72 | |
73 | self.album_artist = Label(0.037, "subtitle", 0.22, 0.86, "") |
74 | self.album_artist.set_ellipsize(pango.ELLIPSIZE_END) |
75 | + self.album_artist.set_line_wrap(False) |
76 | self.album_artist.width = 0.366 |
77 | self.add(self.album_artist) |
78 | |
79 | |
80 | === modified file 'entertainerlib/gui/tabs/artists_tab.py' |
81 | --- entertainerlib/gui/tabs/artists_tab.py 2009-07-29 03:09:34 +0000 |
82 | +++ entertainerlib/gui/tabs/artists_tab.py 2009-12-22 03:13:15 +0000 |
83 | @@ -37,6 +37,7 @@ |
84 | # Create artist label |
85 | self.artist_title = Label(0.0416, "title", 0.22, 0.794, "") |
86 | self.artist_title.set_ellipsize(pango.ELLIPSIZE_END) |
87 | + self.artist_title.set_line_wrap(False) |
88 | self.artist_title.width = 0.366 |
89 | self.add(self.artist_title) |
90 | |
91 | @@ -46,7 +47,7 @@ |
92 | self.artist_tracks = Label(0.0365, "subtitle", 0.22, 0.911, "") |
93 | self.add(self.artist_tracks) |
94 | |
95 | - # Create artis menu list indicator |
96 | + # Create artist menu list indicator |
97 | self.li = ListIndicator(0.77, 0.8, 0.18, 0.045, |
98 | ListIndicator.VERTICAL) |
99 | self.li.set_maximum(len(artists)) |
100 | |
101 | === modified file 'entertainerlib/gui/tabs/tab.py' |
102 | --- entertainerlib/gui/tabs/tab.py 2009-07-29 03:09:34 +0000 |
103 | +++ entertainerlib/gui/tabs/tab.py 2009-12-22 03:13:15 +0000 |
104 | @@ -39,9 +39,9 @@ |
105 | } |
106 | |
107 | # show/hide animation on the Tab |
108 | - self.timeline = clutter.Timeline(30, 60) |
109 | + self.timeline = clutter.Timeline(500) |
110 | self.timeline.connect('completed', self._on_timeline_completed) |
111 | - self.alpha = clutter.Alpha(self.timeline, clutter.smoothstep_inc_func) |
112 | + self.alpha = clutter.Alpha(self.timeline, clutter.EASE_IN_OUT_SINE) |
113 | self.behaviour = clutter.BehaviourOpacity(0, 255, self.alpha) |
114 | self.behaviour.apply(self) |
115 | |
116 | |
117 | === modified file 'entertainerlib/gui/tabs/tracks_tab.py' |
118 | --- entertainerlib/gui/tabs/tracks_tab.py 2009-07-29 03:09:34 +0000 |
119 | +++ entertainerlib/gui/tabs/tracks_tab.py 2009-12-22 03:13:15 +0000 |
120 | @@ -34,11 +34,13 @@ |
121 | |
122 | self.track_title = Label(0.045, "title", 0.22, 0.79, "") |
123 | self.track_title.set_ellipsize(pango.ELLIPSIZE_END) |
124 | + self.track_title.set_line_wrap(False) |
125 | self.track_title.width = 0.366 |
126 | self.add(self.track_title) |
127 | |
128 | self.track_number = Label(0.037, "subtitle", 0.22, 0.86, "") |
129 | self.track_number.set_ellipsize(pango.ELLIPSIZE_END) |
130 | + self.track_number.set_line_wrap(False) |
131 | self.track_number.width = 0.366 |
132 | self.add(self.track_number) |
133 | |
134 | |
135 | === modified file 'entertainerlib/gui/widgets/image_menu.py' |
136 | --- entertainerlib/gui/widgets/image_menu.py 2009-07-29 03:09:34 +0000 |
137 | +++ entertainerlib/gui/widgets/image_menu.py 2009-12-22 03:13:15 +0000 |
138 | @@ -72,9 +72,13 @@ |
139 | pix_buffer = gtk.gdk.pixbuf_new_from_file( |
140 | self.config.theme.getImage("default_movie_art")) |
141 | self.movie_default = RoundedTexture(0.0, 0.0, 0.1, 0.25, pix_buffer) |
142 | + self.movie_default.hide() |
143 | + self.add(self.movie_default) |
144 | |
145 | self.album_default = Texture( |
146 | self.config.theme.getImage("default_album_art")) |
147 | + self.album_default.hide() |
148 | + self.add(self.album_default) |
149 | |
150 | def add_item(self, texture, data): |
151 | """Add a ImageMenuItem from a Texture.""" |
152 | @@ -118,7 +122,9 @@ |
153 | pix_buffer = gtk.gdk.pixbuf_new_from_file(item[0]) |
154 | texture = RoundedTexture(0.0, 0.0, 0.1, 0.25, pix_buffer) |
155 | else: |
156 | - texture = clutter.CloneTexture(self.movie_default) |
157 | + # XXX: laymansterms - something is fishy. Images aren't showing |
158 | + # up using Clone. Must be related to the clutter warning. |
159 | + texture = clutter.Clone(self.movie_default) |
160 | |
161 | self.add_item(texture, item[1]) |
162 | |
163 | @@ -142,7 +148,9 @@ |
164 | if item[1].has_album_art(): |
165 | texture = Texture(item[0]) |
166 | else: |
167 | - texture = clutter.CloneTexture(self.album_default) |
168 | + # XXX: laymansterms - something is fishy. Images aren't showing |
169 | + # up using Clone. Must be related to the clutter warning. |
170 | + texture = clutter.Clone(self.album_default) |
171 | |
172 | self.add_item(texture, item[1]) |
173 | |
174 | |
175 | === modified file 'entertainerlib/gui/widgets/loading_animation.py' |
176 | --- entertainerlib/gui/widgets/loading_animation.py 2009-07-12 17:02:32 +0000 |
177 | +++ entertainerlib/gui/widgets/loading_animation.py 2009-12-22 03:13:16 +0000 |
178 | @@ -5,12 +5,11 @@ |
179 | import cairo |
180 | import clutter |
181 | import gobject |
182 | -from cluttercairo import CairoTexture |
183 | |
184 | from entertainerlib.gui.widgets.base import Base |
185 | |
186 | |
187 | -class LoadingAnimation(Base, CairoTexture): |
188 | +class LoadingAnimation(Base, clutter.CairoTexture): |
189 | """ |
190 | Loading animation widget |
191 | |
192 | @@ -23,7 +22,7 @@ |
193 | |
194 | abs_size = self.get_abs_x(size) |
195 | |
196 | - CairoTexture.__init__(self, abs_size, abs_size) |
197 | + clutter.CairoTexture.__init__(self, abs_size, abs_size) |
198 | |
199 | self.set_anchor_point(abs_size / 2, abs_size / 2) |
200 | |
201 | @@ -83,11 +82,9 @@ |
202 | return self.keep_going |
203 | |
204 | def hide(self): |
205 | - """ |
206 | - Hide throbber smoothly and stop animation. |
207 | - """ |
208 | - timeline = clutter.Timeline(35, 26) |
209 | - alpha = clutter.Alpha(timeline, clutter.smoothstep_inc_func) |
210 | + '''Hide throbber smoothly and stop animation.''' |
211 | + timeline = clutter.Timeline(2000) |
212 | + alpha = clutter.Alpha(timeline, clutter.EASE_IN_OUT_SINE) |
213 | self.behaviour = clutter.BehaviourOpacity(255, 0, alpha) |
214 | self.behaviour.apply(self) |
215 | timeline.start() |
216 | @@ -100,14 +97,12 @@ |
217 | return True |
218 | else: |
219 | self.keep_going = False |
220 | - CairoTexture.hide(self) |
221 | + clutter.CairoTexture.hide(self) |
222 | return False |
223 | |
224 | def show(self): |
225 | - """ |
226 | - Show throbber and activate animation |
227 | - """ |
228 | + '''Show throbber and activate animation.''' |
229 | self.keep_going = True |
230 | gobject.timeout_add(50, self._rotate_throbber) |
231 | - CairoTexture.show(self) |
232 | + clutter.CairoTexture.show(self) |
233 | |
234 | |
235 | === modified file 'entertainerlib/gui/widgets/progress_bar.py' |
236 | --- entertainerlib/gui/widgets/progress_bar.py 2009-06-30 01:06:01 +0000 |
237 | +++ entertainerlib/gui/widgets/progress_bar.py 2009-12-22 03:13:16 +0000 |
238 | @@ -5,7 +5,6 @@ |
239 | import math |
240 | |
241 | import clutter |
242 | -from cluttercairo import CairoTexture |
243 | |
244 | from entertainerlib.gui.widgets.base import Base |
245 | from entertainerlib.gui.widgets.label import Label |
246 | @@ -36,12 +35,12 @@ |
247 | self._color = self._color_to_cairo_color( |
248 | self.config.theme.get_color(color)) |
249 | |
250 | - self._background = CairoTexture(self.bar_width, self.height) |
251 | + self._background = clutter.CairoTexture(self.bar_width, self.height) |
252 | self._draw_background() |
253 | self._background.set_position(self.bar_x, 0) |
254 | self.add(self._background) |
255 | |
256 | - self._foreground = CairoTexture(self.height, self.height) |
257 | + self._foreground = clutter.CairoTexture(self.height, self.height) |
258 | self._foreground.set_anchor_point_from_gravity(clutter.GRAVITY_CENTER) |
259 | self._draw_foreground() |
260 | self._foreground.set_position(self.bar_x, 0) |
261 | @@ -59,8 +58,8 @@ |
262 | self._hide_timeout_key = None |
263 | self.auto_display = False |
264 | self._visible = None |
265 | - self._timeline = clutter.Timeline(30, 60) |
266 | - self._alpha = clutter.Alpha(self._timeline, clutter.smoothstep_inc_func) |
267 | + self._timeline = clutter.Timeline(500) |
268 | + self._alpha = clutter.Alpha(self._timeline, clutter.EASE_IN_OUT_SINE) |
269 | self._behaviour = clutter.BehaviourOpacity(0, 255, self._alpha) |
270 | self._behaviour.apply(self) |
271 | |
272 | |
273 | === modified file 'entertainerlib/gui/widgets/reflection_texture.py' |
274 | --- entertainerlib/gui/widgets/reflection_texture.py 2009-07-12 17:02:32 +0000 |
275 | +++ entertainerlib/gui/widgets/reflection_texture.py 2009-12-22 03:13:16 +0000 |
276 | @@ -4,12 +4,11 @@ |
277 | import gtk |
278 | import cairo |
279 | import clutter |
280 | -from cluttercairo import CairoTexture |
281 | |
282 | from entertainerlib.gui.widgets.base import Base |
283 | |
284 | |
285 | -class ReflectionTexture(Base, CairoTexture): |
286 | +class ReflectionTexture(Base, clutter.CairoTexture): |
287 | """ |
288 | Reflection texture |
289 | |
290 | @@ -24,7 +23,7 @@ |
291 | abs_width = self.get_abs_x(width) |
292 | abs_height = self.get_abs_y(height) |
293 | |
294 | - CairoTexture.__init__(self, abs_width, abs_height) |
295 | + clutter.CairoTexture.__init__(self, abs_width, abs_height) |
296 | |
297 | context = self.cairo_create() |
298 | ct = gtk.gdk.CairoContext(context) |
299 | |
300 | === modified file 'entertainerlib/gui/widgets/rounded_texture.py' |
301 | --- entertainerlib/gui/widgets/rounded_texture.py 2009-07-12 17:02:32 +0000 |
302 | +++ entertainerlib/gui/widgets/rounded_texture.py 2009-12-22 03:13:16 +0000 |
303 | @@ -1,13 +1,13 @@ |
304 | # Copyright (c) 2009 Entertainer Developers - See COPYING - GPLv2 |
305 | '''Cairo based texture that rounds corners''' |
306 | |
307 | -from cluttercairo import CairoTexture |
308 | +import clutter |
309 | import gtk |
310 | |
311 | from entertainerlib.gui.widgets.base import Base |
312 | |
313 | |
314 | -class RoundedTexture(Base, CairoTexture): |
315 | +class RoundedTexture(Base, clutter.CairoTexture): |
316 | """ |
317 | Texture with rounded corners |
318 | |
319 | @@ -21,7 +21,7 @@ |
320 | abs_width = self.get_abs_x(width) |
321 | abs_height = self.get_abs_y(height) |
322 | |
323 | - CairoTexture.__init__(self, abs_width, abs_height) |
324 | + clutter.CairoTexture.__init__(self, abs_width, abs_height) |
325 | |
326 | context = self.cairo_create() |
327 | ct = gtk.gdk.CairoContext(context) |
328 | |
329 | === modified file 'entertainerlib/gui/widgets/special_behaviours.py' |
330 | --- entertainerlib/gui/widgets/special_behaviours.py 2009-12-22 03:13:15 +0000 |
331 | +++ entertainerlib/gui/widgets/special_behaviours.py 2009-12-22 03:13:16 +0000 |
332 | @@ -25,9 +25,6 @@ |
333 | alpha = MAX_ALPHA positioned at end_index |
334 | """ |
335 | raw_index = alpha_value * (self.end_index - self.start_index) |
336 | - # XXX: laymansterms - alpha seems to be 1.0 now so MAX_ALPHA doesn't |
337 | - # seem to do anything anymore |
338 | - #raw_index /= clutter.MAX_ALPHA |
339 | raw_index += self.start_index |
340 | |
341 | # we rescale the raw_index to be inside [0, 1[ |
342 | @@ -66,9 +63,6 @@ |
343 | def do_alpha_notify(self, alpha_value): |
344 | """Alpha function changing the `font-size` property of Labels.""" |
345 | size = alpha_value * (self.end_size - self.start_size) |
346 | - # XXX: laymansterms - alpha seems to be 1.0 now so MAX_ALPHA doesn't |
347 | - # seem to do anything anymore |
348 | - #size /= clutter.MAX_ALPHA |
349 | size += self.start_size |
350 | |
351 | for actor in self.get_actors(): |
352 | |
353 | === modified file 'entertainerlib/gui/widgets/tab_group.py' |
354 | --- entertainerlib/gui/widgets/tab_group.py 2009-08-16 21:27:15 +0000 |
355 | +++ entertainerlib/gui/widgets/tab_group.py 2009-12-22 03:13:16 +0000 |
356 | @@ -113,8 +113,8 @@ |
357 | tab_title.set_reactive(True) |
358 | tab_title.connect('button-press-event', self._on_tab_title_button_press) |
359 | |
360 | - timeline = clutter.Timeline(25, 60) |
361 | - alpha = clutter.Alpha(timeline, clutter.smoothstep_inc_func) |
362 | + timeline = clutter.Timeline(500) |
363 | + alpha = clutter.Alpha(timeline, clutter.EASE_IN_OUT_SINE) |
364 | behaviour = clutter.BehaviourOpacity(255, 96, alpha) |
365 | behaviour.apply(tab_title) |
366 | self.timelines.append((timeline, alpha, behaviour)) |
367 | |
368 | === modified file 'entertainerlib/gui/widgets/text_menu.py' |
369 | --- entertainerlib/gui/widgets/text_menu.py 2009-12-22 03:13:15 +0000 |
370 | +++ entertainerlib/gui/widgets/text_menu.py 2009-12-22 03:13:16 +0000 |
371 | @@ -98,21 +98,20 @@ |
372 | TextMenuItem.__init__(self, width, height, text, extra_text) |
373 | |
374 | self.move_anchor_point_from_gravity(clutter.GRAVITY_WEST) |
375 | - self.font_size = 0.025 |
376 | + self.font_size = 0.03 |
377 | self.update() |
378 | |
379 | - self.timeline = clutter.Timeline(500) |
380 | - # XXX: laymansterms - play with different functions to make sure this |
381 | - # is the correct one |
382 | + self.timeline = clutter.Timeline(200) |
383 | alpha = clutter.Alpha(self.timeline, clutter.EASE_IN_OUT_SINE) |
384 | self.behaviour = FontSizeBehaviour(alpha) |
385 | self.behaviour.apply(self) |
386 | |
387 | def animate_in(self): |
388 | """Set labels font-size and color when an item gets selected.""" |
389 | - self.timeline.stop() |
390 | - self.font_size = 0.05 |
391 | + self.behaviour.start_size = 0.03 |
392 | + self.behaviour.end_size = 0.05 |
393 | self.color = "menuitem_active" |
394 | + self.timeline.start() |
395 | self.update() |
396 | |
397 | def animate_out(self): |
398 | @@ -120,7 +119,7 @@ |
399 | self.color = "menuitem_inactive" |
400 | self.update() |
401 | self.behaviour.start_size = 0.05 |
402 | - self.behaviour.end_size = 0.025 |
403 | + self.behaviour.end_size = 0.03 |
404 | self.timeline.start() |
405 | |
406 |
Branch 4 of clutter 1.0 transition.