Hide buffers frof the account settings dialogue is possible

This commit is contained in:
Manuel Cortez 2015-03-10 09:44:21 -06:00
parent 1a81d1a536
commit 9d4063b662
2 changed files with 6 additions and 4 deletions

View File

@ -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:

View File

@ -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"])