diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/qt/bitcoin.cpp | 2 | ||||
| -rw-r--r-- | src/qt/forms/sendcoinsdialog.ui | 9 | ||||
| -rw-r--r-- | src/qt/guiutil.cpp | 16 | ||||
| -rw-r--r-- | src/qt/guiutil.h | 6 |
4 files changed, 26 insertions, 7 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index 8c8c73f06..b4e751077 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -212,7 +212,7 @@ int main(int argc, char *argv[]) if (mapArgs.count("-?") || mapArgs.count("--help")) { GUIUtil::HelpMessageBox help; - help.exec(); + help.showOrPrint(); return 1; } diff --git a/src/qt/forms/sendcoinsdialog.ui b/src/qt/forms/sendcoinsdialog.ui index 023a72ac2..10a1586d4 100644 --- a/src/qt/forms/sendcoinsdialog.ui +++ b/src/qt/forms/sendcoinsdialog.ui @@ -70,6 +70,9 @@ <iconset resource="../bitcoin.qrc"> <normaloff>:/icons/add</normaloff>:/icons/add</iconset> </property> + <property name="autoDefault"> + <bool>false</bool> + </property> </widget> </item> <item> @@ -93,6 +96,9 @@ <property name="autoRepeatDelay"> <number>300</number> </property> + <property name="autoDefault"> + <bool>false</bool> + </property> </widget> </item> <item> @@ -109,6 +115,9 @@ </item> <item> <widget class="QLabel" name="labelBalance"> + <property name="cursor"> + <cursorShape>IBeamCursor</cursorShape> + </property> <property name="text"> <string>123.456 BTC</string> </property> diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index a8c232885..50ed2eed0 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -441,15 +441,21 @@ HelpMessageBox::HelpMessageBox(QWidget *parent) : setDetailedText(coreOptions + "\n" + uiOptions); } -void HelpMessageBox::exec() +void HelpMessageBox::printToConsole() { -#if defined(WIN32) - // On windows, show a message box, as there is no stderr in windowed applications - QMessageBox::exec(); -#else // On other operating systems, the expected action is to print the message to the console. QString strUsage = header + "\n" + coreOptions + "\n" + uiOptions; fprintf(stderr, "%s", strUsage.toStdString().c_str()); +} + +void HelpMessageBox::showOrPrint() +{ +#if defined(WIN32) + // On windows, show a message box, as there is no stderr/stdout in windowed applications + exec(); +#else + // On other operating systems, print help text to console + printToConsole(); #endif } diff --git a/src/qt/guiutil.h b/src/qt/guiutil.h index ca0634851..024069550 100644 --- a/src/qt/guiutil.h +++ b/src/qt/guiutil.h @@ -103,7 +103,11 @@ namespace GUIUtil public: HelpMessageBox(QWidget *parent = 0); - void exec(); + /** Show message box or print help message to standard output, based on operating system. */ + void showOrPrint(); + + /** Print help message to console */ + void printToConsole(); private: QString header; |