gnucash unstable: Multiple changes pushed

Geert Janssens gjanssens at code.gnucash.org
Wed Jan 31 13:17:10 EST 2018


Updated	 via  https://github.com/Gnucash/gnucash/commit/84a1e810 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/3c13f565 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/0f295dd4 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/862956a7 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/77ad6296 (commit)
	from  https://github.com/Gnucash/gnucash/commit/77982c71 (commit)



commit 84a1e8101643595933ed76405112788dc95872a2
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Tue Jan 30 15:28:51 2018 +0000

    Bug 792809 Add a register foreground CSS class
    
    With the current setup when a dark theme is used with existing register
    colours the text is hard to read as the dark theme may of changed the
    text colour to white so with these changes the text is always black
    unless they choose not to use the built in colours.

diff --git a/gnucash/gnucash-310.css b/gnucash/gnucash-310.css
index e6b218d..0565ae5 100644
--- a/gnucash/gnucash-310.css
+++ b/gnucash/gnucash-310.css
@@ -37,6 +37,11 @@
 @define-color register_secondary_bg_color #F6FFDA;
 @define-color register_split_bg_color #EDE7D3;
 @define-color register_cursor_bg_color #FFEF98;
+ at define-color register_fg_color black;
+
+*.register-foreground {
+  color: @register_fg_color;
+}
 
 *.register-header {
   background-color: @register_header_bg_color;
@@ -74,6 +79,15 @@
   background-color: mix (@register_cursor_bg_color, grey, 0.2);
 }
 
