Exemplo n.º 1
0
class ProcessWindow(gtk.Window):
    """A window that contains the exim process list."""

    def __init__(self, prefs):
        gtk.Window.__init__(self, gtk.WINDOW_TOPLEVEL)
        self.set_default_size(500, 200)
        self.set_title(_("Exim processes"))

        self.statusbar = gtk.Statusbar()
        self.statusbar.push(0, '')
        self.process_widget = ProcessWidget(self.statusbar, prefs)

        vbox = gtk.VBox()
        vbox.pack_start(scrolled(self.process_widget))
        vbox.pack_end(self.statusbar, expand=False)

        self.add(framed(vbox))

        prefs.subscribe(self.apply_prefs)

    def apply_prefs(self, prefs):
        if prefs.show_process_list:
            self.process_widget.update()
            self.show_all()
        else:
            self.hide()
Exemplo n.º 2
0
    def __init__(self, prefs):
        gtk.Window.__init__(self, gtk.WINDOW_TOPLEVEL)
        self.set_default_size(500, 200)
        self.set_title(_("Exim processes"))

        self.statusbar = gtk.Statusbar()
        self.statusbar.push(0, '')
        self.process_widget = ProcessWidget(self.statusbar, prefs)

        vbox = gtk.VBox()
        vbox.pack_start(scrolled(self.process_widget))
        vbox.pack_end(self.statusbar, expand=False)

        self.add(framed(vbox))

        prefs.subscribe(self.apply_prefs)