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

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

Defines a new Blogger account settings.

Definition at line 1719 of file textRouter.py.

01719                                                     :
        """Defines a new Blogger account settings."""
        inputDetails = [
                         ["rpcserver", self.strs["newBlgPrefs"]["rpcP"], \
                          self.strs["newBlgPrefs"]["rpcH"], \
                          "http://plant.blogger.com/api/RPC2", 1],

                         ["username", self.strs["newBlgPrefs"]["userP"], \
                          self.strs["newBlgPrefs"]["userH"], \
                          "", 1],

                         ["password", self.strs["newBlgPrefs"]["passP"], \
                          self.strs["newBlgPrefs"]["passH"], 
                          "", 3],

                         ["weblogsPing", self.strs["newBlgPrefs"]["bWelogsP"],
                          self.strs["newBlgPrefs"]["bWelogsH"],
                          "Yes" , 4],

                         ]

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

        dlg.showModal()
        if dlg.accepted():
            #if self.generalPrefs["useProxy"] == 'Yes':
            #    self.theBloggerAccounts.append(BloggerAccount("yes"))
            #else:
            if self.generalPrefs["useProxy"] == "Yes":
                proxy = self.generalPrefs["proxyServer"] + ":" + str(self.generalPrefs["proxyPort"])
            else:
                proxy = ""

            self.theBloggerAccounts.append(BloggerAccount(proxy))
                
            self.theBloggerAccounts[-1].setPrefs(dlg.components.rpcserver.text, \
                                                 dlg.components.username.text, \
                                                 dlg.components.password.text, \
                                                 dlg.components.weblogsPing.stringSelection)

            if len(self.theBloggerAccounts) == 1:
                self.theCurrentBloggerAccount = 0
            self.status("New Blogger account defined.")
        else:
            self.status("Cancelled.")

        dlg.destroy()


    def on_menuBloggerEditAccount_select(self, event):


Generated by  Doxygen 1.6.0   Back to index