Setting the window icon
authorEd Page <eopage@byu.net>
Mon, 3 May 2010 23:55:26 +0000 (18:55 -0500)
committerEd Page <eopage@byu.net>
Wed, 5 May 2010 03:31:16 +0000 (22:31 -0500)
src/mormonchannel_gtk.py

index 09ebb5d..1b020b3 100755 (executable)
@@ -1,6 +1,11 @@
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
+"""
+@todo Reverse order option.  Toggle between playing ascending/descending chronological order
+@todo Track recent
+"""
+
 from __future__ import with_statement
 
 import gc
@@ -37,6 +42,8 @@ class MormonChannelProgram(hildonize.get_app_class()):
        def __init__(self):
                super(MormonChannelProgram, self).__init__()
                self._clipboard = gtk.clipboard_get()
+               self._player = player.Player()
+               self._store = imagestore.ImageStore("../data", "../data")
 
                self._window_in_fullscreen = False #The window isn't in full screen mode initially.
 
@@ -88,6 +95,7 @@ class MormonChannelProgram(hildonize.get_app_class()):
 
                self._window = hildonize.hildonize_window(self, self._window)
                hildonize.set_application_title(self._window, "%s" % constants.__pretty_app_name__)
+               self._window.set_icon(self._store.get_pixbuf_from_store(self._store.STORE_LOOKUP["icon"]))
                menuBar = hildonize.hildonize_menu(
                        self._window,
                        menuBar,
@@ -118,8 +126,6 @@ class MormonChannelProgram(hildonize.get_app_class()):
 
                self._window.show_all()
 
-               self._player = player.Player()
-               self._store = imagestore.ImageStore("../data", "../data")
                self._windowStack = [windows.SourceSelector(self._player, self._store)]
                vbox.pack_start(self._windowStack[0].toplevel, True, True)