@@ -120,10 +120,11 @@ # object containers widgets = {} # non-glade widgets (the manually instantiated ones) channels = {} # channel modules features = {} # non-channel plugins working = [] # threads + add_signals = {} # channel gtk-handler signals # status variables channel_names = ["bookmarks"] # order of channel notebook tabs current_channel = "bookmarks" # currently selected channel name (as index in self.channels{}) @@ -171,11 +172,11 @@ except: print("channel .first_show() initialization error") # bind gtk/glade event names to functions gui_startup(0.95) - self.connect_signals({ + self.connect_signals(dict( { "gtk_main_quit" : self.gtk_main_quit, # close window # treeviews / notebook "on_stream_row_activated" : self.on_play_clicked, # double click in a streams list "on_category_clicked": self.on_category_clicked, # new selection in category list "on_notebook_channels_switch_page": self.channel_switch, # channel notebook tab changed @@ -221,11 +222,11 @@ "true": lambda w,*args: True, "streamedit_open": streamedit.open, "streamedit_save": streamedit.save, "streamedit_new": streamedit.new, "streamedit_cancel": streamedit.cancel, - }) + }.items() + self.add_signals.items() )) # actually display main window gui_startup(0.99) self.win_streamtuner2.show() @@ -470,12 +471,13 @@ # other plugin types else: self.features[module] = plugin_class(parent=self) except Exception, e: - print("error initializing:", module) - print(e) + print("error initializing:", module, ", exception:") + import traceback + traceback.print_exc() # default plugins conf.add_plugin_defaults(self.channels["bookmarks"].config, "bookmarks") #conf.add_plugin_defaults(self.channels["shoutcast"].config, "shoutcast")