diff --git a/src/controller/buffersController.py b/src/controller/buffersController.py index ae765bcb..0a6f6ebf 100644 --- a/src/controller/buffersController.py +++ b/src/controller/buffersController.py @@ -580,6 +580,7 @@ class searchBufferController(baseBufferController): if dlg == widgetUtils.YES: if self.name[:-11] in self.session.settings["other_buffers"]["tweet_searches"]: self.session.settings["other_buffers"]["tweet_searches"].remove(self.name[:-11]) + self.timer.cancel() return True elif dlg == widgetUtils.NO: return False @@ -662,6 +663,7 @@ class trendsBufferController(bufferController): if dlg == widgetUtils.YES: if self.name[:-3] in self.session.settings["other_buffers"]["trending_topic_buffers"]: self.session.settings["other_buffers"]["trending_topic_buffers"].remove(self.name[:-3]) + self.timer.cancel() return True elif dlg == widgetUtils.NO: return False \ No newline at end of file diff --git a/src/controller/messages.py b/src/controller/messages.py index 9b264cde..a562a707 100644 --- a/src/controller/messages.py +++ b/src/controller/messages.py @@ -159,6 +159,7 @@ class viewTweet(basicTweet): widgetUtils.connect_event(self.message.spellcheck, widgetUtils.BUTTON_PRESSED, self.spellcheck) widgetUtils.connect_event(self.message.translateButton, widgetUtils.BUTTON_PRESSED, self.translate) if self.contain_urls() == True: + self.message.enable_button("unshortenButton") widgetUtils.connect_event(self.message.unshortenButton, widgetUtils.BUTTON_PRESSED, self.unshorten) self.message.get_response() diff --git a/src/wxUI/dialogs/message.py b/src/wxUI/dialogs/message.py index 00831b92..735428c1 100644 --- a/src/wxUI/dialogs/message.py +++ b/src/wxUI/dialogs/message.py @@ -228,6 +228,10 @@ class viewTweet(widgetUtils.BaseDialog): def onSelect(self, ev): self.text.SelectAll() + def enable_button(self, buttonName): + if getattr(self, buttonName): + return getattr(self, buttonName).Enable() + class viewNonTweet(widgetUtils.BaseDialog): def __init__(self, text): @@ -278,3 +282,7 @@ class viewNonTweet(widgetUtils.BaseDialog): def text_focus(self): self.text.SetFocus() + + def enable_button(self, buttonName): + if getattr(self, buttonName): + return getattr(self, buttonName).Enable()