Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added the ability to hide the program window in the tray. #99

Merged
merged 5 commits into from
Sep 9, 2022

Conversation

KnightMurloc
Copy link
Contributor

the ability to hide the application in the tray as well as a menu item with a setting to disable this feature.

src/settings.cpp Outdated
@@ -48,6 +48,7 @@ void SettingsManager::ReadSettings() {
SMBOOL("gui", "save_state", SaveState);
SMBOOL("gui", "stock_emojis", ShowStockEmojis);
SMBOOL("gui", "unreads", Unreads);
SMBOOL("gui", "HideToTray", HideToTray);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
SMBOOL("gui", "HideToTray", HideToTray);
SMBOOL("gui", "hide_to_tray", HideToTray);

for consistency with the other settings names

src/settings.cpp Outdated
@@ -101,6 +102,7 @@ void SettingsManager::Close() {
SMBOOL("gui", "save_state", SaveState);
SMBOOL("gui", "stock_emojis", ShowStockEmojis);
SMBOOL("gui", "unreads", Unreads);
SMBOOL("gui", "HideToTray", HideToTray);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
SMBOOL("gui", "HideToTray", HideToTray);
SMBOOL("gui", "hide_to_tray", HideToTray);

src/abaddon.cpp Outdated
Comment on lines 254 to 255
m_tray->signal_activate().connect(sigc::mem_fun(this, &Abaddon::on_tray_click));
m_tray->signal_popup_menu().connect(sigc::mem_fun(this, &Abaddon::on_tray_popup_menu));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
m_tray->signal_activate().connect(sigc::mem_fun(this, &Abaddon::on_tray_click));
m_tray->signal_popup_menu().connect(sigc::mem_fun(this, &Abaddon::on_tray_popup_menu));
m_tray->signal_activate().connect(sigc::mem_fun(*this, &Abaddon::on_tray_click));
m_tray->signal_popup_menu().connect(sigc::mem_fun(*this, &Abaddon::on_tray_popup_menu));

src/abaddon.cpp Outdated
m_tray_menu = Gtk::make_managed<Gtk::Menu>();
m_tray_exit = Gtk::make_managed<Gtk::MenuItem>("exit",false);

m_tray_exit->signal_activate().connect(sigc::mem_fun(this, &Abaddon::on_tray_menu_click));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
m_tray_exit->signal_activate().connect(sigc::mem_fun(this, &Abaddon::on_tray_menu_click));
m_tray_exit->signal_activate().connect(sigc::mem_fun(*this, &Abaddon::on_tray_menu_click));

src/abaddon.cpp Outdated

m_main_window->signal_hide().connect(sigc::mem_fun(this, &Abaddon::on_window_hide));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
m_main_window->signal_hide().connect(sigc::mem_fun(this, &Abaddon::on_window_hide));
m_main_window->signal_hide().connect(sigc::mem_fun(*this, &Abaddon::on_window_hide));

src/abaddon.cpp Outdated
Comment on lines 926 to 927
m_tray->signal_activate().connect(sigc::mem_fun(this,&Abaddon::on_tray_click));
m_tray->signal_popup_menu().connect(sigc::mem_fun(this,&Abaddon::on_tray_popup_menu));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
m_tray->signal_activate().connect(sigc::mem_fun(this,&Abaddon::on_tray_click));
m_tray->signal_popup_menu().connect(sigc::mem_fun(this,&Abaddon::on_tray_popup_menu));
m_tray->signal_activate().connect(sigc::mem_fun(*this,&Abaddon::on_tray_click));
m_tray->signal_popup_menu().connect(sigc::mem_fun(*this,&Abaddon::on_tray_popup_menu));

src/abaddon.cpp Outdated
m_tray->signal_popup_menu().connect(sigc::mem_fun(this, &Abaddon::on_tray_popup_menu));
}
m_tray_menu = Gtk::make_managed<Gtk::Menu>();
m_tray_exit = Gtk::make_managed<Gtk::MenuItem>("exit",false);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
m_tray_exit = Gtk::make_managed<Gtk::MenuItem>("exit",false);
m_tray_exit = Gtk::make_managed<Gtk::MenuItem>("Quit",false);

@ouwou
Copy link
Member

ouwou commented Aug 12, 2022

apart from those suggestions i would remove the settings menu since it should be a proper menu with all settings which is out of scope for this. and then run clang-format

src/settings.hpp Outdated Show resolved Hide resolved
@ouwou ouwou merged commit a78fdd3 into uowuo:master Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants