Started implementation of community timelines

This commit is contained in:
2024-05-17 17:45:47 -06:00
parent 2a1d86f917
commit b39ccb9f2c
5 changed files with 64 additions and 2 deletions

View File

@@ -0,0 +1,38 @@
# -*- coding: utf-8 -*-
import wx
class CommunityTimeline(wx.Dialog):
def __init__(self, *args, **kwargs):
super(CommunityTimeline, self).__init__(parent=None, *args, **kwargs)
panel = wx.Panel(self)
communitySizer = wx.BoxSizer()
self.SetTitle(_("Create community buffer"))
communityLabel = wx.StaticText(panel, -1, _("Community URL"))
self.url = wx.TextCtrl(panel, -1)
self.url.SetFocus()
communitySizer.Add(communityLabel, 0, wx.ALL, 5)
communitySizer.Add(self.url, 0, wx.ALL, 5)
actionSizer = wx.BoxSizer(wx.VERTICAL)
label2 = wx.StaticText(panel, -1, _(u"Buffer type"))
self.local= wx.RadioButton(panel, -1, _("Local timeline"), style=wx.RB_GROUP)
self.federated= wx.RadioButton(panel, -1, _("Federated Timeline"))
hSizer = wx.BoxSizer(wx.HORIZONTAL)
hSizer.Add(label2, 0, wx.ALL, 5)
actionSizer.Add(self.local, 0, wx.ALL, 5)
actionSizer.Add(self.federated, 0, wx.ALL, 5)
hSizer.Add(actionSizer, 0, wx.ALL, 5)
sizer = wx.BoxSizer(wx.VERTICAL)
ok = wx.Button(panel, wx.ID_OK, _(u"&OK"))
ok.SetDefault()
cancel = wx.Button(panel, wx.ID_CANCEL, _(u"&Close"))
btnsizer = wx.BoxSizer()
btnsizer.Add(ok)
btnsizer.Add(cancel)
sizer.Add(communitySizer)
sizer.Add(hSizer, 0, wx.ALL, 5)
sizer.Add(btnsizer)
panel.SetSizer(sizer)
def get_action(self):
if self.local.GetValue() == True: return "local"
elif self.federated.GetValue() == True: return "federated"

View File

@@ -52,6 +52,7 @@ class mainFrame(wx.Frame):
# buffer menu
self.menubar_buffer = wx.Menu()
self.update_buffer = self.menubar_buffer.Append(wx.ID_ANY, _(u"&Update buffer"))
self.new_community_buffer= self.menubar_buffer.Append(wx.ID_ANY, _("New community buffer"))
self.trends = self.menubar_buffer.Append(wx.ID_ANY, _(u"New &trending topics buffer..."))
self.filter = self.menubar_buffer.Append(wx.ID_ANY, _(u"Create a &filter"))
self.manage_filters = self.menubar_buffer.Append(wx.ID_ANY, _(u"&Manage filters"))