> What was the rationale behind putting all the dialog classes into a single > file? I would suggest that we at least call it dialogs if there are going > to be multiple, but it doesn't make too much sense to me to put them all in > the same file, especially if our dialogs might only grow more capabilities > over time (like TV stuff). They depend on similar things. As I was working on everything else, it only made sense to consolidate those dialogs. I think the next logical step would be to create an EntertainerDialog, and extend the dialogs that way. That code is an utter mess. I think, for the time being, it should stay as the same module, and get it cleaned up. If (and this is a big IF) we see a need to make a package out of this, we can be confident that the code is being maintained. > entertainerlib/backend/core/message_type_priority.py > * FRONTEND_OPENED and FRONTEND_CLOSED should probably change to CLIENT_*. > The comments with those lines don't make sense because frontend was > substituted with client. Nope, I'm not touching that message passing crap. It never worked right, and will just get deleted when the server is implemented. > > entertainerlib/client/__init__.py > * Initial comment isn't valid. > * client_client is weird. Yeah, I thought that too. client.client_client vs client.client, either way, it's a bit repetitive. I was going to see if you wanted to root around in the client code and see what you'd need. > > entertainerlib/client/client.py > * import order > * class doc string has Frontend > * logger name isn't correct, would client.Client I've made the changes to everything but import order. The import order will be re-arranged before this lands in trunk, but the imports are going to be hell to merge from trunk as it is. I'd rather do a second branch with the import order stuff. This is the beauty of having this HIGHLY experimental branch. I think this is an acceptable solution. > entertainerlib/gui/system_tray_icon.py > * Switch from frontend to client revealed some code that must is broken. > set_client_visible has no implementation. I don't plan on fixing this in this branch. If it's broken, it's broken. It may not even be in the next version of Entertainer. > entertainerlib/gui/user_interface.py > * import order > * Uses UserEvent.QUIT_FRONTEND. That event should change to QUIT_CLIENT. I changed this to just QUIT. These events are only used by the client anyway, so QUIT_CLIENT is rather redundant. > entertainerlib/gui/widgets/texture.py > * logger name doesn't need to refer to client anymore Fixed. > entertainerlib/utils/cd_utils.py > * Removed, so you can link to bug 313815 Sweet, thanks. I figured there was a bug, but I was too lazy to go find it. :) > > setup.py > * There is no longer a client/glade directory so 'client/glade/*' > shouldn't be needed anymore. Fixed. Here's the incremental diff: === modified file 'entertainerlib/client/__init__.py' --- entertainerlib/client/__init__.py 2009-05-05 04:43:57 +0000 +++ entertainerlib/client/__init__.py 2009-05-09 03:14:44 +0000 @@ -1,8 +1,8 @@ -'''Frontend gui to entertainer''' +'''Client code for Entertainer.''' # pylint: disable-msg=W0612 def main(*args, **kwargs): - '''Frontend runner''' + '''Client code main loop.''' # Import statements are inside the function so that they aren't imported # every time something from the client is imported === modified file 'entertainerlib/client/client.py' --- entertainerlib/client/client.py 2009-05-05 04:43:57 +0000 +++ entertainerlib/client/client.py 2009-05-09 03:23:29 +0000 @@ -1,4 +1,4 @@ -'''Entertainer Frontend - This is a client side of Entertainer.''' +'''Entertainer client.''' __licence__ = 'GPLv2' __copyright__ = ('2007, Lauri Taimila', '2009, Matt Layman') @@ -23,9 +23,9 @@ class Client: ''' Entertainer client - This is a client application of the Entertainer. Frontend is a GUI part - that user sees on the screen. This class is a core of the client. Frontend - connects to the backend's messagebus at startup. + This is a client application of the Entertainer. Entertainer's client + hooks into the server, and then provides a user interface for the data the + server creates. ''' def __init__(self): @@ -36,7 +36,7 @@ class Client: control receiver and GUI. After this we just wait user actions. ''' config = Configuration() - self.logger = Logger().getLogger('client.FrontendClient') + self.logger = Logger().getLogger('client.Client') self.backend_connection = self.initialize_backend_connection() feed_library = FeedLibrary(self.backend_connection) music_library = MusicLibrary(self.backend_connection) === modified file 'entertainerlib/gui/user_event.py' --- entertainerlib/gui/user_event.py 2009-02-19 23:47:06 +0000 +++ entertainerlib/gui/user_event.py 2009-05-09 03:21:32 +0000 @@ -41,7 +41,7 @@ class UserEvent: USE_ASPECT_RATIO_2 = 52 USE_ASPECT_RATIO_3 = 53 USE_ASPECT_RATIO_4 = 54 - QUIT_FRONTEND = 56 + QUIT = 56 DEFAULT_EVENT = 57 def __init__(self, code): === modified file 'entertainerlib/gui/user_interface.py' --- entertainerlib/gui/user_interface.py 2009-05-05 04:24:32 +0000 +++ entertainerlib/gui/user_interface.py 2009-05-09 03:22:03 +0000 @@ -142,8 +142,8 @@ class UserInterface: clutter.keysyms.c : UserEvent.PLAYER_SKIP_FORWARD, clutter.keysyms.z : UserEvent.PLAYER_PREVIOUS, clutter.keysyms.v : UserEvent.PLAYER_NEXT, - clutter.keysyms.q : UserEvent.QUIT_FRONTEND, - clutter.keysyms.Escape : UserEvent.QUIT_FRONTEND + clutter.keysyms.q : UserEvent.QUIT, + clutter.keysyms.Escape : UserEvent.QUIT }) self.event_handlers = { @@ -170,7 +170,7 @@ class UserInterface: UserEvent.PLAYER_SKIP_FORWARD : self._handle_player_skip_forward, UserEvent.PLAYER_PREVIOUS : self._handle_player_previous, UserEvent.PLAYER_NEXT : self._handle_player_next, - UserEvent.QUIT_FRONTEND : self._handle_quit_client + UserEvent.QUIT : self._handle_quit_client } self.logger.debug("Frontend GUI initialized succesfully") @@ -385,6 +385,6 @@ class UserInterface: self._toggle_fullscreen() def _handle_quit_client(self, event): - '''Handle UserEvent.QUIT_FRONTEND.''' + '''Handle UserEvent.QUIT.''' self.confirm_exit() === modified file 'entertainerlib/gui/widgets/texture.py' --- entertainerlib/gui/widgets/texture.py 2009-05-05 04:24:32 +0000 +++ entertainerlib/gui/widgets/texture.py 2009-05-09 03:24:15 +0000 @@ -19,7 +19,7 @@ class Texture(Base, clutter.Texture): Base.__init__(self) clutter.Texture.__init__(self, filename) - self.logger = Logger().getLogger('client.gui.widgets.Texture') + self.logger = Logger().getLogger('gui.widgets.Texture') self._position = None self._set_position((x_pos_percent, y_pos_percent)) === modified file 'entertainerlib/tests/test_screen.py' --- entertainerlib/tests/test_screen.py 2009-05-05 03:31:34 +0000 +++ entertainerlib/tests/test_screen.py 2009-05-09 03:22:21 +0000 @@ -65,7 +65,7 @@ class ScreenTest(EntertainerTest): down = UserEvent(UserEvent.NAVIGATE_DOWN) left = UserEvent(UserEvent.NAVIGATE_LEFT) right = UserEvent(UserEvent.NAVIGATE_RIGHT) - not_handled = UserEvent(UserEvent.QUIT_FRONTEND) + not_handled = UserEvent(UserEvent.QUIT) self.assertFalse(self.screen.handle_user_event(self.select)) self.assertFalse(self.screen.handle_user_event(up)) === modified file 'setup.py' --- setup.py 2009-05-06 06:03:09 +0000 +++ setup.py 2009-05-09 03:26:12 +0000 @@ -51,7 +51,6 @@ for root, dirs, files in os.walk('entert entertainer_packages.append(root) package_data = [ - 'client/glade/*', 'glade/*', ] -- Paul Hummer http://theironlion.net 1024/862FF08F C921 E962 58F8 5547 6723 0E8C 1C4D 8AC5 862F F08F