String cleanup.

This commit is contained in:
Bill Dengler 2015-05-16 03:31:53 -04:00
parent 44605f1209
commit 671e0e0bff
2 changed files with 6 additions and 6 deletions

View File

@ -24,21 +24,21 @@ class sessionManagerWindow(widgetUtils.baseDialog):
def new_account_dialog(self):
dialog = Gtk.MessageDialog(self, 0, Gtk.MessageType.QUESTION, Gtk.ButtonsType.YES_NO, "Authorization")
dialog.format_secondary_text("The request for the required Twitter authorization to continue will be opened on your browser. You only need to do it once. Would you like to autorhise a new account now?")
dialog.format_secondary_text("The request to authorize your Twitter account will be opened in your browser. You only need to do this once. Would you like to continue?")
answer = dialog.run()
dialog.destroy()
return answer
def add_new_session_to_list(self):
total = self.list.get_count()
name = "Authorised account %d" % (total+1)
name = "Authorized account %d" % (total+1)
self.list.insert_item(name)
if self.list.get_count() == 1:
self.list.select_item(0)
def show_unauthorised_error(self):
dialog = Gtk.MessageDialog(self, 0, Gtk.MessageType.ERROR, Gtk.ButtonsType.CANCEL, "Invalid user token")
dialog.format_secondary_text("Your access token is invalid or the authorisation has failed. Please try again.")
dialog.format_secondary_text("Your access token is invalid or the authorization has failed. Please try again.")
answer = dialog.run()
return answer

View File

@ -44,17 +44,17 @@ class sessionManagerWindow(wx.Dialog):
self.EndModal(wx.ID_OK)
def new_account_dialog(self):
return wx.MessageDialog(self, _(u"The request for the required Twitter authorisation to continue will be opened on your browser. You only need to do it once. Would you like to autorhise a new account now?"), _(u"Authorisation"), wx.YES_NO).ShowModal()
return wx.MessageDialog(self, _(u"The request to authorize your Twitter account will be opened in your browser. You only need to do this once. Would you like to continue?"), _(u"Authorization"), wx.YES_NO).ShowModal()
def add_new_session_to_list(self):
total = self.list.get_count()
name = _(u"Authorised account %d") % (total+1)
name = _(u"Authorized account %d") % (total+1)
self.list.insert_item(False, name)
if self.list.get_count() == 1:
self.list.select_item(0)
def show_unauthorised_error(self):
wx.MessageDialog(None, _(u"Your access token is invalid or the authorisation has failed. Please try again."), _(u"Invalid user token"), wx.ICON_ERROR).ShowModal()
wx.MessageDialog(None, _(u"Your access token is invalid or the authorization has failed. Please try again."), _(u"Invalid user token"), wx.ICON_ERROR).ShowModal()
def get_response(self):
return self.ShowModal()