From 10d0b8ba6b1b44af3e6ae7b6836d8f289c99d16d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Cort=C3=A9z?= Date: Mon, 16 Feb 2015 16:37:56 -0600 Subject: [PATCH] Delete search buffers --- src/controller/buffersController.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/controller/buffersController.py b/src/controller/buffersController.py index 5603ba9b..ecf438dd 100644 --- a/src/controller/buffersController.py +++ b/src/controller/buffersController.py @@ -526,6 +526,15 @@ class searchBufferController(baseBufferController): if number_of_items > 0: self.session.sound.play("search_updated.ogg") + def remove_buffer(self): + dlg = commonMessageDialogs.remove_buffer() + 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]) + return True + elif dlg == widgetUtils.NO: + return False + class searchPeopleBufferController(searchBufferController): def __init__(self, parent, function, name, sessionObject, account, bufferType="peoplePanel", *args, **kwargs):