diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2020-12-17 01:40:02 -0500 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2020-12-17 01:40:02 -0500 |
commit | 58d0424dfc47e99c9c21396819a2234df158b4d0 (patch) | |
tree | 19c0b48efcfa0b04b1a31a59477c35f7f4724155 /components | |
parent | 315a4a8df80b922bbb8132c625803443c031dfd3 (diff) | |
download | abaddon-portaudio-58d0424dfc47e99c9c21396819a2234df158b4d0.tar.gz abaddon-portaudio-58d0424dfc47e99c9c21396819a2234df158b4d0.zip |
abstract away settings some more
Diffstat (limited to 'components')
-rw-r--r-- | components/chatmessage.cpp | 5 | ||||
-rw-r--r-- | components/memberlist.cpp | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/components/chatmessage.cpp b/components/chatmessage.cpp index 5a076c6..5a883b7 100644 --- a/components/chatmessage.cpp +++ b/components/chatmessage.cpp @@ -622,7 +622,7 @@ void ChatMessageItemContainer::HandleCustomEmojis(Gtk::TextView *tv) { } void ChatMessageItemContainer::HandleEmojis(Gtk::TextView *tv) { - static bool emojis = Abaddon::Get().GetSettings().GetSettingBool("gui", "emojis", true); + static bool emojis = Abaddon::Get().GetSettings().GetShowEmojis(); if (emojis) { HandleStockEmojis(tv); HandleCustomEmojis(tv); @@ -712,8 +712,7 @@ void ChatMessageItemContainer::HandleLinks(Gtk::TextView *tv) { Glib::ustring text = GetText(buf); // i'd like to let this be done thru css like .message-link { color: #bitch; } but idk how - auto &settings = Abaddon::Get().GetSettings(); - static auto link_color = settings.GetSettingString("misc", "linkcolor", "rgba(40, 200, 180, 255)"); + static auto link_color = Abaddon::Get().GetSettings().GetLinkColor(); int startpos = 0; Glib::MatchInfo match; diff --git a/components/memberlist.cpp b/components/memberlist.cpp index 452022c..befc2bd 100644 --- a/components/memberlist.cpp +++ b/components/memberlist.cpp @@ -17,7 +17,7 @@ MemberListUserRow::MemberListUserRow(Snowflake guild_id, const User *data) { m_label->set_single_line_mode(true); m_label->set_ellipsize(Pango::ELLIPSIZE_END); if (data != nullptr) { - static bool show_discriminator = Abaddon::Get().GetSettings().GetSettingBool("gui", "member_list_discriminator", true); + static bool show_discriminator = Abaddon::Get().GetSettings().GetShowMemberListDiscriminators(); std::string display = data->Username; if (show_discriminator) display += "#" + data->Discriminator; |