Qt: Add option to hide the system tray icon

My changes leave all tray icon and menu creation/initialization logic
untouched. It only shows or hides the icon according to the setting.

A new checkbox was added to the OptionsDialog under the Window tab. A
bool option named "hideTrayIcon" was added to OptionsModel. This
checkbox was mapped like other all options to the OptionsModel.

A signal was added to the OptionsModel for broadcasting changes the the
hideTrayIcon option. This signal was connected to a new slot added to
BitcoinGUI named setTrayIconVisible(bool). The slot simply hides or
shows the trayIcon in BitcoinGUI according to the parameter recieved.
This commit is contained in:
Tyler Hardin
2016-05-11 22:28:02 -04:00
committed by lateminer
parent 89e8cc64bd
commit f50bfbf7fe
7 changed files with 65 additions and 2 deletions

View File

@@ -504,6 +504,16 @@
<string>&amp;Window</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_Window">
<item>
<widget class="QCheckBox" name="hideTrayIcon">
<property name="toolTip">
<string>&amp;Hide the icon from the system tray.</string>
</property>
<property name="text">
<string>Hide tray icon</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="minimizeToTray">
<property name="toolTip">