Added showing followers and friends timelines

This commit is contained in:
2015-12-09 11:51:37 -06:00
parent ab08eada81
commit 2bfb53abe1
6 changed files with 90 additions and 5 deletions

View File

@@ -58,3 +58,9 @@ def no_tweets():
def no_favs():
return wx.MessageDialog(None, _(u"This user has no favorited tweets. {0} can't create a timeline.").format(application.name), _(u"Error"), wx.ICON_ERROR).ShowModal()
def no_followers():
return wx.MessageDialog(None, _(u"This user has no followers. {0} can't create a timeline.").format(application.name), _(u"Error"), wx.ICON_ERROR).ShowModal()
def no_friends():
return wx.MessageDialog(None, _(u"This user has no friends. {0} can't create a timeline.").format(application.name), _(u"Error"), wx.ICON_ERROR).ShowModal()

View File

@@ -18,11 +18,15 @@ class selectUserDialog(wx.Dialog):
label2 = wx.StaticText(panel, -1, _(u"Buffer type"))
self.tweets = wx.RadioButton(panel, -1, _(u"Tweets"), style=wx.RB_GROUP)
self.favourites = wx.RadioButton(panel, -1, _(u"Likes"))
self.followers = wx.RadioButton(panel, -1, _(u"Followers"))
self.friends = wx.RadioButton(panel, -1, _(u"Friends"))
self.setup_default(default)
hSizer = wx.BoxSizer(wx.HORIZONTAL)
hSizer.Add(label2, 0, wx.ALL, 5)
actionSizer.Add(self.tweets, 0, wx.ALL, 5)
actionSizer.Add(self.favourites, 0, wx.ALL, 5)
actionSizer.Add(self.followers, 0, wx.ALL, 5)
actionSizer.Add(self.friends, 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"))
@@ -39,6 +43,8 @@ class selectUserDialog(wx.Dialog):
def get_action(self):
if self.tweets.GetValue() == True: return "tweets"
elif self.favourites.GetValue() == True: return "favourites"
elif self.followers.GetValue() == True: return "followers"
elif self.friends.GetValue() == True: return "friends"
def setup_default(self, default):
if default == "tweets":