Changeset View
Changeset View
Standalone View
Standalone View
src/qt/bitcoingui.cpp
Show First 20 Lines • Show All 314 Lines • ▼ Show 20 Lines | |||||
#endif // ENABLE_WALLET | #endif // ENABLE_WALLET | ||||
quitAction = new QAction(platformStyle->TextColorIcon(":/icons/quit"), | quitAction = new QAction(platformStyle->TextColorIcon(":/icons/quit"), | ||||
tr("E&xit"), this); | tr("E&xit"), this); | ||||
quitAction->setStatusTip(tr("Quit application")); | quitAction->setStatusTip(tr("Quit application")); | ||||
quitAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q)); | quitAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q)); | ||||
quitAction->setMenuRole(QAction::QuitRole); | quitAction->setMenuRole(QAction::QuitRole); | ||||
aboutAction = new QAction(platformStyle->TextColorIcon(":/icons/about"), | aboutAction = new QAction(platformStyle->TextColorIcon(":/icons/about"), | ||||
tr("&About %1").arg(tr(PACKAGE_NAME)), this); | tr("&About %1").arg(PACKAGE_NAME), this); | ||||
aboutAction->setStatusTip( | aboutAction->setStatusTip( | ||||
tr("Show information about %1").arg(tr(PACKAGE_NAME))); | tr("Show information about %1").arg(PACKAGE_NAME)); | ||||
aboutAction->setMenuRole(QAction::AboutRole); | aboutAction->setMenuRole(QAction::AboutRole); | ||||
aboutAction->setEnabled(false); | aboutAction->setEnabled(false); | ||||
aboutQtAction = | aboutQtAction = | ||||
new QAction(platformStyle->TextColorIcon(":/icons/about_qt"), | new QAction(platformStyle->TextColorIcon(":/icons/about_qt"), | ||||
tr("About &Qt"), this); | tr("About &Qt"), this); | ||||
aboutQtAction->setStatusTip(tr("Show information about Qt")); | aboutQtAction->setStatusTip(tr("Show information about Qt")); | ||||
aboutQtAction->setMenuRole(QAction::AboutQtRole); | aboutQtAction->setMenuRole(QAction::AboutQtRole); | ||||
optionsAction = new QAction(platformStyle->TextColorIcon(":/icons/options"), | optionsAction = new QAction(platformStyle->TextColorIcon(":/icons/options"), | ||||
tr("&Options..."), this); | tr("&Options..."), this); | ||||
optionsAction->setStatusTip( | optionsAction->setStatusTip( | ||||
tr("Modify configuration options for %1").arg(tr(PACKAGE_NAME))); | tr("Modify configuration options for %1").arg(PACKAGE_NAME)); | ||||
optionsAction->setMenuRole(QAction::PreferencesRole); | optionsAction->setMenuRole(QAction::PreferencesRole); | ||||
optionsAction->setEnabled(false); | optionsAction->setEnabled(false); | ||||
toggleHideAction = | toggleHideAction = | ||||
new QAction(platformStyle->TextColorIcon(":/icons/about"), | new QAction(platformStyle->TextColorIcon(":/icons/about"), | ||||
tr("&Show / Hide"), this); | tr("&Show / Hide"), this); | ||||
toggleHideAction->setStatusTip(tr("Show or hide the main Window")); | toggleHideAction->setStatusTip(tr("Show or hide the main Window")); | ||||
encryptWalletAction = | encryptWalletAction = | ||||
▲ Show 20 Lines • Show All 52 Lines • ▼ Show 20 Lines | #endif // ENABLE_WALLET | ||||
showHelpMessageAction = | showHelpMessageAction = | ||||
new QAction(platformStyle->TextColorIcon(":/icons/info"), | new QAction(platformStyle->TextColorIcon(":/icons/info"), | ||||
tr("&Command-line options"), this); | tr("&Command-line options"), this); | ||||
showHelpMessageAction->setMenuRole(QAction::NoRole); | showHelpMessageAction->setMenuRole(QAction::NoRole); | ||||
showHelpMessageAction->setStatusTip( | showHelpMessageAction->setStatusTip( | ||||
tr("Show the %1 help message to get a list with possible Bitcoin " | tr("Show the %1 help message to get a list with possible Bitcoin " | ||||
"command-line options") | "command-line options") | ||||
.arg(tr(PACKAGE_NAME))); | .arg(PACKAGE_NAME)); | ||||
connect(quitAction, &QAction::triggered, qApp, QApplication::quit); | connect(quitAction, &QAction::triggered, qApp, QApplication::quit); | ||||
connect(aboutAction, &QAction::triggered, this, &BitcoinGUI::aboutClicked); | connect(aboutAction, &QAction::triggered, this, &BitcoinGUI::aboutClicked); | ||||
connect(aboutQtAction, &QAction::triggered, qApp, QApplication::aboutQt); | connect(aboutQtAction, &QAction::triggered, qApp, QApplication::aboutQt); | ||||
connect(optionsAction, &QAction::triggered, this, | connect(optionsAction, &QAction::triggered, this, | ||||
&BitcoinGUI::optionsClicked); | &BitcoinGUI::optionsClicked); | ||||
connect(toggleHideAction, &QAction::triggered, this, | connect(toggleHideAction, &QAction::triggered, this, | ||||
&BitcoinGUI::toggleHidden); | &BitcoinGUI::toggleHidden); | ||||
▲ Show 20 Lines • Show All 291 Lines • ▼ Show 20 Lines | |||||
void BitcoinGUI::createTrayIcon() { | void BitcoinGUI::createTrayIcon() { | ||||
assert(QSystemTrayIcon::isSystemTrayAvailable()); | assert(QSystemTrayIcon::isSystemTrayAvailable()); | ||||
#ifndef Q_OS_MAC | #ifndef Q_OS_MAC | ||||
if (QSystemTrayIcon::isSystemTrayAvailable()) { | if (QSystemTrayIcon::isSystemTrayAvailable()) { | ||||
trayIcon = | trayIcon = | ||||
new QSystemTrayIcon(m_network_style->getTrayAndWindowIcon(), this); | new QSystemTrayIcon(m_network_style->getTrayAndWindowIcon(), this); | ||||
QString toolTip = tr("%1 client").arg(tr(PACKAGE_NAME)) + " " + | QString toolTip = tr("%1 client").arg(PACKAGE_NAME) + " " + | ||||
m_network_style->getTitleAddText(); | m_network_style->getTitleAddText(); | ||||
trayIcon->setToolTip(toolTip); | trayIcon->setToolTip(toolTip); | ||||
} | } | ||||
#endif | #endif | ||||
} | } | ||||
void BitcoinGUI::createTrayIconMenu() { | void BitcoinGUI::createTrayIconMenu() { | ||||
#ifndef Q_OS_MAC | #ifndef Q_OS_MAC | ||||
▲ Show 20 Lines • Show All 575 Lines • ▼ Show 20 Lines | if (proxy_enabled) { | ||||
labelProxyIcon->show(); | labelProxyIcon->show(); | ||||
} | } | ||||
} else { | } else { | ||||
labelProxyIcon->hide(); | labelProxyIcon->hide(); | ||||
} | } | ||||
} | } | ||||
void BitcoinGUI::updateWindowTitle() { | void BitcoinGUI::updateWindowTitle() { | ||||
QString window_title = tr(PACKAGE_NAME); | QString window_title = PACKAGE_NAME; | ||||
#ifdef ENABLE_WALLET | #ifdef ENABLE_WALLET | ||||
if (walletFrame) { | if (walletFrame) { | ||||
WalletModel *const wallet_model = walletFrame->currentWalletModel(); | WalletModel *const wallet_model = walletFrame->currentWalletModel(); | ||||
if (wallet_model && !wallet_model->getWalletName().isEmpty()) { | if (wallet_model && !wallet_model->getWalletName().isEmpty()) { | ||||
window_title += " - " + wallet_model->getDisplayName(); | window_title += " - " + wallet_model->getDisplayName(); | ||||
} | } | ||||
} | } | ||||
#endif | #endif | ||||
▲ Show 20 Lines • Show All 172 Lines • Show Last 20 Lines |