Minimizing to tray should only be possible on Windows. Therefore, on non-Winodws systems the tray icon and related settings are hidden, the related option variables are set to predefined values. Furthermore, not used entries are removed from the configuration files at initialization. See also discussions in PR #11859
Qt: Minimize to tray functionality only on Windows #12054
pull vajdaz wants to merge 2 commits into bitcoin:master from vajdaz:win-only-tray changing 2 files +15 −0-
vajdaz commented at 10:51 AM on December 30, 2017: none
-
2972b1ef46
Minimize to tray functionality only on Windows
Minimizing to tray should only be possible on Windows. Therefore, on non-Winodws systems the tray icon and related settings are hidden, the related option variables are set to predefined values. Furthermore, not used entries are removed from the configuration files at initialization. Please enter the commit message for your changes. Lines starting
- laanwj added the label GUI on Dec 30, 2017
- fanquake added the label Windows on Dec 30, 2017
- vajdaz renamed this:
Minimize to tray functionality only on Windows
Qt: Minimize to tray functionality only on Windows
on Dec 30, 2017 -
Do not remove unused settings from the settings file d54e033294
-
in src/qt/optionsmodel.cpp:74 in 2972b1ef46 outdated
65 | @@ -64,6 +66,15 @@ void OptionsModel::Init(bool resetSettings) 66 | if (!settings.contains("fMinimizeToTray")) 67 | settings.setValue("fMinimizeToTray", false); 68 | fMinimizeToTray = settings.value("fMinimizeToTray").toBool() && !fHideTrayIcon; 69 | +#else 70 | + // On systems without tray icon functionality we set some default values 71 | + // and remove settings from previous versions of the software to not 72 | + // confuse people looking into the .config or .plist file. 73 | + fHideTrayIcon = true; 74 | + settings.remove("fHideTrayIcon");
laanwj commented at 8:00 AM on January 3, 2018:Yes I agree, this makes it possible to upgrade/downgrade without losing settings.
laanwj commented at 8:47 AM on January 3, 2018: memberutACK, needs testing on Windows/Linux I suppose.
kristapsk commented at 1:35 PM on January 4, 2018: contributorWhy? Minimize to tray works for me on Xfce4.
vajdaz commented at 11:16 PM on January 4, 2018: noneOn some desktop environments (Xfce4 or KDE for example) minimizing to tray works. Howerver, on other ones (GNOME or Unity for example) there is no system tray. On those desktop environments the user loses visual reference to the application when minimizing to tray (the application "disappears", still running in the background). Linux desktop environments seem not to be universal in the implementation of this feature. Discussions in PR #11859 lead to the idea of removing the "minimize to tray" functionality (at least on non-Windows systems).
ryanofsky commented at 11:52 PM on January 4, 2018: memberHowerver, on other ones (GNOME or Unity for example) there is no system tray.
System tray icon shows up for me with gnome 3.24.2, qt-5.9.3, current master. (It shows up on the bottom left in a little slide out-tray next to hexchat and deluge icons.)
vajdaz commented at 12:48 AM on January 5, 2018: none"Legacy system tray" has been removed in GNOME 3.26. https://bugzilla.gnome.org/show_bug.cgi?id=785956
laanwj commented at 9:54 AM on January 5, 2018: memberI've heard of issues with Xfce4 too. The icon appears initially, but seems to randomly disappear. Normally that's not that bad, but it is if it is the only way to get the window back (which is what this option enables). The systray situation on Linux is very unreliable.
kristapsk commented at 11:32 AM on January 5, 2018: contributorI'm using it all the time under Xfce4 this way, can't remember having any issues. Bitcoin wallet is not the piece of software I want to pollute my anyway full taskbars with (as it's something that runs in background and I don't need to switch to it so often).
Anyway, I'm Gentoo user, where everything is source based anyway, so, if this patch gets applied, I will anyway add my own extra patch on top of the release sources to get this functionality back.
laanwj commented at 1:42 PM on January 5, 2018: memberLooking at the replies, one guess would be that this is mostly a problem with the pre-built binaries (which link Qt statically), and less when building from source against a Qt5 tuned for the specific environment.
ryanofsky commented at 2:04 PM on January 5, 2018: memberIt's unclear why this is implemented using a compile time macro rather than calling QSystemTrayIcon::isSystemTrayAvailable or something at runtime.
I think if this feature is going to be disabled, there should at least be a proper bug report about where the problem is occurring so it can be revisited in the future. vajdaz seems to be a windows user, not a gnome or unity user. I use gnome and use tray icons and haven't had a problem with them.
laanwj commented at 2:06 PM on January 5, 2018: memberClosing this for now, seems to be no agreement to do this.
laanwj closed this on Jan 5, 2018DrahtBot locked this on Sep 8, 2021
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-14 00:15 UTC
More mirrored repositories can be found on mirror.b10c.me