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

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

Sets the users template from Blogger.

Definition at line 1636 of file textRouter.py.

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

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

        tmplNames = ["main", "archiveIndex"]
        
        dlg = ChooserDialog(self, 'Set Template', \
                            "Choose the template to set...", \
                            ["Main", "Archive"], "Main")
        dlg.showModal()
        
        if not dlg.accepted():
            self.status("Template saving cancelled.")
            dlg.destroy()
            return
        else:
            i = dlg.components.options.findString(dlg.components.options.stringSelection)
            if i == -1:
                self.status("No template type selected.")
                dlg.destroy()
                return

        dlg.destroy()

        self.showWaitMsg("Saving template...")

        tmpl = curBlogAccount.bloggerSetTemplate(tmplNames[i],
                                                 self.getOutputText())

        if curBlogAccount.anErrorOccured():
            self.status(curBlogAccount.getErrorMessage())
            return

        self.status("Template saved.")


    def on_menuBloggerJumpTo_select(self, event):


Generated by  Doxygen 1.6.0   Back to index