コード例 #1
0
ファイル: workarounds.py プロジェクト: Thongor/ubuntu-tweak
 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)
コード例 #2
0
ファイル: workarounds.py プロジェクト: GBeckerRS/ubuntu-tweak
 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()
コード例 #3
0
 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()