Added an error message when there is an exception in authorisation

This commit is contained in:
2016-06-06 03:53:55 -05:00
parent 4df4e620c1
commit 2b9aa467bd
5 changed files with 25 additions and 9 deletions

View File

@@ -98,6 +98,7 @@ class Controller(object):
pub.subscribe(self.view_post, "open-post")
pub.subscribe(self.update_status_bar, "update-status-bar")
pub.subscribe(self.chat_from_id, "new-chat")
pub.subscribe(self.authorisation_failed, "authorisation-failed")
widgetUtils.connect_event(self.window, widgetUtils.CLOSE_EVENT, self.exit)
widgetUtils.connect_event(self.window, widgetUtils.MENU, self.update_buffer, menuitem=self.window.update_buffer)
widgetUtils.connect_event(self.window, widgetUtils.MENU, self.check_for_updates, menuitem=self.window.check_for_updates)
@@ -115,10 +116,14 @@ class Controller(object):
pub.unsubscribe(self.in_post, "posted")
pub.unsubscribe(self.download, "download-file")
pub.unsubscribe(self.play_audio, "play-audio")
pub.unsubscribe(self.authorisation_failed, "authorisation-failed")
pub.unsubscribe(self.play_audios, "play-audios")
pub.unsubscribe(self.view_post, "open-post")
pub.unsubscribe(self.update_status_bar, "update-status-bar")
def authorisation_failed(self):
commonMessages.bad_authorisation()
def login(self):
self.window.change_status(_(u"Logging in VK"))
self.session.login()