summaryrefslogtreecommitdiff
path: root/poezio/tabs/basetabs.py
diff options
context:
space:
mode:
Diffstat (limited to 'poezio/tabs/basetabs.py')
-rw-r--r--poezio/tabs/basetabs.py16
1 files changed, 6 insertions, 10 deletions
diff --git a/poezio/tabs/basetabs.py b/poezio/tabs/basetabs.py
index 9f1e09e7..b0bebfec 100644
--- a/poezio/tabs/basetabs.py
+++ b/poezio/tabs/basetabs.py
@@ -83,7 +83,8 @@ STATE_PRIORITY = {
class Tab(object):
plugin_commands = {}
plugin_keys = {}
- def __init__(self):
+ def __init__(self, core):
+ self.core = core
if not hasattr(self, 'name'):
self.name = self.__class__.__name__
self.input = None
@@ -102,10 +103,6 @@ class Tab(object):
return self.core.size
@property
- def core(self):
- return Singleton(core.Core)
-
- @property
def nb(self):
for index, tab in enumerate(self.core.tabs):
if tab == self:
@@ -425,8 +422,8 @@ class ChatTab(Tab):
"""
plugin_commands = {}
plugin_keys = {}
- def __init__(self, jid=''):
- Tab.__init__(self)
+ def __init__(self, core, jid=''):
+ Tab.__init__(self, core)
self.name = jid
self.text_win = None
self._text_buffer = TextBuffer()
@@ -688,8 +685,8 @@ class ChatTab(Tab):
class OneToOneTab(ChatTab):
- def __init__(self, jid=''):
- ChatTab.__init__(self, jid)
+ def __init__(self, core, jid=''):
+ ChatTab.__init__(self, core, jid)
# Set to true once the first disco is done
self.__initial_disco = False
@@ -860,4 +857,3 @@ class OneToOneTab(ChatTab):
self.add_message(msg, typ=0)
self.core.refresh_window()
-