gnucash master: Multiple changes pushed

Robert Fewell bobit at code.gnucash.org
Sun Jan 29 06:46:24 EST 2023


Updated	 via  https://github.com/Gnucash/gnucash/commit/8a02f168 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/cbb3bd46 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/b44f0c67 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/4b226c57 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/9889712b (commit)
	 via  https://github.com/Gnucash/gnucash/commit/a94ca11b (commit)
	 via  https://github.com/Gnucash/gnucash/commit/7bc4e037 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/b85afa79 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/4741ee35 (commit)
	from  https://github.com/Gnucash/gnucash/commit/44f4b559 (commit)



commit 8a02f168b05577bf24b416e93ab370893a3e1f74
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Sun Jan 29 11:40:44 2023 +0000

    Fix wrong toolbar label and menu entry for stock assistant

diff --git a/gnucash/gnome/gnc-plugin-page-register.c b/gnucash/gnome/gnc-plugin-page-register.c
index 7a5924e32..21f898a7c 100644
--- a/gnucash/gnome/gnc-plugin-page-register.c
+++ b/gnucash/gnome/gnc-plugin-page-register.c
@@ -416,6 +416,7 @@ static GncToolBarShortNames toolbar_labels[] =
     { "LinkTransactionAction",              N_ ("Manage Document Link") },
     { "LinkedTransactionOpenAction",        N_ ("Open Linked Document") },
     { "JumpLinkedInvoiceAction",            N_ ("Invoice") },
+    { "ActionsStockAssistantAction",        N_ ("Stock Assistant") }, 
     { NULL, NULL },
 };
 
diff --git a/gnucash/ui/gnc-plugin-page-account-tree.ui b/gnucash/ui/gnc-plugin-page-account-tree.ui
index 6b1bc1436..08d541c61 100644
--- a/gnucash/ui/gnc-plugin-page-account-tree.ui
+++ b/gnucash/ui/gnc-plugin-page-account-tree.ui
@@ -141,7 +141,7 @@
       <attribute name="temp" translatable="no">yes</attribute>
     </item>
     <item>
-      <attribute name="label" translatable="no">Stock Ass_istant</attribute>
+      <attribute name="label" translatable="no">Stock Ass_istant…</attribute>
       <attribute name="action">GncPluginPageAccountTreeActions.ActionsStockAssistantAction</attribute>
       <attribute name="tooltip" translatable="yes">Stock Assistant</attribute>
       <attribute name="temp" translatable="no">yes</attribute>
@@ -245,6 +245,11 @@
         <attribute name="action">GncPluginPageAccountTreeActions.ActionsTransferAction</attribute>
         <attribute name="tooltip" translatable="yes">Transfer funds from one account to another</attribute>
       </item>
+      <item>
+        <attribute name="label" translatable="no">Stock Ass_istant…</attribute>
+        <attribute name="action">GncPluginPageAccountTreeActions.ActionsStockAssistantAction</attribute>
+        <attribute name="tooltip" translatable="yes">Stock Assistant</attribute>
+      </item>
       <item>
         <attribute name="label" translatable="yes">Stoc_k Split…</attribute>
         <attribute name="action">GncPluginPageAccountTreeActions.ActionsStockSplitAction</attribute>
diff --git a/gnucash/ui/gnc-plugin-page-register.ui b/gnucash/ui/gnc-plugin-page-register.ui
index f082bd58e..e6923d9a0 100644
--- a/gnucash/ui/gnc-plugin-page-register.ui
+++ b/gnucash/ui/gnc-plugin-page-register.ui
@@ -245,7 +245,7 @@
       <attribute name="temp" translatable="no">yes</attribute>
     </item>
     <item>
-      <attribute name="label" translatable="yes">Stock Ass_istant</attribute>
+      <attribute name="label" translatable="yes">Stock Ass_istant…</attribute>
       <attribute name="action">GncPluginPageRegisterActions.ActionsStockAssistantAction</attribute>
       <attribute name="tooltip" translatable="yes">Stock Assistant</attribute>
       <attribute name="temp" translatable="no">yes</attribute>
