Added option to open authenticated user's profile in browser

This commit is contained in:
Manuel Cortez 2018-09-06 13:07:55 -05:00
parent 6941f26e97
commit b00668e758

View File

@ -162,7 +162,7 @@ class Controller(object):
# widgetUtils.connect_event(self.window, widgetUtils.MENU, self.menu_mute, menuitem=self.window.player_mute)
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)
def disconnect_events(self):
log.debug("Disconnecting some events...")
pub.unsubscribe(self.in_post, "posted")
@ -582,4 +582,7 @@ class Controller(object):
p = profiles.userProfile(self.session, person)
def view_my_profile(self, *args, **kwargs):
self.user_profile(self.session.user_id)
self.user_profile(self.session.user_id)
def view_my_profile_in_browser(self, *args, **kwargs):
webbrowser.open_new_tab("https://vk.com/id{id}".format(id=self.session.user_id,))