diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2021-06-25 22:54:34 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2021-06-25 22:54:34 -0400 |
commit | eab0e100c4368b3a9b42c0f8cc0f6cc4faf0f1bc (patch) | |
tree | ed729dc065c7b908e60e7d708197c3876d26cbf5 /windows/guildsettings/infopane.cpp | |
parent | 989ec06838b2f8e5a90808eacb97aefe2890df6c (diff) | |
download | abaddon-portaudio-eab0e100c4368b3a9b42c0f8cc0f6cc4faf0f1bc.tar.gz abaddon-portaudio-eab0e100c4368b3a9b42c0f8cc0f6cc4faf0f1bc.zip |
be more consistent with callbacks
Diffstat (limited to 'windows/guildsettings/infopane.cpp')
-rw-r--r-- | windows/guildsettings/infopane.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/windows/guildsettings/infopane.cpp b/windows/guildsettings/infopane.cpp index 07c0318..85aabe1 100644 --- a/windows/guildsettings/infopane.cpp +++ b/windows/guildsettings/infopane.cpp @@ -99,8 +99,8 @@ void GuildSettingsInfoPane::UpdateGuildName() { auto &discord = Abaddon::Get().GetDiscordClient(); if (discord.GetGuild(GuildID)->Name == m_guild_name.get_text()) return; - auto cb = [this](bool success) { - if (!success) { + auto cb = [this](DiscordError code) { + if (code != DiscordError::NONE) { m_guild_name.set_text(Abaddon::Get().GetDiscordClient().GetGuild(GuildID)->Name); Gtk::MessageDialog dlg("Failed to set guild name", false, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true); dlg.set_position(Gtk::WIN_POS_CENTER); @@ -114,8 +114,8 @@ void GuildSettingsInfoPane::UpdateGuildIconFromData(const std::vector<uint8_t> & auto encoded = "data:" + mime + ";base64," + Glib::Base64::encode(std::string(data.begin(), data.end())); auto &discord = Abaddon::Get().GetDiscordClient(); - auto cb = [this](bool success) { - if (!success) { + auto cb = [this](DiscordError code) { + if (code != DiscordError::NONE) { Gtk::MessageDialog dlg("Failed to set guild icon", false, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true); dlg.set_position(Gtk::WIN_POS_CENTER); dlg.run(); |