gnucash maint: Multiple changes pushed

Robert Fewell bobit at code.gnucash.org
Fri May 3 06:44:55 EDT 2019


Updated	 via  https://github.com/Gnucash/gnucash/commit/8d71fcaf (commit)
	 via  https://github.com/Gnucash/gnucash/commit/38dfc6ec (commit)
	 via  https://github.com/Gnucash/gnucash/commit/c782e7a4 (commit)
	from  https://github.com/Gnucash/gnucash/commit/7c9f01ff (commit)



commit 8d71fcaf2f5b3196187044501ca0c47aeba2ee0a
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Fri May 3 11:42:47 2019 +0100

    Bug 797223 - Preference missing tooltip
    
    The Preferences 'Register/Tab order includes Transfer on Memorised
    Transaction' was not displaying its tooltip even though it was in the
    glade file. Recreated the Register notebook page and the business page
    as it also had a missing tooltip.

diff --git a/gnucash/gtkbuilder/business-prefs.glade b/gnucash/gtkbuilder/business-prefs.glade
index 84a3d0894..de2e89473 100644
--- a/gnucash/gtkbuilder/business-prefs.glade
+++ b/gnucash/gtkbuilder/business-prefs.glade
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.20.0 -->
+<!-- Generated with glade 3.22.1 -->
 <interface>
   <requires lib="gtk+" version="3.10"/>
   <object class="GtkAdjustment" id="cust_days_in_adj">
@@ -40,6 +40,9 @@
     <property name="visible">True</property>
     <property name="can_focus">False</property>
     <property name="title" translatable="yes">Preferences</property>
+    <child>
+      <placeholder/>
+    </child>
     <child>
       <object class="GtkGrid" id="business_prefs">
         <property name="visible">True</property>
@@ -47,37 +50,27 @@
         <property name="border_width">6</property>
         <property name="column_spacing">12</property>
         <child>
-          <object class="GtkLabel" id="label53">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-          </object>
-          <packing>
-            <property name="left_attach">0</property>
-            <property name="top_attach">4</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkLabel" id="label54">
+          <object class="GtkLabel">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <property name="halign">start</property>
-            <property name="label" translatable="yes"><b>Invoices</b></property>
+            <property name="label" translatable="yes"><b>General</b></property>
             <property name="use_markup">True</property>
           </object>
           <packing>
             <property name="left_attach">0</property>
-            <property name="top_attach">5</property>
+            <property name="top_attach">0</property>
           </packing>
         </child>
         <child>
-          <object class="GtkCheckButton" id="pref/dialogs.business.bill/tax-included">
-            <property name="label" translatable="yes">Ta_x included</property>
+          <object class="GtkCheckButton" id="pref/dialogs.business.invoice/enable-toolbuttons">
+            <property name="label" translatable="yes">Enable extra _buttons</property>
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="receives_default">False</property>
             <property name="has_tooltip">True</property>
-            <property name="tooltip_markup">Whether tax is included by default in entries on Bills. This setting is inherited by new customers and vendors.</property>
-            <property name="tooltip_text" translatable="yes">Whether tax is included by default in entries on Bills. This setting is inherited by new customers and vendors.</property>
+            <property name="tooltip_markup">If active, extra toolbar buttons for common business functions are shown as well. Otherwise they are not shown.</property>
+            <property name="tooltip_text" translatable="yes">If active, extra toolbar buttons for common business functions are shown as well. Otherwise they are not shown.</property>
             <property name="halign">start</property>
             <property name="margin_left">12</property>
             <property name="use_underline">True</property>
@@ -85,51 +78,37 @@
           </object>
           <packing>
             <property name="left_attach">0</property>
-            <property name="top_attach">13</property>
+            <property name="top_attach">1</property>
           </packing>
         </child>
         <child>
-          <object class="GtkSpinButton" id="pref/dialogs.business.bill/days-in-advance">
+          <object class="GtkCheckButton" id="pref/dialogs.business.invoice/use-new-window">
+            <property name="label" translatable="yes">_Open in new window</property>
             <property name="visible">True</property>
             <property name="can_focus">True</property>
+            <property name="receives_default">False</property>
             <property name="has_tooltip">True</property>
-            <property name="tooltip_markup">How many days in the future to warn about Bills coming due.</property>
-            <property name="tooltip_text" translatable="yes">How many days in the future to warn about Bills coming due.</property>
-            <property name="invisible_char">●</property>
-            <property name="primary_icon_activatable">False</property>
-            <property name="secondary_icon_activatable">False</property>
-            <property name="adjustment">days_in_adj</property>
-            <property name="climb_rate">1</property>
-            <property name="numeric">True</property>
-          </object>
-          <packing>
-            <property name="left_attach">2</property>
-            <property name="top_attach">12</property>
-            <property name="width">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkLabel" id="label15">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="label" translatable="yes">_Days in advance:</property>
+            <property name="tooltip_markup">If checked, each invoice will be opened in its own top level window. If clear, the invoice will be opened in the current window.</property>
+            <property name="tooltip_text" translatable="yes">If checked, each invoice will be opened in its own top level window. If clear, the invoice will be opened in the current window.</property>
+            <property name="halign">start</property>
+            <property name="margin_left">12</property>
             <property name="use_underline">True</property>
-            <property name="mnemonic_widget">pref/dialogs.business.bill/days-in-advance</property>
+            <property name="draw_indicator">True</property>
           </object>
           <packing>
-            <property name="left_attach">1</property>
-            <property name="top_attach">12</property>
+            <property name="left_attach">0</property>
+            <property name="top_attach">2</property>
           </packing>
         </child>
         <child>
-          <object class="GtkCheckButton" id="pref/dialogs.business.bill/notify-when-due">
-            <property name="label" translatable="yes">_Notify when due</property>
+          <object class="GtkCheckButton" id="pref/dialogs.business.invoice/accumulate-splits">
+            <property name="label" translatable="yes">_Accumulate splits on post</property>
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="receives_default">False</property>
             <property name="has_tooltip">True</property>
-            <property name="tooltip_markup">Whether to display the list of Bills Due at startup.</property>
-            <property name="tooltip_text" translatable="yes">Whether to display the list of Bills Due at startup.</property>
+            <property name="tooltip_markup">Whether multiple entries in an invoice which transfer to the same account should be accumulated into a single split by default. This setting can be changed in the Post dialog.</property>
+            <property name="tooltip_text" translatable="yes">Whether multiple entries in an invoice which transfer to the same account should be accumulated into a single split by default. This setting can be changed in the Post dialog.</property>
             <property name="halign">start</property>
             <property name="margin_left">12</property>
             <property name="use_underline">True</property>
@@ -137,41 +116,41 @@
           </object>
           <packing>
             <property name="left_attach">0</property>
-            <property name="top_attach">12</property>
+            <property name="top_attach">3</property>
           </packing>
         </child>
         <child>
-          <object class="GtkLabel" id="label51">
+          <object class="GtkLabel">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
-            <property name="halign">start</property>
-            <property name="label" translatable="yes"><b>Bills</b></property>
-            <property name="use_markup">True</property>
           </object>
           <packing>
             <property name="left_attach">0</property>
-            <property name="top_attach">11</property>
+            <property name="top_attach">4</property>
           </packing>
         </child>
         <child>
-          <object class="GtkLabel" id="label50">
+          <object class="GtkLabel">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
+            <property name="halign">start</property>
+            <property name="label" translatable="yes"><b>Invoices</b></property>
+            <property name="use_markup">True</property>
           </object>
           <packing>
             <property name="left_attach">0</property>
-            <property name="top_attach">9</property>
+            <property name="top_attach">5</property>
           </packing>
         </child>
         <child>
-          <object class="GtkCheckButton" id="pref/dialogs.business.invoice/tax-included">
-            <property name="label" translatable="yes">_Tax included</property>
+          <object class="GtkCheckButton" id="pref/dialogs.business.invoice/notify-when-due">
+            <property name="label" translatable="yes">Not_ify when due</property>
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="receives_default">False</property>
             <property name="has_tooltip">True</property>
-            <property name="tooltip_markup">Whether tax is included by default in entries on Invoices. This setting is inherited by new customers and vendors.</property>
-            <property name="tooltip_text" translatable="yes">Whether tax is included by default in entries on Invoices. This setting is inherited by new customers and vendors.</property>
+            <property name="tooltip_markup">Whether to display the list of Bills Due at startup.</property>
+            <property name="tooltip_text" translatable="yes">Whether to display the list of Bills Due at startup.</property>
             <property name="halign">start</property>
             <property name="margin_left">12</property>
             <property name="use_underline">True</property>
@@ -179,37 +158,31 @@
           </object>
           <packing>
             <property name="left_attach">0</property>
-            <property name="top_attach">8</property>
+            <property name="top_attach">6</property>
           </packing>
         </child>
         <child>
-          <object class="GtkCheckButton" id="pref/dialogs.business.invoice/accumulate-splits">
-            <property name="label" translatable="yes">_Accumulate splits on post</property>
+          <object class="GtkLabel">
             <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">False</property>
-            <property name="has_tooltip">True</property>
-            <property name="tooltip_markup">Whether multiple entries in an invoice which transfer to the same account should be accumulated into a single split by default. This setting can be changed in the Post dialog.</property>
-            <property name="tooltip_text" translatable="yes">Whether multiple entries in an invoice which transfer to the same account should be accumulated into a single split by default. This setting can be changed in the Post dialog.</property>
+            <property name="can_focus">False</property>
             <property name="halign">start</property>
             <property name="margin_left">12</property>
-            <property name="use_underline">True</property>
-            <property name="draw_indicator">True</property>
+            <property name="label" translatable="yes">Report for printing:</property>
           </object>
           <packing>
             <property name="left_attach">0</property>
-            <property name="top_attach">3</property>
+            <property name="top_attach">7</property>
           </packing>
         </child>
         <child>
-          <object class="GtkCheckButton" id="pref/dialogs.business.invoice/use-new-window">
-            <property name="label" translatable="yes">_Open in new window</property>
+          <object class="GtkCheckButton" id="pref/dialogs.business.invoice/tax-included">
+            <property name="label" translatable="yes">_Tax included</property>
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="receives_default">False</property>
             <property name="has_tooltip">True</property>
