Added block in people buffers' menu and blacklist management in the application menu

This commit is contained in:
2019-10-10 10:43:29 -05:00
parent f274ba9caa
commit 19a5216373
12 changed files with 118 additions and 0 deletions

View File

@@ -68,5 +68,11 @@ def community_no_items():
def delete_conversation():
return wx.MessageDialog(None, _("do you really want to delete all messages of this conversation in VK?"), _("Attention"), style=wx.ICON_QUESTION|wx.YES_NO).ShowModal()
def block_person(person):
return wx.MessageDialog(None, _("Are you really sure you want to block {user1_nom} from your VK account?").format(**person,), _("Attention"), style=wx.ICON_QUESTION|wx.YES_NO).ShowModal()
def unblock_person():
return wx.MessageDialog(None, _("Are you sure you want to unblock this user?"), _("Attention"), style=wx.ICON_QUESTION|wx.YES_NO).ShowModal()
def post_failed():
return wx.MessageDialog(None, _("Unfortunately, we could not send your last post or message to VK. Would you like to try again?"), _("Post failed"), style=wx.ICON_QUESTION|wx.YES_NO).ShowModal()

View File

@@ -15,6 +15,7 @@ class mainWindow(wx.Frame):
self.delete_audio_album = delete.Append(wx.NewId(), _("Audio album"))
self.delete_video_album = delete.Append(wx.NewId(), _("Video album"))
app_.Append(wx.NewId(), _("Delete"), delete)
self.blacklist = app_.Append(wx.NewId(), _("Blacklist"))
self.settings_dialog = app_.Append(wx.NewId(), _("Preferences"))
me = wx.Menu()
profile = wx.Menu()

View File

@@ -45,15 +45,18 @@ class peopleMenu(wx.Menu):
self.common_friends = self.Append(wx.NewId(), _("View friends in common"))
if is_request == False and is_subscriber == False and not_friend == False:
self.decline = self.Append(wx.NewId(), _("Remove from friends"))
self.block = self.Append(wx.NewId(), _("Block"))
self.open_in_browser = self.Append(wx.NewId(), _("Open in vk.com"))
def create_request_items(self):
self.accept = self.Append(wx.NewId(), _("Accept"))
self.decline = self.Append(wx.NewId(), _("Decline"))
self.keep_as_follower = self.Append(wx.NewId(), _("Keep as follower"))
self.block = self.Append(wx.NewId(), _("Block"))
def create_subscriber_items(self):
self.add = self.Append(wx.NewId(), _("Add to friends"))
self.block = self.Append(wx.NewId(), _("Block"))
class documentMenu(wx.Menu):
def __init__(self, added=False, *args, **kwargs):