From d60e21c9eba2012f5df9a96d0c699d1e3523e903 Mon Sep 17 00:00:00 2001 From: noisymime Date: Tue, 6 May 2008 11:24:36 +0000 Subject: [PATCH] - Fixed selection bug in video player --- modules/music_player/music_objects/song.py | 6 +++++- modules/video_player/elements/cover_viewer.py | 2 +- themes/Pear/music/songlist_off.png | Bin 0 -> 3097 bytes ui_elements/image_grid.py | 3 ++- ui_elements/label_list.py | 9 ++++++--- 5 files changed, 14 insertions(+), 6 deletions(-) create mode 100644 themes/Pear/music/songlist_off.png diff --git a/modules/music_player/music_objects/song.py b/modules/music_player/music_objects/song.py index 3513a20..25117d9 100644 --- a/modules/music_player/music_objects/song.py +++ b/modules/music_player/music_objects/song.py @@ -61,11 +61,15 @@ class song: return None tag.link(filename) + if self.music_player.glossMgr.debug: print "Music_Player: eyeD3 tag linked to file '%s'" % filename images = tag.getImages() + if self.music_player.glossMgr.debug: print "Music_Player: found %i images in file '%s'" % (len(images), filename) + for img in images: try: - #print "Image Mine Type: " + str(img.mimeType) + if self.music_player.glossMgr.debug: print "Music_Player: Image Mine Type: " + str(img.mimeType) + data = img.imageData loader = gtk.gdk.PixbufLoader() loader.write(data) diff --git a/modules/video_player/elements/cover_viewer.py b/modules/video_player/elements/cover_viewer.py index faaebd7..590a3e2 100644 --- a/modules/video_player/elements/cover_viewer.py +++ b/modules/video_player/elements/cover_viewer.py @@ -58,7 +58,7 @@ class coverViewer(ImageGrid): if self.textureLibrary[self.currentSelection].isFolder: return None #self.folderLibrary[(self.currentSelection-len(self.folderLibrary))] else: - return self.textureLibrary[(self.currentSelection-len(self.folderLibrary))] + return self.textureLibrary[(self.currentSelection-len(self.folderLibrary))+1] def set_details_update(self, on_off, details): self.update_details = on_off diff --git a/themes/Pear/music/songlist_off.png b/themes/Pear/music/songlist_off.png new file mode 100644 index 0000000000000000000000000000000000000000..856f8b0fea9e5e5052c415f35443b7363393ddad GIT binary patch literal 3097 zcmV+!4CeERP)StO&>uS)ve<0AYj>5AR{$W90N^4L=L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!?VLesgFqNYA9Ia>P{;w)xyk5qjuQ|Hy=5Ta zCH`*GWkU#4GSs(tTlsjth-i?A0Ek8qwbmva>0pgG(P~w#HI8zymS@vp4*O-;-rJ~k zT?63K@Cwv|D_x#KM>)z-j_Q3Bu=O~sH>PRo_lCi{D`hE5l%*_XDeE7|8gkCcc)+qO zkx~kP6L9V9xlC_dA_AsqvYzLDf*Xo>T2?4aS;|tDvXrGPWhqNp%2JlHl%*_XDeL{R z)^%0JbFy|)O0g`9LLQKF4&Vb|NGZiQj!{Zcj=V%ECB||5d9gD9>|VB{@xQot-$%>e z++-P+7?v287?v``u*9&$u#_Q&C59!2C1O}&SYlWrh9!n2#|&%p;{?)*d7cCKf!)*Lnf00000NkvXXu0mjf?y2Q{ literal 0 HcmV?d00001 diff --git a/ui_elements/image_grid.py b/ui_elements/image_grid.py index 2f03079..c521684 100644 --- a/ui_elements/image_grid.py +++ b/ui_elements/image_grid.py @@ -269,7 +269,8 @@ class ImageGrid(clutter.Group): return self.textureLibrary[self.currentSelection] def get_current_item(self): - return self.itemLibrary[(self.currentSelection-len(self.folderLibrary))] + cur_item_no = (self.currentSelection-len(self.folderLibrary)) + return self.itemLibrary[cur_item_no] #Was get_item_x() def get_texture_x(self, itemNo): diff --git a/ui_elements/label_list.py b/ui_elements/label_list.py index e7f4645..f643a55 100644 --- a/ui_elements/label_list.py +++ b/ui_elements/label_list.py @@ -66,9 +66,10 @@ class LabelList(clutter.Group): themeMgr.setup_actor(self, element, themeMgr.stage) img_element = themeMgr.search_docs("label_list", id).getElementsByTagName("texture") - if len(img_element) > 0: img_element = img_element[0].childNodes - #img_element = themeMgr.find_element(element, "id", "inactive_background") - self.inactive_item_background = themeMgr.get_texture("inactive_background", self, element = img_element) + img_element = themeMgr.find_element(img_element, "id", "inactive_background") + if not img_element is None: + img_element = img_element.childNodes + self.inactive_item_background = themeMgr.get_texture("inactive_background", self, element = img_element) def on_key_press_event (self, event): self.input_queue.input(event) @@ -289,6 +290,8 @@ class ListItem(clutter.Group): self.scale_step_medium = label_list.zoomStep1 self.scale_step_none = label_list.zoomStep2 + self.set_width(label_list.get_width()) + #setup the label/s self.add(self.label_left) self.label_left.show()