@@ -709,7 +709,7 @@
       <object class="GtkToolButton" id="but13">
         <property name="visible">True</property>
         <property name="can-focus">False</property>
-        <property name="label" translatable="yes">Stoc_k Split…</property>
+        <property name="label" translatable="yes">Stock Ass_istant…</property>
         <property name="action-name">GncPluginPageRegisterActions.ActionsStockAssistantAction</property>
         <property name="tooltip-text" translatable="yes">Stock Assistant</property>
         <property name="use-underline">True</property>

commit cbb3bd4618709d4c60d7a684e7e311508b0e8962
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Sun Jan 29 11:40:05 2023 +0000

    Fix ability to start stock assistant from account tree.

diff --git a/gnucash/gnome/gnc-plugin-page-account-tree.c b/gnucash/gnome/gnc-plugin-page-account-tree.c
index a8b157d24..62a99ae4b 100644
--- a/gnucash/gnome/gnc-plugin-page-account-tree.c
+++ b/gnucash/gnome/gnc-plugin-page-account-tree.c
@@ -1852,7 +1852,6 @@ gnc_plugin_page_account_tree_cmd_stock_assistant (GSimpleAction *simple,
 
     ENTER ("(action %p, page %p)", simple, page);
 
-    g_return_if_fail (GNC_IS_PLUGIN_PAGE_REGISTER (page));
     account = gnc_plugin_page_account_tree_get_current_account (page);
     window = GNC_PLUGIN_PAGE(page)->window;
     gnc_stock_transaction_assistant (window, account);

commit b44f0c67bea749730df1e4ca6f134f9c546dca90
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Sun Jan 29 11:39:21 2023 +0000

    Change the alignment of a couple of widgets in the stock
     assistant

diff --git a/gnucash/gtkbuilder/assistant-stock-transaction.glade b/gnucash/gtkbuilder/assistant-stock-transaction.glade
index c28e6d7b6..08370ccf4 100644
--- a/gnucash/gtkbuilder/assistant-stock-transaction.glade
+++ b/gnucash/gtkbuilder/assistant-stock-transaction.glade
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.38.2 -->
+<!-- Generated with glade 3.40.0 -->
 <interface>
   <requires lib="gtk+" version="3.22"/>
   <object class="GtkAssistant" id="stock_transaction_assistant">
@@ -26,6 +26,7 @@
         <property name="page-type">intro</property>
         <property name="title" translatable="yes">Stock Transaction Assistant</property>
         <property name="complete">True</property>
+        <property name="has-padding">False</property>
       </packing>
     </child>
     <child>
@@ -35,6 +36,7 @@
         <property name="margin-start">12</property>
         <property name="border-width">6</property>
         <property name="orientation">vertical</property>
+        <property name="spacing">12</property>
         <child>
           <object class="GtkLabel" id="transaction_details_label">
             <property name="visible">True</property>
@@ -54,12 +56,14 @@
           <object class="GtkGrid" id="transaction_details_table">
             <property name="visible">True</property>
             <property name="can-focus">False</property>
+            <property name="hexpand">True</property>
             <property name="row-spacing">3</property>
             <property name="column-spacing">6</property>
             <child>
               <object class="GtkLabel" id="transaction_date_label">
                 <property name="visible">True</property>
                 <property name="can-focus">False</property>
+                <property name="halign">end</property>
                 <property name="label" translatable="yes">Date</property>
               </object>
               <packing>
@@ -71,6 +75,7 @@
               <object class="GtkLabel" id="transaction_description_label">
                 <property name="visible">True</property>
                 <property name="can-focus">False</property>
+                <property name="halign">end</property>
                 <property name="label" translatable="yes">Description</property>
               </object>
               <packing>
@@ -82,6 +87,7 @@
               <object class="GtkEntry" id="transaction_description_entry">
                 <property name="visible">True</property>
                 <property name="can-focus">True</property>
+                <property name="hexpand">True</property>
               </object>
               <packing>
                 <property name="left-attach">1</property>
@@ -102,6 +108,7 @@
       <packing>
         <property name="title" translatable="yes">Transaction Details</property>
         <property name="complete">True</property>
+        <property name="has-padding">False</property>
       </packing>
     </child>
     <child>
@@ -111,6 +118,7 @@
         <property name="margin-start">12</property>
         <property name="border-width">6</property>
         <property name="orientation">vertical</property>
+        <property name="spacing">12</property>
         <child>
           <object class="GtkLabel" id="transaction_type_page_label">
             <property name="visible">True</property>
@@ -136,6 +144,7 @@
               <object class="GtkLabel" id="transaction_type_combo_label">
                 <property name="visible">True</property>
                 <property name="can-focus">False</property>
+                <property name="halign">end</property>
                 <property name="label" translatable="yes">Type</property>
               </object>
               <packing>
@@ -147,6 +156,7 @@
               <object class="GtkComboBoxText" id="transaction_type_page_combobox">
                 <property name="visible">True</property>
                 <property name="can-focus">False</property>
+                <property name="hexpand">True</property>
                 <items>
                   <item>a1</item>
                   <item>b2</item>
@@ -184,6 +194,7 @@
       <packing>
         <property name="title" translatable="yes">Transaction Type</property>
         <property name="complete">True</property>
+        <property name="has-padding">False</property>
       </packing>
     </child>
     <child>
@@ -192,6 +203,7 @@
         <property name="can-focus">False</property>
         <property name="border-width">6</property>
         <property name="orientation">vertical</property>
+        <property name="spacing">12</property>
         <child>
           <object class="GtkLabel" id="stock_amount_title">
             <property name="visible">True</property>
@@ -212,7 +224,7 @@
             <property name="visible">True</property>
             <property name="can-focus">False</property>
             <property name="border-width">6</property>
-            <property name="row-spacing">6</property>
+            <property name="row-spacing">3</property>
             <property name="column-spacing">6</property>
             <child>
               <object class="GtkLabel" id="stock_amount_label">
@@ -247,6 +259,7 @@
                 <property name="visible">True</property>
                 <property name="can-focus">False</property>
                 <property name="halign">end</property>
+                <property name="hexpand">True</property>
                 <property name="label">(Previous Balance)</property>
                 <property name="use-underline">True</property>
                 <property name="justify">center</property>
@@ -298,6 +311,7 @@
       <packing>
         <property name="title" translatable="yes">Stock Amount</property>
         <property name="complete">True</property>
+        <property name="has-padding">False</property>
       </packing>
     </child>
     <child>
@@ -306,6 +320,7 @@
         <property name="can-focus">False</property>
         <property name="border-width">6</property>
         <property name="orientation">vertical</property>
+        <property name="spacing">12</property>
         <child>
           <object class="GtkLabel" id="stock_value_title">
             <property name="visible">True</property>
@@ -326,7 +341,7 @@
             <property name="visible">True</property>
             <property name="can-focus">False</property>
             <property name="border-width">6</property>
-            <property name="row-spacing">6</property>
+            <property name="row-spacing">3</property>
             <property name="column-spacing">6</property>
             <child>
               <object class="GtkLabel" id="stock_price_amount">
@@ -360,6 +375,7 @@
               <object class="GtkEntry" id="stock_memo_entry">
                 <property name="visible">True</property>
                 <property name="can-focus">True</property>
+                <property name="hexpand">True</property>
               </object>
               <packing>
                 <property name="left-attach">1</property>
@@ -408,6 +424,7 @@
       <packing>
         <property name="title" translatable="yes">Stock Value</property>
         <property name="complete">True</property>
+        <property name="has-padding">False</property>
       </packing>
     </child>
     <child>
@@ -520,6 +537,7 @@
       <packing>
         <property name="title" translatable="yes">Cash</property>
         <property name="complete">True</property>
+        <property name="has-padding">False</property>
       </packing>
     </child>
     <child>
@@ -646,6 +664,7 @@
       <packing>
         <property name="title" translatable="yes">Fees</property>
         <property name="complete">True</property>
+        <property name="has-padding">False</property>
       </packing>
     </child>
     <child>
@@ -758,6 +777,7 @@
       <packing>
         <property name="title" translatable="yes">Dividend</property>
         <property name="complete">True</property>
+        <property name="has-padding">False</property>
       </packing>
     </child>
     <child>
@@ -870,6 +890,7 @@
       <packing>
         <property name="title" translatable="yes">Capital Gains</property>
         <property name="complete">True</property>
+        <property name="has-padding">False</property>
       </packing>
     </child>
     <child>
@@ -933,6 +954,7 @@
       <packing>
         <property name="page-type">confirm</property>
         <property name="title" translatable="yes">Finish</property>
+        <property name="has-padding">False</property>
       </packing>
     </child>
     <child internal-child="action_area">

commit 4b226c574b9b8efd40479a7150d4b7c668b3e425
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Sun Jan 29 11:38:25 2023 +0000

    Change some alignment in source file assistant-csv-price-import.c

diff --git a/gnucash/import-export/csv-imp/assistant-csv-price-import.cpp b/gnucash/import-export/csv-imp/assistant-csv-price-import.cpp
index c3e64e3b0..2cf94394e 100644
--- a/gnucash/import-export/csv-imp/assistant-csv-price-import.cpp
+++ b/gnucash/import-export/csv-imp/assistant-csv-price-import.cpp
@@ -1911,17 +1911,17 @@ CsvImpPriceAssist::assist_summary_page_prepare ()
     auto added_str = g_strdup_printf (ngettext ("%d added price",
                                                 "%d added prices",
                                                 price_imp->m_prices_added),
-                                      price_imp->m_prices_added);
+                                                price_imp->m_prices_added);
     /* Translators: This is a ngettext(3) message, %d is the number of duplicate prices */
     auto dupl_str = g_strdup_printf (ngettext ("%d duplicate price",
                                                "%d duplicate prices",
                                                price_imp->m_prices_duplicated),
-                                     price_imp->m_prices_duplicated);
+                                               price_imp->m_prices_duplicated);
     /* Translators: This is a ngettext(3) message, %d is the number of replaced prices */
     auto repl_str = g_strdup_printf (ngettext ("%d replaced price",
                                                "%d replaced prices",
                                                price_imp->m_prices_replaced),
-                                     price_imp->m_prices_replaced);
+                                               price_imp->m_prices_replaced);
     auto msg = g_strdup_printf (
         _("The prices were imported from file '%s'.\n\n"
           "Import summary:\n"

commit 9889712be5099641b0c862c428552a1169be88b3
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Sun Jan 29 11:37:29 2023 +0000

    Block CSV price import separator call backs while buttons updated
    
    When the individual CSV separator buttons were being updated, the
    associated call could be triggered several times. To stop this, block
    the call back for the individual buttons when they are updated and call
    it at the end.

diff --git a/gnucash/import-export/csv-imp/assistant-csv-price-import.cpp b/gnucash/import-export/csv-imp/assistant-csv-price-import.cpp
index 5a01ce850..c3e64e3b0 100644
--- a/gnucash/import-export/csv-imp/assistant-csv-price-import.cpp
+++ b/gnucash/import-export/csv-imp/assistant-csv-price-import.cpp
@@ -1044,6 +1044,11 @@ void CsvImpPriceAssist::preview_update_separators (GtkWidget* widget)
     /* Set the parse options using the checked_separators list. */
     price_imp->separators (checked_separators);
 
+    /* if there are no separators, there will only be one column
+     * so make sure column header is NONE */
+    if (checked_separators.empty())
+        price_imp->set_column_type_price (0, GncPricePropType::NONE);
+
     /* Parse the data using the new options. We don't want to reguess
      * the column types because we want to leave the user's
      * configurations intact. */
@@ -1772,13 +1777,21 @@ CsvImpPriceAssist::preview_refresh ()
             price_imp->to_currency());
 
     // Handle separator checkboxes and custom field, only relevant if the file format is csv
+    // Note we defer the change signal until all buttons have been updated
+    // An early update may result in an incomplete tokenize run that would
+    // cause our list of saved column types to be truncated
     if (price_imp->file_format() == GncImpFileFormat::CSV)
     {
         auto separators = price_imp->separators();
         const auto stock_sep_chars = std::string (" \t,:;-");
+
         for (int i = 0; i < SEP_NUM_OF_TYPES; i++)
+        {
+            g_signal_handlers_block_by_func (sep_button[i], (gpointer) csv_price_imp_preview_sep_button_cb, this);
             gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(sep_button[i]),
                 separators.find (stock_sep_chars[i]) != std::string::npos);
+            g_signal_handlers_unblock_by_func (sep_button[i], (gpointer) csv_price_imp_preview_sep_button_cb, this);
+        }
 
         // If there are any other separators in the separators string,
         // add them as custom separators
@@ -1788,9 +1801,16 @@ CsvImpPriceAssist::preview_refresh ()
             separators.erase(pos);
             pos = separators.find_first_of (stock_sep_chars);
         }
