X-Git-Url: http://git.maemo.org/git/?p=jamaendo;a=blobdiff_plain;f=jamaui%2Fui.py;h=329963b232a646f1427755feb27b7c9f5f974935;hp=7a8fc6dc66b36c9506d1e79a251b9852ec8250c1;hb=19020e8dae378875c8bfcd7e573ca5e91b1dfa10;hpb=44b759cfcfb80d94ddac5ea11302a6f94cb307b4;ds=sidebyside diff --git a/jamaui/ui.py b/jamaui/ui.py index 7a8fc6d..329963b 100644 --- a/jamaui/ui.py +++ b/jamaui/ui.py @@ -80,11 +80,13 @@ class Jamaui(object): self.window = None def create_window(self): + log.debug("Creating main window...") self.app = hildon.Program() self.window = hildon.StackableWindow() self.app.add_window(self.window) self.window.set_title("jamaendo") + self.window.connect("destroy", self.destroy) self.CONFDIR = os.path.expanduser('~/MyDocs/.jamaendo') @@ -92,7 +94,8 @@ class Jamaui(object): settings.set_filename(os.path.join(self.CONFDIR, 'ui_settings')) settings.load() - postoffice.connect('request-album-cover', self.on_request_cover) + postoffice.connect('request-album-cover', self, self.on_request_cover) + log.debug("Created main window.") def save_settings(self): settings.save() @@ -190,7 +193,7 @@ class Jamaui(object): # self.bbox.add(btn) def destroy(self, widget): - postoffice.disconnect('request-album-cover', self.on_request_cover) + postoffice.disconnect('request-album-cover', self) gtk.main_quit() def show_about(self, w, win): @@ -241,7 +244,7 @@ JAMENDO is an online platform that distributes musical works under Creative Comm dialog.destroy() def open_link(self, d, url, data): - print "url: %s" % (url) + #print "url: %s" % (url) import webbrowser webbrowser.open_new(url) @@ -294,9 +297,9 @@ JAMENDO is an online platform that distributes musical works under Creative Comm result = dialog.run() val = entry.get_text() dialog.destroy() - print val, result + #print val, result if val and result == gtk.RESPONSE_OK: - print "new user name:", val + #print "new user name:", val settings.user = val self.save_settings() @@ -306,7 +309,7 @@ JAMENDO is an online platform that distributes musical works under Creative Comm self.favoriteswnd.show_all() def on_player(self, button): - open_playerwindow([]) + open_playerwindow() ''' def on_search(self, button):