gnucash master: Multiple changes pushed
Christopher Lam
clam at code.gnucash.org
Tue Feb 21 10:33:16 EST 2023
Updated via https://github.com/Gnucash/gnucash/commit/03871c55 (commit)
via https://github.com/Gnucash/gnucash/commit/f170d1d5 (commit)
via https://github.com/Gnucash/gnucash/commit/016f82cf (commit)
from https://github.com/Gnucash/gnucash/commit/08de175e (commit)
commit 03871c55cf5b9f9824254a4c2fd528752db8f0bd
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Sun Feb 19 13:37:49 2023 +0800
[dialog-employee] toggle sensitivity instead of visibility of GncAccountSel
diff --git a/gnucash/gnome/dialog-employee.c b/gnucash/gnome/dialog-employee.c
index 2b8d68899..47d0c4d47 100644
--- a/gnucash/gnome/dialog-employee.c
+++ b/gnucash/gnome/dialog-employee.c
@@ -26,6 +26,8 @@
#include <gtk/gtk.h>
#include <glib/gi18n.h>
+#include <stdbool.h>
+
#include "dialog-utils.h"
#include "gnc-amount-edit.h"
#include "gnc-currency-edit.h"
@@ -311,16 +313,8 @@ gnc_employee_ccard_acct_toggled_cb (GtkToggleButton *button, gpointer data)
if (!ew)
return;
- if (gtk_toggle_button_get_active (button))
- {
- gtk_widget_set_sensitive (ew->ccard_acct_sel, TRUE);
- gtk_widget_show (ew->ccard_acct_sel);
- }
- else
- {
- gtk_widget_set_sensitive (ew->ccard_acct_sel, TRUE);
- gtk_widget_hide (ew->ccard_acct_sel);
- }
+ bool active = gtk_toggle_button_get_active (button);
+ gtk_widget_set_sensitive (ew->ccard_acct_sel, active);
}
static void
@@ -568,9 +562,6 @@ gnc_employee_new_window (GtkWindow *parent,
gtk_widget_show_all (ew->dialog);
- if (ccard_acct == NULL)
- gtk_widget_hide (ew->ccard_acct_sel);
-
g_object_unref(G_OBJECT(builder));
return ew;
commit f170d1d54c2e85ceb81ca6842d55b21914f8f6ed
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Sun Feb 19 13:35:48 2023 +0800
[dialog-customer|employee|vendor] combine GtkCheckButton with label
UX: increase the target area for click.
Also move GtkCheckButton to left-column and its dependent GtkWidget to
right-column.
diff --git a/gnucash/gtkbuilder/dialog-customer.glade b/gnucash/gtkbuilder/dialog-customer.glade
index 2c21ed009..9775087e1 100644
--- a/gnucash/gtkbuilder/dialog-customer.glade
+++ b/gnucash/gtkbuilder/dialog-customer.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="GtkListStore" id="tax_included_store">
@@ -153,6 +153,7 @@
</child>
<child>
<object class="GtkCheckButton" id="active_check">
+ <property name="label" translatable="yes">Active</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
@@ -194,16 +195,7 @@
</packing>
</child>
<child>
- <object class="GtkLabel">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="halign">end</property>
- <property name="label" translatable="yes">Active</property>
- </object>
- <packing>
- <property name="left-attach">0</property>
- <property name="top-attach">2</property>
- </packing>
+ <placeholder/>
</child>
</object>
</child>
@@ -571,67 +563,6 @@
<property name="top-attach">4</property>
</packing>
</child>
- <child>
- <object class="GtkLabel" id="label35">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="halign">end</property>
- <property name="label" translatable="yes">Tax Table</property>
- <property name="justify">right</property>
- </object>
- <packing>
- <property name="left-attach">0</property>
- <property name="top-attach">5</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox" id="hbox7">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="hexpand">True</property>
- <child>
- <object class="GtkCheckButton" id="taxtable_button">
- <property name="visible">True</property>
- <property name="can-focus">True</property>
- <property name="receives-default">False</property>
- <property name="tooltip-text" translatable="yes">Override the global Tax Table?</property>
- <property name="halign">start</property>
- <property name="margin-end">6</property>
- <property name="use-underline">True</property>
- <property name="draw-indicator">True</property>
- <signal name="toggled" handler="gnc_customer_taxtable_check_cb" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="taxtable_menu">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="model">taxtable_store</property>
- <signal name="changed" handler="gnc_customer_taxtable_changed_cb" swapped="no"/>
- <child>
- <object class="GtkCellRendererText" id="taxtable_cell_renderer_text"/>
- <attributes>
- <attribute name="text">0</attribute>
- </attributes>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="left-attach">1</property>
- <property name="top-attach">5</property>
- </packing>
- </child>
<child>
<object class="GtkComboBox" id="tax_included_menu">
<property name="visible">True</property>
@@ -712,6 +643,42 @@
<property name="top-attach">2</property>
</packing>
</child>
+ <child>
+ <object class="GtkCheckButton" id="taxtable_button">
+ <property name="label" translatable="yes">Tax Table</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="tooltip-text" translatable="yes">Override the global Tax Table?</property>
+ <property name="halign">start</property>
+ <property name="margin-end">6</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ <signal name="toggled" handler="gnc_customer_taxtable_check_cb" swapped="no"/>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">5</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="taxtable_menu">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="model">taxtable_store</property>
+ <signal name="changed" handler="gnc_customer_taxtable_changed_cb" swapped="no"/>
+ <child>
+ <object class="GtkCellRendererText" id="taxtable_cell_renderer_text"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ <packing>
+ <property name="left-attach">1</property>
+ <property name="top-attach">5</property>
+ </packing>
+ </child>
</object>
</child>
<child type="label">
diff --git a/gnucash/gtkbuilder/dialog-employee.glade b/gnucash/gtkbuilder/dialog-employee.glade
index ec3fd6a83..db938b240 100644
--- a/gnucash/gtkbuilder/dialog-employee.glade
+++ b/gnucash/gtkbuilder/dialog-employee.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="GtkDialog" id="employee_dialog">
@@ -129,6 +129,7 @@
</child>
<child>
<object class="GtkCheckButton" id="active_check">
+ <property name="label" translatable="yes">Active</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
@@ -178,16 +179,7 @@
</packing>
</child>
<child>
- <object class="GtkLabel">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="halign">end</property>
- <property name="label" translatable="yes">Active</property>
- </object>
- <packing>
- <property name="left-attach">0</property>
- <property name="top-attach">2</property>
- </packing>
+ <placeholder/>
</child>
</object>
</child>
@@ -619,43 +611,32 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="label39">
+ <object class="GtkBox" id="ccard_acct_hbox">
<property name="visible">True</property>
<property name="can-focus">False</property>
- <property name="halign">end</property>
- <property name="label" translatable="yes">Credit Account</property>
- <property name="justify">right</property>
+ <property name="hexpand">True</property>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
- <property name="left-attach">0</property>
+ <property name="left-attach">1</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
- <object class="GtkBox" id="ccard_acct_hbox">
+ <object class="GtkCheckButton" id="ccard_check">
+ <property name="label" translatable="yes">Credit Account</property>
<property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="hexpand">True</property>
- <child>
- <object class="GtkCheckButton" id="ccard_check">
- <property name="visible">True</property>
- <property name="can-focus">True</property>
- <property name="receives-default">False</property>
- <property name="halign">start</property>
- <property name="use-underline">True</property>
- <property name="draw-indicator">True</property>
- <signal name="toggled" handler="gnc_employee_ccard_acct_toggled_cb" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="padding">2</property>
- <property name="position">0</property>
- </packing>
- </child>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="halign">start</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ <signal name="toggled" handler="gnc_employee_ccard_acct_toggled_cb" swapped="no"/>
</object>
<packing>
- <property name="left-attach">1</property>
+ <property name="left-attach">0</property>
<property name="top-attach">3</property>
</packing>
</child>
diff --git a/gnucash/gtkbuilder/dialog-vendor.glade b/gnucash/gtkbuilder/dialog-vendor.glade
index 842558b2d..58aff39d6 100644
--- a/gnucash/gtkbuilder/dialog-vendor.glade
+++ b/gnucash/gtkbuilder/dialog-vendor.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="GtkListStore" id="tax_included_store">
@@ -182,6 +182,7 @@
</child>
<child>
<object class="GtkCheckButton" id="active_check">
+ <property name="label" translatable="yes">Active</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
@@ -196,16 +197,7 @@
</packing>
</child>
<child>
- <object class="GtkLabel">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="halign">end</property>
- <property name="label" translatable="yes">Active</property>
- </object>
- <packing>
- <property name="left-attach">0</property>
- <property name="top-attach">2</property>
- </packing>
+ <placeholder/>
</child>
</object>
</child>
@@ -541,19 +533,6 @@
<property name="top-attach">2</property>
</packing>
</child>
- <child>
- <object class="GtkLabel" id="label35">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="halign">end</property>
- <property name="label" translatable="yes">Tax Table</property>
- <property name="justify">right</property>
- </object>
- <packing>
- <property name="left-attach">0</property>
- <property name="top-attach">3</property>
- </packing>
- </child>
<child>
<object class="GtkComboBox" id="terms_menu">
<property name="visible">True</property>
@@ -607,46 +586,34 @@
</packing>
</child>
<child>
- <object class="GtkBox" id="hbox7">
+ <object class="GtkCheckButton" id="taxtable_button">
+ <property name="label" translatable="yes">Tax Table</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="tooltip-text" translatable="yes">Override the global Tax Table?</property>
+ <property name="halign">start</property>
+ <property name="margin-end">6</property>
+ <property name="use-underline">True</property>
+ <property name="draw-indicator">True</property>
+ <signal name="toggled" handler="gnc_vendor_taxtable_check_cb" swapped="no"/>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="taxtable_menu">
<property name="visible">True</property>
<property name="can-focus">False</property>
- <property name="hexpand">True</property>
+ <property name="model">taxtable_store</property>
+ <signal name="changed" handler="gnc_vendor_taxtable_changed_cb" swapped="no"/>
<child>
- <object class="GtkCheckButton" id="taxtable_button">
- <property name="visible">True</property>
- <property name="can-focus">True</property>
- <property name="receives-default">False</property>
- <property name="tooltip-text" translatable="yes">Override the global Tax Table?</property>
- <property name="halign">start</property>
- <property name="margin-end">6</property>
- <property name="use-underline">True</property>
- <property name="draw-indicator">True</property>
- <signal name="toggled" handler="gnc_vendor_taxtable_check_cb" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="taxtable_menu">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="model">taxtable_store</property>
- <signal name="changed" handler="gnc_vendor_taxtable_changed_cb" swapped="no"/>
- <child>
- <object class="GtkCellRendererText" id="taxtable_cell_renderer_text"/>
- <attributes>
- <attribute name="text">0</attribute>
- </attributes>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
+ <object class="GtkCellRendererText" id="taxtable_cell_renderer_text"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
</child>
</object>
<packing>
commit 016f82cf8bf601da7f3ffda55d6bab77aed58a2d
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Sun Feb 19 22:51:27 2023 +0800
[eguile-utilities.scm] remove fmtnumber
deprecated in maint.
diff --git a/gnucash/report/eguile-utilities.scm b/gnucash/report/eguile-utilities.scm
index f25bd2baf..c75a78487 100644
--- a/gnucash/report/eguile-utilities.scm
+++ b/gnucash/report/eguile-utilities.scm
@@ -33,11 +33,6 @@
(use-modules (gnucash core-utils))
(use-modules (gnucash report))
-(define-public (fmtnumber n)
- (issue-deprecation-warning "fmtnumber is deprecated")
- ;; Format a number (integer or real) into something printable
- (number->string (if (integer? n) (inexact->exact n) n)))
-
;; Format gnc-numeric n with decimal places, or exact fraction
(define-public fmtnumeric
(lambda (n) (xaccPrintAmount n (gnc-default-print-info #f))))
Summary of changes:
gnucash/gnome/dialog-employee.c | 17 ++---
gnucash/gtkbuilder/dialog-customer.glade | 111 +++++++++++--------------------
gnucash/gtkbuilder/dialog-employee.glade | 55 +++++----------
gnucash/gtkbuilder/dialog-vendor.glade | 89 ++++++++-----------------
gnucash/report/eguile-utilities.scm | 5 --
5 files changed, 89 insertions(+), 188 deletions(-)
More information about the gnucash-changes
mailing list