/***************************************************************************
- * Copyright (C) 2005-2015 by the Quassel Project *
+ * Copyright (C) 2005-2018 by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
#include "highlightsettingspage.h"
+#include "client.h"
#include "qtui.h"
#include "uisettings.h"
#include <QHeaderView>
HighlightSettingsPage::HighlightSettingsPage(QWidget *parent)
- : SettingsPage(tr("Interface"), tr("Highlight"), parent)
+ : SettingsPage(tr("Interface"), tr("Local Highlights"), parent)
{
ui.setupUi(this);
ui.highlightTable->verticalHeader()->hide();
void HighlightSettingsPage::defaults()
{
- ui.highlightCurrentNick->setChecked(true);
+ ui.highlightNoNick->setChecked(true);
ui.nicksCaseSensitive->setChecked(false);
emptyTable();
NotificationSettings notificationSettings;
notificationSettings.setHighlightList(highlightList);
- NotificationSettings::HighlightNickType highlightNickType;
- if (ui.highlightNoNick->isChecked())
- highlightNickType = NotificationSettings::NoNick;
+ NotificationSettings::HighlightNickType highlightNickType = NotificationSettings::NoNick;
if (ui.highlightCurrentNick->isChecked())
highlightNickType = NotificationSettings::CurrentNick;
if (ui.highlightAllNicks->isChecked())
{
NotificationSettings notificationSettings;
- NotificationSettings::HighlightNickType highlightNickType;
- if (ui.highlightNoNick->isChecked())
- highlightNickType = NotificationSettings::NoNick;
+ NotificationSettings::HighlightNickType highlightNickType = NotificationSettings::NoNick;
if (ui.highlightCurrentNick->isChecked())
highlightNickType = NotificationSettings::CurrentNick;
if (ui.highlightAllNicks->isChecked())
highlightNickType = NotificationSettings::AllNicks;
- if (notificationSettings.highlightNick() != highlightNickType) return true;
- if (notificationSettings.nicksCaseSensitive() != ui.nicksCaseSensitive->isChecked()) return true;
-
- if (notificationSettings.highlightList() != highlightList) return true;
+ if (notificationSettings.highlightNick() != highlightNickType)
+ return true;
+ if (notificationSettings.nicksCaseSensitive() != ui.nicksCaseSensitive->isChecked())
+ return true;
+ if (notificationSettings.highlightList() != highlightList)
+ return true;
return false;
}