summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--poezio/tabs/basetabs.py12
-rw-r--r--poezio/tabs/bookmarkstab.py2
2 files changed, 10 insertions, 4 deletions
diff --git a/poezio/tabs/basetabs.py b/poezio/tabs/basetabs.py
index 372f2349..0d860adb 100644
--- a/poezio/tabs/basetabs.py
+++ b/poezio/tabs/basetabs.py
@@ -128,8 +128,8 @@ class Tab:
def __init__(self, core: Core):
self.core = core
self.nb = 0
- if not hasattr(self, 'name'):
- self.name = self.__class__.__name__
+ if not hasattr(self, '_name'):
+ self._name = self.__class__.__name__
self.input = None
self.closed = False
self._state = 'normal'
@@ -141,6 +141,12 @@ class Tab:
self.commands = {} # and their own commands
@property
+ def name(self) -> str:
+ if hasattr(self, '_name'):
+ return self._name
+ return ''
+
+ @property
def size(self) -> SizeManager:
return self.core.size
@@ -510,7 +516,7 @@ class ChatTab(Tab):
self._jid = jid
#: Is the tab currently requesting MAM data?
self.query_status = False
- self._name: Optional[str] = jid.full
+ self._name = jid.full
self.text_win = windows.TextWin()
self.directed_presence = None
self._text_buffer = TextBuffer()
diff --git a/poezio/tabs/bookmarkstab.py b/poezio/tabs/bookmarkstab.py
index 4b7f708b..4f4833fc 100644
--- a/poezio/tabs/bookmarkstab.py
+++ b/poezio/tabs/bookmarkstab.py
@@ -29,7 +29,7 @@ class BookmarksTab(Tab):
def __init__(self, core, bookmarks: BookmarkList):
Tab.__init__(self, core)
- self.name = "Bookmarks"
+ self._name = "Bookmarks"
self.bookmarks = bookmarks
self.new_bookmarks: List[Bookmark] = []
self.removed_bookmarks: List[Bookmark] = []