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

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

Displays a quick 'Jump To' choice box.

Definition at line 1257 of file textRouter.py.

01257                                                :
        """Displays a quick 'Jump To' choice box."""
        if not self.checkManilaAccounts(1):
            return

        prettyLocations = []
        urls = []
        manilaAccount = self.theManilaAccounts[self.theCurrentManilaAccount]
        if manilaAccount.prefs["siteurl"][-1] == "/":
            url = manilaAccount.prefs["siteurl"][0:-1]
        else:
            url = manilaAccount.prefs["siteurl"]

        prettyLocations.append("Main Page")
        prettyLocations.append("Discussion Chronological View")
        prettyLocations.append("Discussion Topics View")
        prettyLocations.append("Most-Read Messages")
        prettyLocations.append("Hourly Hits")
        prettyLocations.append("Referers")
        prettyLocations.append("Preferences")
        prettyLocations.append("Shortcuts")
        urls.append(url)
        urls.append(url + "/discuss")
        urls.append(url + "/discuss/?mode=topic")
        urls.append(url + "/stats/mostReadMessages")
        urls.append(url + "/stats/hourlyHits")
        urls.append(url + "/stats/referers")
        urls.append(url + "/admin/sitePrefs/default$welcome")
        urls.append(url + "/admin/viewShortcuts")

        storyURL = url + "/stories/storyReader$"
        for key in manilaAccount.storiesList.keys():
            prettyLocations.append(manilaAccount.storiesList[key][0])
            urls.append(storyURL + str(int(key)))

        prompt = "Please choose the URL to jump to on %s" % url
        dlg = ChooserDialog(self, "Choose URL", prompt, \
                                        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_menuManilaPreferences_select(self, event):


Generated by  Doxygen 1.6.0   Back to index