mirror of
https://github.com/uowuo/abaddon.git
synced 2024-11-10 06:00:10 +00:00
Merge branch 'master' into voice
This commit is contained in:
commit
80a146350e
Binary file not shown.
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 1.1 KiB |
@ -286,6 +286,8 @@ int Abaddon::StartGTK() {
|
||||
m_main_window->GetChatWindow()->signal_action_reaction_remove().connect(sigc::mem_fun(*this, &Abaddon::ActionReactionRemove));
|
||||
|
||||
ActionReloadCSS();
|
||||
AttachCSSMonitor();
|
||||
|
||||
if (m_settings.GetSettings().HideToTray) {
|
||||
m_tray = Gtk::StatusIcon::create("discord");
|
||||
m_tray->signal_activate().connect(sigc::mem_fun(*this, &Abaddon::on_tray_click));
|
||||
@ -719,6 +721,15 @@ void Abaddon::LoadState() {
|
||||
}
|
||||
}
|
||||
|
||||
void Abaddon::AttachCSSMonitor() {
|
||||
const auto path = GetCSSPath("/" + GetSettings().MainCSS);
|
||||
const auto file = Gio::File::create_for_path(path);
|
||||
m_main_css_monitor = file->monitor_file();
|
||||
m_main_css_monitor->signal_changed().connect([this](const auto &file, const auto &other_file, Gio::FileMonitorEvent event) {
|
||||
ActionReloadCSS();
|
||||
});
|
||||
}
|
||||
|
||||
void Abaddon::ManageHeapWindow(Gtk::Window *window) {
|
||||
window->signal_hide().connect([this, window]() {
|
||||
delete window;
|
||||
|
@ -129,6 +129,9 @@ protected:
|
||||
void SaveState();
|
||||
void LoadState();
|
||||
|
||||
void AttachCSSMonitor();
|
||||
Glib::RefPtr<Gio::FileMonitor> m_main_css_monitor;
|
||||
|
||||
Snowflake m_shown_user_menu_id;
|
||||
Snowflake m_shown_user_menu_guild_id;
|
||||
|
||||
|
@ -542,7 +542,7 @@ void from_json(const nlohmann::json &j, VerificationFieldObject &m) {
|
||||
}
|
||||
|
||||
void from_json(const nlohmann::json &j, VerificationGateInfoObject &m) {
|
||||
JS_O("description", m.Description);
|
||||
JS_ON("description", m.Description);
|
||||
JS_O("form_fields", m.VerificationFields);
|
||||
JS_O("version", m.Version);
|
||||
JS_O("enabled", m.Enabled);
|
||||
|
Loading…
Reference in New Issue
Block a user