Code cleanup

This commit is contained in:
Manuel Cortez 2024-05-18 17:24:28 -06:00
parent cd7279e83b
commit 9c2511561a
4 changed files with 8 additions and 8 deletions

View File

@ -153,7 +153,7 @@ class Controller(object):
widgetUtils.connect_event(self.view, widgetUtils.MENU, self.toggle_buffer_mute, self.view.mute_buffer)
widgetUtils.connect_event(self.view, widgetUtils.MENU, self.open_timeline, self.view.timeline)
widgetUtils.connect_event(self.view, widgetUtils.MENU, self.open_favs_timeline, self.view.favs)
widgetUtils.connect_event(self.view, widgetUtils.MENU, self.new_community_buffer, self.view.new_community_buffer)
widgetUtils.connect_event(self.view, widgetUtils.MENU, self.community_timeline, self.view.community_timeline)
widgetUtils.connect_event(self.view, widgetUtils.MENU, self.open_conversation, menuitem=self.view.view_conversation)
widgetUtils.connect_event(self.view, widgetUtils.MENU, self.seekLeft, menuitem=self.view.seekLeft)
widgetUtils.connect_event(self.view, widgetUtils.MENU, self.seekRight, menuitem=self.view.seekRight)
@ -1150,8 +1150,8 @@ class Controller(object):
if handler and hasattr(handler, 'openFollowingTimeline'):
handler.openFollowingTimeline(self, buffer, user)
def new_community_buffer(self, *args, user=None):
def community_timeline(self, *args, user=None):
buffer = self.get_best_buffer()
handler = self.get_handler(type=buffer.session.type)
if handler and hasattr(handler, 'new_community_buffer'):
handler.new_community_buffer(self, buffer)
if handler and hasattr(handler, 'community_timeline'):
handler.community_timeline(self, buffer)

View File

@ -50,7 +50,7 @@ class Handler(object):
details=_("Show user profile"),
favs=None,
# In buffer Menu.
new_community_buffer=_("New community buffer"),
community_timeline =_("Create community timeline"),
filter=None,
manage_filters=None
)
@ -367,7 +367,7 @@ class Handler(object):
dlg = showUserProfile.ShowUserProfile(user)
dlg.ShowModal()
def new_community_buffer(self, controller, buffer):
def community_timeline(self, controller, buffer):
dlg = communityTimeline.CommunityTimeline()
if dlg.ShowModal() != wx.ID_OK:
return

View File

@ -6,7 +6,7 @@ class CommunityTimeline(wx.Dialog):
super(CommunityTimeline, self).__init__(parent=None, *args, **kwargs)
panel = wx.Panel(self)
communitySizer = wx.BoxSizer()
self.SetTitle(_("Create community buffer"))
self.SetTitle(_("Create community timeline"))
communityLabel = wx.StaticText(panel, -1, _("Community URL"))
self.url = wx.TextCtrl(panel, -1)
self.url.SetFocus()

View File

@ -52,7 +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.community_timeline = self.menubar_buffer.Append(wx.ID_ANY, _("Create community timeline"))
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"))