diff --git a/src/controller/mainController.py b/src/controller/mainController.py index 646e8832..c8784c54 100644 --- a/src/controller/mainController.py +++ b/src/controller/mainController.py @@ -715,6 +715,9 @@ class Controller(object): answer = commonMessageDialogs.protected_user() if answer == widgetUtils.NO: return if dlg.get_action() == "tweets": + if usr["statuses_count"] == 0: + commonMessageDialogs.no_tweets() + return if dlg.get_user() in buff.session.settings["other_buffers"]["timelines"]: commonMessageDialogs.timeline_exist() return @@ -728,6 +731,9 @@ class Controller(object): pub.sendMessage("restart-streams", streams=["timelinesStream"], session=buff.session) buffer.session.sound.play("create_timeline.ogg") else: + if usr["favourites_count"] == 0: + commonMessageDialogs.no_favs() + return if dlg.get_user() in buffer.session.settings["other_buffers"]["favourites_timelines"]: commonMessageDialogs.timeline_exist() return diff --git a/src/wxUI/commonMessageDialogs.py b/src/wxUI/commonMessageDialogs.py index bd0849c9..dfd818b7 100644 --- a/src/wxUI/commonMessageDialogs.py +++ b/src/wxUI/commonMessageDialogs.py @@ -52,3 +52,9 @@ def no_following(): def donation(): dlg = wx.MessageDialog(None, _(u"If you like {0} we need your help to keep it going. Help us by donating to the project. This will help us pay for the server, the domain and some other things to ensure that {0} will be actively maintained. Your donation will give us the means to continue the development of {0}, and to keep {0} free. Would you like to donate now?").format(application.name), _(u"We need your help"), wx.ICON_QUESTION|wx.YES_NO) return dlg.ShowModal() + +def no_tweets(): + return wx.MessageDialog(None, _(u"This user has no tweets. {0} can't create a timeline.").format(application.name), _(u"Error"), wx.ICON_ERROR).ShowModal() + +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()