mirror of
https://github.com/celisej567/abaddon.git
synced 2026-09-06 20:15:19 +03:00
Merge branch 'master' into tabs
This commit is contained in:
@@ -81,7 +81,7 @@ Latest release version: https://github.com/uowuo/abaddon/releases/latest
|
||||
|
||||
**CI:**
|
||||
|
||||
- Windows: [here](https://nightly.link/uowuo/abaddon/workflows/ci/master/build-windows-RelWithDebInfo.zip)
|
||||
- Windows: [here](https://nightly.link/uowuo/abaddon/workflows/ci/master/build-windows-msys2-MinSizeRel.zip)
|
||||
- MacOS: [here](https://nightly.link/uowuo/abaddon/workflows/ci/master/build-macos-RelWithDebInfo.zip) unsigned,
|
||||
unpackaged, requires gtkmm3 (e.g. from homebrew)
|
||||
- Linux: [here](https://nightly.link/uowuo/abaddon/workflows/ci/master/build-linux-MinSizeRel.zip) unpackaged (for now),
|
||||
|
||||
@@ -164,6 +164,8 @@ int Abaddon::StartGTK() {
|
||||
|
||||
m_gtk_app->signal_shutdown().connect(sigc::mem_fun(*this, &Abaddon::OnShutdown), false);
|
||||
|
||||
m_main_window->UpdateMenus();
|
||||
|
||||
m_main_window->show();
|
||||
return m_gtk_app->run(*m_main_window);
|
||||
}
|
||||
@@ -183,11 +185,13 @@ void Abaddon::LoadFromSettings() {
|
||||
|
||||
void Abaddon::StartDiscord() {
|
||||
m_discord.Start();
|
||||
m_main_window->UpdateMenus();
|
||||
}
|
||||
|
||||
void Abaddon::StopDiscord() {
|
||||
m_discord.Stop();
|
||||
SaveState();
|
||||
m_main_window->UpdateMenus();
|
||||
}
|
||||
|
||||
bool Abaddon::IsDiscordActive() const {
|
||||
@@ -545,6 +549,7 @@ void Abaddon::ActionSetToken() {
|
||||
m_main_window->UpdateComponents();
|
||||
GetSettings().DiscordToken = m_discord_token;
|
||||
}
|
||||
m_main_window->UpdateMenus();
|
||||
}
|
||||
|
||||
void Abaddon::ActionJoinGuildDialog() {
|
||||
@@ -605,6 +610,8 @@ void Abaddon::ActionChannelOpened(Snowflake id) {
|
||||
ShowGuildVerificationGateDialog(*channel->GuildID);
|
||||
}
|
||||
}
|
||||
|
||||
m_main_window->UpdateMenus();
|
||||
}
|
||||
|
||||
void Abaddon::ActionChatLoadHistory(Snowflake id) {
|
||||
|
||||
@@ -148,6 +148,11 @@ void MainWindow::UpdateChatReactionRemove(Snowflake id, const Glib::ustring &par
|
||||
m_chat.UpdateReactions(id);
|
||||
}
|
||||
|
||||
void MainWindow::UpdateMenus() {
|
||||
OnDiscordSubmenuPopup();
|
||||
OnViewSubmenuPopup();
|
||||
}
|
||||
|
||||
void MainWindow::OnDiscordSubmenuPopup() {
|
||||
auto &discord = Abaddon::Get().GetDiscordClient();
|
||||
auto channel_id = GetChatActiveChannel();
|
||||
@@ -243,12 +248,6 @@ void MainWindow::SetupMenu() {
|
||||
m_menu_bar.append(m_menu_view);
|
||||
m_menu_bar.show_all();
|
||||
|
||||
m_menu_bar.signal_event().connect([this](GdkEvent *ev) -> bool {
|
||||
OnViewSubmenuPopup();
|
||||
OnDiscordSubmenuPopup();
|
||||
return false;
|
||||
});
|
||||
|
||||
m_menu_discord_connect.signal_activate().connect([this] {
|
||||
m_signal_action_connect.emit();
|
||||
});
|
||||
|
||||
@@ -23,6 +23,7 @@ public:
|
||||
Snowflake GetChatOldestListedMessage();
|
||||
void UpdateChatReactionAdd(Snowflake id, const Glib::ustring ¶m);
|
||||
void UpdateChatReactionRemove(Snowflake id, const Glib::ustring ¶m);
|
||||
void UpdateMenus();
|
||||
|
||||
ChannelList *GetChannelList();
|
||||
ChatWindow *GetChatWindow();
|
||||
|
||||
Reference in New Issue
Block a user