mirror of
https://github.com/dashpay/dash.git
synced 2024-12-28 13:32:47 +01:00
Merge pull request #335 from crowning-/v0.12.0.x
Open "Peers list" page when clicking on connections icon in status bar
This commit is contained in:
commit
d9778e35e1
9
src/qt/bitcoingui.cpp
Executable file → Normal file
9
src/qt/bitcoingui.cpp
Executable file → Normal file
@ -175,7 +175,10 @@ BitcoinGUI::BitcoinGUI(const NetworkStyle *networkStyle, QWidget *parent) :
|
|||||||
frameBlocksLayout->setSpacing(3);
|
frameBlocksLayout->setSpacing(3);
|
||||||
unitDisplayControl = new UnitDisplayStatusBarControl();
|
unitDisplayControl = new UnitDisplayStatusBarControl();
|
||||||
labelEncryptionIcon = new QLabel();
|
labelEncryptionIcon = new QLabel();
|
||||||
labelConnectionsIcon = new QLabel();
|
labelConnectionsIcon = new QPushButton();
|
||||||
|
labelConnectionsIcon->setFlat(true); // Make the button look like a label, but clickable
|
||||||
|
labelConnectionsIcon->setStyleSheet(".QPushButton { background-color: rgba(255, 255, 255, 0);}");
|
||||||
|
labelConnectionsIcon->setMaximumSize(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE);
|
||||||
labelBlocksIcon = new QLabel();
|
labelBlocksIcon = new QLabel();
|
||||||
if(enableWallet)
|
if(enableWallet)
|
||||||
{
|
{
|
||||||
@ -216,6 +219,7 @@ BitcoinGUI::BitcoinGUI(const NetworkStyle *networkStyle, QWidget *parent) :
|
|||||||
connect(openPeersAction, SIGNAL(triggered()), rpcConsole, SLOT(showPeers()));
|
connect(openPeersAction, SIGNAL(triggered()), rpcConsole, SLOT(showPeers()));
|
||||||
connect(openConfEditorAction, SIGNAL(triggered()), rpcConsole, SLOT(showConfEditor()));
|
connect(openConfEditorAction, SIGNAL(triggered()), rpcConsole, SLOT(showConfEditor()));
|
||||||
connect(showBackupsAction, SIGNAL(triggered()), rpcConsole, SLOT(showBackups()));
|
connect(showBackupsAction, SIGNAL(triggered()), rpcConsole, SLOT(showBackups()));
|
||||||
|
connect(labelConnectionsIcon, SIGNAL(clicked()), rpcConsole, SLOT(showPeers()));
|
||||||
|
|
||||||
// prevents an open debug window from becoming stuck/unusable on client shutdown
|
// prevents an open debug window from becoming stuck/unusable on client shutdown
|
||||||
connect(quitAction, SIGNAL(triggered()), rpcConsole, SLOT(hide()));
|
connect(quitAction, SIGNAL(triggered()), rpcConsole, SLOT(hide()));
|
||||||
@ -700,7 +704,8 @@ void BitcoinGUI::setNumConnections(int count)
|
|||||||
case 7: case 8: case 9: icon = ":/icons/connect_3"; break;
|
case 7: case 8: case 9: icon = ":/icons/connect_3"; break;
|
||||||
default: icon = ":/icons/connect_4"; break;
|
default: icon = ":/icons/connect_4"; break;
|
||||||
}
|
}
|
||||||
labelConnectionsIcon->setPixmap(QIcon(icon).pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
|
QIcon connectionItem = QIcon(icon).pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE);
|
||||||
|
labelConnectionsIcon->setIcon(connectionItem);
|
||||||
labelConnectionsIcon->setToolTip(tr("%n active connection(s) to Dash network", "", count));
|
labelConnectionsIcon->setToolTip(tr("%n active connection(s) to Dash network", "", count));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
3
src/qt/bitcoingui.h
Executable file → Normal file
3
src/qt/bitcoingui.h
Executable file → Normal file
@ -16,6 +16,7 @@
|
|||||||
#include <QMap>
|
#include <QMap>
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QPoint>
|
#include <QPoint>
|
||||||
|
#include <QPushButton>
|
||||||
#include <QSystemTrayIcon>
|
#include <QSystemTrayIcon>
|
||||||
|
|
||||||
class ClientModel;
|
class ClientModel;
|
||||||
@ -79,7 +80,7 @@ private:
|
|||||||
|
|
||||||
UnitDisplayStatusBarControl *unitDisplayControl;
|
UnitDisplayStatusBarControl *unitDisplayControl;
|
||||||
QLabel *labelEncryptionIcon;
|
QLabel *labelEncryptionIcon;
|
||||||
QLabel *labelConnectionsIcon;
|
QPushButton *labelConnectionsIcon;
|
||||||
QLabel *labelBlocksIcon;
|
QLabel *labelBlocksIcon;
|
||||||
QLabel *progressBarLabel;
|
QLabel *progressBarLabel;
|
||||||
QProgressBar *progressBar;
|
QProgressBar *progressBar;
|
||||||
|
Loading…
Reference in New Issue
Block a user