Ejemplo n.º 1
0
    def __init__(self):
        PreferenceDialog.__init__(self, 566, 488)

        self.waiting_dialog = WaitingDialog()
        self.waiting_dialog.set_transient_for(self)

        preference_items = []
        self.general_box = GeneralBox()
        preference_items.append((_("General"), self.general_box))
        #if len(all_mirrors) > 0:
            #self.mirrors_box = MirrorsBox()
            #preference_items.append((_("Mirrors"), self.mirrors_box))
        self.about_box = AboutBox()
        preference_items.append((_("About"), self.about_box))
        self.set_preference_items(preference_items)

        global_event.register_event("toggle-waiting-dialog", self.handle_toggle_waiting_dialog)
        global_event.register_event("mirror-backend-changed", self.handle_after_mirror_changed)
Ejemplo n.º 2
0
        preference_items = []
        self.general_box = GeneralBox()
        preference_items.append((_("General"), self.general_box))
        #if len(all_mirrors) > 0:
            #self.mirrors_box = MirrorsBox()
            #preference_items.append((_("Mirrors"), self.mirrors_box))
        self.about_box = AboutBox()
        preference_items.append((_("About"), self.about_box))
        self.set_preference_items(preference_items)

        global_event.register_event("toggle-waiting-dialog", self.handle_toggle_waiting_dialog)
        global_event.register_event("mirror-backend-changed", self.handle_after_mirror_changed)

    def handle_toggle_waiting_dialog(self, show):
        if show:
            self.waiting_dialog.show_waiting()
        else:
            self.waiting_dialog.hide_all()

    def handle_after_mirror_changed(self, mirror):
        global_event.emit("start-update-list")
        self.hide()

if __name__ == '__main__':
    d = WaitingDialog()
    d.show_waiting()
    #preference_dialog = DscPreferenceDialog()
    #preference_dialog.show_all()
    gtk.main()