Fixing some issues with tweets and retweets

This commit is contained in:
2014-12-02 11:40:39 -06:00
parent 79124810b0
commit ada6f1fb0d
3 changed files with 20 additions and 9 deletions

View File

@@ -345,7 +345,11 @@ class viewTweet(wx.Dialog):
self.SetTitle(_(u"Tweet - %i characters ") % (len(tweet["text"])))
panel = wx.Panel(self)
label = wx.StaticText(panel, -1, _(u"Tweet"))
self.text = wx.TextCtrl(panel, -1, tweet["text"], style=wx.TE_READONLY|wx.TE_MULTILINE, size=(250, 180))
if tweet.has_key("retweeted_status"):
text = "rt @%s: %s" % (tweet["retweeted_status"]["user"]["screen_name"], tweet["retweeted_status"]["text"])
else:
text = tweet["text"]
self.text = wx.TextCtrl(panel, -1, text, style=wx.TE_READONLY|wx.TE_MULTILINE, size=(250, 180))
dc = wx.WindowDC(self.text)
dc.SetFont(self.text.GetFont())
(x, y, z) = dc.GetMultiLineTextExtent("0"*140)