コード例 #1
0
ファイル: options.py プロジェクト: tomka/rednotebook
 def set(self):
     '''Apply the current setting'''
     selected = self.get_value()
     
     if selected:
         # Add autostart file if it is not present
         filesystem.make_file_with_dir(self.autostart_file, info.desktop_file)
     else:
         # Remove autostart file
         if os.path.exists(self.autostart_file):
             os.remove(self.autostart_file)
コード例 #2
0
    def set(self):
        '''Apply the current setting'''
        selected = self.get_value()

        if selected:
            # Add autostart file if it is not present
            filesystem.make_file_with_dir(self.autostart_file, info.desktop_file)
        else:
            # Remove autostart file
            if os.path.exists(self.autostart_file):
                os.remove(self.autostart_file)