this commit is too big

This commit is contained in:
fourtf
2018-08-02 14:23:27 +02:00
parent 3b3c5d8d75
commit c2e2dfb577
186 changed files with 3626 additions and 2656 deletions
+10 -14
View File
@@ -207,11 +207,12 @@ Window *WindowManager::windowAt(int index)
return this->windows_.at(index);
}
void WindowManager::initialize(Application &app)
void WindowManager::initialize(Settings &settings, Paths &paths)
{
assertInGuiThread();
app.themes->repaintVisibleChatWidgets_.connect([this] { this->repaintVisibleChatWidgets(); });
getApp()->themes->repaintVisibleChatWidgets_.connect(
[this] { this->repaintVisibleChatWidgets(); });
assert(!this->initialized_);
@@ -301,20 +302,15 @@ void WindowManager::initialize(Application &app)
mainWindow_->getNotebook().addPage(true);
}
auto settings = getSettings();
settings.timestampFormat.connect([this](auto, auto) { this->layoutChannelViews(); });
settings->timestampFormat.connect([this](auto, auto) {
auto app = getApp();
this->layoutChannelViews();
});
settings.emoteScale.connect([this](auto, auto) { this->forceLayoutChannelViews(); });
settings->emoteScale.connect([this](auto, auto) { this->forceLayoutChannelViews(); });
settings->timestampFormat.connect([this](auto, auto) { this->forceLayoutChannelViews(); });
settings->alternateMessageBackground.connect(
settings.timestampFormat.connect([this](auto, auto) { this->forceLayoutChannelViews(); });
settings.alternateMessageBackground.connect(
[this](auto, auto) { this->forceLayoutChannelViews(); });
settings->separateMessages.connect([this](auto, auto) { this->forceLayoutChannelViews(); });
settings->collpseMessagesMinLines.connect(
settings.separateMessages.connect([this](auto, auto) { this->forceLayoutChannelViews(); });
settings.collpseMessagesMinLines.connect(
[this](auto, auto) { this->forceLayoutChannelViews(); });
this->initialized_ = true;
@@ -438,7 +434,7 @@ void WindowManager::encodeChannel(IndirectChannel channel, QJsonObject &obj)
switch (channel.getType()) {
case Channel::Type::Twitch: {
obj.insert("type", "twitch");
obj.insert("name", channel.get()->name);
obj.insert("name", channel.get()->getName());
} break;
case Channel::Type::TwitchMentions: {
obj.insert("type", "mentions");