@ -89,6 +89,7 @@ BitcoinGUI::BitcoinGUI(bool fIsTestnet, QWidget *parent) :
openAction ( 0 ) ,
openAction ( 0 ) ,
showHelpMessageAction ( 0 ) ,
showHelpMessageAction ( 0 ) ,
trayIcon ( 0 ) ,
trayIcon ( 0 ) ,
trayIconMenu ( 0 ) ,
notificator ( 0 ) ,
notificator ( 0 ) ,
rpcConsole ( 0 ) ,
rpcConsole ( 0 ) ,
prevBlocks ( 0 ) ,
prevBlocks ( 0 ) ,
@ -449,8 +450,12 @@ void BitcoinGUI::setClientModel(ClientModel *clientModel)
walletFrame - > setClientModel ( clientModel ) ;
walletFrame - > setClientModel ( clientModel ) ;
}
}
# endif
# endif
unitDisplayControl - > setOptionsModel ( clientModel - > getOptionsModel ( ) ) ;
this - > unitDisplayControl - > setOptionsModel ( clientModel - > getOptionsModel ( ) ) ;
} else {
// Disable possibility to show main window via action
toggleHideAction - > setEnabled ( false ) ;
// Disable context menu on tray icon
trayIconMenu - > clear ( ) ;
}
}
}
}
@ -519,7 +524,6 @@ void BitcoinGUI::createTrayIcon(bool fIsTestnet)
void BitcoinGUI : : createTrayIconMenu ( )
void BitcoinGUI : : createTrayIconMenu ( )
{
{
QMenu * trayIconMenu ;
# ifndef Q_OS_MAC
# ifndef Q_OS_MAC
// return if trayIcon is unset (only on non-Mac OSes)
// return if trayIcon is unset (only on non-Mac OSes)
if ( ! trayIcon )
if ( ! trayIcon )
@ -560,7 +564,7 @@ void BitcoinGUI::trayIconActivated(QSystemTrayIcon::ActivationReason reason)
if ( reason = = QSystemTrayIcon : : Trigger )
if ( reason = = QSystemTrayIcon : : Trigger )
{
{
// Click on system tray icon triggers show/hide of the main window
// Click on system tray icon triggers show/hide of the main window
toggleHideActio n - > trigger ( ) ;
toggleHidd en ( ) ;
}
}
}
}
# endif
# endif
@ -946,6 +950,7 @@ void BitcoinGUI::showNormalIfMinimized(bool fToggleHidden)
{
{
if ( ! clientModel )
if ( ! clientModel )
return ;
return ;
// activateWindow() (sometimes) helps with keyboard focus on Windows
// activateWindow() (sometimes) helps with keyboard focus on Windows
if ( isHidden ( ) )
if ( isHidden ( ) )
{
{