From a78fdd386f93db366d7327aa736624ad8bc1aa6f Mon Sep 17 00:00:00 2001 From: KnightMurloc <44520059+KnightMurloc@users.noreply.github.com> Date: Fri, 9 Sep 2022 12:03:55 +0700 Subject: add opt-in hide to system tray icon (#99) --- src/abaddon.hpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/abaddon.hpp') diff --git a/src/abaddon.hpp b/src/abaddon.hpp index ab80c46..b067324 100644 --- a/src/abaddon.hpp +++ b/src/abaddon.hpp @@ -117,6 +117,8 @@ protected: Gtk::MenuItem *m_user_menu_roles; Gtk::MenuItem *m_user_menu_remove_recipient; Gtk::Menu *m_user_menu_roles_submenu; + Gtk::Menu *m_tray_menu; + Gtk::MenuItem *m_tray_exit; void on_user_menu_insert_mention(); void on_user_menu_ban(); @@ -124,6 +126,10 @@ protected: void on_user_menu_copy_id(); void on_user_menu_open_dm(); void on_user_menu_remove_recipient(); + void on_tray_click(); + void on_tray_popup_menu(int button, int activate_time); + void on_tray_menu_click(); + void on_window_hide(); private: SettingsManager m_settings; @@ -142,5 +148,6 @@ private: Glib::RefPtr m_gtk_app; Glib::RefPtr m_css_provider; Glib::RefPtr m_css_low_provider; // registered with a lower priority to allow better customization - std::unique_ptr m_main_window; // wah wah cant create a gtkstylecontext fuck you + Glib::RefPtr m_tray; + std::unique_ptr m_main_window; // wah wah cant create a gtkstylecontext fuck you }; -- cgit v1.2.3