Esempio n. 1
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)
Esempio n. 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)