Logo Search packages:      
Sourcecode: pythoncard version File versions  Download package

def textRouter::TextRouter::on_menuManilaRemoveAccount_select (   self,
  event 
)

Gives the user a list of defined manila accounts so they can select on to be removed.

Definition at line 1225 of file textRouter.py.

01225                                                       :
        """Gives the user a list of defined manila accounts so they can select on to be removed."""
        if not self.checkManilaAccounts(1):
            return

        options = []
        for manilaSite in self.theManilaAccounts:
            options.append(manilaSite.prefs["siteurl"])

        default = options[0]
        dlg = ChooserDialog(self, 'Remove Manila Account', \
                            "Choose which Manila account to remove...", \
                            options, default)
        dlg.showModal()
        
        if not dlg.accepted():
            self.status("Removing of manila account cancelled.")
        else:
            i = dlg.components.options.findString(dlg.components.options.stringSelection)
            if i == -1:
                self.status("No account selected for deletion.")
            else:
                self.theManilaAccounts[i:i+1] = []
                if len(self.theManilaAccounts) == 0:
                    self.theCurrentManilaAccount = -1
                else:
                    if self.theCurrentManilaAccount == i:
                        self.theCurrentManilaAccount = 0
                self.status("Manila site number %d (%s) has been removed." % (i + 1, options[i]))

        dlg.destroy()

    def on_menuManilaJumpTo_select(self, event):


Generated by  Doxygen 1.6.0   Back to index