@@ -76,7 +76,8 @@ BitcoinGUI::BitcoinGUI(interfaces::Node& node, const PlatformStyle *_platformSty
7676 QMainWindow(parent),
7777 m_node(node),
7878 trayIconMenu{new QMenu ()},
79- platformStyle (_platformStyle)
79+ platformStyle (_platformStyle),
80+ m_network_style(networkStyle)
8081{
8182 QSettings settings;
8283 if (!restoreGeometry (settings.value (" MainWindowGeometry" ).toByteArray ())) {
@@ -94,9 +95,9 @@ BitcoinGUI::BitcoinGUI(interfaces::Node& node, const PlatformStyle *_platformSty
9495 } else {
9596 windowTitle += tr (" Node" );
9697 }
97- windowTitle += " " + networkStyle ->getTitleAddText ();
98- QApplication::setWindowIcon (networkStyle ->getTrayAndWindowIcon ());
99- setWindowIcon (networkStyle ->getTrayAndWindowIcon ());
98+ windowTitle += " " + m_network_style ->getTitleAddText ();
99+ QApplication::setWindowIcon (m_network_style ->getTrayAndWindowIcon ());
100+ setWindowIcon (m_network_style ->getTrayAndWindowIcon ());
100101 setWindowTitle (windowTitle);
101102
102103 rpcConsole = new RPCConsole (node, _platformStyle, nullptr );
@@ -132,7 +133,7 @@ BitcoinGUI::BitcoinGUI(interfaces::Node& node, const PlatformStyle *_platformSty
132133
133134 // Create system tray icon and notification
134135 if (QSystemTrayIcon::isSystemTrayAvailable ()) {
135- createTrayIcon (networkStyle );
136+ createTrayIcon ();
136137 }
137138 notificator = new Notificator (QApplication::applicationName (), trayIcon, this );
138139
@@ -639,14 +640,14 @@ void BitcoinGUI::setWalletActionsEnabled(bool enabled)
639640 openAction->setEnabled (enabled);
640641}
641642
642- void BitcoinGUI::createTrayIcon (const NetworkStyle *networkStyle )
643+ void BitcoinGUI::createTrayIcon ()
643644{
644645 assert (QSystemTrayIcon::isSystemTrayAvailable ());
645646
646647#ifndef Q_OS_MAC
647648 if (QSystemTrayIcon::isSystemTrayAvailable ()) {
648- trayIcon = new QSystemTrayIcon (networkStyle ->getTrayAndWindowIcon (), this );
649- QString toolTip = tr (" %1 client" ).arg (tr (PACKAGE_NAME)) + " " + networkStyle ->getTitleAddText ();
649+ trayIcon = new QSystemTrayIcon (m_network_style ->getTrayAndWindowIcon (), this );
650+ QString toolTip = tr (" %1 client" ).arg (tr (PACKAGE_NAME)) + " " + m_network_style ->getTitleAddText ();
650651 trayIcon->setToolTip (toolTip);
651652 }
652653#endif
0 commit comments