+        g_signal_handlers_block_by_func (custom_cbutton, (gpointer) csv_price_imp_preview_sep_button_cb, this);
+        g_signal_handlers_block_by_func (custom_entry, (gpointer) csv_price_imp_preview_sep_button_cb, this);
+
         gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(custom_cbutton),
-                !separators.empty());
+                                      !separators.empty());
         gtk_entry_set_text (GTK_ENTRY(custom_entry), separators.c_str());
+
+        g_signal_handlers_unblock_by_func (custom_cbutton, (gpointer) csv_price_imp_preview_sep_button_cb, this);
+        g_signal_handlers_unblock_by_func (custom_entry, (gpointer) csv_price_imp_preview_sep_button_cb, this);
+        csv_price_imp_preview_sep_button_cb (GTK_WIDGET(custom_cbutton), this);
     }
     // Repopulate the parsed data table
     g_idle_add ((GSourceFunc)csv_imp_preview_queue_rebuild_table, this);

commit a94ca11ba749fa4a463c75baf0d2e71ca84f4ce6
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Sun Jan 29 11:36:42 2023 +0000

    Configuration not properly saved for CSV price import
    
    The trailing lines value was not being saved properly.

diff --git a/gnucash/import-export/csv-imp/assistant-csv-price-import.cpp b/gnucash/import-export/csv-imp/assistant-csv-price-import.cpp
index 7b86adb2e..5a01ce850 100644
--- a/gnucash/import-export/csv-imp/assistant-csv-price-import.cpp
+++ b/gnucash/import-export/csv-imp/assistant-csv-price-import.cpp
@@ -1722,25 +1722,34 @@ void CsvImpPriceAssist::preview_refresh_table ()
 void
 CsvImpPriceAssist::preview_refresh ()
 {
+    // Cache skip settings. Updating the widgets one by one
+    // triggers a callback that transfers all skip widgets'
+    // values to settings. So by the time the next widget value
+    // is to be set, that widget's 'new' setting has already been
+    // replaced by its old setting preveneting us from using it
+    // here sensibly.
+
+    auto skip_start_lines = price_imp->skip_start_lines();
+    auto skip_end_lines = price_imp->skip_end_lines();
+    auto skip_alt_lines = price_imp->skip_alt_lines();
+
     // Set start row
     auto adj = gtk_spin_button_get_adjustment (start_row_spin);
     gtk_adjustment_set_upper (adj, price_imp->m_parsed_lines.size());
-    gtk_spin_button_set_value (start_row_spin,
-            price_imp->skip_start_lines());
+    gtk_spin_button_set_value (start_row_spin, skip_start_lines);
 
     // Set end row
     adj = gtk_spin_button_get_adjustment (end_row_spin);
     gtk_adjustment_set_upper (adj, price_imp->m_parsed_lines.size());
-    gtk_spin_button_set_value (end_row_spin,
-            price_imp->skip_end_lines());
+    gtk_spin_button_set_value (end_row_spin, skip_end_lines);
 
     // Set Alternate rows
     gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(skip_alt_rows_button),
-            price_imp->skip_alt_lines());
+                                  skip_alt_lines);
 
     // Set over-write indicator
     gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(over_write_cbutton),
