gnucash master: Multiple changes pushed

Robert Fewell bobit at code.gnucash.org
Sat Jun 6 06:19:32 EDT 2020


Updated	 via  https://github.com/Gnucash/gnucash/commit/f8fdb95e (commit)
	 via  https://github.com/Gnucash/gnucash/commit/c02eef8b (commit)
	 via  https://github.com/Gnucash/gnucash/commit/1e312d4a (commit)
	 via  https://github.com/Gnucash/gnucash/commit/9f97ce6c (commit)
	from  https://github.com/Gnucash/gnucash/commit/e4e36e68 (commit)



commit f8fdb95ea3ba6b0501162f36be024a05b91165aa
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Sat Jun 6 11:15:08 2020 +0100

    Bug 797775 - Rate/Price displayed as fractional in CSV Export
    
    Change the CSV transaction exporter to follow the Preference setting
    of 'General->Force Prices to display as decimals'.

diff --git a/gnucash/import-export/csv-exp/assistant-csv-export.c b/gnucash/import-export/csv-exp/assistant-csv-export.c
index 9efe206bc..8ad1811dc 100644
--- a/gnucash/import-export/csv-exp/assistant-csv-export.c
+++ b/gnucash/import-export/csv-exp/assistant-csv-export.c
@@ -106,6 +106,8 @@ static const gchar *start_trans_string = N_(
             " require further manipulation to get them in a format you can use.\n\n"
             "Each Transaction will appear once in the export and will be listed in"
             " the order the accounts were processed\n\n"
+            "Price/Rate output format is controlled by the Preference setting,\n"
+            " General->Force Prices to display as decimals\n\n"
             "Select the settings you require for the file and then click \"Next\" to proceed"
             " or \"Cancel\" to abort the export.\n");
 
@@ -116,6 +118,8 @@ static const gchar *start_trans_simple_string = N_(
             " manipulation to get them in a format you can use. Each Transaction will"
             " appear once in the export and will be listed in the order the accounts"
             " were processed\n\n"
+            "Price/Rate output format is controlled by the Preference setting,\n"
+            " General->Force Prices to display as decimals\n\n"
             "By selecting the simple layout, the output will be equivalent to a single"
             " row register view and as such some of the transfer detail could be lost.\n\n"
             "Select the settings you require for the file and then click \"Next\" to proceed"
diff --git a/gnucash/import-export/csv-exp/csv-transactions-export.c b/gnucash/import-export/csv-exp/csv-transactions-export.c
index 4cc53ea85..7050a6df9 100644
--- a/gnucash/import-export/csv-exp/csv-transactions-export.c
+++ b/gnucash/import-export/csv-exp/csv-transactions-export.c
@@ -356,13 +356,14 @@ static gchar*
 add_rate (gchar *so_far, Split *split, gboolean t_void, CsvExportInfo *info)
 {
     const gchar *amt;
+    gnc_commodity *curr = xaccAccountGetCommodity (xaccSplitGetAccount (split));
     gchar       *conv;
     gchar       *result;
 
     if (t_void)
-        amt = xaccPrintAmount (gnc_numeric_zero(), gnc_split_amount_print_info (split, FALSE));
+        amt = xaccPrintAmount (gnc_numeric_zero(), gnc_default_price_print_info (curr));
     else
-        amt = xaccPrintAmount (xaccSplitGetSharePrice (split), gnc_split_amount_print_info (split, FALSE));
+        amt = xaccPrintAmount (xaccSplitGetSharePrice (split), gnc_default_price_print_info (curr));
 
     conv = csv_txn_test_field_string (info, amt);
     result = g_strconcat (so_far, conv, info->end_sep, EOLSTR, NULL);
@@ -376,6 +377,7 @@ static gchar*
 add_price (gchar *so_far, Split *split, gboolean t_void, CsvExportInfo *info)
 {
     const gchar *string_amount;
+    gnc_commodity *curr = xaccAccountGetCommodity (xaccSplitGetAccount (split));
     gchar       *conv;
     gchar       *result;
 
@@ -383,10 +385,10 @@ add_price (gchar *so_far, Split *split, gboolean t_void, CsvExportInfo *info)
     {
         gnc_numeric cf = gnc_numeric_div (xaccSplitVoidFormerValue (split), xaccSplitVoidFormerAmount (split), GNC_DENOM_AUTO,
                                                    GNC_HOW_DENOM_SIGFIGS(6) | GNC_HOW_RND_ROUND_HALF_UP);
-        string_amount = xaccPrintAmount (cf, gnc_split_amount_print_info (split, FALSE));
+        string_amount = xaccPrintAmount (cf, gnc_default_price_print_info (curr));
     }
     else
-        string_amount = xaccPrintAmount (xaccSplitGetSharePrice (split), gnc_split_amount_print_info (split, FALSE));
+        string_amount = xaccPrintAmount (xaccSplitGetSharePrice (split), gnc_default_price_print_info (curr));
 
     conv = csv_txn_test_field_string (info, string_amount);
     result = g_strconcat (so_far, conv, info->end_sep, EOLSTR, NULL);

commit c02eef8bbee599ee7725c3f013cbd041f22afccb
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Sat Jun 6 10:14:50 2020 +0100

    Bug 797774 - Bill/Invoice due reminder confusion on CN?
    
    The Bill/Invoice due reminder has a column header of 'CN?' which was
    unclear of meaning which is 'Is this xxx a Credit Note'. A tooltip
    was suggested but a better fix is to change the column to display the
    'Type' so you would see Bill, Invoice or 'Credit Note' just like you
    see in the find dialog.

diff --git a/gnucash/gnome-utils/gnc-query-view.c b/gnucash/gnome-utils/gnc-query-view.c
index 49b5acffd..b61bee948 100644
--- a/gnucash/gnome-utils/gnc-query-view.c
+++ b/gnucash/gnome-utils/gnc-query-view.c
@@ -192,7 +192,7 @@ gnc_query_view_init (GNCQueryView *qview)
     GNCQueryViewPrivate *priv;
 
     // Set the name for this widget so it can be easily manipulated with css
-    gtk_widget_set_name (GTK_WIDGET(qview), "gnc-id-query-view");
+    gtk_widget_set_name (GTK_WIDGET(qview), "gnc-id-query-view-view");
 
     qview->query = NULL;
 
diff --git a/gnucash/gnome/dialog-invoice.c b/gnucash/gnome/dialog-invoice.c
index 999a8fa88..7787fdc26 100644
--- a/gnucash/gnome/dialog-invoice.c
+++ b/gnucash/gnome/dialog-invoice.c
@@ -3559,12 +3559,11 @@ gnc_invoice_show_docs_due (GtkWindow *parent, QofBook *book, double days_in_adva
     /* Create the param list (in reverse order) */
     if (param_list == NULL)
     {
-        /* Translators: This abbreviation is the column heading for
-           the condition "Is this invoice a Credit Note?" */
-        param_list = gnc_search_param_prepend (param_list, _("CN?"), NULL, type,
-                                               INVOICE_IS_CN, NULL);
-        param_list = gnc_search_param_prepend (param_list, _("Amount"), NULL, type,
-                                               INVOICE_POST_LOT, LOT_BALANCE, NULL);
+        param_list = gnc_search_param_prepend_with_justify (param_list, _("Amount"),
+                                                            GTK_JUSTIFY_RIGHT, NULL, type,
+                                                            INVOICE_POST_LOT, LOT_BALANCE, NULL);
+        param_list = gnc_search_param_prepend (param_list, _("Type"), NULL, type,
+                                               INVOICE_TYPE_STRING, NULL);
         param_list = gnc_search_param_prepend (param_list, _("Company"), NULL, type,
                                                INVOICE_OWNER, OWNER_PARENT, OWNER_NAME, NULL);
         param_list = gnc_search_param_prepend (param_list, _("Due"), NULL, type,
diff --git a/gnucash/gtkbuilder/dialog-query-view.glade b/gnucash/gtkbuilder/dialog-query-view.glade
index 09a84c2b6..1f05a70b0 100644
--- a/gnucash/gtkbuilder/dialog-query-view.glade
+++ b/gnucash/gtkbuilder/dialog-query-view.glade
@@ -1,13 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.22.1 -->
+<!-- Generated with glade 3.22.2 -->
 <interface>
   <requires lib="gtk+" version="3.10"/>
   <object class="GtkDialog" id="query_view_dialog">
     <property name="can_focus">False</property>
-    <property name="default_width">500</property>
+    <property name="default_width">600</property>
     <property name="default_height">300</property>
     <property name="type_hint">dialog</property>
-    <child>
+    <child type="titlebar">
       <placeholder/>
     </child>
     <child internal-child="vbox">

commit 1e312d4a33b5c190b56e1d3f98a96d6fd9e86d06
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Sat Jun 6 10:06:41 2020 +0100

    Add a tooltip for the 'C' column in the Chart of Accounts
    
    Add a tooltip to the header for column 'C' of 'Account Color' to match
    existing one character headings for 'Place Holder' and 'Hidden' columns.

diff --git a/gnucash/gnome-utils/gnc-tree-view-account.c b/gnucash/gnome-utils/gnc-tree-view-account.c
index 9d1a7445d..e690b48ec 100644
--- a/gnucash/gnome-utils/gnc-tree-view-account.c
+++ b/gnucash/gnome-utils/gnc-tree-view-account.c
@@ -930,6 +930,9 @@ gnc_tree_view_account_new_with_root (Account *root, gboolean show_root)
     g_object_set_data_full(G_OBJECT(acc_color_column), REAL_TITLE,
                            g_strdup(_("Account Color")), g_free);
 
+    /* Also add the full title to the column header as a tooltip */
+    gtk_widget_set_tooltip_text (gtk_tree_view_column_get_button (acc_color_column), _("Account Color"));
+
     priv->notes_column
         = gnc_tree_view_add_text_view_column(view, _("Notes"), "notes", NULL,
                                         "Sample account notes.",

commit 9f97ce6c213c3b8c83131fa8d90e506effab83d4
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Sat Jun 6 10:04:36 2020 +0100

    Fix g_signal_handler_disconnect: assertion in trace file
    
    There is a difference in the way the sheet is closed between registers
    and invoices. The gnc-date-cell-destroy is being called before the
    gnc-item_edit_destroying for invoices and so when the item_edit tries
    to do the signal disconnect on the popup_item it no longer exists.
    Moving the gtk_widget_destroy before ledger_destroy fixes this.

diff --git a/gnucash/gnome/dialog-invoice.c b/gnucash/gnome/dialog-invoice.c
index 281295323..999a8fa88 100644
--- a/gnucash/gnome/dialog-invoice.c
+++ b/gnucash/gnome/dialog-invoice.c
@@ -612,9 +612,9 @@ gnc_invoice_window_destroy_cb (GtkWidget *widget, gpointer data)
         iw->invoice_guid = *guid_null ();
     }
 
+    gtk_widget_destroy(widget);
     gnc_entry_ledger_destroy (iw->ledger);
     gnc_unregister_gui_component (iw->component_id);
-    gtk_widget_destroy(widget);
     gnc_resume_gui_refresh ();
 
     g_free (iw);



Summary of changes:
 gnucash/gnome-utils/gnc-query-view.c                    |  2 +-
 gnucash/gnome-utils/gnc-tree-view-account.c             |  3 +++
 gnucash/gnome/dialog-invoice.c                          | 13 ++++++-------
 gnucash/gtkbuilder/dialog-query-view.glade              |  6 +++---
 gnucash/import-export/csv-exp/assistant-csv-export.c    |  4 ++++
 gnucash/import-export/csv-exp/csv-transactions-export.c | 10 ++++++----
 6 files changed, 23 insertions(+), 15 deletions(-)



More information about the gnucash-changes mailing list