socializer/src/wxUI/menus.py

82 lines
3.0 KiB
Python
Raw Normal View History

2016-02-13 17:06:36 -06:00
# -*- coding: utf-8 -*-
import wx
class postMenu(wx.Menu):
def __init__(self, *args, **kwargs):
super(postMenu, self).__init__(*args, **kwargs)
self.open = wx.MenuItem(self, wx.NewId(), _(u"Open"))
self.Append(self.open)
2016-02-13 17:06:36 -06:00
self.like = wx.MenuItem(self, wx.NewId(), _(u"Like"))
self.Append(self.like)
self.dislike = wx.MenuItem(self, wx.NewId(), _(u"Dislike"))
self.dislike.Enable(False)
self.Append(self.dislike)
2016-02-13 17:06:36 -06:00
self.comment = wx.MenuItem(self, wx.NewId(), _(u"Add comment"))
self.Append(self.comment)
self.post_in_wall = wx.MenuItem(self, wx.NewId(), _(u"Post to this profile"))
2016-02-13 17:06:36 -06:00
self.post_in_wall.Enable(False)
self.Append(self.post_in_wall)
self.view_profile = wx.MenuItem(self, wx.NewId(), _(u"View user profile"))
self.Append(self.view_profile)
2016-02-13 17:06:36 -06:00
def create_specific_post_options(self):
self.update = wx.MenuItem(self, wx.NewId(), _(u"Update"))
self.Append(self.update)
2016-02-13 17:06:36 -06:00
self.delete = wx.MenuItem(self, wx.NewId(), _(u"Delete"))
self.Append(self.delete)
2016-02-13 17:06:36 -06:00
class audioMenu(wx.Menu):
def __init__(self, *args, **kwargs):
super(audioMenu, self).__init__(*args, **kwargs)
self.open = wx.MenuItem(self, wx.NewId(), _(u"&Open"))
self.Append(self.open)
self.play = wx.MenuItem(self, wx.NewId(), _(u"&Play"))
self.Append(self.play)
self.library = wx.MenuItem(self, wx.NewId(), _(u"&Add to library"))
self.Append(self.library)
2016-06-19 12:54:38 -05:00
self.move = wx.MenuItem(self, wx.NewId(), _(u"Move to album"))
self.Append(self.move)
class peopleMenu(wx.Menu):
def __init__(self, is_request=False, *args, **kwargs):
super(peopleMenu, self).__init__(*args, **kwargs)
if is_request:
self.create_extra_items()
self.view_profile = wx.MenuItem(self, wx.NewId(), _(u"View profile"))
self.Append(self.view_profile)
self.message = wx.MenuItem(self, wx.NewId(), _(u"Send a message"))
self.Append(self.message)
self.timeline = wx.MenuItem(self, wx.NewId(), _(u"Open timeline"))
self.Append(self.timeline)
self.common_friends = wx.MenuItem(self, wx.NewId(), _(u"View friends in common"))
self.Append(self.common_friends)
def create_extra_items(self):
self.accept = wx.MenuItem(self, wx.NewId(), _(u"Accept"))
self.Append(self.accept)
self.decline = wx.MenuItem(self, wx.NewId(), _(u"Decline"))
self.Append(self.decline)
self.keep_as_follower = wx.MenuItem(self, wx.NewId(), _(u"Keep as follower"))
self.Append(self.keep_as_follower)
2016-02-13 17:06:36 -06:00
class commentMenu(wx.Menu):
def __init__(self, *args, **kwargs):
super(commentMenu, self).__init__(*args, **kwargs)
self.open = wx.MenuItem(self, wx.NewId(), _(u"Open"))
self.Append(self.open)
2016-02-13 17:06:36 -06:00
self.like = wx.MenuItem(self, wx.NewId(), _(u"Like"))
self.Append(self.like)
2016-02-13 17:06:36 -06:00
self.unlike = wx.MenuItem(self, -1, _(u"Unlike"))
self.Append(self.unlike)
2016-02-13 17:06:36 -06:00
def create_specific_comment_options(self):
self.delete = wx.MenuItem(self, wx.NewId(), _(u"Delete"))
self.Append(self.delete)
2016-02-13 17:06:36 -06:00
class notificationsMenu(wx.Menu):
def __init__(self):
super(notificationsMenu, self).__init__()
self.mark_as_read = wx.MenuItem(self, wx.NewId(), _(u"Mark as read"))
self.Append(self.mark_as_read)