=== modified file 'entertainerlib/frontend/gui/screens/photographs_screen.py' --- entertainerlib/frontend/gui/screens/photographs_screen.py 2008-12-05 18:26:33 +0000 +++ entertainerlib/frontend/gui/screens/photographs_screen.py 2009-01-03 15:16:54 +0000 @@ -98,32 +98,9 @@ photographs[1:]) return False else: - if self.config.show_effects(): - timeline = clutter.Timeline(35, 26) - alpha = clutter.Alpha(timeline, clutter.smoothstep_inc_func) - self.behaviour = clutter.BehaviourOpacity(255, 0, alpha) - self.behaviour.apply(self.throbber) - timeline.connect('completed', self._remove_throbber, None) - timeline.start() - else: - self.throbber.hide() - self.remove(self.throbber) - del self.throbber + self.throbber.hide() return False - def _remove_throbber(self, timeline, actor): - """ - Callback function for timeline that fades out photograph menu throbber. - This is called when animation is finished and we are free to remove - throbber from memory. - @param timeline: clutter.Timeline object - @param actor: clutter.Actor object - """ - # TODO: Figure out if/how timeline and actor should be used - self.throbber.hide() - self.remove(self.throbber) - del self.throbber - def _update_image_info(self, number): """ Update image information box. === modified file 'entertainerlib/frontend/gui/widgets/grid_menu.py' --- entertainerlib/frontend/gui/widgets/grid_menu.py 2008-11-17 21:45:53 +0000 +++ entertainerlib/frontend/gui/widgets/grid_menu.py 2009-01-03 15:16:54 +0000 @@ -60,7 +60,6 @@ self.active = True # Is this menu active self.content_timeline = None # Content scroll timeline self.cursor_timeline = None # Cursor move timeline - self.optimize_memory = False # Should we optimize memory usage self.add(self.itemgroup) @@ -69,16 +68,6 @@ c.set_color((255, 0, 0, 128)) self.set_cursor(c) - def optimize_memory_usage(self, boolean): - """ - This method can be used to change widget's memory consuption. When - memory usage is optimized, only visible menuitems are kept in memory. - This saves memory, but the menu might be slower when scrolled. - @param boolean: True to set optimize on, False to disable optimization - """ - #FIXME: When changed relize or unrealize needed menuitems. - self.optimize_memory = boolean - def set_cursor(self, cursor): """ Set cursor actor. This is usually a Texture or clutter.Rectangle. @@ -423,7 +412,6 @@ if cur_y == 0: if con_y > 0: self._move_content(1, self.DOWN) - self._update_memory_state() else: self._move_cursor(self.UP) elif direction == self.DOWN: @@ -432,7 +420,6 @@ else: if con_y < content_scroll_max: self._move_content(1, self.UP) - self._update_memory_state() elif direction == self.LEFT: if cur_x > 0: self._move_cursor(self.LEFT) @@ -452,7 +439,6 @@ if cur_x == 0: if con_x > 0: self._move_content(1, self.RIGHT) - self._update_memory_state() else: self._move_cursor(self.LEFT) elif direction == self.RIGHT: @@ -461,7 +447,6 @@ else: if con_x < content_scroll_max: self._move_content(1, self.LEFT) - self._update_memory_state() old_position = self.logical_position @@ -636,24 +621,6 @@ elif direction == self.LEFT: self.itemgroup.move_by(-x_offset, 0) - def _update_memory_state(self): - """This method checks which menuitems are currently on screen area. - - Menuitems that are not on screen at the moment are freed from the - memory. This is done by calling clutter.Actor.unrealize() -method. - This way large menus consume same amount memory as smaller menus. This - method is called every time after content (menuitems) is moved. - """ - # DEBUG information - #print "content position: " + str(self.content_position) - #print "row count: " + str(self.row_count) - #print "cell count: " + str(self.visible_cols) - - if self.optimize_memory: - # TODO: Implement this method. Relize textures on screen and - # unrealize other textures - pass - def _scale_menuitem(self, menuitem): """ Scale menuitem to fit into one cell. Preserves actor's aspect ratio. === modified file 'entertainerlib/tests/Album_test.py' --- entertainerlib/tests/Album_test.py 2008-10-25 17:56:14 +0000 +++ entertainerlib/tests/Album_test.py 2009-01-03 15:16:54 +0000 @@ -67,11 +67,6 @@ album_art = os.path.join(self.art_path, album_artist + ".jpg") self.assertEqual(result, album_art) - def testAlbumGetAlbumArtUrlNot(self): - #TODO: doc string for get_album_art_url mentions raising an exception. - # I don't see it anywhere handled anywhere. - pass - def testAlbumGetTracks(self): """Test that all tracks for an album are returned""" result = self.album.get_tracks() === modified file 'entertainerlib/tests/FrontendFeedLibrary_test.py' --- entertainerlib/tests/FrontendFeedLibrary_test.py 2008-10-25 17:56:14 +0000 +++ entertainerlib/tests/FrontendFeedLibrary_test.py 2009-01-03 15:16:54 +0000 @@ -83,13 +83,6 @@ """ TestCommon.tearDown(self) - def testAddFeed(self): - """ - testAddFeed: This tests the add_feed function of the FeedLibrary - """ - #TODO testAddFeed needs writing - pass - def testRemoveFeed(self): """ testRemoveFeed: Tests FeedLibrary.remove_feed() @@ -99,13 +92,15 @@ def testIsEmptyWhenFull(self): """ - testIsEmptyWhenFull: Tests FeedLibrary.is_empty() when there are feeds in database + testIsEmptyWhenFull: Tests FeedLibrary.is_empty() when there are feeds + in database """ self.assertFalse(self.library.is_empty()) def testIsEmptyWhenEmpty(self): """ - testIsEmptyWhenEmpty: Tests FeedLibrary.is_empty() when the feed list is empty + testIsEmptyWhenEmpty: Tests FeedLibrary.is_empty() when the feed list + is empty """ for i in range(10): self.library.remove_feed("url"+str(i)) === modified file 'entertainerlib/tests/MusicLibrary_test.py' --- entertainerlib/tests/MusicLibrary_test.py 2008-10-25 17:56:14 +0000 +++ entertainerlib/tests/MusicLibrary_test.py 2009-01-03 15:16:54 +0000 @@ -31,24 +31,6 @@ class""" self.assertTrue(isinstance(self.musiclibrary, MusicLibrary)) - def testGetCompactDiscInformation(self): - """testGetCompactDiscInformation - Ensures compact disc information - is returned""" - #TODO: write this test - pass - - def testGetPlaylist(self): - #TODO: write this test, set up the playlist test table - pass - - def testGetNumberOfTracksOnPlaylist(self): - #TODO: write this test, set up the playlist test table - pass - - def testGetTracksOnPlaylist(self): - #TODO: write this test, set up the playlist test table - pass - def testGetAllArtists(self): """testGetAllArtists - Ensures that all artists are returned from the music library""" @@ -149,7 +131,4 @@ '') self.musiclibrary.save_lyrics(self.track, 'some lyrics here') self.assertEqual(self.track.get_lyrics(), 'some lyrics here') - #TODO: create second half of this test to check that lyrics were saved - # to storage by creating a new track from the database and checking its - # lyrics value === modified file 'entertainerlib/tests/Track_test.py' --- entertainerlib/tests/Track_test.py 2008-10-25 17:56:14 +0000 +++ entertainerlib/tests/Track_test.py 2009-01-03 15:16:54 +0000 @@ -148,19 +148,6 @@ result = self.track.get_comment() self.assertEqual(result, 'comment') - def testTrackFetchLyrics(self): - """testTrackFetchLyrics - Ensures that lyrics fetching is correctly - handled by LyricsDownloader""" - #TODO: write this test, how do you mock the LyricsDownloader that is - # interal to this function? - pass - - def testTrackFetchLyricsNoCallback(self): - """testTrackFetchLyricsNoCallback - Ensures lyrics are at least set - when no callback function is entered""" - #TODO: write this test - pass - def testTrackGetLyrics(self): """testTrackGetLyrics - Ensures that the lyrics are returned""" result = self.track.get_lyrics()