Browse Source

Merge pull request #5649

301cd2a Use text-color icons for system tray Send/Receive menu entries (Luke Dashjr)
0.13
Wladimir J. van der Laan 10 years ago
parent
commit
e0cd2f5523
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 20
      src/qt/bitcoingui.cpp
  2. 2
      src/qt/bitcoingui.h

20
src/qt/bitcoingui.cpp

@ -76,12 +76,14 @@ BitcoinGUI::BitcoinGUI(const NetworkStyle *networkStyle, QWidget *parent) :
historyAction(0), historyAction(0),
quitAction(0), quitAction(0),
sendCoinsAction(0), sendCoinsAction(0),
sendCoinsMenuAction(0),
usedSendingAddressesAction(0), usedSendingAddressesAction(0),
usedReceivingAddressesAction(0), usedReceivingAddressesAction(0),
signMessageAction(0), signMessageAction(0),
verifyMessageAction(0), verifyMessageAction(0),
aboutAction(0), aboutAction(0),
receiveCoinsAction(0), receiveCoinsAction(0),
receiveCoinsMenuAction(0),
optionsAction(0), optionsAction(0),
toggleHideAction(0), toggleHideAction(0),
encryptWalletAction(0), encryptWalletAction(0),
@ -256,6 +258,10 @@ void BitcoinGUI::createActions(const NetworkStyle *networkStyle)
sendCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_2)); sendCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_2));
tabGroup->addAction(sendCoinsAction); tabGroup->addAction(sendCoinsAction);
sendCoinsMenuAction = new QAction(TextColorIcon(":/icons/send"), sendCoinsAction->text(), this);
sendCoinsMenuAction->setStatusTip(sendCoinsAction->statusTip());
sendCoinsMenuAction->setToolTip(sendCoinsMenuAction->statusTip());
receiveCoinsAction = new QAction(SingleColorIcon(":/icons/receiving_addresses"), tr("&Receive"), this); receiveCoinsAction = new QAction(SingleColorIcon(":/icons/receiving_addresses"), tr("&Receive"), this);
receiveCoinsAction->setStatusTip(tr("Request payments (generates QR codes and bitcoin: URIs)")); receiveCoinsAction->setStatusTip(tr("Request payments (generates QR codes and bitcoin: URIs)"));
receiveCoinsAction->setToolTip(receiveCoinsAction->statusTip()); receiveCoinsAction->setToolTip(receiveCoinsAction->statusTip());
@ -263,6 +269,10 @@ void BitcoinGUI::createActions(const NetworkStyle *networkStyle)
receiveCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_3)); receiveCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_3));
tabGroup->addAction(receiveCoinsAction); tabGroup->addAction(receiveCoinsAction);
receiveCoinsMenuAction = new QAction(TextColorIcon(":/icons/receiving_addresses"), receiveCoinsAction->text(), this);
receiveCoinsMenuAction->setStatusTip(receiveCoinsAction->statusTip());
receiveCoinsMenuAction->setToolTip(receiveCoinsMenuAction->statusTip());
historyAction = new QAction(SingleColorIcon(":/icons/history"), tr("&Transactions"), this); historyAction = new QAction(SingleColorIcon(":/icons/history"), tr("&Transactions"), this);
historyAction->setStatusTip(tr("Browse transaction history")); historyAction->setStatusTip(tr("Browse transaction history"));
historyAction->setToolTip(historyAction->statusTip()); historyAction->setToolTip(historyAction->statusTip());
@ -277,8 +287,12 @@ void BitcoinGUI::createActions(const NetworkStyle *networkStyle)
connect(overviewAction, SIGNAL(triggered()), this, SLOT(gotoOverviewPage())); connect(overviewAction, SIGNAL(triggered()), this, SLOT(gotoOverviewPage()));
connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(gotoSendCoinsPage())); connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(gotoSendCoinsPage()));
connect(sendCoinsMenuAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
connect(sendCoinsMenuAction, SIGNAL(triggered()), this, SLOT(gotoSendCoinsPage()));
connect(receiveCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(receiveCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
connect(receiveCoinsAction, SIGNAL(triggered()), this, SLOT(gotoReceiveCoinsPage())); connect(receiveCoinsAction, SIGNAL(triggered()), this, SLOT(gotoReceiveCoinsPage()));
connect(receiveCoinsMenuAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
connect(receiveCoinsMenuAction, SIGNAL(triggered()), this, SLOT(gotoReceiveCoinsPage()));
connect(historyAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(historyAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
connect(historyAction, SIGNAL(triggered()), this, SLOT(gotoHistoryPage())); connect(historyAction, SIGNAL(triggered()), this, SLOT(gotoHistoryPage()));
#endif // ENABLE_WALLET #endif // ENABLE_WALLET
@ -475,7 +489,9 @@ void BitcoinGUI::setWalletActionsEnabled(bool enabled)
{ {
overviewAction->setEnabled(enabled); overviewAction->setEnabled(enabled);
sendCoinsAction->setEnabled(enabled); sendCoinsAction->setEnabled(enabled);
sendCoinsMenuAction->setEnabled(enabled);
receiveCoinsAction->setEnabled(enabled); receiveCoinsAction->setEnabled(enabled);
receiveCoinsMenuAction->setEnabled(enabled);
historyAction->setEnabled(enabled); historyAction->setEnabled(enabled);
encryptWalletAction->setEnabled(enabled); encryptWalletAction->setEnabled(enabled);
backupWalletAction->setEnabled(enabled); backupWalletAction->setEnabled(enabled);
@ -522,8 +538,8 @@ void BitcoinGUI::createTrayIconMenu()
// Configuration of the tray icon (or dock icon) icon menu // Configuration of the tray icon (or dock icon) icon menu
trayIconMenu->addAction(toggleHideAction); trayIconMenu->addAction(toggleHideAction);
trayIconMenu->addSeparator(); trayIconMenu->addSeparator();
trayIconMenu->addAction(sendCoinsAction); trayIconMenu->addAction(sendCoinsMenuAction);
trayIconMenu->addAction(receiveCoinsAction); trayIconMenu->addAction(receiveCoinsMenuAction);
trayIconMenu->addSeparator(); trayIconMenu->addSeparator();
trayIconMenu->addAction(signMessageAction); trayIconMenu->addAction(signMessageAction);
trayIconMenu->addAction(verifyMessageAction); trayIconMenu->addAction(verifyMessageAction);

2
src/qt/bitcoingui.h

@ -90,12 +90,14 @@ private:
QAction *historyAction; QAction *historyAction;
QAction *quitAction; QAction *quitAction;
QAction *sendCoinsAction; QAction *sendCoinsAction;
QAction *sendCoinsMenuAction;
QAction *usedSendingAddressesAction; QAction *usedSendingAddressesAction;
QAction *usedReceivingAddressesAction; QAction *usedReceivingAddressesAction;
QAction *signMessageAction; QAction *signMessageAction;
QAction *verifyMessageAction; QAction *verifyMessageAction;
QAction *aboutAction; QAction *aboutAction;
QAction *receiveCoinsAction; QAction *receiveCoinsAction;
QAction *receiveCoinsMenuAction;
QAction *optionsAction; QAction *optionsAction;
QAction *toggleHideAction; QAction *toggleHideAction;
QAction *encryptWalletAction; QAction *encryptWalletAction;

Loading…
Cancel
Save