-            <property name="tooltip_markup">If checked, each invoice will be opened in its own top level window. If clear, the invoice will be opened in the current window.</property>
-            <property name="tooltip_text" translatable="yes">If checked, each invoice will be opened in its own top level window. If clear, the invoice will be opened in the current window.</property>
+            <property name="tooltip_markup">Whether tax is included by default in entries on Bills. This setting is inherited by new customers and vendors.</property>
+            <property name="tooltip_text" translatable="yes">Whether tax is included by default in entries on Bills. This setting is inherited by new customers and vendors.</property>
             <property name="halign">start</property>
             <property name="margin_left">12</property>
             <property name="use_underline">True</property>
@@ -217,31 +190,18 @@
           </object>
           <packing>
             <property name="left_attach">0</property>
-            <property name="top_attach">2</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkLabel" id="label1">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="halign">start</property>
-            <property name="label" translatable="yes"><b>General</b></property>
-            <property name="use_markup">True</property>
-          </object>
-          <packing>
-            <property name="left_attach">0</property>
-            <property name="top_attach">0</property>
+            <property name="top_attach">8</property>
           </packing>
         </child>
         <child>
-          <object class="GtkCheckButton" id="pref/dialogs.business.invoice/enable-toolbuttons">
-            <property name="label" translatable="yes">Enable extra _buttons</property>
+          <object class="GtkCheckButton" id="pref/dialogs.business.invoice/auto-pay">
+            <property name="label" translatable="yes" comments="See the tooltip "At post time..." for details.">_Process payments on posting</property>
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="receives_default">False</property>
             <property name="has_tooltip">True</property>
-            <property name="tooltip_markup">If active, extra toolbar buttons for common business functions are shown as well. Otherwise they are not shown.</property>
-            <property name="tooltip_text" translatable="yes">If active, extra toolbar buttons for common business functions are shown as well. Otherwise they are not shown.</property>
+            <property name="tooltip_markup">At post time, automatically attempt to pay customer documents with outstanding pre-payments and counter documents. The pre-payments and documents obviously have to be against the same customer. Counter documents are documents with opposite sign. For example for an invoice, customer credit notes and negative invoices are considered counter documents.</property>
+            <property name="tooltip_text" translatable="yes">At post time, automatically attempt to pay customer documents with outstanding pre-payments and counter documents. The pre-payments and documents obviously have to be against the same customer. Counter documents are documents with opposite sign. For example for an invoice, customer credit notes and negative invoices are considered counter documents.</property>
             <property name="halign">start</property>
             <property name="margin_left">12</property>
             <property name="use_underline">True</property>
@@ -249,50 +209,41 @@
           </object>
           <packing>
             <property name="left_attach">0</property>
-            <property name="top_attach">1</property>
+            <property name="top_attach">9</property>
           </packing>
         </child>
         <child>
-          <object class="GtkComboBox" id="pref/dialogs.business.invoice/invoice-printreport">
+          <object class="GtkLabel">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
-            <property name="has_tooltip">True</property>
-            <property name="tooltip_markup">The invoice report to be used for printing.</property>
-            <property name="tooltip_text" translatable="yes">The invoice report to be used for printing.</property>
-            <property name="model">liststore_printinvoice</property>
-            <child>
-              <object class="GtkCellRendererText" id="cellrenderertext2"/>
-              <attributes>
-                <attribute name="text">0</attribute>
-              </attributes>
-            </child>
           </object>
           <packing>
-            <property name="left_attach">1</property>
-            <property name="top_attach">7</property>
-            <property name="width">3</property>
+            <property name="left_attach">0</property>
+            <property name="top_attach">10</property>
           </packing>
         </child>
         <child>
-          <object class="GtkLabel" id="label2">
+          <object class="GtkLabel">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <property name="halign">start</property>
-            <property name="margin_left">12</property>
-            <property name="label" translatable="yes">Report for printing:</property>
+            <property name="label" translatable="yes"><b>Bills</b></property>
+            <property name="use_markup">True</property>
           </object>
           <packing>
             <property name="left_attach">0</property>
-            <property name="top_attach">7</property>
+            <property name="top_attach">11</property>
           </packing>
         </child>
         <child>
-          <object class="GtkCheckButton" id="pref/dialogs.business.invoice/auto-pay">
-            <property name="label" translatable="yes" comments="See the tooltip "At post time..." for details.">_Process payments on posting</property>
+          <object class="GtkCheckButton" id="pref/dialogs.business.bill/notify-when-due">
+            <property name="label" translatable="yes">_Notify when due</property>
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="receives_default">False</property>
-            <property name="tooltip_text" translatable="yes">At post time, automatically attempt to pay customer documents with outstanding pre-payments and counter documents. The pre-payments and documents obviously have to be against the same customer. Counter documents are documents with opposite sign. For example for an invoice, customer credit notes and negative invoices are considered counter documents.</property>
+            <property name="has_tooltip">True</property>
+            <property name="tooltip_markup">Whether to display the list of Bills Due at startup.</property>
+            <property name="tooltip_text" translatable="yes">Whether to display the list of Bills Due at startup.</property>
             <property name="halign">start</property>
             <property name="margin_left">12</property>
             <property name="use_underline">True</property>
@@ -300,16 +251,18 @@
           </object>
           <packing>
             <property name="left_attach">0</property>
