Port socializer to Python 3. #16
This commit is contained in:
@@ -1,38 +1,39 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
import wx
|
||||
import application
|
||||
|
||||
def no_data_entered():
|
||||
return wx.MessageDialog(None, _(u"You must provide Both user and password."), _(u"Information needed"), wx.ICON_ERROR).ShowModal()
|
||||
return wx.MessageDialog(None, _("You must provide Both user and password."), _("Information needed"), wx.ICON_ERROR).ShowModal()
|
||||
|
||||
def no_update_available():
|
||||
return wx.MessageDialog(None, _(u"Your {0} version is up to date").format(application.name,), _(u"Update"), style=wx.OK).ShowModal()
|
||||
return wx.MessageDialog(None, _("Your {0} version is up to date").format(application.name,), _("Update"), style=wx.OK).ShowModal()
|
||||
|
||||
def remove_buffer():
|
||||
return wx.MessageDialog(None, _(u"Do you really want to dismiss this buffer?"), _(u"Attention"), style=wx.ICON_QUESTION|wx.YES_NO).ShowModal()
|
||||
return wx.MessageDialog(None, _("Do you really want to dismiss this buffer?"), _("Attention"), style=wx.ICON_QUESTION|wx.YES_NO).ShowModal()
|
||||
|
||||
def no_user_exist():
|
||||
wx.MessageDialog(None, _(u"This user does not exist"), _(u"Error"), style=wx.ICON_ERROR).ShowModal()
|
||||
wx.MessageDialog(None, _("This user does not exist"), _("Error"), style=wx.ICON_ERROR).ShowModal()
|
||||
|
||||
def show_error_code(code):
|
||||
title = ""
|
||||
message = ""
|
||||
if code == 201:
|
||||
title = _(u"Restricted access")
|
||||
message = _(u"Access to user's audio is denied by the owner. Error code {0}").format(code,)
|
||||
title = _("Restricted access")
|
||||
message = _("Access to user's audio is denied by the owner. Error code {0}").format(code,)
|
||||
return wx.MessageDialog(None, message, title, style=wx.ICON_ERROR).ShowModal()
|
||||
|
||||
def bad_authorisation():
|
||||
return wx.MessageDialog(None, _(u"authorisation failed. Your configuration will not be saved. Please close and open again the application for authorising your account. Make sure you have typed your credentials correctly."), _(u"Error"), style=wx.ICON_ERROR).ShowModal()
|
||||
return wx.MessageDialog(None, _("authorisation failed. Your configuration will not be saved. Please close and open again the application for authorising your account. Make sure you have typed your credentials correctly."), _("Error"), style=wx.ICON_ERROR).ShowModal()
|
||||
|
||||
def no_audio_albums():
|
||||
return wx.MessageDialog(None, _(u"You do not have audio albums to add tis file."), _(u"Error"), style=wx.ICON_ERROR).ShowModal()
|
||||
return wx.MessageDialog(None, _("You do not have audio albums to add tis file."), _("Error"), style=wx.ICON_ERROR).ShowModal()
|
||||
|
||||
def no_video_albums():
|
||||
return wx.MessageDialog(None, _(u"You do not have video albums to add tis file."), _(u"Error"), style=wx.ICON_ERROR).ShowModal()
|
||||
return wx.MessageDialog(None, _("You do not have video albums to add tis file."), _("Error"), style=wx.ICON_ERROR).ShowModal()
|
||||
|
||||
def delete_audio_album():
|
||||
return wx.MessageDialog(None, _(u"Do you really want to delete this Album? this will be deleted from VK too."), _(u"Attention"), style=wx.ICON_QUESTION|wx.YES_NO).ShowModal()
|
||||
return wx.MessageDialog(None, _("Do you really want to delete this Album? this will be deleted from VK too."), _("Attention"), style=wx.ICON_QUESTION|wx.YES_NO).ShowModal()
|
||||
|
||||
def updated_status():
|
||||
return wx.MessageDialog(None, _(u"Your status message has been successfully updated."), _(u"Success")).ShowModal()
|
||||
return wx.MessageDialog(None, _("Your status message has been successfully updated."), _("Success")).ShowModal()
|
@@ -1 +0,0 @@
|
||||
import message
|
@@ -1,24 +1,25 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
import wx
|
||||
import widgetUtils
|
||||
|
||||
class attachDialog(widgetUtils.BaseDialog):
|
||||
def __init__(self, voice_messages=False):
|
||||
super(attachDialog, self).__init__(None, title=_(u"Add an attachment"))
|
||||
super(attachDialog, self).__init__(None, title=_("Add an attachment"))
|
||||
panel = wx.Panel(self)
|
||||
sizer = wx.BoxSizer(wx.VERTICAL)
|
||||
lbl1 = wx.StaticText(panel, wx.NewId(), _(u"Attachments"))
|
||||
self.attachments = widgetUtils.list(panel, _(u"Type"), _(u"Title"), style=wx.LC_REPORT)
|
||||
lbl1 = wx.StaticText(panel, wx.NewId(), _("Attachments"))
|
||||
self.attachments = widgetUtils.list(panel, _("Type"), _("Title"), style=wx.LC_REPORT)
|
||||
box = wx.BoxSizer(wx.HORIZONTAL)
|
||||
box.Add(lbl1, 0, wx.ALL, 5)
|
||||
box.Add(self.attachments.list, 0, wx.ALL, 5)
|
||||
sizer.Add(box, 0, wx.ALL, 5)
|
||||
static = wx.StaticBox(panel, label=_(u"Add attachments"))
|
||||
self.photo = wx.Button(panel, wx.NewId(), _(u"&Photo"))
|
||||
self.audio = wx.Button(panel, wx.NewId(), _(u"Audio file"))
|
||||
static = wx.StaticBox(panel, label=_("Add attachments"))
|
||||
self.photo = wx.Button(panel, wx.NewId(), _("&Photo"))
|
||||
self.audio = wx.Button(panel, wx.NewId(), _("Audio file"))
|
||||
if voice_messages:
|
||||
self.voice_message = wx.Button(panel, wx.NewId(), _(u"Voice message"))
|
||||
self.remove = wx.Button(panel, wx.NewId(), _(u"Remove attachment"))
|
||||
self.voice_message = wx.Button(panel, wx.NewId(), _("Voice message"))
|
||||
self.remove = wx.Button(panel, wx.NewId(), _("Remove attachment"))
|
||||
self.remove.Enable(False)
|
||||
btnsizer = wx.StaticBoxSizer(static, wx.HORIZONTAL)
|
||||
btnsizer.Add(self.photo, 0, wx.ALL, 5)
|
||||
@@ -37,21 +38,21 @@ class attachDialog(widgetUtils.BaseDialog):
|
||||
self.SetClientSize(sizer.CalcMin())
|
||||
|
||||
def get_image(self):
|
||||
openFileDialog = wx.FileDialog(self, _(u"Select the picture to be uploaded"), "", "", _("Image files (*.png, *.jpg, *.gif)|*.png; *.jpg; *.gif"), wx.FD_OPEN | wx.FD_FILE_MUST_EXIST)
|
||||
openFileDialog = wx.FileDialog(self, _("Select the picture to be uploaded"), "", "", _("Image files (*.png, *.jpg, *.gif)|*.png; *.jpg; *.gif"), wx.FD_OPEN | wx.FD_FILE_MUST_EXIST)
|
||||
if openFileDialog.ShowModal() == wx.ID_CANCEL:
|
||||
return None
|
||||
dsc = self.ask_description()
|
||||
return (openFileDialog.GetPath(), dsc)
|
||||
|
||||
def ask_description(self):
|
||||
dlg = wx.TextEntryDialog(self, _(u"please provide a description"), _(u"Description"))
|
||||
dlg = wx.TextEntryDialog(self, _("please provide a description"), _("Description"))
|
||||
dlg.ShowModal()
|
||||
result = dlg.GetValue()
|
||||
dlg.Destroy()
|
||||
return result
|
||||
|
||||
def get_audio(self):
|
||||
openFileDialog = wx.FileDialog(self, _(u"Select the audio file to be uploaded"), "", "", _("Audio files (*.mp3)|*.mp3"), wx.FD_OPEN | wx.FD_FILE_MUST_EXIST)
|
||||
openFileDialog = wx.FileDialog(self, _("Select the audio file to be uploaded"), "", "", _("Audio files (*.mp3)|*.mp3"), wx.FD_OPEN | wx.FD_FILE_MUST_EXIST)
|
||||
if openFileDialog.ShowModal() == wx.ID_CANCEL:
|
||||
return None
|
||||
return openFileDialog.GetPath()
|
||||
|
@@ -1,4 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
import wx
|
||||
import widgetUtils
|
||||
|
||||
@@ -6,24 +7,24 @@ class general(wx.Panel, widgetUtils.BaseDialog):
|
||||
def __init__(self, panel):
|
||||
super(general, self).__init__(panel)
|
||||
sizer = wx.BoxSizer(wx.VERTICAL)
|
||||
lbl1 = wx.StaticText(self, wx.NewId(), _(u"Number of items to load for newsfeed and wall buffers (maximun 100)"))
|
||||
lbl1 = wx.StaticText(self, wx.NewId(), _("Number of items to load for newsfeed and wall buffers (maximun 100)"))
|
||||
self.wall_buffer_count = wx.SpinCtrl(self, wx.NewId())
|
||||
self.wall_buffer_count.SetRange(1, 100)
|
||||
box1 = wx.BoxSizer(wx.HORIZONTAL)
|
||||
box1.Add(lbl1, 0, wx.ALL, 5)
|
||||
box1.Add(self.wall_buffer_count, 0, wx.ALL, 5)
|
||||
sizer.Add(box1, 0, wx.ALL, 5)
|
||||
lbl3 = wx.StaticText(self, wx.NewId(), _(u"Number of items to load in video buffers (maximun 200)"))
|
||||
lbl3 = wx.StaticText(self, wx.NewId(), _("Number of items to load in video buffers (maximun 200)"))
|
||||
self.video_buffers_count = wx.SpinCtrl(self, wx.NewId())
|
||||
self.video_buffers_count.SetRange(1, 200)
|
||||
box3 = wx.BoxSizer(wx.HORIZONTAL)
|
||||
box3.Add(lbl3, 0, wx.ALL, 5)
|
||||
box3.Add(self.video_buffers_count, 0, wx.ALL, 5)
|
||||
sizer.Add(box3, 0, wx.ALL, 5)
|
||||
self.load_images = wx.CheckBox(self, wx.NewId(), _(u"Load images in posts"))
|
||||
self.load_images = wx.CheckBox(self, wx.NewId(), _("Load images in posts"))
|
||||
sizer.Add(self.load_images, 0, wx.ALL, 5)
|
||||
lbl4 = wx.StaticText(self, wx.NewId(), _(u"Update channel"))
|
||||
self.update_channel = wx.ComboBox(self, wx.NewId(), choices=[_(u"Stable"), _(u"Alpha")], value=_(u"Native"), style=wx.CB_READONLY)
|
||||
lbl4 = wx.StaticText(self, wx.NewId(), _("Update channel"))
|
||||
self.update_channel = wx.ComboBox(self, wx.NewId(), choices=[_("Stable"), _("Alpha")], value=_("Native"), style=wx.CB_READONLY)
|
||||
box4 = wx.BoxSizer(wx.HORIZONTAL)
|
||||
box4.Add(lbl4, 0, wx.ALL, 5)
|
||||
box4.Add(self.update_channel, 0, wx.ALL, 5)
|
||||
@@ -34,16 +35,16 @@ class chat(wx.Panel, widgetUtils.BaseDialog):
|
||||
def __init__(self, panel):
|
||||
super(chat, self).__init__(panel)
|
||||
sizer = wx.BoxSizer(wx.VERTICAL)
|
||||
self.notify_online = wx.CheckBox(self, wx.NewId(), _(u"Show notifications when users are online"))
|
||||
self.notify_online = wx.CheckBox(self, wx.NewId(), _("Show notifications when users are online"))
|
||||
sizer.Add(self.notify_online, 0, wx.ALL, 5)
|
||||
self.notify_offline = wx.CheckBox(self, wx.NewId(), _(u"Show notifications when users are offline"))
|
||||
self.notify_offline = wx.CheckBox(self, wx.NewId(), _("Show notifications when users are offline"))
|
||||
sizer.Add(self.notify_offline, 0, wx.ALL, 5)
|
||||
self.open_unread_conversations = wx.CheckBox(self, wx.NewId(), _(u"Open unread conversations at startup"))
|
||||
self.open_unread_conversations = wx.CheckBox(self, wx.NewId(), _("Open unread conversations at startup"))
|
||||
sizer.Add(self.open_unread_conversations, 0, wx.ALL, 5)
|
||||
self.automove_to_conversations = wx.CheckBox(self, wx.NewId(), _(u"Move focus to new conversations"))
|
||||
self.automove_to_conversations = wx.CheckBox(self, wx.NewId(), _("Move focus to new conversations"))
|
||||
sizer.Add(self.automove_to_conversations, 0, wx.ALL, 5)
|
||||
lbl = wx.StaticText(self, wx.NewId(), _(u"Notification type"))
|
||||
self.notifications = wx.ComboBox(self, wx.NewId(), choices=[_(u"Native"), _(u"Custom"),], value=_(u"Native"), style=wx.CB_READONLY)
|
||||
lbl = wx.StaticText(self, wx.NewId(), _("Notification type"))
|
||||
self.notifications = wx.ComboBox(self, wx.NewId(), choices=[_("Native"), _("Custom"),], value=_("Native"), style=wx.CB_READONLY)
|
||||
nbox = wx.BoxSizer(wx.HORIZONTAL)
|
||||
nbox.Add(lbl, 0, wx.ALL, 5)
|
||||
nbox.Add(self.notifications, 0, wx.ALL, 5)
|
||||
@@ -60,20 +61,20 @@ class configurationDialog(widgetUtils.BaseDialog):
|
||||
|
||||
def create_general(self):
|
||||
self.general = general(self.notebook)
|
||||
self.notebook.AddPage(self.general, _(u"General"))
|
||||
self.notebook.AddPage(self.general, _("General"))
|
||||
self.general.SetFocus()
|
||||
|
||||
def create_chat(self):
|
||||
self.chat = chat(self.notebook)
|
||||
self.notebook.AddPage(self.chat, _(u"Chat settings"))
|
||||
self.notebook.AddPage(self.chat, _("Chat settings"))
|
||||
|
||||
|
||||
def realize(self):
|
||||
self.sizer.Add(self.notebook, 0, wx.ALL, 5)
|
||||
ok_cancel_box = wx.BoxSizer(wx.HORIZONTAL)
|
||||
ok = wx.Button(self.panel, wx.ID_OK, _(u"Save"))
|
||||
ok = wx.Button(self.panel, wx.ID_OK, _("Save"))
|
||||
ok.SetDefault()
|
||||
cancel = wx.Button(self.panel, wx.ID_CANCEL, _(u"Close"))
|
||||
cancel = wx.Button(self.panel, wx.ID_CANCEL, _("Close"))
|
||||
self.SetEscapeId(cancel.GetId())
|
||||
ok_cancel_box.Add(ok, 0, wx.ALL, 5)
|
||||
ok_cancel_box.Add(cancel, 0, wx.ALL, 5)
|
||||
@@ -91,7 +92,7 @@ class configurationDialog(widgetUtils.BaseDialog):
|
||||
getattr(control, "SetValue")(value)
|
||||
|
||||
def alpha_channel():
|
||||
return wx.MessageDialog(None, _(u"The alpha channel contains bleeding edge changes introduced to Socializer. A new alpha update is generated every time there are new changes in the project. Take into account that updates are generated automatically and may fail at any time due to errors in the build process. Use alpha channels when you are sure you want to try the latest changes and contribute with reports to fix bugs. Never use alpha channel updates for everyday use. Do you want to continue?"), _(u"Attention"), style=wx.ICON_QUESTION|wx.YES_NO).ShowModal()
|
||||
return wx.MessageDialog(None, _("The alpha channel contains bleeding edge changes introduced to Socializer. A new alpha update is generated every time there are new changes in the project. Take into account that updates are generated automatically and may fail at any time due to errors in the build process. Use alpha channels when you are sure you want to try the latest changes and contribute with reports to fix bugs. Never use alpha channel updates for everyday use. Do you want to continue?"), _("Attention"), style=wx.ICON_QUESTION|wx.YES_NO).ShowModal()
|
||||
|
||||
def weekly_channel():
|
||||
return wx.MessageDialog(None, _(u"The weekly channel generates an update automatically every week by building the source code present in the project. This version is used to test features added to the next stable version. Do you want to continue?"), _(u"Attention"), style=wx.ICON_QUESTION|wx.YES_NO).ShowModal()
|
||||
return wx.MessageDialog(None, _("The weekly channel generates an update automatically every week by building the source code present in the project. This version is used to test features added to the next stable version. Do you want to continue?"), _("Attention"), style=wx.ICON_QUESTION|wx.YES_NO).ShowModal()
|
@@ -1,21 +1,23 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
import wx
|
||||
import widgetUtils
|
||||
|
||||
class audio_album(widgetUtils.BaseDialog):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(audio_album, self).__init__(title=_(u"Create a new album"), parent=None)
|
||||
super(audio_album, self).__init__(title=_("Create a new album"), parent=None)
|
||||
panel = wx.Panel(self)
|
||||
sizer = wx.BoxSizer(wx.VERTICAL)
|
||||
lbl = wx.StaticText(panel, wx.NewId(), _(u"Album title"))
|
||||
lbl = wx.StaticText(panel, wx.NewId(), _("Album title"))
|
||||
self.title = wx.TextCtrl(panel, wx.NewId())
|
||||
box = wx.BoxSizer(wx.HORIZONTAL)
|
||||
box.Add(lbl, 1, wx.ALL, 5)
|
||||
box.Add(self.title, 1, wx.ALL, 5)
|
||||
sizer.Add(box, 1, wx.ALL, 5)
|
||||
ok = wx.Button(panel, wx.ID_OK, _(u"&OK"))
|
||||
ok = wx.Button(panel, wx.ID_OK, _("&OK"))
|
||||
ok.SetDefault()
|
||||
cancel = wx.Button(panel, wx.ID_CANCEL, _(u"&Close"))
|
||||
cancel = wx.Button(panel, wx.ID_CANCEL, _("&Close"))
|
||||
btnsizer = wx.BoxSizer()
|
||||
btnsizer.Add(ok, 0, wx.ALL, 5)
|
||||
btnsizer.Add(cancel, 0, wx.ALL, 5)
|
||||
|
@@ -1,4 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
import wx
|
||||
import widgetUtils
|
||||
|
||||
@@ -16,8 +17,8 @@ class textMessage(widgetUtils.BaseDialog):
|
||||
self.textBox.Add(self.text, 0, wx.ALL, 5)
|
||||
|
||||
def create_privacy_box(self):
|
||||
lbl = wx.StaticText(self.panel, wx.NewId(), _(u"&Privacy"))
|
||||
self.privacy = wx.ComboBox(self.panel, wx.NewId(), choices=[_(u"All users"), _(u"Friends of friends"),], value=_(u"All users"), style=wx.CB_READONLY)
|
||||
lbl = wx.StaticText(self.panel, wx.NewId(), _("&Privacy"))
|
||||
self.privacy = wx.ComboBox(self.panel, wx.NewId(), choices=[_("All users"), _("Friends of friends"),], value=_("All users"), style=wx.CB_READONLY)
|
||||
self.privacyBox = wx.BoxSizer(wx.HORIZONTAL)
|
||||
self.privacyBox.Add(lbl, 0, wx.ALL, 5)
|
||||
self.privacyBox.Add(self.privacy, 0, wx.ALL, 5)
|
||||
@@ -58,13 +59,13 @@ class post(textMessage):
|
||||
self.mainBox.Add(self.textBox, 0, wx.ALL, 5)
|
||||
self.create_privacy_box()
|
||||
self.mainBox.Add(self.privacyBox, 0, wx.ALL, 5)
|
||||
self.attach = wx.Button(self.panel, -1, _(u"Attach"), size=wx.DefaultSize)
|
||||
self.mention = wx.Button(self.panel, wx.NewId(), _(u"Tag a friend"))
|
||||
self.attach = wx.Button(self.panel, -1, _("Attach"), size=wx.DefaultSize)
|
||||
self.mention = wx.Button(self.panel, wx.NewId(), _("Tag a friend"))
|
||||
self.spellcheck = wx.Button(self.panel, -1, _("Spelling &correction"), size=wx.DefaultSize)
|
||||
self.translateButton = wx.Button(self.panel, -1, _(u"&Translate message"), size=wx.DefaultSize)
|
||||
self.okButton = wx.Button(self.panel, wx.ID_OK, _(u"Send"), size=wx.DefaultSize)
|
||||
self.translateButton = wx.Button(self.panel, -1, _("&Translate message"), size=wx.DefaultSize)
|
||||
self.okButton = wx.Button(self.panel, wx.ID_OK, _("Send"), size=wx.DefaultSize)
|
||||
self.okButton.SetDefault()
|
||||
cancelButton = wx.Button(self.panel, wx.ID_CANCEL, _(u"Close"), size=wx.DefaultSize)
|
||||
cancelButton = wx.Button(self.panel, wx.ID_CANCEL, _("Close"), size=wx.DefaultSize)
|
||||
self.buttonsBox1 = wx.BoxSizer(wx.HORIZONTAL)
|
||||
self.buttonsBox1.Add(self.attach, 0, wx.ALL, 10)
|
||||
self.buttonsBox1.Add(self.mention, 0, wx.ALL, 10)
|
||||
@@ -94,11 +95,11 @@ class comment(textMessage):
|
||||
self.createTextArea(message, text)
|
||||
self.mainBox.Add(self.textBox, 0, wx.ALL, 5)
|
||||
self.spellcheck = wx.Button(self.panel, -1, _("Spelling correction"), size=wx.DefaultSize)
|
||||
self.mention = wx.Button(self.panel, wx.NewId(), _(u"Tag a friend"))
|
||||
self.translateButton = wx.Button(self.panel, -1, _(u"Translate message"), size=wx.DefaultSize)
|
||||
self.okButton = wx.Button(self.panel, wx.ID_OK, _(u"Send"), size=wx.DefaultSize)
|
||||
self.mention = wx.Button(self.panel, wx.NewId(), _("Tag a friend"))
|
||||
self.translateButton = wx.Button(self.panel, -1, _("Translate message"), size=wx.DefaultSize)
|
||||
self.okButton = wx.Button(self.panel, wx.ID_OK, _("Send"), size=wx.DefaultSize)
|
||||
self.okButton.SetDefault()
|
||||
cancelButton = wx.Button(self.panel, wx.ID_CANCEL, _(u"Close"), size=wx.DefaultSize)
|
||||
cancelButton = wx.Button(self.panel, wx.ID_CANCEL, _("Close"), size=wx.DefaultSize)
|
||||
self.buttonsBox1 = wx.BoxSizer(wx.HORIZONTAL)
|
||||
self.buttonsBox1.Add(self.spellcheck, 0, wx.ALL, 10)
|
||||
self.buttonsBox1.Add(self.mention, 0, wx.ALL, 10)
|
||||
|
@@ -1,9 +1,10 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
import wx
|
||||
import widgetUtils
|
||||
|
||||
class audioPlayerDialog(widgetUtils.BaseDialog):
|
||||
|
||||
def __init__(self):
|
||||
super(audioPlayerDialog, self).__init__(None, wx.NewId(), _(u"Audio player"))
|
||||
super(audioPlayerDialog, self).__init__(None, wx.NewId(), _("Audio player"))
|
||||
sizer = wx.BoxSizer(wx.VERTICAL)
|
@@ -1,4 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
import wx
|
||||
import widgetUtils
|
||||
|
||||
@@ -12,7 +13,7 @@ class basicPost(widgetUtils.BaseDialog):
|
||||
self.panel.SetSizer(self.sizer)
|
||||
self.SetClientSize(self.sizer.CalcMin())
|
||||
|
||||
def create_post_view(self, label=_(u"Message")):
|
||||
def create_post_view(self, label=_("Message")):
|
||||
lbl = wx.StaticText(self.panel, -1, label)
|
||||
self.post_view = wx.TextCtrl(self.panel, -1, size=(730, -1), style=wx.TE_READONLY|wx.TE_MULTILINE)
|
||||
box = wx.BoxSizer(wx.HORIZONTAL)
|
||||
@@ -21,16 +22,16 @@ class basicPost(widgetUtils.BaseDialog):
|
||||
return box
|
||||
|
||||
def create_comments_list(self):
|
||||
lbl = wx.StaticText(self.panel, -1, _(u"Comments"))
|
||||
self.comments = widgetUtils.list(self.panel, _(u"User"), _(u"Comment"), _(u"Date"), _(u"Likes"), style=wx.LC_REPORT)
|
||||
lbl = wx.StaticText(self.panel, -1, _("Comments"))
|
||||
self.comments = widgetUtils.list(self.panel, _("User"), _("Comment"), _("Date"), _("Likes"), style=wx.LC_REPORT)
|
||||
box = wx.BoxSizer(wx.HORIZONTAL)
|
||||
box.Add(lbl, 0, wx.ALL, 5)
|
||||
box.Add(self.comments.list, 0, wx.ALL, 5)
|
||||
return box
|
||||
|
||||
def create_attachments(self):
|
||||
lbl = wx.StaticText(self.panel, -1, _(u"Attachments"))
|
||||
self.attachments = widgetUtils.list(self.panel, _(u"Type"), _(u"Title"), style=wx.LC_REPORT)
|
||||
lbl = wx.StaticText(self.panel, -1, _("Attachments"))
|
||||
self.attachments = widgetUtils.list(self.panel, _("Type"), _("Title"), style=wx.LC_REPORT)
|
||||
box = wx.BoxSizer(wx.HORIZONTAL)
|
||||
box.Add(lbl, 0, wx.ALL, 5)
|
||||
box.Add(self.attachments.list, 0, wx.ALL, 5)
|
||||
@@ -39,9 +40,9 @@ class basicPost(widgetUtils.BaseDialog):
|
||||
def create_photo_viewer(self):
|
||||
self.image = wx.StaticBitmap(self.panel, bitmap=wx.Bitmap(1280, 860), size=(604, 604))
|
||||
self.sizer.Add(self.image, 1, wx.ALL, 10)
|
||||
self.previous_photo = wx.Button(self.panel, wx.NewId(), _(u"Previous photo"))
|
||||
self.view_photo = wx.Button(self.panel, wx.NewId(), _(u"View in full screen"))
|
||||
self.next_photo = wx.Button(self.panel, wx.NewId(), _(u"Next photo"))
|
||||
self.previous_photo = wx.Button(self.panel, wx.NewId(), _("Previous photo"))
|
||||
self.view_photo = wx.Button(self.panel, wx.NewId(), _("View in full screen"))
|
||||
self.next_photo = wx.Button(self.panel, wx.NewId(), _("Next photo"))
|
||||
actionsS = wx.BoxSizer(wx.HORIZONTAL)
|
||||
actionsS.Add(self.previous_photo, 0, wx.ALL, 5)
|
||||
actionsS.Add(self.view_photo, 0, wx.ALL, 5)
|
||||
@@ -59,27 +60,27 @@ class basicPost(widgetUtils.BaseDialog):
|
||||
|
||||
|
||||
def create_likes_box(self):
|
||||
self.likes = wx.Button(self.panel, -1, _(u"Loading data..."))
|
||||
self.likes = wx.Button(self.panel, -1, _("Loading data..."))
|
||||
return self.likes
|
||||
|
||||
def create_shares_box(self):
|
||||
self.shares = wx.Button(self.panel, -1, _(u"Loading data..."))
|
||||
self.shares = wx.Button(self.panel, -1, _("Loading data..."))
|
||||
return self.shares
|
||||
|
||||
def create_action_buttons(self, comment=True):
|
||||
self.like = wx.Button(self.panel, -1, _(u"&Like"))
|
||||
self.repost = wx.Button(self.panel, -1, _(u"Repost"))
|
||||
if comment: self.comment = wx.Button(self.panel, -1, _(u"Add comment"))
|
||||
self.like = wx.Button(self.panel, -1, _("&Like"))
|
||||
self.repost = wx.Button(self.panel, -1, _("Repost"))
|
||||
if comment: self.comment = wx.Button(self.panel, -1, _("Add comment"))
|
||||
box = wx.BoxSizer(wx.HORIZONTAL)
|
||||
box.Add(self.like, 0, wx.ALL, 5)
|
||||
if comment: box.Add(self.comment, 0, wx.ALL, 5)
|
||||
return box
|
||||
|
||||
def create_tools_button(self):
|
||||
self.tools = wx.Button(self.panel, -1, _(u"Actions"))
|
||||
self.tools = wx.Button(self.panel, -1, _("Actions"))
|
||||
|
||||
def create_dialog_buttons(self):
|
||||
self.close = wx.Button(self.panel, wx.ID_CANCEL, _(u"Close"))
|
||||
self.close = wx.Button(self.panel, wx.ID_CANCEL, _("Close"))
|
||||
return self.close
|
||||
|
||||
def set_post(self, text):
|
||||
@@ -98,13 +99,13 @@ class basicPost(widgetUtils.BaseDialog):
|
||||
|
||||
def set_likes(self, likes):
|
||||
if hasattr(self, "likes"):
|
||||
self.likes.SetLabel(_(u"{0} people like this").format(likes,))
|
||||
self.likes.SetLabel(_("{0} people like this").format(likes,))
|
||||
else:
|
||||
return False
|
||||
|
||||
def set_shares(self, shares):
|
||||
if hasattr(self, "shares"):
|
||||
self.shares.SetLabel(_(u"Shared {0} times").format(shares,))
|
||||
self.shares.SetLabel(_("Shared {0} times").format(shares,))
|
||||
else:
|
||||
return False
|
||||
|
||||
@@ -150,40 +151,40 @@ class audio(widgetUtils.BaseDialog):
|
||||
super(audio, self).__init__(parent=None, *args, **kwargs)
|
||||
panel = wx.Panel(self)
|
||||
sizer = wx.BoxSizer(wx.VERTICAL)
|
||||
lbl_list = wx.StaticText(panel, wx.NewId(), _(u"Audio &files"))
|
||||
lbl_list = wx.StaticText(panel, wx.NewId(), _("Audio &files"))
|
||||
self.list = wx.ListBox(panel, wx.NewId())
|
||||
listS = wx.BoxSizer(wx.HORIZONTAL)
|
||||
listS.Add(lbl_list, 0, wx.ALL, 5)
|
||||
listS.Add(self.list, 0, wx.ALL, 5)
|
||||
sizer.Add(listS, 0, wx.ALL, 5)
|
||||
lbl_title = wx.StaticText(panel, wx.NewId(), _(u"&Title"))
|
||||
lbl_title = wx.StaticText(panel, wx.NewId(), _("&Title"))
|
||||
self.title = wx.TextCtrl(panel, wx.NewId(), size=(413, -1), style=wx.TE_READONLY|wx.TE_MULTILINE)
|
||||
titleBox = wx.BoxSizer(wx.HORIZONTAL)
|
||||
titleBox.Add(lbl_title, 0, wx.ALL, 5)
|
||||
titleBox.Add(self.title, 0, wx.ALL, 5)
|
||||
sizer.Add(titleBox, 0, wx.ALL, 5)
|
||||
lbl_artist = wx.StaticText(panel, wx.NewId(), _(u"&Artist"))
|
||||
lbl_artist = wx.StaticText(panel, wx.NewId(), _("&Artist"))
|
||||
self.artist = wx.TextCtrl(panel, wx.NewId(), size=(413, -1), style=wx.TE_READONLY|wx.TE_MULTILINE)
|
||||
artistBox = wx.BoxSizer(wx.HORIZONTAL)
|
||||
artistBox.Add(lbl_artist, 0, wx.ALL, 5)
|
||||
artistBox.Add(self.artist, 0, wx.ALL, 5)
|
||||
sizer.Add(artistBox, 0, wx.ALL, 5)
|
||||
lbl_duration = wx.StaticText(panel, wx.NewId(), _(u"&Duration"))
|
||||
lbl_duration = wx.StaticText(panel, wx.NewId(), _("&Duration"))
|
||||
self.duration = wx.TextCtrl(panel, wx.NewId(), size=(413, -1), style=wx.TE_READONLY|wx.TE_MULTILINE)
|
||||
durationBox = wx.BoxSizer(wx.HORIZONTAL)
|
||||
durationBox.Add(lbl_duration, 0, wx.ALL, 5)
|
||||
durationBox.Add(self.duration, 0, wx.ALL, 5)
|
||||
sizer.Add(durationBox, 0, wx.ALL, 5)
|
||||
lbl_lyrics = wx.StaticText(panel, wx.NewId(), _(u"&Lyric"))
|
||||
lbl_lyrics = wx.StaticText(panel, wx.NewId(), _("&Lyric"))
|
||||
self.lyric = wx.TextCtrl(panel, wx.NewId(), size=(500, 500), style=wx.TE_READONLY|wx.TE_MULTILINE)
|
||||
lbox = wx.BoxSizer(wx.HORIZONTAL)
|
||||
lbox.Add(lbl_lyrics, 0, wx.ALL, 5)
|
||||
lbox.Add(self.lyric, 0, wx.ALL, 5)
|
||||
sizer.Add(lbox, 0, wx.ALL, 5)
|
||||
self.play = wx.Button(panel, wx.NewId(), _(u"&Play"))
|
||||
self.download = wx.Button(panel, wx.NewId(), _(u"&Download"))
|
||||
self.add = wx.Button(panel, wx.NewId(), _(u"&Add to your library"))
|
||||
self.remove = wx.Button(panel, wx.NewId(), _(u"&Remove from your library"))
|
||||
self.play = wx.Button(panel, wx.NewId(), _("&Play"))
|
||||
self.download = wx.Button(panel, wx.NewId(), _("&Download"))
|
||||
self.add = wx.Button(panel, wx.NewId(), _("&Add to your library"))
|
||||
self.remove = wx.Button(panel, wx.NewId(), _("&Remove from your library"))
|
||||
self.add.Enable(False)
|
||||
self.remove.Enable(False)
|
||||
close = wx.Button(panel, wx.ID_CANCEL)
|
||||
@@ -198,7 +199,7 @@ class audio(widgetUtils.BaseDialog):
|
||||
getattr(self, button_name).Enable(state)
|
||||
|
||||
def get_destination_path(self, filename):
|
||||
saveFileDialog = wx.FileDialog(self, _(u"Save this file"), "", filename, _(u"Audio Files(*.mp3)|*.mp3"), wx.FD_SAVE | wx.FD_OVERWRITE_PROMPT)
|
||||
saveFileDialog = wx.FileDialog(self, _("Save this file"), "", filename, _("Audio Files(*.mp3)|*.mp3"), wx.FD_SAVE | wx.FD_OVERWRITE_PROMPT)
|
||||
if saveFileDialog.ShowModal() == wx.ID_OK:
|
||||
return saveFileDialog.GetPath()
|
||||
saveFileDialog.Destroy()
|
||||
@@ -214,7 +215,7 @@ class friendship(widgetUtils.BaseDialog):
|
||||
super(friendship, self).__init__(parent=None)
|
||||
panel = wx.Panel(self)
|
||||
sizer = wx.BoxSizer(wx.VERTICAL)
|
||||
self.friends = widgetUtils.list(panel, [_(u"Friend")], style=wx.LC_REPORT)
|
||||
self.friends = widgetUtils.list(panel, [_("Friend")], style=wx.LC_REPORT)
|
||||
sizer.Add(self.friends.list, 0, wx.ALL, 5)
|
||||
close = wx.Button(panel, wx.ID_CANCEL)
|
||||
btnbox = wx.BoxSizer(wx.HORIZONTAL)
|
||||
|
@@ -1,5 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
""" A set of dialogs related to user and community profiles."""
|
||||
from __future__ import unicode_literals
|
||||
import wx
|
||||
import widgetUtils
|
||||
|
||||
@@ -42,7 +43,7 @@ class mainInfo(wx.Panel):
|
||||
def __init__(self, panel):
|
||||
super(mainInfo, self).__init__(panel)
|
||||
sizer = wx.BoxSizer(wx.VERTICAL)
|
||||
lblName = wx.StaticText(self, wx.NewId(), _(u"Name"))
|
||||
lblName = wx.StaticText(self, wx.NewId(), _("Name"))
|
||||
self.name = wx.TextCtrl(self, wx.NewId(), style=wx.TE_READONLY|wx.TE_MULTILINE)
|
||||
self.name.SetMinSize(text_size(self.name, 60))
|
||||
sizerName = wx.BoxSizer(wx.HORIZONTAL)
|
||||
@@ -50,7 +51,7 @@ class mainInfo(wx.Panel):
|
||||
sizerName.Add(self.name, 0, wx.ALL, 5)
|
||||
sizer.Add(sizerName, 0, wx.ALL, 5)
|
||||
|
||||
lblStatus = wx.StaticText(self, wx.NewId(), _(u"Status"))
|
||||
lblStatus = wx.StaticText(self, wx.NewId(), _("Status"))
|
||||
self.status = wx.TextCtrl(self, wx.NewId(), style=wx.TE_READONLY|wx.TE_MULTILINE)
|
||||
self.status.Enable(False)
|
||||
self.status.SetMinSize(text_size(self.status, 300))
|
||||
@@ -59,7 +60,7 @@ class mainInfo(wx.Panel):
|
||||
sizerStatus.Add(self.status, 0, wx.ALL, 5)
|
||||
sizer.Add(sizerStatus, 0, wx.ALL, 5)
|
||||
|
||||
lblLastSeen = wx.StaticText(self, wx.NewId(), _(u"Last seen"))
|
||||
lblLastSeen = wx.StaticText(self, wx.NewId(), _("Last seen"))
|
||||
self.last_seen = wx.TextCtrl(self, wx.NewId(), style=wx.TE_READONLY|wx.TE_MULTILINE)
|
||||
self.last_seen.Enable(False)
|
||||
sizerLastSeen = wx.BoxSizer(wx.HORIZONTAL)
|
||||
@@ -67,7 +68,7 @@ class mainInfo(wx.Panel):
|
||||
sizerLastSeen.Add(self.last_seen, 0, wx.ALL, 5)
|
||||
sizer.Add(sizerLastSeen, 0, wx.ALL, 5)
|
||||
|
||||
lblBDate = wx.StaticText(self, wx.NewId(), _(u"Birthdate"))
|
||||
lblBDate = wx.StaticText(self, wx.NewId(), _("Birthdate"))
|
||||
self.bdate = wx.TextCtrl(self, wx.NewId(), style=wx.TE_READONLY|wx.TE_MULTILINE)
|
||||
self.bdate.Enable(False)
|
||||
sizerBDate = wx.BoxSizer(wx.HORIZONTAL)
|
||||
@@ -79,7 +80,7 @@ class mainInfo(wx.Panel):
|
||||
self.relation.Enable(False)
|
||||
sizer.Add(self.relation, 0, wx.ALL, 5)
|
||||
|
||||
lblCity = wx.StaticText(self, wx.NewId(), _(u"Current city"))
|
||||
lblCity = wx.StaticText(self, wx.NewId(), _("Current city"))
|
||||
self.city = wx.TextCtrl(self, wx.NewId(), style=wx.TE_READONLY|wx.TE_MULTILINE)
|
||||
self.city.SetMinSize(text_size(self.city, 40))
|
||||
self.city.Enable(False)
|
||||
@@ -88,7 +89,7 @@ class mainInfo(wx.Panel):
|
||||
sizerCity.Add(self.city, 0, wx.ALL, 5)
|
||||
sizer.Add(sizerCity, 0, wx.ALL, 5)
|
||||
|
||||
lblHometown = wx.StaticText(self, wx.NewId(), _(u"Home Town"))
|
||||
lblHometown = wx.StaticText(self, wx.NewId(), _("Home Town"))
|
||||
self.home_town = wx.TextCtrl(self, wx.NewId(), style=wx.TE_READONLY|wx.TE_MULTILINE)
|
||||
self.home_town.SetMinSize(text_size(self.home_town, 40))
|
||||
self.home_town.Enable(False)
|
||||
@@ -97,11 +98,11 @@ class mainInfo(wx.Panel):
|
||||
sizerHometown.Add(self.home_town, 0, wx.ALL, 5)
|
||||
sizer.Add(sizerHometown, 0, wx.ALL, 5)
|
||||
|
||||
lblWebsite = wx.StaticText(self, wx.NewId(), _(u"Website"))
|
||||
lblWebsite = wx.StaticText(self, wx.NewId(), _("Website"))
|
||||
self.website = wx.TextCtrl(self, wx.NewId(), style=wx.TE_READONLY|wx.TE_MULTILINE)#size=(500, -1))
|
||||
self.website.SetMinSize(text_size(self.website, 90))
|
||||
self.website.Enable(False)
|
||||
self.go_site = wx.Button(self, -1, _(u"Visit website"))
|
||||
self.go_site = wx.Button(self, -1, _("Visit website"))
|
||||
self.go_site.Enable(False)
|
||||
sizerWebsite = wx.BoxSizer(wx.HORIZONTAL)
|
||||
sizerWebsite.Add(lblWebsite, 0, wx.ALL, 5)
|
||||
@@ -109,7 +110,7 @@ class mainInfo(wx.Panel):
|
||||
sizerWebsite.Add(self.go_site, 1, wx.ALL, 5)
|
||||
sizer.Add(sizerWebsite, 1, wx.ALL, 5)
|
||||
|
||||
lblOccupation = wx.StaticText(self, wx.NewId(), _(u"Occupation"))
|
||||
lblOccupation = wx.StaticText(self, wx.NewId(), _("Occupation"))
|
||||
self.occupation = wx.TextCtrl(self, wx.NewId(), style=wx.TE_READONLY|wx.TE_MULTILINE)
|
||||
self.occupation.SetMinSize(text_size(self.occupation, 90))
|
||||
self.occupation.Enable(False)
|
||||
@@ -129,7 +130,7 @@ class userProfile(widgetUtils.BaseDialog):
|
||||
def create_controls(self, section):
|
||||
if section == "main_info":
|
||||
self.main_info = mainInfo(self.notebook)
|
||||
self.notebook.AddPage(self.main_info, _(u"Basic information"))
|
||||
self.notebook.AddPage(self.main_info, _("Basic information"))
|
||||
self.main_info.SetFocus()
|
||||
|
||||
def realice(self):
|
||||
|
@@ -1,4 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
import widgetUtils
|
||||
import wx
|
||||
|
||||
@@ -7,17 +8,17 @@ class searchAudioDialog(widgetUtils.BaseDialog):
|
||||
super(searchAudioDialog, self).__init__(None, -1)
|
||||
panel = wx.Panel(self)
|
||||
sizer = wx.BoxSizer(wx.VERTICAL)
|
||||
self.SetTitle(_(u"audio Search"))
|
||||
label = wx.StaticText(panel, -1, _(u"&Search"))
|
||||
self.SetTitle(_("audio Search"))
|
||||
label = wx.StaticText(panel, -1, _("&Search"))
|
||||
self.term = wx.TextCtrl(panel, -1, value)
|
||||
dc = wx.WindowDC(self.term)
|
||||
dc.SetFont(self.term.GetFont())
|
||||
self.term.SetSize(dc.GetTextExtent("0"*40))
|
||||
sizer.Add(label, 0, wx.ALL, 5)
|
||||
sizer.Add(self.term, 0, wx.ALL, 5)
|
||||
ok = wx.Button(panel, wx.ID_OK, _(u"&OK"))
|
||||
ok = wx.Button(panel, wx.ID_OK, _("&OK"))
|
||||
ok.SetDefault()
|
||||
cancel = wx.Button(panel, wx.ID_CANCEL, _(u"&Close"))
|
||||
cancel = wx.Button(panel, wx.ID_CANCEL, _("&Close"))
|
||||
btnsizer = wx.BoxSizer()
|
||||
btnsizer.Add(ok, 0, wx.ALL, 5)
|
||||
btnsizer.Add(cancel, 0, wx.ALL, 5)
|
||||
@@ -30,29 +31,29 @@ class searchVideoDialog(widgetUtils.BaseDialog):
|
||||
super(searchVideoDialog, self).__init__(None, -1)
|
||||
panel = wx.Panel(self)
|
||||
sizer = wx.BoxSizer(wx.VERTICAL)
|
||||
self.SetTitle(_(u"video Search"))
|
||||
label = wx.StaticText(panel, -1, _(u"&Search"))
|
||||
self.SetTitle(_("video Search"))
|
||||
label = wx.StaticText(panel, -1, _("&Search"))
|
||||
self.term = wx.TextCtrl(panel, -1, value)
|
||||
dc = wx.WindowDC(self.term)
|
||||
dc.SetFont(self.term.GetFont())
|
||||
self.term.SetSize(dc.GetTextExtent("0"*40))
|
||||
sizer.Add(label, 0, wx.ALL, 5)
|
||||
sizer.Add(self.term, 0, wx.ALL, 5)
|
||||
sort_order = wx.StaticText(panel, -1, _(U"&Sort order by: "))
|
||||
self.sortorder = wx.ComboBox(panel, wx.NewId(), choices=[_(u"Date added"), _(u"Duration"), _(u"Popularity")], value=_(u"Popularity"), style=wx.CB_READONLY)
|
||||
sort_order = wx.StaticText(panel, -1, _("&Sort order by: "))
|
||||
self.sortorder = wx.ComboBox(panel, wx.NewId(), choices=[_("Date added"), _("Duration"), _("Popularity")], value=_("Popularity"), style=wx.CB_READONLY)
|
||||
rBox = wx.BoxSizer(wx.HORIZONTAL)
|
||||
rBox.Add(sort_order, 0, wx.ALL, 5)
|
||||
rBox.Add(self.sortorder, 0, wx.ALL, 5)
|
||||
sizer.Add(rBox, 0, wx.ALL, 5)
|
||||
self.hd = wx.CheckBox(panel, wx.NewId(), _(u"Search only for videos in &High definition"))
|
||||
self.hd = wx.CheckBox(panel, wx.NewId(), _("Search only for videos in &High definition"))
|
||||
self.hd.SetValue(False)
|
||||
sizer.Add(self.hd, 0, wx.ALL, 5)
|
||||
self.safe_search = wx.CheckBox(panel, wx.NewId(), _(u"S&afe search"))
|
||||
self.safe_search = wx.CheckBox(panel, wx.NewId(), _("S&afe search"))
|
||||
self.safe_search.SetValue(True)
|
||||
sizer.Add(self.safe_search, 0, wx.ALL, 5)
|
||||
ok = wx.Button(panel, wx.ID_OK, _(u"&OK"))
|
||||
ok = wx.Button(panel, wx.ID_OK, _("&OK"))
|
||||
ok.SetDefault()
|
||||
cancel = wx.Button(panel, wx.ID_CANCEL, _(u"&Close"))
|
||||
cancel = wx.Button(panel, wx.ID_CANCEL, _("&Close"))
|
||||
btnsizer = wx.BoxSizer()
|
||||
btnsizer.Add(ok, 0, wx.ALL, 5)
|
||||
btnsizer.Add(cancel, 0, wx.ALL, 5)
|
||||
|
@@ -1,4 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
import wx
|
||||
import widgetUtils
|
||||
|
||||
@@ -34,33 +35,33 @@ class selectAlbum(wx.Dialog):
|
||||
class selectPeople(widgetUtils.BaseDialog):
|
||||
|
||||
def __init__(self, users=[]):
|
||||
super(selectPeople, self).__init__(parent=None, title=_(u"Tag friends"))
|
||||
super(selectPeople, self).__init__(parent=None, title=_("Tag friends"))
|
||||
self.indexes = []
|
||||
self.users_list = users
|
||||
panel = wx.Panel(self)
|
||||
sizer = wx.BoxSizer(wx.HORIZONTAL)
|
||||
userLabel = wx.StaticText(panel, -1, _(u"All friends"))
|
||||
userLabel = wx.StaticText(panel, -1, _("All friends"))
|
||||
self.cb = wx.ComboBox(panel, -1, choices=users, value=users[0])
|
||||
self.cb.SetFocus()
|
||||
userSizer = wx.BoxSizer()
|
||||
userSizer.Add(userLabel, 0, wx.ALL, 5)
|
||||
userSizer.Add(self.cb, 0, wx.ALL, 5)
|
||||
self.add = wx.Button(panel, wx.NewId(), _(u"Select"))
|
||||
self.add = wx.Button(panel, wx.NewId(), _("Select"))
|
||||
self.add.Bind(wx.EVT_BUTTON, self.add_user)
|
||||
userSizer.Add(self.add, 0, wx.ALL, 5)
|
||||
sizer.Add(userSizer, 0, wx.ALL, 5)
|
||||
lbl = wx.StaticText(panel, wx.NewId(), _(u"Tagged users"))
|
||||
lbl = wx.StaticText(panel, wx.NewId(), _("Tagged users"))
|
||||
self.users = wx.ListBox(panel, -1)
|
||||
self.remove = wx.Button(panel, wx.NewId(), _(u"Remove"))
|
||||
self.remove = wx.Button(panel, wx.NewId(), _("Remove"))
|
||||
self.remove.Bind(wx.EVT_BUTTON, self.remove_user)
|
||||
selectionSizer = wx.BoxSizer(wx.HORIZONTAL)
|
||||
selectionSizer.Add(lbl, 0, wx.ALL, 5)
|
||||
selectionSizer.Add(self.users, 0, wx.ALL, 5)
|
||||
selectionSizer.Add(self.remove, 0, wx.ALL, 5)
|
||||
sizer.Add(selectionSizer, 0, wx.ALL, 5)
|
||||
ok = wx.Button(panel, wx.ID_OK, _(u"&OK"))
|
||||
ok = wx.Button(panel, wx.ID_OK, _("&OK"))
|
||||
ok.SetDefault()
|
||||
cancel = wx.Button(panel, wx.ID_CANCEL, _(u"&Close"))
|
||||
cancel = wx.Button(panel, wx.ID_CANCEL, _("&Close"))
|
||||
btnsizer = wx.BoxSizer()
|
||||
btnsizer.Add(ok, 0, wx.ALL, 5)
|
||||
btnsizer.Add(cancel, 0, wx.ALL, 5)
|
||||
@@ -93,28 +94,28 @@ class selectAttachment(widgetUtils.BaseDialog):
|
||||
self.attachments_list = attachments
|
||||
panel = wx.Panel(self)
|
||||
sizer = wx.BoxSizer(wx.HORIZONTAL)
|
||||
label = wx.StaticText(panel, -1, _(u"Available attachments"))
|
||||
label = wx.StaticText(panel, -1, _("Available attachments"))
|
||||
self.cb = wx.ComboBox(panel, -1, choices=attachments, value=attachments[0])
|
||||
self.cb.SetFocus()
|
||||
attachmentSizer = wx.BoxSizer()
|
||||
attachmentSizer.Add(label, 0, wx.ALL, 5)
|
||||
attachmentSizer.Add(self.cb, 0, wx.ALL, 5)
|
||||
self.add = wx.Button(panel, wx.NewId(), _(u"Select"))
|
||||
self.add = wx.Button(panel, wx.NewId(), _("Select"))
|
||||
self.add.Bind(wx.EVT_BUTTON, self.add_attachment)
|
||||
attachmentSizer.Add(self.add, 0, wx.ALL, 5)
|
||||
sizer.Add(attachmentSizer, 0, wx.ALL, 5)
|
||||
lbl = wx.StaticText(panel, wx.NewId(), _(u"Selected attachments"))
|
||||
lbl = wx.StaticText(panel, wx.NewId(), _("Selected attachments"))
|
||||
self.attachments = wx.ListBox(panel, -1)
|
||||
self.remove = wx.Button(panel, wx.NewId(), _(u"Remove"))
|
||||
self.remove = wx.Button(panel, wx.NewId(), _("Remove"))
|
||||
self.remove.Bind(wx.EVT_BUTTON, self.remove_attachment)
|
||||
selectionSizer = wx.BoxSizer(wx.HORIZONTAL)
|
||||
selectionSizer.Add(lbl, 0, wx.ALL, 5)
|
||||
selectionSizer.Add(self.attachments, 0, wx.ALL, 5)
|
||||
selectionSizer.Add(self.remove, 0, wx.ALL, 5)
|
||||
sizer.Add(selectionSizer, 0, wx.ALL, 5)
|
||||
ok = wx.Button(panel, wx.ID_OK, _(u"&OK"))
|
||||
ok = wx.Button(panel, wx.ID_OK, _("&OK"))
|
||||
ok.SetDefault()
|
||||
cancel = wx.Button(panel, wx.ID_CANCEL, _(u"&Close"))
|
||||
cancel = wx.Button(panel, wx.ID_CANCEL, _("&Close"))
|
||||
btnsizer = wx.BoxSizer()
|
||||
btnsizer.Add(ok, 0, wx.ALL, 5)
|
||||
btnsizer.Add(cancel, 0, wx.ALL, 5)
|
||||
|
@@ -1,31 +1,32 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
import wx
|
||||
import widgetUtils
|
||||
|
||||
class timelineDialog(widgetUtils.BaseDialog):
|
||||
|
||||
def __init__(self, users=[]):
|
||||
super(timelineDialog, self).__init__(parent=None, title=_(u"New timeline for {0}").format(users[0],))
|
||||
super(timelineDialog, self).__init__(parent=None, title=_("New timeline for {0}").format(users[0],))
|
||||
panel = wx.Panel(self)
|
||||
sizer = wx.BoxSizer(wx.HORIZONTAL)
|
||||
userLabel = wx.StaticText(panel, -1, _(u"User"))
|
||||
userLabel = wx.StaticText(panel, -1, _("User"))
|
||||
self.cb = wx.ComboBox(panel, -1, choices=users, value=users[0])
|
||||
self.cb.SetFocus()
|
||||
userSizer = wx.BoxSizer()
|
||||
userSizer.Add(userLabel, 0, wx.ALL, 5)
|
||||
userSizer.Add(self.cb, 0, wx.ALL, 5)
|
||||
actionsstatic = wx.StaticBox(panel, label=_(u"Buffer type"))
|
||||
self.wall = wx.RadioButton(panel, wx.NewId(), _(u"&Wall posts"), style=wx.RB_GROUP)
|
||||
self.audio = wx.RadioButton(panel, wx.NewId(), _(u"Audio"))
|
||||
self.friends = wx.RadioButton(panel, wx.NewId(), _(u"Friends"))
|
||||
actionsstatic = wx.StaticBox(panel, label=_("Buffer type"))
|
||||
self.wall = wx.RadioButton(panel, wx.NewId(), _("&Wall posts"), style=wx.RB_GROUP)
|
||||
self.audio = wx.RadioButton(panel, wx.NewId(), _("Audio"))
|
||||
self.friends = wx.RadioButton(panel, wx.NewId(), _("Friends"))
|
||||
radioSizer = wx.StaticBoxSizer(actionsstatic, wx.HORIZONTAL)
|
||||
radioSizer.Add(self.wall, 0, wx.ALL, 5)
|
||||
radioSizer.Add(self.audio, 0, wx.ALL, 5)
|
||||
radioSizer.Add(self.friends, 0, wx.ALL, 5)
|
||||
sizer.Add(radioSizer, 0, wx.ALL, 5)
|
||||
ok = wx.Button(panel, wx.ID_OK, _(u"&OK"))
|
||||
ok = wx.Button(panel, wx.ID_OK, _("&OK"))
|
||||
ok.SetDefault()
|
||||
cancel = wx.Button(panel, wx.ID_CANCEL, _(u"&Close"))
|
||||
cancel = wx.Button(panel, wx.ID_CANCEL, _("&Close"))
|
||||
btnsizer = wx.BoxSizer()
|
||||
btnsizer.Add(ok, 0, wx.ALL, 5)
|
||||
btnsizer.Add(cancel, 0, wx.ALL, 5)
|
||||
|
@@ -1,9 +1,10 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
import wx
|
||||
|
||||
class urlList(wx.Dialog):
|
||||
def __init__(self):
|
||||
super(urlList, self).__init__(parent=None, title=_(u"Select URL"))
|
||||
super(urlList, self).__init__(parent=None, title=_("Select URL"))
|
||||
panel = wx.Panel(self)
|
||||
self.lista = wx.ListBox(panel, -1)
|
||||
self.lista.SetFocus()
|
||||
|
@@ -1,4 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
from builtins import range
|
||||
import wx
|
||||
import wx.adv
|
||||
import application
|
||||
@@ -9,51 +11,51 @@ class mainWindow(wx.Frame):
|
||||
mb = wx.MenuBar()
|
||||
app_ = wx.Menu()
|
||||
create = wx.Menu()
|
||||
# self.audio_album = create.Append(wx.NewId(), _(u"Audio album"))
|
||||
self.video_album = create.Append(wx.NewId(), _(u"Video album"))
|
||||
app_.Append(wx.NewId(), _(u"Create"), create)
|
||||
# self.audio_album = create.Append(wx.NewId(), _("Audio album"))
|
||||
self.video_album = create.Append(wx.NewId(), _("Video album"))
|
||||
app_.Append(wx.NewId(), _("Create"), create)
|
||||
delete = wx.Menu()
|
||||
# self.delete_audio_album = delete.Append(wx.NewId(), _(u"Audio album"))
|
||||
self.delete_video_album = delete.Append(wx.NewId(), _(u"Video album"))
|
||||
app_.Append(wx.NewId(), _(u"Delete"), delete)
|
||||
self.settings_dialog = app_.Append(wx.NewId(), _(u"Preferences"))
|
||||
# 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.settings_dialog = app_.Append(wx.NewId(), _("Preferences"))
|
||||
me = wx.Menu()
|
||||
profile = wx.Menu()
|
||||
self.view_profile = profile.Append(wx.NewId(), _(u"View profile"))
|
||||
# self.edit_profile = profile.Append(wx.NewId(), _(u"Edit profile"))
|
||||
self.open_in_browser = profile.Append(wx.NewId(), _(u"Open in browser"))
|
||||
me.Append(wx.NewId(), _(u"Profile"), profile)
|
||||
self.set_status = me.Append(wx.NewId(), _(u"Set status message"))
|
||||
self.view_profile = profile.Append(wx.NewId(), _("View profile"))
|
||||
# self.edit_profile = profile.Append(wx.NewId(), _("Edit profile"))
|
||||
self.open_in_browser = profile.Append(wx.NewId(), _("Open in browser"))
|
||||
me.Append(wx.NewId(), _("Profile"), profile)
|
||||
self.set_status = me.Append(wx.NewId(), _("Set status message"))
|
||||
buffer = wx.Menu()
|
||||
search = wx.Menu()
|
||||
self.search_audios = search.Append(wx.NewId(), _(u"Audio"))
|
||||
self.search_videos = search.Append(wx.NewId(), _(u"Video"))
|
||||
self.timeline = buffer.Append(wx.NewId(), _(u"&New timeline"))
|
||||
buffer.Append(wx.NewId(), _(u"Search"), search)
|
||||
self.update_buffer = buffer.Append(wx.NewId(), _(u"Update current buffer"))
|
||||
self.load_previous_items = buffer.Append(wx.NewId(), _(u"Load previous items"))
|
||||
self.remove_buffer_ = buffer.Append(wx.NewId(), _(u"&Remove buffer"))
|
||||
mb.Append(app_, _(u"Application"))
|
||||
mb.Append(me, _(u"Me"))
|
||||
mb.Append(buffer, _(u"Buffer"))
|
||||
self.search_audios = search.Append(wx.NewId(), _("Audio"))
|
||||
self.search_videos = search.Append(wx.NewId(), _("Video"))
|
||||
self.timeline = buffer.Append(wx.NewId(), _("&New timeline"))
|
||||
buffer.Append(wx.NewId(), _("Search"), search)
|
||||
self.update_buffer = buffer.Append(wx.NewId(), _("Update current buffer"))
|
||||
self.load_previous_items = buffer.Append(wx.NewId(), _("Load previous items"))
|
||||
self.remove_buffer_ = buffer.Append(wx.NewId(), _("&Remove buffer"))
|
||||
mb.Append(app_, _("Application"))
|
||||
mb.Append(me, _("Me"))
|
||||
mb.Append(buffer, _("Buffer"))
|
||||
player = wx.Menu()
|
||||
self.player_play = player.Append(wx.NewId(), _(u"Play"))
|
||||
self.player_play_all = player.Append(wx.NewId(), _(u"Play all"))
|
||||
self.player_stop = player.Append(wx.NewId(), _(u"Stop"))
|
||||
self.player_previous = player.Append(wx.NewId(), _(u"Previous"))
|
||||
self.player_next = player.Append(wx.NewId(), _(u"Next"))
|
||||
self.player_shuffle = player.AppendCheckItem(wx.NewId(), _(u"Shuffle"))
|
||||
self.player_volume_up = player.Append(wx.NewId(), _(u"Volume up"))
|
||||
self.player_volume_down = player.Append(wx.NewId(), _(u"Volume down"))
|
||||
self.player_mute = player.Append(wx.NewId(), _(u"Mute"))
|
||||
self.player_play = player.Append(wx.NewId(), _("Play"))
|
||||
self.player_play_all = player.Append(wx.NewId(), _("Play all"))
|
||||
self.player_stop = player.Append(wx.NewId(), _("Stop"))
|
||||
self.player_previous = player.Append(wx.NewId(), _("Previous"))
|
||||
self.player_next = player.Append(wx.NewId(), _("Next"))
|
||||
self.player_shuffle = player.AppendCheckItem(wx.NewId(), _("Shuffle"))
|
||||
self.player_volume_up = player.Append(wx.NewId(), _("Volume up"))
|
||||
self.player_volume_down = player.Append(wx.NewId(), _("Volume down"))
|
||||
self.player_mute = player.Append(wx.NewId(), _("Mute"))
|
||||
help_ = wx.Menu()
|
||||
self.about = help_.Append(wx.NewId(), _(u"About {0}").format(application.name,))
|
||||
self.documentation = help_.Append(wx.NewId(), _(u"Manual"))
|
||||
self.check_for_updates = help_.Append(wx.NewId(), _(u"Check for updates"))
|
||||
self.changelog = help_.Append(wx.NewId(), _(u"Chan&gelog"))
|
||||
self.report = help_.Append(wx.NewId(), _(u"Report an error"))
|
||||
mb.Append(player, _(u"Audio player"))
|
||||
mb.Append(help_, _(u"Help"))
|
||||
self.about = help_.Append(wx.NewId(), _("About {0}").format(application.name,))
|
||||
self.documentation = help_.Append(wx.NewId(), _("Manual"))
|
||||
self.check_for_updates = help_.Append(wx.NewId(), _("Check for updates"))
|
||||
self.changelog = help_.Append(wx.NewId(), _("Chan&gelog"))
|
||||
self.report = help_.Append(wx.NewId(), _("Report an error"))
|
||||
mb.Append(player, _("Audio player"))
|
||||
mb.Append(help_, _("Help"))
|
||||
self.SetMenuBar(mb)
|
||||
|
||||
def __init__(self):
|
||||
@@ -76,7 +78,7 @@ class mainWindow(wx.Frame):
|
||||
self.sb.SetStatusText(status)
|
||||
|
||||
def connection_error(self):
|
||||
wx.MessageDialog(self, _(u"There is a connection error. Check your internet connection and try again later."), _(u"Connection error"), wx.ICON_ERROR).ShowModal()
|
||||
wx.MessageDialog(self, _("There is a connection error. Check your internet connection and try again later."), _("Connection error"), wx.ICON_ERROR).ShowModal()
|
||||
|
||||
def get_buffer_count(self):
|
||||
return self.tb.GetPageCount()
|
||||
@@ -88,7 +90,7 @@ class mainWindow(wx.Frame):
|
||||
return self.tb.InsertSubPage(pos, buffer, name)
|
||||
|
||||
def search(self, name_):
|
||||
for i in xrange(0, self.tb.GetPageCount()):
|
||||
for i in range(0, self.tb.GetPageCount()):
|
||||
if self.tb.GetPage(i).name == name_: return i
|
||||
|
||||
def get_current_buffer(self):
|
||||
|
@@ -1,41 +1,42 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
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.open = wx.MenuItem(self, wx.NewId(), _("Open"))
|
||||
self.Append(self.open)
|
||||
self.like = wx.MenuItem(self, wx.NewId(), _(u"Like"))
|
||||
self.like = wx.MenuItem(self, wx.NewId(), _("Like"))
|
||||
self.Append(self.like)
|
||||
self.dislike = wx.MenuItem(self, wx.NewId(), _(u"Dislike"))
|
||||
self.dislike = wx.MenuItem(self, wx.NewId(), _("Dislike"))
|
||||
self.dislike.Enable(False)
|
||||
self.Append(self.dislike)
|
||||
self.comment = wx.MenuItem(self, wx.NewId(), _(u"Add comment"))
|
||||
self.comment = wx.MenuItem(self, wx.NewId(), _("Add comment"))
|
||||
self.Append(self.comment)
|
||||
self.post_in_wall = wx.MenuItem(self, wx.NewId(), _(u"Post to this profile"))
|
||||
self.post_in_wall = wx.MenuItem(self, wx.NewId(), _("Post to this profile"))
|
||||
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.view_profile = wx.MenuItem(self, wx.NewId(), _("View user profile"))
|
||||
self.Append(self.view_profile)
|
||||
|
||||
def create_specific_post_options(self):
|
||||
self.update = wx.MenuItem(self, wx.NewId(), _(u"Update"))
|
||||
self.update = wx.MenuItem(self, wx.NewId(), _("Update"))
|
||||
self.Append(self.update)
|
||||
self.delete = wx.MenuItem(self, wx.NewId(), _(u"Delete"))
|
||||
self.delete = wx.MenuItem(self, wx.NewId(), _("Delete"))
|
||||
self.Append(self.delete)
|
||||
|
||||
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.open = wx.MenuItem(self, wx.NewId(), _("&Open"))
|
||||
self.Append(self.open)
|
||||
self.play = wx.MenuItem(self, wx.NewId(), _(u"&Play"))
|
||||
self.play = wx.MenuItem(self, wx.NewId(), _("&Play"))
|
||||
self.Append(self.play)
|
||||
self.library = wx.MenuItem(self, wx.NewId(), _(u"&Add to library"))
|
||||
self.library = wx.MenuItem(self, wx.NewId(), _("&Add to library"))
|
||||
self.Append(self.library)
|
||||
self.move = wx.MenuItem(self, wx.NewId(), _(u"Move to album"))
|
||||
self.move = wx.MenuItem(self, wx.NewId(), _("Move to album"))
|
||||
self.Append(self.move)
|
||||
|
||||
class peopleMenu(wx.Menu):
|
||||
@@ -43,47 +44,47 @@ class peopleMenu(wx.Menu):
|
||||
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.view_profile = wx.MenuItem(self, wx.NewId(), _("View profile"))
|
||||
self.Append(self.view_profile)
|
||||
self.message = wx.MenuItem(self, wx.NewId(), _(u"Send a message"))
|
||||
self.message = wx.MenuItem(self, wx.NewId(), _("Send a message"))
|
||||
self.Append(self.message)
|
||||
self.timeline = wx.MenuItem(self, wx.NewId(), _(u"Open timeline"))
|
||||
self.timeline = wx.MenuItem(self, wx.NewId(), _("Open timeline"))
|
||||
self.Append(self.timeline)
|
||||
self.common_friends = wx.MenuItem(self, wx.NewId(), _(u"View friends in common"))
|
||||
self.common_friends = wx.MenuItem(self, wx.NewId(), _("View friends in common"))
|
||||
self.Append(self.common_friends)
|
||||
|
||||
def create_extra_items(self):
|
||||
self.accept = wx.MenuItem(self, wx.NewId(), _(u"Accept"))
|
||||
self.accept = wx.MenuItem(self, wx.NewId(), _("Accept"))
|
||||
self.Append(self.accept)
|
||||
self.decline = wx.MenuItem(self, wx.NewId(), _(u"Decline"))
|
||||
self.decline = wx.MenuItem(self, wx.NewId(), _("Decline"))
|
||||
self.Append(self.decline)
|
||||
self.keep_as_follower = wx.MenuItem(self, wx.NewId(), _(u"Keep as follower"))
|
||||
self.keep_as_follower = wx.MenuItem(self, wx.NewId(), _("Keep as follower"))
|
||||
self.Append(self.keep_as_follower)
|
||||
|
||||
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.open = wx.MenuItem(self, wx.NewId(), _("Open"))
|
||||
self.Append(self.open)
|
||||
self.like = wx.MenuItem(self, wx.NewId(), _(u"Like"))
|
||||
self.like = wx.MenuItem(self, wx.NewId(), _("Like"))
|
||||
self.Append(self.like)
|
||||
self.unlike = wx.MenuItem(self, -1, _(u"Unlike"))
|
||||
self.unlike = wx.MenuItem(self, -1, _("Unlike"))
|
||||
self.Append(self.unlike)
|
||||
|
||||
def create_specific_comment_options(self):
|
||||
self.delete = wx.MenuItem(self, wx.NewId(), _(u"Delete"))
|
||||
self.delete = wx.MenuItem(self, wx.NewId(), _("Delete"))
|
||||
self.Append(self.delete)
|
||||
|
||||
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.mark_as_read = wx.MenuItem(self, wx.NewId(), _("Mark as read"))
|
||||
self.Append(self.mark_as_read)
|
||||
|
||||
class attachMenu(wx.Menu):
|
||||
def __init__(self):
|
||||
super(attachMenu, self).__init__()
|
||||
self.upload = wx.MenuItem(self, wx.NewId(), _(u"Upload from computer"))
|
||||
self.upload = wx.MenuItem(self, wx.NewId(), _("Upload from computer"))
|
||||
self.Append(self.upload)
|
||||
self.add = wx.MenuItem(self, wx.NewId(), _(u"Add from VK"))
|
||||
self.add = wx.MenuItem(self, wx.NewId(), _("Add from VK"))
|
||||
self.Append(self.add)
|
@@ -1,4 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#from __future__ import unicode_literals
|
||||
from __future__ import unicode_literals
|
||||
import wx
|
||||
import widgetUtils
|
||||
from pubsub import pub
|
||||
@@ -6,8 +8,8 @@ from pubsub import pub
|
||||
class homeTab(wx.Panel):
|
||||
|
||||
def create_list(self):
|
||||
self.lbl = wx.StaticText(self, wx.NewId(), _(u"Po&sts"))
|
||||
self.list = widgetUtils.list(self, *[_(u"User"), _(u"Text"), _(u"Date")], style=wx.LC_REPORT)
|
||||
self.lbl = wx.StaticText(self, wx.NewId(), _("Po&sts"))
|
||||
self.list = widgetUtils.list(self, *[_("User"), _("Text"), _("Date")], style=wx.LC_REPORT)
|
||||
self.list.set_windows_size(0, 200)
|
||||
self.list.set_windows_size(1, 300)
|
||||
self.list.set_windows_size(2, 250)
|
||||
@@ -15,7 +17,7 @@ class homeTab(wx.Panel):
|
||||
self.list.list.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.OnKeyDown)
|
||||
|
||||
def create_post_buttons(self):
|
||||
self.post = wx.Button(self, -1, _(u"&Post"))
|
||||
self.post = wx.Button(self, -1, _("&Post"))
|
||||
self.postBox = wx.BoxSizer(wx.HORIZONTAL)
|
||||
self.postBox.Add(self.post, 0, wx.ALL, 5)
|
||||
|
||||
@@ -54,16 +56,16 @@ class feedTab(homeTab):
|
||||
class communityTab(feedTab):
|
||||
|
||||
def create_post_buttons(self):
|
||||
self.load = wx.Button(self, wx.NewId(), _(u"Load community"))
|
||||
self.post = wx.Button(self, -1, _(u"&Post"))
|
||||
self.load = wx.Button(self, wx.NewId(), _("Load community"))
|
||||
self.post = wx.Button(self, -1, _("&Post"))
|
||||
self.postBox = wx.BoxSizer(wx.HORIZONTAL)
|
||||
self.postBox.Add(self.load, 0, wx.ALL, 5)
|
||||
self.postBox.Add(self.post, 0, wx.ALL, 5)
|
||||
|
||||
class audioTab(homeTab):
|
||||
def create_list(self):
|
||||
self.lbl = wx.StaticText(self, wx.NewId(), _(u"Mu&sic"))
|
||||
self.list = widgetUtils.list(self, *[_(u"Title"), _(u"Artist"), _(u"Duration")], style=wx.LC_REPORT)
|
||||
self.lbl = wx.StaticText(self, wx.NewId(), _("Mu&sic"))
|
||||
self.list = widgetUtils.list(self, *[_("Title"), _("Artist"), _("Duration")], style=wx.LC_REPORT)
|
||||
self.list.set_windows_size(0, 160)
|
||||
self.list.set_windows_size(1, 380)
|
||||
self.list.set_windows_size(2, 80)
|
||||
@@ -71,9 +73,9 @@ class audioTab(homeTab):
|
||||
self.list.list.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.OnKeyDown)
|
||||
|
||||
def create_post_buttons(self):
|
||||
self.post = wx.Button(self, -1, _(u"&Post"))
|
||||
self.play = wx.Button(self, -1, _(u"P&lay"))
|
||||
self.play_all = wx.Button(self, -1, _(u"Play &All"))
|
||||
self.post = wx.Button(self, -1, _("&Post"))
|
||||
self.play = wx.Button(self, -1, _("P&lay"))
|
||||
self.play_all = wx.Button(self, -1, _("Play &All"))
|
||||
self.postBox = wx.BoxSizer(wx.HORIZONTAL)
|
||||
self.postBox.Add(self.post, 0, wx.ALL, 5)
|
||||
self.postBox.Add(self.play, 0, wx.ALL, 5)
|
||||
@@ -82,10 +84,10 @@ class audioTab(homeTab):
|
||||
class audioAlbumTab(audioTab):
|
||||
|
||||
def create_post_buttons(self):
|
||||
self.load = wx.Button(self, wx.NewId(), _(u"Load album"))
|
||||
self.post = wx.Button(self, -1, _(u"&Post"))
|
||||
self.play = wx.Button(self, -1, _(u"P&lay"))
|
||||
self.play_all = wx.Button(self, -1, _(u"Play &All"))
|
||||
self.load = wx.Button(self, wx.NewId(), _("Load album"))
|
||||
self.post = wx.Button(self, -1, _("&Post"))
|
||||
self.play = wx.Button(self, -1, _("P&lay"))
|
||||
self.play_all = wx.Button(self, -1, _("Play &All"))
|
||||
self.postBox = wx.BoxSizer(wx.HORIZONTAL)
|
||||
self.postBox.Add(self.load, 0, wx.ALL, 5)
|
||||
self.postBox.Add(self.post, 0, wx.ALL, 5)
|
||||
@@ -102,7 +104,7 @@ class notificationsTab(homeTab):
|
||||
ev.Skip()
|
||||
|
||||
def create_list(self):
|
||||
self.list = widgetUtils.list(self, *[_(u"Notification")], style=wx.LC_REPORT)
|
||||
self.list = widgetUtils.list(self, *[_("Notification")], style=wx.LC_REPORT)
|
||||
self.list.set_windows_size(0, 190)
|
||||
self.list.list.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.OnKeyDown)
|
||||
|
||||
@@ -116,7 +118,7 @@ class albumTab(homeTab):
|
||||
ev.Skip()
|
||||
|
||||
def create_list(self):
|
||||
self.list = widgetUtils.list(self, *[_(u"User"), _(u"Name"), _(u"Description"), _(u"Photos"), _(u"Created at")], style=wx.LC_REPORT)
|
||||
self.list = widgetUtils.list(self, *[_("User"), _("Name"), _("Description"), _("Photos"), _("Created at")], style=wx.LC_REPORT)
|
||||
self.list.set_windows_size(0, 190)
|
||||
self.list.set_windows_size(1, 320)
|
||||
self.list.set_windows_size(2, 513)
|
||||
@@ -130,7 +132,7 @@ class friendsTab(homeTab):
|
||||
ev.Skip()
|
||||
|
||||
def create_list(self):
|
||||
self.list = widgetUtils.list(self, *[_(u"Name")], style=wx.LC_REPORT)
|
||||
self.list = widgetUtils.list(self, *[_("Name")], style=wx.LC_REPORT)
|
||||
self.list.set_windows_size(0, 400)
|
||||
self.list.list.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.OnKeyDown)
|
||||
|
||||
@@ -153,14 +155,14 @@ class chatTab(wx.Panel):
|
||||
sizer.Add(self.create_controls())
|
||||
sizer.Add(self.create_attachments(), 0, wx.ALL, 5)
|
||||
sizer.Add(self.create_chat(), 0, wx.ALL, 5)
|
||||
self.attachment = wx.Button(self, wx.NewId(), _(u"Add"))
|
||||
self.attachment = wx.Button(self, wx.NewId(), _("Add"))
|
||||
sizer.Add(self.attachment, 0, wx.ALL, 5)
|
||||
self.send = wx.Button(self, -1, _(u"Send"))
|
||||
self.send = wx.Button(self, -1, _("Send"))
|
||||
sizer.Add(self.send, 0, wx.ALL, 5)
|
||||
self.SetSizer(sizer)
|
||||
|
||||
def create_controls(self):
|
||||
lbl1 = wx.StaticText(self, wx.NewId(), _(u"History"))
|
||||
lbl1 = wx.StaticText(self, wx.NewId(), _("History"))
|
||||
self.history = wx.TextCtrl(self, wx.NewId(), style=wx.TE_READONLY|wx.TE_MULTILINE, size=(500, 300))
|
||||
box = wx.BoxSizer(wx.HORIZONTAL)
|
||||
box.Add(lbl1, 0, wx.ALL, 5)
|
||||
@@ -168,8 +170,8 @@ class chatTab(wx.Panel):
|
||||
return box
|
||||
|
||||
def create_attachments(self):
|
||||
lbl = wx.StaticText(self, -1, _(u"Attachments"))
|
||||
self.attachments = widgetUtils.list(self, _(u"Type"), _(u"Title"), style=wx.LC_REPORT)
|
||||
lbl = wx.StaticText(self, -1, _("Attachments"))
|
||||
self.attachments = widgetUtils.list(self, _("Type"), _("Title"), style=wx.LC_REPORT)
|
||||
box = wx.BoxSizer(wx.HORIZONTAL)
|
||||
box.Add(lbl, 0, wx.ALL, 5)
|
||||
box.Add(self.attachments.list, 0, wx.ALL, 5)
|
||||
@@ -177,7 +179,7 @@ class chatTab(wx.Panel):
|
||||
return box
|
||||
|
||||
def create_chat(self):
|
||||
lbl2 = wx.StaticText(self, -1, _(u"Write a message"))
|
||||
lbl2 = wx.StaticText(self, -1, _("Write a message"))
|
||||
self.text = wx.TextCtrl(self, -1, size=(400, -1), style=wx.TE_MULTILINE)
|
||||
box = wx.BoxSizer(wx.HORIZONTAL)
|
||||
box.Add(lbl2, 0, wx.ALL, 20)
|
||||
@@ -201,24 +203,24 @@ class chatTab(wx.Panel):
|
||||
class peopleTab(homeTab):
|
||||
|
||||
def create_list(self):
|
||||
self.lbl = wx.StaticText(self, wx.NewId(), _(u"Friends"))
|
||||
self.list = widgetUtils.list(self, *[_(u"Name"), _(u"Last seen")], style=wx.LC_REPORT)
|
||||
self.lbl = wx.StaticText(self, wx.NewId(), _("Friends"))
|
||||
self.list = widgetUtils.list(self, *[_("Name"), _("Last seen")], style=wx.LC_REPORT)
|
||||
self.list.set_windows_size(0, 190)
|
||||
self.list.set_windows_size(1, 100)
|
||||
self.list.set_size()
|
||||
self.list.list.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.OnKeyDown)
|
||||
|
||||
def create_post_buttons(self):
|
||||
self.post = wx.Button(self, -1, _(u"&Post"))
|
||||
self.new_chat = wx.Button(self, wx.NewId(), _(u"Send message"))
|
||||
self.post = wx.Button(self, -1, _("&Post"))
|
||||
self.new_chat = wx.Button(self, wx.NewId(), _("Send message"))
|
||||
self.postBox = wx.BoxSizer(wx.HORIZONTAL)
|
||||
self.postBox.Add(self.post, 0, wx.ALL, 5)
|
||||
self.postBox.Add(self.new_chat, 0, wx.ALL, 5)
|
||||
|
||||
class videoTab(homeTab):
|
||||
def create_list(self):
|
||||
self.lbl = wx.StaticText(self, wx.NewId(), _(u"Video&s"))
|
||||
self.list = widgetUtils.list(self, *[_(u"Title"), _(u"Description"), _(u"Duration")], style=wx.LC_REPORT)
|
||||
self.lbl = wx.StaticText(self, wx.NewId(), _("Video&s"))
|
||||
self.list = widgetUtils.list(self, *[_("Title"), _("Description"), _("Duration")], style=wx.LC_REPORT)
|
||||
self.list.set_windows_size(0, 160)
|
||||
self.list.set_windows_size(1, 380)
|
||||
self.list.set_windows_size(2, 80)
|
||||
@@ -226,8 +228,8 @@ class videoTab(homeTab):
|
||||
self.list.list.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.OnKeyDown)
|
||||
|
||||
def create_post_buttons(self):
|
||||
self.post = wx.Button(self, -1, _(u"&Post"))
|
||||
self.play = wx.Button(self, -1, _(u"P&lay"))
|
||||
self.post = wx.Button(self, -1, _("&Post"))
|
||||
self.play = wx.Button(self, -1, _("P&lay"))
|
||||
self.postBox = wx.BoxSizer(wx.HORIZONTAL)
|
||||
self.postBox.Add(self.post, 0, wx.ALL, 5)
|
||||
self.postBox.Add(self.play, 0, wx.ALL, 5)
|
||||
@@ -235,9 +237,9 @@ class videoTab(homeTab):
|
||||
class videoAlbumTab(videoTab):
|
||||
|
||||
def create_post_buttons(self):
|
||||
self.load = wx.Button(self, wx.NewId(), _(u"Load album"))
|
||||
self.post = wx.Button(self, -1, _(u"&Post"))
|
||||
self.play = wx.Button(self, -1, _(u"P&lay"))
|
||||
self.load = wx.Button(self, wx.NewId(), _("Load album"))
|
||||
self.post = wx.Button(self, -1, _("&Post"))
|
||||
self.play = wx.Button(self, -1, _("P&lay"))
|
||||
self.postBox = wx.BoxSizer(wx.HORIZONTAL)
|
||||
self.postBox.Add(self.post, 0, wx.ALL, 5)
|
||||
self.postBox.Add(self.play, 0, wx.ALL, 5)
|
||||
|
Reference in New Issue
Block a user