+/* Change font color by mixing with grey */
+.lighter-grey-mix {
+  color: mix (currentColor, grey, 0.8);
+}
+
+.darker-grey-mix {
+  color: mix (currentColor, grey, 0.2);
+}
+
 /* Some tweaks for the about dialog */
 dialog#GnuCash > box > box > label
 {
diff --git a/gnucash/gnucash-320.css b/gnucash/gnucash-320.css
index 4f4ea09..561de81 100644
--- a/gnucash/gnucash-320.css
+++ b/gnucash/gnucash-320.css
@@ -28,6 +28,11 @@ cursor button {
 @define-color register_secondary_bg_color #F6FFDA;
 @define-color register_split_bg_color #EDE7D3;
 @define-color register_cursor_bg_color #FFEF98;
+ at define-color register_fg_color black;
+
+*.register-foreground {
+  color: @register_fg_color;
+}
 
 *.register-header {
   background-color: @register_header_bg_color;
@@ -65,6 +70,15 @@ cursor button {
   background-color: mix (@register_cursor_bg_color, grey, 0.2);
 }
 
+/* Change font color by mixing with grey */
+.lighter-grey-mix {
+  color: mix (currentColor, grey, 0.8);
+}
+
+.darker-grey-mix {
+  color: mix (currentColor, grey, 0.2);
+}
+
 /* Some tweaks for the about dialog */
 dialog#GnuCash > box > box > label
 {
diff --git a/gnucash/gnucash-fallback-310.css b/gnucash/gnucash-fallback-310.css
index 7cc73d8..e87b84a 100644
--- a/gnucash/gnucash-fallback-310.css
+++ b/gnucash/gnucash-fallback-310.css
@@ -36,15 +36,6 @@
 @define-color default-color currentColor;
 @define-color negative-numbers rgb(75%, 0%, 0%);
 
-/* Change font color by mixing with grey */
-.lighter-grey-mix {
-  color: mix (currentColor, grey, 0.8);
-}
-
-.darker-grey-mix {
-  color: mix (currentColor, grey, 0.2);
-}
-
 /* Register2 grid lines color */
 .register2_grid_lines {
   border-color: black;
diff --git a/gnucash/register/register-gnome/gnucash-item-edit.c b/gnucash/register/register-gnome/gnucash-item-edit.c
index 56bad13..04e6da9 100644
--- a/gnucash/register/register-gnome/gnucash-item-edit.c
+++ b/gnucash/register/register-gnome/gnucash-item-edit.c
@@ -827,6 +827,7 @@ gnc_item_edit_new (GnucashSheet *sheet)
 
     // Get the CSS space settings for the entry
     stylectxt = gtk_widget_get_style_context (GTK_WIDGET(item_edit->editor));
+    gtk_style_context_add_class (stylectxt, "register-foreground");
     gtk_style_context_get_padding (stylectxt, GTK_STATE_FLAG_NORMAL, &padding);
     gtk_style_context_get_margin (stylectxt, GTK_STATE_FLAG_NORMAL, &margin);
     gtk_style_context_get_border (stylectxt, GTK_STATE_FLAG_NORMAL, &border);
diff --git a/gnucash/register/register-gnome/gnucash-sheet.c b/gnucash/register/register-gnome/gnucash-sheet.c
index 3dca2cf..73e1523 100644
--- a/gnucash/register/register-gnome/gnucash-sheet.c
+++ b/gnucash/register/register-gnome/gnucash-sheet.c
@@ -2451,6 +2451,8 @@ gnucash_get_style_classes (GnucashSheet *sheet, GtkStyleContext *stylectxt,
         gtk_style_context_add_class (stylectxt, "negative-numbers");
         field_type -= COLOR_NEGATIVE;
     }
+    else
+        gtk_style_context_add_class (stylectxt, "register-foreground");
 
     switch (field_type)
     {

commit 3c13f565d300899d59f4c59f58ec740b66302bde
Merge: 0f295dd 862956a
Author: Geert Janssens <geert at kobaltwit.be>
Date:   Wed Jan 31 18:44:04 2018 +0100

    Merge branch 'unstable-fix-business-reports' of https://github.com/christopherlam/gnucash into unstable


commit 0f295dd43994dcc69191071b301f1a82c354639c
Merge: 77982c7 77ad629
Author: Geert Janssens <geert at kobaltwit.be>
Date:   Wed Jan 31 18:37:52 2018 +0100

    Merge branch 'CorrectStrings27EN' of https://github.com/Mechtilde/gnucash into unstable


commit 862956a7609788baa23ff439a40813935f7c10b1
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Tue Jan 30 19:29:04 2018 +0800

    BUGFIX: invoice posted-date is no longer 0 for unposted invoices
    
    This commit fixes business reports caused by 91f4b190394df6
    whereby the posted-date for unposted invoice was changed
    from 0 to MAXINT. Now we need to use (gncInvoiceIsPosted)
    or (gncInvoiceDateExists) instead.

diff --git a/gnucash/report/business-reports/easy-invoice.scm b/gnucash/report/business-reports/easy-invoice.scm
index de14f36..4b89071 100644
--- a/gnucash/report/business-reports/easy-invoice.scm
+++ b/gnucash/report/business-reports/easy-invoice.scm
@@ -776,12 +776,11 @@
           (add-html! document "</tr></table>")
         )
 
-        ; add the date
-        (let ((date-table #f)
-              (post-date (gncInvoiceGetDatePosted invoice))
-              (due-date (gncInvoiceGetDateDue invoice)))
-          (if (not (zero? post-date))
-            (begin
+        ;; add the date
+        (if (gncInvoiceIsPosted invoice)
+            (let ((date-table #f)
+                  (post-date (gncInvoiceGetDatePosted invoice))
+                  (due-date (gncInvoiceGetDateDue invoice)))
               (set! date-table (make-date-table))
               (make-date-row! date-table (_ "Date") post-date date-format)
               (if (opt-val "Display" "Due Date")
@@ -790,7 +789,7 @@
             (add-html! document
 		       (string-append "<font color='red'>"
 				      (_ "INVOICE NOT POSTED")
-				      "</font>"))))
+				      "</font>")))
 
         (make-break! document)
 
diff --git a/gnucash/report/business-reports/fancy-invoice.scm b/gnucash/report/business-reports/fancy-invoice.scm
index 4003f8b..17a47a7 100644
--- a/gnucash/report/business-reports/fancy-invoice.scm
+++ b/gnucash/report/business-reports/fancy-invoice.scm
@@ -857,19 +857,17 @@
 	   'attribute (list "cellpadding" 0)
 	   'attribute (list "width" "100%"))
 
-	  (set! date-object (let ((date-table #f)
-		(post-date (gncInvoiceGetDatePosted invoice))
-		(due-date (gncInvoiceGetDateDue invoice)))
-
-	    (if (not (zero? post-date))
-		(begin
+          (set! date-object
+            (if (gncInvoiceIsPosted invoice)
+                (let ((date-table #f)
+                      (post-date (gncInvoiceGetDatePosted invoice))
+                      (due-date (gncInvoiceGetDateDue invoice)))
 		  (set! date-table (make-date-table))
-		  ;; oli-custom - moved invoice number here
 		  (gnc:html-table-append-row!
                   ;; Translators: %s below is "Invoice" or "Bill" or even the
                   ;; custom title from the options. The next column contains
                   ;; the number of the document.
-		   date-table (list (sprintf #f (_ "%s #") title) (gncInvoiceGetID invoice)))
+                  date-table (list (sprintf #f (_ "%s #") title) (gncInvoiceGetID invoice)))
                   ;; Translators: The first %s below is "Invoice" or
                   ;; "Bill" or even the custom title from the
                   ;; options. This string sucks for i18n, but I don't
@@ -879,10 +877,8 @@
 		  (make-date-row! date-table (_ "Due Date") due-date date-format)
 		  date-table)
 		(gnc:make-html-text
-		  ;; oli-custom - FIXME: I have a feeling I broke a
-          ;; translation by not using string-expand for  
-		  (string-append title "<br>"
-            (_ "Invoice in progress..."))))))
+                 (string-append title "<br>"
+                                (_ "Invoice in progress...")))))
 
 	  (gnc:html-table-append-row!
 	  	helper-table
diff --git a/gnucash/report/business-reports/invoice.scm b/gnucash/report/business-reports/invoice.scm
index a54f02e..a74e48f 100644
--- a/gnucash/report/business-reports/invoice.scm
+++ b/gnucash/report/business-reports/invoice.scm
@@ -708,22 +708,18 @@
 	   document
 	   (make-myname-table book date-format))
 
-	  (let ((date-table #f)
-		(post-date (gncInvoiceGetDatePosted invoice))
-		(due-date (gncInvoiceGetDateDue invoice)))
-
-	    (if (not (zero? post-date))
-		(begin
-		  (set! date-table (make-date-table))
-		  (make-date-row! date-table (string-append title " " (_ "Date")) post-date date-format)
-		  (make-date-row! date-table (_ "Due Date") due-date date-format)
-		  (gnc:html-document-add-object! document date-table))
-		(gnc:html-document-add-object!
-		 document
-		 (gnc:make-html-text
-		  (_ "Invoice in progress...")))))
-      
-    
+          (if (gncInvoiceIsPosted invoice)
+              (let ((date-table #f)
+                    (post-date (gncInvoiceGetDatePosted invoice))
+                    (due-date (gncInvoiceGetDateDue invoice)))
+                (set! date-table (make-date-table))
+                (make-date-row! date-table (string-append title " " (_ "Date")) post-date date-format)
+                (make-date-row! date-table (_ "Due Date") due-date date-format)
+                (gnc:html-document-add-object! document date-table))
+              (gnc:html-document-add-object!
+               document
+               (gnc:make-html-text
+                (_ "Invoice in progress..."))))
 
 	  (make-break! document)
 	  (make-break! document)
diff --git a/gnucash/report/business-reports/job-report.scm b/gnucash/report/business-reports/job-report.scm
index 327e46b..e1250fc 100644
--- a/gnucash/report/business-reports/job-report.scm
+++ b/gnucash/report/business-reports/job-report.scm
@@ -193,7 +193,7 @@
     (if (date-due-col column-vector)
 	(addto! row-contents 
 		(if (and due-date
-			 (not (zero? due-date)))
+			 (gncInvoiceDateExists due-date))
 		    (qof-print-date due-date)
 		    "")))
     (if (num-col column-vector)
diff --git a/gnucash/report/business-reports/owner-report.scm b/gnucash/report/business-reports/owner-report.scm
index 3f06c12..4c7dd35 100644
--- a/gnucash/report/business-reports/owner-report.scm
+++ b/gnucash/report/business-reports/owner-report.scm
@@ -291,7 +291,7 @@
     (if (date-due-col column-vector)
         (addto! row-contents 
          (if (and due-date
-              (not (zero? due-date)))
+                  (gncInvoiceDateExists due-date))
              (qof-print-date due-date)
              "")))
     (if (num-col column-vector)
diff --git a/gnucash/report/business-reports/taxinvoice.eguile.scm b/gnucash/report/business-reports/taxinvoice.eguile.scm
index 159fec7..8e359b5 100644
--- a/gnucash/report/business-reports/taxinvoice.eguile.scm
+++ b/gnucash/report/business-reports/taxinvoice.eguile.scm
@@ -246,7 +246,7 @@
         <td align="right" class="invnum"><big><strong><?scm:d invoiceid ?></strong></big></td>
       </tr>
       <?scm )) ?>
-      <?scm (if (zero? postdate) (begin ?>
+      <?scm (if (not (gncInvoiceDateExists postdate)) (begin ?>
         <tr>
            <td colspan="2" align="right"><?scm:d (_ "Invoice in progress...") ?></td>
         </tr>
diff --git a/libgnucash/engine/gncInvoice.c b/libgnucash/engine/gncInvoice.c
index 640eca1..9448ca2 100644
--- a/libgnucash/engine/gncInvoice.c
+++ b/libgnucash/engine/gncInvoice.c
@@ -1856,7 +1856,7 @@ gncInvoiceApplyPayment (const GncInvoice *invoice, Transaction *txn,
     gncOwnerAutoApplyPaymentsWithLots (owner, selected_lots);
 }
 
-static gboolean gncInvoiceDateExists (time64 date)
+gboolean gncInvoiceDateExists (time64 date)
 {
     return date != INT64_MAX;
 }
diff --git a/libgnucash/engine/gncInvoice.h b/libgnucash/engine/gncInvoice.h
index 1b5b65a..befef4e 100644
--- a/libgnucash/engine/gncInvoice.h
+++ b/libgnucash/engine/gncInvoice.h
@@ -275,6 +275,7 @@ static inline GncInvoice * gncInvoiceLookup (const QofBook *book, const GncGUID
 void gncInvoiceBeginEdit (GncInvoice *invoice);
 void gncInvoiceCommitEdit (GncInvoice *invoice);
 int gncInvoiceCompare (const GncInvoice *a, const GncInvoice *b);
+gboolean gncInvoiceDateExists (time64 date);
 gboolean gncInvoiceIsPosted (const GncInvoice *invoice);
 gboolean gncInvoiceIsPaid (const GncInvoice *invoice);
 

commit 77ad62960b292fc52bbe042c3bb1e196fda4b65e
Author: Mechtilde <ooo at mechtilde.de>
Date:   Sun Jan 28 21:06:19 2018 +0100

    correct typo in horizontal

diff --git a/gnucash/gnome/gschemas/org.gnucash.gschema.xml.in.in b/gnucash/gnome/gschemas/org.gnucash.gschema.xml.in.in
index 1e079ab..f2b21ac 100644
--- a/gnucash/gnome/gschemas/org.gnucash.gschema.xml.in.in
+++ b/gnucash/gnome/gschemas/org.gnucash.gschema.xml.in.in
@@ -173,7 +173,7 @@
     <key name="grid-lines-horizontal" type="b">
       <default>false</default>
       <summary>Show Horizontal Grid Lines</summary>
-      <description>If active, horzontal grid lines will be shown on table displays. Otherwise no horizontal grid lines will be shown.</description>
+      <description>If active, horizontal grid lines will be shown on table displays. Otherwise no horizontal grid lines will be shown.</description>
     </key>
     <key name="grid-lines-vertical" type="b">
       <default>false</default>
diff --git a/gnucash/register/register-gnome/gnucash-register.c b/gnucash/register/register-gnome/gnucash-register.c
index 98891a2..2987093 100644
--- a/gnucash/register/register-gnome/gnucash-register.c
+++ b/gnucash/register/register-gnome/gnucash-register.c
@@ -267,7 +267,7 @@ gnucash_register_goto_next_matching_row (GnucashRegister *reg,
 static gboolean
 gnucash_register_sheet_resize (GnucashRegister *reg)
 {
-    // Sometimes the space left by the horzontal scrollbar does
+    // Sometimes the space left by the horizontal scrollbar does
     // not get filled on load, this makes sure it does
     if (!reg->hscrollbar_visible)
         gtk_widget_queue_resize (GTK_WIDGET (reg->sheet));



Summary of changes:
 .../gnome/gschemas/org.gnucash.gschema.xml.in.in   |  2 +-
 gnucash/gnucash-310.css                            | 14 +++++++++++
 gnucash/gnucash-320.css                            | 14 +++++++++++
 gnucash/gnucash-fallback-310.css                   |  9 -------
 .../register/register-gnome/gnucash-item-edit.c    |  1 +
 gnucash/register/register-gnome/gnucash-register.c |  2 +-
 gnucash/register/register-gnome/gnucash-sheet.c    |  2 ++
 gnucash/report/business-reports/easy-invoice.scm   | 13 +++++-----
 gnucash/report/business-reports/fancy-invoice.scm  | 20 +++++++---------
 gnucash/report/business-reports/invoice.scm        | 28 ++++++++++------------
 gnucash/report/business-reports/job-report.scm     |  2 +-
 gnucash/report/business-reports/owner-report.scm   |  2 +-
 .../report/business-reports/taxinvoice.eguile.scm  |  2 +-
 libgnucash/engine/gncInvoice.c                     |  2 +-
 libgnucash/engine/gncInvoice.h                     |  1 +
 15 files changed, 64 insertions(+), 50 deletions(-)



More information about the gnucash-changes mailing list