mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Change CSS class and names used in Search dialogs
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-'
This commit is contained in:
parent
c1b0474c23
commit
c6bac56e2b
@ -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)
|
||||
|
@ -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 *
|
||||
|
@ -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 *
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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 */
|
||||
|
@ -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 *
|
||||
|
@ -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 *
|
||||
|
Loading…
Reference in New Issue
Block a user