Index: channels/configwin.py ================================================================== --- channels/configwin.py +++ channels/configwin.py @@ -28,11 +28,10 @@ # Display win_config, pre-fill text fields from global conf. object def open(self, widget): if self.first_open: self.add_plugins() - self.combobox_theme() self.first_open = 0 self.win_config.resize(565, 625) self.load_config(conf.__dict__, "config_") self.load_config(conf.plugins, "config_plugins_") [callback() for callback in self.hooks["config_load"]] @@ -104,28 +103,10 @@ return gtk.STOCK_MEDIA_PLAY else: return gtk.STOCK_CANCEL - # list of Gtk themes in dropdown - def combobox_theme(self): - # find themes - themedirs = (conf.share+"/themes", conf.dir+"/themes", "/usr/share/themes") - themes = ["no theme"] - [[themes.append(e) for e in os.listdir(dir)] for dir in themedirs if os.path.exists(dir)] - __print__(dbg.STAT, themes) - # add dropdown - self.widgets["theme"] = ComboBoxText(themes) - self.theme_cb_placeholder.pack_start(self.theme) - self.theme_cb_placeholder.pack_end(uikit.label("")) - - - # retrieve currently selected value - def apply_theme(self): - conf.theme = self.theme.get_active_text() - uikit.load_theme(conf.theme) - # iterate over channel and feature plugins def add_plugins(self): ls = {} for name in module_list(): @@ -187,9 +168,8 @@ # save config def save(self, widget): self.save_config(conf.__dict__, "config_") self.save_config(conf.plugins, "config_plugins_") [callback() for callback in self.hooks["config_save"]] - self.apply_theme() conf.save(nice=1) self.hide() Index: config.py ================================================================== --- config.py +++ config.py @@ -138,11 +138,10 @@ self.show_favicons = 1 self.load_favicon = 1 self.heuristic_bookmark_update = 0 self.retain_deleted = 0 self.auto_save_appstate = 1 - self.theme = "" #"MountainDew" self.reuse_m3u = 1 self.google_homepage = 0 self.windows = platform.system()=="Windows" self.pyquery = 1 self.debug = 0 Index: gtk3.xml ================================================================== --- gtk3.xml +++ gtk3.xml @@ -353,42 +353,10 @@ True 3 - - True - False - needs restart - 0 - Use specific Gtk+ theme for Streamtuner2. - - - True - True - 5 - 4 - - - - - True - False - - - - - - - - - False - False - 5 - - - Save window state, sizes and selections automatically. True True False @@ -397,13 +365,19 @@ True True 5 - 6 + 4 + + + + + + Index: st2.py ================================================================== --- st2.py +++ st2.py @@ -90,11 +90,10 @@ # constructor def __init__(self): # Load stylesheet, instantiate GtkBuilder in self, menu and logo hooks - gui_startup(0/20.0), uikit.load_theme(conf.get("theme")) gui_startup(1/20.0), gtk.Builder.__init__(self) gui_startup(1/20.0), gtk.Builder.add_from_string(self, ui_xml) gui_startup(3/20.0), self.img_logo.set_from_pixbuf(uikit.pixbuf(logo.png)) # initialize built-in plugins Index: uikit.py ================================================================== --- uikit.py +++ uikit.py @@ -449,21 +449,10 @@ def msg(text, style=gtk.MESSAGE_INFO, buttons=gtk.BUTTONS_CLOSE): m = gtk.MessageDialog(None, 0, style, buttons, message_format=text) m.show() m.connect("response", lambda *w: m.destroy()) - - # apply gtkrc stylesheet - @staticmethod - def load_theme(theme=None): - if theme: - for dir in (conf.dir, conf.share, "/usr/share"): - f = dir + "/themes/" + theme + "/gtk-2.0/gtkrc" - if os.path.exists(f): - gtk.rc_parse(f) - pass - # Pixbug loader (from inline string, as in `logo.png`) @staticmethod def pixbuf(buf, fmt="png", decode=True, gzip=False): if not buf or len(buf) < 16: