@@ -380,15 +380,33 @@ void SHIELDGUI::createActions()
380380
381381 openRPCConsoleAction = new QAction (platformStyle->TextColorIcon (" :/icons/debugwindow" ), tr (" &Debug window" ), this );
382382 openRPCConsoleAction->setStatusTip (tr (" Open debugging and diagnostic console" ));
383- // initially disable the debug window menu item
383+ openInfoAction = new QAction (platformStyle->TextColorIcon (" :/icons/info" ), tr (" &Information" ), this );
384+ openInfoAction->setStatusTip (tr (" Show diagnostic information" ));
385+ openGraphAction = new QAction (QIcon (" :/icons/connect_4" ), tr (" &Network Monitor" ), this );
386+ openGraphAction->setStatusTip (tr (" Show network monitor" ));
387+ openPeersAction = new QAction (QIcon (" :/icons/connect_4" ), tr (" &Peers list" ), this );
388+ openPeersAction->setStatusTip (tr (" Show peers info" ));
389+ // openRepairAction = new QAction(QIcon(":/icons/tx_mined"), tr("Wallet &Repair"), this);
390+ // openRepairAction->setStatusTip(tr("Show wallet repair options"));
391+ openConfEditorAction = new QAction (QIcon (" :/icons/edit" ), tr (" Open &Configuration File" ), this );
392+ openConfEditorAction->setStatusTip (tr (" Open the %1 configuration file from the working directory" ).arg (tr (PACKAGE_NAME)));
393+ // openMNConfEditorAction = new QAction(QIcon(":/icons/edit"), tr("Open &Masternode Configuration File"), this);
394+ // openMNConfEditorAction->setStatusTip(tr("Open Masternode configuration file"));
395+ showDatadirAction = new QAction (QIcon (" :/icons/open" ), tr (" Open Data &Folder" ), this );
396+ showDatadirAction->setStatusTip (tr (" Open the %1 working directory" ).arg (tr (PACKAGE_NAME)));
397+ // initially disable the debug window menu items
398+ openInfoAction->setEnabled (false );
384399 openRPCConsoleAction->setEnabled (false );
400+ openGraphAction->setEnabled (false );
401+ openPeersAction->setEnabled (false );
402+ // openRepairAction->setEnabled(false);
385403
386404 usedSendingAddressesAction = new QAction (platformStyle->TextColorIcon (" :/icons/address-book" ), tr (" &Sending addresses..." ), this );
387405 usedSendingAddressesAction->setStatusTip (tr (" Show the list of used sending addresses and labels" ));
388406 usedReceivingAddressesAction = new QAction (platformStyle->TextColorIcon (" :/icons/address-book" ), tr (" &Receiving addresses..." ), this );
389407 usedReceivingAddressesAction->setStatusTip (tr (" Show the list of used receiving addresses and labels" ));
390408
391- openAction = new QAction (platformStyle->TextColorIcon (" :/icons/open " ), tr (" Open &URI..." ), this );
409+ openAction = new QAction (platformStyle->TextColorIcon (" :/icons/editpaste " ), tr (" Open &URI..." ), this );
392410 openAction->setStatusTip (tr (" Open a shield: URI or payment request" ));
393411
394412 showHelpMessageAction = new QAction (platformStyle->TextColorIcon (" :/icons/info" ), tr (" &Command-line options" ), this );
@@ -401,7 +419,18 @@ void SHIELDGUI::createActions()
401419 connect (optionsAction, SIGNAL (triggered ()), this , SLOT (optionsClicked ()));
402420 connect (toggleHideAction, SIGNAL (triggered ()), this , SLOT (toggleHidden ()));
403421 connect (showHelpMessageAction, SIGNAL (triggered ()), this , SLOT (showHelpMessageClicked ()));
404- connect (openRPCConsoleAction, SIGNAL (triggered ()), this , SLOT (showDebugWindow ()));
422+ connect (openRPCConsoleAction, SIGNAL (triggered ()), this , SLOT (showConsole ()));
423+
424+ // Jump directly to tabs in RPC-console
425+ connect (openInfoAction, SIGNAL (triggered ()), this , SLOT (showInfo ()));
426+ connect (openGraphAction, SIGNAL (triggered ()), this , SLOT (showGraph ()));
427+ connect (openPeersAction, SIGNAL (triggered ()), this , SLOT (showPeers ()));
428+ // connect(openRepairAction, SIGNAL(triggered()), this, SLOT(showRepair()));
429+
430+ // Open configs and backup folder from menu
431+ connect (openConfEditorAction, SIGNAL (triggered ()), this , SLOT (showConfEditor ()));
432+ // connect(openMNConfEditorAction, SIGNAL(triggered()), this, SLOT(showMNConfEditor()));
433+ connect (showDatadirAction, SIGNAL (triggered ()), this , SLOT (showDatadir ()));
405434 // prevents an open debug window from becoming stuck/unusable on client shutdown
406435 connect (quitAction, SIGNAL (triggered ()), rpcConsole, SLOT (hide ()));
407436
@@ -457,11 +486,21 @@ void SHIELDGUI::createMenuBar()
457486 }
458487 settings->addAction (optionsAction);
459488
460- QMenu *help = appMenuBar->addMenu (tr (" &Help" ));
461489 if (walletFrame)
462490 {
463- help->addAction (openRPCConsoleAction);
491+ QMenu *tools = appMenuBar->addMenu (tr (" &Tools" ));
492+ tools->addAction (openInfoAction);
493+ tools->addAction (openRPCConsoleAction);
494+ tools->addAction (openGraphAction);
495+ tools->addAction (openPeersAction);
496+ // tools->addAction(openRepairAction);
497+ tools->addSeparator ();
498+ tools->addAction (openConfEditorAction);
499+ // tools->addAction(openMNConfEditorAction);
500+ tools->addAction (showDatadirAction);
464501 }
502+
503+ QMenu *help = appMenuBar->addMenu (tr (" &Help" ));
465504 help->addAction (showHelpMessageAction);
466505 help->addSeparator ();
467506 help->addAction (aboutAction);
@@ -760,6 +799,55 @@ void SHIELDGUI::gotoVerifyMessageTab(QString addr)
760799{
761800 if (walletFrame) walletFrame->gotoVerifyMessageTab (addr);
762801}
802+
803+
804+ void SHIELDGUI::showInfo ()
805+ {
806+ rpcConsole->setTabFocus (RPCConsole::TAB_INFO);
807+ showDebugWindow ();
808+ }
809+
810+ void SHIELDGUI::showConsole ()
811+ {
812+ rpcConsole->setTabFocus (RPCConsole::TAB_CONSOLE);
813+ showDebugWindow ();
814+ }
815+
816+ void SHIELDGUI::showGraph ()
817+ {
818+ rpcConsole->setTabFocus (RPCConsole::TAB_GRAPH);
819+ showDebugWindow ();
820+ }
821+
822+ void SHIELDGUI::showPeers ()
823+ {
824+ rpcConsole->setTabFocus (RPCConsole::TAB_PEERS);
825+ showDebugWindow ();
826+ }
827+
828+ // void SHIELDGUI::showRepair()
829+ // {
830+ // rpcConsole->setTabFocus(RPCConsole::TAB_REPAIR);
831+ // showDebugWindow();
832+ // }
833+
834+ void SHIELDGUI::showConfEditor ()
835+ {
836+ if (!GUIUtil::openSHIELDConf ()){
837+ QMessageBox::critical (this , tr (" Error" ), tr (" The configuration file could not be opened." ));
838+ }
839+ }
840+
841+ // void SHIELDGUI::showMNConfEditor()
842+ // {
843+ // GUIUtil::openMNConfigfile();
844+ // }
845+
846+ void SHIELDGUI::showDatadir ()
847+ {
848+ GUIUtil::showDatadir ();
849+ }
850+
763851#endif // ENABLE_WALLET
764852
765853void SHIELDGUI::updateNetworkState ()
@@ -1031,10 +1119,15 @@ void SHIELDGUI::closeEvent(QCloseEvent *event)
10311119
10321120void SHIELDGUI::showEvent (QShowEvent *event)
10331121{
1034- // enable the debug window when the main window shows up
1122+ // enable the debug windows when the main window shows up
10351123 openRPCConsoleAction->setEnabled (true );
10361124 aboutAction->setEnabled (true );
10371125 optionsAction->setEnabled (true );
1126+ openInfoAction->setEnabled (true );
1127+ openGraphAction->setEnabled (true );
1128+ openPeersAction->setEnabled (true );
1129+ openConfEditorAction->setEnabled (true );
1130+ // openRepairAction->setEnabled(true);
10381131}
10391132
10401133#ifdef ENABLE_WALLET
0 commit comments