From 9d4063b6623a1547979929c1573c2d2161b0a12b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Cort=C3=A9z?= Date: Tue, 10 Mar 2015 09:44:21 -0600 Subject: [PATCH] Hide buffers frof the account settings dialogue is possible --- src/controller/mainController.py | 6 ++++-- src/controller/settings.py | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/controller/mainController.py b/src/controller/mainController.py index c60f4caf..ff429128 100644 --- a/src/controller/mainController.py +++ b/src/controller/mainController.py @@ -1026,12 +1026,12 @@ class Controller(object): self.buffers.append(friends) self.view.insert_buffer(friends.buffer, name=_(u"Friends"), pos=self.view.search(buff.session.db["user_name"], buff.session.db["user_name"])) friends.start_stream() - elif buffer == "blocks": + elif buffer == "blocked": blocks = buffersController.peopleBufferController(self.view.nb, "list_blocks", "blocked", buff.session, buff.session.db["user_name"]) self.buffers.append(blocks) self.view.insert_buffer(blocks.buffer, name=_(u"Blocked users"), pos=self.view.search(buff.session.db["user_name"], buff.session.db["user_name"])) blocks.start_stream() - elif buffer == "mutes": + elif buffer == "muted": muted = buffersController.peopleBufferController(self.view.nb, "get_muted_users_list", "muted", buff.session, buff.session.db["user_name"]) self.buffers.append(muted) self.view.insert_buffer(muted.buffer, name=_(u"Muted users"), pos=self.view.search(buff.session.db["user_name"], buff.session.db["user_name"])) @@ -1040,6 +1040,8 @@ class Controller(object): events = buffersController.eventsBufferController(self.view.nb, "events", buff.session, buff.session.db["user_name"], bufferType="dmPanel", screen_name=buff.session.db["user_name"]) self.buffers.append(events) self.view.insert_buffer(events.buffer, name=_(u"Events"), pos=self.view.search(buff.session.db["user_name"], buff.session.db["user_name"])) + elif create == False: + self.destroy_buffer(buffer, buff.session.db["user_name"]) def restart_streams(self, streams=[], session=None): for i in streams: diff --git a/src/controller/settings.py b/src/controller/settings.py index 909d0f84..d1b4cfca 100644 --- a/src/controller/settings.py +++ b/src/controller/settings.py @@ -115,10 +115,10 @@ class accountSettingsController(globalSettingsController): pub.sendMessage("create-new-buffer", buffer="favourites", account=self.user, create=self.config["other_buffers"]["show_favourites"]) if self.config["other_buffers"]["show_blocks"] != self.dialog.get_value("buffers", "blocks"): self.config["other_buffers"]["show_blocks"] = self.dialog.get_value("buffers", "blocks") - pub.sendMessage("create-new-buffer", buffer="blocks", account=self.user, create=self.config["other_buffers"]["show_blocks"]) + pub.sendMessage("create-new-buffer", buffer="blocked", account=self.user, create=self.config["other_buffers"]["show_blocks"]) if self.config["other_buffers"]["show_muted_users"] != self.dialog.get_value("buffers", "mutes"): self.config["other_buffers"]["show_muted_users"] = self.dialog.get_value("buffers", "mutes") - pub.sendMessage("create-new-buffer", buffer="mutes", account=self.user, create=self.config["other_buffers"]["show_muted_users"]) + pub.sendMessage("create-new-buffer", buffer="muted", account=self.user, create=self.config["other_buffers"]["show_muted_users"]) if self.config["other_buffers"]["show_events"] != self.dialog.get_value("buffers", "events"): self.config["other_buffers"]["show_events"] = self.dialog.get_value("buffers", "events") pub.sendMessage("create-new-buffer", buffer="events", account=self.user, create=self.config["other_buffers"]["show_events"])