Added set status option

This commit is contained in:
2018-12-18 16:32:14 -06:00
parent 126ec7a881
commit ac2b9c6a1e
3 changed files with 14 additions and 1 deletions

View File

@@ -168,6 +168,7 @@ class Controller(object):
pub.subscribe(self.get_chat, "order-sent-message")
widgetUtils.connect_event(self.window, widgetUtils.MENU, self.view_my_profile, menuitem=self.window.view_profile)
widgetUtils.connect_event(self.window, widgetUtils.MENU, self.view_my_profile_in_browser, menuitem=self.window.open_in_browser)
widgetUtils.connect_event(self.window, widgetUtils.MENU, self.set_status, menuitem=self.window.set_status)
def disconnect_events(self):
log.debug("Disconnecting some events...")
@@ -660,4 +661,12 @@ class Controller(object):
time.sleep(60)
if hasattr(self, "longpoll"):
del self.longpoll
self.create_longpoll_thread(notify=True)
self.create_longpoll_thread(notify=True)
def set_status(self, *args, **kwargs):
dlg = wx.TextEntryDialog(self.window, _(u"Write your status message"), _(u"Set status"))
if dlg.ShowModal() == widgetUtils.OK:
result = dlg.GetValue()
info = self.session.vk.client.account.saveProfileInfo(status=result)
commonMessages.updated_status()
dlg.Destroy()

View File

@@ -33,3 +33,6 @@ def no_video_albums():
def delete_audio_album():
return wx.MessageDialog(None, _(u"Do you really want to delete this Album? this will be deleted from VK too."), _(u"Attention"), style=wx.ICON_QUESTION|wx.YES_NO).ShowModal()
def updated_status():
return wx.MessageDialog(None, _(u"Your status message has been successfully updated."), _(u"Success")).ShowModal()