|
|
@ -474,6 +474,16 @@ void BitcoinGUI::setClientModel(ClientModel *clientModel) |
|
|
|
} |
|
|
|
} |
|
|
|
#endif // ENABLE_WALLET
|
|
|
|
#endif // ENABLE_WALLET
|
|
|
|
unitDisplayControl->setOptionsModel(clientModel->getOptionsModel()); |
|
|
|
unitDisplayControl->setOptionsModel(clientModel->getOptionsModel()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
OptionsModel* optionsModel = clientModel->getOptionsModel(); |
|
|
|
|
|
|
|
if(optionsModel) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
// be aware of the tray icon disable state change reported by the OptionsModel object.
|
|
|
|
|
|
|
|
connect(optionsModel,SIGNAL(hideTrayIconChanged(bool)),this,SLOT(setTrayIconVisible(bool))); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// initialize the disable state of the tray icon with the current value in the model.
|
|
|
|
|
|
|
|
setTrayIconVisible(optionsModel->getHideTrayIcon()); |
|
|
|
|
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
// Disable possibility to show main window via action
|
|
|
|
// Disable possibility to show main window via action
|
|
|
|
toggleHideAction->setEnabled(false); |
|
|
|
toggleHideAction->setEnabled(false); |
|
|
@ -535,7 +545,7 @@ void BitcoinGUI::createTrayIcon(const NetworkStyle *networkStyle) |
|
|
|
QString toolTip = tr("%1 client").arg(tr(PACKAGE_NAME)) + " " + networkStyle->getTitleAddText(); |
|
|
|
QString toolTip = tr("%1 client").arg(tr(PACKAGE_NAME)) + " " + networkStyle->getTitleAddText(); |
|
|
|
trayIcon->setToolTip(toolTip); |
|
|
|
trayIcon->setToolTip(toolTip); |
|
|
|
trayIcon->setIcon(networkStyle->getTrayAndWindowIcon()); |
|
|
|
trayIcon->setIcon(networkStyle->getTrayAndWindowIcon()); |
|
|
|
trayIcon->show(); |
|
|
|
trayIcon->hide(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
notificator = new Notificator(QApplication::applicationName(), trayIcon, this); |
|
|
|
notificator = new Notificator(QApplication::applicationName(), trayIcon, this); |
|
|
@ -1044,6 +1054,14 @@ void BitcoinGUI::showProgress(const QString &title, int nProgress) |
|
|
|
progressDialog->setValue(nProgress); |
|
|
|
progressDialog->setValue(nProgress); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void BitcoinGUI::setTrayIconVisible(bool fHideTrayIcon) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (trayIcon) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
trayIcon->setVisible(!fHideTrayIcon); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static bool ThreadSafeMessageBox(BitcoinGUI *gui, const std::string& message, const std::string& caption, unsigned int style) |
|
|
|
static bool ThreadSafeMessageBox(BitcoinGUI *gui, const std::string& message, const std::string& caption, unsigned int style) |
|
|
|
{ |
|
|
|
{ |
|
|
|
bool modal = (style & CClientUIInterface::MODAL); |
|
|
|
bool modal = (style & CClientUIInterface::MODAL); |
|
|
|