X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fqtui%2Fsettingspages%2Fbufferviewsettingspage.cpp;h=32070751b141eddc6a5f7f7826b7f98317f387e4;hb=00553e52a4bad0a6c1c3ded49ae6851b07a9498b;hp=f2ef7a174a2765f1c597495d6761069feaab93e2;hpb=4a5065255e652dd0c301bac0db41b7afb777ef49;p=quassel.git diff --git a/src/qtui/settingspages/bufferviewsettingspage.cpp b/src/qtui/settingspages/bufferviewsettingspage.cpp index f2ef7a17..32070751 100644 --- a/src/qtui/settingspages/bufferviewsettingspage.cpp +++ b/src/qtui/settingspages/bufferviewsettingspage.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2013 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 * @@ -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;