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

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

Displays a quick 'Jump To' choice box.

Definition at line 1679 of file textRouter.py.

01679                                                 :
        """Displays a quick 'Jump To' choice box."""
        if not self.checkBloggerAccounts(1):
            return
        self.theBloggerAccounts[self.theCurrentBloggerAccount].checkSetupOK(3)
        if self.theBloggerAccounts[self.theCurrentBloggerAccount].anErrorOccured():
            self.status(self.theBloggerAccounts[self.theCurrentBloggerAccount].getErrorMessage())
            return
        
        prettyLocations = []
        urls = []
        
        for bloggerAccount in self.theBloggerAccounts:
            for blog in bloggerAccount.blogs:
                name = blog["blogName"]
                url = blog["url"]

                prettyLocations.append(name)
                urls.append(url)

        if len(prettyLocations) == 0:
            self.status("There are no blogs to jump to.")

        dlg = ChooserDialog(self, "Choose URL", "Please choose the URL to jump to:", \
                                        prettyLocations, prettyLocations[0])
        dlg.showModal()
        
        if not dlg.accepted():
            self.status("Jump-To-URL cancelled.")
            dlg.destroy()
        else:
            i = dlg.components.options.findString(dlg.components.options.stringSelection)
            if i == -1:
                self.status("No webpage selected for loading.")
            else:
                dlg.destroy()
                webbrowser.open(urls[i], 1, 1)



    def on_menuBloggerNewAccount_select(self, event):


Generated by  Doxygen 1.6.0   Back to index