Remove most of Twitter code as Twitter's API access has been removed

This commit is contained in:
2023-04-03 13:35:05 -06:00
parent 74fe437684
commit 8acebc290b
95 changed files with 74 additions and 7643 deletions

View File

@@ -1,3 +1,3 @@
# -*- coding: utf-8 -*-
from . import twitter, mastodon
from . import mastodon
from .panels import accountPanel, emptyPanel

View File

@@ -1,10 +0,0 @@
# -*- coding: utf-8 -*-
from .base import basePanel
from .dm import dmPanel
from .events import eventsPanel
from .favourites import favsPanel
from .lists import listPanel
from .people import peoplePanel
from .trends import trendsPanel
from .tweet_searches import searchPanel
from .user_searches import searchUsersPanel

View File

@@ -1,46 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import wx
from multiplatform_widgets import widgets
class basePanel(wx.Panel):
def set_focus_function(self, f):
self.list.list.Bind(wx.EVT_LIST_ITEM_FOCUSED, f)
def create_list(self):
self.list = widgets.list(self, _(u"User"), _(u"Text"), _(u"Date"), _(u"Client"), style=wx.LC_REPORT|wx.LC_SINGLE_SEL|wx.LC_VRULES)
self.list.set_windows_size(0, 60)
self.list.set_windows_size(1, 320)
self.list.set_windows_size(2, 110)
self.list.set_windows_size(3, 84)
self.list.set_size()
def __init__(self, parent, name):
super(basePanel, self).__init__(parent)
self.name = name
self.type = "baseBuffer"
self.sizer = wx.BoxSizer(wx.VERTICAL)
self.create_list()
self.tweet = wx.Button(self, -1, _(u"Tweet"))
self.retweet = wx.Button(self, -1, _(u"Retweet"))
self.reply = wx.Button(self, -1, _(u"Reply"))
self.dm = wx.Button(self, -1, _(u"Direct message"))
btnSizer = wx.BoxSizer(wx.HORIZONTAL)
btnSizer.Add(self.tweet, 0, wx.ALL, 5)
btnSizer.Add(self.retweet, 0, wx.ALL, 5)
btnSizer.Add(self.reply, 0, wx.ALL, 5)
btnSizer.Add(self.dm, 0, wx.ALL, 5)
self.sizer.Add(btnSizer, 0, wx.ALL, 5)
self.sizer.Add(self.list.list, 0, wx.ALL|wx.EXPAND, 5)
self.SetSizer(self.sizer)
self.SetClientSize(self.sizer.CalcMin())
def set_position(self, reversed=False):
if reversed == False:
self.list.select_item(self.list.get_count()-1)
else:
self.list.select_item(0)
def set_focus_in_list(self):
self.list.list.SetFocus()

View File

@@ -1,13 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import unicode_literals
import wx
from .base import basePanel
class dmPanel(basePanel):
def __init__(self, parent, name):
""" Class to DM'S. Reply and retweet buttons are not showed and they have your delete method for dm's."""
super(dmPanel, self).__init__(parent, name)
self.retweet.Disable()
self.reply.Disable()
self.type = "dm"

View File

@@ -1,25 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import wx
from multiplatform_widgets import widgets
class eventsPanel(wx.Panel):
""" Buffer to show events. Different than tweets or people."""
def __init__(self, parent, name):
self.type = "event"
super(eventsPanel, self).__init__(parent)
self.name = name
sizer = wx.BoxSizer()
self.list = widgets.list(self, _(u"Date"), _(u"Event"), size=(600,600), style=wx.LC_REPORT|wx.LC_SINGLE_SEL|wx.LC_VRULES)
self.tweet = wx.Button(self, -1, _(u"Tweet"))
self.delete_event = wx.Button(self, -1, _(u"Remove event"))
def set_position(self, reversed=False):
if reversed == False:
self.list.select_item(self.list.get_count()-1)
else:
self.list.select_item(0)
def set_focus_in_list(self):
self.list.list.SetFocus()

View File

@@ -1,10 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import unicode_literals
import wx
from .base import basePanel
class favsPanel(basePanel):
def __init__(self, parent, name):
super(favsPanel, self).__init__(parent, name)
self.type = "favourites_timeline"

View File

@@ -1,10 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import unicode_literals
import wx
from .base import basePanel
class listPanel(basePanel):
def __init__(self, parent, name):
super(listPanel, self).__init__(parent, name)
self.type = "list"

View File

@@ -1,18 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import unicode_literals
import wx
from multiplatform_widgets import widgets
from .base import basePanel
class peoplePanel(basePanel):
""" Buffer used to show people."""
def create_list(self):
self.list = widgets.list(self, _(u"User"), style=wx.LC_REPORT|wx.LC_SINGLE_SEL, size=(800, 800))
def __init__(self, parent, name):
super(peoplePanel, self).__init__(parent, name)
self.type = "people"
self.reply.SetLabel(_(u"Mention"))
self.retweet.Disable()

View File

@@ -1,36 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import wx
from multiplatform_widgets import widgets
class trendsPanel(wx.Panel):
def create_list(self):
""" Returns the list for put the tweets here."""
self.list = widgets.list(self, _(u"Trending topic"), style=wx.LC_REPORT|wx.LC_SINGLE_SEL|wx.LC_VRULES)
self.list.set_windows_size(0, 30)
self.list.set_size()
def __init__(self, parent, name):
super(trendsPanel, self).__init__(parent)
self.type = "trends"
self.sizer = wx.BoxSizer(wx.VERTICAL)
self.create_list()
self.tweet = wx.Button(self, -1, _(u"Tweet"))
self.tweetTrendBtn = wx.Button(self, -1, _(u"Tweet about this trend"))
self.search_topic = wx.Button(self, -1, _(u"Search topic"))
btnSizer = wx.BoxSizer(wx.HORIZONTAL)
btnSizer.Add(self.tweet, 0, wx.ALL, 5)
btnSizer.Add(self.tweetTrendBtn, 0, wx.ALL, 5)
btnSizer.Add(self.search_topic, 0, wx.ALL, 5)
self.sizer.Add(btnSizer, 0, wx.ALL, 5)
self.sizer.Add(self.list.list, 0, wx.ALL, 5)
self.SetSizer(self.sizer)
def set_position(self, reversed=False):
if reversed == False:
self.list.select_item(self.list.get_count()-1)
else:
self.list.select_item(0)
def set_focus_in_list(self):
self.list.list.SetFocus()

View File

@@ -1,10 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import unicode_literals
import wx
from .base import basePanel
class searchPanel(basePanel):
def __init__(self, parent, name):
super(searchPanel, self).__init__(parent, name)
self.type = "search"

View File

@@ -1,16 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import unicode_literals
import wx
from .tweet_searches import searchPanel
from multiplatform_widgets import widgets
class searchUsersPanel(searchPanel):
def create_list(self):
""" Returns the list for put the tweets here."""
self.list = widgets.list(self, _(u"User"), style=wx.LC_REPORT|wx.LC_SINGLE_SEL, size=(800, 800))
def __init__(self, parent, name):
super(searchUsersPanel, self).__init__(parent, name)
self.create_list()
self.type = "user_searches"