[99824] trunk/dports/kde/kmymoney4-devel

mk at macports.org mk at macports.org
Sun Nov 18 03:33:44 PST 2012


Revision: 99824
          https://trac.macports.org/changeset/99824
Author:   mk at macports.org
Date:     2012-11-18 03:33:43 -0800 (Sun, 18 Nov 2012)
Log Message:
-----------
kmymoney4-devel: git version update (includes new tags feature) + patch for new column 'online status' in accounts table of homepage

Modified Paths:
--------------
    trunk/dports/kde/kmymoney4-devel/Portfile

Added Paths:
-----------
    trunk/dports/kde/kmymoney4-devel/files/patch_kmymoney-views-khomeview.cpp.diff

Modified: trunk/dports/kde/kmymoney4-devel/Portfile
===================================================================
--- trunk/dports/kde/kmymoney4-devel/Portfile	2012-11-18 11:23:36 UTC (rev 99823)
+++ trunk/dports/kde/kmymoney4-devel/Portfile	2012-11-18 11:33:43 UTC (rev 99824)
@@ -8,10 +8,10 @@
 
 fetch.type          git
 git.url             git://anongit.kde.org/kmymoney
-git.branch          e1731c698a6da61198557c8f1d0f40f935d04474
+git.branch          b71e8d38fc210519f30ba716d699daaab5f669de
 
 name                kmymoney4-devel
-version             4.6-20121025
+version             4.6-20121118
 
 categories          kde kde4 finance
 maintainers         mk pixilla openmaintainer
@@ -42,7 +42,8 @@
 patch.dir         ${workpath}/${distname}
 patch.pre_args    -p1
 patchfiles        patch_remove_manpage.diff \
-                  patch-CMakeLists_remove_APIDOC.txt.diff
+                  patch-CMakeLists_remove_APIDOC.txt.diff \
+                  patch_kmymoney-views-khomeview.cpp.diff
 #                  patch-CMakeLists.txt.diff
 #                  patch_to_include_datePopup_hideshow.diff
 

