From f6b1f2ce0fd96c46d188a6a7c51cbabf1b52778c Mon Sep 17 00:00:00 2001 From: Robert Fewell <14uBobIT@gmail.com> Date: Sun, 5 Apr 2020 13:49:00 +0100 Subject: [PATCH] Change CSS class and names used in Matcher Help Change the CSS classes and widget names to a standard naming for all of Gnucash. This should make it easier to adjust Gnucash appearance if required. CSS classes all begin with 'gnc-class-' and widget names begin with 'gnc-id-' --- gnucash/gnucash-fallback-310.css | 12 ++++++------ gnucash/import-export/import-main-matcher.c | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/gnucash/gnucash-fallback-310.css b/gnucash/gnucash-fallback-310.css index 467a31fe71..ce9d4ca024 100644 --- a/gnucash/gnucash-fallback-310.css +++ b/gnucash/gnucash-fallback-310.css @@ -8,27 +8,27 @@ @define-color intervention-probably-required_bg_color gold; @define-color intervention-not-required_bg_color DarkSeaGreen1; -.intervention-required { +.gnc-class-intervention-required { background-color: @intervention-required_bg_color; } -.intervention-probably-required { +.gnc-class-intervention-probably-required { background-color: @intervention-probably-required_bg_color; } -.intervention-not-required { +.gnc-class-intervention-not-required { background-color: @intervention-not-required_bg_color; } -.intervention-required-dark { +.gnc-class-intervention-required-dark { background-color: shade (@intervention-required_bg_color, 0.7); } -.intervention-probably-required-dark { +.gnc-class-intervention-probably-required-dark { background-color: shade (@intervention-probably-required_bg_color, 0.8); } -.intervention-not-required-dark { +.gnc-class-intervention-not-required-dark { background-color: shade (@intervention-not-required_bg_color, 0.3); } diff --git a/gnucash/import-export/import-main-matcher.c b/gnucash/import-export/import-main-matcher.c index bdfb620cd4..d4f131d605 100644 --- a/gnucash/import-export/import-main-matcher.c +++ b/gnucash/import-export/import-main-matcher.c @@ -91,9 +91,9 @@ enum downloaded_cols NUM_DOWNLOADED_COLS }; -#define CSS_INT_REQUIRED_CLASS "intervention-required" -#define CSS_INT_PROB_REQUIRED_CLASS "intervention-probably-required" -#define CSS_INT_NOT_REQUIRED_CLASS "intervention-not-required" +#define CSS_INT_REQUIRED_CLASS "gnc-class-intervention-required" +#define CSS_INT_PROB_REQUIRED_CLASS "gnc-class-intervention-probably-required" +#define CSS_INT_NOT_REQUIRED_CLASS "gnc-class-intervention-not-required" /* Define log domain for extended debugging of matcher */ #define G_MOD_IMPORT_MATCHER "gnc.import.main-matcher" @@ -291,13 +291,13 @@ on_matcher_help_clicked (GtkButton *button, gpointer user_data) int_not_required_class = g_strconcat (CSS_INT_NOT_REQUIRED_CLASS, class_extension, NULL); box = GTK_WIDGET(gtk_builder_get_object (builder, "intervention_required_box")); - gnc_widget_set_style_context (GTK_WIDGET(box), int_required_class); + gnc_widget_style_context_add_class (GTK_WIDGET(box), int_required_class); box = GTK_WIDGET(gtk_builder_get_object (builder, "intervention_probably_required_box")); - gnc_widget_set_style_context (GTK_WIDGET(box), int_prob_required_class); + gnc_widget_style_context_add_class (GTK_WIDGET(box), int_prob_required_class); box = GTK_WIDGET(gtk_builder_get_object (builder, "intervention_not_required_box")); - gnc_widget_set_style_context (GTK_WIDGET(box), int_not_required_class); + gnc_widget_style_context_add_class (GTK_WIDGET(box), int_not_required_class); help_dialog = GTK_WIDGET(gtk_builder_get_object (builder, "matcher_help_dialog")); gtk_window_set_transient_for (GTK_WINDOW(help_dialog), GTK_WINDOW(info->main_widget));