Made code indentation to comply with PEP8

This commit is contained in:
2021-06-16 16:18:41 -05:00
parent 2aaa4eced3
commit 39e1fb017c
145 changed files with 9577 additions and 9584 deletions

View File

@@ -10,4 +10,4 @@ from .panels import accountPanel, emptyPanel
from .people import peoplePanel
from .trends import trendsPanel
from .tweet_searches import searchPanel
from .user_searches import searchUsersPanel
from .user_searches import searchUsersPanel

View File

@@ -4,43 +4,43 @@ 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 set_focus_function(self, f):
self.list.list.Bind(wx.EVT_LIST_ITEM_FOCUSED, f)
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 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 set_position(self, reversed=False):
if reversed == False:
self.list.select_item(self.list.get_count()-1)
else:
self.list.select_item(0)
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_focus_in_list(self):
self.list.list.SetFocus()
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

@@ -5,9 +5,9 @@ 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"
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

@@ -4,22 +4,22 @@ import wx
from multiplatform_widgets import widgets
class eventsPanel(wx.Panel):
""" Buffer to show events. Different than tweets or people."""
""" 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 __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_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()
def set_focus_in_list(self):
self.list.list.SetFocus()

View File

@@ -5,6 +5,6 @@ import wx
from .base import basePanel
class favsPanel(basePanel):
def __init__(self, parent, name):
super(favsPanel, self).__init__(parent, name)
self.type = "favourites_timeline"
def __init__(self, parent, name):
super(favsPanel, self).__init__(parent, name)
self.type = "favourites_timeline"

View File

@@ -5,6 +5,6 @@ import wx
from .base import basePanel
class listPanel(basePanel):
def __init__(self, parent, name):
super(listPanel, self).__init__(parent, name)
self.type = "list"
def __init__(self, parent, name):
super(listPanel, self).__init__(parent, name)
self.type = "list"

View File

@@ -4,33 +4,33 @@ import wx
from multiplatform_widgets import widgets
class accountPanel(wx.Panel):
def __init__(self, parent, name=None):
super(accountPanel, self).__init__(parent=parent)
self.name = name
self.type = "account"
sizer = wx.BoxSizer(wx.VERTICAL)
self.login = wx.Button(self, -1, _(u"Login"))
sizer.Add(self.login, 0, wx.ALL, 5)
self.autostart_account = wx.CheckBox(self, -1, _(u"Log in automatically"))
sizer.Add(self.autostart_account, 0, wx.ALL, 5)
self.SetSizer(sizer)
def __init__(self, parent, name=None):
super(accountPanel, self).__init__(parent=parent)
self.name = name
self.type = "account"
sizer = wx.BoxSizer(wx.VERTICAL)
self.login = wx.Button(self, -1, _(u"Login"))
sizer.Add(self.login, 0, wx.ALL, 5)
self.autostart_account = wx.CheckBox(self, -1, _(u"Log in automatically"))
sizer.Add(self.autostart_account, 0, wx.ALL, 5)
self.SetSizer(sizer)
def change_login(self, login=True):
if login == True:
self.login.SetLabel(_(u"Login"))
else:
self.login.SetLabel(_(u"Logout"))
def change_login(self, login=True):
if login == True:
self.login.SetLabel(_(u"Login"))
else:
self.login.SetLabel(_(u"Logout"))
def change_autostart(self, autostart=True):
self.autostart_account.SetValue(autostart)
def change_autostart(self, autostart=True):
self.autostart_account.SetValue(autostart)
def get_autostart(self):
return self.autostart_account.GetValue()
def get_autostart(self):
return self.autostart_account.GetValue()
class emptyPanel(wx.Panel):
def __init__(self, parent, name):
super(emptyPanel, self).__init__(parent=parent, name=name)
self.name = name
self.type = "account"
sizer = wx.BoxSizer(wx.VERTICAL)
self.SetSizer(sizer)
def __init__(self, parent, name):
super(emptyPanel, self).__init__(parent=parent, name=name)
self.name = name
self.type = "account"
sizer = wx.BoxSizer(wx.VERTICAL)
self.SetSizer(sizer)

View File

@@ -6,13 +6,13 @@ from multiplatform_widgets import widgets
from .base import basePanel
class peoplePanel(basePanel):
""" Buffer used to show people."""
""" 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 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()
def __init__(self, parent, name):
super(peoplePanel, self).__init__(parent, name)
self.type = "people"
self.reply.SetLabel(_(u"Mention"))
self.retweet.Disable()

View File

@@ -4,31 +4,31 @@ 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 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 __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_position(self, reversed=False):
if reversed == False:
self.list.select_item(self.list.get_count()-1)
else:
self.list.select_item(0)

View File

@@ -5,6 +5,6 @@ import wx
from .base import basePanel
class searchPanel(basePanel):
def __init__(self, parent, name):
super(searchPanel, self).__init__(parent, name)
self.type = "search"
def __init__(self, parent, name):
super(searchPanel, self).__init__(parent, name)
self.type = "search"

View File

@@ -6,11 +6,11 @@ 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 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"
def __init__(self, parent, name):
super(searchUsersPanel, self).__init__(parent, name)
self.create_list()
self.type = "user_searches"