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

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

Gets the users template from Blogger.

Definition at line 1593 of file textRouter.py.

01593                                                      :
        """Gets the users template from Blogger."""
        if not self.checkBloggerAccounts(3):
            return

        if not self.theBloggerAccounts[self.theCurrentBloggerAccount].checkSetupOK():
            self.status(self.theBloggerAccounts[self.theCurrentBloggerAccount].getErrorMessage())
            return

        tmplNames = ["main", "archiveIndex"]
        prettyNames = [ "Main", "Archive" ]
        
        dlg = ChooserDialog(self, 'Choose Template To Get', \
                            "Choose the template to get...", \
                            prettyNames, prettyNames[0])
        dlg.showModal()
        
        if not dlg.accepted():
            self.status("Tempalte downloading cancelled.")
            dlg.destroy()
            return
        else:
            i = dlg.components.options.findString(dlg.components.options.stringSelection)
            if i == -1:
                self.status("No temlpate type selected.")
                dlg.destroy()
                return

        dlg.destroy()

        self.showWaitMsg("Downloading template...")

        tmpl = self.theBloggerAccounts[self.theCurrentBloggerAccount].bloggerGetTemplate(tmplNames[i])
        if self.theBloggerAccounts[self.theCurrentBloggerAccount].anErrorOccured():
            self.status(self.theBloggerAccounts[self.theCurrentBloggerAccount].getErrorMessage())
            return
        
        self.updateTextBox(tmpl)
        self.status("%s template for blog '%s' downloaded." %
                    (prettyNames[i], self.theBloggerAccounts[self.theCurrentBloggerAccount].prefs["username"])
                    )


    def on_menuBloggerSetTemplate_select(self, event):


Generated by  Doxygen 1.6.0   Back to index