From faf7073886948ebb11471d89746eb01278b4cf6e Mon Sep 17 00:00:00 2001 From: Richard Cohen Date: Wed, 22 Mar 2023 13:25:51 +0000 Subject: [PATCH 1/6] Don't #include internal gtk headers --- gnucash/gnome-utils/gnc-cell-renderer-date.h | 2 +- gnucash/gnome-utils/gnc-cell-renderer-popup-entry.h | 2 +- gnucash/gnome-utils/gnc-cell-renderer-popup.h | 2 +- gnucash/gnome-utils/gnc-cell-renderer-text-flag.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gnucash/gnome-utils/gnc-cell-renderer-date.h b/gnucash/gnome-utils/gnc-cell-renderer-date.h index 18d5d166ad..578ae6cfb5 100644 --- a/gnucash/gnome-utils/gnc-cell-renderer-date.h +++ b/gnucash/gnome-utils/gnc-cell-renderer-date.h @@ -32,7 +32,7 @@ #define __GNC_CELL_RENDERER_DATE_H__ #include -#include +#include #include #include "gnc-cell-renderer-popup.h" #include "gnc-cell-renderer-popup-entry.h" diff --git a/gnucash/gnome-utils/gnc-cell-renderer-popup-entry.h b/gnucash/gnome-utils/gnc-cell-renderer-popup-entry.h index 206f683733..4d3b8f639f 100644 --- a/gnucash/gnome-utils/gnc-cell-renderer-popup-entry.h +++ b/gnucash/gnome-utils/gnc-cell-renderer-popup-entry.h @@ -31,7 +31,7 @@ #define __GNC_POPUP_ENTRY_H__ #include -#include +#include #define GNC_TYPE_POPUP_ENTRY (gnc_popup_entry_get_type ()) #define GNC_POPUP_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNC_TYPE_POPUP_ENTRY, GncPopupEntry)) diff --git a/gnucash/gnome-utils/gnc-cell-renderer-popup.h b/gnucash/gnome-utils/gnc-cell-renderer-popup.h index 1b56bc6824..5576795244 100644 --- a/gnucash/gnome-utils/gnc-cell-renderer-popup.h +++ b/gnucash/gnome-utils/gnc-cell-renderer-popup.h @@ -31,7 +31,7 @@ #define __GNC_CELL_RENDERER_POPUP_H__ #include -#include +#include #define GNC_TYPE_CELL_RENDERER_POPUP (gnc_cell_renderer_popup_get_type ()) #define GNC_CELL_RENDERER_POPUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNC_TYPE_CELL_RENDERER_POPUP, GncCellRendererPopup)) diff --git a/gnucash/gnome-utils/gnc-cell-renderer-text-flag.h b/gnucash/gnome-utils/gnc-cell-renderer-text-flag.h index 2a33464b79..1002704823 100644 --- a/gnucash/gnome-utils/gnc-cell-renderer-text-flag.h +++ b/gnucash/gnome-utils/gnc-cell-renderer-text-flag.h @@ -26,7 +26,7 @@ #ifndef __GNC_CELL_RENDERER_TEXT_FLAG_H__ #define __GNC_CELL_RENDERER_TEXT_FLAG_H__ -#include +#include #define GNC_TYPE_CELL_RENDERER_TEXT_FLAG (gnc_cell_renderer_text_flag_get_type ()) From 3b8f3e920887a250536b7ec04826d4b16002f357 Mon Sep 17 00:00:00 2001 From: Richard Cohen Date: Thu, 6 Apr 2023 19:16:29 +0100 Subject: [PATCH 2/6] Remove commented out #include glade --- .../import-export/customer-import/gnc-plugin-customer-import.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/gnucash/import-export/customer-import/gnc-plugin-customer-import.c b/gnucash/import-export/customer-import/gnc-plugin-customer-import.c index e0188cecd0..b5ac70ea17 100644 --- a/gnucash/import-export/customer-import/gnc-plugin-customer-import.c +++ b/gnucash/import-export/customer-import/gnc-plugin-customer-import.c @@ -28,8 +28,6 @@ #include -//#include -//#include #include #include "dialog-utils.h" From 4456dc121ea95b0353fadd7efef0e4a626afce2f Mon Sep 17 00:00:00 2001 From: Richard Cohen Date: Fri, 28 Apr 2023 12:11:01 +0100 Subject: [PATCH 3/6] Remove commented out gtk_box_pack_start --- gnucash/gnome/dialog-order.c | 1 - 1 file changed, 1 deletion(-) diff --git a/gnucash/gnome/dialog-order.c b/gnucash/gnome/dialog-order.c index ac4022b7c2..2ca69b3951 100644 --- a/gnucash/gnome/dialog-order.c +++ b/gnucash/gnome/dialog-order.c @@ -648,7 +648,6 @@ gnc_order_new_window (GtkWindow *parent, QofBook *bookp, OrderDialogType type, gnc_entry_ledger_set_parent (entry_ledger, ow->dialog); vbox = GTK_WIDGET(gtk_builder_get_object (builder, "ledger_vbox")); - // gtk_box_pack_start (GTK_BOX(vbox), toolbar, FALSE, FALSE, 2); gtk_box_pack_start (GTK_BOX(vbox), regWidget, TRUE, TRUE, 2); /* Setup signals */ From e41c06dead3cc59b5b1e7552c42f1b90f5445413 Mon Sep 17 00:00:00 2001 From: Richard Cohen Date: Thu, 13 Apr 2023 18:32:25 +0100 Subject: [PATCH 4/6] CSS functions should not be followed by a space - it works in gtk3, but not gtk4 --- gnucash/gnucash-fallback.css | 12 ++++++------ gnucash/gnucash.css | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/gnucash/gnucash-fallback.css b/gnucash/gnucash-fallback.css index ff16becee6..4077fed78d 100644 --- a/gnucash/gnucash-fallback.css +++ b/gnucash/gnucash-fallback.css @@ -21,15 +21,15 @@ } .gnc-class-intervention-required-dark { - background-color: shade (@intervention-required_bg_color, 0.7); + background-color: shade(@intervention-required_bg_color, 0.7); } .gnc-class-intervention-probably-required-dark { - background-color: shade (@intervention-probably-required_bg_color, 0.8); + background-color: shade(@intervention-probably-required_bg_color, 0.8); } .gnc-class-intervention-not-required-dark { - background-color: shade (@intervention-not-required_bg_color, 0.3); + background-color: shade(@intervention-not-required_bg_color, 0.3); } /* Negative value label colors */ @@ -63,7 +63,7 @@ font-style: italic; } *.primary-dark { - background-color: shade (@primary_bg_color, 0.7); + background-color: shade(@primary_bg_color, 0.7); } *.secondary { @@ -71,7 +71,7 @@ font-style: italic; } *.secondary-dark { - background-color: shade (@secondary_bg_color, 0.7); + background-color: shade(@secondary_bg_color, 0.7); } *.markers { @@ -79,5 +79,5 @@ font-style: italic; } *.markers-dark { - background-color: shade (@marker_bg_color, 0.8); + background-color: shade(@marker_bg_color, 0.8); } diff --git a/gnucash/gnucash.css b/gnucash/gnucash.css index af46af8415..c6d50a2d46 100644 --- a/gnucash/gnucash.css +++ b/gnucash/gnucash.css @@ -43,7 +43,7 @@ gnc-id-cursor button { } *.gnc-class-register-primary:disabled { - background-color: mix (@register_primary_bg_color, grey, 0.2); + background-color: mix(@register_primary_bg_color, grey, 0.2); } *.gnc-class-register-secondary { @@ -51,7 +51,7 @@ gnc-id-cursor button { } *.gnc-class-register-secondary:disabled { - background-color: mix (@register_secondary_bg_color, grey, 0.2); + background-color: mix(@register_secondary_bg_color, grey, 0.2); } *.gnc-class-register-split { @@ -59,7 +59,7 @@ gnc-id-cursor button { } *.gnc-class-register-split:disabled { - background-color: mix (@register_split_bg_color, grey, 0.2); + background-color: mix(@register_split_bg_color, grey, 0.2); } *.gnc-class-register-cursor { @@ -67,16 +67,16 @@ gnc-id-cursor button { } *.gnc-class-register-cursor:disabled { - background-color: mix (@register_cursor_bg_color, grey, 0.2); + background-color: mix(@register_cursor_bg_color, grey, 0.2); } /* Change font color by mixing with grey */ .gnc-class-lighter-grey-mix { - color: mix (currentColor, grey, 0.8); + color: mix(currentColor, grey, 0.8); } .gnc-class-darker-grey-mix { - color: mix (currentColor, grey, 0.2); + color: mix(currentColor, grey, 0.2); } /* Highlight some text */ From 02f09330e29622b251bbd0d8883a84565f077275 Mon Sep 17 00:00:00 2001 From: Richard Cohen Date: Wed, 22 Mar 2023 22:57:13 +0000 Subject: [PATCH 5/6] Remove references to GtkVBox GtkHBox - All the widgets were already changed to GtkBox - Also, fix the variable type in gnucash-date-picker.c --- gnucash/gnome-utils/gnc-dense-cal.h | 2 +- gnucash/gnome-utils/gnc-main-window.cpp | 2 +- gnucash/register/register-gnome/gnucash-date-picker.c | 8 +++----- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/gnucash/gnome-utils/gnc-dense-cal.h b/gnucash/gnome-utils/gnc-dense-cal.h index a56e5b67a2..2a0ff0e13f 100644 --- a/gnucash/gnome-utils/gnc-dense-cal.h +++ b/gnucash/gnome-utils/gnc-dense-cal.h @@ -103,7 +103,7 @@ struct _GncDenseCal struct _GncDenseCalClass { - GtkVBoxClass parent_class; + GtkBoxClass parent_class; }; typedef struct _gdc_mark_data diff --git a/gnucash/gnome-utils/gnc-main-window.cpp b/gnucash/gnome-utils/gnc-main-window.cpp index 7db7a5b0ee..67447dce35 100644 --- a/gnucash/gnome-utils/gnc-main-window.cpp +++ b/gnucash/gnome-utils/gnc-main-window.cpp @@ -3016,7 +3016,7 @@ gnc_main_window_engine_commit_error_callback( gpointer data, * * @param tab_hbox The widget that should be added into the notebook * tab for this page. Generally this is a GtkLabel, but could also - * be a GtkHBox containing an icon and a label. + * be a GtkBox containing an icon and a label. * * @param menu_label The widget that should be added into the * notebook popup menu for this page. This should be a GtkLabel. diff --git a/gnucash/register/register-gnome/gnucash-date-picker.c b/gnucash/register/register-gnome/gnucash-date-picker.c index 2af2b84aa0..9cb950460c 100644 --- a/gnucash/register/register-gnome/gnucash-date-picker.c +++ b/gnucash/register/register-gnome/gnucash-date-picker.c @@ -37,7 +37,7 @@ enum LAST_SIGNAL }; -static GtkHBox *gnc_date_picker_parent_class; +static GtkBoxClass *gnc_date_picker_parent_class; static guint gnc_date_picker_signals[LAST_SIGNAL]; @@ -118,12 +118,10 @@ gnc_date_picker_key_event(GtkWidget *widget, GdkEventKey *event, gpointer data) static void gnc_date_picker_class_init (GNCDatePickerClass *date_picker_class) { - GObjectClass *object_class; - gnc_date_picker_parent_class = - g_type_class_peek_parent (date_picker_class); + GTK_BOX_CLASS (g_type_class_peek_parent (date_picker_class)); - object_class = G_OBJECT_CLASS (date_picker_class); + GObjectClass *object_class = G_OBJECT_CLASS (date_picker_class); gtk_widget_class_set_css_name (GTK_WIDGET_CLASS(date_picker_class), "gnc-id-date-picker"); From bb7c4a47a8b65c8eabc5a74a2a80b0ece5aa09e8 Mon Sep 17 00:00:00 2001 From: Richard Cohen Date: Sun, 14 May 2023 14:45:28 +0100 Subject: [PATCH 6/6] Add missing argument for "delete-event" callback I suspect that this is never called anyway --- gnucash/gnome-utils/gnc-date-edit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnucash/gnome-utils/gnc-date-edit.c b/gnucash/gnome-utils/gnc-date-edit.c index fde3aa5eea..3dc57fc2dd 100644 --- a/gnucash/gnome-utils/gnc-date-edit.c +++ b/gnucash/gnome-utils/gnc-date-edit.c @@ -192,7 +192,7 @@ day_selected_double_click (GtkCalendar *calendar, GNCDateEdit *gde) } static gint -delete_popup (GtkWidget *widget, gpointer data) +delete_popup (GtkWidget *widget, GdkEvent *event, gpointer data) { GNCDateEdit *gde;