mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-22 11:18:08 -06:00
Update buffer removal code. Should be able to remove user search buffers
This commit is contained in:
parent
48730ead63
commit
b7497791b4
@ -168,8 +168,8 @@ class BaseBuffer(base.Buffer):
|
||||
if self.kwargs.get("id") in self.session.settings["other_buffers"]["timelines"]:
|
||||
self.session.settings["other_buffers"]["timelines"].remove(self.kwargs.get("id"))
|
||||
self.session.settings.write()
|
||||
if self.name in self.session.db:
|
||||
self.session.db.pop(self.name)
|
||||
if self.name in self.session.db:
|
||||
self.session.db.pop(self.name)
|
||||
return True
|
||||
elif dlg == widgetUtils.NO:
|
||||
return False
|
||||
|
@ -172,7 +172,7 @@ class UserBuffer(BaseBuffer):
|
||||
return True
|
||||
elif dlg == widgetUtils.NO:
|
||||
return False
|
||||
if "-following" in self.name:
|
||||
elif "-following" in self.name:
|
||||
if force == False:
|
||||
dlg = commonMessageDialogs.remove_buffer()
|
||||
else:
|
||||
@ -186,6 +186,17 @@ class UserBuffer(BaseBuffer):
|
||||
return True
|
||||
elif dlg == widgetUtils.NO:
|
||||
return False
|
||||
elif "-searchUser" in self.name:
|
||||
if force == False:
|
||||
dlg = commonMessageDialogs.remove_buffer()
|
||||
else:
|
||||
dlg = widgetUtils.YES
|
||||
if dlg == widgetUtils.YES:
|
||||
if self.name in self.session.db:
|
||||
self.session.db.pop(self.name)
|
||||
return True
|
||||
elif dlg == widgetUtils.NO:
|
||||
return False
|
||||
else:
|
||||
output.speak(_(u"This buffer is not a timeline; it can't be deleted."), True)
|
||||
return False
|
Loading…
Reference in New Issue
Block a user