Added view and presenter for topic displayer. Needs some more methods yet

This commit is contained in:
2019-01-31 16:48:21 -06:00
parent 7bee6cf1ea
commit 2bcc14888c
2 changed files with 119 additions and 0 deletions

View File

@@ -193,6 +193,41 @@ class displayComment(displayBasicPost):
if comment: box.Add(self.comment, 0, wx.ALL, 5)
return box
class displayTopic(displayBasicPost):
def __init__(self, *args, **kwargs):
super(displayTopic, self).__init__(*args, **kwargs)
comments_box = self.create_comments_list()
self.sizer.Add(comments_box, 0, wx.ALL, 5)
attachments_box = self.create_attachments()
self.sizer.Add(attachments_box, 0, wx.ALL, 5)
self.attachments.list.Enable(False)
self.create_photo_viewer()
self.image.Enable(False)
self.create_tools_button()
self.sizer.Add(self.tools, 0, wx.ALL, 5)
actions_box = self.create_action_buttons()
self.sizer.Add(actions_box, 0, wx.ALL, 5)
self.sizer.Add(self.create_dialog_buttons())
self.done()
def create_action_buttons(self, comment=True):
self.like = wx.Button(self.panel, -1, _("&Like"))
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_comments_list(self):
lbl = wx.StaticText(self.panel, -1, _("Posts"))
self.comments = widgetUtils.list(self.panel, _("User"), _("Comment"), _("Date"), _("Likes"), style=wx.LC_REPORT)
self.reply = wx.Button(self.panel, -1, _("Reply"))
box = wx.BoxSizer(wx.HORIZONTAL)
box.Add(lbl, 0, wx.ALL, 5)
box.Add(self.comments.list, 0, wx.ALL, 5)
box.Add(self.reply, 0, wx.ALL, 5)
return box
class displayAudio(widgetUtils.BaseDialog):
def __init__(self, *args, **kwargs):
super(displayAudio, self).__init__(parent=None, *args, **kwargs)