diff --git a/gnucash/gnome-search/dialog-search.c b/gnucash/gnome-search/dialog-search.c index 20cae3b217..5c434f9f43 100644 --- a/gnucash/gnome-search/dialog-search.c +++ b/gnucash/gnome-search/dialog-search.c @@ -1127,8 +1127,9 @@ gnc_search_dialog_init_widgets (GNCSearchWindow *sw, const gchar *title) gtk_window_set_title(GTK_WINDOW(sw->dialog), title); g_object_set_data (G_OBJECT (sw->dialog), "dialog-info", sw); - // Set the style context for this dialog so it can be easily manipulated with css - gnc_widget_set_style_context (GTK_WIDGET(sw->dialog), "GncSearchDialog"); + // Set the name for this dialog so it can be easily manipulated with css + gtk_widget_set_name (GTK_WIDGET(sw->dialog), "gnc-id-search"); + gnc_widget_style_context_add_class (GTK_WIDGET(sw->dialog), "gnc-class-search"); /* Grab the result hbox */ sw->result_hbox = GTK_WIDGET(gtk_builder_get_object (builder, "result_hbox")); @@ -1328,11 +1329,9 @@ gnc_search_dialog_create (GtkWindow *parent, gtk_widget_get_allocated_height ( GTK_WIDGET(sw->grouping_combo)) * 1.5); - // Set the style context for this dialog so it can be easily manipulated with css - if (style_class == NULL) - gnc_widget_set_style_context (GTK_WIDGET(sw->dialog), "GncSearchDialog"); - else - gnc_widget_set_style_context (GTK_WIDGET(sw->dialog), style_class); + // Add a style context for this dialog so it can be easily manipulated with css + if (style_class != NULL) + gnc_widget_style_context_add_class (GTK_WIDGET(sw->dialog), style_class); /* Maybe display the original query results? */ if (callbacks && show_start_query) diff --git a/gnucash/gnome/dialog-customer.c b/gnucash/gnome/dialog-customer.c index 60006577ad..b37d33b8e5 100644 --- a/gnucash/gnome/dialog-customer.c +++ b/gnucash/gnome/dialog-customer.c @@ -963,7 +963,7 @@ gnc_customer_search (GtkWindow *parent, GncCustomer *start, QofBook *book) params, columns, q, q2, buttons, NULL, new_customer_cb, sw, free_userdata_cb, GNC_PREFS_GROUP_SEARCH, NULL, - "GncFindCustomerDialog"); + "gnc-class-customers"); } GNCSearchWindow * diff --git a/gnucash/gnome/dialog-employee.c b/gnucash/gnome/dialog-employee.c index d529e91ee8..0982a32178 100644 --- a/gnucash/gnome/dialog-employee.c +++ b/gnucash/gnome/dialog-employee.c @@ -741,7 +741,7 @@ gnc_employee_search (GtkWindow *parent, GncEmployee *start, QofBook *book) buttons, NULL, new_employee_cb, sw, free_employee_cb, GNC_PREFS_GROUP_SEARCH, NULL, - "GncFindEmployeeDialog"); + "gnc-class-employees"); } GNCSearchWindow * diff --git a/gnucash/gnome/dialog-find-transactions.c b/gnucash/gnome/dialog-find-transactions.c index 4c25ae7667..814227e1a5 100644 --- a/gnucash/gnome/dialog-find-transactions.c +++ b/gnucash/gnome/dialog-find-transactions.c @@ -228,7 +228,7 @@ gnc_ui_find_transactions_dialog_create(GtkWindow *parent, GNCLedgerDisplay * ori params, NULL, start_q, show_q, NULL, do_find_cb, NULL, ftd, free_ftd_cb, GNC_PREFS_GROUP_SEARCH, NULL, - "GncFindTransDialog"); + "gnc-class-transactions"); if (!ftd->sw) { free_ftd_cb (ftd); diff --git a/gnucash/gnome/dialog-find-transactions2.c b/gnucash/gnome/dialog-find-transactions2.c index 15b02da60d..2fc6f59fd5 100644 --- a/gnucash/gnome/dialog-find-transactions2.c +++ b/gnucash/gnome/dialog-find-transactions2.c @@ -230,7 +230,7 @@ gnc_ui_find_transactions_dialog_create2 (GNCLedgerDisplay2 * orig_ledg) params, NULL, start_q, show_q, NULL, do_find_cb, NULL, ftd, free_ftd_cb, GNC_PREFS_GROUP_SEARCH, NULL, - "GncFindTransDialog"); + "gnc-class-transactions"); if (!ftd->sw) { free_ftd_cb (ftd); diff --git a/gnucash/gnome/dialog-invoice.c b/gnucash/gnome/dialog-invoice.c index a04cec31b7..4679c6469d 100644 --- a/gnucash/gnome/dialog-invoice.c +++ b/gnucash/gnome/dialog-invoice.c @@ -3331,21 +3331,21 @@ gnc_invoice_search (GtkWindow *parent, GncInvoice *start, GncOwner *owner, QofBo case GNC_OWNER_VENDOR: title = _("Find Bill"); label = _("Bill"); - style_class = "GncFindBillDialog"; + style_class = "gnc-class-bills"; params = bill_params; buttons = bill_buttons; break; case GNC_OWNER_EMPLOYEE: title = _("Find Expense Voucher"); label = _("Expense Voucher"); - style_class = "GncFindExpenseVoucherDialog"; + style_class = "gnc-class-vouchers"; params = emp_params; buttons = emp_buttons; break; default: title = _("Find Invoice"); label = _("Invoice"); - style_class = "GncFindInvoiceDialog"; + style_class = "gnc-class-invoices"; params = inv_params; buttons = inv_buttons; break; diff --git a/gnucash/gnome/dialog-job.c b/gnucash/gnome/dialog-job.c index c18f5703b3..c4098fdbb1 100644 --- a/gnucash/gnome/dialog-job.c +++ b/gnucash/gnome/dialog-job.c @@ -644,7 +644,7 @@ gnc_job_search (GtkWindow *parent, GncJob *start, GncOwner *owner, QofBook *book params, columns, q, q2, buttons, NULL, new_job_cb, sw, free_userdata_cb, GNC_PREFS_GROUP_SEARCH, NULL, - "GncFindJobDialog"); + "gnc-class-jobs"); } /* Functions for widgets for job selection */ diff --git a/gnucash/gnome/dialog-order.c b/gnucash/gnome/dialog-order.c index 10a34c4422..6165c820da 100644 --- a/gnucash/gnome/dialog-order.c +++ b/gnucash/gnome/dialog-order.c @@ -948,7 +948,7 @@ gnc_order_search (GtkWindow *parent, GncOrder *start, GncOwner *owner, QofBook * params, columns, q, q2, buttons, NULL, new_order_cb, sw, free_order_cb, GNC_PREFS_GROUP_SEARCH, - NULL, "GncFindOrderDialog"); + NULL, "gnc-class-orders"); } GNCSearchWindow * diff --git a/gnucash/gnome/dialog-vendor.c b/gnucash/gnome/dialog-vendor.c index 9d48ea8759..cbc98a62ef 100644 --- a/gnucash/gnome/dialog-vendor.c +++ b/gnucash/gnome/dialog-vendor.c @@ -765,7 +765,7 @@ gnc_vendor_search (GtkWindow *parent, GncVendor *start, QofBook *book) params, columns, q, q2, buttons, NULL, new_vendor_cb, sw, free_vendor_cb, GNC_PREFS_GROUP_SEARCH, NULL, - "GncFindVendorDialog"); + "gnc-class-vendors"); } GNCSearchWindow *