mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-08-28 18:51:34 +00:00
Now the buttons in the buffers are connected to their functions; datetime and languageHandler improvements.
This commit is contained in:
@@ -234,15 +234,7 @@ class Controller(object):
|
||||
|
||||
def post_tweet(self, event=None):
|
||||
buffer = self.get_best_buffer()
|
||||
title = _(u"Tweet")
|
||||
caption = _(u"Write the tweet here")
|
||||
tweet = messages.tweet(buffer.session, title, caption, "")
|
||||
if tweet.message.get_response() == widgetUtils.OK:
|
||||
text = tweet.message.get_text()
|
||||
if tweet.image == None:
|
||||
call_threaded(buffer.session.api_call, call_name="update_status", _sound="tweet_send.ogg", status=text)
|
||||
else:
|
||||
call_threaded(buffer.session.api_call, call_name="update_status_with_media", _sound="tweet_send.ogg", status=text, media=tweet.image)
|
||||
buffer.post_tweet()
|
||||
|
||||
def post_reply(self, *args, **kwargs):
|
||||
buffer = self.get_current_buffer()
|
||||
|
Reference in New Issue
Block a user