Added: trunk/dports/kde/kmymoney4-devel/files/patch_kmymoney-views-khomeview.cpp.diff
===================================================================
--- trunk/dports/kde/kmymoney4-devel/files/patch_kmymoney-views-khomeview.cpp.diff	                        (rev 0)
+++ trunk/dports/kde/kmymoney4-devel/files/patch_kmymoney-views-khomeview.cpp.diff	2012-11-18 11:33:43 UTC (rev 99824)
@@ -0,0 +1,94 @@
+diff --git a/kmymoney/views/khomeview.cpp b/kmymoney/views/khomeview.cpp
+index 15d630b..7a92361 100644
+--- a/kmymoney/views/khomeview.cpp
++++ b/kmymoney/views/khomeview.cpp
+@@ -841,6 +841,22 @@ void KHomeView::showAccountEntry(const MyMoneyAccount& acc, const MyMoneyMoney&
+   tmp = QString("<td>") +
+         link(VIEW_LEDGER, QString("?id=%1").arg(acc.id())) + acc.name() + linkend() + "</td>";
+ 
++
++  //show account's online-status
++  QString tmp_os, pathOK, pathNotOK;
++  KIconLoader::global()->loadIcon(QString("dialog-ok-apply"), KIconLoader::Small, KIconLoader::SizeSmall, KIconLoader::DefaultState, QStringList(), &pathOK);
++  KIconLoader::global()->loadIcon(QString("dialog-cancel"), KIconLoader::Small, KIconLoader::SizeSmall, KIconLoader::DefaultState, QStringList(), &pathNotOK);
++
++  if(acc.value("lastImportedTransactionDate").isEmpty()	|| acc.value("lastStatementBalance").isEmpty())
++    tmp_os="-"; 
++  else if(file->hasMatchingOnlineBalance(acc))
++    tmp_os=QString("<img src=\"%1\" border=\"0\"></a>").arg(pathOK);
++  else
++    tmp_os=QString("<img src=\"%1\" border=\"0\"></a>").arg(pathNotOK);
++
++  tmp += QString("<td class=\"center\">%1</td>").arg(tmp_os);
++
++
+   //show account balance
+   tmp += QString("<td class=\"right\">%1</td>").arg(showColoredAmount(amount, value.isNegative()));
+ 
+@@ -848,10 +864,10 @@ void KHomeView::showAccountEntry(const MyMoneyAccount& acc, const MyMoneyMoney&
+   if (showMinBal) {
+     //if it is an investment, show minimum balance empty
+     if (acc.accountType() == MyMoneyAccount::Investment) {
+-      tmp += QString("<td class=\"right\">&nbsp;</td>");
++      tmp += QString("<td></td><td class=\"right\">&nbsp;</td>");
+     } else {
+       //show minimum balance entry
+-      tmp += QString("<td class=\"right\">%1</td>").arg(showColoredAmount(amountToMinBal, valueToMinBal.isNegative()));
++      tmp += QString("<td></td><td class=\"right\">%1</td>").arg(showColoredAmount(amountToMinBal, valueToMinBal.isNegative()));
+     }
+   }
+   // qDebug("accountEntry = '%s'", tmp.toLatin1());
+@@ -1225,6 +1241,9 @@ void KHomeView::showAssetsLiabilities(void)
+     d->m_html += "<tr class=\"item\"><td class=\"left\" width=\"30%\">";
+     d->m_html += i18n("Asset Accounts");
+     d->m_html += "</td>";
++    d->m_html += "<td class=\"setcolor\">";
++    d->m_html += i18n("Status");
++    d->m_html += "</td>";
+     d->m_html += "<td width=\"15%\" class=\"right\">";
+     d->m_html += i18n("Current Balance");
+     d->m_html += "</td>";
+@@ -1233,6 +1252,9 @@ void KHomeView::showAssetsLiabilities(void)
+     d->m_html += "<td class=\"left\" width=\"30%\">";
+     d->m_html += i18n("Liability Accounts");
+     d->m_html += "</td>";
++    d->m_html += "<td class=\"setcolor\">";
++    d->m_html += i18n("Status");
++    d->m_html += "</td>";
+     d->m_html += "<td width=\"15%\" class=\"right\">";
+     d->m_html += i18n("Current Balance");
+     d->m_html += "</td></tr>";
+@@ -1292,7 +1314,7 @@ void KHomeView::showAssetsLiabilities(void)
+         ++liabilities_it;
+       } else {
+         //leave the space empty if we run out of liabilities
+-        d->m_html += "<td></td><td></td>";
++        d->m_html += "<td></td><td></td><td></td>";
+       }
+       d->m_html += "</tr>";
+     }
+@@ -1311,20 +1333,20 @@ void KHomeView::showAssetsLiabilities(void)
+     d->m_html += QString("<tr class=\"row-%1\" style=\"font-weight:bold;\">").arg(i++ & 0x01 ? "even" : "odd");
+ 
+     //print total for assets
+-    d->m_html += QString("<td class=\"left\">%1</td><td align=\"right\">%2</td>").arg(i18n("Total Assets")).arg(showColoredAmount(amountAssets, netAssets.isNegative()));
++    d->m_html += QString("<td class=\"left\">%1</td><td></td><td align=\"right\">%2</td>").arg(i18n("Total Assets")).arg(showColoredAmount(amountAssets, netAssets.isNegative()));
+ 
+     //leave the intermediate column empty
+     d->m_html += "<td class=\"setcolor\"></td>";
+ 
+     //print total liabilities
+-    d->m_html += QString("<td class=\"left\">%1</td><td align=\"right\">%2</td>").arg(i18n("Total Liabilities")).arg(showColoredAmount(amountLiabilities, netLiabilities.isNegative()));
++    d->m_html += QString("<td class=\"left\">%1</td><td></td><td align=\"right\">%2</td>").arg(i18n("Total Liabilities")).arg(showColoredAmount(amountLiabilities, netLiabilities.isNegative()));
+     d->m_html += "</tr>";
+ 
+     //print net worth
+     d->m_html += QString("<tr class=\"row-%1\" style=\"font-weight:bold;\">").arg(i++ & 0x01 ? "even" : "odd");
+ 
+-    d->m_html += "<td></td><td></td><td class=\"setcolor\"></td>";
+-    d->m_html += QString("<td class=\"left\">%1</td><td align=\"right\">%2</td>").arg(i18n("Net Worth")).arg(showColoredAmount(amountNetWorth, netWorth.isNegative()));
++    d->m_html += "<td></td><td></td><td></td><td class=\"setcolor\"></td>";
++    d->m_html += QString("<td class=\"left\">%1</td><td></td><td align=\"right\">%2</td>").arg(i18n("Net Worth")).arg(showColoredAmount(amountNetWorth, netWorth.isNegative()));
+ 
+     d->m_html += "</tr>";
+     d->m_html += "</table>";
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20121118/e2ecaa41/attachment.html>


More information about the macports-changes mailing list