diff options
author | Philip Kaufmann <phil.kaufmann@t-online.de> | 2013-11-14 19:47:45 +0100 |
---|---|---|
committer | Philip Kaufmann <phil.kaufmann@t-online.de> | 2013-11-14 19:58:00 +0100 |
commit | 309f796b39d4ae7694c3f37a681c1ebcd1f58eda (patch) | |
tree | 2ad12f4d6bea1172f093067ade23fc11a56e13c5 /src/qt/bitcoingui.cpp | |
parent | 6ad44f569335d57a56e5b28582255439980f9b73 (diff) |
[Qt] make most Windows appear centered on main GUI
- remove default value for parent variable in dialogs, which should appear
centered over main GUI and pass appropriate value
- add some addition NULL pointer checks
Diffstat (limited to 'src/qt/bitcoingui.cpp')
-rw-r--r-- | src/qt/bitcoingui.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index a1becc12ec..a44627690f 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -10,12 +10,12 @@ #include "guiconstants.h" #include "guiutil.h" #include "notificator.h" +#include "openuridialog.h" #include "optionsdialog.h" #include "optionsmodel.h" #include "rpcconsole.h" #include "walletframe.h" #include "walletmodel.h" -#include "openuridialog.h" #ifdef Q_OS_MAC #include "macdockiconhandler.h" @@ -345,7 +345,7 @@ void BitcoinGUI::setClientModel(ClientModel *clientModel) setNumBlocks(clientModel->getNumBlocks(), clientModel->getNumBlocksOfPeers()); connect(clientModel, SIGNAL(numBlocksChanged(int,int)), this, SLOT(setNumBlocks(int,int))); - // Receive and report messages from network/worker thread + // Receive and report messages from client model connect(clientModel, SIGNAL(message(QString,QString,unsigned int)), this, SLOT(message(QString,QString,unsigned int))); rpcConsole->setClientModel(clientModel); @@ -460,21 +460,25 @@ void BitcoinGUI::optionsClicked() { if(!clientModel || !clientModel->getOptionsModel()) return; - OptionsDialog dlg; + + OptionsDialog dlg(this); dlg.setModel(clientModel->getOptionsModel()); dlg.exec(); } void BitcoinGUI::aboutClicked() { - AboutDialog dlg; + if(!clientModel) + return; + + AboutDialog dlg(this); dlg.setModel(clientModel); dlg.exec(); } void BitcoinGUI::openClicked() { - OpenURIDialog dlg; + OpenURIDialog dlg(this); if(dlg.exec()) { emit receivedURI(dlg.getURI()); |