diff options
author | mathieui <mathieui@mathieui.net> | 2018-07-22 16:17:06 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2018-07-22 16:17:06 +0200 |
commit | c6cf2d08b7295a477d89d01535463d18103f6311 (patch) | |
tree | 9ec9f61ab5d4b6fe45d10d0752dab90df935e76f /plugins/close_all.py | |
parent | e2414121af16474744d012cdb8466de6ae3136e4 (diff) | |
download | poezio-c6cf2d08b7295a477d89d01535463d18103f6311.tar.gz poezio-c6cf2d08b7295a477d89d01535463d18103f6311.tar.bz2 poezio-c6cf2d08b7295a477d89d01535463d18103f6311.tar.xz poezio-c6cf2d08b7295a477d89d01535463d18103f6311.zip |
Fix close_all and change_title plugins
Diffstat (limited to 'plugins/close_all.py')
-rw-r--r-- | plugins/close_all.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/close_all.py b/plugins/close_all.py index 93bcdcfc..faf1d0ea 100644 --- a/plugins/close_all.py +++ b/plugins/close_all.py @@ -26,19 +26,18 @@ class Plugin(BasePlugin): """ /closeall """ - current = self.core.current_tab() + current = self.api.current_tab() if not isinstance(current, (tabs.RosterInfoTab, tabs.MucTab)): self.core.go_to_roster() - current = self.core.current_tab() + current = self.api.current_tab() def filter_func(x): return not isinstance(x, (tabs.RosterInfoTab, tabs.MucTab)) - matching_tabs = list(filter(filter_func, self.core.tabs)) + matching_tabs = list(filter(filter_func, self.core.tabs.get_tabs())) length = len(matching_tabs) for tab in matching_tabs: self.core.close_tab(tab) - self.core.current_tab_nb = current.nb self.api.information('%s tabs closed.' % length, 'Info') self.core.refresh_window() |