[kde-doc-english] [kmymoney/4.8] doc: Updated version number in manual to 4.8

2016-06-17 Thread Thomas Baumgart
Git commit e92c5abd6988defd7bed438f92b1b99fe24cc1f5 by Thomas Baumgart.
Committed on 17/06/2016 at 20:35.
Pushed by tbaumgart into branch '4.8'.

Updated version number in manual to 4.8

M  +1-1doc/index.docbook

http://commits.kde.org/kmymoney/e92c5abd6988defd7bed438f92b1b99fe24cc1f5

diff --git a/doc/index.docbook b/doc/index.docbook
index 42e206d..e3987f0 100644
--- a/doc/index.docbook
+++ b/doc/index.docbook
@@ -129,7 +129,7 @@
 
 
 The &kappname; Handbook
-for &kappname; version 4.7
+for &kappname; version 4.8
 
 
 

Re: [kde-doc-english] [kmymoney/4.8] doc: Updated version number in manual to 4.8

2016-06-17 Thread Thomas Baumgart
Change is reverted.

On Friday 17 June 2016 16:59:14 Jack wrote:

> On 2016.06.17 16:52, Burkhard Lück wrote:
> > Am Freitag, 17. Juni 2016, 20:36:44 CEST schrieb Thomas Baumgart:
> > > Git commit e92c5abd6988defd7bed438f92b1b99fe24cc1f5 by Thomas
> > 
> > Baumgart.
> > 
> > > Committed on 17/06/2016 at 20:35.
> > > Pushed by tbaumgart into branch '4.8'.
> > > 
> > > Updated version number in manual to 4.8
> > > 
> > > M  +1-1doc/index.docbook
> > 
> > We (docbook team) have a policy for updating date and releaseinfo:
> > "Change date if
> > 
> >docbook is updated and verified to be valid for the current app
> > 
> > version
> > 
> >docbook is proofreaded and verified to be valid for the current
> > 
> > app version
> > "
> > see commits.kde.org/kdoctools?path=src/template.docbook
> > 
> > And to change the date in the docbook just because KMyMoney code
> > stable
> > switched to 4.8 seems to be wrong from my pov.
> 
> I was about to post the same thing.  While I don't think the manual
> will ever be fully updated to 4.8, I do hope to find time to bring it
> close enough that it will at least help users rather than frustrate
> them, pending the switch to the Frameworks version (which, I think,
> will be 5.0 - but Thomas should confirm.
> 
> Jack
-- 

Regards

Thomas Baumgart

GPG-FP: E55E D592 F45F 116B 8429   4F99 9C59 DB40 B75D D3BA
-
The good thing about FOSS is that people can see your code and comment it.
The bad thing is that people can see your code and comment it. (asoliverez)
-


signature.asc
Description: This is a digitally signed message part.
___
kde-doc-english mailing list
kde-doc-english@kde.org
https://mail.kde.org/mailman/listinfo/kde-doc-english


[kde-doc-english] [kmymoney/4.8] doc: Revert "Updated version number in manual to 4.8"

2016-06-17 Thread Thomas Baumgart
Git commit 1c9a39a21980533e46cc3069208c65237a187bb2 by Thomas Baumgart.
Committed on 17/06/2016 at 21:01.
Pushed by tbaumgart into branch '4.8'.

Revert "Updated version number in manual to 4.8"

This reverts commit e92c5abd6988defd7bed438f92b1b99fe24cc1f5.

M  +1-1doc/index.docbook

http://commits.kde.org/kmymoney/1c9a39a21980533e46cc3069208c65237a187bb2

diff --git a/doc/index.docbook b/doc/index.docbook
index e3987f0..42e206d 100644
--- a/doc/index.docbook
+++ b/doc/index.docbook
@@ -129,7 +129,7 @@
 
 
 The &kappname; Handbook
-for &kappname; version 4.8
+for &kappname; version 4.7
 
 
 

[kmymoney] kmymoney: Add exact payee name match option

2017-01-07 Thread Thomas Baumgart
Git commit f642c1913c2272429a08483acaee0162f958ef3b by Thomas Baumgart.
Committed on 07/01/2017 at 08:02.
Pushed by tbaumgart into branch 'master'.

Add exact payee name match option

The current 'Match on payees name' option works on a partial match
of the name. In some scenarios, an exact match is expected. The
new option allows to select that on a per payee basis.

The default for new payees entered through the GUI is not changed.
It remains 'No matching'. The default for new payees created during
statement import is the new 'Match exact name' option.

Also, the radio button based selection has been changed to a combobox.

GUI:
CCBUG: 374352

M  +7-1kmymoney/converter/mymoneystatementreader.cpp
M  +6-1kmymoney/mymoney/mymoneypayee.cpp
M  +2-1kmymoney/mymoney/mymoneypayee.h
M  +13   -0kmymoney/mymoney/tests/mymoneypayee-test.cpp
M  +1-0kmymoney/mymoney/tests/mymoneypayee-test.h
M  +13   -14   kmymoney/views/kpayeesview.cpp
M  +489  -540  kmymoney/views/kpayeesviewdecl.ui

https://commits.kde.org/kmymoney/f642c1913c2272429a08483acaee0162f958ef3b

diff --git a/kmymoney/converter/mymoneystatementreader.cpp 
b/kmymoney/converter/mymoneystatementreader.cpp
index c21e9bd0..9db04964 100644
--- a/kmymoney/converter/mymoneystatementreader.cpp
+++ b/kmymoney/converter/mymoneystatementreader.cpp
@@ -906,12 +906,18 @@ void 
MyMoneyStatementReader::processTransactionEntry(const MyMoneyStatement::Tra
 bool ignoreCase;
 QStringList keys;
 QStringList::const_iterator it_s;
-switch ((*it_p).matchData(ignoreCase, keys)) {
+const MyMoneyPayee::payeeMatchType matchType = 
(*it_p).matchData(ignoreCase, keys);
+switch (matchType) {
   case MyMoneyPayee::matchDisabled:
 break;
 
   case MyMoneyPayee::matchName:
+  case MyMoneyPayee::matchNameExact:
 keys << QString("%1").arg(QRegExp::escape((*it_p).name()));
+if(matchType == MyMoneyPayee::matchNameExact) {
+  keys.clear();
+  keys << QString("^%1$").arg(QRegExp::escape((*it_p).name()));
+}
 // tricky fall through here
 
   case MyMoneyPayee::matchKey:
diff --git a/kmymoney/mymoney/mymoneypayee.cpp 
b/kmymoney/mymoney/mymoneypayee.cpp
index c59fc849..c17295e6 100644
--- a/kmymoney/mymoney/mymoneypayee.cpp
+++ b/kmymoney/mymoney/mymoneypayee.cpp
@@ -196,8 +196,11 @@ MyMoneyPayee::payeeMatchType MyMoneyPayee::matchData(bool& 
ignorecase, QStringLi
 
   if (m_matchingEnabled) {
 type = m_usingMatchKey ? matchKey : matchName;
-if (type == matchKey)
+if (type == matchKey) {
   keys = m_matchKey.split(';');
+} else if (m_matchKey.compare(QLatin1String("^$")) == 0) {
+  type = matchNameExact;
+}
   }
 
   return type;
@@ -223,6 +226,8 @@ void MyMoneyPayee::setMatchData(payeeMatchType type, bool 
ignorecase, const QStr
   QRegExp validKeyRegExp("[^ ]");
   QStringList filteredKeys = keys.filter(validKeyRegExp);
   m_matchKey = filteredKeys.join(";");
+} else if(type == matchNameExact) {
+  m_matchKey = QLatin1String("^$");
 }
   }
 }
diff --git a/kmymoney/mymoney/mymoneypayee.h b/kmymoney/mymoney/mymoneypayee.h
index 89db5e3d..614eec67 100644
--- a/kmymoney/mymoney/mymoneypayee.h
+++ b/kmymoney/mymoney/mymoneypayee.h
@@ -83,7 +83,8 @@ public:
   typedef enum {
 matchDisabled = 0,
 matchName,
-matchKey
+matchKey,
+matchNameExact
   } payeeMatchType;
 
   MyMoneyPayee();
diff --git a/kmymoney/mymoney/tests/mymoneypayee-test.cpp 
b/kmymoney/mymoney/tests/mymoneypayee-test.cpp
index 0fe17e07..47afb269 100644
--- a/kmymoney/mymoney/tests/mymoneypayee-test.cpp
+++ b/kmymoney/mymoney/tests/mymoneypayee-test.cpp
@@ -193,3 +193,16 @@ void MyMoneyPayeeTest::testMatchKeyAllowSpaceAtEnd()
   QVERIFY(ignoreCase == false);
   QVERIFY(keys == QLatin1String("payee "));
 }
+
+void MyMoneyPayeeTest::testMatchNameExact()
+{
+  MyMoneyPayee payee;
+  QString keys;
+  bool ignoreCase;
+
+  payee.setMatchData(MyMoneyPayee::matchNameExact, false, keys);
+  keys = QLatin1String("payee ");
+  QCOMPARE(payee.matchData(ignoreCase, keys), MyMoneyPayee::matchNameExact);
+  QCOMPARE(ignoreCase, false);
+  QVERIFY(keys.isEmpty());
+}
diff --git a/kmymoney/mymoney/tests/mymoneypayee-test.h 
b/kmymoney/mymoney/tests/mymoneypayee-test.h
index ff740a3f..56ead47a 100644
--- a/kmymoney/mymoney/tests/mymoneypayee-test.h
+++ b/kmymoney/mymoney/tests/mymoneypayee-test.h
@@ -30,6 +30,7 @@ private slots:
   void testMatchKeyDisallowMultipleSpace();
   void testMatchKeyAllowSpaceAtStart();
   void testMatchKeyAllowSpaceAtEnd();
+  void testMatchNameExact();
 };
 
 #endif
diff --git a/kmymoney/views/kpayeesview.cpp b/kmymoney/views/kpayeesview.cpp
index 62485152..9834de39 100644
--- a/kmymoney/views

[kmymoney/5.0] doc: Fix minor typos

2018-02-02 Thread Thomas Baumgart
Git commit cee9bd610d8c31e5c5335f4630842c9ae08be64a by Thomas Baumgart.
Committed on 02/02/2018 at 08:04.
Pushed by tbaumgart into branch '5.0'.

Fix minor typos

Added dots for consistency

M  +3-3doc/credits.docbook

https://commits.kde.org/kmymoney/cee9bd610d8c31e5c5335f4630842c9ae08be64a

diff --git a/doc/credits.docbook b/doc/credits.docbook
index a851fbeb..c71170ed 100644
--- a/doc/credits.docbook
+++ b/doc/credits.docbook
@@ -54,14 +54,14 @@
   
 
   Cristian Oneţ &Cristian.Onet.mail;
-  Patches and Plugins
+  Patches and Plugins.
 
   
 
   
 
   Cristian Dávid &Christian.David.mail;
-  Developer
+  Developer.
 
   
 
@@ -118,7 +118,7 @@
   
 
   Marko Käning mk-li...@email.de
-  Patches, packaging and KF5-CI for OS-X
+  Patches, packaging and KF5-CI for OS-X.
 
   
 


[kmymoney/5.0] kmymoney: Allow to select keys during File/Save As

2018-02-16 Thread Thomas Baumgart
Git commit 03831143604ffb5f49267fc5dfdde97bb7059866 by Thomas Baumgart.
Committed on 16/02/2018 at 19:19.
Pushed by tbaumgart into branch '5.0'.

Allow to select keys during File/Save As

Due to the change in the KDE file save dialog the additional widgets
could not be inserted dynamically into the dialog as we did in KDE4.
This has been solved by an additional dialog when GPG encryption has
been enabled in the settings and is available.

BUG: 390467
FIXED-IN: 5.0.1
GUI:

M  +1-0kmymoney/dialogs/CMakeLists.txt
M  +77   -88   kmymoney/dialogs/kgpgkeyselectiondlg.cpp
M  +15   -3kmymoney/dialogs/kgpgkeyselectiondlg.h
A  +139  -0kmymoney/dialogs/kgpgkeyselectiondlg.ui
M  +19   -89   kmymoney/kmymoney.cpp
M  +1-6kmymoney/kmymoney.h

https://commits.kde.org/kmymoney/03831143604ffb5f49267fc5dfdde97bb7059866

diff --git a/kmymoney/dialogs/CMakeLists.txt b/kmymoney/dialogs/CMakeLists.txt
index 043f00c9..9726a1a5 100644
--- a/kmymoney/dialogs/CMakeLists.txt
+++ b/kmymoney/dialogs/CMakeLists.txt
@@ -64,6 +64,7 @@ set(dialogs_UI
   kenterscheduledlg.ui
   kequitypriceupdatedlg.ui kequitypriceupdateconfdlg.ui
   kfindtransactiondlg.ui kgeneratesqldlg.ui
+  kgpgkeyselectiondlg.ui
   kloadtemplatedlg.ui
   kmymoneyfileinfodlg.ui kmymoneypricedlg.ui
   knewaccountdlg.ui knewbankdlg.ui knewbudgetdlg.ui
diff --git a/kmymoney/dialogs/kgpgkeyselectiondlg.cpp 
b/kmymoney/dialogs/kgpgkeyselectiondlg.cpp
index ca15228e..34e820bb 100644
--- a/kmymoney/dialogs/kgpgkeyselectiondlg.cpp
+++ b/kmymoney/dialogs/kgpgkeyselectiondlg.cpp
@@ -19,25 +19,17 @@
 
 // 
 // QT Includes
-
-#include 
-#include 
-#include 
-#include 
+#include 
+#include 
 
 // 
 // KDE Includes
 
-#include 
-#include 
-#include 
-
 // 
 // Project Includes
 
 #include 
-#include 
-#include 
+#include 
 
 class KGpgKeySelectionDlgPrivate
 {
@@ -45,6 +37,10 @@ class KGpgKeySelectionDlgPrivate
 
 public:
   KGpgKeySelectionDlgPrivate()
+  : ui(new Ui::KGpgKeySelectionDlg)
+  , needCheckList(true)
+  , listOk(false)
+  , checkCount(0)
   {
   }
 
@@ -52,11 +48,10 @@ public:
   {
   }
 
-  KEditListWidget*   m_listWidget;
-  KLed*   m_keyLed;
-  boolm_needCheckList;
-  boolm_listOk;
-  int m_checkCount;
+  Ui::KGpgKeySelectionDlg*  ui;
+  bool  needCheckList;
+  bool  listOk;
+  int   checkCount;
 };
 
 
@@ -65,57 +60,11 @@ KGpgKeySelectionDlg::KGpgKeySelectionDlg(QWidget *parent) :
 d_ptr(new KGpgKeySelectionDlgPrivate)
 {
   Q_D(KGpgKeySelectionDlg);
-  d->m_needCheckList = true;
-  d->m_listOk = false;
-  d->m_checkCount = 0;
-  // TODO: check port to kf5
-  setWindowTitle(i18n("Select additional keys"));
-  QDialogButtonBox *buttonBox = new 
QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel);
-  QWidget *mainWidget = new QWidget(this);
-  QVBoxLayout *mainLayout = new QVBoxLayout;
-  setLayout(mainLayout);
-  mainLayout->addWidget(mainWidget);
-  QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
-  okButton->setDefault(true);
-  okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
-  connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
-  connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
-  buttonBox->button(QDialogButtonBox::Ok)->setDefault(true);
-  setModal(true);
-  QWidget* page = new QWidget(this);
-  mainLayout->addWidget(page);
-  mainLayout->addWidget(buttonBox);
-
-  QGroupBox *listBox = new QGroupBox(i18n("User identification"), page);
-  QVBoxLayout *verticalLayout = new QVBoxLayout(listBox);
-  verticalLayout->setSpacing(6);
-  verticalLayout->setContentsMargins(0, 0, 0, 0);
-  d->m_listWidget = new KEditListWidget(listBox);
-  d->m_listWidget->connect(buttonBox, &QDialogButtonBox::accepted, this, 
&QDialog::accept);
-  d->m_listWidget->connect(buttonBox, &QDialogButtonBox::rejected, this, 
&QDialog::reject);
-  d->m_listWidget->setWhatsThis(i18n("Enter the id of the key you want to use 
for data encryption. This can either be an e-mail address or the hexadecimal 
key id. In case of the key id, do not forget the leading 0x."));
-  verticalLayout->addWidget(d->m_listWidget);
-
-  // add a LED for the availability of all keys
-  QHBoxLayout* ledBox = new QHBoxLayout();
-  ledBox->setContentsMargins(0, 0, 0, 0);
-  ledBox->setSpacing(6);
-  ledBox->setObjectName("ledBoxLayout");
-
-  d->m_keyLed = new KLed(page);
-  mainLayout->addWidget(d->m_keyLed);
-  d->m_keyLed->setShape(KLed::Circular);
-  d->m_keyLed->setLook(KLed::Sunken);
-
-  ledBox->

[kmymoney/5.0] kmymoney/views: Break scheduled transactions string

2018-02-23 Thread Thomas Baumgart
Git commit c75953cdd7e2907896755edea3a855e8680c1e2d by Thomas Baumgart.
Committed on 23/02/2018 at 17:48.
Pushed by tbaumgart into branch '5.0'.

Break scheduled transactions string

There is a bug in
static int layoutText(QTextLayout *layout, int maxWidth)
from kpageview_p.cpp from kwidgetsaddons.
The method doesn't break strings that are too long. This patch
workarounds this by using LINE SEPARATOR character which is accepted by
QTextLayout::createLine().

GUI:

(cherry picked from commit 15a24ce4e2bed0993e8b14fdd8c49ca87d155380)

M  +1-1kmymoney/views/kmymoneyview.cpp

https://commits.kde.org/kmymoney/c75953cdd7e2907896755edea3a855e8680c1e2d

diff --git a/kmymoney/views/kmymoneyview.cpp b/kmymoney/views/kmymoneyview.cpp
index a8980077..82600540 100644
--- a/kmymoney/views/kmymoneyview.cpp
+++ b/kmymoney/views/kmymoneyview.cpp
@@ -176,7 +176,7 @@ KMyMoneyView::KMyMoneyView(KMyMoneyApp *kmymoney)
   // Page 3
   m_scheduledView = new KScheduledView;
 //this is to solve the way long strings are handled differently among versions 
of KPageWidget
-  viewFrames[View::Schedules] = m_model->addPage(m_scheduledView, 
i18n("Scheduled transactions"));
+  viewFrames[View::Schedules] = m_model->addPage(m_scheduledView, i18nc("use 
\u2028 as line break", "Scheduled\u2028transactions"));
   viewFrames[View::Schedules]->setIcon(Icons::get(Icon::ViewSchedules));
   connect(m_scheduledView, &KMyMoneyViewBase::aboutToShow, this, 
&KMyMoneyView::connectView);
   connect(m_scheduledView, &KMyMoneyViewBase::aboutToShow, this, 
&KMyMoneyView::resetViewSelection);


[kmymoney/5.0] kmymoney/plugins/ofx/import: Improve result information for OFX mapping

2019-01-29 Thread Thomas Baumgart
Git commit 778ff2c559552f461a0d30ae60abd68c7f5d55c6 by Thomas Baumgart.
Committed on 29/01/2019 at 08:39.
Pushed by tbaumgart into branch '5.0'.

Improve result information for OFX mapping

The source used to obtain information necessary for OFX mapping
(www.ofxhome.com) also presents information about the availability of
the provided URL and the verification of the SSL/TLS certificate.

Since this information was not interpreted by KMyMoney, URLs were
presented that are known to be broken.

This change shows an error message when a non working URL or an invalid
certificate is found on ofxhome.com.

GUI:

M  +37   -20   kmymoney/plugins/ofx/import/dialogs/konlinebankingsetupwizard.cpp
M  +72   -35   kmymoney/plugins/ofx/import/dialogs/konlinebankingsetupwizard.ui
M  +35   -21   kmymoney/plugins/ofx/import/ofxpartner.cpp
M  +9-1kmymoney/plugins/ofx/import/ofxpartner.h

https://commits.kde.org/kmymoney/778ff2c559552f461a0d30ae60abd68c7f5d55c6

diff --git a/kmymoney/plugins/ofx/import/dialogs/konlinebankingsetupwizard.cpp 
b/kmymoney/plugins/ofx/import/dialogs/konlinebankingsetupwizard.cpp
index 48cb3ca8d..899366cbc 100644
--- a/kmymoney/plugins/ofx/import/dialogs/konlinebankingsetupwizard.cpp
+++ b/kmymoney/plugins/ofx/import/dialogs/konlinebankingsetupwizard.cpp
@@ -128,6 +128,9 @@ 
KOnlineBankingSetupWizard::KOnlineBankingSetupWizard(QWidget *parent):
   button(QWizard::CancelButton)->setIcon(KStandardGuiItem::cancel().icon());
   
button(QWizard::NextButton)->setIcon(KStandardGuiItem::forward(KStandardGuiItem::UseRTL).icon());
   
button(QWizard::BackButton)->setIcon(KStandardGuiItem::back(KStandardGuiItem::UseRTL).icon());
+
+  m_problemMessages->setHidden(true);
+  m_problemMessages->setWordWrap(true);
 }
 
 KOnlineBankingSetupWizard::~KOnlineBankingSetupWizard()
@@ -186,6 +189,7 @@ void KOnlineBankingSetupWizard::newPage(int id)
 {
   QWidget* focus = 0;
 
+  m_problemMessages->setHidden(true);
   bool ok = true;
   if ((id - d->m_prevPage) == 1) { // one page forward?
 switch (d->m_prevPage) {
@@ -235,7 +239,7 @@ bool KOnlineBankingSetupWizard::finishFiPage()
   bool result = false;
 
   m_bankInfo.clear();
-  OfxFiServiceInfo info;
+  OfxHomeServiceInfo info;
 
   if (m_selectionTab->currentIndex() == 0) {
 
@@ -255,16 +259,29 @@ bool KOnlineBankingSetupWizard::finishFiPage()
 QString message = QString("Fipid: %1").arg(*it_fipid);
 
 // If the bank supports retrieving statements
-if (info.accountlist) {
-  m_bankInfo.push_back(info);
+if (info.ofxInfo.accountlist) {
+  m_bankInfo.push_back(info.ofxInfo);
+
+  message += QString("URL: %1Org: %2Fid: 
%3").arg(info.ofxInfo.url, info.ofxInfo.org, info.ofxInfo.fid);
 
-  message += QString("URL: %1Org: %2Fid: 
%3").arg(info.url, info.org, info.fid);
-  if (info.statements)
+  if (info.ofxInfo.statements)
 message += i18n("Supports online statements");
-  if (info.investments)
+  if (info.ofxInfo.investments)
 message += i18n("Supports investments");
-  if (info.billpay)
+  if (info.ofxInfo.billpay)
 message += i18n("Supports bill payment (but not supported by 
KMyMoney yet)");
+
+  QString problemMessage;
+  if (!info.ofxValidated)
+problemMessage += i18n("OFX host failed. Last successful access 
was on '%1'. ").arg(info.lastOfxValidated);
+  if (!info.sslValidated)
+problemMessage += i18n("Certificate verification of OFX host 
failed. Last successful verification was on '%1'.").arg(info.lastSslValidated);
+
+  if (!problemMessage.isEmpty()) {
+m_problemMessages->setText(problemMessage);
+m_problemMessages->animatedShow();
+  }
+
 } else {
   message += i18n("Does not support online banking");
 }
@@ -288,24 +305,24 @@ bool KOnlineBankingSetupWizard::finishFiPage()
 m_textDetails->clear();
 m_textDetails->append(i18n("Details for %1:", m_bankName->text()));
 
-memset(&info, 0, sizeof(OfxFiServiceInfo));
-strncpy(info.fid, m_fid->text().toLatin1(), OFX_FID_LENGTH - 1);
-strncpy(info.org, m_bankName->text().toLatin1(), OFX_ORG_LENGTH - 1);
-strncpy(info.url, m_url->url().url().toLatin1(), OFX_URL_LENGTH - 1);
-info.accountlist = 1;
-info.statements = 1;
-info.billpay = 1;
-info.investments = 1;
+memset(&info.ofxInfo, 0, sizeof(OfxFiServiceInfo));
+strncpy(info.ofxInfo.fid, m_fid->text().toLatin1(), OFX_FID_LENGTH - 1);
+strncpy(info.ofxInfo.org, m_bankName->text().toLatin1(), OFX_ORG_LENGTH - 
1);
+strncpy(info.ofxInfo.url, m_url->url().url().toLatin1(), OFX_URL_LENGTH - 
1);
+info.ofxInfo.accountlist = 1;
+info.ofxInfo.statements =

[kmymoney/5.0] kmymoney/plugins/csv/import: Improve memo column selection in CSV import wizard

2019-02-10 Thread Thomas Baumgart
Git commit cc119c58deaf77ead758e3b3ae729663f9362a78 by Thomas Baumgart.
Committed on 10/02/2019 at 11:19.
Pushed by tbaumgart into branch '5.0'.

Improve memo column selection in CSV import wizard

The CSV import wizard did allow to select multiple columns for memo
fields but it was not visible to the user which ones were selected.
Also, there is no way to clear the memo selection only but only all
column assignments.

This change adds a display item that shows the selected columns and also
adds a clear button to clear the memo field selection only.

GUI:
BUG: 404156
FIXED-IN: 5.0.4

M  +53   -19   kmymoney/plugins/csv/import/bankingwizardpage.cpp
M  +3-1kmymoney/plugins/csv/import/bankingwizardpage.h
M  +73   -51   kmymoney/plugins/csv/import/bankingwizardpage.ui

https://commits.kde.org/kmymoney/cc119c58deaf77ead758e3b3ae729663f9362a78

diff --git a/kmymoney/plugins/csv/import/bankingwizardpage.cpp 
b/kmymoney/plugins/csv/import/bankingwizardpage.cpp
index 26f7a6982..236cb13a1 100644
--- a/kmymoney/plugins/csv/import/bankingwizardpage.cpp
+++ b/kmymoney/plugins/csv/import/bankingwizardpage.cpp
@@ -63,14 +63,19 @@ BankingPage::BankingPage(CSVWizard *dlg, CSVImporterCore 
*imp) :
 
   m_profile = dynamic_cast(m_imp->m_profile);
 
-  connect(ui->m_amountCol, SIGNAL(currentIndexChanged(int)), this, 
SLOT(amountColSelected(int)));
-  connect(ui->m_debitCol, SIGNAL(currentIndexChanged(int)), this, 
SLOT(debitColSelected(int)));
-  connect(ui->m_creditCol, SIGNAL(currentIndexChanged(int)), this, 
SLOT(creditColSelected(int)));
-  connect(ui->m_memoCol, SIGNAL(currentIndexChanged(int)), this, 
SLOT(memoColSelected(int)));
-  connect(ui->m_numberCol, SIGNAL(currentIndexChanged(int)), this, 
SLOT(numberColSelected(int)));
-  connect(ui->m_dateCol, SIGNAL(currentIndexChanged(int)), this, 
SLOT(dateColSelected(int)));
-  connect(ui->m_payeeCol, SIGNAL(currentIndexChanged(int)), this, 
SLOT(payeeColSelected(int)));
-  connect(ui->m_categoryCol, SIGNAL(currentIndexChanged(int)), this, 
SLOT(categoryColSelected(int)));
+  void (QComboBox::* signal)(int) = &QComboBox::currentIndexChanged;
+  connect(ui->m_amountCol, signal, this, &BankingPage::amountColSelected);
+  connect(ui->m_debitCol, signal, this, &BankingPage::debitColSelected);
+  connect(ui->m_creditCol, signal, this, &BankingPage::creditColSelected);
+  connect(ui->m_memoCol, signal, this, &BankingPage::memoColSelected);
+  connect(ui->m_numberCol, signal, this, &BankingPage::numberColSelected);
+  connect(ui->m_dateCol, signal, this, &BankingPage::dateColSelected);
+  connect(ui->m_payeeCol, signal, this, &BankingPage::payeeColSelected);
+  connect(ui->m_categoryCol, signal, this, &BankingPage::categoryColSelected);
+
+  connect(ui->m_clearMemoColumns, &QToolButton::clicked, this, 
&BankingPage::clearMemoColumns);
+
+  updateCurrentMemoSelection();
 }
 
 BankingPage::~BankingPage()
@@ -89,8 +94,9 @@ void BankingPage::initializePage()
 m_dlg->initializeComboBoxes(columns);
 
   columns.remove(Column::Memo);
-  for (auto it = columns.cbegin(); it != columns.cend(); ++it)
+  for (auto it = columns.cbegin(); it != columns.cend(); ++it) {
 it.value()->setCurrentIndex(m_profile->m_colTypeNum.value(it.key()));
+  }
 
   ui->m_oppositeSigns->setChecked(m_profile->m_oppositeSigns);
 
@@ -123,11 +129,12 @@ bool BankingPage::isComplete() const
 
 bool BankingPage::validateMemoComboBox()
 {
-  if (m_profile->m_memoColList.count() == 0)
+  if (m_profile->m_memoColList.isEmpty())
 return true;
+
   for (int i = 0; i < ui->m_memoCol->count(); ++i)
   {
-QString txt = ui->m_memoCol->itemText(i);
+const QString txt = ui->m_memoCol->itemText(i);
 if (txt.contains(QLatin1Char('*')))  // check if text containing '*' 
belongs to valid column types
   if (m_profile->m_colNumType.value(i) != Column::Payee) {
 ui->m_memoCol->setItemText(i, QString::number(i + 1));
@@ -161,17 +168,38 @@ void BankingPage::memoColSelected(int col)
 else
   ui->m_memoCol->setCurrentIndex(-1);
 ui->m_memoCol->blockSignals(false);
-return;
+
+  } else {
+if (m_profile->m_colTypeNum.value(Column::Memo) != -1)// check if 
this memo has any column 'number' assigned...
+  m_profile->m_memoColList.removeOne(col);   // ...if true remove 
it from memo list
+
+if(validateSelectedColumn(col, Column::Memo)) {
+  if (col != - 1 && !m_profile->m_memoColList.contains(col)) {
+m_profile->m_memoColList.append(col);
+qSort(m_profile->m_memoColList);
+  }
+}
   }
+  updateCurrentMemoSelection();
+}
 
-  if (m_profile->m_colTypeNum.value(Column::Memo) != -1)// check if 
this memo has any column 'number' assigned...
-m_profile->m_memoColList.removeOne(col);  

[kmymoney/5.0] kmymoney/dialogs/settings: Fixed spelling in a dialog

2019-04-01 Thread Thomas Baumgart
Git commit 0f85e6f84e212faf6217dd7db631741dda2a77fc by Thomas Baumgart.
Committed on 01/04/2019 at 20:19.
Pushed by tbaumgart into branch '5.0'.

Fixed spelling in a dialog

GUI:

M  +1-1kmymoney/dialogs/settings/ksettingsregister.ui

https://commits.kde.org/kmymoney/0f85e6f84e212faf6217dd7db631741dda2a77fc

diff --git a/kmymoney/dialogs/settings/ksettingsregister.ui 
b/kmymoney/dialogs/settings/ksettingsregister.ui
index bbd451849..358c81d4b 100644
--- a/kmymoney/dialogs/settings/ksettingsregister.ui
+++ b/kmymoney/dialogs/settings/ksettingsregister.ui
@@ -358,7 +358,7 @@ Selecting 0% will list all transactions.
   

 
- Same transaction if amount differes less than 
+ Same transaction if amount differs less than 
 

   


[kmymoney/5.0] doc: Fixed a few typos in the recent documentation changes

2019-04-01 Thread Thomas Baumgart
Git commit acbdb38736b371e2f2d445a4635c241c26d5c713 by Thomas Baumgart.
Committed on 01/04/2019 at 20:18.
Pushed by tbaumgart into branch '5.0'.

Fixed a few typos in the recent documentation changes

M  +22   -20   doc/details-settings.docbook

https://commits.kde.org/kmymoney/acbdb38736b371e2f2d445a4635c241c26d5c713

diff --git a/doc/details-settings.docbook b/doc/details-settings.docbook
index 83c230f1c..b7c46e8c6 100644
--- a/doc/details-settings.docbook
+++ b/doc/details-settings.docbook
@@ -16,9 +16,9 @@
 &kmymoney; Settings
 
 
-   The settings described below modify the behavior of &kmymoney;, allwing you
+   The settings described below modify the behavior of &kmymoney;, allowing you
to customize it to meet the needs of your unique financial affairs, and to
-   modify it's look and feel to match your personality.  These settings can be
+   modify its look and feel to match your personality.  These settings can be
changed through 
SettingsConfigure
&kmymoney;... or by using the keyboard shortcut
CtlShift
@@ -32,7 +32,7 @@
 those icons, the right part of the dialog will display controls for
 configuring that area of the program, often divided into several tabs.
 
-  
+
 
 General
 
@@ -62,9 +62,9 @@
   entering a transaction) up to 60 minutes.
 
   Checking the Autosave when file is modified upon 
close box
-  instructs &kmymoney; to autosave your file when the program is closed. 
You also have the 
+  instructs &kmymoney; to autosave your file when the program is closed. 
You also have the
   option upon closing the program to backup your &kmymoney; file.  The 
Number of backup to
-  keep can be set at 0 (Off) upto to 20 backups.  Any backup files will be 
stored in the same 
+  keep can be set at 0 (Off) upto to 20 backups.  Any backup files will be 
stored in the same
   folder as the main file.  The will be labeled sequentially with 1 being 
the most current.
 
   
@@ -123,18 +123,18 @@
   closed.
 
   
-  
+
   
   Type of the KMyMoney View
 
You can select one of three general layouts for &kmymoney; to 
use.  If
   you select the List or Tree view, the icons and their labels will be 
located at
-  left side of the window.  The List view displays larger icons while the 
Tree
+  the left side of the window.  The List view displays larger icons while 
the Tree
   view has smaller icons.  The Tabbed view locates the icons and labels 
across
   the top of the window.
 
   
-  
+
   
 Show title bar on each page
 
@@ -196,7 +196,7 @@
   which contain the opening balances for other accounts.
 
   
-  
+
   
   Show categories in the accounts list view
 
@@ -204,7 +204,7 @@
   option will display the Categories in the Accounts View.
 
   
-  
+
   
   Do not show zero balance equities
 
@@ -301,7 +301,7 @@
   within the AccountEdit 
account...
   Configuration dialog.
   For this and all other account list sections addressed by this set 
of
-  options, the display will includ the account name and current balance, 
and
+  options, the display will include the account name and current balance, 
and
   other columns specific to that type of report, and in some cases, as 
configured
   elsewhere.
   
 
   
 
@@ -470,7 +472,7 @@ of accounts.
   parts.
 
   
-  
+
   
 Show all register entries in full detail
 
@@ -483,7 +485,7 @@ of accounts.
   Detail menu option.
 
   
-  
+
   
 Use the ledger lens
 
@@ -665,7 +667,7 @@ of accounts.
   
 Autofill
 
-  This option allows you to select the deired behavior for autofill.
+  This option allows you to select the desired behavior for autofill.
   This controls which, if any, previous transactions for the same payee are
   displayed, and which, if any, of those transactions are used to auto-fill
   details of the new transaction.
@@ -749,7 +751,7 @@ of accounts.
   
 Check schedules upon startup
 
-  Enables checking the schedule upon startup of &kmymoney;.  If 
+  Enables checking the schedule upon startup of &kmymoney;.  If
   a scheduled transaction matches the schedule criteria set then &kmymoney;
   will produce a notification requiring handling of the transaction. 

 
@@ -764,7 +766,7 @@ of accounts.
   
 
 
-  
+
 
 Processing Days
 
@@ -833,7 +835,7 @@ of accounts.
   You can select a defined basic color, pick a color by clicking anywhere on 
the
   screen, input an HTML defined color, specify values for Hue, Saturation,
   Value, Red, Green, and Blue.
-  
+
 
 
 
@@ -881,7 +883,7 @@ of accounts.
 Individual icon settings
 
   Using the pull-down menu there is a selection of available icons 
available for use.
-  Additional icons may be available for downloading and use depending on 
the operating 
+  Additional icons

D20389: doc: drop almost all bits related to installation

2019-04-08 Thread Thomas Baumgart
tbaumgart added a reviewer: ostroffjh.

REPOSITORY
  R261 KMyMoney

REVISION DETAIL
  https://phabricator.kde.org/D20389

To: pino, ostroffjh
Cc: #kmymoney, kde-doc-english, gennad, skadinna


D20389: doc: drop almost all bits related to installation

2019-04-09 Thread Thomas Baumgart
tbaumgart added a comment.


  ... though it might be OK for 5.0 as well (after the freeze). Cleaning up the 
documentation is a good idea in general. I am all for updating our techbase 
page. I have a gut feeling that this stuff hasn't been touched in ages. Thanks 
to all for their contributions.

REPOSITORY
  R261 KMyMoney

REVISION DETAIL
  https://phabricator.kde.org/D20389

To: pino, ostroffjh
Cc: tbaumgart, #kmymoney, kde-doc-english, gennad, skadinna


[kmymoney/5.0] kmymoney/mymoney: Improve consistency warning message

2019-05-19 Thread Thomas Baumgart
Git commit 878149473b9489dc81f6a7fdabe952a941907298 by Thomas Baumgart.
Committed on 19/05/2019 at 09:12.
Pushed by tbaumgart into branch '5.0'.

Improve consistency warning message

The term 'investment' in this message is misleading. 'Security' is a
better choice.

GUI:

M  +3-3kmymoney/mymoney/mymoneyfile.cpp

https://commits.kde.org/kmymoney/878149473b9489dc81f6a7fdabe952a941907298

diff --git a/kmymoney/mymoney/mymoneyfile.cpp b/kmymoney/mymoney/mymoneyfile.cpp
index 74aad1f22..62539e39f 100644
--- a/kmymoney/mymoney/mymoneyfile.cpp
+++ b/kmymoney/mymoney/mymoneyfile.cpp
@@ -2406,7 +2406,7 @@ QStringList MyMoneyFile::consistencyCheck()
 && (!securityPriceDate.contains(reversePricePair) || 
securityPriceDate.value(reversePricePair) > 
(*accForeignList_it).openingDate())) {
   if (firstInvProblem) {
 firstInvProblem = false;
-rc << i18n("* Potential problem with investments/currencies");
+rc << i18n("* Potential problem with securities/currencies");
   }
   QDate openingDate = (*accForeignList_it).openingDate();
   MyMoneySecurity secError = security((*accForeignList_it).currencyId());
@@ -2414,8 +2414,8 @@ QStringList MyMoneyFile::consistencyCheck()
 rc << i18n("  * The account '%1' in currency '%2' has no price set for 
the opening date '%3'.", (*accForeignList_it).name(), secError.name(), 
openingDate.toString(Qt::ISODate));
 rc << i18n("Please enter a price for the currency on or before the 
opening date.");
   } else {
-rc << i18n("  * The investment '%1' has no price set for the opening 
date '%2'.", (*accForeignList_it).name(), openingDate.toString(Qt::ISODate));
-rc << i18n("Please enter a price for the investment on or before 
the opening date.");
+rc << i18n("  * The security '%1' has no price set for the opening 
date '%2'.", (*accForeignList_it).name(), openingDate.toString(Qt::ISODate));
+rc << i18n("Please enter a price for the security on or before the 
opening date.");
   }
   ++unfixedCount;
 }


[kmymoney/5.0] doc: doc: Write docbook date in standard format

2019-06-15 Thread Thomas Baumgart
Git commit 7949caa8901846e01b294e1265c64aa6c4775ec5 by Thomas Baumgart.
Committed on 15/06/2019 at 09:54.
Pushed by tbaumgart into branch '5.0'.

doc: Write docbook date in standard format

(cherry picked from commit 885d68311f938a11af0a7ec80f2084198c6175fe)

M  +1-1doc/details-impexp.docbook

https://commits.kde.org/kmymoney/7949caa8901846e01b294e1265c64aa6c4775ec5

diff --git a/doc/details-impexp.docbook b/doc/details-impexp.docbook
index 07f750035..881151a61 100644
--- a/doc/details-impexp.docbook
+++ b/doc/details-impexp.docbook
@@ -4,7 +4,7 @@
   
  &Ace.Jones; &Ace.Jones.mail; 
   
-  2011-07-3
+  2011-07-03
   4.6
 
 


[kmymoney/5.0] kmymoney/views: Fix tab title of auto categorization tab in payees view

2019-06-24 Thread Thomas Baumgart
Git commit 7e641a2163fb83f44209d127319dae856bbec8b6 by Thomas Baumgart.
Committed on 24/06/2019 at 16:32.
Pushed by tbaumgart into branch '5.0'.

Fix tab title of auto categorization tab in payees view

The tab title "Default Account" was misleading when on the tab we use
the term "Default Category". Also removed a superfluous newline in a
string on that tab.

BUG: 409089
FIXED-IN: 5.0.5
GUI:

M  +2-3kmymoney/views/kpayeesview.ui

https://commits.kde.org/kmymoney/7e641a2163fb83f44209d127319dae856bbec8b6

diff --git a/kmymoney/views/kpayeesview.ui b/kmymoney/views/kpayeesview.ui
index 296f54931..16dcd0d20 100644
--- a/kmymoney/views/kpayeesview.ui
+++ b/kmymoney/views/kpayeesview.ui
@@ -395,14 +395,13 @@
   
   

-Default Account
+Default Category


 
  
   
-   Use the default category for
-new transactions with this payee
+   Use the default category for new transactions with this 
payee
   
  
 


[kmymoney/5.0] kmymoney/settings: Improve tooltip for a setting

2019-06-25 Thread Thomas Baumgart
Git commit af55a52c4788e035eba9f309126d339b148e4898 by Thomas Baumgart.
Committed on 25/06/2019 at 19:15.
Pushed by tbaumgart into branch '5.0'.

Improve tooltip for a setting

GUI:

M  +1-1kmymoney/settings/kmymoney.kcfg

https://commits.kde.org/kmymoney/af55a52c4788e035eba9f309126d339b148e4898

diff --git a/kmymoney/settings/kmymoney.kcfg b/kmymoney/settings/kmymoney.kcfg
index 2d09befd6..dddb670b3 100644
--- a/kmymoney/settings/kmymoney.kcfg
+++ b/kmymoney/settings/kmymoney.kcfg
@@ -173,7 +173,7 @@
true
   
   
-   Show balance-status of mapped online accounts on the Homepage
+   Show balance status on the Homepage for accounts where data imports 
include balance information.
false
   
   



[kmymoney/5.0] kmymoney: Allow to modify the initial section of a date edit by the user

2019-08-31 Thread Thomas Baumgart
Git commit 5f5848ba2b3a2148aa402fe87d8c41ba1ebdb329 by Thomas Baumgart.
Committed on 31/08/2019 at 15:36.
Pushed by tbaumgart into branch '5.0'.

Allow to modify the initial section of a date edit by the user

This introduces a new option on the data entry tab of the ledger
settings page.

GUI:
BUG: 374123
FIXED-IN: 4.8.1,5.0.7

M  +48   -6kmymoney/dialogs/settings/ksettingsregister.ui
M  +9-0kmymoney/settings/kmymoney.kcfg
M  +1-0kmymoney/settings/kmymoneysettings.kcfgc
M  +18   -5kmymoney/widgets/kmymoneydateinput.cpp
M  +3-0kmymoney/widgets/kmymoneydateinput.h

https://commits.kde.org/kmymoney/5f5848ba2b3a2148aa402fe87d8c41ba1ebdb329

diff --git a/kmymoney/dialogs/settings/ksettingsregister.ui 
b/kmymoney/dialogs/settings/ksettingsregister.ui
index 358c81d4b..da3a1cea4 100644
--- a/kmymoney/dialogs/settings/ksettingsregister.ui
+++ b/kmymoney/dialogs/settings/ksettingsregister.ui
@@ -7,7 +7,7 @@
 0
 0
 632
-500
+512

   
   
@@ -17,7 +17,7 @@

 
  
-  2
+  0
  
  
   
@@ -245,8 +245,50 @@
 


-
- 
+
+ 
+  
+   
+Initial cursor position within the date field
+   
+  
+ 
+ 
+  
+   
+
+ Day
+
+   
+   
+
+ Month
+
+   
+   
+
+ Year
+
+   
+  
+ 
+ 
+  
+   
+Qt::Horizontal
+   
+   
+QSizePolicy::Expanding
+   
+   
+
+ 31
+ 20
+
+   
+  
+ 
+ 
   

 Default reconciliation state
@@ -256,7 +298,7 @@

   
  
- 
+ 
   

 Default reconciliation state for transactions entered 
during reconciliation of an account
@@ -278,7 +320,7 @@

   
  
- 
+ 
   

 Qt::Horizontal
diff --git a/kmymoney/settings/kmymoney.kcfg b/kmymoney/settings/kmymoney.kcfg
index dddb670b3..3662c5add 100644
--- a/kmymoney/settings/kmymoney.kcfg
+++ b/kmymoney/settings/kmymoney.kcfg
@@ -327,6 +327,15 @@
Sort order of register in search dialog
1,-9,-4
   
+  
+   Initial cursor position within the date field
+   Day
+   
+ 
+ 
+ 
+   
+  
   
Default reconciliation state for transactions entered during 
reconciliation
0
diff --git a/kmymoney/settings/kmymoneysettings.kcfgc 
b/kmymoney/settings/kmymoneysettings.kcfgc
index ffcf13884..ea5eef567 100644
--- a/kmymoney/settings/kmymoneysettings.kcfgc
+++ b/kmymoney/settings/kmymoneysettings.kcfgc
@@ -7,3 +7,4 @@ 
IncludeFiles=\"kmm_settings_export.h\",\"kmymoneysettings_addon.h\"
 SourceIncludeFiles=\"kmymoneysettings_addons.cpp\"
 Visibility=KMM_SETTINGS_EXPORT
 CustomAdditions=true
+UseEnumTypes=true
diff --git a/kmymoney/widgets/kmymoneydateinput.cpp 
b/kmymoney/widgets/kmymoneydateinput.cpp
index 6ecd2679d..d34e926e5 100644
--- a/kmymoney/widgets/kmymoneydateinput.cpp
+++ b/kmymoney/widgets/kmymoneydateinput.cpp
@@ -18,6 +18,7 @@
  */
 
 #include "kmymoneydateinput.h"
+#include "kmymoneysettings.h"
 
 // 
 // QT Includes
@@ -55,8 +56,9 @@ const int DATE_POPUP_TIMEOUT = 1500;
 const QDate INVALID_DATE = QDate(1800, 1, 1);
 }
 
-KMyMoney::OldDateEdit::OldDateEdit(const QDate& date, QWidget* parent) :
-  QDateEdit(date, parent)
+KMyMoney::OldDateEdit::OldDateEdit(const QDate& date, QWidget* parent)
+  : QDateEdit(date, parent)
+  , m_initialSection(QDateTimeEdit::DaySection)
 {
 }
 
@@ -68,7 +70,7 @@ void KMyMoney::OldDateEdit::keyPressEvent(QKeyEvent* k)
 // (the same meaning as clearing the date) - in this case set the date
 // to the current date and let the editor do the actual work
 setDate(QDate::currentDate());
-setSelectedSection(QDateTimeEdit::DaySection); // start as when focused in 
if the date was cleared
+setSelectedSection(m_initialSection); // start as when focused in if the 
date was cleared
   }
   QDateEdit::keyPressEvent(k);
 }
@@ -76,7 +78,7 @@ void KMyMoney::OldDateEdit::keyPressEvent(QKeyEvent* k)
 void KMyMoney::OldDateEdit::focusInEvent(QFocusEvent * event)
 {
   QDateEdit::focusInEvent(event);
-  setSelectedSection(QDateTimeEdit::DaySection);
+  setSelectedSection(m_initialSection);
 }
 
 bool KMyMoney::OldDateEdit::event(QEvent* e)
@@ -105,7 +107,7 @@ bool KMyMoney::OldDateEdit::focusNextPrevChild(bool next)
 }
 
 struct KMyMoneyDateInput::Private {
-  QDateEdit *m_dateEdit;
+  KMyMoney::OldDateEdit *m_dateEdit;
   KDatePicker *m_datePicker;
   QDate

[kmymoney/5.0] doc: Fix link: ui.html -> menus.html

2019-11-27 Thread Thomas Baumgart
Git commit 4e41de1e4dd9b734507b0594c751b07fdf72ba07 by Thomas Baumgart.
Committed on 27/11/2019 at 10:20.
Pushed by tbaumgart into branch '5.0'.

Fix link: ui.html -> menus.html

(cherry picked from commit 96e3d4016a97de1d150659261bd1a80860a19019)

M  +1-1doc/reference.docbook

https://commits.kde.org/kmymoney/4e41de1e4dd9b734507b0594c751b07fdf72ba07

diff --git a/doc/reference.docbook b/doc/reference.docbook
index 49aadb6fe..54cfdb81d 100644
--- a/doc/reference.docbook
+++ b/doc/reference.docbook
@@ -769,7 +769,7 @@
 Settings and Help Menu
 
 &kmymoney; has the default &kde; Settings and Help menu as described in 
the
-&kde; Fundamentals
+&kde; Fundamentals
 with one additional entry:
 
 


[kmymoney] doc: Add initial notes on reusing an existing security in a second investment

2020-01-05 Thread Thomas Baumgart
Git commit 95590fbf0ece4452f7f20ca7803f532385e0cb90 by Thomas Baumgart.
Committed on 05/01/2020 at 11:02.
Pushed by tbaumgart into branch 'master'.

Add initial notes on reusing an existing security in a second investment

account.  Expansion and screenshots to be added later.

(cherry picked from commit 8547037f9373f5ae8c5d3d039a2e6f6fe2514c52)

M  +45   -3doc/details-investments.docbook

https://commits.kde.org/kmymoney/95590fbf0ece4452f7f20ca7803f532385e0cb90

diff --git a/doc/details-investments.docbook b/doc/details-investments.docbook
index 2fb1786ff..c0b29a398 100644
--- a/doc/details-investments.docbook
+++ b/doc/details-investments.docbook
@@ -7,9 +7,10 @@
   
MichaelCarpino
   mfcarp...@gmail.com
 
+ &Jack.H.Ostroff; &Jack.H.Ostroff.mail; 
   
-  2019-04-04
-  5.0.3
+  2019-12-30
+  5.0.7
 
 
 Investments
@@ -234,6 +235,43 @@
 
   
 
+
+
+
+  Using a Security in more than one Investment Account
+
+
+  
+This section has been added just in time for the release of Version 5.0.8. 
 The
+author felt it was important to include at least the basic information 
now, since
+this topic has been a source of difficulty for some time.  The discussion 
will be
+expanded and screenshots of the New Security Wizard will be added as soon 
as
+possible.
+  
+
+  
+
+  It is possible to own shares of the same security in different investment 
accounts,
+  such as a regular investment account and also a retirement account.  If you 
follow the
+  instructions above, you will have that security show up in both accounts, but
+  &kmymoney; will actually treat them as if each of the securities is a 
different
+  underlying equity.  This results in duplicate storage, such as having two 
copies of
+  the entire price history of the equity.  Therefore, you may prefer to have 
both
+  securities refer to the same underlying equity.
+
+
+
+  When you add a security to an investment account, and that security already 
exists in
+  another investment account, you need to be careful if you want to reuse it 
rather than
+  creating a new, duplicate security.  When you see the New 
Investment
+  Wizard, after selecting the type of investment and clicking
+  Next, you need to be sure the Full 
Name
+  field is empty before entering the Trading Symbol.  
When you hit
+  Tab, if &kmymoney; already has a security using that 
symbol, it will
+  ask if you wish to reuse it.  If you click Yes, it 
will fill in
+  the rest of that dialog, and you can then just click 
Next.
+
+
 
 
 
@@ -252,6 +290,11 @@
   on the screen by selecting any of them by left clicking on the item in the 
top bar and
   dragging it to the left or right. 
 
+
+  If you choose to Edit an Investment, you will use the Investment 
detail
+  wizard, which looks and functions just like the New 
Investment
+  Wizard, as described in the previous section.
+
 
 
 
@@ -690,4 +733,3 @@
 
 
 
-


D27582: Documentation improveshttp: to https:, Review links and some menu items

2020-02-22 Thread Thomas Baumgart
tbaumgart added a comment.


  In D27582#616092 , @Abella wrote:
  
  > Next time I use kmymo...@kde.org 
 mailing list. Chapter updates 
by KMyMoney team will be very welcome by Catalan team.
  
  
  The kmymoney-de...@kde.org  
mailing list is an even better option for that purpose.

REPOSITORY
  R261 KMyMoney

BRANCH
  Documentation_improves (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D27582

To: Abella, #kmymoney, habacker, yurchor, ostroffjh
Cc: tbaumgart, ostroffjh, kde-doc-english, jhayes, brunourias, gennad, 
fbampaloukas, jefferyq, domson, ftonello, James, skadinna, mhubner, MayeulC, 
kaning


D27582: Documentation improveshttp: to https:, Review links and some menu items

2020-02-23 Thread Thomas Baumgart
tbaumgart added a comment.


  In D27582#616283 , @Abella wrote:
  
  > I can commit into master (whit 'arc land') but I don't know how to do it in 
5.0
  
  
  Please do that. I'll take care of the 5.0 branch then.

REPOSITORY
  R261 KMyMoney

BRANCH
  Documentation_improves (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D27582

To: Abella, #kmymoney, habacker, yurchor, ostroffjh
Cc: tbaumgart, ostroffjh, kde-doc-english, jhayes, brunourias, gennad, 
fbampaloukas, jefferyq, domson, ftonello, James, skadinna, mhubner, MayeulC, 
kaning


[kmymoney/5.0] doc: Documentation improves

2020-02-23 Thread Thomas Baumgart
Git commit b065e59d59a567c9c8bbcc5664b1b255bee7fa59 by Thomas Baumgart.
Committed on 23/02/2020 at 20:38.
Pushed by tbaumgart into branch '5.0'.

Documentation improves

http: to https:, Review links and some menu items

Summary: First fixes from translation workflow

Test Plan: Validate links

Reviewers: #kmymoney, habacker, yurchor, ostroffjh

Reviewed By: #kmymoney, ostroffjh

Subscribers: tbaumgart, ostroffjh, kde-doc-english

Tags: #kmymoney, #documentation

Differential Revision: https://phabricator.kde.org/D27582

(cherry picked from commit b6809684c982cac5d6bfe944cda329081647)

M  +3-3doc/details-accounts.docbook
M  +6-6doc/details-database.docbook
M  +1-1doc/details-formats.docbook
M  +3-3doc/details-impexp-csv.docbook
M  +4-3doc/details-impexp-csvexp.docbook
M  +14   -15   doc/details-impexp.docbook
M  +1-1doc/details-institutions.docbook
M  +3-3doc/details-investments.docbook
M  +1-1doc/details-search.docbook
M  +6-7doc/faq.docbook
M  +12   -12   doc/firsttime.docbook
M  +2-2doc/introduction.docbook
M  +9-9doc/makemostof.docbook
M  +1-1doc/reference.docbook
M  +1-1doc/whatsnew.docbook

https://commits.kde.org/kmymoney/b065e59d59a567c9c8bbcc5664b1b255bee7fa59

diff --git a/doc/details-accounts.docbook b/doc/details-accounts.docbook
index 692d5b6b5..3714cd46f 100644
--- a/doc/details-accounts.docbook
+++ b/doc/details-accounts.docbook
@@ -108,9 +108,9 @@
 
 
 
-  The Account Number and the http://en.wikipedia.org/wiki/International_Bank_Account_Number";>IBAN
-  (International Bank Account Number) are not currently used
+  The Account Number and the https://en.wikipedia.org/wiki/International_Bank_Account_Number";>IBAN
+  (International Bank Account Number) are not currently used
   by &kmymoney;.  These fields may be left blank and filled in at a later time;
   they are only required for online banking.
 
diff --git a/doc/details-database.docbook b/doc/details-database.docbook
index f4ff2..72a4e51ce 100644
--- a/doc/details-database.docbook
+++ b/doc/details-database.docbook
@@ -55,7 +55,7 @@
   In addition to the database software itself, you must also install the
   corresponding &Qt; driver module. Most distributions will include driver
   modules for the more popular databases. Otherwise, check with the http://qt-project.org";>&Qt; software web site and search for
+  url="https://www.qt.io/";>&Qt; software web site and search for
   'SQL drivers'
 
 
@@ -135,8 +135,8 @@
 
 
   Using &kmymoney;, open or import an existing data file, or create a new
-  one. Then select Save as Database from the
-  File menu. This will present the following dialog:
+  one. Then select FileSave as 
Database
+  menu item. This will present the following dialog:
 
 
 
@@ -160,7 +160,7 @@
   This box lists all &Qt; SQL drivers installed on your system. Select the
   driver for your database type. If the one you want is not in the list, you
   need to install the appropriate driver. See your distribution documentation,
-  or visit the http://qt-project.org/"; type="">&Qt; software web
+  or visit the https://www.qt.io/"; type="">&Qt; software web
   site and search for 'SQL drivers'.
 
 
@@ -218,8 +218,8 @@
 Table design
 
 
-  To access your data in &kmymoney;, use the Open
-  Database entry in the File menu. This will
+  To access your data in &kmymoney;, use the 
FileOpen
+  Database menu item. This will
   open a dialog similar to the above.
 
 
diff --git a/doc/details-formats.docbook b/doc/details-formats.docbook
index 08f8c71c8..f0bafef06 100644
--- a/doc/details-formats.docbook
+++ b/doc/details-formats.docbook
@@ -121,7 +121,7 @@
 
   The details about how to generate a key-pair and how to take care of it are
   beyond the scope of this document.  A Mini Howto on this subject can be found
-  at http://www.gnupg.org/documentation/howtos.en.html";>http://www.gnupg.org/documentation/howtos.en.html.
+  at https://www.gnupg.org/documentation/howtos.en.html";>https://www.gnupg.org/documentation/howtos.en.html.
 
 
 
diff --git a/doc/details-impexp-csv.docbook b/doc/details-impexp-csv.docbook
index 60f03fd5a..05adc74e0 100644
--- a/doc/details-impexp-csv.docbook
+++ b/doc/details-impexp-csv.docbook
@@ -36,8 +36,8 @@
   source files.  Once the distro package is installed, or the source files are
   compiled and installed, the menu choice to import CSV files will 
automatically
   show up under the
-  
FileImport
-  menu.
+  
FileImport
+  submenu.
 
 
 
@@ -65,7 +65,7 @@
 
 
   To import a CSV file, choose the importer from the menu bar:
-  
FileImportCSV
+  FileImport 
CSV
   If CSV does not show up under Import, you do not have the CSV Importer Plugin
   installed correctly.  Please see the previous section.
 
diff --git a/doc/detail

[kmymoney/5.0] doc: Fix minor typo:: de -> the

2020-02-24 Thread Thomas Baumgart
Git commit 4d560f17543f6cfea34fe5b01a0b8cd3e7f083c5 by Thomas Baumgart.
Committed on 24/02/2020 at 18:00.
Pushed by tbaumgart into branch '5.0'.

Fix minor typo:: de -> the

(cherry picked from commit d797019ad3a690170ffe10c20e8613e0b72635a0)

M  +1-1doc/faq.docbook

https://commits.kde.org/kmymoney/4d560f17543f6cfea34fe5b01a0b8cd3e7f083c5

diff --git a/doc/faq.docbook b/doc/faq.docbook
index 9bf7bbf41..f956fa8e3 100644
--- a/doc/faq.docbook
+++ b/doc/faq.docbook
@@ -179,7 +179,7 @@
There is no global search and replace function in KMyMoney.
Nevertheless, it is easy to change a payees name: select the Payees view and
find the entry with the name you want to change.  Click with the &RMB; on 
the
-   payee, and select Rename payee from de context 
menu.
+   payee, and select Rename payee from the context 
menu.
Enter the new name. Since the transactions only use a reference to the 
payees
record, all transactions now show the new name.
  


[kmymoney/5.0] kmymoney: Improve handling of the backup feature on MS windows

2020-03-22 Thread Thomas Baumgart
Git commit c195e0cda57949891207f5c7f2c817d2b6fbe298 by Thomas Baumgart.
Committed on 22/03/2020 at 18:27.
Pushed by tbaumgart into branch '5.0'.

Improve handling of the backup feature on MS windows

On windows the option to mount a device is not available. So the GUI
elements have been removed in this case and the label is adjusted to be
more precise.

GUI:
BUG: 419082
FIXED-IN: 5.0.9

M  +10   -0kmymoney/dialogs/kbackupdlg.cpp
M  +15   -35   kmymoney/dialogs/kbackupdlg.ui
M  +15   -3kmymoney/kmymoney.cpp

https://commits.kde.org/kmymoney/c195e0cda57949891207f5c7f2c817d2b6fbe298

diff --git a/kmymoney/dialogs/kbackupdlg.cpp b/kmymoney/dialogs/kbackupdlg.cpp
index b19ea45c2..1966c361c 100644
--- a/kmymoney/dialogs/kbackupdlg.cpp
+++ b/kmymoney/dialogs/kbackupdlg.cpp
@@ -2,6 +2,7 @@
  * Copyright 2001-2003  Michael Edwardes 
  * Copyright 2001-2002  Felix Rodriguez 
  * Copyright 2017   Łukasz Wojniłowicz 
+ * Copyright 2020       Thomas Baumgart 
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
@@ -52,6 +53,15 @@ KBackupDlg::KBackupDlg(QWidget* parent) :
   ui->setupUi(this);
   readConfig();
 
+#ifdef Q_OS_WIN
+  // in windows we don't have a mount capability so
+  // we hide that option from the user and deactivate it
+  ui->mountCheckBox->setChecked(false);
+  ui->mountCheckBox->hide();
+  ui->txtAutoMount->hide();
+  ui->lblMountPoint->setText(i18n("Backup location:"));
+#endif
+
   ui->chooseButton->setIcon(Icons::get(Icon::Folder));
 
   connect(ui->chooseButton, &QAbstractButton::clicked, this, 
&KBackupDlg::chooseButtonClicked);
diff --git a/kmymoney/dialogs/kbackupdlg.ui b/kmymoney/dialogs/kbackupdlg.ui
index 706691fd4..0a0615305 100644
--- a/kmymoney/dialogs/kbackupdlg.ui
+++ b/kmymoney/dialogs/kbackupdlg.ui
@@ -7,53 +7,23 @@
 0
 0
 641
-301
+369

   
   
Backup
   
-  
-   
-6
-   
-   
-11
-   
-   
-11
-   
-   
-11
-   
-   
-11
-   
+  

-
- 
-  6
- 
- 
-  0
- 
- 
-  0
- 
- 
-  0
- 
- 
-  0
- 
+
  
   

-Use this dialog to backup your data. 
+Use this dialog to backup your data.
 
 Please make sure you have a disk inserted and that the drive is ready. Then 
choose the mount point from either the Choose button or by entering the path in 
the available box.
 
-Click OK to perform the backup. If your system does not use an automounter, 
make sure you mark the checkbox below to "mount this directory before 
backing up."
+Click OK to perform the backup.


 Qt::AlignTop
@@ -63,6 +33,16 @@ Click OK to perform the backup. If your system does not use 
an automounter, make

   
  
+ 
+  
+   
+If your system does not use an automounter, make sure you mark 
the checkbox below to "mount this directory before backing 
up."
+   
+   
+true
+   
+  
+ 
 


diff --git a/kmymoney/kmymoney.cpp b/kmymoney/kmymoney.cpp
index 8d4a3fa2f..4382950a9 100644
--- a/kmymoney/kmymoney.cpp
+++ b/kmymoney/kmymoney.cpp
@@ -2,7 +2,7 @@
   kmymoney.cpp
  ---
 copyright    : (C) 2000 by Michael Edwardes 

-       (C) 2002-2019 by Thomas Baumgart 
+   (C) 2002-2020 by Thomas Baumgart 
(C) 2017-2018 by Łukasz Wojniłowicz 

 
 /
@@ -2339,9 +2339,8 @@ void KMyMoneyApp::slotBackupFile()
 
   QPointer backupDlg = new KBackupDlg(this);
   int returncode = backupDlg->exec();
-  if (returncode == QDialog::Accepted && backupDlg != 0) {
-
 
+  if (returncode == QDialog::Accepted && backupDlg != 0) {
 d->m_backupMount = backupDlg->mountCheckBoxChecked();
 d->m_proc.clearProgram();
 d->m_backupState = BACKUP_MOUNTING;
@@ -2382,6 +2381,19 @@ bool KMyMoneyApp::slotBackupWriteFile()
   QString backupfile = d->m_mountpoint + '/' + d->m_storageInfo.url.fileName();
   KMyMoneyUtils::appendCorrectFileExt(backupfile, today);
 
+#ifdef Q_OS_WIN
+  // on windows, a leading slash is a problem if a drive letter follows
+  // eg. "/Z:/path". In case we detect such a pattern, we simply remove
+  // the leading slash
+  const QRegularExpression re(QStringLiteral("/(?\\w+:/.+)"),
+  
QRegularExpression::CaseInsensitiveOption|QRegularExpression::UseUnicodePropertiesOption
+ );
+  const auto match = re.match(backupfile);
+  if (match.hasMatch() && !match.captured(QStringLiteral("path")).isEmpty()) {
+backupfile = match.captured(QStringLiteral("path"));
+  }
+#endif
+
   // check if file already exists and ask what to do
   QFile f(backupfile);
   if (f.exists()) {


[kmymoney/5.0] kmymoney/wizards/newinvestmentwizard: Make InvestmentWizard error message user-friendly

2020-04-30 Thread Thomas Baumgart
Git commit 62d4670b21c949af8254a5351fd5897540bcca72 by Thomas Baumgart.
Committed on 01/05/2020 at 05:44.
Pushed by tbaumgart into branch '5.0'.

Make InvestmentWizard error message user-friendly

Users don't know what "objects" are, make the error message
user-friendly.

GUI:

(cherry picked from commit d2fc61b3b8141244f690a5c3df5e3bad12aa7646)

M  +1-1kmymoney/wizards/newinvestmentwizard/knewinvestmentwizard.cpp

https://commits.kde.org/kmymoney/62d4670b21c949af8254a5351fd5897540bcca72

diff --git a/kmymoney/wizards/newinvestmentwizard/knewinvestmentwizard.cpp 
b/kmymoney/wizards/newinvestmentwizard/knewinvestmentwizard.cpp
index f4b21370d..122482740 100644
--- a/kmymoney/wizards/newinvestmentwizard/knewinvestmentwizard.cpp
+++ b/kmymoney/wizards/newinvestmentwizard/knewinvestmentwizard.cpp
@@ -276,7 +276,7 @@ void KNewInvestmentWizard::createObjects(const QString& 
parentId)
 }
 ft.commit();
   } catch (const MyMoneyException &e) {
-KMessageBox::detailedSorry(this, i18n("Unable to create all objects for 
the investment"), QString::fromLatin1(e.what()));
+KMessageBox::detailedSorry(this, i18n("Unexpected error occurred while 
adding new investment"), QString::fromLatin1(e.what()));
   }
 }
 


[kmymoney/5.0] kmymoney: Added message contexts to support Korean translation

2020-05-01 Thread Thomas Baumgart
Git commit 187764863a426b95271b5f637f7ed6883f7e44ba by Thomas Baumgart.
Committed on 01/05/2020 at 07:18.
Pushed by tbaumgart into branch '5.0'.

Added message contexts to support Korean translation

GUI:

M  +1-1kmymoney/dialogs/kavailablecurrencydlg.ui
M  +1-1kmymoney/dialogs/kcurrencyeditdlg.ui
M  +2-2kmymoney/dialogs/kequitypriceupdatedlg.ui
M  +3-3kmymoney/dialogs/settings/ksettingsonlinequotes.cpp
M  +1-1kmymoney/models/equitiesmodel.cpp
M  +1-1kmymoney/models/securitiesmodel.cpp
M  +1-1kmymoney/plugins/csv/import/investmentwizardpage.cpp
M  +1-1kmymoney/plugins/csv/import/investmentwizardpage.ui
M  +1-1kmymoney/plugins/csv/import/securitiesdlg.ui
M  +2-2kmymoney/widgets/kmymoneycashflowcombo.cpp
M  +2-2kmymoney/widgets/transaction_p.h

https://commits.kde.org/kmymoney/187764863a426b95271b5f637f7ed6883f7e44ba

diff --git a/kmymoney/dialogs/kavailablecurrencydlg.ui 
b/kmymoney/dialogs/kavailablecurrencydlg.ui
index ddba3fc9f..63048544e 100644
--- a/kmymoney/dialogs/kavailablecurrencydlg.ui
+++ b/kmymoney/dialogs/kavailablecurrencydlg.ui
@@ -49,7 +49,7 @@
  
  
   
-   Symbol
+   Symbol
   
  
 
diff --git a/kmymoney/dialogs/kcurrencyeditdlg.ui 
b/kmymoney/dialogs/kcurrencyeditdlg.ui
index 919c6b286..0e2a9428d 100644
--- a/kmymoney/dialogs/kcurrencyeditdlg.ui
+++ b/kmymoney/dialogs/kcurrencyeditdlg.ui
@@ -49,7 +49,7 @@
  
  
   
-   Symbol
+   Symbol
   
  
 
diff --git a/kmymoney/dialogs/kequitypriceupdatedlg.ui 
b/kmymoney/dialogs/kequitypriceupdatedlg.ui
index c07429a2f..e1d2aae1a 100644
--- a/kmymoney/dialogs/kequitypriceupdatedlg.ui
+++ b/kmymoney/dialogs/kequitypriceupdatedlg.ui
@@ -56,7 +56,7 @@
  
   

-From
+From

   
  
@@ -66,7 +66,7 @@
  
   

-To
+To

   
  
diff --git a/kmymoney/dialogs/settings/ksettingsonlinequotes.cpp 
b/kmymoney/dialogs/settings/ksettingsonlinequotes.cpp
index 040db4aba..15a8d557b 100644
--- a/kmymoney/dialogs/settings/ksettingsonlinequotes.cpp
+++ b/kmymoney/dialogs/settings/ksettingsonlinequotes.cpp
@@ -81,9 +81,9 @@ KSettingsOnlineQuotes::KSettingsOnlineQuotes(QWidget *parent) 
:
   d->ui->m_deleteButton->setIcon(Icons::get(Icon::EditDelete));
   d->ui->m_newButton->setIcon(Icons::get(Icon::DocumentNew));
 
-  d->ui->m_editIdentifyBy->addItem(i18n("Symbol"), 
WebPriceQuoteSource::identifyBy::Symbol);
-  d->ui->m_editIdentifyBy->addItem(i18n("Identification number"), 
WebPriceQuoteSource::identifyBy::IdentificationNumber);
-  d->ui->m_editIdentifyBy->addItem(i18n("Name"), 
WebPriceQuoteSource::identifyBy::Name);
+  d->ui->m_editIdentifyBy->addItem(i18nc("@item:inlistbox Stock", "Symbol"), 
WebPriceQuoteSource::identifyBy::Symbol);
+  d->ui->m_editIdentifyBy->addItem(i18nc("@item:inlistbox Stock", 
"Identification number"), 
WebPriceQuoteSource::identifyBy::IdentificationNumber);
+  d->ui->m_editIdentifyBy->addItem(i18nc("@item:inlistbox Stock", "Name"), 
WebPriceQuoteSource::identifyBy::Name);
 
   connect(d->ui->m_dumpCSVProfile, &QAbstractButton::clicked, this, 
&KSettingsOnlineQuotes::slotDumpCSVProfile);
   connect(d->ui->m_updateButton, &QAbstractButton::clicked, this, 
&KSettingsOnlineQuotes::slotUpdateEntry);
diff --git a/kmymoney/models/equitiesmodel.cpp 
b/kmymoney/models/equitiesmodel.cpp
index 0bd0b0646..e82b96668 100644
--- a/kmymoney/models/equitiesmodel.cpp
+++ b/kmymoney/models/equitiesmodel.cpp
@@ -351,7 +351,7 @@ QString EquitiesModel::getHeaderName(const Column column)
 case Equity:
   return i18n("Equity");
 case Symbol:
-  return i18n("Symbol");
+  return i18nc("@title stock symbol column", "Symbol");
 case Value:
   return i18n("Value");
 case Quantity:
diff --git a/kmymoney/models/securitiesmodel.cpp 
b/kmymoney/models/securitiesmodel.cpp
index 097cca6fd..ed9c3a318 100644
--- a/kmymoney/models/securitiesmodel.cpp
+++ b/kmymoney/models/securitiesmodel.cpp
@@ -272,7 +272,7 @@ QString SecuritiesModel::getHeaderName(const Column column)
 case Security:
   return i18n("Security");
 case Symbol:
-  return i18n("Symbol");
+  return i18nc("@title stock symbol column", "Symbol");
 case Type:
   return i18n("Type");
 case Market:
diff --git a/kmymoney/plugins/csv/import/investmentwizardpage.cpp 
b/kmymoney/plugins/csv/import/investmentwizardpage.cpp
index 537284f82..b0ef37cfe 100644
--- a/kmymoney/plugins/csv/import/investmentwizardpage.cpp
+++ b/kmymoney/plugins/csv/import/investmentwizardpage.cpp
@@ -66,7 +66,7 @@ InvestmentPage::Investment

[kmymoney/5.0] kmymoney/views: Allow plural form for XX day forecast

2020-05-01 Thread Thomas Baumgart
Git commit df474925e71a96959f0d12fdbfb8720e1975eee1 by Thomas Baumgart.
Committed on 01/05/2020 at 12:40.
Pushed by tbaumgart into branch '5.0'.

Allow plural form for XX day forecast

Summary: Currently KMyMoney doesn't allow plural form to translate this
string. That doesn't translate well in some languages, for instance
French.

GUI:

Reviewers: tbaumgart

Reviewed By: tbaumgart

Differential Revision: https://phabricator.kde.org/D29306

(cherry picked from commit 33eca83146db16480a556c24863f17cb85114e44)

M  +1-1kmymoney/views/khomeview_p.h

https://commits.kde.org/kmymoney/df474925e71a96959f0d12fdbfb8720e1975eee1

diff --git a/kmymoney/views/khomeview_p.h b/kmymoney/views/khomeview_p.h
index a84f31886..a33d0a9c4 100644
--- a/kmymoney/views/khomeview_p.h
+++ b/kmymoney/views/khomeview_p.h
@@ -1046,7 +1046,7 @@ public:
 beginDay = m_forecast.accountsCycle();
 
   // Now output header
-  m_html += QString("%1\n \n").arg(i18n("%1 Day Forecast", 
m_forecast.forecastDays()));
+  m_html += QString("%1\n \n").arg(i18ncp("Forecast days", "%1 Day Forecast", 
"%1 Day Forecast", m_forecast.forecastDays()));
   m_html += "";
   m_html += "";
   m_html += i18n("Account");


[office/kmymoney] doc: Update currencies and tags chapters of handbook for 5.0

2020-05-29 Thread Thomas Baumgart
Git commit d2d353546d5e65b6019c89dd2e1ceb36e0896d1a by Thomas Baumgart, on 
behalf of Jack Ostroff.
Committed on 29/05/2020 at 14:39.
Pushed by tbaumgart into branch 'master'.

Update currencies and tags chapters of handbook for 5.0

M  +15   -11   doc/details-currencies.docbook
M  +32   -20   doc/details-tags.docbook
M  +2-2doc/whatsnew.docbook

https://invent.kde.org/office/kmymoney/commit/d2d353546d5e65b6019c89dd2e1ceb36e0896d1a

diff --git a/doc/details-currencies.docbook b/doc/details-currencies.docbook
index 4a6bc1268..1c4140a9b 100644
--- a/doc/details-currencies.docbook
+++ b/doc/details-currencies.docbook
@@ -3,9 +3,10 @@
 
   
  &Thomas.Baumgart; &Thomas.Baumgart.mail; 
+&Michael.Carpino; &Michael.Carpino.mail;
   
-  2014-08-30
-  4.7.01
+  2020-02-20
+  5.0.8
 
 
 Currencies
@@ -20,11 +21,12 @@
 Base currency
 
 
-  Once you create a &kmymoney; file, you will be asked for the base currency. 
The
-  base currency is the one that all income and expense categories use and that
-  reports will be based on. Usually, the base currency is the currency you use
-  in your country. If not otherwise selected, new accounts will use this
-  currency as the default.
+  During the initial &kmymoney; New FIle Setup, you will be asked to select the
+  base currency.  Usually, the base currency is the currency you use in your
+  country.  The base currency is the one that all income and expense categories
+  use and that reports will be based on. When you setup a new account 
&kmymoney;
+  will automatically default to the base currency.  If your account requires 
you
+  to use a different currency, you can change it during the New Account Setup.
 
 
 
@@ -71,10 +73,11 @@
 Account setup
 
 
-  If you create a new account you have the option to specify the currency in
-  which it will be managed. The ledger for the account will then show all 
values
-  in the selected currency. The new account wizard defaults this setting to the
-  base currency.
+  When you create a new account, you specify the currency in which it will be
+  managed. The New Account wizard defaults this setting to the base currency.  If you
+  require a different currency, you need to select it during this initial 
setup.
+  The ledger for the account will then show all values in the selected 
currency.
 
 
 
@@ -167,3 +170,4 @@
 
 
 
+
diff --git a/doc/details-tags.docbook b/doc/details-tags.docbook
index 263747468..caf3289d8 100644
--- a/doc/details-tags.docbook
+++ b/doc/details-tags.docbook
@@ -3,25 +3,32 @@
 
   
 &Cristian.Onet; &Cristian.Onet.mail;
+&Michael.Carpino; &Michael.Carpino.mail;
   
-  2014-08-30
-  4.7.01
+  2020-02-06
+  5.0.8
 
 
 Tags
 
 
-  The Tags screen provides detailed information about all the tags which are
-  applied to transactions. The Tags screen is split into two main
-  areas: a tags list and a detail area.
+  The Tags View provides information about all the tags that have been added by
+  the user.  The Tags screen is split into two main areas: a list of tags and a
+  detail area, which has two tabs: Transactions and Details.  The
+  Transactions tab displays all the transactions 
associated
+  with the tag.  The Details tab includes a user defined
+  color, as well as Notes, which are not used elsewhere.  Note that if you
+  change the color, which is used in the symbol displayed before the tag name 
in
+  any associated transactions, you need to click the check button at the lower
+  right of the Details area for it to be saved.
   
 
 
 Tags List
 
 
-  A list of tags is on the left side of this screen. The tags list
-  is sorted alphabetically.
+  A list of all tags, sorted alphabetically, is displayed on the left side of
+  this screen.
 
   
   
@@ -35,12 +42,15 @@
 
 Adding a Tag
 
-  To add a tag, either click on the Add tag icon
-   or
   right-click on any tag and choose New tag. This
   creates a new tag called New tag. Right-click on this tag and
   select Rename tag to enter the name of the new 
tag.
+  Finally you can add a new tag directly into the ledger page or within a 
split 
+  transaction by typing the name of the tag in the tag field.  &kmymoney; will
+  ask if you want to add this tag and after selecting yes it will be added.
 
 
 
@@ -68,10 +78,10 @@
 
 
 
-  As Tags have just been introduced to &kmymoney; in version 4.7, none of the
-  methods for importing data are able to import tags.  It is understood that
-  this is an important feature, and each import method is likely to introduce
-  it in an upcoming release.
+  As Tags were only introduced to &kmymoney; in version 4.7, none of the 
methods
+  for importing data are able to import tags.  It is understood that this is an
+  important feature, and each import method is likely to introduce it in an
+  upcoming release.
 
 
 
@@ -125,22 +135,24 @@
 
 
   
-To modify the notes associated with the tag, just edit the text i

[office/kmymoney/5.1] doc: Minor rewoding

2020-07-11 Thread Thomas Baumgart
Git commit b54fbaa912541d3f959f761cb6263a18b6f65fd9 by Thomas Baumgart, on 
behalf of Jack Ostroff.
Committed on 11/07/2020 at 09:07.
Pushed by tbaumgart into branch '5.1'.

Minor rewoding

M  +10   -9doc/details-tags.docbook

https://invent.kde.org/office/kmymoney/commit/b54fbaa912541d3f959f761cb6263a18b6f65fd9

diff --git a/doc/details-tags.docbook b/doc/details-tags.docbook
index 3cd4fa738..ff20a9f93 100644
--- a/doc/details-tags.docbook
+++ b/doc/details-tags.docbook
@@ -42,15 +42,16 @@
 
 Adding a Tag
 
-  Creating a tag can be done by 1 of 3 different ways. First you can click on 
the
-  Add tag icon   or
-  right-click on any tag and choose New tag. This
-  creates a new tag called New tag. Right-click on this tag and
-  select Rename tag to enter the name of the new 
tag.
-  Finally you can add a new tag directly into the ledger page or within a 
split 
-  transaction by typing the name of the tag in the tag field.  &kmymoney; will
-  ask if you want to add this tag and after selecting yes it 
will be added.
+  There are three different ways to create a new tag.  First, you can click on
+  the  new tag
+  icon.  Second, you can right-click on any tag and choose New
+  tag. This creates a new tag called New tag.
+  Right-click on this tag and select Rename tag to
+  enter the name of the new tag.  Finally, you can add a new tag directly into
+  the ledger page or within a split transaction by typing the name of the tag 
in
+  the tag field.  &kmymoney; will ask if you want to add this tag and after
+  selecting yes it will be added.
 
 
 



[office/kmymoney] doc: Minor rewording

2020-07-11 Thread Thomas Baumgart
Git commit 08b4a6e62789f9781d8df090452cf3732ede450f by Thomas Baumgart.
Committed on 11/07/2020 at 09:12.
Pushed by tbaumgart into branch 'master'.

Minor rewording

(cherry picked from commit b54fbaa912541d3f959f761cb6263a18b6f65fd9)

M  +10   -9doc/details-tags.docbook

https://invent.kde.org/office/kmymoney/commit/08b4a6e62789f9781d8df090452cf3732ede450f

diff --git a/doc/details-tags.docbook b/doc/details-tags.docbook
index 3cd4fa738..ff20a9f93 100644
--- a/doc/details-tags.docbook
+++ b/doc/details-tags.docbook
@@ -42,15 +42,16 @@
 
 Adding a Tag
 
-  Creating a tag can be done by 1 of 3 different ways. First you can click on 
the
-  Add tag icon   or
-  right-click on any tag and choose New tag. This
-  creates a new tag called New tag. Right-click on this tag and
-  select Rename tag to enter the name of the new 
tag.
-  Finally you can add a new tag directly into the ledger page or within a 
split 
-  transaction by typing the name of the tag in the tag field.  &kmymoney; will
-  ask if you want to add this tag and after selecting yes it 
will be added.
+  There are three different ways to create a new tag.  First, you can click on
+  the  new tag
+  icon.  Second, you can right-click on any tag and choose New
+  tag. This creates a new tag called New tag.
+  Right-click on this tag and select Rename tag to
+  enter the name of the new tag.  Finally, you can add a new tag directly into
+  the ledger page or within a split transaction by typing the name of the tag 
in
+  the tag field.  &kmymoney; will ask if you want to add this tag and after
+  selecting yes it will be added.
 
 
 



[office/kmymoney/5.1] doc: Various edits suggested by Antoni Bella Pérez.

2020-07-11 Thread Thomas Baumgart
Git commit 836568123f54c85d06b8c6a37c91dc47332259c4 by Thomas Baumgart, on 
behalf of Jack Ostroff.
Committed on 11/07/2020 at 09:07.
Pushed by tbaumgart into branch '5.1'.

Various edits suggested by Antoni Bella Pérez.
AUTHOR: Antoni Bella Pérez 

M  +3-3doc/credits.docbook
M  +28   -34   doc/details-accounts.docbook
M  +35   -33   doc/details-budgets.docbook
M  +6-8doc/details-currencies.docbook
M  +64   -61   doc/details-database.docbook
M  +2-2doc/details-forecast.docbook
M  +11   -11   doc/details-formats.docbook
M  +63   -56   doc/details-impexp-csv.docbook
M  +91   -88   doc/details-impexp.docbook
M  +6-8doc/details-institutions.docbook
M  +9-10   doc/details-investments.docbook
M  +8-9doc/details-ledgers.docbook
M  +5-5doc/details-loans.docbook
M  +5-6doc/details-reconciliation.docbook
M  +1-1doc/details-reports.docbook
M  +3-4doc/details-schedules.docbook
M  +13   -13   doc/details-settings.docbook
M  +4-5doc/details-tags.docbook
M  +13   -11   doc/details-widgets.docbook
M  +3-3doc/faq.docbook
M  +48   -50   doc/firsttime.docbook
M  +2-0doc/index.docbook
M  +4-5doc/makemostof.docbook
M  +3-3doc/reference.docbook

https://invent.kde.org/office/kmymoney/commit/836568123f54c85d06b8c6a37c91dc47332259c4

diff --git a/doc/credits.docbook b/doc/credits.docbook
index 0ce8650b0..d6bcbb4e6 100644
--- a/doc/credits.docbook
+++ b/doc/credits.docbook
@@ -8,7 +8,7 @@
 Credits
 
 
-  Program Copyright © 2000-2019 The KMyMoney Development Team
+  Program Copyright © 2000-2019 The &kmymoney; Development Team
 
 
 
@@ -16,7 +16,7 @@
 
 
 
-  Documentation Copyright © 2000-2019 The KMyMoney Development Team
+  Documentation Copyright © 2000-2019 The &kmymoney; Development Team
 
 
 
@@ -160,7 +160,7 @@
   
 
   Tony Bloomfield &Tony.Bloomfield.mail;
-  GnuCash Importer. Database support.
+  &gnucash; Importer. Database support.
 
   
 
diff --git a/doc/details-accounts.docbook b/doc/details-accounts.docbook
index 3714cd46f..2a16c6143 100644
--- a/doc/details-accounts.docbook
+++ b/doc/details-accounts.docbook
@@ -60,25 +60,21 @@
 
 Creating an Account
 
-
-  
-NOTE: You must have a file open before you can create a new account. If you
+
+You must have a file open before you can create a new account. If you
 do not have an existing file, you will need to create one.
-  
-
+
 
 
-  To create a new account, you can either select
-  AccountNew
-  account... from the menu or choose the New
-  account... icon 
-  New from the
-  toolbar.  You can also create an account from the Accounts view; click on the
-  Accounts icon in the view selector and then right click on the Asset or
-  Liability tree icon and select New account... from
-  the popup menu.
+  To create a new account, you can either select the 
+  AccountNew 
account...
+  menu item or choose the 
+   new account icon from the toolbar. You can also create an account
+  from the Accounts view; click on the Accounts icon in the view selector and
+  then right click on the Asset or Liability tree icon and select 
New
+  account... from the popup menu.
 
 
 
@@ -371,8 +367,8 @@
 
 
   The next three items are for handling Loans on which you've already made
-  payments.  If you select Yes in the "Did you make/receive any
-  payments yet?" dropdown, you can then select whether you want to
+  payments.  If you select Yes in the Did you 
make/receive any
+  payments yet? dropdown, you can then select whether you want to
   record all payments or just those from the beginning of the current year.  If
   you want to record from the beginning of the current year, you are than asked
   to input the balance at the beginning of this year.
@@ -393,7 +389,7 @@
 
   Finally, enter information about how the interest rate varies.  If the loan 
is
   fixed-rate there is nothing to do.  If the rate varies, select Variable in
-  "Type of interest rate" and then enter the interval
+  Type of interest rate and then enter the interval
   between interest rate changes and the date the first change of interest rate
   is due: &kmymoney; will ask you to update the interest rate when that date
   arrives.  Click Next to continue.
@@ -582,14 +578,14 @@
 

 
-  If you re-financed an existing Loan, check the "Refinance existing
-  loan" check box, select the Loan account and &kmymoney; will 
create
+  If you re-financed an existing Loan, check the Refinance existing
+  loan check box, select the Loan account and &kmymoney; will create
   a transfer transaction paying off the existing loan.
 

 
-  If you don't want to create the payout transaction, check the "Do
-  not create payout transaction" check box.
+  If you don't want to create the payout transaction, check the Do
+  not create payout transaction check box.
 
 
 
@@ -654,10 

[office/kmymoney] doc: Various edits suggested by Antoni Bella Pérez.

2020-07-11 Thread Thomas Baumgart
Git commit 93ff50fe7576c349b2e5ab14c07b5496f0bd9b1a by Thomas Baumgart.
Committed on 11/07/2020 at 09:13.
Pushed by tbaumgart into branch 'master'.

Various edits suggested by Antoni Bella Pérez.

AUTHOR: Antoni Bella Pérez 

(cherry picked from commit 836568123f54c85d06b8c6a37c91dc47332259c4)

M  +3-3doc/credits.docbook
M  +28   -34   doc/details-accounts.docbook
M  +35   -33   doc/details-budgets.docbook
M  +6-8doc/details-currencies.docbook
M  +64   -61   doc/details-database.docbook
M  +2-2doc/details-forecast.docbook
M  +11   -11   doc/details-formats.docbook
M  +63   -56   doc/details-impexp-csv.docbook
M  +91   -88   doc/details-impexp.docbook
M  +6-8doc/details-institutions.docbook
M  +9-10   doc/details-investments.docbook
M  +8-9doc/details-ledgers.docbook
M  +5-5doc/details-loans.docbook
M  +5-6doc/details-reconciliation.docbook
M  +1-1doc/details-reports.docbook
M  +3-4doc/details-schedules.docbook
M  +13   -13   doc/details-settings.docbook
M  +4-5doc/details-tags.docbook
M  +13   -11   doc/details-widgets.docbook
M  +3-3doc/faq.docbook
M  +48   -50   doc/firsttime.docbook
M  +2-0doc/index.docbook
M  +4-5doc/makemostof.docbook
M  +3-3doc/reference.docbook

https://invent.kde.org/office/kmymoney/commit/93ff50fe7576c349b2e5ab14c07b5496f0bd9b1a

diff --git a/doc/credits.docbook b/doc/credits.docbook
index 0ce8650b0..d6bcbb4e6 100644
--- a/doc/credits.docbook
+++ b/doc/credits.docbook
@@ -8,7 +8,7 @@
 Credits
 
 
-  Program Copyright © 2000-2019 The KMyMoney Development Team
+  Program Copyright © 2000-2019 The &kmymoney; Development Team
 
 
 
@@ -16,7 +16,7 @@
 
 
 
-  Documentation Copyright © 2000-2019 The KMyMoney Development Team
+  Documentation Copyright © 2000-2019 The &kmymoney; Development Team
 
 
 
@@ -160,7 +160,7 @@
   
 
   Tony Bloomfield &Tony.Bloomfield.mail;
-  GnuCash Importer. Database support.
+  &gnucash; Importer. Database support.
 
   
 
diff --git a/doc/details-accounts.docbook b/doc/details-accounts.docbook
index 3714cd46f..2a16c6143 100644
--- a/doc/details-accounts.docbook
+++ b/doc/details-accounts.docbook
@@ -60,25 +60,21 @@
 
 Creating an Account
 
-
-  
-NOTE: You must have a file open before you can create a new account. If you
+
+You must have a file open before you can create a new account. If you
 do not have an existing file, you will need to create one.
-  
-
+
 
 
-  To create a new account, you can either select
-  AccountNew
-  account... from the menu or choose the New
-  account... icon 
-  New from the
-  toolbar.  You can also create an account from the Accounts view; click on the
-  Accounts icon in the view selector and then right click on the Asset or
-  Liability tree icon and select New account... from
-  the popup menu.
+  To create a new account, you can either select the 
+  AccountNew 
account...
+  menu item or choose the 
+   new account icon from the toolbar. You can also create an account
+  from the Accounts view; click on the Accounts icon in the view selector and
+  then right click on the Asset or Liability tree icon and select 
New
+  account... from the popup menu.
 
 
 
@@ -371,8 +367,8 @@
 
 
   The next three items are for handling Loans on which you've already made
-  payments.  If you select Yes in the "Did you make/receive any
-  payments yet?" dropdown, you can then select whether you want to
+  payments.  If you select Yes in the Did you 
make/receive any
+  payments yet? dropdown, you can then select whether you want to
   record all payments or just those from the beginning of the current year.  If
   you want to record from the beginning of the current year, you are than asked
   to input the balance at the beginning of this year.
@@ -393,7 +389,7 @@
 
   Finally, enter information about how the interest rate varies.  If the loan 
is
   fixed-rate there is nothing to do.  If the rate varies, select Variable in
-  "Type of interest rate" and then enter the interval
+  Type of interest rate and then enter the interval
   between interest rate changes and the date the first change of interest rate
   is due: &kmymoney; will ask you to update the interest rate when that date
   arrives.  Click Next to continue.
@@ -582,14 +578,14 @@
 

 
-  If you re-financed an existing Loan, check the "Refinance existing
-  loan" check box, select the Loan account and &kmymoney; will 
create
+  If you re-financed an existing Loan, check the Refinance existing
+  loan check box, select the Loan account and &kmymoney; will create
   a transfer transaction paying off the existing loan.
 

 
-  If you don't want to create the payout transaction, check the "Do
-  not create payout transaction" check box.
+  If you don't want to create the payout transaction, check the Do
+  not create p

[office/kmymoney] doc: Fix documentation build

2020-07-11 Thread Thomas Baumgart
Git commit 2a23bcaa50707654679d8be4e2c6a0aac2ce8235 by Thomas Baumgart.
Committed on 11/07/2020 at 11:13.
Pushed by tbaumgart into branch 'master'.

Fix documentation build

A few tags were incorrect since the last changes. This corrects it.

(cherry picked from commit 1ea0fe292311015b118db78e896644c8082c1f08)

M  +17   -17   doc/details-accounts.docbook
M  +3-3doc/details-database.docbook

https://invent.kde.org/office/kmymoney/commit/2a23bcaa50707654679d8be4e2c6a0aac2ce8235

diff --git a/doc/details-accounts.docbook b/doc/details-accounts.docbook
index 2a16c6143..ca6b07bc9 100644
--- a/doc/details-accounts.docbook
+++ b/doc/details-accounts.docbook
@@ -9,7 +9,7 @@
   2018-02-01
   5.0.0
 
-  
+
 Accounts
 
 
@@ -70,7 +70,7 @@
   To create a new account, you can either select the 
   AccountNew 
account...
   menu item or choose the 
+  fileref="newacct.png" format="PNG"/>
new account icon from the toolbar. You can also create an account
   from the Accounts view; click on the Accounts icon in the view selector and
   then right click on the Asset or Liability tree icon and select 
New
@@ -348,7 +348,7 @@
 
   
 
-   
+
 
   On the Details page you enter the general information about the loan.
 
@@ -358,7 +358,7 @@
   borrowing money the loan will be listed in Accounts under Liabilities.  If 
you
   are lending money the loan will be listed under Assets.
 
-   
+
 
   Next, select the payee or payer of the loan.  As always, if the name doesn't
   yet exist in the Payees list, enter it here and &kmymoney; will create it for
@@ -373,7 +373,7 @@
   you want to record from the beginning of the current year, you are than asked
   to input the balance at the beginning of this year.
 
-   
+
 
   Next, select how often payments will be made and how often interest is
   compounded.  Compounding is where the interest is added to the amount owed on
@@ -385,7 +385,7 @@
 
   Next, enter the date the first payment to be recorded.
 
-   
+
 
   Finally, enter information about how the interest rate varies.  If the loan 
is
   fixed-rate there is nothing to do.  If the rate varies, select Variable in
@@ -394,7 +394,7 @@
   is due: &kmymoney; will ask you to update the interest rate when that date
   arrives.  Click Next to continue.
 
-   
+
 
   
 
@@ -407,7 +407,7 @@
 
   
 
-  
+
 
   The Payments page is where you enter the payment and interest values for the
   loan.
@@ -480,7 +480,7 @@
   and will instead have to use a Liability or Asset account to track the loan
   manually.
 
-   
+
 
   If you omit one value, &kmymoney; will try to calculate it for you.  If you
   have entered all values &kmymoney; will check the values are consistent.
@@ -494,7 +494,7 @@
   Once the values are consistent, the Next button is
   enabled and you can advance to the next page.
 
-   
+
 
   
 
@@ -538,17 +538,17 @@
   transaction for your loan.  The Schedule page is where you enter the
   remaining details needed to create the schedule.
 
-   
+
 
   First enter the Category to which loan interest will be assigned.  Then enter
   the account from which the loan payment will be made.
 
-   
+
 
   The page also displays the first payment date for which the Schedule will be
   created.
 
-   
+
 
   
 
@@ -566,23 +566,23 @@
   Optionally, &kmymoney; can create a transaction representing what was 
received
   or paid when the loan was created.
 
-   
+
 
   If you borrowed or lent cash select the account from which or to which the
   loan amount was paid.
 
-   
+
 
   If you borrowed money to purchase a car you can select or create an Asset
   account to help you track the value of the new car.
 
-   
+
 
   If you re-financed an existing Loan, check the Refinance existing
   loan check box, select the Loan account and &kmymoney; will create
   a transfer transaction paying off the existing loan.
 
-   
+
 
   If you don't want to create the payout transaction, check the Do
   not create payout transaction check box.
diff --git a/doc/details-database.docbook b/doc/details-database.docbook
index 64766a51b..eb2ea8f09 100644
--- a/doc/details-database.docbook
+++ b/doc/details-database.docbook
@@ -348,7 +348,7 @@
   
   
 
-  Accounts and Securities (see Note 2)
+  Accounts and Securities (see Note 2)
 
 
   kmmAccounts.currencyId
@@ -411,7 +411,7 @@
   format, and, with a field name suffixed with 'Formatted',
   in the form as shown on your screens.
 
-  
+
 
   Similarly, some fields, such as account type appear both as a numeric code,
   and in a field suffixed 'String' in the form and language
@@ -422,7 +422,7 @@
 
 Updating your data
 
- 
+
   Having data in an industry standard format does give you the ability to 
modify
   it outside the &kmymoney; applicatio

[office/kmymoney/5.1] doc: Fix documentation build

2020-07-11 Thread Thomas Baumgart
Git commit 1ea0fe292311015b118db78e896644c8082c1f08 by Thomas Baumgart.
Committed on 11/07/2020 at 11:12.
Pushed by tbaumgart into branch '5.1'.

Fix documentation build

A few tags were incorrect since the last changes. This corrects it.

M  +17   -17   doc/details-accounts.docbook
M  +3-3doc/details-database.docbook

https://invent.kde.org/office/kmymoney/commit/1ea0fe292311015b118db78e896644c8082c1f08

diff --git a/doc/details-accounts.docbook b/doc/details-accounts.docbook
index 2a16c6143..ca6b07bc9 100644
--- a/doc/details-accounts.docbook
+++ b/doc/details-accounts.docbook
@@ -9,7 +9,7 @@
   2018-02-01
   5.0.0
 
-  
+
 Accounts
 
 
@@ -70,7 +70,7 @@
   To create a new account, you can either select the 
   AccountNew 
account...
   menu item or choose the 
+  fileref="newacct.png" format="PNG"/>
new account icon from the toolbar. You can also create an account
   from the Accounts view; click on the Accounts icon in the view selector and
   then right click on the Asset or Liability tree icon and select 
New
@@ -348,7 +348,7 @@
 
   
 
-   
+
 
   On the Details page you enter the general information about the loan.
 
@@ -358,7 +358,7 @@
   borrowing money the loan will be listed in Accounts under Liabilities.  If 
you
   are lending money the loan will be listed under Assets.
 
-   
+
 
   Next, select the payee or payer of the loan.  As always, if the name doesn't
   yet exist in the Payees list, enter it here and &kmymoney; will create it for
@@ -373,7 +373,7 @@
   you want to record from the beginning of the current year, you are than asked
   to input the balance at the beginning of this year.
 
-   
+
 
   Next, select how often payments will be made and how often interest is
   compounded.  Compounding is where the interest is added to the amount owed on
@@ -385,7 +385,7 @@
 
   Next, enter the date the first payment to be recorded.
 
-   
+
 
   Finally, enter information about how the interest rate varies.  If the loan 
is
   fixed-rate there is nothing to do.  If the rate varies, select Variable in
@@ -394,7 +394,7 @@
   is due: &kmymoney; will ask you to update the interest rate when that date
   arrives.  Click Next to continue.
 
-   
+
 
   
 
@@ -407,7 +407,7 @@
 
   
 
-  
+
 
   The Payments page is where you enter the payment and interest values for the
   loan.
@@ -480,7 +480,7 @@
   and will instead have to use a Liability or Asset account to track the loan
   manually.
 
-   
+
 
   If you omit one value, &kmymoney; will try to calculate it for you.  If you
   have entered all values &kmymoney; will check the values are consistent.
@@ -494,7 +494,7 @@
   Once the values are consistent, the Next button is
   enabled and you can advance to the next page.
 
-   
+
 
   
 
@@ -538,17 +538,17 @@
   transaction for your loan.  The Schedule page is where you enter the
   remaining details needed to create the schedule.
 
-   
+
 
   First enter the Category to which loan interest will be assigned.  Then enter
   the account from which the loan payment will be made.
 
-   
+
 
   The page also displays the first payment date for which the Schedule will be
   created.
 
-   
+
 
   
 
@@ -566,23 +566,23 @@
   Optionally, &kmymoney; can create a transaction representing what was 
received
   or paid when the loan was created.
 
-   
+
 
   If you borrowed or lent cash select the account from which or to which the
   loan amount was paid.
 
-   
+
 
   If you borrowed money to purchase a car you can select or create an Asset
   account to help you track the value of the new car.
 
-   
+
 
   If you re-financed an existing Loan, check the Refinance existing
   loan check box, select the Loan account and &kmymoney; will create
   a transfer transaction paying off the existing loan.
 
-   
+
 
   If you don't want to create the payout transaction, check the Do
   not create payout transaction check box.
diff --git a/doc/details-database.docbook b/doc/details-database.docbook
index 64766a51b..eb2ea8f09 100644
--- a/doc/details-database.docbook
+++ b/doc/details-database.docbook
@@ -348,7 +348,7 @@
   
   
 
-  Accounts and Securities (see Note 2)
+  Accounts and Securities (see Note 2)
 
 
   kmmAccounts.currencyId
@@ -411,7 +411,7 @@
   format, and, with a field name suffixed with 'Formatted',
   in the form as shown on your screens.
 
-  
+
 
   Similarly, some fields, such as account type appear both as a numeric code,
   and in a field suffixed 'String' in the form and language
@@ -422,7 +422,7 @@
 
 Updating your data
 
- 
+
   Having data in an industry standard format does give you the ability to 
modify
   it outside the &kmymoney; application. DO NOT DO IT unless you really know
   what you are doing, and always be certain to make a backup copy of your data


[office/kmymoney/5.1] kmymoney/dialogs: Provide detailed creation of currencies

2020-09-13 Thread Thomas Baumgart
Git commit f68278ea401af18af92cb708c5899dfefa07ae52 by Thomas Baumgart.
Committed on 13/09/2020 at 12:28.
Pushed by tbaumgart into branch '5.1'.

Provide detailed creation of currencies

The current implementation does not allow to specify all attributes for
currencies but rather uses default values which cannot be changed
afterwards.

This change adds functionality to set all relevant attributes during
creation and also provides a feature to change those which can be
changed after creation of the currency.

BUG: 425935
FIXED-IN: 5.1.1
GUI:

(cherry picked from commit 2afa09b0691f4eb79a2f22c5a2ac4adf8b50c7ec)

M  +59   -30   kmymoney/dialogs/kcurrencyeditdlg.cpp
M  +1-1kmymoney/dialogs/kcurrencyeditdlg.h
M  +23   -15   kmymoney/dialogs/kcurrencyeditdlg.ui
M  +101  -16   kmymoney/dialogs/kcurrencyeditordlg.cpp
M  +9-5kmymoney/dialogs/kcurrencyeditordlg.h
M  +104  -29   kmymoney/dialogs/kcurrencyeditordlg.ui

https://invent.kde.org/office/kmymoney/commit/f68278ea401af18af92cb708c5899dfefa07ae52

diff --git a/kmymoney/dialogs/kcurrencyeditdlg.cpp 
b/kmymoney/dialogs/kcurrencyeditdlg.cpp
index 9ca3f3d11..7aeff6f73 100644
--- a/kmymoney/dialogs/kcurrencyeditdlg.cpp
+++ b/kmymoney/dialogs/kcurrencyeditdlg.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright 2004-2018  Thomas Baumgart 
+ * Copyright 2004-2020  Thomas Baumgart 
  * Copyright 2009-2010  Alvaro Soliverez 
  * Copyright 2017-2018  Łukasz Wojniłowicz 
  *
@@ -47,8 +47,6 @@
 // Project Includes
 
 #include "ui_kcurrencyeditdlg.h"
-#include "ui_kcurrencyeditordlg.h"
-#include "ui_kavailablecurrencydlg.h"
 
 #include "mymoneyexception.h"
 #include "mymoneysecurity.h"
@@ -189,6 +187,48 @@ public:
 }
   }
 
+  /**
+   * Edit or create a currency
+   *
+   * @param currency reference to currency object
+   *
+   * @returns @c true in case the operation was successful @c false otherwise
+   * @note @a currency will be updated with the modified values
+   */
+  bool editCurrency(MyMoneySecurity& currency)
+  {
+QScopedPointer currencyEditorDlg(new 
KCurrencyEditorDlg(currency, q_ptr));
+bool rc = true;
+do {
+  if (currencyEditorDlg->exec() != QDialog::Rejected) {
+auto file = MyMoneyFile::instance();
+MyMoneyFileTransaction ft;
+try {
+  if (currency.id().isEmpty()) {
+file->addCurrency(currencyEditorDlg->currency());
+  } else {
+file->modifyCurrency(currencyEditorDlg->currency());
+  }
+  ft.commit();
+  // if the modification worked, then we copy the data
+  // to inform caller
+  currency = currencyEditorDlg->currency();
+
+} catch (const MyMoneyException &e) {
+  if (currency.id().isEmpty()) {
+KMessageBox::sorry(q_ptr, i18n("Cannot create new currency. %1", 
QString::fromLatin1(e.what())), i18n("New currency"));
+  } else {
+KMessageBox::sorry(q_ptr, i18n("Cannot modify currency. %1", 
QString::fromLatin1(e.what())), i18n("Edit currency"));
+  }
+}
+  } else {
+rc = false;   // aborted by user
+  }
+} while(false);
+
+return rc;
+  }
+
   KCurrencyEditDlg  *q_ptr;
   Ui::KCurrencyEditDlg  *ui;
 
@@ -214,6 +254,7 @@ KCurrencyEditDlg::KCurrencyEditDlg(QWidget *parent) :
   d->ui->verticalLayout->insertWidget(0, d->m_searchWidget);
   d->ui->m_currencyList->setItemDelegate(new 
KCurrencyEditDelegate(d->ui->m_currencyList));
   d->ui->m_closeButton->setIcon(Icons::get(Icon::DialogClose));
+  d->ui->m_newCurrencyButton->setIcon(Icons::get(Icon::DocumentNew));
   d->ui->m_editCurrencyButton->setIcon(Icons::get(Icon::DocumentEdit));
   d->ui->m_selectBaseCurrencyButton->setIcon(Icons::get(Icon::KMyMoney));
 
@@ -224,6 +265,7 @@ KCurrencyEditDlg::KCurrencyEditDlg(QWidget *parent) :
 
   connect(d->ui->m_selectBaseCurrencyButton, &QAbstractButton::clicked, this, 
&KCurrencyEditDlg::slotSelectBaseCurrency);
   connect(d->ui->m_addCurrencyButton, &QAbstractButton::clicked, this, 
&KCurrencyEditDlg::slotAddCurrency);
+  connect(d->ui->m_newCurrencyButton, &QAbstractButton::clicked, this, 
&KCurrencyEditDlg::slotNewCurrency);
   connect(d->ui->m_removeCurrencyButton, &QAbstractButton::clicked, this, 
&KCurrencyEditDlg::slotRemoveCurrency);
   connect(d->ui->m_editCurrencyButton, &QAbstractButton::clicked, this, 
&KCurrencyEditDlg::slotEditCurrency);
   connect(d->ui->m_removeUnusedCurrencyButton, &QAbstractButton::clicked, 
this, &KCurrencyEditDlg::slotRemoveUnusedCurrency);
@@ -470,7 +512,7 @@ void KCurrencyEditDlg::slotShowCurrencyMenu(const QPoint& p)
 };
 
 const QVector actionInfos {
-  {eMenu::Action::NewCurrency,  &KCurrencyEditDlg::slotNewCurrency,   

[office/kmymoney] /: Remove not implemented settings option "Insert transaction type into No. field for new transactions

2020-09-14 Thread Thomas Baumgart
Git commit 2bd3c0927562bd48cbf03844d86b36ec69c71655 by Thomas Baumgart.
Committed on 15/09/2020 at 06:09.
Pushed by tbaumgart into branch 'master'.

Remove not implemented settings option "Insert transaction type into No. field 
for new transactions

BUG:426151
FIXED-IN:5.1.1

(cherry picked from commit 587f1614d4fc73908a98c05c5c7b9178aadccbae)

M  +0-9doc/details-settings.docbook
M  +0-7kmymoney/dialogs/settings/ksettingsregister.ui
M  +0-4kmymoney/settings/kmymoney.kcfg

https://invent.kde.org/office/kmymoney/commit/2bd3c0927562bd48cbf03844d86b36ec69c71655

diff --git a/doc/details-settings.docbook b/doc/details-settings.docbook
index 2d29ccace..3a69cc7ca 100644
--- a/doc/details-settings.docbook
+++ b/doc/details-settings.docbook
@@ -583,15 +583,6 @@ of accounts.
 These options affect the process of creating new transactions.
 
 
-  
-Insert transaction type into No. field for new
-transactions
-
-  Enabling this will automatically place the type of the transaction,
-  ⪚, Deposit, Withdrawal, &etc;, in the No. field.
-
-  
-
   
 Auto increment check number
 
diff --git a/kmymoney/dialogs/settings/ksettingsregister.ui 
b/kmymoney/dialogs/settings/ksettingsregister.ui
index da3a1cea4..8b515eb89 100644
--- a/kmymoney/dialogs/settings/ksettingsregister.ui
+++ b/kmymoney/dialogs/settings/ksettingsregister.ui
@@ -187,13 +187,6 @@
Data entry
   
   
-   
-
- 
-  Insert transaction type into No. field for new 
transactions
- 
-
-   

 
  
diff --git a/kmymoney/settings/kmymoney.kcfg b/kmymoney/settings/kmymoney.kcfg
index a3bb8cb9d..119e82ebc 100644
--- a/kmymoney/settings/kmymoney.kcfg
+++ b/kmymoney/settings/kmymoney.kcfg
@@ -72,10 +72,6 @@
0
999
   
-  
-   Insert transaction type into No. field for new transactions
-   false
-  
   
Keep changes when selecting a different transaction/split
false


[office/kmymoney/Improve-CSV-importer] kmymoney/plugins/csv/import: Improve CSV importer

2021-01-03 Thread Thomas Baumgart
Git commit 6c28f7bbd1eaabaa7f66cb73da8e045e00f91e9d by Thomas Baumgart.
Committed on 03/01/2021 at 15:54.
Pushed by tbaumgart into branch 'Improve-CSV-importer'.

Improve CSV importer

- add credit/debit indicator column
- add balance column
- simplify code
- add new column selections to UI

GUI:

M  +210  -198  kmymoney/plugins/csv/import/bankingwizardpage.cpp
M  +10   -13   kmymoney/plugins/csv/import/bankingwizardpage.h
M  +676  -398  kmymoney/plugins/csv/import/bankingwizardpage.ui
M  +5-4kmymoney/plugins/csv/import/core/csvenums.h
M  +49   -5kmymoney/plugins/csv/import/core/csvimportercore.cpp
M  +5-1kmymoney/plugins/csv/import/core/csvimportercore.h
M  +3-5kmymoney/plugins/csv/import/csvwizard.cpp

https://invent.kde.org/office/kmymoney/commit/6c28f7bbd1eaabaa7f66cb73da8e045e00f91e9d

diff --git a/kmymoney/plugins/csv/import/bankingwizardpage.cpp 
b/kmymoney/plugins/csv/import/bankingwizardpage.cpp
index 3aaec851b..07541a937 100644
--- a/kmymoney/plugins/csv/import/bankingwizardpage.cpp
+++ b/kmymoney/plugins/csv/import/bankingwizardpage.cpp
@@ -1,6 +1,7 @@
 /*
  * Copyright 2011-2017  Allan Anderson 
  * Copyright 2016-2018  Łukasz Wojniłowicz 
+ * Copyright 2020       Thomas Baumgart 
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
@@ -24,6 +25,7 @@
 #include 
 #include 
 #include 
+#include 
 
 // 
 // KDE Includes
@@ -35,11 +37,14 @@
 
 #include "csvwizard.h"
 #include "core/csvimportercore.h"
-
+#include "icons.h"
 #include "ui_bankingwizardpage.h"
 
 // 
 
+#define connectClearButton(col) \
+  connect(ui->col ## Clear, &QToolButton::clicked, this, [&]() { 
clearComboBox(ui->col ); } );
+
 BankingPage::BankingPage(CSVWizard *dlg, CSVImporterCore *imp)
   : CSVWizardPage(dlg, imp)
   , m_profile(nullptr)
@@ -47,32 +52,83 @@ BankingPage::BankingPage(CSVWizard *dlg, CSVImporterCore 
*imp)
 {
   ui->setupUi(this);
 
+  m_columnBoxes = QHash {
+{Column::Amount, ui->m_amountCol},
+{Column::Debit, ui->m_debitCol},
+{Column::Credit, ui->m_creditCol},
+{Column::Memo, ui->m_memoCol},
+{Column::Number, ui->m_numberCol},
+{Column::Date, ui->m_dateCol},
+{Column::Payee,  ui->m_payeeCol},
+{Column::Category, ui->m_categoryCol},
+{Column::CreditDebitIndicator, ui->m_creditDebitIndicatorCol},
+{Column::Balance, ui->m_balanceCol}
+  };
+
+  auto clearComboBox = [&](QComboBox* combobox) { 
combobox->setCurrentIndex(-1); };
+
   connect(ui->m_clear, &QAbstractButton::clicked, this, 
&BankingPage::clearColumns);
-  connect(ui->m_radioAmount, &QAbstractButton::toggled, this, 
&BankingPage::amountToggled);
-  connect(ui->m_radioDebitCredit, &QAbstractButton::toggled, this, 
&BankingPage::debitCreditToggled);
-  connect(ui->m_oppositeSigns, &QAbstractButton::clicked, this, 
&BankingPage::oppositeSignsClicked);
-
-  // initialize column names
-  m_dlg->m_colTypeName.insert(Column::Payee,i18n("Payee"));
-  m_dlg->m_colTypeName.insert(Column::Number,i18n("Number"));
-  m_dlg->m_colTypeName.insert(Column::Debit,i18n("Debit"));
-  m_dlg->m_colTypeName.insert(Column::Credit,i18n("Credit"));
-  m_dlg->m_colTypeName.insert(Column::Date,i18n("Date"));
-  m_dlg->m_colTypeName.insert(Column::Amount,i18n("Amount"));
-  m_dlg->m_colTypeName.insert(Column::Category,i18n("Category"));
-  m_dlg->m_colTypeName.insert(Column::Memo,i18n("Memo"));
+  connect(ui->m_oppositeSigns, &QAbstractButton::clicked, this, [&](bool 
checked) { m_profile->m_oppositeSigns = checked; });
+
+  connect(ui->m_amountTabWidget, &QTabWidget::currentChanged, this, [&](int 
index) {
+if (ui->m_amountTabWidget->widget(index) == ui->amountTab) { // amountTab
+  clearComboBox(ui->m_debitCol);
+  clearComboBox(ui->m_creditCol);
+} else {  // creditDebitTab
+  clearComboBox(ui->m_amountCol);
+}
+  });
 
   void (QComboBox::* signal)(int) = &QComboBox::currentIndexChanged;
-  connect(ui->m_amountCol, signal, this, &BankingPage::amountColSelected);
-  connect(ui->m_debitCol, signal, this, &BankingPage::debitColSelected);
-  connect(ui->m_creditCol, signal, this, &BankingPage::creditColSelected);
+  connect(ui->m_amountCol, signal, this, [&](int col) { 
validateSelectedColumn(col, Column::Amount); });
+  connect(ui->m_debitCol, signal, this, [&](int col) { 
validateSelectedColumn(col, Column::Debit); });
+  connect(ui->m_creditCol, signal, this, [&](int col) { 
validateSelectedColumn

[office/kmymoney] kmymoney/plugins/csv/import: Improve CSV importer

2021-01-24 Thread Thomas Baumgart
Git commit 1c7cf75c4dcd1699582ca67ee2baa72fe81a23c8 by Thomas Baumgart.
Committed on 24/01/2021 at 09:03.
Pushed by tbaumgart into branch 'master'.

Improve CSV importer

- add credit/debit indicator column
- add balance column
- simplify code
- add new column selections to UI

GUI:

M  +210  -198  kmymoney/plugins/csv/import/bankingwizardpage.cpp
M  +10   -13   kmymoney/plugins/csv/import/bankingwizardpage.h
M  +676  -398  kmymoney/plugins/csv/import/bankingwizardpage.ui
M  +5-4kmymoney/plugins/csv/import/core/csvenums.h
M  +67   -5kmymoney/plugins/csv/import/core/csvimportercore.cpp
M  +5-1kmymoney/plugins/csv/import/core/csvimportercore.h
M  +3-5kmymoney/plugins/csv/import/csvwizard.cpp

https://invent.kde.org/office/kmymoney/commit/1c7cf75c4dcd1699582ca67ee2baa72fe81a23c8

diff --git a/kmymoney/plugins/csv/import/bankingwizardpage.cpp 
b/kmymoney/plugins/csv/import/bankingwizardpage.cpp
index 3aaec851b..07541a937 100644
--- a/kmymoney/plugins/csv/import/bankingwizardpage.cpp
+++ b/kmymoney/plugins/csv/import/bankingwizardpage.cpp
@@ -1,6 +1,7 @@
 /*
  * Copyright 2011-2017  Allan Anderson 
  * Copyright 2016-2018  Łukasz Wojniłowicz 
+ * Copyright 2020       Thomas Baumgart 
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
@@ -24,6 +25,7 @@
 #include 
 #include 
 #include 
+#include 
 
 // 
 // KDE Includes
@@ -35,11 +37,14 @@
 
 #include "csvwizard.h"
 #include "core/csvimportercore.h"
-
+#include "icons.h"
 #include "ui_bankingwizardpage.h"
 
 // 
 
+#define connectClearButton(col) \
+  connect(ui->col ## Clear, &QToolButton::clicked, this, [&]() { 
clearComboBox(ui->col ); } );
+
 BankingPage::BankingPage(CSVWizard *dlg, CSVImporterCore *imp)
   : CSVWizardPage(dlg, imp)
   , m_profile(nullptr)
@@ -47,32 +52,83 @@ BankingPage::BankingPage(CSVWizard *dlg, CSVImporterCore 
*imp)
 {
   ui->setupUi(this);
 
+  m_columnBoxes = QHash {
+{Column::Amount, ui->m_amountCol},
+{Column::Debit, ui->m_debitCol},
+{Column::Credit, ui->m_creditCol},
+{Column::Memo, ui->m_memoCol},
+{Column::Number, ui->m_numberCol},
+{Column::Date, ui->m_dateCol},
+{Column::Payee,  ui->m_payeeCol},
+{Column::Category, ui->m_categoryCol},
+{Column::CreditDebitIndicator, ui->m_creditDebitIndicatorCol},
+{Column::Balance, ui->m_balanceCol}
+  };
+
+  auto clearComboBox = [&](QComboBox* combobox) { 
combobox->setCurrentIndex(-1); };
+
   connect(ui->m_clear, &QAbstractButton::clicked, this, 
&BankingPage::clearColumns);
-  connect(ui->m_radioAmount, &QAbstractButton::toggled, this, 
&BankingPage::amountToggled);
-  connect(ui->m_radioDebitCredit, &QAbstractButton::toggled, this, 
&BankingPage::debitCreditToggled);
-  connect(ui->m_oppositeSigns, &QAbstractButton::clicked, this, 
&BankingPage::oppositeSignsClicked);
-
-  // initialize column names
-  m_dlg->m_colTypeName.insert(Column::Payee,i18n("Payee"));
-  m_dlg->m_colTypeName.insert(Column::Number,i18n("Number"));
-  m_dlg->m_colTypeName.insert(Column::Debit,i18n("Debit"));
-  m_dlg->m_colTypeName.insert(Column::Credit,i18n("Credit"));
-  m_dlg->m_colTypeName.insert(Column::Date,i18n("Date"));
-  m_dlg->m_colTypeName.insert(Column::Amount,i18n("Amount"));
-  m_dlg->m_colTypeName.insert(Column::Category,i18n("Category"));
-  m_dlg->m_colTypeName.insert(Column::Memo,i18n("Memo"));
+  connect(ui->m_oppositeSigns, &QAbstractButton::clicked, this, [&](bool 
checked) { m_profile->m_oppositeSigns = checked; });
+
+  connect(ui->m_amountTabWidget, &QTabWidget::currentChanged, this, [&](int 
index) {
+if (ui->m_amountTabWidget->widget(index) == ui->amountTab) { // amountTab
+  clearComboBox(ui->m_debitCol);
+  clearComboBox(ui->m_creditCol);
+} else {  // creditDebitTab
+  clearComboBox(ui->m_amountCol);
+}
+  });
 
   void (QComboBox::* signal)(int) = &QComboBox::currentIndexChanged;
-  connect(ui->m_amountCol, signal, this, &BankingPage::amountColSelected);
-  connect(ui->m_debitCol, signal, this, &BankingPage::debitColSelected);
-  connect(ui->m_creditCol, signal, this, &BankingPage::creditColSelected);
+  connect(ui->m_amountCol, signal, this, [&](int col) { 
validateSelectedColumn(col, Column::Amount); });
+  connect(ui->m_debitCol, signal, this, [&](int col) { 
validateSelectedColumn(col, Column::Debit); });
+  connect(ui->m_creditCol, signal, this, [&](int col) { 
validateSelectedColumn(col, Column::Credit);

[office/kmymoney/5.1] kmymoney/plugins/csv/import: Improve CSV importer

2021-03-27 Thread Thomas Baumgart
Git commit 14b5614ca67d7c0e2c8b25952ec8a338f5d5cdf7 by Thomas Baumgart.
Committed on 27/03/2021 at 14:48.
Pushed by tbaumgart into branch '5.1'.

Improve CSV importer

- add credit/debit indicator column
- add balance column
- simplify code
- add new column selections to UI

GUI:
(cherry picked from commit 1c7cf75c4dcd1699582ca67ee2baa72fe81a23c8)

M  +210  -198  kmymoney/plugins/csv/import/bankingwizardpage.cpp
M  +10   -13   kmymoney/plugins/csv/import/bankingwizardpage.h
M  +676  -398  kmymoney/plugins/csv/import/bankingwizardpage.ui
M  +4-3kmymoney/plugins/csv/import/core/csvenums.h
M  +67   -5kmymoney/plugins/csv/import/core/csvimportercore.cpp
M  +4-0kmymoney/plugins/csv/import/core/csvimportercore.h
M  +2-4kmymoney/plugins/csv/import/csvwizard.cpp

https://invent.kde.org/office/kmymoney/commit/14b5614ca67d7c0e2c8b25952ec8a338f5d5cdf7

diff --git a/kmymoney/plugins/csv/import/bankingwizardpage.cpp 
b/kmymoney/plugins/csv/import/bankingwizardpage.cpp
index ca1bb45ef..80401e7ba 100644
--- a/kmymoney/plugins/csv/import/bankingwizardpage.cpp
+++ b/kmymoney/plugins/csv/import/bankingwizardpage.cpp
@@ -1,6 +1,7 @@
 /*
 SPDX-FileCopyrightText: 2011-2017 Allan Anderson 
 SPDX-FileCopyrightText: 2016-2018 Łukasz Wojniłowicz 

+SPDX-FileCopyrightText: 2020 Thomas Baumgart 
 SPDX-License-Identifier: GPL-2.0-or-later
 */
 
@@ -12,6 +13,7 @@
 #include 
 #include 
 #include 
+#include 
 
 // 
 // KDE Includes
@@ -23,11 +25,14 @@
 
 #include "csvwizard.h"
 #include "core/csvimportercore.h"
-
+#include "icons.h"
 #include "ui_bankingwizardpage.h"
 
 // 
 
+#define connectClearButton(col) \
+  connect(ui->col ## Clear, &QToolButton::clicked, this, [&]() { 
clearComboBox(ui->col ); } );
+
 BankingPage::BankingPage(CSVWizard *dlg, CSVImporterCore *imp)
   : CSVWizardPage(dlg, imp)
   , m_profile(nullptr)
@@ -35,32 +40,83 @@ BankingPage::BankingPage(CSVWizard *dlg, CSVImporterCore 
*imp)
 {
   ui->setupUi(this);
 
+  m_columnBoxes = QHash {
+{Column::Amount, ui->m_amountCol},
+{Column::Debit, ui->m_debitCol},
+{Column::Credit, ui->m_creditCol},
+{Column::Memo, ui->m_memoCol},
+{Column::Number, ui->m_numberCol},
+{Column::Date, ui->m_dateCol},
+{Column::Payee,  ui->m_payeeCol},
+{Column::Category, ui->m_categoryCol},
+{Column::CreditDebitIndicator, ui->m_creditDebitIndicatorCol},
+{Column::Balance, ui->m_balanceCol},
+  };
+
+  auto clearComboBox = [&](QComboBox* combobox) { 
combobox->setCurrentIndex(-1); };
+
   connect(ui->m_clear, &QAbstractButton::clicked, this, 
&BankingPage::clearColumns);
-  connect(ui->m_radioAmount, &QAbstractButton::toggled, this, 
&BankingPage::amountToggled);
-  connect(ui->m_radioDebitCredit, &QAbstractButton::toggled, this, 
&BankingPage::debitCreditToggled);
-  connect(ui->m_oppositeSigns, &QAbstractButton::clicked, this, 
&BankingPage::oppositeSignsClicked);
-
-  // initialize column names
-  m_dlg->m_colTypeName.insert(Column::Payee,i18n("Payee"));
-  m_dlg->m_colTypeName.insert(Column::Number,i18n("Number"));
-  m_dlg->m_colTypeName.insert(Column::Debit,i18n("Debit"));
-  m_dlg->m_colTypeName.insert(Column::Credit,i18n("Credit"));
-  m_dlg->m_colTypeName.insert(Column::Date,i18n("Date"));
-  m_dlg->m_colTypeName.insert(Column::Amount,i18n("Amount"));
-  m_dlg->m_colTypeName.insert(Column::Category,i18n("Category"));
-  m_dlg->m_colTypeName.insert(Column::Memo,i18n("Memo"));
+  connect(ui->m_oppositeSigns, &QAbstractButton::clicked, this, [&](bool 
checked) { m_profile->m_oppositeSigns = checked; });
+
+  connect(ui->m_amountTabWidget, &QTabWidget::currentChanged, this, [&](int 
index) {
+if (ui->m_amountTabWidget->widget(index) == ui->amountTab) { // amountTab
+  clearComboBox(ui->m_debitCol);
+  clearComboBox(ui->m_creditCol);
+} else {  // creditDebitTab
+  clearComboBox(ui->m_amountCol);
+}
+  });
 
   void (QComboBox::* signal)(int) = &QComboBox::currentIndexChanged;
-  connect(ui->m_amountCol, signal, this, &BankingPage::amountColSelected);
-  connect(ui->m_debitCol, signal, this, &BankingPage::debitColSelected);
-  connect(ui->m_creditCol, signal, this, &BankingPage::creditColSelected);
+  connect(ui->m_amountCol, signal, this, [&](int col) { 
validateSelectedColumn(col, Column::Amount); });
+  connect(ui->m_debitCol, signal, this, [&](int col) { 
validateSelectedColumn(col, Column::Debit); });
+  connect(ui->m_creditCol, signal, this, [&](int col) { 
validateSelectedColumn

[office/kmymoney/5.1] kmymoney/wizards/endingbalancedlg: Fixed typo

2021-05-20 Thread Thomas Baumgart
Git commit 29671007f479549f33e958d43ced484f9aef67d9 by Thomas Baumgart.
Committed on 20/05/2021 at 14:45.
Pushed by tbaumgart into branch '5.1'.

Fixed typo

Good catch, this one is at least 10 yrs old

BUG: 437398
FIXED-IN: 5.1.2
GUI:

M  +1-1
kmymoney/wizards/endingbalancedlg/interestchargecheckingswizardpage.ui

https://invent.kde.org/office/kmymoney/commit/29671007f479549f33e958d43ced484f9aef67d9

diff --git 
a/kmymoney/wizards/endingbalancedlg/interestchargecheckingswizardpage.ui 
b/kmymoney/wizards/endingbalancedlg/interestchargecheckingswizardpage.ui
index b88f95cf8..282275546 100644
--- a/kmymoney/wizards/endingbalancedlg/interestchargecheckingswizardpage.ui
+++ b/kmymoney/wizards/endingbalancedlg/interestchargecheckingswizardpage.ui
@@ -9,7 +9,7 @@
 
  
   
-   If necessary, enter information about interest or charges here. 
KMyMoney will create transactions and cleares them directly for you.
+   If necessary, enter information about interest or charges here. 
KMyMoney will create transactions and clears them directly for you.
   
   
 true


[office/kmymoney] kmymoney/wizards/endingbalancedlg: Improving information for user

2021-05-21 Thread Thomas Baumgart
Git commit 589fbc512589ddd3e6ca13eb6e5120391ddd950b by Thomas Baumgart.
Committed on 21/05/2021 at 15:18.
Pushed by tbaumgart into branch 'master'.

Improving information for user

GUI:

M  +1-1
kmymoney/wizards/endingbalancedlg/interestchargecheckingswizardpage.ui

https://invent.kde.org/office/kmymoney/commit/589fbc512589ddd3e6ca13eb6e5120391ddd950b

diff --git 
a/kmymoney/wizards/endingbalancedlg/interestchargecheckingswizardpage.ui 
b/kmymoney/wizards/endingbalancedlg/interestchargecheckingswizardpage.ui
index 7e7dbe198..6affb4174 100644
--- a/kmymoney/wizards/endingbalancedlg/interestchargecheckingswizardpage.ui
+++ b/kmymoney/wizards/endingbalancedlg/interestchargecheckingswizardpage.ui
@@ -9,7 +9,7 @@
 
  
   
-   If necessary, enter information about interest or charges here. 
KMyMoney will create transactions and clears them directly for you.
+   If necessary, enter information about interest or charges here. 
KMyMoney will create transactions and mark them as cleared.
   
   
 true


[office/kmymoney/5.1] kmymoney/wizards/endingbalancedlg: Improving information for user

2021-05-21 Thread Thomas Baumgart
Git commit 206636c3ca6741852530039b6bb7b1f30f622971 by Thomas Baumgart.
Committed on 21/05/2021 at 15:25.
Pushed by tbaumgart into branch '5.1'.

Improving information for user

GUI:

(cherry picked from commit 589fbc512589ddd3e6ca13eb6e5120391ddd950b)

M  +1-1
kmymoney/wizards/endingbalancedlg/interestchargecheckingswizardpage.ui

https://invent.kde.org/office/kmymoney/commit/206636c3ca6741852530039b6bb7b1f30f622971

diff --git 
a/kmymoney/wizards/endingbalancedlg/interestchargecheckingswizardpage.ui 
b/kmymoney/wizards/endingbalancedlg/interestchargecheckingswizardpage.ui
index 282275546..def29d464 100644
--- a/kmymoney/wizards/endingbalancedlg/interestchargecheckingswizardpage.ui
+++ b/kmymoney/wizards/endingbalancedlg/interestchargecheckingswizardpage.ui
@@ -9,7 +9,7 @@
 
  
   
-   If necessary, enter information about interest or charges here. 
KMyMoney will create transactions and clears them directly for you.
+   If necessary, enter information about interest or charges here. 
KMyMoney will create transactions and mark them as cleared.
   
   
 true


[office/kmymoney] kmymoney/views: Improve tooltips

2021-06-02 Thread Thomas Baumgart
Git commit eae6018ff640053f057730161a06f52605a97f91 by Thomas Baumgart.
Committed on 03/06/2021 at 05:39.
Pushed by tbaumgart into branch 'master'.

Improve tooltips

GUI:

M  +4-4kmymoney/views/ledgerview.cpp

https://invent.kde.org/office/kmymoney/commit/eae6018ff640053f057730161a06f52605a97f91

diff --git a/kmymoney/views/ledgerview.cpp b/kmymoney/views/ledgerview.cpp
index a773a62fd..c0538deb2 100644
--- a/kmymoney/views/ledgerview.cpp
+++ b/kmymoney/views/ledgerview.cpp
@@ -612,17 +612,17 @@ bool LedgerView::viewportEvent(QEvent* event)
 ++iconCount;
 
 } else if 
(idx.data(eMyMoney::Model::ScheduleIsOverdueRole).toBool()) {
-tooltips[iconCount] = i18nc("@info:tooltip icon 
description", "This schedule is overdue.");
+tooltips[iconCount] = i18nc("@info:tooltip icon 
description", "This schedule is overdue. Click on the icon to enter it.");
 ++iconCount;
 }
 
-if 
(idx.data(eMyMoney::Model::TransactionImportedRole).toBool()) {
-tooltips[iconCount] = i18nc("@info:tooltip icon 
description", "This transaction is imported. Accept it to mark it cleared.");
+if 
(idx.data(eMyMoney::Model::TransactionIsImportedRole).toBool()) {
+tooltips[iconCount] = i18nc("@info:tooltip icon 
description", "This transaction is imported. Click on the icon to accept it.");
 ++iconCount;
 }
 
 if 
(idx.data(eMyMoney::Model::JournalSplitIsMatchedRole).toBool()) {
-tooltips[iconCount] = i18nc("@info:tooltip icon 
description", "This transaction is matched. Accept or un-match it.");
+tooltips[iconCount] = i18nc("@info:tooltip icon 
description", "This transaction is matched. Click on the icon to accept or 
un-match it.");
 ++iconCount;
 }
 


[office/kmymoney] /: Remove hide closed accounts option from config

2021-06-04 Thread Thomas Baumgart
Git commit 445958f5b904db1d8a5a1d9623b082577bc5475a by Thomas Baumgart, on 
behalf of Suraj Kumar Mahto.
Committed on 04/06/2021 at 19:50.
Pushed by tbaumgart into branch 'master'.

Remove hide closed accounts option from config

M  +0-10   doc/details-settings.docbook
M  +0-12   kmymoney/dialogs/settings/ksettingsgeneral.ui
M  +0-4kmymoney/settings/kmymoney.kcfg
M  +7-1kmymoney/settings/kmymoney.upd
M  +2-2kmymoney/views/kaccountsview.cpp
M  +1-1kmymoney/views/kgloballedgerview_p.h
M  +4-4kmymoney/views/khomeview_p.h
M  +2-2kmymoney/views/kinvestmentview_p.h
M  +1-1kmymoney/views/ledgerview.cpp
M  +1-1kmymoney/views/simpleledgerview.cpp
M  +1-1kmymoney/views/splitview.cpp
M  +1-1kmymoney/widgets/ktransactionfilter_p.h

https://invent.kde.org/office/kmymoney/commit/445958f5b904db1d8a5a1d9623b082577bc5475a

diff --git a/doc/details-settings.docbook b/doc/details-settings.docbook
index fd9b52586..2acd79b10 100644
--- a/doc/details-settings.docbook
+++ b/doc/details-settings.docbook
@@ -164,16 +164,6 @@
 
   
 
-  
-Do not show closed accounts
-
-  Checking this box hides closed accounts from display in the 
Accounts,
-  Ledger, and Investment Views.  Hiding closed accounts makes viewing and 
working
-  with open accounts easier.  Unchecking this box will show closed 
accounts with
-  a line drawn through them allowing viewing and reopening if 
needed.
-
-  
-
   
 Show equity accounts
 
diff --git a/kmymoney/dialogs/settings/ksettingsgeneral.ui 
b/kmymoney/dialogs/settings/ksettingsgeneral.ui
index d5617c924..67a1eb7fc 100644
--- a/kmymoney/dialogs/settings/ksettingsgeneral.ui
+++ b/kmymoney/dialogs/settings/ksettingsgeneral.ui
@@ -401,18 +401,6 @@ Set it to 0 to turn the feature off.
 

   
-  
-   
-
- This option hides all accounts that have been closed by 
the user in views and selection lists.
-
-You can use <b>View/Show all accounts</b> to temporarily show 
hidden accounts in the views.
-
-
- Do not show closed accounts
-
-   
-  
   

 
diff --git a/kmymoney/settings/kmymoney.kcfg b/kmymoney/settings/kmymoney.kcfg
index 119e82ebc..a92bced8a 100644
--- a/kmymoney/settings/kmymoney.kcfg
+++ b/kmymoney/settings/kmymoney.kcfg
@@ -224,10 +224,6 @@
Hide unused categories
false
   
-  
-   Hide closed accounts
-   false
-  
   
Show all accounts
false
diff --git a/kmymoney/settings/kmymoney.upd b/kmymoney/settings/kmymoney.upd
index d55becd02..5c7d35a08 100644
--- a/kmymoney/settings/kmymoney.upd
+++ b/kmymoney/settings/kmymoney.upd
@@ -1,4 +1,10 @@
+Version=5
 Id=1
-File=kmymoneyrc
+File=kmymoney/kmymoneyrc
 Group=List Options
 Key=listErronousTransactionColor,listErroneousTransactionColor
+
+Id=remove-hide-acc-opt-2021
+File=kmymoney/kmymoneyrc
+Group=List Options
+RemoveKey=HideClosedAccounts
diff --git a/kmymoney/views/kaccountsview.cpp b/kmymoney/views/kaccountsview.cpp
index 1e687ca0f..1b8aef13d 100644
--- a/kmymoney/views/kaccountsview.cpp
+++ b/kmymoney/views/kaccountsview.cpp
@@ -107,7 +107,7 @@ void KAccountsView::refresh()
 
 // TODO: check why the invalidate is needed here
 d->m_proxyModel->invalidate();
-
d->m_proxyModel->setHideClosedAccounts(KMyMoneySettings::hideClosedAccounts() 
&& !KMyMoneySettings::showAllAccounts());
+
d->m_proxyModel->setHideClosedAccounts(!KMyMoneySettings::showAllAccounts());
 d->m_proxyModel->setHideEquityAccounts(!KMyMoneySettings::expertMode());
 if (KMyMoneySettings::showCategoriesInAccountsView()) {
 d->m_proxyModel->addAccountGroup(QVector 
{eMyMoney::Account::Type::Income, eMyMoney::Account::Type::Expense});
@@ -273,7 +273,7 @@ void KAccountsView::slotCloseAccount()
 d->m_currentAccount.setClosed(true);
 MyMoneyFile::instance()->modifyAccount(d->m_currentAccount);
 ft.commit();
-if (KMyMoneySettings::hideClosedAccounts())
+if (!KMyMoneySettings::showAllAccounts())
 KMessageBox::information(this, i18n("You have closed this 
account. It remains in the system because you have transactions which still 
refer to it, but it is not shown in the views. You can make it visible again by 
going to the View menu and selecting Show all accounts or by deselecting 
the Do not show closed accounts setting."), i18n("Information"), 
"CloseAccountInfo");
 } catch (const MyMoneyException &) {
 }
diff --git a/kmymoney/views/kgloballedgerview_p.h 
b/kmymoney/views/kgloballedgerview_p.h
index e0ea3d6fc..05dcaa0a5 100644
--- a/kmymoney/views/kgloballedgerview_p.h
+++ b/kmymoney/views/kgloballedgerview_p.h
@@ -405,7 +405,7 @@ public:
 // TODO: check why the invalidate is need

[office/kmymoney] kmymoney/plugins/xml: Fix spelling error

2021-06-05 Thread Thomas Baumgart
Git commit 81503655cba0cb5ad64a8111d288cdae685aa0dd by Thomas Baumgart.
Committed on 05/06/2021 at 09:35.
Pushed by tbaumgart into branch 'master'.

Fix spelling error

CCBUG: 438105
GUI:

M  +1-1kmymoney/plugins/xml/xmlstoragesettings.ui

https://invent.kde.org/office/kmymoney/commit/81503655cba0cb5ad64a8111d288cdae685aa0dd

diff --git a/kmymoney/plugins/xml/xmlstoragesettings.ui 
b/kmymoney/plugins/xml/xmlstoragesettings.ui
index 64c1dbbe1..9f913911d 100644
--- a/kmymoney/plugins/xml/xmlstoragesettings.ui
+++ b/kmymoney/plugins/xml/xmlstoragesettings.ui
@@ -173,7 +173,7 @@ The <i>additional recovery encryption</i> is 
only accessible, if the
   

 
- You can specify to encrypt the data also with the KMyMoney 
recover key. Only the core KMyMoney developers are in posession of the 
respective private key required to read back such encrypted data.<p>
+ You can specify to encrypt the data also with the KMyMoney 
recover key. Only the core KMyMoney developers are in possession of the 
respective private key required to read back such encrypted data.<p>
 
 This mechanism is provided for the case that you have lost your key and cannot 
access your data anymore. With this option activated, the KMyMoney developers 
can decrypt the data and supply you with it in a readable form. Please be 
prepared, that you have to answer a few detailed questions about the contents 
of your data before we will send it out.
 


[office/kmymoney/5.1] kmymoney/plugins/xml: Fix spelling error

2021-06-05 Thread Thomas Baumgart
Git commit 5f191427452c6c45a601c37bdd8e4ec76d495ef0 by Thomas Baumgart.
Committed on 05/06/2021 at 09:36.
Pushed by tbaumgart into branch '5.1'.

Fix spelling error

CCBUG: 438105
GUI:
(cherry picked from commit 81503655cba0cb5ad64a8111d288cdae685aa0dd)

M  +1-1kmymoney/plugins/xml/xmlstoragesettings.ui

https://invent.kde.org/office/kmymoney/commit/5f191427452c6c45a601c37bdd8e4ec76d495ef0

diff --git a/kmymoney/plugins/xml/xmlstoragesettings.ui 
b/kmymoney/plugins/xml/xmlstoragesettings.ui
index 64c1dbbe1..9f913911d 100644
--- a/kmymoney/plugins/xml/xmlstoragesettings.ui
+++ b/kmymoney/plugins/xml/xmlstoragesettings.ui
@@ -173,7 +173,7 @@ The <i>additional recovery encryption</i> is 
only accessible, if the
   

 
- You can specify to encrypt the data also with the KMyMoney 
recover key. Only the core KMyMoney developers are in posession of the 
respective private key required to read back such encrypted data.<p>
+ You can specify to encrypt the data also with the KMyMoney 
recover key. Only the core KMyMoney developers are in possession of the 
respective private key required to read back such encrypted data.<p>
 
 This mechanism is provided for the case that you have lost your key and cannot 
access your data anymore. With this option activated, the KMyMoney developers 
can decrypt the data and supply you with it in a readable form. Please be 
prepared, that you have to answer a few detailed questions about the contents 
of your data before we will send it out.
 


[office/kmymoney/5.1] /: Remove hide closed accounts option from config

2021-08-16 Thread Thomas Baumgart
Git commit 51a7a9f77cfaf8d5e9a1123dd2cf387064b9ea3e by Thomas Baumgart.
Committed on 16/08/2021 at 11:56.
Pushed by tbaumgart into branch '5.1'.

Remove hide closed accounts option from config

(cherry picked from commit 445958f5b904db1d8a5a1d9623b082577bc5475a)

BUG: 223708
FIXED-IN: 5.1.3

M  +0-10   doc/details-settings.docbook
M  +0-12   kmymoney/dialogs/settings/ksettingsgeneral.ui
M  +0-4kmymoney/settings/kmymoney.kcfg
M  +7-1kmymoney/settings/kmymoney.upd
M  +2-2kmymoney/views/kaccountsview.cpp
M  +1-1kmymoney/views/kcategoriesview.cpp
M  +1-1kmymoney/views/kgloballedgerview_p.h
M  +4-4kmymoney/views/khomeview_p.h
M  +1-1kmymoney/views/kinstitutionsview.cpp
M  +2-2kmymoney/views/kinvestmentview_p.h
M  +1-1kmymoney/widgets/ktransactionfilter_p.h

https://invent.kde.org/office/kmymoney/commit/51a7a9f77cfaf8d5e9a1123dd2cf387064b9ea3e

diff --git a/doc/details-settings.docbook b/doc/details-settings.docbook
index 546bb97de..94d17eff6 100644
--- a/doc/details-settings.docbook
+++ b/doc/details-settings.docbook
@@ -175,16 +175,6 @@
 
   
 
-  
-Do not show closed accounts
-
-  Checking this box hides closed accounts from display in the 
Accounts,
-  Ledger, and Investment Views.  Hiding closed accounts makes viewing and 
working
-  with open accounts easier.  Unchecking this box will show closed 
accounts with
-  a line drawn through them allowing viewing and reopening if 
needed.
-
-  
-
   
 Show equity accounts
 
diff --git a/kmymoney/dialogs/settings/ksettingsgeneral.ui 
b/kmymoney/dialogs/settings/ksettingsgeneral.ui
index e71a5b04c..eacb15397 100644
--- a/kmymoney/dialogs/settings/ksettingsgeneral.ui
+++ b/kmymoney/dialogs/settings/ksettingsgeneral.ui
@@ -417,18 +417,6 @@ Set it to 0 to turn the feature off.
 

   
-  
-   
-
- This option hides all accounts that have been closed by 
the user in views and selection lists.
-
-You can use <b>View/Show all accounts</b> to temporarily show 
hidden accounts in the views.
-
-
- Do not show closed accounts
-
-   
-  
   

 
diff --git a/kmymoney/settings/kmymoney.kcfg b/kmymoney/settings/kmymoney.kcfg
index e491187de..4d5340310 100644
--- a/kmymoney/settings/kmymoney.kcfg
+++ b/kmymoney/settings/kmymoney.kcfg
@@ -228,10 +228,6 @@
Hide unused categories
false
   
-  
-   Hide closed accounts
-   false
-  
   
Show all accounts
false
diff --git a/kmymoney/settings/kmymoney.upd b/kmymoney/settings/kmymoney.upd
index d55becd02..5c7d35a08 100644
--- a/kmymoney/settings/kmymoney.upd
+++ b/kmymoney/settings/kmymoney.upd
@@ -1,4 +1,10 @@
+Version=5
 Id=1
-File=kmymoneyrc
+File=kmymoney/kmymoneyrc
 Group=List Options
 Key=listErronousTransactionColor,listErroneousTransactionColor
+
+Id=remove-hide-acc-opt-2021
+File=kmymoney/kmymoneyrc
+Group=List Options
+RemoveKey=HideClosedAccounts
diff --git a/kmymoney/views/kaccountsview.cpp b/kmymoney/views/kaccountsview.cpp
index 602cdb9af..1bfe260d7 100644
--- a/kmymoney/views/kaccountsview.cpp
+++ b/kmymoney/views/kaccountsview.cpp
@@ -82,7 +82,7 @@ void KAccountsView::refresh()
 d->m_needsRefresh = false;
 // TODO: check why the invalidate is needed here
 d->m_proxyModel->invalidate();
-
d->m_proxyModel->setHideClosedAccounts(KMyMoneySettings::hideClosedAccounts() 
&& !KMyMoneySettings::showAllAccounts());
+
d->m_proxyModel->setHideClosedAccounts(!KMyMoneySettings::showAllAccounts());
 d->m_proxyModel->setHideEquityAccounts(!KMyMoneySettings::expertMode());
 if (KMyMoneySettings::showCategoriesInAccountsView()) {
 d->m_proxyModel->addAccountGroup(QVector 
{eMyMoney::Account::Type::Income, eMyMoney::Account::Type::Expense});
@@ -348,7 +348,7 @@ void KAccountsView::slotCloseAccount()
 MyMoneyFile::instance()->modifyAccount(d->m_currentAccount);
 emit selectByObject(d->m_currentAccount, eView::Intent::None);
 ft.commit();
-if (KMyMoneySettings::hideClosedAccounts())
+if (!KMyMoneySettings::showAllAccounts())
 KMessageBox::information(this, i18n("You have closed this 
account. It remains in the system because you have transactions which still 
refer to it, but it is not shown in the views. You can make it visible again by 
going to the View menu and selecting Show all accounts or by deselecting 
the Do not show closed accounts setting."), i18n("Information"), 
"CloseAccountInfo");
 } catch (const MyMoneyException &) {
 }
diff --git a/kmymoney/views/kcategoriesview.cpp 
b/kmymoney/views/kcategoriesview.cpp
index 506283172..07a32389b 100644
--- a/kmymoney/views/kcategoriesview.cpp
+++ b/kmymoney/views/kcategoriesview.cp

[office/kmymoney] /: Remove Tip of the day feature

2021-09-27 Thread Thomas Baumgart
Git commit 7e3be95666b063f94a6fea182fa6c43e48df8582 by Thomas Baumgart, on 
behalf of Alexander Lohnau.
Committed on 27/09/2021 at 18:07.
Pushed by tbaumgart into branch 'master'.

Remove Tip of the day feature

M  +0-17   doc/firsttime.docbook
M  +0-4kmymoney/CMakeLists.txt
M  +0-1kmymoney/icons/icons.cpp
M  +0-10   kmymoney/kmymoney.cpp
M  +0-2kmymoney/kmymoney.h
M  +0-4kmymoney/main.cpp
D  +0-138  kmymoney/tips

https://invent.kde.org/office/kmymoney/commit/7e3be95666b063f94a6fea182fa6c43e48df8582

diff --git a/doc/firsttime.docbook b/doc/firsttime.docbook
index f9f483297..33343b249 100644
--- a/doc/firsttime.docbook
+++ b/doc/firsttime.docbook
@@ -14,23 +14,6 @@
 
 Running &kmymoney; for the first time
 
-
-  Once &kmymoney; has fully loaded two windows will be opened. The top window,
-  'Tip of the Day' offers one of a series of important or useful pieces of
-  information about the application.
-  
-   Tip of the Day
-   
-   
-   
-   
-   
-   Tip of the Day
-   
-   
-  
-
-
 
   You are recommended to quickly read through these tips by pressing on the
   Previous and Next buttons at 
the
diff --git a/kmymoney/CMakeLists.txt b/kmymoney/CMakeLists.txt
index 1fc7aa100..1bb39a1e3 100644
--- a/kmymoney/CMakeLists.txt
+++ b/kmymoney/CMakeLists.txt
@@ -220,10 +220,6 @@ install(FILES org.kde.kmymoney.appdata.xml
 install(FILES x-kmymoney.xml
   DESTINATION ${XDG_MIME_INSTALL_DIR})
 
-install(FILES
-   tips
-   DESTINATION ${CMAKE_INSTALL_DATADIR}/kmymoney)
-
 #UPDATE_XDG_MIMETYPES(${XDG_MIME_INSTALL_DIR})
 
 
diff --git a/kmymoney/icons/icons.cpp b/kmymoney/icons/icons.cpp
index cc03859ab..b74ac4b7c 100644
--- a/kmymoney/icons/icons.cpp
+++ b/kmymoney/icons/icons.cpp
@@ -111,7 +111,6 @@ const QHash iconMappings{
 {Icon::TaskComplete, QStringLiteral("task-complete")},
 {Icon::TaskOngoing, QStringLiteral("task-ongoing")},
 {Icon::TaskReject, QStringLiteral("task-reject")},
-{Icon::Tip, QStringLiteral("ktip")},
 {Icon::Unknown, QStringLiteral("unknown")},
 {Icon::UnmapOnlineAccount, QStringLiteral("network-disconnect")},
 {Icon::UserProperties, QStringLiteral("user-properties")},
diff --git a/kmymoney/kmymoney.cpp b/kmymoney/kmymoney.cpp
index f5479383f..84c55d92f 100644
--- a/kmymoney/kmymoney.cpp
+++ b/kmymoney/kmymoney.cpp
@@ -59,7 +59,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -1856,10 +1855,6 @@ QHash KMyMoneyApp::initActions()
 // The settings menu
 // *
 {Action::SettingsAllMessages,   
&KMyMoneyApp::slotEnableMessages},
-// *
-// The help menu
-// *
-{Action::HelpShow,  
&KMyMoneyApp::slotShowTipOfTheDay},
 // ***
 // Actions w/o main menu entry
 // ***
@@ -3433,11 +3428,6 @@ void KMyMoneyApp::slotBackupHandleEvents()
 }
 }
 
-void KMyMoneyApp::slotShowTipOfTheDay()
-{
-KTipDialog::showTip(d->m_myMoneyView, "", true);
-}
-
 void KMyMoneyApp::slotGenerateSql()
 {
 //  QPointer editor = new KGenerateSqlDlg(this);
diff --git a/kmymoney/kmymoney.h b/kmymoney/kmymoney.h
index ecd11f204..b792ed2da 100644
--- a/kmymoney/kmymoney.h
+++ b/kmymoney/kmymoney.h
@@ -200,8 +200,6 @@ protected Q_SLOTS:
   */
 void slotBackupHandleEvents();
 
-void slotShowTipOfTheDay();
-
 /**
   * Call this slot, if any configuration parameter has changed
   */
diff --git a/kmymoney/main.cpp b/kmymoney/main.cpp
index 7bd6db566..e76d8ac92 100644
--- a/kmymoney/main.cpp
+++ b/kmymoney/main.cpp
@@ -25,7 +25,6 @@
 // 
 // KDE Includes
 
-#include 
 #include 
 #include 
 #include 
@@ -332,9 +331,6 @@ int runKMyMoney(QApplication &a, const QUrl &file, bool 
noFile)
 }
 
 if (url.isValid() && !noFile) {
-if (importfile.isEmpty()) {
-KTipDialog::showTip(kmymoney, QString(), false);
-}
 kmymoney->slotFileOpenRecent(url);
 
 } else if (KMyMoneySettings::firstTimeRun()) {
diff --git a/kmymoney/tips b/kmymoney/tips
deleted file mode 100644
index ab0a720ba..0
--- a/kmymoney/tips
+++ /dev/null
@@ -1,138 +0,0 @@
-
-
-...that you can change the sort order of ledger entries by
-right-clicking the header of the ledger view?
-
-
-
-
-
-...that you can easily move to the other side of a transfer transaction
-by opening the context menu with the right mouse button and selecting one of 
the
-'Goto' functions?
-
-
-
-
-
-...that you can start editing a transaction by double-clicking on the
-transaction in the register?
-
-

[office/kmymoney] kmymoney: Allow completely deleting tags without prior reassignment

2022-01-05 Thread Thomas Baumgart
Git commit 5a04e6286adcee81fbe84497a0ce397b3df97f5a by Thomas Baumgart.
Committed on 05/01/2022 at 20:48.
Pushed by tbaumgart into branch 'master'.

Allow completely deleting tags without prior reassignment

FEATURE: 420114
GUI:

M  +42   -24   kmymoney/dialogs/ktagreassigndlg.cpp
M  +21   -12   kmymoney/dialogs/ktagreassigndlg.h
M  +84   -25   kmymoney/dialogs/ktagreassigndlg.ui
M  +61   -45   kmymoney/views/ktagsview.cpp

https://invent.kde.org/office/kmymoney/commit/5a04e6286adcee81fbe84497a0ce397b3df97f5a

diff --git a/kmymoney/dialogs/ktagreassigndlg.cpp 
b/kmymoney/dialogs/ktagreassigndlg.cpp
index 85e15ae6e..2cf61dad9 100644
--- a/kmymoney/dialogs/ktagreassigndlg.cpp
+++ b/kmymoney/dialogs/ktagreassigndlg.cpp
@@ -1,17 +1,14 @@
 /*
-SPDX-FileCopyrightText: 2011-2012 Alessandro Russo 
-SPDX-FileCopyrightText: 2017 Łukasz Wojniłowicz 

-SPDX-FileCopyrightText: 2020 Thomas Baumgart 
+SPDX-FileCopyrightText: 2022 Thomas Baumgart 
 SPDX-License-Identifier: GPL-2.0-or-later
 */
 
-#include "ktagreassigndlg.h"
-#include "ui_ktagreassigndlg.h"
-
 // 
 // QT Includes
 
+#include 
 #include 
+#include 
 
 // 
 // KDE Includes
@@ -19,15 +16,38 @@
 // 
 // Project Includes
 
+#include "idfilter.h"
+#include "ktagreassigndlg.h"
 #include "mymoneyfile.h"
 #include "tagsmodel.h"
-#include "idfilter.h"
 
-KTagReassignDlg::KTagReassignDlg(QWidget* parent) :
-QDialog(parent),
-ui(new Ui::KTagReassignDlg)
+#include "ui_ktagreassigndlg.h"
+
+KTagReassignDlg::KTagReassignDlg(QWidget* parent)
+: QDialog(parent)
+, ui(new Ui::KTagReassignDlg)
+, model(new IdFilter(this))
 {
+auto checkValidInput = [&]() {
+const auto idx = model->index(ui->tagCombo->currentIndex(), 0);
+const auto validInput = 
(!idx.data(eMyMoney::Model::IdRole).toString().isEmpty() || 
ui->removeCheckBox->isChecked());
+ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(validInput);
+};
+
 ui->setupUi(this);
+
+model->setSourceModel(MyMoneyFile::instance()->tagsModel());
+model->setSortLocaleAware(true);
+ui->tagCombo->setModel(model);
+
+connect(ui->tagCombo, QOverload::of(&QComboBox::currentIndexChanged), 
this, [&]() {
+checkValidInput();
+});
+connect(ui->removeCheckBox, &QCheckBox::toggled, this, [&]() {
+checkValidInput();
+});
+
+ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false);
 }
 
 KTagReassignDlg::~KTagReassignDlg()
@@ -35,20 +55,18 @@ KTagReassignDlg::~KTagReassignDlg()
 delete ui;
 }
 
-QString KTagReassignDlg::show(const QList& tagslist)
+void KTagReassignDlg::setupFilter(const QList& tagslist)
 {
-auto filter = new IdFilter(this);
-filter->setFilterList(tagslist);
-filter->setSourceModel(MyMoneyFile::instance()->tagsModel());
-filter->setSortLocaleAware(true);
-filter->sort(0);
-ui->tagCombo->setModel(filter);
-
-// execute dialog and if aborted, return empty string
-if (this->exec() == QDialog::Rejected)
-return QString();
-
-// otherwise return id of selected tag
-const auto idx = filter->index(ui->tagCombo->currentIndex(), 0);
+qobject_cast(model)->setFilterList(tagslist);
+model->sort(0);
+ui->tagCombo->setCurrentIndex(-1);
+}
+
+QString KTagReassignDlg::reassignTo() const
+{
+if (ui->removeCheckBox->isChecked())
+return {};
+
+const auto idx = 
ui->tagCombo->model()->index(ui->tagCombo->currentIndex(), 0);
 return idx.data(eMyMoney::Model::IdRole).toString();
 }
diff --git a/kmymoney/dialogs/ktagreassigndlg.h 
b/kmymoney/dialogs/ktagreassigndlg.h
index 0dcd85702..2ae03917e 100644
--- a/kmymoney/dialogs/ktagreassigndlg.h
+++ b/kmymoney/dialogs/ktagreassigndlg.h
@@ -1,7 +1,7 @@
 /*
 SPDX-FileCopyrightText: 2011-2012 Alessandro Russo 
 SPDX-FileCopyrightText: 2017 Łukasz Wojniłowicz 

-SPDX-FileCopyrightText: 2020 Thomas Baumgart 
+SPDX-FileCopyrightText: 2022 Thomas Baumgart 
 SPDX-License-Identifier: GPL-2.0-or-later
 */
 
@@ -29,7 +29,7 @@ class KTagReassignDlg;
  *  Implementation of the dialog that lets the user select a tag in order
  *  to re-assign transactions (for instance, if tags are deleted).
  */
-
+class QSortFilterProxyModel;
 class KMM_BASE_DIALOGS_EXPORT KTagReassignDlg : public QDialog
 {
 Q_OBJECT
@@ -40,19 +40,28 @@ public:
 ~KTagReassignDlg();
 
 /**
-  * This function sets up the dialog, lets the user select a tag and 
returns
-  * the id of the selected tag in the tagslist.
-  *
-  *

[office/kmymoney] kmymoney: Added additional filter combo box to categories view

2022-01-23 Thread Thomas Baumgart
Git commit ffd85aa0577cb573b1fdf72bbe179365cb56df1c by Thomas Baumgart.
Committed on 23/01/2022 at 15:02.
Pushed by tbaumgart into branch 'master'.

Added additional filter combo box to categories view

This allows to filter for unused or closed categories.

GUI:

M  +88   -24   kmymoney/models/accountsproxymodel.cpp
M  +12   -0kmymoney/models/accountsproxymodel.h
M  +7-1kmymoney/models/accountsproxymodel_p.h
M  +23   -2kmymoney/views/kaccountsview.ui
M  +1-0kmymoney/views/kaccountsview_p.h
M  +3-0kmymoney/views/kcategoriesview.ui
M  +1-0kmymoney/views/kcategoriesview_p.h

https://invent.kde.org/office/kmymoney/commit/ffd85aa0577cb573b1fdf72bbe179365cb56df1c

diff --git a/kmymoney/models/accountsproxymodel.cpp 
b/kmymoney/models/accountsproxymodel.cpp
index 6b98f85f2..64b28b4db 100644
--- a/kmymoney/models/accountsproxymodel.cpp
+++ b/kmymoney/models/accountsproxymodel.cpp
@@ -14,12 +14,17 @@
 // 
 // KDE Includes
 
+#include 
+
 // 
 // Project Includes
 
+#include "accountsmodel.h"
+#include "journalmodel.h"
 #include "mymoneyenums.h"
+#include "mymoneyfile.h"
 #include "mymoneymoney.h"
-#include "accountsmodel.h"
+#include "schedulesjournalmodel.h"
 
 AccountsProxyModel::AccountsProxyModel(QObject *parent) :
 QSortFilterProxyModel(parent),
@@ -221,37 +226,63 @@ bool AccountsProxyModel::acceptSourceItem(const 
QModelIndex &source) const
 if (isValidAccountEntry) {
 const auto accountType = 
static_cast(accountTypeValue.toInt());
 
-if (hideClosedAccounts() && sourceModel()->data(source, 
eMyMoney::Model::Roles::AccountIsClosedRole).toBool())
-return false;
-
-// we hide stock accounts if not in expert mode
-// we hide equity accounts if not in expert mode
-if (hideEquityAccounts()) {
-if (accountType == eMyMoney::Account::Type::Equity)
+switch (state()) {
+case State::Any:
+if (hideClosedAccounts() && sourceModel()->data(source, 
eMyMoney::Model::Roles::AccountIsClosedRole).toBool())
 return false;
 
-if (sourceModel()->data(source, 
eMyMoney::Model::Roles::AccountIsInvestRole).toBool())
-return false;
-}
+// we hide stock accounts if not in expert mode
+// we hide equity accounts if not in expert mode
+if (hideEquityAccounts()) {
+if (accountType == eMyMoney::Account::Type::Equity)
+return false;
 
-// we hide unused income and expense accounts if the specific flag 
is set
-if (hideUnusedIncomeExpenseAccounts()) {
-if ((accountType == eMyMoney::Account::Type::Income) || 
(accountType == eMyMoney::Account::Type::Expense)) {
-const auto totalValue = sourceModel()->data(source, 
eMyMoney::Model::Roles::AccountTotalValueRole);
-if (totalValue.isValid() && 
totalValue.value().isZero()) {
-emit unusedIncomeExpenseAccountHidden();
+if (sourceModel()->data(source, 
eMyMoney::Model::Roles::AccountIsInvestRole).toBool())
 return false;
+}
+
+// we hide unused income and expense accounts if the specific 
flag is set
+if (hideUnusedIncomeExpenseAccounts()) {
+if ((accountType == eMyMoney::Account::Type::Income) || 
(accountType == eMyMoney::Account::Type::Expense)) {
+const auto totalValue = sourceModel()->data(source, 
eMyMoney::Model::Roles::AccountTotalValueRole);
+if (totalValue.isValid() && 
totalValue.value().isZero()) {
+emit unusedIncomeExpenseAccountHidden();
+return false;
+}
 }
 }
-}
-// we hide zero balance investment accounts
-if (hideZeroBalancedEquityAccounts()) {
-if (accountType == eMyMoney::Account::Type::Equity || 
sourceModel()->data(source, 
eMyMoney::Model::Roles::AccountIsInvestRole).toBool()) {
-const auto totalValue = sourceModel()->data(source, 
eMyMoney::Model::Roles::AccountTotalValueRole);
-if (totalValue.isValid() && 
totalValue.value().isZero()) {
-return false;
+// we hide zero balance investment accounts
+if (hideZeroBalancedEquityAccounts()) {
+if (accountType == eMyMoney::Account::Type::Equity || 
sourceModel()

[office/kmymoney] kmymoney/dialogs: Improve online price update dialog

2022-02-05 Thread Thomas Baumgart
Git commit 6cbff10119df4e6edecb1066b126f655f7b77b06 by Thomas Baumgart.
Committed on 05/02/2022 at 10:19.
Pushed by tbaumgart into branch 'master'.

Improve online price update dialog

Don't show the status part before online activity started. Hide progress
bar once the update is finished. Add a close button to hide the status
part again.

GUI:

M  +30   -9kmymoney/dialogs/kequitypriceupdatedlg.cpp
M  +68   -20   kmymoney/dialogs/kequitypriceupdatedlg.ui

https://invent.kde.org/office/kmymoney/commit/6cbff10119df4e6edecb1066b126f655f7b77b06

diff --git a/kmymoney/dialogs/kequitypriceupdatedlg.cpp 
b/kmymoney/dialogs/kequitypriceupdatedlg.cpp
index 40c65b488..2f8a62c63 100644
--- a/kmymoney/dialogs/kequitypriceupdatedlg.cpp
+++ b/kmymoney/dialogs/kequitypriceupdatedlg.cpp
@@ -11,10 +11,11 @@
 // 
 // QT Includes
 
-#include 
-#include 
 #include 
 #include 
+#include 
+#include 
+#include 
 
 // 
 // KDE Includes
@@ -33,15 +34,16 @@
 
 #include "ui_kequitypriceupdatedlg.h"
 
-#include "mymoneyfile.h"
-#include "mymoneyaccount.h"
-#include "mymoneysecurity.h"
-#include "mymoneyprice.h"
-#include "webpricequote.h"
+#include "dialogenums.h"
+#include "icons.h"
 #include "kequitypriceupdateconfdlg.h"
 #include "kmymoneyutils.h"
+#include "mymoneyaccount.h"
 #include "mymoneyexception.h"
-#include "dialogenums.h"
+#include "mymoneyfile.h"
+#include "mymoneyprice.h"
+#include "mymoneysecurity.h"
+#include "webpricequote.h"
 
 #define WEBID_COL   0
 #define NAME_COL1
@@ -93,6 +95,12 @@ public:
 
 ui->btnUpdateAll->setEnabled(false);
 
+ui->closeStatusButton->setIcon(Icons::get(Icons::Icon::DialogClose));
+q->connect(ui->closeStatusButton, &QToolButton::clicked, 
ui->statusContainer, &QWidget::hide);
+
+// hide the status widgets until there is activity
+ui->statusContainer->hide();
+
 auto file = MyMoneyFile::instance();
 
 //
@@ -450,6 +458,11 @@ void KEquityPriceUpdateDlg::slotUpdateSelectedClicked()
 // disable sorting while the update is running to maintain the current 
order of items on which
 // the update process depends and which could be changed with sorting 
enabled due to the updated values
 d->ui->lvEquityList->setSortingEnabled(false);
+
+// show the status widgets
+d->ui->statusContainer->show();
+d->ui->prgOnlineProgress->show();
+
 auto item = d->ui->lvEquityList->invisibleRootItem()->child(0);
 auto skipCnt = 1;
 while (item && !item->isSelected()) {
@@ -474,6 +487,11 @@ void KEquityPriceUpdateDlg::slotUpdateAllClicked()
 // disable sorting while the update is running to maintain the current 
order of items on which
 // the update process depends and which could be changed with sorting 
enabled due to the updated values
 d->ui->lvEquityList->setSortingEnabled(false);
+
+// show the status widgets
+d->ui->statusContainer->show();
+d->ui->prgOnlineProgress->show();
+
 QTreeWidgetItem* item = d->ui->lvEquityList->invisibleRootItem()->child(0);
 if (item) {
 d->ui->prgOnlineProgress->setMaximum(1 + 
d->ui->lvEquityList->invisibleRootItem()->childCount());
@@ -786,8 +804,11 @@ void KEquityPriceUpdateDlg::finishUpdate()
 Q_D(KEquityPriceUpdateDlg);
 // we've run past the end, reset to the default value.
 d->m_fUpdateAll = false;
-// force progress bar to show 100%
+
+// force progress bar to show 100% and hide it after a while
 d->ui->prgOnlineProgress->setValue(d->ui->prgOnlineProgress->maximum());
+QTimer::singleShot(500, d->ui->prgOnlineProgress, &QProgressBar::hide);
+
 // re-enable the sorting that was disabled during the update process
 d->ui->lvEquityList->setSortingEnabled(true);
 }
diff --git a/kmymoney/dialogs/kequitypriceupdatedlg.ui 
b/kmymoney/dialogs/kequitypriceupdatedlg.ui
index e1d2aae1a..2c79bf9c7 100644
--- a/kmymoney/dialogs/kequitypriceupdatedlg.ui
+++ b/kmymoney/dialogs/kequitypriceupdatedlg.ui
@@ -7,14 +7,14 @@

 0
 0
-537
-482
+696
+526

   
   
Update Stock and Currency Prices
   
-  
+  

 
  
@@ -117,25 +117,73 @@
 


-
- 
-  Status:
- 
- 
-  false
- 
-
-   
-   
-
- 
-  true
- 
+
+ 
+  
+   0
+  
+  
+   0
+  
+  
+   0
+  
+  
+   0
+  
+  
+   0
+  
+  
+   
+
+  

[office/kmymoney] kmymoney: Improve UI behavior during reconciliation

2022-02-06 Thread Thomas Baumgart
Git commit 5510898346affb2a5340cb8d173109097370fcee by Thomas Baumgart.
Committed on 06/02/2022 at 09:47.
Pushed by tbaumgart into branch 'master'.

Improve UI behavior during reconciliation

Added reconciliation toolbar which will be shown when an account is
reconciled. Add the cancel reconciliation action to the UI.

GUI:

M  +32   -2kmymoney/kmymoney.cpp
M  +7-1kmymoney/kmymoneyui.rc
M  +1-0kmymoney/views/kmymoneyview.cpp
M  +6-4kmymoney/views/simpleledgerview.cpp

https://invent.kde.org/office/kmymoney/commit/5510898346affb2a5340cb8d173109097370fcee

diff --git a/kmymoney/kmymoney.cpp b/kmymoney/kmymoney.cpp
index 64f16533e..0b2de2344 100644
--- a/kmymoney/kmymoney.cpp
+++ b/kmymoney/kmymoney.cpp
@@ -1101,11 +1101,20 @@ public:
 
aC->action(QString::fromLatin1(KStandardAction::name(KStandardAction::Close)))->setEnabled(m_storageInfo.isOpened);
 pActions[Action::UpdateAllAccounts]->setEnabled(m_storageInfo.isOpened 
&& KMyMoneyUtils::canUpdateAllAccounts());
 
+updateReconciliationTools(selections);
+
 // update actions in views and plugins
 m_myMoneyView->updateActions(selections);
 KMyMoneyPlugin::updateActions(pPlugins, selections);
 }
 
+void updateReconciliationTools(const SelectedObjects& selections)
+{
+// update reconciliation toolbar
+const bool inReconciliation = 
!selections.firstSelection(SelectedObjects::ReconciliationAccount).isEmpty();
+q->toolBar("reconcileToolBar")->setVisible(inReconciliation);
+}
+
 bool canFileSaveAs() const
 {
 return (m_storageInfo.isOpened
@@ -1688,8 +1697,8 @@ QHash KMyMoneyApp::initActions()
 {Action::OpenAccount,   
QStringLiteral("account_open"),   i18n("Open ledger"),  
  Icon::Ledger},
 {Action::StartReconciliation,   
QStringLiteral("account_reconcile"),  i18n("Reconcile..."), 
  Icon::Reconcile},
 {Action::FinishReconciliation,  
QStringLiteral("account_reconcile_finish"),   i18nc("Finish 
reconciliation", "Finish"),   Icon::Reconciled},
-{Action::PostponeReconciliation,
QStringLiteral("account_reconcile_postpone"), i18n("Postpone 
reconciliation"),Icon::Pause},
-{Action::CancelReconciliation,  
QStringLiteral("account_reconcile_cancel"),   i18n("Cancel 
reconciliation"),  Icon::Empty},
+{Action::PostponeReconciliation,
QStringLiteral("account_reconcile_postpone"), i18nc("Postpone 
reconciliation", "Postpone"),   Icon::Pause},
+{Action::CancelReconciliation,  
QStringLiteral("account_reconcile_cancel"),   i18nc("Cancel 
reconciliation", "Cancel"),   Icon::DialogCancel},
 {Action::ReconciliationReport,  
QStringLiteral("account_reconcile_report"),   i18n("Report 
reconciliation"),  Icon::Empty},
 {Action::EditAccount,   
QStringLiteral("account_edit"),   i18n("Edit account..."),  
  Icon::AccountEdit},
 {Action::DeleteAccount, 
QStringLiteral("account_delete"), i18n("Delete account..."),
  Icon::AccountRemove},
@@ -1912,6 +1921,27 @@ QHash KMyMoneyApp::initActions()
 connect(lutActions[connection.key()], &QAction::triggered, this, 
connection.value());
 }
 
+{
+// struct for adding tooltips to actions
+struct actionInfo {
+Action  action;
+QString tip;
+};
+
+// clang-format off
+const QVector actionInfos {
+{Action::StartReconciliation,i18nc("@info:tooltip", "Start 
reconciling the currently selected account")},
+{Action::PostponeReconciliation, i18nc("@info:tooltip", 
"Postpone the current reconciliation")},
+{Action::FinishReconciliation,   i18nc("@info:tooltip", 
"Finish the current reconciliation")},
+{Action::CancelReconciliation,   i18nc("@info:tooltip", 
"Cancel the current reconciliation")},
+};
+// clang-format on
+
+for (const auto& actionInfo : actionInfos) {
+lutActions[actionInfo.action]->setToolTip(actionInfo.tip);
+}
+}
+
 // *
 // Setting some of added actions checkable
 // *
diff --git a/kmymoney/kmymoneyui.rc b/kmymoney/kmymon

[office/kmymoney] /: Replace remaining QRegExp with QRegularExpression

2022-02-23 Thread Thomas Baumgart
Git commit 3edad8ce7189980167309582cfa7d77af447ac57 by Thomas Baumgart.
Committed on 23/02/2022 at 15:48.
Pushed by tbaumgart into branch 'master'.

Replace remaining QRegExp with QRegularExpression

M  +6-6doc/details-investments.docbook
M  +4-4doc/details-search.docbook
M  +8-7kmymoney/converter/mymoneystatementreader.cpp
M  +23   -21   kmymoney/dialogs/kequitypriceupdatedlg.cpp
M  +8-9kmymoney/mymoney/mymoneyaccount.cpp
M  +13   -10   kmymoney/mymoney/mymoneyaccountloan.cpp
M  +6-3kmymoney/mymoney/mymoneycostcenter.cpp
M  +11   -10   kmymoney/mymoney/mymoneyfile.cpp
M  +4-3kmymoney/mymoney/mymoneypayee.cpp
M  +15   -6kmymoney/mymoney/mymoneytracer.cpp
M  +2-2kmymoney/mymoney/mymoneyutils.cpp
M  +20   -0kmymoney/mymoney/tests/mymoneyutils-test.cpp
M  +2-0kmymoney/mymoney/tests/mymoneyutils-test.h
M  +4-3kmymoney/plugins/csv/import/csvwizard.cpp
M  +3-2kmymoney/plugins/gnc/import/gncimporter.cpp
M  +21   -16   kmymoney/plugins/kbanking/kbanking.cpp
M  +5-4kmymoney/plugins/kbanking/widgets/chiptandialog.cpp
M  +2-2kmymoney/plugins/kbanking/widgets/phototandialog.cpp
M  +7-6kmymoney/plugins/ofx/import/dialogs/konlinebankingsetupwizard.cpp
M  +12   -11   kmymoney/plugins/ofx/import/dialogs/mymoneyofxconnector.cpp
M  +18   -17   kmymoney/plugins/ofx/import/ofxpartner.cpp
M  +14   -10   kmymoney/plugins/qif/config/mymoneyqifprofile.cpp
M  +21   -20   kmymoney/plugins/qif/import/mymoneyqifreader.cpp
M  +1-1kmymoney/plugins/sql/mymoneydbdef.cpp
M  +1-1kmymoney/plugins/sql/mymoneystoragesql_p.h
M  +27   -24   kmymoney/plugins/views/reports/core/pivottable.cpp
M  +3-4kmymoney/plugins/views/reports/core/tests/pivottable-test.cpp
M  +10   -6kmymoney/plugins/xml/kcm_xmlstorage.cpp
M  +10   -7kmymoney/plugins/xml/ksettingsgpg.cpp
M  +1-1kmymoney/plugins/xml/mymoneystorageanon.cpp
M  +7-5kmymoney/plugins/xml/xmlstorage.cpp
M  +4-3kmymoney/settings/kmymoneysettings_addons.cpp
M  +9-7kmymoney/tests/testutilities.cpp
M  +0-1kmymoney/views/kmymoneyview.cpp
M  +6-4kmymoney/views/kpayeesview_p.h
M  +3-3kmymoney/views/ledgerview.cpp
M  +8-6kmymoney/widgets/kaccounttemplateselector.cpp
M  +9-8kmymoney/widgets/kmymoneyaccountcombo.cpp
M  +4-5kmymoney/widgets/kmymoneyaccountcompletion.cpp
M  +11   -9kmymoney/widgets/kmymoneyaccountselector.cpp
M  +1-1kmymoney/widgets/kmymoneyaccountselector.h
M  +5-5kmymoney/widgets/kmymoneycalculator.cpp
M  +2-2kmymoney/widgets/kmymoneycompletion_p.h
M  +14   -15   kmymoney/widgets/kmymoneyselector.cpp
M  +13   -13   kmymoney/widgets/kmymoneyselector.h
M  +4-3tools/xea2kmt.cpp

https://invent.kde.org/office/kmymoney/commit/3edad8ce7189980167309582cfa7d77af447ac57

diff --git a/doc/details-investments.docbook b/doc/details-investments.docbook
index f7cc0a928..0eab3fd2f 100644
--- a/doc/details-investments.docbook
+++ b/doc/details-investments.docbook
@@ -172,7 +172,7 @@
 rounding errors which can make &kmymoney; unable to exactly match the 
information
 shown by your brokerage institution.
   
-  
+
Trading market.  Where the stock trades.  This is an 
optional
 field which is provided for your convenience.  This information is not used
 anywhere else within &kmymoney;.
@@ -248,7 +248,7 @@
 possible.
   
 
-  
+
 
   It is possible to own shares of the same security in different investment 
accounts,
   such as a regular investment account and also a retirement account.  If you 
follow the
@@ -287,7 +287,7 @@
   online source.  In addition, it is possible to close an empty account, or to
   reopen a closed account.  The order for value, quantity and price can be 
changed
   on the screen by selecting any of them by left clicking on the item in the 
top bar and
-  dragging it to the left or right. 
+  dragging it to the left or right.
 
 
   If you choose to Edit an Investment, you will use the Investment 
detail
@@ -551,7 +551,7 @@
 Online Price Quotes
 
   &kmymoney; has the ability to download the latest prices for your securities
-  and currencies via the web.  
+  and currencies via the web.
 
 
 
@@ -587,7 +587,7 @@
   Source.  This is the name of the service from which the quote should
   be fetched.  &kmymoney; ships with several sources to choose from.  Yahoo is 
the
   recommended default source, and should work for most investments and all
-  currencies. 
+  currencies.
 
 
 
@@ -704,7 +704,7 @@
 
   The page parser looks for a symbol, a date, and a price.  Regular 
expressions tell
   it how to extract those items from the page.  Please review the 
documentation for
-  the https://doc.qt.io/qt-5/qregexp.html";>QRegExp
+  the https://doc.qt.io/qt-5/qregularexpression.html";>QRegularExpression
   class for the exact syntax regular expressions used by &kmymo

[office/kmymoney/5.1] doc: Fix minor typo in docs

2022-07-21 Thread Thomas Baumgart
Git commit 2d8d23a2fd9852d06e5c068699f2ecad90e5a381 by Thomas Baumgart.
Committed on 22/07/2022 at 06:40.
Pushed by tbaumgart into branch '5.1'.

Fix minor typo in docs

(cherry picked from commit 3812a319861f9dc74a3da00952e32b5677ed756f)

M  +1-1doc/details-settings.docbook

https://invent.kde.org/office/kmymoney/commit/2d8d23a2fd9852d06e5c068699f2ecad90e5a381

diff --git a/doc/details-settings.docbook b/doc/details-settings.docbook
index 94d17eff6..d2915ac2a 100644
--- a/doc/details-settings.docbook
+++ b/doc/details-settings.docbook
@@ -546,7 +546,7 @@ of accounts.
   the fields which have been selected as part of the sort order for that view.
   You can adjust the relative order of the fields by selecting one and 
adjusting
   its position in the list using the up and down arrows to the right of the
-  list.  You can can switch between ascending and descending sort for any item
+  list.  You can switch between ascending and descending sort for any item
   by double clicking on it.
 
 


[office/kmymoney] /: Add a button to adjust current split with unassigned amount

2022-11-29 Thread Thomas Baumgart
Git commit 37641841e99f8a0842f3097f00d1249871d03847 by Thomas Baumgart, on 
behalf of Alexander Kuznetsov.
Committed on 29/11/2022 at 10:11.
Pushed by tbaumgart into branch 'master'.

Add a button to adjust current split with unassigned amount

Adds a button to adjust the selected split
with the unassigned or over-assigned amount
directly to balance the transaction without
using a calculator.

M  +2-0.gitignore
M  +23   -1doc/details-ledgers.docbook
A  +---doc/split_unassigned.png
M  +73   -20   kmymoney/views/splitdialog.cpp
M  +5-0kmymoney/views/splitdialog.h
M  +16   -1kmymoney/views/splitdialog.ui

https://invent.kde.org/office/kmymoney/commit/37641841e99f8a0842f3097f00d1249871d03847

diff --git a/.gitignore b/.gitignore
index cad01d5d7..3cd57c734 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,3 +21,5 @@ CMakeSettings.json
 .idea
 .vs
 docker/.env
+.vscode
+
diff --git a/doc/details-ledgers.docbook b/doc/details-ledgers.docbook
index 1d51d92ba..10c61f112 100644
--- a/doc/details-ledgers.docbook
+++ b/doc/details-ledgers.docbook
@@ -472,6 +472,29 @@
   transaction unassigned.
 
 
+
+   
+   Split with unassigned amount
+   
+   
+   
+   
+   
+   Split with unasssigned amount
+   
+   
+   
+
+
+
+  To redistribute an 'Unassigned' or 'Overassigned' amount, select a split 
item that has to be adjusted.
+  After that click on a button Apply Difference.
+  If 'Unassigned' was previously shown and non-zero, that amount will be added 
to the selected line item value.
+  If 'Overassigned' was previously shown and non-zero, that amount will be 
subtracted from the selected line item value.
+  As the result, the 'Unassigned' amount will be set to zero and a transaction 
could be saved
+  successfully.
+
+
 
   Note that the category field in the transaction form or the transaction
   list now displays Split transaction.
@@ -729,4 +752,3 @@
 
 
 
-
diff --git a/doc/split_unassigned.png b/doc/split_unassigned.png
new file mode 100644
index 0..04701
Binary files /dev/null and b/doc/split_unassigned.png differ
diff --git a/kmymoney/views/splitdialog.cpp b/kmymoney/views/splitdialog.cpp
index e2042b772..573f85ab5 100644
--- a/kmymoney/views/splitdialog.cpp
+++ b/kmymoney/views/splitdialog.cpp
@@ -15,9 +15,10 @@
 // 
 // KDE Includes
 
+#include 
+#include 
 #include 
 #include 
-#include 
 
 // 
 // Project Includes
@@ -81,7 +82,8 @@ static const int DiffRow = 1;
 static const int AmountRow = 2;
 static const int HeaderCol = 0;
 static const int ValueCol = 1;
-
+static const int SummaryRows = 3;
+static const int SummaryCols = 2;
 
 void SplitDialog::Private::deleteSplits(QModelIndexList indexList)
 {
@@ -106,7 +108,7 @@ void SplitDialog::Private::deleteSplits(QModelIndexList 
indexList)
 if (!(id.isEmpty() || id.endsWith('-'))) {
 model->removeRow(*it);
 }
-} while(it != sortedList.constBegin());
+} while (it != sortedList.constBegin());
 blockEditorStart(false);
 }
 
@@ -125,7 +127,7 @@ void SplitDialog::Private::blockImmediateEditor()
 void SplitDialog::Private::selectRow(int row)
 {
 if (row >= ui->splitView->model()->rowCount())
-row = ui->splitView->model()->rowCount()-1;
+row = ui->splitView->model()->rowCount() - 1;
 if (row >= 0) {
 blockEditorStart(true);
 ui->splitView->selectRow(row);
@@ -165,6 +167,7 @@ SplitDialog::SplitDialog(const MyMoneySecurity& commodity,
 connect(d->ui->deleteAllButton, &QAbstractButton::pressed, this, 
&SplitDialog::deleteAllSplits);
 connect(d->ui->deleteButton, &QAbstractButton::pressed, this, 
&SplitDialog::deleteSelectedSplits);
 connect(d->ui->deleteZeroButton, &QAbstractButton::pressed, this, 
&SplitDialog::deleteZeroSplits);
+connect(d->ui->adjustUnassigned, &QAbstractButton::pressed, this, 
&SplitDialog::adjustUnassigned);
 connect(d->ui->mergeButton, &QAbstractButton::pressed, this, 
&SplitDialog::mergeSplits);
 connect(d->ui->newSplitButton, &QAbstractButton::pressed, this, 
&SplitDialog::newSplit);
 
@@ -176,19 +179,24 @@ SplitDialog::SplitDialog(const MyMoneySecurity& commodity,
 size.setHeight(size.height() - 1);
 resize(size.expandedTo(minimumSizeHint()));
 
+// m_unassigned_over = 
KColorScheme(QPalette::Normal).foreground(KColorScheme::PositiveText);
+// m_unassigned_under = 
KColorScheme(QPalette::Normal).foreground(KColorScheme::NegativeText);
+m_unassigned_error = 
KColorScheme(QPalette::Normal).foreground(KColorScheme::NegativeText);
+m_unassigned_normal = 
KColorScheme(QPalette::Normal).

[kde-doc-english] extragear/office/kmymoney/kmymoney

2011-09-30 Thread Thomas Baumgart
SVN commit 1256519 by tbaumgart:

Added capability to select the payee source when importing OFX files. More 
information can be found on https://svn.reviewboard.kde.org/r/6777/

FEATURE: 271734
REVIEW: 6777
GUI:

 M  +10 -2 kmymoney.cpp  
 M  +1 -1  kmymoney.h  
 M  +14 -1 plugins/importinterface.h  
 M  +2 -2  plugins/interfaces/kmmimportinterface.cpp  
 M  +1 -1  plugins/interfaces/kmmimportinterface.h  
 M  +4 -0  plugins/ofximport/CMakeLists.txt  
 A plugins/ofximport/importoption.ui  
 M  +11 -1 plugins/ofximport/ofximporterplugin.cpp  


--- trunk/extragear/office/kmymoney/kmymoney/kmymoney.cpp #1256518:1256519
@@ -1390,7 +1390,7 @@
   }
 }
 
-KUrl KMyMoneyApp::selectFile(const QString& /*title*/, const QString& _path, 
const QString& mask, KFile::Mode mode)
+KUrl KMyMoneyApp::selectFile(const QString& /*title*/, const QString& _path, 
const QString& mask, KFile::Mode mode, QWidget* widget)
 {
   KUrl url;
   QString path(_path);
@@ -1400,12 +1400,20 @@
   if (path.isEmpty())
 path = "kfiledialog:///kmymoney-import";
 
-  QPointer dialog = new KFileDialog(KUrl(path), mask, this);
+  QPointer dialog = new KFileDialog(KUrl(path), mask, this, 
widget);
   dialog->setMode(mode);
 
   if (dialog->exec() == QDialog::Accepted) {
 url = dialog->selectedUrl();
   }
+
+  // in case we have an additional widget, we remove it from the
+  // dialog, so that the caller can still access it. Therefore, it is
+  // the callers responsibility to delete the object
+
+  if (widget)
+widget->setParent(0);
+
   delete dialog;
 
   return url;
--- trunk/extragear/office/kmymoney/kmymoney/kmymoney.h #1256518:1256519
@@ -527,7 +527,7 @@
*/
   void setAccountOnlineParameters(const MyMoneyAccount& acc, const 
MyMoneyKeyValueContainer& kvps);
 
-  KUrl selectFile(const QString& title, const QString& path, const QString& 
mask, KFile::Mode mode);
+  KUrl selectFile(const QString& title, const QString& path, const QString& 
mask, KFile::Mode mode, QWidget *widget);
 
   const MyMoneyAccount& findAccount(const MyMoneyAccount& acc, const 
MyMoneyAccount& parent) const;
 
--- trunk/extragear/office/kmymoney/kmymoney/plugins/importinterface.h 
#1256518:1256519
@@ -54,7 +54,20 @@
   explicit ImportInterface(QObject* parent, const char* name = 0);
   ~ImportInterface() {}
 
-  virtual KUrl selectFile(const QString& title, const QString& path, const 
QString& mask, KFile::Mode mode) const = 0;
+  /**
+   * This method is provided by KMyMoney to select a file to
+   * be imported. A caption for the dialog can be provided via
+   * @a title, a specific directory to be started with as @a path.
+   * Which files are selectable is controlled via the contents
+   * of @a mask. @a mode controls the behavior of the dialog. In case
+   * the importer requires additional information, it can provide
+   * a widget to ask for them. If none are required, pass 0.
+   *
+   * @note In case you create a widget and pass it to selectFile()
+   * you are responsible to delete the widget. It will not be deleted
+   * automatically during the destruction of the dialog.
+   */
+  virtual KUrl selectFile(const QString& title, const QString& path, const 
QString& mask, KFile::Mode mode, QWidget *widget) const = 0;
 
 signals:
 };
--- 
trunk/extragear/office/kmymoney/kmymoney/plugins/interfaces/kmmimportinterface.cpp
 #1256518:1256519
@@ -34,9 +34,9 @@
 {
 }
 
-KUrl KMyMoneyPlugin::KMMImportInterface::selectFile(const QString& title, 
const QString& path, const QString& mask, KFile::Mode mode) const
+KUrl KMyMoneyPlugin::KMMImportInterface::selectFile(const QString& title, 
const QString& path, const QString& mask, KFile::Mode mode, QWidget *widget) 
const
 {
-  return m_app->selectFile(title, path, mask, mode);
+  return m_app->selectFile(title, path, mask, mode, widget);
 }
 
 #include "kmmimportinterface.moc"
--- 
trunk/extragear/office/kmymoney/kmymoney/plugins/interfaces/kmmimportinterface.h
 #1256518:1256519
@@ -52,7 +52,7 @@
   KMMImportInterface(KMyMoneyApp* app, QObject* parent, const char* name = 0);
   ~KMMImportInterface() {}
 
-  KUrl selectFile(const QString& title, const QString& path, const QString& 
mask, KFile::Mode mode) const;
+  KUrl selectFile(const QString& title, const QString& path, const QString& 
mask, KFile::Mode mode, QWidget *widget) const;
 
 private:
   KMyMoneyApp*m_app;
--- trunk/extragear/office/kmymoney/kmymoney/plugins/ofximport/CMakeLists.txt 
#1256518:1256519
@@ -9,6 +9,10 @@
 
 SET(kmm_ofximport_PART_SRCS ofximporterplugin.cpp ofxpartner.cpp)
 
+SET(kmm_ofximport_PART_UI importoption.ui)
+
+KDE4_ADD_UI_FILES(kmm_ofximport_PART_SRCS ${kmm_ofximport_PART_UI})
+
 KDE4_ADD_PLUGIN(kmm_ofximport ${kmm_ofximport_PART_SRCS})
 
 TARGET_LINK_LIBRARIES(kmm_ofximport
--- 
trunk/extragear/office/kmymoney/kmymoney/plugins/ofximport/ofximporterplugin.cpp
 #1256518:1256519
@@ -44,6 +44,7 @@
 #include "konlinebankingstatus.h"
 #include "konlinebankingsetupwizard.h"
 #include "ko

[kde-doc-english] [kmymoney] /: Show information about expiration of recover key

2014-08-31 Thread Thomas Baumgart
Git commit 0c55298bde19d33aeabe2e24387e70b588bb2e9d by Thomas Baumgart.
Committed on 31/08/2014 at 15:55.
Pushed by tbaumgart into branch 'master'.

Show information about expiration of recover key

30 days prior to the expiration of the KMyMoney recover key
an information dialog will popup during application start or
after settings have been changed if the recover key is in use.

GUI:

M  +37   -0kmymoney/kmymoney.cpp
M  +21   -0libkgpgfile/kgpgfile.cpp
M  +8-0libkgpgfile/kgpgfile.h

http://commits.kde.org/kmymoney/0c55298bde19d33aeabe2e24387e70b588bb2e9d

diff --git a/kmymoney/kmymoney.cpp b/kmymoney/kmymoney.cpp
index 3dc2599..9b60171 100644
--- a/kmymoney/kmymoney.cpp
+++ b/kmymoney/kmymoney.cpp
@@ -170,6 +170,13 @@
 
 
 #define RECOVER_KEY_ID"59B0F826D2B08440"
+
+// define the default period to warn about an expiring recoverkey to 30 days
+// but allows to override this setting during build time
+#ifndef RECOVER_KEY_EXPIRATION_WARNING
+#define RECOVER_KEY_EXPIRATION_WARNING 30
+#endif
+
 #define ID_STATUS_MSG 1
 
 enum backupStateE {
@@ -2455,6 +2462,36 @@ void KMyMoneyApp::slotUpdateConfiguration(void)
   }
 
   d->setCustomColors();
+
+  // check if the recovery key is still valid or expires soon
+
+  if (KMyMoneySettings::writeDataEncrypted() && 
KMyMoneySettings::encryptRecover()) {
+if (KGPGFile::GPGAvailable()) {
+  KGPGFile file;
+  QDateTime expirationDate = 
file.keyExpires(QLatin1String(RECOVER_KEY_ID));
+  if (expirationDate.isValid() && 
QDateTime::currentDateTime().daysTo(expirationDate) <= 
RECOVER_KEY_EXPIRATION_WARNING) {
+bool skipMessage = false;
+
+//get global config object for our app.
+KSharedConfigPtr kconfig = KGlobal::config();
+KConfigGroup grp;
+QDate lastWarned;
+if (kconfig) {
+  grp = d->m_config->group("General Options");
+  lastWarned = grp.readEntry("LastRecoverKeyExpirationWarning", 
QDate());
+  if (QDate::currentDate() == lastWarned) {
+skipMessage = true;
+  }
+}
+if (!skipMessage) {
+  if (kconfig) {
+grp.writeEntry("LastRecoverKeyExpirationWarning", 
QDate::currentDate());
+  }
+  KMessageBox::information(this, i18n("You have configured KMyMoney to 
use GPG to protect your data and to encrypt your data also with the KMyMoney 
recover key. This key is about to expire in %1 days. Please update the key from 
a keyserver using your GPG frontend (e.g. 
KGPG).").arg(QDateTime::currentDateTime().daysTo(expirationDate)), 
i18n("Recover key expires soon"));
+}
+  }
+}
+  }
 }
 
 /** No descriptions */
diff --git a/libkgpgfile/kgpgfile.cpp b/libkgpgfile/kgpgfile.cpp
index 1289dc9..5371c8e 100644
--- a/libkgpgfile/kgpgfile.cpp
+++ b/libkgpgfile/kgpgfile.cpp
@@ -32,6 +32,7 @@
 #include 
 #include 
 #include 
+#include 
 
 // 
 // KDE Includes
@@ -317,6 +318,26 @@ void KGPGFile::secretKeyList(QStringList& list)
   file.keyList(list, true);
 }
 
+QDateTime KGPGFile::keyExpires(const QString& name)
+{
+  QDateTime expirationDate;
+
+  // skip a possible leading 0x in the id
+  QString cmp = name;
+  if (cmp.startsWith(QLatin1String("0x")))
+cmp = cmp.mid(2);
+
+  QStringList keylist;
+  keyList(keylist, false, cmp);
+
+  // in case we have no or more than one matching key
+  // or the key does not have subkeys, we return an invalid date
+  if (d->m_keys.size() == 1 && d->m_keys[0].subkeys().size() > 0 && 
!d->m_keys[0].subkeys()[0].neverExpires()) {
+expirationDate.setTime_t(d->m_keys[0].subkeys()[0].expirationTime());
+  }
+  return expirationDate;
+}
+
 void KGPGFile::keyList(QStringList& list, bool secretKeys, const QString& 
pattern)
 {
   d->m_keys.clear();
diff --git a/libkgpgfile/kgpgfile.h b/libkgpgfile/kgpgfile.h
index 8d172fb..d5fa08e 100644
--- a/libkgpgfile/kgpgfile.h
+++ b/libkgpgfile/kgpgfile.h
@@ -29,6 +29,7 @@
 
 #include 
 
+class QDateTime;
 // 
 // KDE Includes
 
@@ -109,6 +110,13 @@ public:
   QString errorToString() const;
 
   /**
+   * This method returns the information about the expiration date of a key.
+   * An invalid QDateTime object is returned if @a name matches more than one
+   * key or the key does not have an expiration date.
+   */
+  QDateTime keyExpires(const QString& name);
+
+  /**
 * Checks whether GPG is available or not
 *
 * @retval true GPG can be started and returns a version number


[kde-doc-english] [Kmymoney2-developer] KDE Doc Tool Chain

2006-09-04 Thread Thomas Baumgart
Hi all,

on Monday 04 September 2006 21:51, Tom Browder wrote:

> Philip Rodrigues wrote:
>  > > I've looked into the docbook (xsl) => pdf thing several times over
>  > > the years and still believe the best method is not to reinvent the
>  > > wheel but use Professor Knuth's wonderful TeX for the actual
>  > > typesetting.  That means translation of docbook eventually into TeX
>  > > (or LaTeX), then pdf.
>
> ...
>
>  >...it seems this is the best way to go. A maintained solution (which
>  > is what I'm using) is dblatex (http://dblatex.sf.net) which does
>  > precisely that. LaTeX error reporting does make me want to tear out
>  > my hair sometimes though...
>  >
>  >If you're interested in discussing this further, we should take it to
>  >kde-doc-english at kde.org .
>
> Is the dblatex solution the official KDE way to produce pdf now?  If so,
> I would like to convince the KMyMoney team to go along.

No need to convince us. We're with you.

> By the way, your pdf version KMyMoney Handbook is beautiful
> (http://people.fruitsalad.org/phil/kde/kmymoney.pdf).

Agreed. This is beautiful. Whatever needs to be done to get there, just let 
us know and we'll fix the build stuff to get this from scratch. Top 
quality, I am very impressed.

-- 

Regards

Thomas Baumgart

thb at net-bembel.de   Check the KMyMoney open source
http://www.net-bembel.de/   project at http://kmymoney2.sf.net/

GPG-FP: E55E D592 F45F 116B 8429   4F99 9C59 DB40 B75D D3BA
-
'Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it.' - Brian W. Kernighan
-
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 224 bytes
Desc: not available
Url : 
http://mail.kde.org/pipermail/kde-doc-english/attachments/20060904/6dc0/attachment.sig
 


[kde-doc-english] [Kmymoney2-developer] Preferred Forms of Words and Phrases

2006-09-05 Thread Thomas Baumgart
On Tuesday 05 September 2006 14:42, Tom Browder wrote:
> A previous msg on this list referred to
> <http://people.fruitsalad.org/phil/kde/check_pref_forms/preferred_forms>.
>
> It looks like the perfect solution for a preferred usage system for
> KMyMoney, but it is said to be unmaintained.
>
> A couple of questions:
>
> Is there a script or program that uses it for checking docs?
>
> What is the KDE doc team using in its place now?

Don't they use http://www.englishbreakfastnetwork.org/sanitizer/index.php ?

-- 

Regards

Thomas Baumgart

thb at net-bembel.de   Check the KMyMoney open source
http://www.net-bembel.de/   project at http://kmymoney2.sf.net/

GPG-FP: E55E D592 F45F 116B 8429   4F99 9C59 DB40 B75D D3BA
-
'Computers in the future may weigh no more than 1.5 tons.'
 -Popular Mechanics, 1949
-
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: signature
Url : 
http://mail.kde.org/pipermail/kde-doc-english/attachments/20060905/24009ed3/attachment.sig
 


[kde-doc-english] playground/office/kmymoney

2010-01-17 Thread Thomas Baumgart
SVN commit 1076212 by tbaumgart:

Added patch provided by Ian Neal

FEATURE: 221800
GUI:

 M  +4 -2  CMakeLists.txt  
 M  +1 -1  kmymoney/CMakeLists.txt  
 M  +1 -1  kmymoney/converter/mymoneygncreader.cpp  
 M  +4 -4  kmymoney/dialogs/keditscheduledlg.cpp  
 M  +3 -3  kmymoney/dialogs/keditscheduledlgdecl.ui  
 M  +1 -17 kmymoney/dialogs/kenterscheduledlg.cpp  
 M  +71 -0 kmymoney/dialogs/settings/ksettingsschedules.cpp  
 M  +14 -1 kmymoney/dialogs/settings/ksettingsschedules.h  
 M  +58 -6 kmymoney/dialogs/settings/ksettingsschedulesdecl.ui  
 M  +48 -2 kmymoney/kmymoney.cpp  
 M  +14 -4 kmymoney/kmymoney.h  
 M  +4 -0  kmymoney/kmymoney.kcfg  
 M  +8 -8  kmymoney/kmymoneyutils.h  
 M  +1 -0  kmymoney/mymoney/CMakeLists.txt  
 M  +44 -25kmymoney/mymoney/mymoneyscheduled.cpp  
 M  +58 -23kmymoney/mymoney/mymoneyscheduled.h  
 M  +45 -28kmymoney/mymoney/mymoneyscheduletest.cpp  
 M  +2 -0  kmymoney/mymoney/mymoneyscheduletest.h  


http://websvn.kde.org/?view=rev&revision=1076212



[kde-doc-english] extragear/office/kmymoney/kmymoney

2011-06-11 Thread Thomas Baumgart
SVN commit 1236139 by tbaumgart:

Improved wording when transaction editing is cancelled by selecting another 
transaction in the ledger.

GUI:
CCMAIL: lu.dolezal at gmail.com

 M  +7 -4  kmymoney.cpp  


--- trunk/extragear/office/kmymoney/kmymoney/kmymoney.cpp #1236138:1236139
@@ -5211,17 +5211,20 @@
   } else {
 // okToSelect is preset to true if a cancel of the dialog is useful 
and false if it is not
 int rc;
-KGuiItem noGuiItem = KStandardGuiItem::no();
+KGuiItem noGuiItem = KStandardGuiItem::save();
+KGuiItem yesGuiItem = KStandardGuiItem::discard();
+KGuiItem cancelGuiItem = KStandardGuiItem::cont();
+
 // if the transaction can't be entered make sure that it can't be 
entered by pressing no either
 if (!kmymoney->action("transaction_enter")->isEnabled()) {
   noGuiItem.setEnabled(false);
   
noGuiItem.setToolTip(kmymoney->action("transaction_enter")->toolTip());
 }
 if (okToSelect == true) {
-  rc = KMessageBox::warningYesNoCancel(0, i18n("Do you really want 
to cancel editing this transaction without saving it?- Yes 
cancels editing the transaction- No saves the transaction prior to 
canceling and- Cancel returns to the transaction 
editor.You can also select an option to save the transaction 
automatically when e.g. selecting another transaction."), i18n("Cancel 
transaction edit"), KStandardGuiItem::yes(), noGuiItem, 
KStandardGuiItem::cancel(), dontShowAgain);
+  rc = KMessageBox::warningYesNoCancel(0, i18n("Please select what 
you want to do: discard the changes, save the changes or continue to edit the 
transaction.You can also set an option to save the transaction 
automatically when e.g. selecting another transaction."), i18n("End 
transaction edit"), yesGuiItem, noGuiItem, cancelGuiItem, dontShowAgain);
 
 } else {
-  rc = KMessageBox::warningYesNo(0, i18n("Do you really want to 
cancel editing this transaction without saving it?- Yes cancels 
editing the transaction- No saves the transaction prior to 
canceling.You can also select an option to save the transaction 
automatically when e.g. selecting another transaction."), i18n("Cancel 
transaction edit"), KStandardGuiItem::yes(), noGuiItem, dontShowAgain);
+  rc = KMessageBox::warningYesNo(0, i18n("Please select what you 
want to do: discard the changes, save the changes or continue to edit the 
transaction.You can also set an option to save the transaction 
automatically when e.g. selecting another transaction."), i18n("End 
transaction edit"), yesGuiItem, noGuiItem, dontShowAgain);
 }
 
 switch (rc) {
@@ -6846,7 +6849,7 @@
 if ((*it_p)->mapAccount(d->m_selectedAccount, settings)) {
   settings["provider"] = provider;
   MyMoneyAccount acc(d->m_selectedAccount);
-  acc.setOnlineBankingSettings(settings);
+  acc.setOnlineBankingSettings(settings);
   MyMoneyFileTransaction ft;
   try {
 MyMoneyFile::instance()->modifyAccount(acc);


[kde-doc-english] [kmymoney] kmymoney: Eliminate usage of opening date for categories

2015-05-16 Thread Thomas Baumgart
Git commit 7a4901c668871882bba75068bf1256f2bf00dba0 by Thomas Baumgart.
Committed on 16/05/2015 at 06:20.
Pushed by tbaumgart into branch 'master'.

Eliminate usage of opening date for categories

Set the opening date for newly created categories to 1900-01-01 and fix
existing ones to have that date during the consistency check. Since the
opening date of an income/expense account (aka category) is not used
throughout the application, it should not interfer with the check that
the opening dates of all accounts referenced in a transaction are prior
to the transaction's post date. Setting the opening date of a category
to the above mentioned value makes sure that a category is always
'opened' before the transaction took place.

The UI elements for the opening date have been removed from the
account/category edit dialog as they are not used anymore.

BUG: 313793
GUI:

M  +8-2kmymoney/dialogs/knewaccountdlg.cpp
M  +1-0kmymoney/dialogs/knewaccountdlg.h
M  +16   -16   kmymoney/dialogs/knewaccountdlgdecl.ui
M  +2-0kmymoney/kmymoney.cpp
M  +13   -0kmymoney/mymoney/mymoneyfile.cpp
M  +71   -0kmymoney/mymoney/mymoneyfiletest.cpp
M  +1-0kmymoney/mymoney/mymoneyfiletest.h

http://commits.kde.org/kmymoney/7a4901c668871882bba75068bf1256f2bf00dba0

diff --git a/kmymoney/dialogs/knewaccountdlg.cpp 
b/kmymoney/dialogs/knewaccountdlg.cpp
index e294624..fe36a18 100644
--- a/kmymoney/dialogs/knewaccountdlg.cpp
+++ b/kmymoney/dialogs/knewaccountdlg.cpp
@@ -217,7 +217,7 @@ KNewAccountDlg::KNewAccountDlg(const MyMoneyAccount& 
account, bool isEditing, bo
   if (!m_account.openingDate().isValid()) {
 m_account.setOpeningDate(KMyMoneyGlobalSettings::firstFiscalDate());
   }
-  startDateEdit->setDate(m_account.openingDate());
+  m_openingDateEdit->setDate(m_account.openingDate());
 
   if (categoryEditor) {
 // get rid of the tabs that are not used for categories
@@ -494,6 +494,12 @@ void KNewAccountDlg::setOpeningBalanceShown(bool shown)
   m_openingBalanceEdit->setVisible(shown);
 }
 
+void KNewAccountDlg::setOpeningDateShown(bool shown)
+{
+  m_openingDateLabel->setVisible(shown);
+  m_openingDateEdit->setVisible(shown);
+}
+
 void KNewAccountDlg::okClicked()
 {
   MyMoneyFile* file = MyMoneyFile::instance();
@@ -578,7 +584,7 @@ void KNewAccountDlg::okClicked()
 
   m_account.setDescription(descriptionEdit->toPlainText());
 
-  m_account.setOpeningDate(startDateEdit->date());
+  m_account.setOpeningDate(m_openingDateEdit->date());
 
   if (!m_categoryEditor) {
 m_account.setCurrencyId(m_currency->security().id());
diff --git a/kmymoney/dialogs/knewaccountdlg.h 
b/kmymoney/dialogs/knewaccountdlg.h
index be62c4b..962dee4 100644
--- a/kmymoney/dialogs/knewaccountdlg.h
+++ b/kmymoney/dialogs/knewaccountdlg.h
@@ -129,6 +129,7 @@ public:
   };
 
   void setOpeningBalanceShown(bool shown);
+  void setOpeningDateShown(bool shown);
 
   /**
* This method adds an additional tab pointed to with @a w to the tab widget.
diff --git a/kmymoney/dialogs/knewaccountdlgdecl.ui 
b/kmymoney/dialogs/knewaccountdlgdecl.ui
index ef76e8b..bee638d 100644
--- a/kmymoney/dialogs/knewaccountdlgdecl.ui
+++ b/kmymoney/dialogs/knewaccountdlgdecl.ui
@@ -105,7 +105,7 @@

   
   
-   
+   
 
  
   0
@@ -121,7 +121,7 @@

   
   
-   
+   
   
   

@@ -691,7 +691,7 @@
 true


-m_amountGroup
+m_amountGroup

   
  
@@ -701,7 +701,7 @@
 Net amount


-m_amountGroup
+m_amountGroup

   
  
@@ -813,9 +813,9 @@
  
  
   
-   KPushButton
-   QPushButton
-   kpushbutton.h
+   KComboBox
+   QComboBox
+   kcombobox.h
   
   
KLineEdit
@@ -823,9 +823,14 @@
klineedit.h
   
   
-   KComboBox
-   QComboBox
-   kcombobox.h
+   KPushButton
+   QPushButton
+   kpushbutton.h
+  
+  
+   KTextEdit
+   QTextEdit
+   ktextedit.h
   
   
KTabWidget
@@ -834,11 +839,6 @@
1
   
   
-   KTextEdit
-   QTextEdit
-   ktextedit.h
-  
-  
kMyMoneyDateInput
QFrame
kmymoneydateinput.h
@@ -877,8 +877,8 @@
   m_tab
   accountNameEdit
   typeCombo
-  startDateEdit
   m_currency
+  m_openingDateEdit
   m_openingBalanceEdit
   m_lastCheckNumberUsed
   descriptionEdit
diff --git a/kmymoney/kmymoney.cpp b/kmymoney/kmymoney.cpp
index d095992..522fe1a 100644
--- a/kmymoney/kmymoney.cpp
+++ b/kmymoney/kmymoney.cpp
@@ -3137,6 +3137,7 @@ void KMyMoneyApp::createCategory(MyMoneyAccount& account, 
const MyMoneyAccount&
 new KNewAccountDlg(acco

[kde-doc-english] [kmymoney] kmymoney/plugins/ofximport/dialogs: Show account name when requesting password for OFX

2015-09-16 Thread Thomas Baumgart
Git commit a5c78ace3e18c07c99cc807d16794d818d106cb8 by Thomas Baumgart.
Committed on 16/09/2015 at 16:45.
Pushed by tbaumgart into branch 'master'.

Show account name when requesting password for OFX

So far it was unclear which password was requested during an OFX update
of multiple accounts. We now display the account name along with the
request so the user knows which password to provide.

GUI:

M  +1-1kmymoney/plugins/ofximport/dialogs/mymoneyofxconnector.cpp

http://commits.kde.org/kmymoney/a5c78ace3e18c07c99cc807d16794d818d106cb8

diff --git a/kmymoney/plugins/ofximport/dialogs/mymoneyofxconnector.cpp 
b/kmymoney/plugins/ofximport/dialogs/mymoneyofxconnector.cpp
index 7884b7d..ffb0be6 100644
--- a/kmymoney/plugins/ofximport/dialogs/mymoneyofxconnector.cpp
+++ b/kmymoney/plugins/ofximport/dialogs/mymoneyofxconnector.cpp
@@ -220,7 +220,7 @@ QString MyMoneyOfxConnector::password() const
 
   if (pwd.isEmpty()) {
 QPointer dlg = new KPasswordDialog(0);
-dlg->setPrompt(i18n("Enter your password"));
+dlg->setPrompt(i18n("Enter your password for account 
%1").arg(m_account.name()));
 if (dlg->exec())
   pwd = dlg->password();
 delete dlg;
___
kde-doc-english mailing list
kde-doc-english@kde.org
https://mail.kde.org/mailman/listinfo/kde-doc-english