Merge lp:~samuel-buffet/entertainer/clutter-0-8 into lp:entertainer
- clutter-0-8
- Merge into trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | not available | ||||
Proposed branch: | lp:~samuel-buffet/entertainer/clutter-0-8 | ||||
Merge into: | lp:entertainer | ||||
To merge this branch: | bzr merge lp:~samuel-buffet/entertainer/clutter-0-8 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Matt Layman | Approve | ||
Joshua Scotton | Approve | ||
Review via email: mp+1710@code.launchpad.net |
Commit message
Description of the change
Samuel Buffet (samuel-buffet) wrote : | # |
Samuel Buffet (samuel-buffet) wrote : | # |
The diff.
=== modified file 'entertainerlib
--- entertainerlib/
+++ entertainerlib/
@@ -69,7 +69,6 @@
# Activate albums tab when screen is opened
- self.albums_
@@ -99,6 +98,7 @@
Create a list of tracks
"""
+ self.tracks_
cursor = clutter.Rectangle()
=== modified file 'entertainerlib
--- entertainerlib/
+++ entertainerlib/
@@ -182,6 +182,7 @@
+ lyrics_
return lyrics_tab
def _lyrics_
@@ -212,6 +213,8 @@
Create a tab that displays tracks on current playlist.
"""
+
+ playlist_
return playlist_tab
def update(self, track):
=== modified file 'entertainerlib
--- entertainerlib/
+++ entertainerlib/
@@ -298,6 +298,7 @@
+ albums_
return albums_tab
def _create_
@@ -335,6 +336,7 @@
+ playlists_
return playlists_tab
def _update_
=== modified file 'entertainerlib
--- entertainerlib/
+++ entertainerlib/
@@ -33,6 +33,7 @@
+ rect.hide()
def update(self):
=== modified file 'entertainerlib
--- entertainerlib/
+++ entertainerlib/
@@ -45,6 +45,8 @@
else:
+ self.hide_tab()
+
def can_activate(self):
"""
Allow if we have some TV-series indexed.
=== modified file 'entertainerlib
--- entertainerlib/
+++ entertainerlib/
@@ -45,6 +45,8 @@
...
Matt Layman (mblayman) wrote : | # |
Samuel, just a couple of comments:
`make check` fails because of a call to pygst.require. I think it's okay to get rid of the require command since that is something that we can be sure to enforce through a package dependency.
Would it be possible to make MenuOverlay be a subclass of our Texture widget instead of clutter.Texture? I'd like to minimize how much we directly call clutter when we've created special widgets (like Texture) just for the purpose of wrapping up the clutter equivalent. I recognize that most of the advantage of creating a Texture widget is now largely defeated since the new clutter Texture can take a filename, but there is still some positioning logic in the Texture widget that will help us in the future.
In the media_player.py file, where import order is important, can you add a comment indicating that the order is important (because it defies our normal convention of list imports in alphabetical order)?
Otherwise, aside from visible regressions that obviously aren't your fault, I think that this is a good start so that we can be productive again.
- 310. By Samuel Buffet
-
pygst.require is removed as it breaks *make check*
We will handle that through package dependency - 311. By Samuel Buffet
-
a comment is added to warn about Clutter's import directives order wich is now important
- 312. By Samuel Buffet
-
MenuOverlay inherits from Texture widget now
- 313. By Samuel Buffet
-
an encoding is setup to this file because of special characters present in the previously added comment from pyclutter 0.8 README
- 314. By Samuel Buffet
-
small updates to make pylint happy
Samuel Buffet (samuel-buffet) wrote : | # |
that's fixed Matt.
Here is the new diff :
=== modified file 'entertainerlib
--- entertainerlib/
+++ entertainerlib/
@@ -69,7 +69,6 @@
# Activate albums tab when screen is opened
- self.albums_
@@ -99,6 +98,7 @@
Create a list of tracks
"""
+ self.tracks_
cursor = clutter.Rectangle()
=== modified file 'entertainerlib
--- entertainerlib/
+++ entertainerlib/
@@ -182,6 +182,7 @@
+ lyrics_
return lyrics_tab
def _lyrics_
@@ -212,6 +213,8 @@
Create a tab that displays tracks on current playlist.
"""
+
+ playlist_
return playlist_tab
def update(self, track):
=== modified file 'entertainerlib
--- entertainerlib/
+++ entertainerlib/
@@ -298,6 +298,7 @@
+ albums_
return albums_tab
def _create_
@@ -335,6 +336,7 @@
+ playlists_
return playlists_tab
def _update_
=== modified file 'entertainerlib
--- entertainerlib/
+++ entertainerlib/
@@ -33,6 +33,7 @@
+ rect.hide()
def update(self):
=== modified file 'entertainerlib
--- entertainerlib/
+++ entertainerlib/
@@ -45,6 +45,8 @@
else:
+ self.hide_tab()
+
def can_activate(self):
"""
Allow if we have some TV-series indexed.
=== modified file 'entertainerlib
--- entertainerlib/
+++ entertainerlib/
- 315. By Samuel Buffet
-
remove the border width on the rectangle used as cursor on image_menu widgets as it was not wisible previously with clutter 0.6
- 316. By Samuel Buffet
-
delete a .show() in image_menu_item.py because Actors are now shown on creation
- 317. By Samuel Buffet
-
the texture is now correctly sized on ImageMenuItem created in video_clips_tab.py
- 318. By Samuel Buffet
-
delete a menu_overlay.show() in user_interface.py because Actors are now shown on creation
- 319. By Samuel Buffet
-
delete clips_menu.show() in video_clips_tab.py because Actors are now shown on creation
- 320. By Samuel Buffet
-
delete some .show() in photographs_
screen. py because Actors are now shown on creation - 321. By Samuel Buffet
-
delete some .show() in question_dialog.py because Actors are now shown on creation
- 322. By Samuel Buffet
-
delete some .show() in feed_screen.py because Actors are now shown on creation
- 323. By Samuel Buffet
-
delete some .show() in rss_screen.py because Actors are now shown on creation
- 324. By Samuel Buffet
-
delete some .show() in artist_screen.py because Actors are now shown on creation
- 325. By Samuel Buffet
-
delete some .show() in main_screen.py because Actors are now shown on creation
- 326. By Samuel Buffet
-
delete some .show() in video_screen.py because Actors are now shown on creation
- 327. By Samuel Buffet
-
delete some .show() in album_screen.py because Actors are now shown on creation
- 328. By Samuel Buffet
-
delete some self.show() in weather_screen.py because Actors are now shown on creation
- 329. By Samuel Buffet
-
delete some .show() in disc_screen.py because Actors are now shown on creation
- 330. By Samuel Buffet
-
delete self.show() in feed_entry_
screen. py because Actors are now shown on creation - 331. By Samuel Buffet
-
delete some .show() in audio_play_
screen. py because Actors are now shown on creation - 332. By Samuel Buffet
-
delete some .show() in photo_screen.py because Actors are now shown on creation
- 333. By Samuel Buffet
-
delete some .show() in music_screen.py because Actors are now shown on creation
- 334. By Samuel Buffet
-
delete some .show() in movie_screen.py because Actors are now shown on creation
- 335. By Samuel Buffet
-
delete some .show() in tv_serie_screen.py because Actors are now shown on creation
- 336. By Samuel Buffet
-
delete some .show() in tv_serie_
episodes_ screen. py because Actors are now shown on creation - 337. By Samuel Buffet
-
delete some .show() in photoalbums_
screen. py because Actors are now shown on creation - 338. By Samuel Buffet
-
delete some .show() in question_screen.py because Actors are now shown on creation
- 339. By Samuel Buffet
-
delete some .show() in grid_menu.py because Actors are now shown on creation
- 340. By Samuel Buffet
-
delete actor.show() in scroll_menu.py because Actors are now shown on creation
- 341. By Samuel Buffet
-
delete some .show() in list_indicator.py because Actors are now shown on creation
- 342. By Samuel Buffet
-
delete some .show() in eyecandy_texture.py because Actors are now shown on creation
- 343. By Samuel Buffet
-
delete self.show() in scroll_area.py because Actors are now shown on creation
- 344. By Samuel Buffet
-
delete rect.show() in tab_group.py because Actors are now shown on creation
- 345. By Samuel Buffet
-
delete some .show() in progress_bar.py because Actors are now shown on creation
- 346. By Samuel Buffet
-
delete self.show() in texture.py because Actors are now shown on creation
- 347. By Samuel Buffet
-
delete self.show() in label.py because Actors are now shown on creation
- 348. By Samuel Buffet
-
delete some .show() in menu.py because Actors are now shown on creation
Samuel Buffet (samuel-buffet) wrote : | # |
Matt,
I've fixe some other things + removed a lot of useless .show on Actors so here is the new diff :
Entertainer looks quite nice now except the Pango issues you've seen yesterday.
=== modified file 'entertainerlib
--- entertainerlib/
+++ entertainerlib/
@@ -56,13 +56,10 @@
- self.li.show()
- self.show()
-
def _create_
"""
Create a texture that is displayed next to track list. This texture
@@ -76,7 +73,6 @@
self.art = EyeCandyTexture
- self.art.show()
@@ -101,7 +97,6 @@
-
def _create_
"""
Create track menu. This menu contains list of all tracks on album.
@@ -121,7 +116,6 @@
- self.track_
=== modified file 'entertainerlib
--- entertainerlib/
+++ entertainerlib/
@@ -69,9 +69,6 @@
# Activate albums tab when screen is opened
- self.albums_
-
- self.show()
def _create_tabs(self):
"""
@@ -91,7 +88,7 @@
- self.tabs.show()
+
def _create_
@@ -99,6 +96,7 @@
Create a list of tracks
"""
+ self.tracks_
cursor = clutter.Rectangle()
@@ -117,7 +115,6 @@
- self.tracks_
if self.config.
@@ -144,7 +141,6 @@
- self.track_
...
Joshua Scotton (joshuascotton) wrote : | # |
Although this code does not fix all the problems that using 0.8 brought us, it is an essential step on the way.
I can't find anything wrong with it at present and I think when laymanterms is ok with it we can merge into trunk
Screen showed up and buttons appeared, we can build on this to get entertainer looking better than ever! :D
Matt Layman (mblayman) wrote : | # |
Samuel, nice addition of getting rid of all the extra show calls. :)
Some comments:
photoalbums_
video_clips_tab.py: Please revert the change. The method x() and y() in the ui object will go away eventually. I calculated the ratio for the images based on the dimensions that Lauri had initially written (based on percentages of height and width from his original static screen size). If you want to add a comment about what the ratio is (9/16), feel free, but I don't think that we should be calculating it from the object that I'm trying to eventually remove from the screens. Remember that ui.x(.25) and ui.y(.233) will have very different results for monitors of different aspect ratios, but 9/16 will always be 9/16. :)
image_menu.py: Why did you remove?:
media_player.py: Please change to a simple one line comment (and be sure to remove the encoding line at the top of the file). If you want a simple English sentence, I would recommend the following:
# import order is important here, see the pyclutter README for details
`make check` fails with a couple of test failures in Texture_test. I looked at both of the failing tests. Since they have to do with checking pixbufs, I think you can delete both of the tests (testGoodPixbuf and testBadPixbuf). Deleting those tests will also create an unused import of Pixbuf. Please remember to run `make check`, it's really helpful, I promise.
I'm assuming your glade changes are correct.
Thanks for your effort.
- 349. By Samuel Buffet
-
forgotten int Types added
- 350. By Samuel Buffet
-
useless rect removed in photoalbums_
screen. py - 351. By Samuel Buffet
-
removed the dynamic w/h ratio for ImageMenuItem in video_clips_tab.py
- 352. By Samuel Buffet
-
the import order warning message has bee, shorten in media_player.py
- 353. By Samuel Buffet
-
testGoodPixbuf & testBadPixbuf removed from Texture_test.py
Samuel Buffet (samuel-buffet) wrote : | # |
Matt,
>photoalbums_
removed
>video_
reverted to be quick, but I don't really understant why we must have an hardcoded ratio ?
Forcing the w/h ratio to 9/16 when we create the rounded cairo textures of ImageMenuItems make the textures not to fill the complete ImageMenu Cells. Do you have other informations on where does that 9/16 comes from.
>image_menu.py: Why did you remove?:
> c.set_border_
> c.set_border_
because it creates a borde rwith of 5 pix on the cursor. Yeah, that's clearly the goal of the code but that border was not there with 0.6 and I am still wondering why ? I'll revert that if everyone want that to be back but that was a *visual* regression.
>media_player.py: Please change to a simple one line comment (and be sure to remove the encoding line at the top of >the file). If you want a simple English sentence, I would recommend the following:
># import order is important here, see the pyclutter README for details
changed to your shorter version
>`make check` fails with a couple of test failures in Texture_test. I looked at both of the failing tests. Since they have to >do with checking pixbufs, I think you can delete both of the tests (testGoodPixbuf and testBadPixbuf). Deleting those >tests will also create an unused import of Pixbuf. Please remember to run `make check`, it's really helpful, I promise.
removed. I run *make check* Matt. But when doing make check I always have a bunch of errors always take a look to what's related to my modifications. I guess I'll need to take a closer look to that as it seems you don't have those errors.
Samuel,
Matt Layman (mblayman) wrote : | # |
Samuel,
>photoalbums_
removed
Thanks.
>video_
reverted to be quick, but I don't really understant why we must have an hardcoded ratio ?
I believe that we have a hardcoded ratio in this case because the images that are downloaded conform to that ratio.
If you're asking for the more general reason of why we use ratios of ImageMenuItems, then here is the answer. ImageMenuItems used to take two parameters, an x value and a y value. These two parameters were calculated using ui.x() and ui.y(). The x() and y() methods generate absolute values by doing a calculation like "result = screen_width * percent" for x(percent) and "result = screen_height * percent" for y(percent). The problem with this method is that monitors of different aspect ratios will produce wildly different results.
Let's pick a very contrived example. Assume you're working on a square monitor of 1000 x 1000. To make a square ImageMenuItem, all you would need in the old method is something like "ImageMenuItem(
>Forcing the w/h ratio to 9/16 when we create the rounded cairo textures of ImageMenuItems make the textures not to fill the complete ImageMenu Cells.
If this is true, it is a bug that should be fixed with the ImageMenu cells. I really need to find some movie material because I'm not able to see what you're testing.
Do you have other informations on where does that 9/16 comes from.
9/16 comes from a reverse engineering of the code that Lauri orginally wrote. Lauri originally used a screen resolution of 1366 x 768. This value pair was hardcoded into the UI object and all sizes (calls to ui.x() and ui.y()) in the interface were percentages based on the pair. When I came to the image menu item code, I calculated the absolute sizes of the images that he intended to get the width and height. I then divided the two values to get the ratio. ...
Samuel Buffet (samuel-buffet) wrote : | # |
>I believe that we have a hardcoded ratio in this case because the images that are downloaded conform to that ratio.
>If you're asking for the more general reason of why we use ratios of ImageMenuItems, then here is the answer.
>ImageMenuItems used to take two parameters, an x value and a y value. These two parameters were calculated using
>ui.x() and ui.y(). The x() and y() methods generate absolute values by doing a calculation like "result = screen_width *
>percent" for x(percent) and "result = screen_height * percent" for y(percent). The problem with this method is that
>monitors of different aspect ratios will produce wildly different results.
>Let's pick a very contrived example. Assume you're working on a square monitor of 1000 x 1000. To make a square
>ImageMenuItem, all you would need in the old method is something like "ImageMenuItem(
>different user might be on a display with a different aspect ratio, let's choose 2000 x 1000. Now the same code that is
>above will not produce a square, but will instead produce a rectangle. With the new syntax, we can just say
>ImageMenuItem(.5, 1) and it will produce a square for either monitor because y is calculated relative to x. This is the
>reason that I chose to use hardcoded ratios. Hopefully, this is a satisfactory answer for what you were asking.
>>Forcing the w/h ratio to 9/16 when we create the rounded cairo textures of ImageMenuItems make the textures not to
>fill the complete ImageMenu Cells.
>If this is true, it is a bug that should be fixed with the ImageMenu cells. I really need to find some movie material
>because I'm not able to see what you're testing.
>Do you have other informations on where does that 9/16 comes from.
>9/16 comes from a reverse engineering of the code that Lauri orginally wrote. Lauri originally used a screen resolution
>of 1366 x 768. This value pair was hardcoded into the UI object and all sizes (calls to ui.x() and ui.y()) in the interface
>were percentages based on the pair. When I came to the image menu item code, I calculated the absolute sizes of the
>images that he intended to get the width and height. I then divided the two values to get the ratio. I can only assume
>that he either a) choose the ratio because it looked nice or b) the ratio was dictated by the dimensions of the images
>we download from imdb.
Hmm, that make sens. So a correct fix could be to use the same logic with the set_item_size() function of the GridMenu Class so that GridMenu Cells and ImageMenuItems will have the same size.
Matt Layman (mblayman) wrote : | # |
That's probably correct. The GridMenu class might be the biggest damn mess in the whole project. All 723 lines of that file are in need of some serious lovin' and test cases. If I had been a really good developer, I probably would have started with GridMenu with my widget refactoring, but I wasn't ready to commit to that effort at the time. It will be a very good day when we clean up that file completely.
The idea of this proposal is to have a trunk compatible with Clutter 0.8.
With this branch, Entertainer *is working*, the API changes which had spectacular effects are fixed.
Now there's probably a lot of polishing to do but I think that can be done in common step by step.