def __init__(self, parent, delete_event_cb): """Prepare the processes dialog""" self.on_window_processes_delete_event = delete_event_cb self.processes = {} self.poller_id = None # Load the user interface self.ui = GtkBuilderLoader(get_ui_file('processes.glade')) # Restore the saved size and position settings.positions.restore_window_position( self.ui.window_processes, SECTION_WINDOW_NAME) # Initialize actions for widget in self.ui.get_objects_by_type(Gtk.Action): # Connect the actions accelerators widget.connect_accelerator() # Set labels widget.set_label(text(widget.get_label())) # Initialize tooltips for widget in self.ui.get_objects_by_type(Gtk.ToolButton): action = widget.get_related_action() if action: widget.set_tooltip_text(action.get_label().replace('_', '')) self.model = ModelProcesses(self.ui.store_processes) # Connect signals from the glade file to the module functions self.ui.connect_signals(self)