Exemplo n.º 1
0
    def providers_combo_changed_cb(self, widget, data=None):
        ch = self.provider_content.get_children()
        for c in ch:
            self.provider_content.remove(c)
            c.destroy()

        citer = self.providers_combo.get_active_iter()
        if not citer:
            return
        provider_name = self.providers_store.get_value (citer, 1)
        provider = self.pm.get_provider(provider_name)

        if provider.get_import_error():
            md = Gtk.MessageDialog(self.window,
                Gtk.DialogFlags.DESTROY_WITH_PARENT, Gtk.MessageType.ERROR,
                Gtk.ButtonsType.CLOSE,
                _('Error loading the provider: ') + str(provider.get_import_error()))
            md.run()
            md.destroy()
            return

        box =  provider.get_account_data_widget(self.provider_content.account)
        self.provider_content.add(box)
        if self.provider_content.account:
            self.activate_command_entry.set_text(self.provider_content.account.get_activate_command())
        box.show_all()
    def providers_combo_changed_cb(self, widget, data=None):
        ch = self.provider_content.get_children()
        for c in ch:
            self.provider_content.remove(c)
            c.destroy()
        
        citer = self.providers_combo.get_active_iter()
        if not citer:
            return
        provider_name = self.providers_store.get_value (citer, 1)
        provider = self.pm.get_provider(provider_name)

        box =  provider.get_account_data_widget(self.provider_content.account)
        self.provider_content.add(box)
        box.show_all()