diff --git a/src/controller/messages.py b/src/controller/messages.py index c9d68d65..259e0505 100644 --- a/src/controller/messages.py +++ b/src/controller/messages.py @@ -29,8 +29,6 @@ class basicTweet(object): self.message = getattr(message, messageType)(title, caption, text, *args, **kwargs) widgetUtils.connect_event(self.message.spellcheck, widgetUtils.BUTTON_PRESSED, self.spellcheck) widgetUtils.connect_event(self.message.attach, widgetUtils.BUTTON_PRESSED, self.attach) -# if system == "Windows": -# if messageType != "dm": widgetUtils.connect_event(self.message.text, widgetUtils.ENTERED_TEXT, self.text_processor) widgetUtils.connect_event(self.message.shortenButton, widgetUtils.BUTTON_PRESSED, self.shorten) widgetUtils.connect_event(self.message.unshortenButton, widgetUtils.BUTTON_PRESSED, self.unshorten) @@ -201,6 +199,7 @@ class viewTweet(basicTweet): param tweetList: If is_tweet is set to True, this could be a list of quoted tweets. param is_tweet: True or false, depending wether the passed object is a tweet or not.""" if is_tweet == True: + self.title = _(u"Tweet") image_description = [] text = "" for i in xrange(0, len(tweetList)): @@ -255,6 +254,7 @@ class viewTweet(basicTweet): self.message.set_title(len(text)) [self.message.set_image_description(i) for i in image_description] else: + self.title = _(u"View item") text = tweet self.message = message.viewNonTweet(text) widgetUtils.connect_event(self.message.spellcheck, widgetUtils.BUTTON_PRESSED, self.spellcheck) diff --git a/src/wxUI/dialogs/message.py b/src/wxUI/dialogs/message.py index f668975e..b8aef4c8 100644 --- a/src/wxUI/dialogs/message.py +++ b/src/wxUI/dialogs/message.py @@ -305,7 +305,7 @@ class viewTweet(widgetUtils.BaseDialog): 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) + (x, y) = dc.GetMultiLineTextExtent("0"*140) self.text.SetSize((x, y)) self.text.SetFocus() textBox = wx.BoxSizer(wx.HORIZONTAL) @@ -317,7 +317,7 @@ class viewTweet(widgetUtils.BaseDialog): self.image_description = wx.TextCtrl(panel, -1, style=wx.TE_READONLY|wx.TE_MULTILINE, size=(250, 180)) dc = wx.WindowDC(self.image_description) dc.SetFont(self.image_description.GetFont()) - (x, y, z) = dc.GetMultiLineTextExtent("0"*450) + (x, y) = dc.GetMultiLineTextExtent("0"*450) self.image_description.SetSize((x, y)) self.image_description.Enable(False) iBox = wx.BoxSizer(wx.HORIZONTAL) @@ -398,7 +398,7 @@ class viewNonTweet(widgetUtils.BaseDialog): self.text = wx.TextCtrl(parent=panel, id=-1, value=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) + (x, y) = dc.GetMultiLineTextExtent("0"*140) self.text.SetSize((x, y)) self.text.SetFocus() textBox = wx.BoxSizer(wx.HORIZONTAL) diff --git a/src/wxUI/view.py b/src/wxUI/view.py index 5b179fb9..a7e34f43 100644 --- a/src/wxUI/view.py +++ b/src/wxUI/view.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- import wx +import wx.adv import application class mainFrame(wx.Frame): @@ -173,7 +174,7 @@ class mainFrame(wx.Frame): self.nb.DeletePage(pos) def about_dialog(self): - info = wx.AboutDialogInfo() + info = wx.adv.AboutDialogInfo() info.SetName(application.name) info.SetVersion(application.version) info.SetDescription(application.description) @@ -182,7 +183,8 @@ class mainFrame(wx.Frame): # info.SetLicence(application.licence) for i in application.authors: info.AddDeveloper(i) - wx.AboutBox(info) + wx.adv.AboutBox(info) + def set_focus(self): self.SetFocus()