Chooses a blog from the users' list of weblogs Definition at line 1351 of file textRouter.py. 01351 : """Chooses a blog from the users' list of weblogs""" if not self.checkBloggerAccounts(3): return if (not self.theBloggerAccounts[self.theCurrentBloggerAccount].checkSetupOK(3)): self.status(self.theBloggerAccounts[self.theCurrentBloggerAccount].getErrorMessage()) return options = [ weblog["blogName"] for weblog in self.theBloggerAccounts[self.theCurrentBloggerAccount].blogs ] defIndex = self.theBloggerAccounts[self.theCurrentBloggerAccount].prefs["activeBlog"] - 1 if defIndex == -2: defIndex = 0 default = options[ defIndex ] dlg = ChooserDialog(self, 'Choose Active Blog', \ "Choose the blog number to make active...", \ options, default) dlg.showModal() if not dlg.accepted(): self.status("Active blog selection cancelled.") else: i = dlg.components.options.findString(dlg.components.options.stringSelection) if i == -1: self.status("No blog selected for activation.") else: self.status("Blog '%s' set as active." % (self.theBloggerAccounts[self.theCurrentBloggerAccount].blogs[i]["blogName"])) self.theBloggerAccounts[self.theCurrentBloggerAccount].setActiveBlog(i+1) dlg.destroy() def on_menuBloggerFetchPosts_select(self, event):
|