-            <property name="top_attach">9</property>
+            <property name="top_attach">12</property>
           </packing>
         </child>
         <child>
-          <object class="GtkCheckButton" id="pref/dialogs.business.bill/auto-pay">
-            <property name="label" translatable="yes" comments="See the tooltip "At post time..." for details.">Pro_cess payments on posting</property>
+          <object class="GtkCheckButton" id="pref/dialogs.business.bill/tax-included">
+            <property name="label" translatable="yes">Ta_x included</property>
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="receives_default">False</property>
-            <property name="tooltip_text" translatable="yes">At post time, automatically attempt to pay vendor documents with outstanding pre-payments and counter documents. The pre-payments and documents obviously have to be against the same vendor. Counter documents are documents with opposite sign. For example for a bill, vendor credit notes and negative bills are considered counter documents.</property>
+            <property name="has_tooltip">True</property>
+            <property name="tooltip_markup">Whether tax is included by default in entries on Invoices. This setting is inherited by new customers and vendors.</property>
+            <property name="tooltip_text" translatable="yes">Whether tax is included by default in entries on Invoices. This setting is inherited by new customers and vendors.</property>
             <property name="halign">start</property>
             <property name="margin_left">12</property>
             <property name="use_underline">True</property>
@@ -317,16 +270,18 @@
           </object>
           <packing>
             <property name="left_attach">0</property>
-            <property name="top_attach">14</property>
+            <property name="top_attach">13</property>
           </packing>
         </child>
         <child>
-          <object class="GtkCheckButton" id="pref/dialogs.business.invoice/notify-when-due">
-            <property name="label" translatable="yes">Not_ify when due</property>
+          <object class="GtkCheckButton" id="pref/dialogs.business.bill/auto-pay">
+            <property name="label" translatable="yes" comments="See the tooltip "At post time..." for details.">Pro_cess payments on posting</property>
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="receives_default">False</property>
-            <property name="tooltip_markup" translatable="yes">Whether to display the list of Invoices Due at startup.</property>
+            <property name="has_tooltip">True</property>
+            <property name="tooltip_markup">At post time, automatically attempt to pay vendor documents with outstanding pre-payments and counter documents. The pre-payments and documents obviously have to be against the same vendor. Counter documents are documents with opposite sign. For example for a bill, vendor credit notes and negative bills are considered counter documents.</property>
+            <property name="tooltip_text" translatable="yes">At post time, automatically attempt to pay vendor documents with outstanding pre-payments and counter documents. The pre-payments and documents obviously have to be against the same vendor. Counter documents are documents with opposite sign. For example for a bill, vendor credit notes and negative bills are considered counter documents.</property>
             <property name="halign">start</property>
             <property name="margin_left">12</property>
             <property name="use_underline">True</property>
@@ -334,14 +289,66 @@
           </object>
           <packing>
             <property name="left_attach">0</property>
-            <property name="top_attach">6</property>
+            <property name="top_attach">14</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">_Days in advance:</property>
+            <property name="use_underline">True</property>
+            <property name="mnemonic_widget">pref/dialogs.business.bill/days-in-advance</property>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="top_attach">12</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkSpinButton" id="pref/dialogs.business.bill/days-in-advance">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="has_tooltip">True</property>
+            <property name="tooltip_markup">How many days in the future to warn about Bills coming due.</property>
+            <property name="tooltip_text" translatable="yes">How many days in the future to warn about Bills coming due.</property>
+            <property name="adjustment">days_in_adj</property>
+            <property name="climb_rate">1</property>
+          </object>
+          <packing>
+            <property name="left_attach">2</property>
+            <property name="top_attach">12</property>
+            <property name="width">2</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkComboBox" id="pref/dialogs.business.invoice/invoice-printreport">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="has_tooltip">True</property>
+            <property name="tooltip_markup">The invoice report to be used for printing.</property>
+            <property name="tooltip_text" translatable="yes">The invoice report to be used for printing.</property>
+            <property name="model">liststore_printinvoice</property>
+            <child>
+              <object class="GtkCellRendererText" id="cellrenderertext2"/>
+              <attributes>
+                <attribute name="text">0</attribute>
+              </attributes>
+            </child>
+          </object>
+          <packing>
+            <property name="left_attach">1</property>
+            <property name="top_attach">7</property>
+            <property name="width">3</property>
           </packing>
         </child>
         <child>
           <object class="GtkSpinButton" id="pref/dialogs.business.invoice/days-in-advance">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
-            <property name="tooltip_markup" translatable="yes">How many days in the future to warn about Bills coming due.</property>
+            <property name="has_tooltip">True</property>
+            <property name="tooltip_markup">How many days in the future to warn about Invoices coming due.</property>
+            <property name="tooltip_text" translatable="yes">How many days in the future to warn about Invoices coming due.</property>
             <property name="adjustment">cust_days_in_adj</property>
           </object>
           <packing>
@@ -351,7 +358,7 @@
           </packing>
         </child>
         <child>
-          <object class="GtkLabel" id="label3">
+          <object class="GtkLabel">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <property name="label" translatable="yes">_Days in advance:</property>
@@ -471,9 +478,6 @@
         <child>
           <placeholder/>
         </child>
-        <child>
-          <placeholder/>
-        </child>
       </object>
     </child>
   </object>
diff --git a/gnucash/gtkbuilder/dialog-preferences.glade b/gnucash/gtkbuilder/dialog-preferences.glade
index 9d0636546..939bcdc0e 100644
--- a/gnucash/gtkbuilder/dialog-preferences.glade
+++ b/gnucash/gtkbuilder/dialog-preferences.glade
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.20.2 -->
+<!-- Generated with glade 3.22.1 -->
 <interface>
   <requires lib="gtk+" version="3.10"/>
   <object class="GtkAdjustment" id="auto_decimal_places_adj">
@@ -105,6 +105,9 @@
     <property name="default_height">400</property>
     <property name="type_hint">normal</property>
     <signal name="response" handler="gnc_preferences_response_cb" swapped="no"/>
+    <child>
+      <placeholder/>
+    </child>
     <child internal-child="vbox">
       <object class="GtkBox" id="dialog-vbox2">
         <property name="visible">True</property>
@@ -2008,7 +2011,7 @@ many months before the current month:</property>
                 <property name="border_width">6</property>
                 <property name="column_spacing">12</property>
                 <child>
-                  <object class="GtkLabel" id="label56">
+                  <object class="GtkLabel">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="halign">start</property>
@@ -2040,56 +2043,64 @@ many months before the current month:</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkLabel" id="label66">
+                  <object class="GtkCheckButton" id="pref/general.register/auto-raise-lists">
+                    <property name="label" translatable="yes">_Auto-raise lists</property>
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="has_tooltip">True</property>
+                    <property name="tooltip_markup">Automatically raise the list of accounts or actions during input.</property>
+                    <property name="tooltip_text" translatable="yes">Automatically raise the list of accounts or actions during input.</property>
+                    <property name="halign">start</property>
+                    <property name="margin_left">12</property>
+                    <property name="use_underline">True</property>
+                    <property name="draw_indicator">True</property>
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
-                    <property name="top_attach">3</property>
+                    <property name="top_attach">2</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkCheckButton" id="pref/general.register/auto-raise-lists">
-                    <property name="label" translatable="yes">_Auto-raise lists</property>
+                  <object class="GtkCheckButton" id="pref/general.register/tab-to-transfer-on-memorised">
+                    <property name="label" translatable="yes">Tab order in_cludes Transfer on Memorised Transactions</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
                     <property name="has_tooltip">True</property>
-                    <property name="tooltip_markup">Automatically raise the list of accounts or actions during input.</property>
-                    <property name="tooltip_text" translatable="yes">Automatically raise the list of accounts or actions during input.</property>
+                    <property name="tooltip_markup">Move to Transfer field when memorised transaction auto filled.</property>
+                    <property name="tooltip_text" translatable="yes">Move to Transfer field when memorised transaction auto filled.</property>
                     <property name="halign">start</property>
                     <property name="margin_left">12</property>
                     <property name="use_underline">True</property>
-                    <property name="active">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
-                    <property name="top_attach">2</property>
+                    <property name="top_attach">3</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkLabel" id="label75">
+                  <object class="GtkLabel">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="halign">start</property>
-                    <property name="label" translatable="yes"><b>Reconciling</b></property>
-                    <property name="use_markup">True</property>
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
-                    <property name="top_attach">5</property>
+                    <property name="top_attach">4</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkLabel" id="label76">
+                  <object class="GtkLabel">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
+                    <property name="halign">start</property>
+                    <property name="label" translatable="yes"><b>Reconciling</b></property>
+                    <property name="use_markup">True</property>
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
-                    <property name="top_attach">10</property>
+                    <property name="top_attach">5</property>
                   </packing>
                 </child>
                 <child>
@@ -2169,56 +2180,56 @@ many months before the current month:</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkCheckButton" id="pref/general.register/draw-vertical-lines">
-                    <property name="label" translatable="yes">Draw _vertical lines between columns</property>
+                  <object class="GtkLabel">
                     <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="has_tooltip">True</property>
-                    <property name="tooltip_markup">Show vertical borders on the cells.</property>
-                    <property name="tooltip_text" translatable="yes">Show vertical borders on the cells.</property>
-                    <property name="halign">start</property>
-                    <property name="margin_left">12</property>
-                    <property name="use_underline">True</property>
-                    <property name="draw_indicator">True</property>
+                    <property name="can_focus">False</property>
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
-                    <property name="top_attach">15</property>
+                    <property name="top_attach">10</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkLabel" id="label46">
+                  <object class="GtkLabel">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
+                    <property name="halign">start</property>
+                    <property name="label" translatable="yes"><b>Graphics</b></property>
+                    <property name="use_markup">True</property>
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
-                    <property name="top_attach">16</property>
+                    <property name="top_attach">11</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkLabel" id="label47">
+                  <object class="GtkCheckButton" id="pref/general.register/use-gnucash-color-theme">
+                    <property name="label" translatable="yes">_Use GnuCash built-in color theme</property>
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="has_tooltip">True</property>
+                    <property name="tooltip_markup">GnuCash uses a yellow/green theme by default for register windows. Uncheck this if you want to use the system color theme instead.</property>
+                    <property name="tooltip_text" translatable="yes">GnuCash uses a yellow/green theme by default for register windows. Uncheck this if you want to use the system color theme instead.</property>
                     <property name="halign">start</property>
-                    <property name="label" translatable="yes"><b>Layout</b></property>
-                    <property name="use_markup">True</property>
+                    <property name="margin_left">12</property>
+                    <property name="use_underline">True</property>
+                    <property name="draw_indicator">True</property>
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
-                    <property name="top_attach">17</property>
+                    <property name="top_attach">12</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkCheckButton" id="pref/general.register/future-after-blank-transaction">
-                    <property name="label" translatable="yes">_Future transactions after blank transaction</property>
+                  <object class="GtkCheckButton" id="pref/general.register/alternate-color-by-transaction">
+                    <property name="label" translatable="yes">Double _mode colors alternate with transactions</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
                     <property name="has_tooltip">True</property>
-                    <property name="tooltip_markup">If checked, transactions with a date in the future will be displayed at the bottom of the register after the blank transaction. If clear, the blank transaction will be at the bottom of the register after all transactions.</property>
-                    <property name="tooltip_text" translatable="yes">If checked, transactions with a date in the future will be displayed at the bottom of the register after the blank transaction. If clear, the blank transaction will be at the bottom of the register after all transactions.</property>
+                    <property name="tooltip_markup">Alternate the primary and secondary colors by transaction instead of by alternating by row.</property>
+                    <property name="tooltip_text" translatable="yes">Alternate the primary and secondary colors by transaction instead of by alternating by row.</property>
                     <property name="halign">start</property>
                     <property name="margin_left">12</property>
                     <property name="use_underline">True</property>
@@ -2226,7 +2237,7 @@ many months before the current month:</property>
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
-                    <property name="top_attach">18</property>
+                    <property name="top_attach">13</property>
                   </packing>
                 </child>
                 <child>
@@ -2249,14 +2260,14 @@ many months before the current month:</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkCheckButton" id="pref/general.register/alternate-color-by-transaction">
-                    <property name="label" translatable="yes">Double _mode colors alternate with transactions</property>
+                  <object class="GtkCheckButton" id="pref/general.register/draw-vertical-lines">
+                    <property name="label" translatable="yes">Draw _vertical lines between columns</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
                     <property name="has_tooltip">True</property>
-                    <property name="tooltip_markup">Alternate the primary and secondary colors by transaction instead of by alternating by row.</property>
-                    <property name="tooltip_text" translatable="yes">Alternate the primary and secondary colors by transaction instead of by alternating by row.</property>
+                    <property name="tooltip_markup">Show vertical borders on the cells.</property>
+                    <property name="tooltip_text" translatable="yes">Show vertical borders on the cells.</property>
                     <property name="halign">start</property>
                     <property name="margin_left">12</property>
                     <property name="use_underline">True</property>
@@ -2264,69 +2275,49 @@ many months before the current month:</property>
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
-                    <property name="top_attach">13</property>
+                    <property name="top_attach">15</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkCheckButton" id="pref/general.register/use-gnucash-color-theme">
-                    <property name="label" translatable="yes">_Use GnuCash built-in color theme</property>
+                  <object class="GtkLabel">
                     <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="has_tooltip">True</property>
-                    <property name="tooltip_markup">GnuCash uses a yellow/green theme by default for register windows. Uncheck this if you want to use the system color theme instead.</property>
-                    <property name="tooltip_text" translatable="yes">GnuCash uses a yellow/green theme by default for register windows. Uncheck this if you want to use the system color theme instead.</property>
-                    <property name="halign">start</property>
-                    <property name="margin_left">12</property>
-                    <property name="use_underline">True</property>
-                    <property name="draw_indicator">True</property>
+                    <property name="can_focus">False</property>
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
-                    <property name="top_attach">12</property>
+                    <property name="top_attach">16</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkLabel" id="label45">
+                  <object class="GtkLabel">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="halign">start</property>
-                    <property name="label" translatable="yes"><b>Graphics</b></property>
+                    <property name="label" translatable="yes"><b>Layout</b></property>
                     <property name="use_markup">True</property>
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
-                    <property name="top_attach">11</property>
+                    <property name="top_attach">17</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkCheckButton" id="pref/general.register/tab-to-transfer-on-memorised">
-                    <property name="label" translatable="yes">Tab order in_cludes Transfer on Memorised Transactions</property>
+                  <object class="GtkCheckButton" id="pref/general.register/future-after-blank-transaction">
+                    <property name="label" translatable="yes">_Future transactions after blank transaction</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
                     <property name="has_tooltip">True</property>
-                    <property name="tooltip_markup">Move to Transfer field when memorised transaction auto filled.</property>
-                    <property name="tooltip_text" translatable="yes">Move to Transfer field when memorised transaction auto filled.</property>
+                    <property name="tooltip_markup">If checked, transactions with a date in the future will be displayed at the bottom of the register after the blank transaction. If clear, the blank transaction will be at the bottom of the register after all transactions.</property>
+                    <property name="tooltip_text" translatable="yes">If checked, transactions with a date in the future will be displayed at the bottom of the register after the blank transaction. If clear, the blank transaction will be at the bottom of the register after all transactions.</property>
                     <property name="halign">start</property>
                     <property name="margin_left">12</property>
                     <property name="use_underline">True</property>
-                    <property name="active">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
-                    <property name="top_attach">3</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="label121">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                  </object>
-                  <packing>
-                    <property name="left_attach">0</property>
-                    <property name="top_attach">4</property>
+                    <property name="top_attach">18</property>
                   </packing>
                 </child>
               </object>
@@ -2847,7 +2838,7 @@ many months before the current month:</property>
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
-                    <property name="top_attach">6</property>
+                    <property name="top_attach">7</property>
                   </packing>
                 </child>
                 <child>
@@ -2873,7 +2864,17 @@ many months before the current month:</property>
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
-                    <property name="top_attach">7</property>
+                    <property name="top_attach">8</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">6</property>
                   </packing>
                 </child>
                 <child>
@@ -2894,6 +2895,9 @@ many months before the current month:</property>
                 <child>
                   <placeholder/>
                 </child>
+                <child>
+                  <placeholder/>
+                </child>
               </object>
               <packing>
                 <property name="position">7</property>
@@ -3338,8 +3342,5 @@ many months before the current month:</property>
       <action-widget response="-11">helpbutton2</action-widget>
       <action-widget response="-7">closebutton2</action-widget>
     </action-widgets>
-    <child>
-      <placeholder/>
-    </child>
   </object>
 </interface>

commit 38dfc6ecd201bdf3628a27ff2d007bcf6aff295c
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Fri May 3 11:37:42 2019 +0100

    Use the commodity on selected parent rows in price tree view
    
    If the parent row for prices in a price tree view is used for a new
    price the security value can be wrong so get the commodity of this row
    and use it for a temporary price which is cloned for editing.

diff --git a/gnucash/gnome-utils/gnc-tree-view-price.c b/gnucash/gnome-utils/gnc-tree-view-price.c
index 35df37e7f..90e7c51b4 100644
--- a/gnucash/gnome-utils/gnc-tree-view-price.c
+++ b/gnucash/gnome-utils/gnc-tree-view-price.c
@@ -766,7 +766,7 @@ get_selected_prices_helper (GtkTreeModel *s_model,
 }
 
 /*
- * Given an price tree view, return a list of the selected commodities. The
+ * Given a price tree view, return a list of the selected prices. The
  * price tree must be in multiple selection mode.
  *
  * Note: It is the responsibility of the caller to free the returned
@@ -782,3 +782,47 @@ gnc_tree_view_price_get_selected_prices (GncTreeViewPrice *view)
     gtk_tree_selection_selected_foreach(selection, get_selected_prices_helper, &return_list);
     return return_list;
 }
+
+static void
+get_selected_commodity_helper (GtkTreeModel *s_model,
+                               GtkTreePath *s_path,
+                               GtkTreeIter *s_iter,
+                               gpointer data)
+{
+    GList **return_list = data;
+    GtkTreeModel *model, *f_model;
+    GtkTreeIter iter, f_iter;
+    gnc_commodity *commodity;
+
+    gtk_tree_model_sort_convert_iter_to_child_iter (GTK_TREE_MODEL_SORT (s_model),
+            &f_iter, s_iter);
+
+    f_model = gtk_tree_model_sort_get_model(GTK_TREE_MODEL_SORT(s_model));
+    gtk_tree_model_filter_convert_iter_to_child_iter (GTK_TREE_MODEL_FILTER (f_model),
+            &iter, &f_iter);
+
+    model = gtk_tree_model_filter_get_model(GTK_TREE_MODEL_FILTER(f_model));
+    commodity = gnc_tree_model_price_get_commodity (GNC_TREE_MODEL_PRICE(model), &iter);
+
+    if (commodity)
+        *return_list = g_list_append(*return_list, commodity);
+}
+
+/*
+ * Given a price tree view, return a list of the selected rows that have
+ * commodities but are not prices, the parent rows for prices. The
+ * price tree must be in multiple selection mode.
+ *
+ * Note: It is the responsibility of the caller to free the returned
+ * list.
+ */
+GList *
+gnc_tree_view_price_get_selected_commodities (GncTreeViewPrice *view)
+{
+    GtkTreeSelection *selection;
+    GList *return_list = NULL;
+
+    selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(view));
+    gtk_tree_selection_selected_foreach (selection, get_selected_commodity_helper, &return_list);
+    return return_list;
+}
diff --git a/gnucash/gnome-utils/gnc-tree-view-price.h b/gnucash/gnome-utils/gnc-tree-view-price.h
index 1f7cd9f75..d61a0dcf7 100644
--- a/gnucash/gnome-utils/gnc-tree-view-price.h
+++ b/gnucash/gnome-utils/gnc-tree-view-price.h
@@ -208,6 +208,19 @@ void gnc_tree_view_price_set_selected_price (GncTreeViewPrice *view,
 GList * gnc_tree_view_price_get_selected_prices (GncTreeViewPrice *view);
 
 
+/** This function returns a list of commodities associated with the
+ *  selected rows that are not prices but are the parent rows for
+ *  prices in the price tree view.
+ *
+ *  @note It only makes sense to call this function when the price
+ *  tree is set to select multiple items.
+ *
+ *  @param view A pointer to an price tree view.
+ *
+ *  @return A list of commodities, or NULL if no commodity was selected.
+ */
+GList * gnc_tree_view_price_get_selected_commodities (GncTreeViewPrice *view);
+
 /** @} */
 
 G_END_DECLS
diff --git a/gnucash/gnome/dialog-price-edit-db.c b/gnucash/gnome/dialog-price-edit-db.c
index 29586d9c0..3936e5e59 100644
--- a/gnucash/gnome/dialog-price-edit-db.c
+++ b/gnucash/gnome/dialog-price-edit-db.c
@@ -353,6 +353,8 @@ selection_changed_cb (GtkTreeSelection *selection, gpointer data)
     gboolean have_rows = (g_list_length (rows) > 0 ? TRUE : FALSE);
 
     change_source_flag (PRICE_REMOVE_SOURCE_COMM, have_rows, pdb_dialog);
+    g_list_foreach (rows, (GFunc) gtk_tree_path_free, NULL);
+    g_list_free (rows);
 }
 
 static GDate
