mirror of
https://github.com/celisej567/abaddon.git
synced 2026-09-19 20:11:59 +03:00
remove SimpleIni as a dependency
use Glib::KeyFile instead which is basically the same file format also read into and save from struct once, cuz its faster and less redundant
This commit is contained in:
@@ -9,10 +9,9 @@ MutualFriendItem::MutualFriendItem(const UserData &user)
|
||||
|
||||
m_avatar.set_margin_end(10);
|
||||
|
||||
const auto show_animations = Abaddon::Get().GetSettings().GetShowAnimations();
|
||||
auto &img = Abaddon::Get().GetImageManager();
|
||||
m_avatar.property_pixbuf() = img.GetPlaceholder(24);
|
||||
if (user.HasAnimatedAvatar() && show_animations) {
|
||||
if (user.HasAnimatedAvatar() && Abaddon::Get().GetSettings().ShowAnimations) {
|
||||
auto cb = [this](const Glib::RefPtr<Gdk::PixbufAnimation> &pb) {
|
||||
m_avatar.property_pixbuf_animation() = pb;
|
||||
};
|
||||
|
||||
@@ -13,11 +13,10 @@ MutualGuildItem::MutualGuildItem(const MutualGuildData &guild)
|
||||
// discord will return info (id + nick) for "deleted" guilds from this endpoint. strange !
|
||||
const auto data = Abaddon::Get().GetDiscordClient().GetGuild(guild.ID);
|
||||
if (data.has_value()) {
|
||||
const auto show_animations = Abaddon::Get().GetSettings().GetShowAnimations();
|
||||
auto &img = Abaddon::Get().GetImageManager();
|
||||
m_icon.property_pixbuf() = img.GetPlaceholder(24);
|
||||
if (data->HasIcon()) {
|
||||
if (data->HasAnimatedIcon() && show_animations) {
|
||||
if (data->HasAnimatedIcon() && Abaddon::Get().GetSettings().ShowAnimations) {
|
||||
auto cb = [this](const Glib::RefPtr<Gdk::PixbufAnimation> &pb) {
|
||||
m_icon.property_pixbuf_animation() = pb;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user