gnucash maint: Multiple changes pushed
Robert Fewell
bobit at code.gnucash.org
Fri Nov 6 08:24:58 EST 2020
Updated via https://github.com/Gnucash/gnucash/commit/bf9b2672 (commit)
via https://github.com/Gnucash/gnucash/commit/4b5202f5 (commit)
via https://github.com/Gnucash/gnucash/commit/17ced7eb (commit)
via https://github.com/Gnucash/gnucash/commit/65b7b8c4 (commit)
from https://github.com/Gnucash/gnucash/commit/afcf1765 (commit)
commit bf9b267266ca86fb86bead74d1febcf1a1408f5a
Author: Robert Fewell <14uBobIT at gmail.com>
Date: Fri Nov 6 13:22:39 2020 +0000
Change down arrow to align more with existing widgets
Instead of using the icon name 'go-down' use 'pan-down-symbolic'
diff --git a/borrowed/goffice/go-optionmenu.c b/borrowed/goffice/go-optionmenu.c
index 4e0ba1b65..a145e2d38 100644
--- a/borrowed/goffice/go-optionmenu.c
+++ b/borrowed/goffice/go-optionmenu.c
@@ -354,7 +354,7 @@ static void go_option_menu_init(GOOptionMenu *option_menu)
option_menu->button_label = GTK_LABEL(gtk_label_new(""));
gtk_box_pack_start(GTK_BOX(box), GTK_WIDGET(option_menu->button_label), FALSE, TRUE, 0);
- arrow = gtk_image_new_from_icon_name ("go-down", GTK_ICON_SIZE_BUTTON);
+ arrow = gtk_image_new_from_icon_name ("pan-down-symbolic", GTK_ICON_SIZE_BUTTON);
gtk_widget_set_margin_start (GTK_WIDGET(arrow), 5);
gtk_box_pack_end(GTK_BOX(box), arrow, FALSE, FALSE, 0);
diff --git a/gnucash/gnome-utils/gnc-cell-renderer-popup-entry.c b/gnucash/gnome-utils/gnc-cell-renderer-popup-entry.c
index 7d7f15e4f..84e385230 100644
--- a/gnucash/gnome-utils/gnc-cell-renderer-popup-entry.c
+++ b/gnucash/gnome-utils/gnc-cell-renderer-popup-entry.c
@@ -112,6 +112,7 @@ static void
gnc_popup_entry_init (GncPopupEntry *widget)
{
GtkWidget *arrow;
+ GtkStyleContext *context;
widget->editing_canceled = FALSE;
@@ -123,14 +124,17 @@ gnc_popup_entry_init (GncPopupEntry *widget)
gtk_entry_set_visibility (GTK_ENTRY(widget->entry), TRUE);
gtk_widget_show (widget->entry);
+ context = gtk_widget_get_style_context (widget->entry);
+ gtk_style_context_add_class (context, "combo");
+
widget->button = gtk_button_new ();
gtk_widget_show (widget->button);
- arrow = gtk_image_new_from_icon_name ("go-down", GTK_ICON_SIZE_BUTTON);
- gtk_widget_show (arrow);
+ context = gtk_widget_get_style_context (widget->button);
+ gtk_style_context_add_class (context, "combo");
- g_signal_connect (G_OBJECT(arrow), "draw",
- G_CALLBACK(gnc_draw_arrow_cb), GINT_TO_POINTER(1));
+ arrow = gtk_image_new_from_icon_name ("pan-down-symbolic", GTK_ICON_SIZE_BUTTON);
+ gtk_widget_show (arrow);
gtk_container_add (GTK_CONTAINER(widget->button), arrow);
@@ -144,6 +148,13 @@ gnc_popup_entry_init (GncPopupEntry *widget)
gtk_widget_add_events (GTK_WIDGET(widget), GDK_KEY_RELEASE_MASK);
}
+static void
+gpw_grab_focus (GtkWidget *box)
+{
+ GncPopupEntry *widget = GNC_POPUP_ENTRY(box);
+ gtk_widget_grab_focus (widget->entry);
+}
+
static void
gnc_popup_entry_class_init (GncPopupEntryClass *klass)
{
@@ -151,6 +162,7 @@ gnc_popup_entry_class_init (GncPopupEntryClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS(klass);
widget_class->key_press_event = gpw_key_press_event;
+ widget_class->grab_focus = gpw_grab_focus;
gobject_class->set_property = gpw_set_property;
gobject_class->get_property = gpw_get_property;
@@ -249,7 +261,7 @@ gtk_cell_editable_key_press_event (GtkEntry *entry,
if (qof_scan_date (date_string, &day, &month, &year))
{
when.tm_year = year - 1900;
- when.tm_mon = month - 1 ;
+ when.tm_mon = month - 1;
when.tm_mday = day;
if (!gnc_handle_date_accelerator (key_event, &when, date_string))
@@ -363,7 +375,7 @@ gnc_popup_get_button_width (void)
gtk_widget_show (button);
gtk_container_add (GTK_CONTAINER(window), button);
- arrow = gtk_image_new_from_icon_name ("go-down", GTK_ICON_SIZE_BUTTON);
+ arrow = gtk_image_new_from_icon_name ("pan-down-symbolic", GTK_ICON_SIZE_BUTTON);
gtk_widget_show (arrow);
gtk_container_add (GTK_CONTAINER(button), arrow);
diff --git a/gnucash/gnome-utils/gnc-combott.c b/gnucash/gnome-utils/gnc-combott.c
index 2be7adc97..b4187ad0a 100644
--- a/gnucash/gnome-utils/gnc-combott.c
+++ b/gnucash/gnome-utils/gnc-combott.c
@@ -177,6 +177,7 @@ gnc_combott_init (GncCombott *combott)
GtkWidget *arrow;
GtkWidget *button;
GtkWidget *sep;
+ GtkStyleContext *context;
GncCombottPrivate *priv = GNC_COMBOTT_GET_PRIVATE (combott);
@@ -192,10 +193,7 @@ gnc_combott_init (GncCombott *combott)
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_set_homogeneous (GTK_BOX(hbox), FALSE);
- arrow = gtk_image_new_from_icon_name ("go-down", GTK_ICON_SIZE_BUTTON);
-
- g_signal_connect (G_OBJECT (arrow), "draw",
- G_CALLBACK (gnc_draw_arrow_cb), GINT_TO_POINTER(1));
+ arrow = gtk_image_new_from_icon_name ("pan-down-symbolic", GTK_ICON_SIZE_BUTTON);
gtk_widget_set_margin_start (GTK_WIDGET(arrow), 5);
gtk_box_pack_end (GTK_BOX (hbox), arrow, FALSE, FALSE, 0);
@@ -207,10 +205,16 @@ gnc_combott_init (GncCombott *combott)
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
priv->label = label;
+ context = gtk_widget_get_style_context (priv->label);
+ gtk_style_context_add_class (context, "combo");
+
button = gtk_button_new();
gtk_container_add(GTK_CONTAINER(button), GTK_WIDGET(hbox));
priv->button = button;
+ context = gtk_widget_get_style_context (priv->button);
+ gtk_style_context_add_class (context, "combo");
+
gtk_container_add(GTK_CONTAINER(combott), GTK_WIDGET(button));
g_signal_connect (button, "event",
diff --git a/gnucash/gnome-utils/gnc-date-edit.c b/gnucash/gnome-utils/gnc-date-edit.c
index 40758a5af..7f4181fbb 100644
--- a/gnucash/gnome-utils/gnc-date-edit.c
+++ b/gnucash/gnome-utils/gnc-date-edit.c
@@ -892,10 +892,7 @@ create_children (GNCDateEdit *gde)
gtk_widget_show (GTK_WIDGET(gde->cal_label));
/* Graphic for the popup button. */
- arrow = gtk_image_new_from_icon_name ("go-down", GTK_ICON_SIZE_BUTTON);
-
- g_signal_connect (G_OBJECT (arrow), "draw",
- G_CALLBACK (gnc_draw_arrow_cb), GINT_TO_POINTER(1));
+ arrow = gtk_image_new_from_icon_name ("pan-down-symbolic", GTK_ICON_SIZE_BUTTON);
gtk_box_pack_start (GTK_BOX (hbox), arrow, TRUE, FALSE, 0);
gtk_widget_show (GTK_WIDGET(arrow));
diff --git a/gnucash/gnome-utils/gnc-tree-view.c b/gnucash/gnome-utils/gnc-tree-view.c
index 27a765dc9..025b1d69c 100644
--- a/gnucash/gnome-utils/gnc-tree-view.c
+++ b/gnucash/gnome-utils/gnc-tree-view.c
@@ -274,7 +274,7 @@ gnc_tree_view_init (GncTreeView *view, void *data)
/* Create the last column which contains the column selection
* widget. gnc_tree_view_add_text_column will do most of the
* work. */
- icon = gtk_image_new_from_icon_name ("go-down", GTK_ICON_SIZE_SMALL_TOOLBAR);
+ icon = gtk_image_new_from_icon_name ("pan-down-symbolic", GTK_ICON_SIZE_SMALL_TOOLBAR);
priv->column_menu_icon_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_set_homogeneous (GTK_BOX(priv->column_menu_icon_box), FALSE);
@@ -288,9 +288,6 @@ gnc_tree_view_init (GncTreeView *view, void *data)
gtk_widget_show_all (priv->column_menu_icon_box);
- g_signal_connect (G_OBJECT(icon), "draw",
- G_CALLBACK(gnc_draw_arrow_cb), GINT_TO_POINTER(1));
-
column = gnc_tree_view_add_text_column (view, NULL, NULL, NULL, NULL,
-1, -1, NULL);
g_object_set (G_OBJECT(column),
diff --git a/gnucash/gnome/gnc-plugin-page-invoice.c b/gnucash/gnome/gnc-plugin-page-invoice.c
index c47cde0db..09254df3a 100644
--- a/gnucash/gnome/gnc-plugin-page-invoice.c
+++ b/gnucash/gnome/gnc-plugin-page-invoice.c
@@ -201,12 +201,12 @@ static GtkActionEntry gnc_plugin_page_invoice_actions [] =
G_CALLBACK (gnc_plugin_page_invoice_cmd_duplicateEntry)
},
{
- "EntryUpAction", "go-up", N_("Move Entry _Up"), NULL,
+ "EntryUpAction", "pan-up-symbolic", N_("Move Entry _Up"), NULL,
N_("Move the current entry one row upwards"),
G_CALLBACK (gnc_plugin_page_invoice_cmd_entryUp)
},
{
- "EntryDownAction", "go-down", N_("Move Entry Do_wn"), NULL,
+ "EntryDownAction", "pan-down-symbolic", N_("Move Entry Do_wn"), NULL,
N_("Move the current entry one row downwards"),
G_CALLBACK (gnc_plugin_page_invoice_cmd_entryDown)
},
diff --git a/gnucash/gnome/gnc-plugin-page-register2.c b/gnucash/gnome/gnc-plugin-page-register2.c
index 5151b4a52..1082ab929 100644
--- a/gnucash/gnome/gnc-plugin-page-register2.c
+++ b/gnucash/gnome/gnc-plugin-page-register2.c
@@ -324,12 +324,12 @@ static GtkActionEntry gnc_plugin_page_register2_actions [] =
G_CALLBACK (gnc_plugin_page_register2_cmd_reverse_transaction)
},
{
- TRANSACTION_UP_ACTION, "go-up", N_("Move Transaction _Up"), NULL,
+ TRANSACTION_UP_ACTION, "pan-up-symbolic", N_("Move Transaction _Up"), NULL,
N_("Move the current transaction one row upwards. Only available if the date and number of both rows are identical and the register window is sorted by date."),
G_CALLBACK (gnc_plugin_page_register2_cmd_entryUp)
},
{
- TRANSACTION_DOWN_ACTION, "go-down", N_("Move Transaction Do_wn"), NULL,
+ TRANSACTION_DOWN_ACTION, "pan-down-symbolic", N_("Move Transaction Do_wn"), NULL,
N_("Move the current transaction one row downwards. Only available if the date and number of both rows are identical and the register window is sorted by date."),
G_CALLBACK (gnc_plugin_page_register2_cmd_entryDown)
},
commit 4b5202f55dcf0f0928bb47abde65c4d90fbbd7c2
Author: Robert Fewell <14uBobIT at gmail.com>
Date: Fri Nov 6 13:14:31 2020 +0000
Bug 688917 - Edit style sheet help button not working
Setup the connection between the help button and the edit style sheet
section in the help.
diff --git a/gnucash/gnome-utils/gnc-gnome-utils.c b/gnucash/gnome-utils/gnc-gnome-utils.c
index c2c186b32..b750a011f 100644
--- a/gnucash/gnome-utils/gnc-gnome-utils.c
+++ b/gnucash/gnome-utils/gnc-gnome-utils.c
@@ -130,6 +130,20 @@ gnc_options_dialog_set_new_book_option_values (GNCOptionDB *odb)
}
}
+static void
+gnc_style_sheet_options_help_cb (GNCOptionWin *win, gpointer dat)
+{
+ gnc_gnome_help (HF_HELP, HL_STYLE_SHEET);
+}
+
+void
+gnc_options_dialog_set_style_sheet_options_help_cb (GNCOptionWin *win)
+{
+ gnc_options_dialog_set_help_cb (win,
+ (GNCOptionWinCallback)gnc_style_sheet_options_help_cb,
+ NULL);
+}
+
static void
gnc_commodity_help_cb (void)
{
diff --git a/gnucash/gnome-utils/gnc-gnome-utils.h b/gnucash/gnome-utils/gnc-gnome-utils.h
index 721b3ff6b..6c10f991d 100644
--- a/gnucash/gnome-utils/gnc-gnome-utils.h
+++ b/gnucash/gnome-utils/gnc-gnome-utils.h
@@ -73,6 +73,11 @@ void gnc_options_dialog_set_book_options_help_cb (GNCOptionWin *win);
*/
void gnc_options_dialog_set_new_book_option_values (GNCOptionDB *odb);
+/** Set the help callback to 'gnc_style_sheet_options_help_cb' to open a help browser
+ * and point it to the Style Sheet link in the Help file.
+ */
+void gnc_options_dialog_set_style_sheet_options_help_cb (GNCOptionWin *win);
+
/** Given a file name, find and load the requested pixmap. This
* routine will display an error message if it can't find the file or
* load the pixmap.
diff --git a/gnucash/gnome-utils/gnc-ui.h b/gnucash/gnome-utils/gnc-ui.h
index fb102c654..c8263abac 100644
--- a/gnucash/gnome-utils/gnc-ui.h
+++ b/gnucash/gnome-utils/gnc-ui.h
@@ -68,6 +68,7 @@
#define HL_RECNWIN "acct-reconcile"
#define HL_SXEDITOR "trans-sched"
#define HL_BOOK_OPTIONS "book-options"
+#define HL_STYLE_SHEET "change-style"
#define HL_CLOSE_BOOK "tool-close-book"
#define HL_USAGE_CUSTOMREP "report-saving"
#define HL_IMPORT_BC "busnss-imp-bills-invoices"
diff --git a/gnucash/gnome/dialog-report-style-sheet.c b/gnucash/gnome/dialog-report-style-sheet.c
index 52de56c76..1df072a85 100644
--- a/gnucash/gnome/dialog-report-style-sheet.c
+++ b/gnucash/gnome/dialog-report-style-sheet.c
@@ -33,6 +33,7 @@
#include "gnc-component-manager.h"
#include "gnc-session.h"
#include "gnc-gtk-utils.h"
+#include "gnc-gnome-utils.h"
#include "gnc-guile-utils.h"
#include "gnc-report.h"
#include "gnc-ui.h"
@@ -180,6 +181,9 @@ gnc_style_sheet_dialog_create (StyleSheetDialog * ss,
gnc_options_dialog_build_contents (ssinfo->odialog,
ssinfo->odb);
+
+ gnc_options_dialog_set_style_sheet_options_help_cb (ssinfo->odialog);
+
gnc_options_dialog_set_apply_cb (ssinfo->odialog,
gnc_style_sheet_options_apply_cb,
ssinfo);
commit 17ced7eb2867b3cace0d67c5f0c364fbd9b32fa0
Author: Robert Fewell <14uBobIT at gmail.com>
Date: Fri Nov 6 13:10:19 2020 +0000
Fix some incorrect links to the help file
diff --git a/gnucash/gnome-utils/gnc-ui.h b/gnucash/gnome-utils/gnc-ui.h
index a5049ddea..fb102c654 100644
--- a/gnucash/gnome-utils/gnc-ui.h
+++ b/gnucash/gnome-utils/gnc-ui.h
@@ -51,13 +51,14 @@
#endif
/** Links in the Help Files *****************************************/
-#define HL_USAGE "usage"
-#define HL_USAGE_BSNSS "chapter_busnss"
+#define HL_USAGE_BSNSS "busnss-ar-setup1"
#define HL_USAGE_INVOICE "busnss-ar-invoices1"
+#define HL_USAGE_VOUCHER "busnss-emply-newvchr"
#define HL_USAGE_BILL "busnss-ap-bills1"
#define HL_USAGE_CUSTOMER "busnss-ar-customers1"
#define HL_USAGE_VENDOR "busnss-ap-vendors1"
#define HL_USAGE_EMPLOYEE "busnss-emply"
+#define HL_USAGE_JOB "busnss-ar-jobs1"
#define HL_ACC "acct-create"
#define HL_ACCEDIT "acct-edit"
#define HL_COMMODITY "tool-commodity"
@@ -65,10 +66,12 @@
#define HL_GLOBPREFS "set-prefs"
#define HL_PRINTCHECK "print-check"
#define HL_RECNWIN "acct-reconcile"
-#define HL_SXEDITOR "tool-sched"
+#define HL_SXEDITOR "trans-sched"
#define HL_BOOK_OPTIONS "book-options"
#define HL_CLOSE_BOOK "tool-close-book"
-#define HL_USAGE_CUSTOMREP "report-custom"
+#define HL_USAGE_CUSTOMREP "report-saving"
+#define HL_IMPORT_BC "busnss-imp-bills-invoices"
+#define HL_IMPORT_CUST "busnss-imp-customer-vendor"
/* GTK Windows - Common Response Codes */
diff --git a/gnucash/gnome/dialog-invoice.c b/gnucash/gnome/dialog-invoice.c
index ff309db53..81a82e6aa 100644
--- a/gnucash/gnome/dialog-invoice.c
+++ b/gnucash/gnome/dialog-invoice.c
@@ -538,7 +538,21 @@ gnc_invoice_window_cancel_cb (GtkWidget *widget, gpointer data)
void
gnc_invoice_window_help_cb (GtkWidget *widget, gpointer data)
{
- gnc_gnome_help(HF_HELP, HL_USAGE_INVOICE);
+ InvoiceWindow *iw = data;
+ GncOwnerType owner_type = gncOwnerGetType (&iw->owner);
+
+ switch(owner_type)
+ {
+ case GNC_OWNER_CUSTOMER:
+ gnc_gnome_help (HF_HELP, HL_USAGE_INVOICE);
+ break;
+ case GNC_OWNER_VENDOR:
+ gnc_gnome_help (HF_HELP, HL_USAGE_BILL);
+ break;
+ default:
+ gnc_gnome_help (HF_HELP, HL_USAGE_VOUCHER);
+ break;
+ }
}
static const gchar *
diff --git a/gnucash/gnome/dialog-job.c b/gnucash/gnome/dialog-job.c
index d59a3beb4..e698261bb 100644
--- a/gnucash/gnome/dialog-job.c
+++ b/gnucash/gnome/dialog-job.c
@@ -202,7 +202,7 @@ gnc_job_window_cancel_cb (GtkWidget *widget, gpointer data)
void
gnc_job_window_help_cb (GtkWidget *widget, gpointer data)
{
- gnc_gnome_help(HF_HELP, HL_USAGE_BSNSS);
+ gnc_gnome_help (HF_HELP, HL_USAGE_JOB);
}
diff --git a/gnucash/import-export/bi-import/dialog-bi-import-gui.c b/gnucash/import-export/bi-import/dialog-bi-import-gui.c
index 068fe9f8f..c0cf435bc 100644
--- a/gnucash/import-export/bi-import/dialog-bi-import-gui.c
+++ b/gnucash/import-export/bi-import/dialog-bi-import-gui.c
@@ -252,7 +252,7 @@ gnc_bi_import_gui_cancel_cb (GtkWidget *widget, gpointer data)
void
gnc_bi_import_gui_help_cb (GtkWidget *widget, gpointer data)
{
- gnc_gnome_help(HF_HELP, HL_USAGE_BSNSS);
+ gnc_gnome_help (HF_GUIDE, HL_IMPORT_BC);
}
static void
diff --git a/gnucash/import-export/customer-import/dialog-customer-import-gui.c b/gnucash/import-export/customer-import/dialog-customer-import-gui.c
index 92b343d71..b34d9fac3 100644
--- a/gnucash/import-export/customer-import/dialog-customer-import-gui.c
+++ b/gnucash/import-export/customer-import/dialog-customer-import-gui.c
@@ -228,7 +228,7 @@ gnc_customer_import_gui_cancel_cb (GtkWidget *widget, gpointer data)
void
gnc_customer_import_gui_help_cb (GtkWidget *widget, gpointer data)
{
- gnc_gnome_help(HF_HELP, HL_USAGE_BSNSS);
+ gnc_gnome_help (HF_GUIDE, HL_IMPORT_CUST);
}
static void
commit 65b7b8c4a2d1be21685e293258463591725e91fa
Author: Robert Fewell <14uBobIT at gmail.com>
Date: Fri Nov 6 13:05:42 2020 +0000
Section help on windows not working
Key and group names are case sensitive and in the gnucash-help.hhmap
file the section name is [MAP] so change gnc-help-utils.c to match
diff --git a/libgnucash/app-utils/gnc-help-utils.c b/libgnucash/app-utils/gnc-help-utils.c
index 0c6612b38..ad5530b37 100644
--- a/libgnucash/app-utils/gnc-help-utils.c
+++ b/libgnucash/app-utils/gnc-help-utils.c
@@ -57,13 +57,13 @@ parse_hhmap_file(const gchar *chmfile)
if (!g_key_file_load_from_file(keyfile, mapfile, G_KEY_FILE_NONE, &error))
goto cleanup_parse;
- if (NULL == (keys = g_key_file_get_keys(keyfile, "Map", NULL, &error)))
+ if (NULL == (keys = g_key_file_get_keys(keyfile, "MAP", NULL, &error)))
goto cleanup_parse;
ctxtmap = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL);
for (key = keys; *key; key++)
{
- value = g_key_file_get_integer(keyfile, "Map", *key, &error);
+ value = g_key_file_get_integer(keyfile, "MAP", *key, &error);
if (error)
goto cleanup_parse;
else
Summary of changes:
borrowed/goffice/go-optionmenu.c | 2 +-
.../gnome-utils/gnc-cell-renderer-popup-entry.c | 24 ++++++++++++++++------
gnucash/gnome-utils/gnc-combott.c | 12 +++++++----
gnucash/gnome-utils/gnc-date-edit.c | 5 +----
gnucash/gnome-utils/gnc-gnome-utils.c | 14 +++++++++++++
gnucash/gnome-utils/gnc-gnome-utils.h | 5 +++++
gnucash/gnome-utils/gnc-tree-view.c | 5 +----
gnucash/gnome-utils/gnc-ui.h | 12 +++++++----
gnucash/gnome/dialog-invoice.c | 16 ++++++++++++++-
gnucash/gnome/dialog-job.c | 2 +-
gnucash/gnome/dialog-report-style-sheet.c | 4 ++++
gnucash/gnome/gnc-plugin-page-invoice.c | 4 ++--
gnucash/gnome/gnc-plugin-page-register2.c | 4 ++--
.../import-export/bi-import/dialog-bi-import-gui.c | 2 +-
.../customer-import/dialog-customer-import-gui.c | 2 +-
libgnucash/app-utils/gnc-help-utils.c | 4 ++--
16 files changed, 84 insertions(+), 33 deletions(-)
More information about the gnucash-changes
mailing list