def on_fix_theme_btn_taggled(self, widget): if widget.get_active(): proxy.link_file(os.path.expanduser('~/.themes'), self.ROOT_THEMES) proxy.link_file(os.path.expanduser('~/.icons'), self.ROOT_ICONS) else: proxy.unlink_file(self.ROOT_THEMES) proxy.unlink_file(self.ROOT_ICONS) if proxy.is_exists(self.ROOT_THEMES) and proxy.is_exists(self.ROOT_ICONS): widget.set_active(True)
def on_fix_theme_button_toggled(self, widget, *args): try: if widget.get_active(): proxy.link_file(os.path.expanduser("~/.themes"), self.ROOT_THEMES) proxy.link_file(os.path.expanduser("~/.icons"), self.ROOT_ICONS) else: proxy.unlink_file(self.ROOT_THEMES) proxy.unlink_file(self.ROOT_ICONS) self.set_fix_theme_button_status() except Exception, e: log.error(e) self.set_fix_theme_button_status()
def on_fix_theme_button_toggled(self, widget, *args): try: if widget.get_active(): proxy.link_file(os.path.expanduser('~/.themes'), self.ROOT_THEMES) proxy.link_file(os.path.expanduser('~/.icons'), self.ROOT_ICONS) else: proxy.unlink_file(self.ROOT_THEMES) proxy.unlink_file(self.ROOT_ICONS) self.set_fix_theme_button_status() except Exception, e: log.error(e) self.set_fix_theme_button_status()