Ejemplo n.º 1
0
 def stop_current_app(self):
     Robot.stop()
     if self.activeapp in self.apps:
         print_appstopped(self.activeapp)
         try:
             self.apps[self.activeapp].stop(self)
         except AttributeError:
             print_info("%s has no stop function" % self.activeapp)
     self.activeapp = None
Ejemplo n.º 2
0
    def stop_all(self):
        for appname in self.active_apps:
            print_appstopped(appname)
            try:
                self.apps[appname].stop(self)
            except AttributeError:
                print_info("%s has no stop function" % appname)

        self.active_apps = []

        if len(self.active_apps) < 1:
            Robot.stop()
Ejemplo n.º 3
0
    def stop(self, appname):
        app_count = 0
        for sock in Users.sockets:
            if sock.activeapp == appname:
                app_count += 1

        if app_count > 1:
            return

        if appname in self.active_apps:
            print_appstopped(appname)
            try:
                self.apps[appname].stop(self)
            except AttributeError:
                print_info("%s has no stop function" % appname)
            self.active_apps.remove(appname)

        if len(self.active_apps) < 1:
            Robot.stop()