X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fsettingspages%2Fbufferviewsettingspage.cpp;h=32070751b141eddc6a5f7f7826b7f98317f387e4;hb=e53fc69a91553b57932ba599b39999d550114588;hp=088825c7334d5a69f760b726c061aa5cf76fc511;hpb=694f9bfbf7f1af19108461c7e00d133e55082bce;p=quassel.git diff --git a/src/qtui/settingspages/bufferviewsettingspage.cpp b/src/qtui/settingspages/bufferviewsettingspage.cpp index 088825c7..32070751 100644 --- a/src/qtui/settingspages/bufferviewsettingspage.cpp +++ b/src/qtui/settingspages/bufferviewsettingspage.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-09 by the Quassel Project * + * Copyright (C) 2005-2014 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -15,7 +15,7 @@ * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #include "bufferviewsettingspage.h" @@ -39,6 +39,10 @@ BufferViewSettingsPage::BufferViewSettingsPage(QWidget *parent) _bufferViewHint(0) { ui.setupUi(this); + //Hide the hide inactive networks feature on older cores (which won't save the setting) + if (!(Client::coreFeatures() & Quassel::HideInactiveNetworks)) + ui.hideInactiveNetworks->hide(); + ui.renameBufferView->setIcon(SmallIcon("edit-rename")); ui.addBufferView->setIcon(SmallIcon("list-add")); ui.deleteBufferView->setIcon(SmallIcon("edit-delete")); @@ -60,6 +64,7 @@ BufferViewSettingsPage::BufferViewSettingsPage(QWidget *parent) connect(ui.addNewBuffersAutomatically, SIGNAL(clicked(bool)), this, SLOT(widgetHasChanged())); connect(ui.sortAlphabetically, SIGNAL(clicked(bool)), this, SLOT(widgetHasChanged())); connect(ui.hideInactiveBuffers, SIGNAL(clicked(bool)), this, SLOT(widgetHasChanged())); + connect(ui.hideInactiveNetworks, SIGNAL(clicked(bool)), this, SLOT(widgetHasChanged())); connect(ui.networkSelector, SIGNAL(currentIndexChanged(int)), this, SLOT(widgetHasChanged())); connect(ui.minimumActivitySelector, SIGNAL(currentIndexChanged(int)), this, SLOT(widgetHasChanged())); @@ -435,6 +440,7 @@ void BufferViewSettingsPage::loadConfig(BufferViewConfig *config) ui.addNewBuffersAutomatically->setChecked(config->addNewBuffersAutomatically()); ui.sortAlphabetically->setChecked(config->sortAlphabetically()); ui.hideInactiveBuffers->setChecked(config->hideInactiveBuffers()); + ui.hideInactiveNetworks->setChecked(config->hideInactiveNetworks()); int networkIndex = 0; for (int i = 0; i < ui.networkSelector->count(); i++) { @@ -476,6 +482,7 @@ void BufferViewSettingsPage::saveConfig(BufferViewConfig *config) config->setAddNewBuffersAutomatically(ui.addNewBuffersAutomatically->isChecked()); config->setSortAlphabetically(ui.sortAlphabetically->isChecked()); config->setHideInactiveBuffers(ui.hideInactiveBuffers->isChecked()); + config->setHideInactiveNetworks(ui.hideInactiveNetworks->isChecked()); config->setNetworkId(ui.networkSelector->itemData(ui.networkSelector->currentIndex()).value()); int minimumActivity = 0;