/***************************************************************************
- * Copyright (C) 2005-09 by the Quassel Project *
+ * Copyright (C) 2005-2016 by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
* 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"
+#include <QIcon>
#include <QMessageBox>
#include "client.h"
-#include "iconloader.h"
#include "network.h"
#include "bufferviewconfig.h"
#include "bufferviewfilter.h"
_bufferViewHint(0)
{
ui.setupUi(this);
- ui.renameBufferView->setIcon(SmallIcon("edit-rename"));
- ui.addBufferView->setIcon(SmallIcon("list-add"));
- ui.deleteBufferView->setIcon(SmallIcon("edit-delete"));
+ //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(QIcon::fromTheme("edit-rename"));
+ ui.addBufferView->setIcon(QIcon::fromTheme("list-add"));
+ ui.deleteBufferView->setIcon(QIcon::fromTheme("edit-delete"));
reset();
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()));
+ connect(ui.showSearch, SIGNAL(clicked(bool)), this, SLOT(widgetHasChanged()));
connect(ui.networkSelector, SIGNAL(currentIndexChanged(int)), this, SLOT(enableStatusBuffers(int)));
}
break;
}
else {
- iter++;
+ ++iter;
}
}
delete config;
ui.addNewBuffersAutomatically->setChecked(config->addNewBuffersAutomatically());
ui.sortAlphabetically->setChecked(config->sortAlphabetically());
ui.hideInactiveBuffers->setChecked(config->hideInactiveBuffers());
+ ui.hideInactiveNetworks->setChecked(config->hideInactiveNetworks());
+ ui.showSearch->setChecked(config->showSearch());
int networkIndex = 0;
for (int i = 0; i < ui.networkSelector->count(); i++) {
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<NetworkId>());
+ config->setShowSearch(ui.showSearch->isChecked());
int minimumActivity = 0;
if (ui.minimumActivitySelector->currentIndex() > 0)
}
else {
changed = true;
- iter++;
+ ++iter;
}
}
return changed;