Enabled view profile option in the menu for items in people buffers

This commit is contained in:
Manuel Cortez 2016-09-21 13:54:52 -05:00
parent 69346bfaa1
commit f1ce4b834a
2 changed files with 2 additions and 2 deletions

View File

@ -232,7 +232,7 @@ class baseBuffer(object):
def open_person_profile(self, *args, **kwargs):
selected = self.get_post()
print selected.keys()
keys = ["from_id", "source_id"]
keys = ["from_id", "source_id", "id"]
for i in keys:
if selected.has_key(i):
pub.sendMessage("user-profile", person=selected[i])
@ -650,6 +650,7 @@ class peopleBuffer(feedBuffer):
m = menus.peopleMenu()
widgetUtils.connect_event(m, widgetUtils.MENU, self.new_chat, menuitem=m.message)
widgetUtils.connect_event(m, widgetUtils.MENU, self.open_timeline, menuitem=m.timeline)
widgetUtils.connect_event(m, widgetUtils.MENU, self.open_person_profile, menuitem=m.view_profile)
return m
def open_post(self, *args, **kwargs): pass

View File

@ -47,7 +47,6 @@ class peopleMenu(wx.Menu):
self.AppendItem(self.message)
self.timeline = wx.MenuItem(self, wx.NewId(), _(u"Open timeline"))
self.AppendItem(self.timeline)
self.view_profile.Enable(False)
class commentMenu(wx.Menu):
def __init__(self, *args, **kwargs):