remove some stuff

This commit is contained in:
ouwou
2020-11-14 00:15:15 -05:00
parent ded2007b53
commit 1e3ebefb5e
6 changed files with 0 additions and 107 deletions

View File

@@ -20,7 +20,6 @@ Abaddon::Abaddon()
LoadFromSettings();
m_discord.signal_gateway_ready().connect(sigc::mem_fun(*this, &Abaddon::DiscordOnReady));
m_discord.signal_channel_list_refresh().connect(sigc::mem_fun(*this, &Abaddon::DiscordOnChannelListRefresh));
m_discord.signal_message_create().connect(sigc::mem_fun(*this, &Abaddon::DiscordOnMessageCreate));
m_discord.signal_message_delete().connect(sigc::mem_fun(*this, &Abaddon::DiscordOnMessageDelete));
m_discord.signal_message_update().connect(sigc::mem_fun(*this, &Abaddon::DiscordOnMessageUpdate));
@@ -87,8 +86,6 @@ int Abaddon::StartGTK() {
m_main_window->signal_action_show_user_menu().connect(sigc::mem_fun(*this, &Abaddon::ShowUserMenu));
m_main_window->GetChannelList()->signal_action_channel_item_select().connect(sigc::mem_fun(*this, &Abaddon::ActionChannelOpened));
m_main_window->GetChannelList()->signal_action_guild_move_up().connect(sigc::mem_fun(*this, &Abaddon::ActionMoveGuildUp));
m_main_window->GetChannelList()->signal_action_guild_move_down().connect(sigc::mem_fun(*this, &Abaddon::ActionMoveGuildDown));
m_main_window->GetChannelList()->signal_action_guild_leave().connect(sigc::mem_fun(*this, &Abaddon::ActionLeaveGuild));
m_main_window->GetChatWindow()->signal_action_message_delete().connect(sigc::mem_fun(*this, &Abaddon::ActionChatDeleteMessage));
@@ -155,10 +152,6 @@ void Abaddon::DiscordOnReady() {
m_main_window->UpdateComponents();
}
void Abaddon::DiscordOnChannelListRefresh() {
m_main_window->UpdateChannelListing();
}
void Abaddon::DiscordOnMessageCreate(Snowflake id) {
m_main_window->UpdateChatNewMessage(id);
}
@@ -286,40 +279,6 @@ void Abaddon::ActionJoinGuildDialog() {
}
}
void Abaddon::ActionMoveGuildUp(Snowflake id) {
auto order = m_discord.GetUserSortedGuilds();
// get iter to target
decltype(order)::iterator target_iter;
for (auto it = order.begin(); it != order.end(); it++) {
if (*it == id) {
target_iter = it;
break;
}
}
decltype(order)::iterator left = target_iter - 1;
std::swap(*left, *target_iter);
m_discord.UpdateSettingsGuildPositions(order);
}
void Abaddon::ActionMoveGuildDown(Snowflake id) {
auto order = m_discord.GetUserSortedGuilds();
// get iter to target
decltype(order)::iterator target_iter;
for (auto it = order.begin(); it != order.end(); it++) {
if (*it == id) {
target_iter = it;
break;
}
}
decltype(order)::iterator right = target_iter + 1;
std::swap(*right, *target_iter);
m_discord.UpdateSettingsGuildPositions(order);
}
void Abaddon::ActionChannelOpened(Snowflake id) {
if (id == m_main_window->GetChatActiveChannel()) return;