gnucash maint: Multiple changes pushed

Christopher Lam clam at code.gnucash.org
Sun May 16 20:03:05 EDT 2021


Updated	 via  https://github.com/Gnucash/gnucash/commit/c3dc3433 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/22558542 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/f49cd4b1 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/44f0413d (commit)
	from  https://github.com/Gnucash/gnucash/commit/4400493a (commit)



commit c3dc34330d88bf0d20de0304e7f15ff19c9214cc
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Mon May 17 07:55:53 2021 +0800

    [html-chart.scm] don't use define-public
    
    push to standardize using define and export

diff --git a/gnucash/report/html-chart.scm b/gnucash/report/html-chart.scm
index 1844b871f..6750c51ed 100644
--- a/gnucash/report/html-chart.scm
+++ b/gnucash/report/html-chart.scm
@@ -53,7 +53,16 @@
 (export gnc:html-chart-set-currency-symbol!)
 (export gnc:html-chart-render)
 (export gnc:html-chart-set-custom-x-axis-ticks?!)
+(export gnc:html-chart-set-title!)
+(export gnc:html-chart-set-data-labels!)
+(export gnc:html-chart-set-axes-display!)
 (export gnc:html-chart-set-custom-y-axis-ticks?!)
+(export gnc:html-chart-clear-data-series!)
+(export gnc:html-chart-set-x-axis-label!)
+(export gnc:html-chart-set-stacking?!)
+(export gnc:html-chart-set-grid?!)
+(export gnc:html-chart-set-y-axis-label!)
+(export gnc:html-chart-add-data-series!)
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;
@@ -258,17 +267,16 @@
 (define (gnc:html-chart-title chart)
   (gnc:html-chart-get chart '(options title text)))
 
-(define-public (gnc:html-chart-set-title! chart title)
+(define (gnc:html-chart-set-title! chart title)
   (gnc:html-chart-set! chart '(options title text) title))
 
-(define-public (gnc:html-chart-set-data-labels! chart labels)
+(define (gnc:html-chart-set-data-labels! chart labels)
   (gnc:html-chart-set! chart '(data labels) labels))
 
-(define-public (gnc:html-chart-set-axes-display! chart display?)
+(define (gnc:html-chart-set-axes-display! chart display?)
   (gnc:html-chart-set! chart '(options scales xAxes (0) display) display?)
   (gnc:html-chart-set! chart '(options scales yAxes (0) display) display?))
 
-(export gnc:html-chart-add-data-series!)
 ;; e.g.:
 ;; (gnc:html-chart-add-data-series! chart "label" list-of-numbers color
 ;;  'fill #t
@@ -301,21 +309,21 @@
             (gnc:html-chart-set! chart '(data datasets) new-vec)))
       ((key val . rest) (loop rest (assq-set! newseries key (list-to-vec val)))))))
 
-(define-public (gnc:html-chart-clear-data-series! chart)
+(define (gnc:html-chart-clear-data-series! chart)
   (gnc:html-chart-set! chart '(data datasets) #()))
 
-(define-public (gnc:html-chart-set-x-axis-label! chart label)
+(define (gnc:html-chart-set-x-axis-label! chart label)
   (gnc:html-chart-set! chart '(options scales xAxes (0) scaleLabel labelString) label))
 
-(define-public (gnc:html-chart-set-stacking?! chart stack?)
+(define (gnc:html-chart-set-stacking?! chart stack?)
   (gnc:html-chart-set! chart '(options scales xAxes (0) stacked) stack?)
   (gnc:html-chart-set! chart '(options scales yAxes (0) stacked) stack?))
 
-(define-public (gnc:html-chart-set-grid?! chart grid?)
+(define (gnc:html-chart-set-grid?! chart grid?)
   (gnc:html-chart-set! chart '(options scales xAxes (0) gridLines display) grid?)
   (gnc:html-chart-set! chart '(options scales yAxes (0) gridLines display) grid?))
 
-(define-public (gnc:html-chart-set-y-axis-label! chart label)
+(define (gnc:html-chart-set-y-axis-label! chart label)
   (gnc:html-chart-set! chart '(options scales yAxes (0) scaleLabel labelString) label))
 
 (define (gnc:html-chart-get chart path)

commit 225585426fb5bb32b8b0c338ce584bb1b15fd71d
Merge: 4400493a7 f49cd4b17
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Mon May 17 07:37:43 2021 +0800

    Merge branch 'bug797787-pref' into maint


commit f49cd4b173cd9f821397b8097895f10e86eb4da8
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Sat May 8 14:36:04 2021 +0800

    Bug 797787 - Feature request: preference setting to open new tabs adjacent to currently active tab
    
    tests preference; if enabled then new tab inserted after current. if
    disabled then new tab is at the end.

diff --git a/gnucash/gnome-utils/gnc-main-window.c b/gnucash/gnome-utils/gnc-main-window.c
index e1d2a8d8f..f9ceea985 100644
--- a/gnucash/gnome-utils/gnc-main-window.c
+++ b/gnucash/gnome-utils/gnc-main-window.c
@@ -109,6 +109,7 @@ enum
 #define GNC_PREF_TAB_COLOR            "show-account-color-tabs"
 #define GNC_PREF_SAVE_CLOSE_EXPIRES   "save-on-close-expires"
 #define GNC_PREF_SAVE_CLOSE_WAIT_TIME "save-on-close-wait-time"
+#define GNC_PREF_TAB_OPEN_ADJACENT    "tab-open-adjacent"
 
 #define GNC_MAIN_WINDOW_NAME "GncMainWindow"
 
@@ -3015,7 +3016,10 @@ gnc_main_window_connect (GncMainWindow *window,
     page->window = GTK_WIDGET(window);
     priv = GNC_MAIN_WINDOW_GET_PRIVATE(window);
     notebook = GTK_NOTEBOOK (priv->notebook);
-    current_position = g_list_index (priv->installed_pages, priv->current_page) + 1;
+
+    if (gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL, GNC_PREF_TAB_OPEN_ADJACENT))
+        current_position = g_list_index (priv->installed_pages, priv->current_page) + 1;
+
     priv->installed_pages = g_list_insert (priv->installed_pages, page, current_position);
     priv->usage_order = g_list_prepend (priv->usage_order, page);
     gtk_notebook_insert_page_menu (notebook, page->notebook_page,

commit 44f0413d47b67b16c8ac11a59ec827e455e60eda
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Sat May 8 14:35:36 2021 +0800

    Bug 797787 add preference tab-open-adjacent

diff --git a/gnucash/gschemas/org.gnucash.gschema.xml.in b/gnucash/gschemas/org.gnucash.gschema.xml.in
index 8f1f808f8..7598dbaaf 100644
--- a/gnucash/gschemas/org.gnucash.gschema.xml.in
+++ b/gnucash/gschemas/org.gnucash.gschema.xml.in
@@ -130,6 +130,11 @@
       <summary>Width of notebook tabs</summary>
       <description>This key specifies the maximum width of notebook tabs. If the text in the tab is longer than this value (the test is approximate) then the tab label will have the middle cut and replaced with an ellipsis.</description>
     </key>
+    <key name="tab-open-adjacent" type="b">
+      <default>true</default>
+      <summary>Opens new tab adjacent to current tab instead of at the end</summary>
+      <description>If active, new tabs are opened adjacent to current tab. If inactive, the new tabs are opened instead at the end.</description>
+    </key>
     <key name="currency-choice-locale" type="b">
       <default>true</default>
       <summary>Use the system locale currency for all newly created accounts.</summary>
diff --git a/gnucash/gtkbuilder/dialog-preferences.glade b/gnucash/gtkbuilder/dialog-preferences.glade
index df512c2b9..3d78ab83b 100644
--- a/gnucash/gtkbuilder/dialog-preferences.glade
+++ b/gnucash/gtkbuilder/dialog-preferences.glade
@@ -3328,7 +3328,7 @@ many months before the current month</property>
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
-                    <property name="top_attach">5</property>
+                    <property name="top_attach">6</property>
                     <property name="width">2</property>
                   </packing>
                 </child>
@@ -3339,7 +3339,7 @@ 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>
@@ -3352,7 +3352,7 @@ many months before the current month</property>
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
-                    <property name="top_attach">8</property>
+                    <property name="top_attach">9</property>
                   </packing>
                 </child>
                 <child>
@@ -3371,7 +3371,7 @@ many months before the current month</property>
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
-                    <property name="top_attach">9</property>
+                    <property name="top_attach">10</property>
                   </packing>
                 </child>
                 <child>
@@ -3390,7 +3390,7 @@ many months before the current month</property>
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
-                    <property name="top_attach">10</property>
+                    <property name="top_attach">11</property>
                   </packing>
                 </child>
                 <child>
@@ -3409,7 +3409,7 @@ many months before the current month</property>
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
-                    <property name="top_attach">11</property>
+                    <property name="top_attach">12</property>
                   </packing>
                 </child>
                 <child>
@@ -3428,7 +3428,7 @@ many months before the current month</property>
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
-                    <property name="top_attach">12</property>
+                    <property name="top_attach">13</property>
                   </packing>
                 </child>
                 <child>
@@ -3441,7 +3441,7 @@ many months before the current month</property>
                   </object>
                   <packing>
                     <property name="left_attach">1</property>
-                    <property name="top_attach">8</property>
+                    <property name="top_attach">9</property>
                   </packing>
                 </child>
                 <child>
@@ -3460,7 +3460,7 @@ many months before the current month</property>
                   </object>
                   <packing>
                     <property name="left_attach">1</property>
-                    <property name="top_attach">9</property>
+                    <property name="top_attach">10</property>
                   </packing>
                 </child>
                 <child>
@@ -3479,7 +3479,7 @@ many months before the current month</property>
                   </object>
                   <packing>
                     <property name="left_attach">1</property>
-                    <property name="top_attach">10</property>
+                    <property name="top_attach">11</property>
                   </packing>
                 </child>
                 <child>
@@ -3565,7 +3565,7 @@ many months before the current month</property>
                   </object>
                   <packing>
                     <property name="left_attach">1</property>
-                    <property name="top_attach">6</property>
+                    <property name="top_attach">7</property>
                   </packing>
                 </child>
                 <child>
@@ -3579,7 +3579,26 @@ 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>
+                  <object class="GtkCheckButton" id="pref/general/tab-open-adjacent">
+                    <property name="label" translatable="yes">Open new tabs _adjacent to current tab</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="has_tooltip">True</property>
+                    <property name="tooltip_markup">Opens new tab adjacent to current tab instead of at the end</property>
+                    <property name="tooltip_text" translatable="yes">Opens new tab adjacent to current tab instead of at the end.</property>
+                    <property name="halign">start</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">5</property>
+                    <property name="width">2</property>
                   </packing>
                 </child>
                 <child>



Summary of changes:
 gnucash/gnome-utils/gnc-main-window.c       |  6 +++-
 gnucash/gschemas/org.gnucash.gschema.xml.in |  5 ++++
 gnucash/gtkbuilder/dialog-preferences.glade | 43 +++++++++++++++++++++--------
 gnucash/report/html-chart.scm               | 26 +++++++++++------
 4 files changed, 58 insertions(+), 22 deletions(-)



More information about the gnucash-changes mailing list