@@ -513,16 +515,33 @@ gnc_prices_dialog_add_clicked (GtkWidget *widget, gpointer data)
     PricesDialog *pdb_dialog = data;
     GNCPrice *price = NULL;
     GList *price_list;
+    GList *comm_list;
+    gboolean unref_price = FALSE;
 
     ENTER(" ");
-    price_list = gnc_tree_view_price_get_selected_prices(pdb_dialog->price_tree);
-    if (price_list)
+    price_list = gnc_tree_view_price_get_selected_prices (pdb_dialog->price_tree);
+    comm_list = gnc_tree_view_price_get_selected_commodities (pdb_dialog->price_tree);
+
+    if (price_list) // selected row is on a price
     {
         price = price_list->data;
-        g_list_free(price_list);
+        g_list_free (price_list);
+    }
+    else if (comm_list) // selection contains price parent rows
+    {
+        if (g_list_length (comm_list) == 1) // make sure it is only one parent
+        {
+            price = gnc_price_create (pdb_dialog->book);
+            gnc_price_set_commodity (price, comm_list->data);
+            unref_price = TRUE;
+        }
+        g_list_free (comm_list);
     }
     gnc_price_edit_dialog (pdb_dialog->window, pdb_dialog->session,
                            price, GNC_PRICE_NEW);
+
+    if (unref_price)
+        gnc_price_unref (price);
     LEAVE(" ");
 }
 
@@ -570,12 +589,25 @@ gnc_prices_dialog_selection_changed (GtkTreeSelection *treeselection,
                                      gpointer data)
 {
     PricesDialog *pdb_dialog = data;
+    GtkTreeModel *model;
     GList *price_list;
+    GList *rows;
     gint length;
 
     ENTER(" ");
-    price_list = gnc_tree_view_price_get_selected_prices(pdb_dialog->price_tree);
-    length = g_list_length(price_list);
+    price_list = gnc_tree_view_price_get_selected_prices (pdb_dialog->price_tree);
+    length = g_list_length (price_list);
+    g_list_free (price_list);
+
+    model = gtk_tree_view_get_model (GTK_TREE_VIEW(pdb_dialog->price_tree));
+    rows = gtk_tree_selection_get_selected_rows (treeselection, &model);
+
+    // if selected rows greater than length, parents must of been selected also
+    if (g_list_length (rows) > length)
+        length = 0;
+
+    g_list_foreach (rows, (GFunc) gtk_tree_path_free, NULL);
+    g_list_free (rows);
 
     gtk_widget_set_sensitive (pdb_dialog->edit_button,
                               length == 1);

commit c782e7a4da1b88d36a6a6a3d99e5d4df10e8ee04
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Fri May 3 11:31:26 2019 +0100

    Bug 797051 - Follow up - Change defaults for new price
    
    Set the default date of a new price to today and the value to 0

diff --git a/gnucash/gnome/dialog-price-editor.c b/gnucash/gnome/dialog-price-editor.c
index 5b88992f4..202c7df66 100644
--- a/gnucash/gnome/dialog-price-editor.c
+++ b/gnucash/gnome/dialog-price-editor.c
@@ -618,9 +618,10 @@ gnc_price_edit_dialog (GtkWidget * parent,
         if (price)
         {
             price = gnc_price_clone(price, pedit_dialog->book);
-//  } else {
-//      price = gnc_price_create (pedit_dialog->book);
+
             gnc_price_set_source (price, PRICE_SOURCE_EDIT_DLG);
+            gnc_price_set_time64 (price, gnc_time (NULL));
+            gnc_price_set_value (price, gnc_numeric_zero ());
         }
 
         pedit_dialog->is_new = TRUE;



Summary of changes:
 gnucash/gnome-utils/gnc-tree-view-price.c   |  46 ++++-
 gnucash/gnome-utils/gnc-tree-view-price.h   |  13 ++
 gnucash/gnome/dialog-price-edit-db.c        |  42 ++++-
 gnucash/gnome/dialog-price-editor.c         |   5 +-
 gnucash/gtkbuilder/business-prefs.glade     | 260 ++++++++++++++--------------
 gnucash/gtkbuilder/dialog-preferences.glade | 167 +++++++++---------
 6 files changed, 314 insertions(+), 219 deletions(-)



More information about the gnucash-changes mailing list