From: <vo...@us...> - 2012-08-03 09:58:57
|
Revision: 2855 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=2855&view=rev Author: vomikan Date: 2012-08-03 09:58:47 +0000 (Fri, 03 Aug 2012) Log Message: ----------- update Modified Paths: -------------- branches/0.9.9.0/mmex/src/transdialog.cpp branches/0.9.9.0/mmex/src/transdialog.h Modified: branches/0.9.9.0/mmex/src/transdialog.cpp =================================================================== --- branches/0.9.9.0/mmex/src/transdialog.cpp 2012-08-03 08:33:20 UTC (rev 2854) +++ branches/0.9.9.0/mmex/src/transdialog.cpp 2012-08-03 09:58:47 UTC (rev 2855) @@ -69,6 +69,7 @@ ) : db_(db), core_(core), + parent_(parent), pBankTransaction_(pBankTransaction), accountID_(accountID), referenceAccountID_(accountID), @@ -409,7 +410,7 @@ number_sizer->Add(bAuto_, flags); // Notes --------------------------------------------- - wxStaticText* text_notes = new wxStaticText(this, + wxStaticText* text_notes = new wxStaticText(parent_, wxID_STATIC, _("Notes")); bFrequentUsedNotes_ = new wxButton(this, @@ -458,7 +459,7 @@ wxArrayString as = core_->accountList_.getAccountsName(); - wxSingleChoiceDialog scd(0, _("Account name"), _("Select Account"), as); + wxSingleChoiceDialog scd(parent_, _("Account name"), _("Select Account"), as); if (scd.ShowModal() == wxID_OK) { wxString acctName = scd.GetStringSelection(); @@ -468,7 +469,7 @@ } else { - mmPayeeDialog dlg(this, core_); + mmPayeeDialog dlg(parent_, core_); if ( dlg.ShowModal() == wxID_OK ) { @@ -530,7 +531,7 @@ if (as.IsEmpty()){ return; } - wxSingleChoiceDialog scd(this, _("Account name"), _("Select Account"), as); + wxSingleChoiceDialog scd(parent_, _("Account name"), _("Select Account"), as); if (scd.ShowModal() == wxID_OK) { wxString acctName = scd.GetStringSelection(); @@ -598,7 +599,7 @@ } else { - mmCategDialog dlg(core_, this); + mmCategDialog dlg(core_, parent_); dlg.setTreeSelection(categoryName_, subCategoryName_); if ( dlg.ShowModal() == wxID_OK ) { @@ -931,7 +932,7 @@ { if (categID_ < 1) { - mmShowErrorMessageInvalid(this, _("Category")); + mmShowErrorMessageInvalid(parent_, _("Category")); return; } } @@ -946,7 +947,7 @@ if (amount < 0) amount = - amount; } else { - mmShowErrorMessageInvalid(this, _("Amount")); + mmShowErrorMessageInvalid(parent_, _("Amount")); return; } } @@ -957,7 +958,7 @@ if (!mmex::formatCurrencyToDouble(amountStr, amount) || (amount < 0.0)) { textAmount_->SetBackgroundColour(wxT("RED")); - mmShowErrorMessageInvalid(this, _("Amount")); + mmShowErrorMessageInvalid(parent_, _("Amount")); textAmount_->SetBackgroundColour(wxNullColour); return; } @@ -970,7 +971,7 @@ { toTextAmount_->Enable(!advancedToTransAmountSet_); toTextAmount_->SetBackgroundColour(wxT("RED")); - mmShowErrorMessageInvalid(this, _("Advanced Amount")); + mmShowErrorMessageInvalid(parent_, _("Advanced Amount")); toTextAmount_->SetBackgroundColour(wxNullColour); toTextAmount_->Enable(advancedToTransAmountSet_); return; @@ -985,13 +986,13 @@ { if (toID_ == -1) { - mmShowErrorMessageInvalid(this, _("To Account ")); + mmShowErrorMessageInvalid(parent_, _("To Account ")); return; } if (payeeID_ == toID_) { - mmShowErrorMessage(this, _("From and To Account cannot be the same."), _("Error")); + mmShowErrorMessage(parent_, _("From and To Account cannot be the same."), _("Error")); return; } @@ -1168,7 +1169,7 @@ void mmTransDialog::OnFrequentUsedNotes(wxCommandEvent& /*event*/) { wxCommandEvent ev(wxEVT_COMMAND_MENU_SELECTED, ID_DIALOG_TRANS_BUTTON_FREQENTNOTES) ; - ev.SetEventObject( this ); + ev.SetEventObject( parent_ ); wxMenu menu; Modified: branches/0.9.9.0/mmex/src/transdialog.h =================================================================== --- branches/0.9.9.0/mmex/src/transdialog.h 2012-08-03 08:33:20 UTC (rev 2854) +++ branches/0.9.9.0/mmex/src/transdialog.h 2012-08-03 09:58:47 UTC (rev 2855) @@ -94,6 +94,7 @@ boost::shared_ptr<wxSQLite3Database> db_; mmCoreDB* core_; mmBankTransaction* pBankTransaction_; + wxWindow* parent_; int accountID_; int referenceAccountID_; // used for transfer transactions wxTextCtrl *textNumber_; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |