Esempio n. 1
0
    def __init__(self, bus, mainloop):
        self.infoconf = DetailInfo()
        self.otherconf = Others()
        self.soundconf = Sound()
        #        self.ballconf = MonitorBall()
        self.themeconf = Theme()
        #        self.daemonsame = cleaner.SearchTheSame()
        #        self.daemonlarge = cleaner.ManageTheLarge()
        #        self.daemonunneed = cleaner.CleanTheUnneed()
        #        self.daemonclean = cleaner.FunctionOfClean()
        self.daemononekey = cleaner.OneKeyClean()
        #        self.daemoncache = cleaner.CleanTheCache()
        #        self.daemonApt = AptDaemon()
        #self.daemonApt = AptDaemon(self)

        #--------------apt start----------------
        self.aptHandler = AptHandler(self)
        #        self.worklist = []
        #        self.mutex = threading.RLock()
        #        self.worker_thread = WorkThread(self)
        #        self.worker_thread.setDaemon(True)
        #        self.worker_thread.start()
        #--------------apt end----------------

        bus_name = dbus.service.BusName(INTERFACE, bus=bus)
        PolicyKitService.__init__(self, bus_name, UKPATH)
        self.mainloop = mainloop
Esempio n. 2
0
 def onekey_clean_crufts_function(self, mode_list, sender=None):
     status = self._check_permission(sender, UK_ACTION_YOUKER)
     if not status:
         self.revoke_clean_onekey('yes')
         return
     else:
         self.revoke_clean_onekey('no')
     daemononekey = cleaner.OneKeyClean()
     try:
         t = threading.Thread(target=daemononekey.clean_all_onekey_crufts,
                              args=(self, mode_list))
         t.start()
         #daemononekey.clean_all_onekey_crufts(self, mode_list)
     except Exception, e:
         self.clean_error_msg('onekey')
Esempio n. 3
0
 def __init__(self, bus, mainloop):
     self.infoconf = DetailInfo()
     self.otherconf = Others()
     self.soundconf = Sound()
     self.ballconf = MonitorBall()
     self.themeconf = Theme()
     self.daemonsame = cleaner.SearchTheSame()
     self.daemonlarge = cleaner.ManageTheLarge()
     self.daemonunneed = cleaner.CleanTheUnneed()
     self.daemonclean = cleaner.FunctionOfClean()
     self.daemononekey = cleaner.OneKeyClean()
     self.daemoncache = cleaner.CleanTheCache()
     self.daemonApt = AptDaemon()
     #self.daemonApt = AptDaemon(self)
     bus_name = dbus.service.BusName(INTERFACE, bus=bus)
     PolicyKitService.__init__(self, bus_name, UKPATH)
     self.mainloop = mainloop