mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-26 12:53:12 -06:00
String cleanup.
This commit is contained in:
parent
44605f1209
commit
671e0e0bff
@ -24,21 +24,21 @@ class sessionManagerWindow(widgetUtils.baseDialog):
|
|||||||
|
|
||||||
def new_account_dialog(self):
|
def new_account_dialog(self):
|
||||||
dialog = Gtk.MessageDialog(self, 0, Gtk.MessageType.QUESTION, Gtk.ButtonsType.YES_NO, "Authorization")
|
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()
|
answer = dialog.run()
|
||||||
dialog.destroy()
|
dialog.destroy()
|
||||||
return answer
|
return answer
|
||||||
|
|
||||||
def add_new_session_to_list(self):
|
def add_new_session_to_list(self):
|
||||||
total = self.list.get_count()
|
total = self.list.get_count()
|
||||||
name = "Authorised account %d" % (total+1)
|
name = "Authorized account %d" % (total+1)
|
||||||
self.list.insert_item(name)
|
self.list.insert_item(name)
|
||||||
if self.list.get_count() == 1:
|
if self.list.get_count() == 1:
|
||||||
self.list.select_item(0)
|
self.list.select_item(0)
|
||||||
|
|
||||||
def show_unauthorised_error(self):
|
def show_unauthorised_error(self):
|
||||||
dialog = Gtk.MessageDialog(self, 0, Gtk.MessageType.ERROR, Gtk.ButtonsType.CANCEL, "Invalid user token")
|
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()
|
answer = dialog.run()
|
||||||
return answer
|
return answer
|
||||||
|
|
||||||
|
@ -44,17 +44,17 @@ class sessionManagerWindow(wx.Dialog):
|
|||||||
self.EndModal(wx.ID_OK)
|
self.EndModal(wx.ID_OK)
|
||||||
|
|
||||||
def new_account_dialog(self):
|
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):
|
def add_new_session_to_list(self):
|
||||||
total = self.list.get_count()
|
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)
|
self.list.insert_item(False, name)
|
||||||
if self.list.get_count() == 1:
|
if self.list.get_count() == 1:
|
||||||
self.list.select_item(0)
|
self.list.select_item(0)
|
||||||
|
|
||||||
def show_unauthorised_error(self):
|
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):
|
def get_response(self):
|
||||||
return self.ShowModal()
|
return self.ShowModal()
|
||||||
|
Loading…
Reference in New Issue
Block a user