-            price_imp->over_write());
+                                  price_imp->over_write());
 
     // Set Import Format
     gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(csv_button),

commit 7bc4e0370dc8703fc9d865f7b920634eabf85349
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Sun Jan 29 11:35:57 2023 +0000

    Add widget names to import dialogs so they can be manipulated with css

diff --git a/gnucash/import-export/import-account-matcher.c b/gnucash/import-export/import-account-matcher.c
index bb02064aa..00001e81d 100644
--- a/gnucash/import-export/import-account-matcher.c
+++ b/gnucash/import-export/import-account-matcher.c
@@ -457,6 +457,10 @@ Account * gnc_import_select_account(GtkWidget *parent,
         picker->warning = GTK_WIDGET(gtk_builder_get_object (builder, "warning_label"));
         picker->ok_button = GTK_WIDGET(gtk_builder_get_object (builder, "okbutton"));
 
+        // Set the name for this dialog so it can be easily manipulated with css
+        gtk_widget_set_name (GTK_WIDGET(picker->dialog), "gnc-id-import-account-picker");
+        gnc_widget_style_context_add_class (GTK_WIDGET(picker->dialog), "gnc-class-imports");
+
         if (parent)
             gtk_window_set_transient_for (GTK_WINDOW (picker->dialog),
                                           GTK_WINDOW (parent));
diff --git a/gnucash/import-export/import-main-matcher.c b/gnucash/import-export/import-main-matcher.c
index f6a32d7b0..77ae800a9 100644
--- a/gnucash/import-export/import-main-matcher.c
+++ b/gnucash/import-export/import-main-matcher.c
@@ -657,6 +657,10 @@ on_matcher_help_clicked (GtkButton *button, gpointer user_data)
     help_dialog = GTK_WIDGET(gtk_builder_get_object (builder, "matcher_help_dialog"));
     gtk_window_set_transient_for (GTK_WINDOW(help_dialog), GTK_WINDOW(info->main_widget));
 
+    // Set the name for this dialog so it can be easily manipulated with css
+    gtk_widget_set_name (GTK_WIDGET(help_dialog), "gnc-id-import-matcher-help");
+    gnc_widget_style_context_add_class (GTK_WIDGET(help_dialog), "gnc-class-imports");
+
     /* Connect the signals */
     gtk_builder_connect_signals_full (builder, gnc_builder_connect_full_func, help_dialog);
 
@@ -1059,6 +1063,10 @@ input_new_fields (GNCImportMainMatcher *info, RowInfo *rowinfo,
 
     dialog = GTK_WIDGET(gtk_builder_get_object (builder, "transaction_edit_dialog"));
 
+    // Set the name for this dialog so it can be easily manipulated with css
+    gtk_widget_set_name (GTK_WIDGET(dialog), "gnc-id-import-matcher-edits");
+    gnc_widget_style_context_add_class (GTK_WIDGET(dialog), "gnc-class-imports");
+
     desc_entry = GTK_WIDGET(gtk_builder_get_object (builder, "desc_entry"));
     memo_entry = GTK_WIDGET(gtk_builder_get_object (builder, "memo_entry"));
     notes_entry = GTK_WIDGET(gtk_builder_get_object (builder, "notes_entry"));
@@ -1718,6 +1726,11 @@ gnc_gen_trans_list_new (GtkWidget *parent,
     box = GTK_WIDGET(gtk_builder_get_object (builder, "transaction_matcher_content"));
     gtk_box_pack_start (GTK_BOX(pbox), box, TRUE, TRUE, 0);
 
+    // Set the name for this dialog so it can be easily manipulated with css
+    gtk_widget_set_name (GTK_WIDGET(info->main_widget), "gnc-id-import-matcher-transactions");
+    gtk_widget_set_name (GTK_WIDGET(box), "gnc-id-import-transaction-content");
+    gnc_widget_style_context_add_class (GTK_WIDGET(info->main_widget), "gnc-class-imports");
+
     /* setup the common parts */
     gnc_gen_trans_common_setup (info, parent, builder, heading,
                                 all_from_same_account, match_date_hardlimit);
@@ -1768,6 +1781,9 @@ gnc_gen_trans_assist_new (GtkWidget *parent,
     g_assert (box != NULL);
     gtk_box_pack_start (GTK_BOX(assistant_page), box, TRUE, TRUE, 6);
 
+    // Set the name for this dialog so it can be easily manipulated with css
+    gtk_widget_set_name (GTK_WIDGET(box), "gnc-id-import-transaction-content");
+
     /* setup the common parts */
     gnc_gen_trans_common_setup (info, parent, builder, heading,
                                 all_from_same_account, match_date_hardlimit);
diff --git a/gnucash/import-export/import-match-picker.c b/gnucash/import-export/import-match-picker.c
index faff221bd..8b84bb915 100644
--- a/gnucash/import-export/import-match-picker.c
+++ b/gnucash/import-export/import-match-picker.c
@@ -468,6 +468,10 @@ init_match_picker_gui(GtkWidget *parent, GNCImportMatchPicker * matcher)
     matcher->match_view = (GtkTreeView *)GTK_WIDGET(gtk_builder_get_object (builder, "matched_view"));
     matcher->reconciled_chk = (GtkCheckButton *)GTK_WIDGET(gtk_builder_get_object(builder, "hide_reconciled_check1"));
 
+    // Set the name for this dialog so it can be easily manipulated with css
+    gtk_widget_set_name (GTK_WIDGET(matcher->transaction_matcher), "gnc-id-import-matcher-picker");
+    gnc_widget_style_context_add_class (GTK_WIDGET(matcher->transaction_matcher), "gnc-class-imports");
+
     gtk_window_set_transient_for (GTK_WINDOW (matcher->transaction_matcher), GTK_WINDOW(parent));
 
     gnc_prefs_bind (GNC_PREFS_GROUP, GNC_PREF_DISPLAY_RECONCILED,

commit b85afa790fdb1b69183aca5d87efeade5339bbb6
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Sun Jan 29 11:32:50 2023 +0000

    Only test for linked document glyths once per register
    
    Change the function gnc_split_register_load to run the test for glyths
    only on first pass.

diff --git a/gnucash/register/ledger-core/split-register-load.c b/gnucash/register/ledger-core/split-register-load.c
index b8a5bd48f..c7d499a79 100644
--- a/gnucash/register/ledger-core/split-register-load.c
+++ b/gnucash/register/ledger-core/split-register-load.c
@@ -422,8 +422,12 @@ gnc_split_register_load (SplitRegister* reg, GList* slist,
     ((PriceCell*) gnc_table_layout_get_cell (reg->table->layout, PRIC_CELL),
      gnc_commodity_print_info (account_comm, FALSE));
 
-    gnc_doclink_cell_set_use_glyphs
-    ((Doclinkcell *) gnc_table_layout_get_cell (table->layout, DOCLINK_CELL));
+    /* Only test for linked document glyths once */
+    if (info->first_pass)
+    {
+        gnc_doclink_cell_set_use_glyphs
+        ((Doclinkcell *) gnc_table_layout_get_cell (table->layout, DOCLINK_CELL));
+    }
 
     /* make sure we have a blank split */
     if (blank_split == NULL)

commit 4741ee355bd967be8c8f12296b15b53239b43d64
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Sun Jan 29 11:02:15 2023 +0000

    Change normalize mode in a couple of places
    
    To be consistent, change the normalize mode in gnc-account-sel and
    gnc-account-edit to G_NORMALIZE_NFC which is used in other locations.

diff --git a/gnucash/gnome-utils/gnc-account-sel.c b/gnucash/gnome-utils/gnc-account-sel.c
index 19ab9cfeb..801016ab1 100644
--- a/gnucash/gnome-utils/gnc-account-sel.c
+++ b/gnucash/gnome-utils/gnc-account-sel.c
@@ -292,7 +292,7 @@ normalize_and_fold (char* utf8_string)
     char *normalized, *folded;
     g_return_val_if_fail (utf8_string && *utf8_string, NULL);
 
-    normalized = g_utf8_normalize (utf8_string, -1, G_NORMALIZE_ALL);
+    normalized = g_utf8_normalize (utf8_string, -1, G_NORMALIZE_NFC);
     if (!normalized)
         return NULL;
     folded = g_utf8_casefold (normalized, -1);
@@ -331,7 +331,7 @@ normalize_and_lower (char* utf8_string)
     char *normalized, *lowered;
     g_return_val_if_fail (utf8_string && *utf8_string, NULL);
 
-    normalized = g_utf8_normalize (utf8_string, -1, G_NORMALIZE_ALL);
+    normalized = g_utf8_normalize (utf8_string, -1, G_NORMALIZE_NFC);
     if (!normalized)
         return NULL;
     lowered = g_utf8_strdown (normalized, -1);
diff --git a/gnucash/gnome-utils/gnc-currency-edit.c b/gnucash/gnome-utils/gnc-currency-edit.c
index b6cdef99e..8ffce5631 100644
--- a/gnucash/gnome-utils/gnc-currency-edit.c
+++ b/gnucash/gnome-utils/gnc-currency-edit.c
@@ -303,7 +303,7 @@ add_item(gnc_commodity *commodity, GNCCurrencyEdit *gce)
     model = gtk_combo_box_get_model(GTK_COMBO_BOX(gce));
 
     string = gnc_commodity_get_printname(commodity);
-    normalized = g_utf8_normalize (string, -1, G_NORMALIZE_ALL);
+    normalized = g_utf8_normalize (string, -1, G_NORMALIZE_NFC);
     normalized_folded = normalized ? g_utf8_casefold (normalized, -1) : NULL;
 
     gtk_list_store_append(GTK_LIST_STORE(model), &iter);



Summary of changes:
 gnucash/gnome-utils/gnc-account-sel.c              |  4 +-
 gnucash/gnome-utils/gnc-currency-edit.c            |  2 +-
 gnucash/gnome/gnc-plugin-page-account-tree.c       |  1 -
 gnucash/gnome/gnc-plugin-page-register.c           |  1 +
 .../gtkbuilder/assistant-stock-transaction.glade   | 28 +++++++++++--
 .../csv-imp/assistant-csv-price-import.cpp         | 49 +++++++++++++++++-----
 gnucash/import-export/import-account-matcher.c     |  4 ++
 gnucash/import-export/import-main-matcher.c        | 16 +++++++
 gnucash/import-export/import-match-picker.c        |  4 ++
 gnucash/register/ledger-core/split-register-load.c |  8 +++-
 gnucash/ui/gnc-plugin-page-account-tree.ui         |  7 +++-
 gnucash/ui/gnc-plugin-page-register.ui             |  4 +-
 12 files changed, 106 insertions(+), 22 deletions(-)



More information about the gnucash-changes mailing list