Browse Source

Merge pull request #3573

f021981 [Qt] move helpmessage from debug window to main menu (Philip Kaufmann)
0.10
Wladimir J. van der Laan 11 years ago
parent
commit
3c3cd878b9
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 14
      src/qt/bitcoingui.cpp
  2. 3
      src/qt/bitcoingui.h
  3. 26
      src/qt/forms/rpcconsole.ui
  4. 8
      src/qt/rpcconsole.cpp
  5. 2
      src/qt/rpcconsole.h

14
src/qt/bitcoingui.cpp

@ -308,11 +308,15 @@ void BitcoinGUI::createActions(bool fIsTestnet)
openAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_FileIcon), tr("Open &URI..."), this); openAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_FileIcon), tr("Open &URI..."), this);
openAction->setStatusTip(tr("Open a bitcoin: URI or payment request")); openAction->setStatusTip(tr("Open a bitcoin: URI or payment request"));
showHelpMessageAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation), tr("&Command-line options"), this);
showHelpMessageAction->setStatusTip(tr("Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options"));
connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit())); connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
connect(aboutAction, SIGNAL(triggered()), this, SLOT(aboutClicked())); connect(aboutAction, SIGNAL(triggered()), this, SLOT(aboutClicked()));
connect(aboutQtAction, SIGNAL(triggered()), qApp, SLOT(aboutQt())); connect(aboutQtAction, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
connect(optionsAction, SIGNAL(triggered()), this, SLOT(optionsClicked())); connect(optionsAction, SIGNAL(triggered()), this, SLOT(optionsClicked()));
connect(toggleHideAction, SIGNAL(triggered()), this, SLOT(toggleHidden())); connect(toggleHideAction, SIGNAL(triggered()), this, SLOT(toggleHidden()));
connect(showHelpMessageAction, SIGNAL(triggered()), this, SLOT(showHelpMessageClicked()));
#ifdef ENABLE_WALLET #ifdef ENABLE_WALLET
if(walletFrame) if(walletFrame)
{ {
@ -366,8 +370,9 @@ void BitcoinGUI::createMenuBar()
if(walletFrame) if(walletFrame)
{ {
help->addAction(openRPCConsoleAction); help->addAction(openRPCConsoleAction);
help->addSeparator();
} }
help->addAction(showHelpMessageAction);
help->addSeparator();
help->addAction(aboutAction); help->addAction(aboutAction);
help->addAction(aboutQtAction); help->addAction(aboutQtAction);
} }
@ -546,6 +551,13 @@ void BitcoinGUI::aboutClicked()
dlg.exec(); dlg.exec();
} }
void BitcoinGUI::showHelpMessageClicked()
{
HelpMessageDialog *help = new HelpMessageDialog(this);
help->setAttribute(Qt::WA_DeleteOnClose);
help->show();
}
#ifdef ENABLE_WALLET #ifdef ENABLE_WALLET
void BitcoinGUI::openClicked() void BitcoinGUI::openClicked()
{ {

3
src/qt/bitcoingui.h

@ -93,6 +93,7 @@ private:
QAction *aboutQtAction; QAction *aboutQtAction;
QAction *openRPCConsoleAction; QAction *openRPCConsoleAction;
QAction *openAction; QAction *openAction;
QAction *showHelpMessageAction;
QSystemTrayIcon *trayIcon; QSystemTrayIcon *trayIcon;
Notificator *notificator; Notificator *notificator;
@ -176,6 +177,8 @@ private slots:
void optionsClicked(); void optionsClicked();
/** Show about dialog */ /** Show about dialog */
void aboutClicked(); void aboutClicked();
/** Show help message dialog */
void showHelpMessageClicked();
#ifndef Q_OS_MAC #ifndef Q_OS_MAC
/** Handle tray icon clicked */ /** Handle tray icon clicked */
void trayIconActivated(QSystemTrayIcon::ActivationReason reason); void trayIconActivated(QSystemTrayIcon::ActivationReason reason);

26
src/qt/forms/rpcconsole.ui

@ -339,32 +339,6 @@
</widget> </widget>
</item> </item>
<item row="16" column="0"> <item row="16" column="0">
<widget class="QLabel" name="labelCLOptions">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Command-line options</string>
</property>
</widget>
</item>
<item row="17" column="0">
<widget class="QPushButton" name="showCLOptionsButton">
<property name="toolTip">
<string>Show the Bitcoin-Core help message to get a list with possible Bitcoin command-line options.</string>
</property>
<property name="text">
<string>&amp;Show</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
</widget>
</item>
<item row="18" column="0">
<spacer name="verticalSpacer"> <spacer name="verticalSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>

8
src/qt/rpcconsole.cpp

@ -7,7 +7,6 @@
#include "clientmodel.h" #include "clientmodel.h"
#include "guiutil.h" #include "guiutil.h"
#include "utilitydialog.h"
#include "rpcserver.h" #include "rpcserver.h"
#include "rpcclient.h" #include "rpcclient.h"
@ -201,7 +200,6 @@ RPCConsole::RPCConsole(QWidget *parent) :
#ifndef Q_OS_MAC #ifndef Q_OS_MAC
ui->openDebugLogfileButton->setIcon(QIcon(":/icons/export")); ui->openDebugLogfileButton->setIcon(QIcon(":/icons/export"));
ui->showCLOptionsButton->setIcon(QIcon(":/icons/options"));
#endif #endif
// Install event filter for up and down arrow // Install event filter for up and down arrow
@ -442,12 +440,6 @@ void RPCConsole::scrollToEnd()
scrollbar->setValue(scrollbar->maximum()); scrollbar->setValue(scrollbar->maximum());
} }
void RPCConsole::on_showCLOptionsButton_clicked()
{
HelpMessageDialog *help = new HelpMessageDialog(this);
help->show();
}
void RPCConsole::on_sldGraphRange_valueChanged(int value) void RPCConsole::on_sldGraphRange_valueChanged(int value)
{ {
const int multiplier = 5; // each position on the slider represents 5 min const int multiplier = 5; // each position on the slider represents 5 min

2
src/qt/rpcconsole.h

@ -40,8 +40,6 @@ private slots:
void on_tabWidget_currentChanged(int index); void on_tabWidget_currentChanged(int index);
/** open the debug.log from the current datadir */ /** open the debug.log from the current datadir */
void on_openDebugLogfileButton_clicked(); void on_openDebugLogfileButton_clicked();
/** display messagebox with program parameters (same as bitcoin-qt --help) */
void on_showCLOptionsButton_clicked();
/** change the time range of the network traffic graph */ /** change the time range of the network traffic graph */
void on_sldGraphRange_valueChanged(int value); void on_sldGraphRange_valueChanged(int value);
/** update traffic statistics */ /** update traffic statistics */

Loading…
Cancel
Save