Browse Source

[Qt] small notificator and style changes

- remove default arguments for notificator
- re-order some calls to use same ordering in Qt files
- style police changes (spaces, comments and such)
0.10
Philip Kaufmann 11 years ago
parent
commit
ccd1372dd0
  1. 4
      src/qt/bitcoin.cpp
  2. 2
      src/qt/bitcoingui.cpp
  3. 2
      src/qt/clientmodel.h
  4. 1
      src/qt/guiutil.cpp
  5. 1
      src/qt/notificator.cpp
  6. 2
      src/qt/notificator.h
  7. 2
      src/qt/receivecoinsdialog.cpp
  8. 4
      src/qt/walletview.cpp
  9. 1
      src/qt/walletview.h

4
src/qt/bitcoin.cpp

@ -53,7 +53,6 @@ static SplashScreen *splashref; @@ -53,7 +53,6 @@ static SplashScreen *splashref;
static bool ThreadSafeMessageBox(const std::string& message, const std::string& caption, unsigned int style)
{
// Message from network thread
if(guiref)
{
bool modal = (style & CClientUIInterface::MODAL);
@ -313,11 +312,12 @@ int main(int argc, char *argv[]) @@ -313,11 +312,12 @@ int main(int argc, char *argv[])
splash.finish(&window);
ClientModel clientModel(&optionsModel);
window.setClientModel(&clientModel);
WalletModel *walletModel = 0;
if(pwalletMain)
walletModel = new WalletModel(pwalletMain, &optionsModel);
window.setClientModel(&clientModel);
if(walletModel)
{
window.addWallet("~Default", walletModel);

2
src/qt/bitcoingui.cpp

@ -405,7 +405,7 @@ void BitcoinGUI::createTrayIcon(bool fIsTestnet) @@ -405,7 +405,7 @@ void BitcoinGUI::createTrayIcon(bool fIsTestnet)
trayIcon->show();
#endif
notificator = new Notificator(QApplication::applicationName(), trayIcon);
notificator = new Notificator(QApplication::applicationName(), trayIcon, this);
}
void BitcoinGUI::createTrayIconMenu()

2
src/qt/clientmodel.h

@ -84,7 +84,7 @@ signals: @@ -84,7 +84,7 @@ signals:
void alertsChanged(const QString &warnings);
void bytesChanged(quint64 totalBytesIn, quint64 totalBytesOut);
//! Asynchronous message notification
//! Fired when a message should be reported to the user
void message(const QString &title, const QString &message, unsigned int style);
public slots:

1
src/qt/guiutil.cpp

@ -32,6 +32,7 @@ @@ -32,6 +32,7 @@
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
#include <QAbstractItemView>
#include <QApplication>
#include <QClipboard>

1
src/qt/notificator.cpp

@ -4,7 +4,6 @@ @@ -4,7 +4,6 @@
#include "notificator.h"
#include <QApplication>
#include <QByteArray>
#include <QIcon>

2
src/qt/notificator.h

@ -29,7 +29,7 @@ public: @@ -29,7 +29,7 @@ public:
/** Create a new notificator.
@note Ownership of trayIcon is not transferred to this object.
*/
Notificator(const QString &programName=QString(), QSystemTrayIcon *trayIcon=0, QWidget *parent=0);
Notificator(const QString &programName, QSystemTrayIcon *trayIcon, QWidget *parent);
~Notificator();
// Message class

2
src/qt/receivecoinsdialog.cpp

@ -103,9 +103,9 @@ void ReceiveCoinsDialog::on_receiveButton_clicked() @@ -103,9 +103,9 @@ void ReceiveCoinsDialog::on_receiveButton_clicked()
SendCoinsRecipient info(address, label,
ui->reqAmount->value(), ui->reqMessage->text());
ReceiveRequestDialog *dialog = new ReceiveRequestDialog(this);
dialog->setAttribute(Qt::WA_DeleteOnClose);
dialog->setModel(model->getOptionsModel());
dialog->setInfo(info);
dialog->setAttribute(Qt::WA_DeleteOnClose);
dialog->show();
clear();
}

4
src/qt/walletview.cpp

@ -263,8 +263,8 @@ void WalletView::usedSendingAddresses() @@ -263,8 +263,8 @@ void WalletView::usedSendingAddresses()
if(!walletModel)
return;
AddressBookPage *dlg = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::SendingTab, this);
dlg->setModel(walletModel->getAddressTableModel());
dlg->setAttribute(Qt::WA_DeleteOnClose);
dlg->setModel(walletModel->getAddressTableModel());
dlg->show();
}
@ -273,7 +273,7 @@ void WalletView::usedReceivingAddresses() @@ -273,7 +273,7 @@ void WalletView::usedReceivingAddresses()
if(!walletModel)
return;
AddressBookPage *dlg = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::ReceivingTab, this);
dlg->setModel(walletModel->getAddressTableModel());
dlg->setAttribute(Qt::WA_DeleteOnClose);
dlg->setModel(walletModel->getAddressTableModel());
dlg->show();
}

1
src/qt/walletview.h

@ -96,6 +96,7 @@ public slots: @@ -96,6 +96,7 @@ public slots:
/** Re-emit encryption status signal */
void updateEncryptionStatus();
signals:
/** Signal that we want to show the main window */
void showNormalIfMinimized();

Loading…
Cancel
Save