OK с краю
[novacoin.git] / src / qt / bitcoingui.cpp
index 75a6510..3171647 100644 (file)
@@ -75,6 +75,8 @@ BitcoinGUI::BitcoinGUI(QWidget *parent):
     QMainWindow(parent),
     clientModel(0),
     walletModel(0),
+    signVerifyMessageDialog(0),
+    multisigPage(0),
     encryptWalletAction(0),
     lockWalletAction(0),
     unlockWalletAction(0),
@@ -84,7 +86,8 @@ BitcoinGUI::BitcoinGUI(QWidget *parent):
     trayIcon(0),
     notificator(0),
     rpcConsole(0),
-    aboutDialog(0)
+    aboutDialog(0),
+    optionsDialog(0)
 {
     resize(850, 550);
     setWindowTitle(tr("NovaCoin") + " - " + tr("Wallet"));
@@ -131,9 +134,9 @@ BitcoinGUI::BitcoinGUI(QWidget *parent):
 
     sendCoinsPage = new SendCoinsDialog(this);
 
-    signVerifyMessageDialog = new SignVerifyMessageDialog(this);
+    signVerifyMessageDialog = new SignVerifyMessageDialog(0);
 
-    multisigPage = new MultisigDialog(this);
+    multisigPage = new MultisigDialog(0);
 
     centralWidget = new QStackedWidget(this);
     centralWidget->addWidget(overviewPage);
@@ -202,6 +205,7 @@ BitcoinGUI::BitcoinGUI(QWidget *parent):
     connect(openRPCConsoleAction, SIGNAL(triggered()), rpcConsole, SLOT(show()));
 
     aboutDialog = new AboutDialog(0);
+    optionsDialog = new OptionsDialog(0);
 
     // Clicking on "Verify Message" in the address book sends you to the verify message tab
     connect(addressBookPage, SIGNAL(verifyMessage(QString)), this, SLOT(gotoVerifyMessageTab(QString)));
@@ -221,6 +225,9 @@ BitcoinGUI::~BitcoinGUI()
 
     delete rpcConsole;
     delete aboutDialog;
+    delete optionsDialog;
+    delete multisigPage;
+    delete signVerifyMessageDialog;
 }
 
 void BitcoinGUI::createActions()
@@ -538,9 +545,10 @@ void BitcoinGUI::optionsClicked()
 {
     if(!clientModel || !clientModel->getOptionsModel())
         return;
-    OptionsDialog dlg;
-    dlg.setModel(clientModel->getOptionsModel());
-    dlg.exec();
+
+    optionsDialog->setModel(clientModel->getOptionsModel());
+    optionsDialog->setWindowModality(Qt::ApplicationModal);
+    optionsDialog->show();
 }
 
 void BitcoinGUI::aboutClicked()
@@ -1015,7 +1023,7 @@ void BitcoinGUI::setEncryptionStatus(int status)
         labelEncryptionIcon->setToolTip(tr("Wallet is <b>encrypted</b> and currently <b>unlocked</b>"));
         encryptWalletAction->setChecked(true);
         changePassphraseAction->setEnabled(true);
-        encryptWalletAction->setEnabled(false); // TODO: decrypt currently not supported
+        encryptWalletAction->setEnabled(true);
 
         lockWalletAction->setEnabled(true);
         lockWalletAction->setChecked(false);
@@ -1034,7 +1042,7 @@ void BitcoinGUI::setEncryptionStatus(int status)
         labelEncryptionIcon->setToolTip(tr("Wallet is <b>encrypted</b> and currently <b>locked</b>"));
         encryptWalletAction->setChecked(true);
         changePassphraseAction->setEnabled(true);
-        encryptWalletAction->setEnabled(false); // TODO: decrypt currently not supported
+        encryptWalletAction->setEnabled(true);
 
         lockWalletAction->setChecked(true);
         unlockWalletAction->setChecked(false);