def stopall_collectors(self, button): self.status_context_menu.tray_ind.set_icon(gtk.STOCK_NO) self.status_context_menu.stopall_menu_item.set_sensitive(False) self.status_context_menu.startall_menu_item.set_sensitive(True) self.stopall_button.set_sensitive(False) self.startall_button.set_sensitive(True) i = 0.0 pb = ProgressBarDetails() pb.setValue(0.0) while gtk.events_pending(): gtk.main_iteration() for collector in self.engine.collectors: if collector.is_enabled() and isinstance( collector, engine.collector.AutomaticCollector): collector.terminate() pb.setValue(i / len(self.engine.collectors)) pb.appendText("stopping " + collector.name) while gtk.events_pending(): gtk.main_iteration() i += 1 pb.setValue(1.0) if not pb.emit("delete-event", gtk.gdk.Event(gtk.gdk.DELETE)): pb.destroy()
def stopall_collectors(self, button): self.collectorList.set_selection_mode(Gtk.SelectionMode.SINGLE) self.set_play_stop_btns(False,False) self.status_context_menu.tray_ind.set_icon(Gtk.STOCK_NO) self.status_context_menu.stopall_menu_item.set_sensitive(False) self.status_context_menu.startall_menu_item.set_sensitive(True) i = 0.0 pb = ProgressBar() while Gtk.events_pending(): Gtk.main_iteration() for collector in self.engine.collectors: if collector.is_enabled() and isinstance(collector, engine.collector.AutomaticCollector): collector.terminate() self.collectorList.update_collector_status(Action.STOP,collector.name) if(self.currentConfigWindow != None): self.currentConfigWindow.set_sensitive(True) pb.setValue(i / len(self.engine.collectors)) pb.pbar.set_text("Stopping " + collector.name) while Gtk.events_pending(): Gtk.main_iteration() i += 1 if (i == len(self.engine.collectors)): pb.setValue(100) pb.destroy()
def kill_me(self, event, app_engine): for collector in app_engine.collectors: if collector.is_enabled: collector.terminate() os._exit(0)
def kill_me(self, event, app_engine, gui): for collector in app_engine.collectors: if collector.is_enabled: collector.terminate() gui.destroy() exit()
def stopIndividualCollector(self, event, collector): collector.terminate()
def close_all(self, event): for collector in self.engine.collectors: if collector.is_enabled: collector.terminate() os._exit(0)
def stopIndividualCollector(self, event, collector): collector.terminate() self.set_play_stop_btns(True,False) self.set_config_widget_sensitivity() self.status_context_menu.startall_menu_item.set_sensitive(self.engine.has_collectors_running() == False)