Remove unused IgnoreMessagesPage widget

This commit is contained in:
Rasmus Karlsson 2018-05-13 18:29:57 +02:00
parent 022c31e315
commit 3a48f5db96
4 changed files with 0 additions and 65 deletions

View file

@ -154,7 +154,6 @@ SOURCES += \
src/widgets/settingspages/commandpage.cpp \
src/widgets/settingspages/emotespage.cpp \
src/widgets/settingspages/highlightingpage.cpp \
src/widgets/settingspages/ignoremessagespage.cpp \
src/widgets/settingspages/ignoreuserspage.cpp \
src/widgets/settingspages/keyboardsettingspage.cpp \
src/widgets/settingspages/logspage.cpp \
@ -289,7 +288,6 @@ HEADERS += \
src/widgets/settingspages/commandpage.hpp \
src/widgets/settingspages/emotespage.hpp \
src/widgets/settingspages/highlightingpage.hpp \
src/widgets/settingspages/ignoremessagespage.hpp \
src/widgets/settingspages/ignoreuserspage.hpp \
src/widgets/settingspages/keyboardsettingspage.hpp \
src/widgets/settingspages/logspage.hpp \

View file

@ -11,7 +11,6 @@
#include "widgets/settingspages/emotespage.hpp"
#include "widgets/settingspages/externaltoolspage.hpp"
#include "widgets/settingspages/highlightingpage.hpp"
#include "widgets/settingspages/ignoremessagespage.hpp"
#include "widgets/settingspages/ignoreuserspage.hpp"
#include "widgets/settingspages/keyboardsettingspage.hpp"
#include "widgets/settingspages/logspage.hpp"
@ -89,7 +88,6 @@ void SettingsDialog::addTabs()
this->addTab(new settingspages::CommandPage);
// this->addTab(new settingspages::EmotesPage);
this->addTab(new settingspages::HighlightingPage);
// this->addTab(new settingspages::IgnoreMessagesPage);
this->addTab(new settingspages::IgnoreUsersPage);
this->ui.tabContainer->addSpacing(16);

View file

@ -1,40 +0,0 @@
#include "ignoremessagespage.hpp"
#include "application.hpp"
#include "util/layoutcreator.hpp"
#include <QLabel>
#include <QTextEdit>
namespace chatterino {
namespace widgets {
namespace settingspages {
IgnoreMessagesPage::IgnoreMessagesPage()
: SettingsPage("Ignore Messages", "")
{
auto app = getApp();
util::LayoutCreator<IgnoreMessagesPage> layoutCreator(this);
auto layout = layoutCreator.setLayoutType<QVBoxLayout>();
layout.emplace<QLabel>("Ignored keywords:");
QTextEdit *textEdit = layout.emplace<QTextEdit>().getElement();
textEdit->setPlainText(app->settings->ignoredKeywords);
QObject::connect(textEdit, &QTextEdit::textChanged,
[this] { this->keywordsUpdated.start(200); });
QObject::connect(&this->keywordsUpdated, &QTimer::timeout, [textEdit, app] {
QString text = textEdit->toPlainText();
app->settings->ignoredKeywords = text;
});
// ---- misc
this->keywordsUpdated.setSingleShot(true);
}
} // namespace settingspages
} // namespace widgets
} // namespace chatterino

View file

@ -1,21 +0,0 @@
#pragma once
#include "widgets/settingspages/settingspage.hpp"
#include <QTimer>
namespace chatterino {
namespace widgets {
namespace settingspages {
class IgnoreMessagesPage : public SettingsPage
{
public:
IgnoreMessagesPage();
QTimer keywordsUpdated;
};
} // namespace settingspages
} // namespace widgets
} // namespace chatterino