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

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

Edits an existing Manila account settings.

Definition at line 1128 of file textRouter.py.

01128                                                     :
        """Edits an existing Manila account settings."""
        if not self.checkManilaAccounts(3):
            return

        curManilaAccount = self.theManilaAccounts[self.theCurrentManilaAccount]

        weblogDef = ("weblogOPML" in curManilaAccount.prefs and \
                     [ curManilaAccount.prefs["weblogOPML"] ] or \
                     [ "" ])[0]
        usePostedL = ("usePostedLine" in curManilaAccount.prefs and \
                     [ curManilaAccount.prefs["usePostedLine"] ] or \
                     [ "No" ])[0]
        postedLine = ("postedLine" in curManilaAccount.prefs and \
                     [ curManilaAccount.prefs["postedLine"] ] or \
                     [ "posted at %I:%M %p" ])[0]
            
        inputDetails = [ ["siteurl", self.strs["newMnlPrefs"]["siteUrlP"], \
                          self.strs["newMnlPrefs"]["siteUrlH"], \
                          curManilaAccount.prefs["siteurl"], 1],

                         ["rpcserver", self.strs["newMnlPrefs"]["rpcP"], \
                          self.strs["newMnlPrefs"]["rpcH"], \
                          curManilaAccount.prefs["rpcserver"], 1],

                         ["username", self.strs["newMnlPrefs"]["userP"], \
                          self.strs["newMnlPrefs"]["userH"], \
                          curManilaAccount.prefs["username"], 1],

                         ["password", self.strs["newMnlPrefs"]["passP"], \
                          self.strs["newMnlPrefs"]["passH"], \
                          curManilaAccount.prefs["password"], 3],

                         ["weblogOPML", self.strs["newMnlPrefs"]["opmlP"], \
                          self.strs["newMnlPrefs"]["opmlH"], \
                          weblogDef, 1],

                         ["usePostedLine", self.strs["newMnlPrefs"]["usePosP"], \
                          self.strs["newMnlPrefs"]["usePosH"], \
                          usePostedL, 4],

                         ["postedLine", self.strs["newMnlPrefs"]["postedP"], \
                          self.strs["newMnlPrefs"]["postedH"], \
                          postedLine, 1],
                         ]

        dlg = PreferencesDialog(self, "Manila Account Settings", inputDetails)

        dlg.showModal()
        if dlg.accepted():
            curManilaAccount.setPrefs(dlg.components.siteurl.text, \
                                      dlg.components.rpcserver.text, \
                                      dlg.components.username.text, \
                                      dlg.components.password.text,\
                                      dlg.components.weblogOPML.text, \
                                      dlg.components.usePostedLine.stringSelection, \
                                      dlg.components.postedLine.text, \
                                      )

            self.status("Settings for Manila account '%s' updated." %
                        curManilaAccount.prefs["siteurl"])
        else:
            self.status("Cancelled.")

        dlg.destroy()


    def on_menuManilaChooseActiveAccount_select(self, event):


Generated by  Doxygen 1.6.0   Back to index