X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fqtui%2Fqtuistyle.cpp;h=2920f70969d42723cf0b70666f56f30ff2a6f791;hb=2c8434f74c68194d56f2084f637419123e61d18b;hp=7516c22477d08be6f15eab42602bd5ce6d5454bf;hpb=c95649029bee1418b77ea2028f06b850759c7423;p=quassel.git diff --git a/src/qtui/qtuistyle.cpp b/src/qtui/qtuistyle.cpp index 7516c224..2920f709 100644 --- a/src/qtui/qtuistyle.cpp +++ b/src/qtui/qtuistyle.cpp @@ -28,22 +28,16 @@ QtUiStyle::QtUiStyle(QObject *parent) : UiStyle(parent) { ChatViewSettings s; - s.notify("UseCustomTimestampFormat", this, SLOT(updateUseCustomTimestampFormat())); - updateUseCustomTimestampFormat(); - s.notify("TimestampFormat", this, SLOT(updateTimestampFormatString())); - updateTimestampFormatString(); - s.notify("SenderPrefixMode", this, SLOT(updateSenderPrefixDisplay())); - updateSenderPrefixDisplay(); - s.notify("ShowSenderBrackets", this, SLOT(updateShowSenderBrackets())); - updateShowSenderBrackets(); + s.initAndNotify("UseCustomTimestampFormat", this, &QtUiStyle::updateUseCustomTimestampFormat); + s.initAndNotify("TimestampFormat", this, &QtUiStyle::updateTimestampFormatString); + s.initAndNotify("SenderPrefixMode", this, &QtUiStyle::updateSenderPrefixDisplay); + s.initAndNotify("ShowSenderBrackets", this, &QtUiStyle::updateShowSenderBrackets); // If no style sheet exists, generate it on first run. initializeSettingsQss(); } -QtUiStyle::~QtUiStyle() {} - void QtUiStyle::updateUseCustomTimestampFormat() { ChatViewSettings s; @@ -59,7 +53,7 @@ void QtUiStyle::updateTimestampFormatString() void QtUiStyle::updateSenderPrefixDisplay() { ChatViewSettings s; - setSenderPrefixDisplay(s.SenderPrefixDisplay()); + setSenderPrefixDisplay(s.senderPrefixDisplay()); } void QtUiStyle::updateShowSenderBrackets() @@ -200,7 +194,7 @@ void QtUiStyle::generateSettingsQss() const out << "\n// NickView Colors\n" << "NickListItem[type=\"category\"] { foreground: " << color("DefaultBuffer", uiColors) << "; }\n" << "NickListItem[type=\"user\"] { foreground: " << color("OnlineNick", uiColors) << "; }\n" - << "NickListItem[type=\"user\", state=\"away\"] { foreground: " << color("AwayNick", uiColors) << "; }\n"; + << R"(NickListItem[type="user", state="away"] { foreground: )" << color("AwayNick", uiColors) << "; }\n"; } settingsQss.close();