2021-04-23 10:57:54 -05:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
""" A buffer is a (virtual) list of items. All items belong to a category (wall posts, messages, persons...)"""
|
|
|
|
import logging
|
|
|
|
import output
|
2021-04-23 12:26:35 -05:00
|
|
|
from wxUI.tabs import empty
|
2021-04-23 10:57:54 -05:00
|
|
|
|
|
|
|
log = logging.getLogger("controller.buffers.empty")
|
|
|
|
|
|
|
|
class emptyBuffer(object):
|
|
|
|
|
2021-09-22 09:17:12 -05:00
|
|
|
def __init__(self, name=None, parent=None, *args, **kwargs):
|
|
|
|
self.tab = empty.emptyTab(parent=parent, name=name)
|
|
|
|
self.name = name
|
2021-04-23 10:57:54 -05:00
|
|
|
|
2021-09-22 09:17:12 -05:00
|
|
|
def get_items(self, *args, **kwargs):
|
|
|
|
if not hasattr(self, "tab"):
|
|
|
|
# Create GUI associated to this buffer.
|
|
|
|
self.create_tab(self.parent)
|
|
|
|
# Add name to the new control so we could look for it when needed.
|
|
|
|
self.tab.name = self.name
|
|
|
|
pass
|
2021-04-23 10:57:54 -05:00
|
|
|
|
2021-09-22 09:17:12 -05:00
|
|
|
def get_more_items(self, *args, **kwargs):
|
|
|
|
output.speak(_("This buffer doesn't support getting more items."))
|
2021-04-23 10:57:54 -05:00
|
|
|
|
2021-09-22 09:17:12 -05:00
|
|
|
def remove_buffer(self, mandatory=False):
|
|
|
|
return False
|