mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-26 12:53:12 -06:00
Remove support for multiple API calls in buffers. Closes #214
This commit is contained in:
parent
8af1e650b7
commit
537d011b40
@ -130,6 +130,7 @@ class accountSettingsController(globalSettingsController):
|
|||||||
widgetUtils.connect_event(self.dialog.general.au, widgetUtils.BUTTON_PRESSED, self.manage_autocomplete)
|
widgetUtils.connect_event(self.dialog.general.au, widgetUtils.BUTTON_PRESSED, self.manage_autocomplete)
|
||||||
self.dialog.set_value("general", "relative_time", self.config["general"]["relative_times"])
|
self.dialog.set_value("general", "relative_time", self.config["general"]["relative_times"])
|
||||||
self.dialog.set_value("general", "show_screen_names", self.config["general"]["show_screen_names"])
|
self.dialog.set_value("general", "show_screen_names", self.config["general"]["show_screen_names"])
|
||||||
|
if application.streaming_lives():
|
||||||
self.dialog.set_value("general", "apiCalls", self.config["general"]["max_api_calls"])
|
self.dialog.set_value("general", "apiCalls", self.config["general"]["max_api_calls"])
|
||||||
self.dialog.set_value("general", "itemsPerApiCall", self.config["general"]["max_tweets_per_call"])
|
self.dialog.set_value("general", "itemsPerApiCall", self.config["general"]["max_tweets_per_call"])
|
||||||
self.dialog.set_value("general", "reverse_timelines", self.config["general"]["reverse_timelines"])
|
self.dialog.set_value("general", "reverse_timelines", self.config["general"]["reverse_timelines"])
|
||||||
@ -182,6 +183,7 @@ class accountSettingsController(globalSettingsController):
|
|||||||
self.needs_restart = True
|
self.needs_restart = True
|
||||||
self.config["general"]["relative_times"] = self.dialog.get_value("general", "relative_time")
|
self.config["general"]["relative_times"] = self.dialog.get_value("general", "relative_time")
|
||||||
self.config["general"]["show_screen_names"] = self.dialog.get_value("general", "show_screen_names")
|
self.config["general"]["show_screen_names"] = self.dialog.get_value("general", "show_screen_names")
|
||||||
|
if application.streaming_lives():
|
||||||
self.config["general"]["max_api_calls"] = self.dialog.get_value("general", "apiCalls")
|
self.config["general"]["max_api_calls"] = self.dialog.get_value("general", "apiCalls")
|
||||||
self.config["general"]["max_tweets_per_call"] = self.dialog.get_value("general", "itemsPerApiCall")
|
self.config["general"]["max_tweets_per_call"] = self.dialog.get_value("general", "itemsPerApiCall")
|
||||||
if self.config["general"]["persist_size"] != self.dialog.get_value("general", "persist_size"):
|
if self.config["general"]["persist_size"] != self.dialog.get_value("general", "persist_size"):
|
||||||
|
@ -251,7 +251,10 @@ class Session(object):
|
|||||||
update_function str: The function to call. This function must be child of self.twitter.twitter
|
update_function str: The function to call. This function must be child of self.twitter.twitter
|
||||||
returns a list with all items retrieved."""
|
returns a list with all items retrieved."""
|
||||||
|
|
||||||
|
if application.streaming_lives():
|
||||||
max = int(self.settings["general"]["max_api_calls"])-1
|
max = int(self.settings["general"]["max_api_calls"])-1
|
||||||
|
else:
|
||||||
|
max = 0
|
||||||
results = []
|
results = []
|
||||||
data = getattr(self.twitter.twitter, update_function)(count=self.settings["general"]["max_tweets_per_call"], *args, **kwargs)
|
data = getattr(self.twitter.twitter, update_function)(count=self.settings["general"]["max_tweets_per_call"], *args, **kwargs)
|
||||||
results.extend(data)
|
results.extend(data)
|
||||||
|
@ -93,6 +93,7 @@ class generalAccount(wx.Panel, baseDialog.BaseWXDialog):
|
|||||||
sizer.Add(self.au, 0, wx.ALL, 5)
|
sizer.Add(self.au, 0, wx.ALL, 5)
|
||||||
self.relative_time = wx.CheckBox(self, wx.NewId(), _(U"Relative timestamps"))
|
self.relative_time = wx.CheckBox(self, wx.NewId(), _(U"Relative timestamps"))
|
||||||
sizer.Add(self.relative_time, 0, wx.ALL, 5)
|
sizer.Add(self.relative_time, 0, wx.ALL, 5)
|
||||||
|
if application.streaming_lives():
|
||||||
apiCallsBox = wx.BoxSizer(wx.HORIZONTAL)
|
apiCallsBox = wx.BoxSizer(wx.HORIZONTAL)
|
||||||
apiCallsBox.Add(wx.StaticText(self, -1, _(u"API calls (One API call = 200 tweets, two API calls = 400 tweets, etc):")), 0, wx.ALL, 5)
|
apiCallsBox.Add(wx.StaticText(self, -1, _(u"API calls (One API call = 200 tweets, two API calls = 400 tweets, etc):")), 0, wx.ALL, 5)
|
||||||
self.apiCalls = wx.SpinCtrl(self, wx.NewId())
|
self.apiCalls = wx.SpinCtrl(self, wx.NewId())
|
||||||
|
Loading…
Reference in New Issue
Block a user