Enabled view profile option in the menu for items in people buffers
This commit is contained in:
parent
69346bfaa1
commit
f1ce4b834a
@ -232,7 +232,7 @@ class baseBuffer(object):
|
|||||||
def open_person_profile(self, *args, **kwargs):
|
def open_person_profile(self, *args, **kwargs):
|
||||||
selected = self.get_post()
|
selected = self.get_post()
|
||||||
print selected.keys()
|
print selected.keys()
|
||||||
keys = ["from_id", "source_id"]
|
keys = ["from_id", "source_id", "id"]
|
||||||
for i in keys:
|
for i in keys:
|
||||||
if selected.has_key(i):
|
if selected.has_key(i):
|
||||||
pub.sendMessage("user-profile", person=selected[i])
|
pub.sendMessage("user-profile", person=selected[i])
|
||||||
@ -650,6 +650,7 @@ class peopleBuffer(feedBuffer):
|
|||||||
m = menus.peopleMenu()
|
m = menus.peopleMenu()
|
||||||
widgetUtils.connect_event(m, widgetUtils.MENU, self.new_chat, menuitem=m.message)
|
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_timeline, menuitem=m.timeline)
|
||||||
|
widgetUtils.connect_event(m, widgetUtils.MENU, self.open_person_profile, menuitem=m.view_profile)
|
||||||
return m
|
return m
|
||||||
|
|
||||||
def open_post(self, *args, **kwargs): pass
|
def open_post(self, *args, **kwargs): pass
|
||||||
|
@ -47,7 +47,6 @@ class peopleMenu(wx.Menu):
|
|||||||
self.AppendItem(self.message)
|
self.AppendItem(self.message)
|
||||||
self.timeline = wx.MenuItem(self, wx.NewId(), _(u"Open timeline"))
|
self.timeline = wx.MenuItem(self, wx.NewId(), _(u"Open timeline"))
|
||||||
self.AppendItem(self.timeline)
|
self.AppendItem(self.timeline)
|
||||||
self.view_profile.Enable(False)
|
|
||||||
|
|
||||||
class commentMenu(wx.Menu):
|
class commentMenu(wx.Menu):
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
|
Loading…
Reference in New Issue
Block a user