diff --git a/src/gnome-search/dialog-search.c b/src/gnome-search/dialog-search.c index 8e91da2ea2..294eda7be9 100644 --- a/src/gnome-search/dialog-search.c +++ b/src/gnome-search/dialog-search.c @@ -1157,6 +1157,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"); + /* Grab the result hbox */ sw->result_hbox = GTK_WIDGET(gtk_builder_get_object (builder, "result_hbox")); diff --git a/src/gnome/assistant-acct-period.c b/src/gnome/assistant-acct-period.c index 0357a14acd..9190119b66 100644 --- a/src/gnome/assistant-acct-period.c +++ b/src/gnome/assistant-acct-period.c @@ -545,6 +545,9 @@ ap_assistant_create (AcctPeriodInfo *info) window = GTK_WIDGET(gtk_builder_get_object (builder, "account_period_assistant")); info->window = window; + // Set the style context for this assistant so it can be easily manipulated with css + gnc_widget_set_style_context (GTK_WIDGET(window), "GncAssistAccountPeriod"); + /* Enable all pages except menu page. */ gtk_assistant_set_page_complete (GTK_ASSISTANT (window), GTK_WIDGET(gtk_builder_get_object(builder, "start_page")), diff --git a/src/gnome/assistant-hierarchy.c b/src/gnome/assistant-hierarchy.c index aeca85869a..abab75adfb 100644 --- a/src/gnome/assistant-hierarchy.c +++ b/src/gnome/assistant-hierarchy.c @@ -1201,6 +1201,9 @@ gnc_create_hierarchy_assistant (gboolean use_defaults, GncHierarchyAssistantFini dialog = GTK_WIDGET(gtk_builder_get_object (builder, "hierarchy_assistant")); data->dialog = dialog; + // Set the style context for this assistant so it can be easily manipulated with css + gnc_widget_set_style_context (GTK_WIDGET(dialog), "GncAssistAccountHierarchy"); + /* If we have a callback, make this window stay on top */ if (when_completed != NULL) gtk_window_set_keep_above (GTK_WINDOW(data->dialog), TRUE); diff --git a/src/gnome/assistant-loan.c b/src/gnome/assistant-loan.c index 668c2fc96a..af871fa6c5 100644 --- a/src/gnome/assistant-loan.c +++ b/src/gnome/assistant-loan.c @@ -464,6 +464,9 @@ gnc_loan_assistant_create( LoanAssistantData *ldd ) window = GTK_WIDGET(gtk_builder_get_object (builder, "loan_mortgage_assistant")); ldd->window = window; + // Set the style context for this assistant so it can be easily manipulated with css + gnc_widget_set_style_context (GTK_WIDGET(window), "GncAssistLoan"); + /* Enable buttons on complete pages. */ gtk_assistant_set_page_complete (GTK_ASSISTANT (window), GTK_WIDGET(gtk_builder_get_object(builder, "loan_intro_page")), diff --git a/src/gnome/assistant-stock-split.c b/src/gnome/assistant-stock-split.c index b583805aae..640f1fd21d 100644 --- a/src/gnome/assistant-stock-split.c +++ b/src/gnome/assistant-stock-split.c @@ -538,6 +538,9 @@ gnc_stock_split_assistant_create (StockSplitInfo *info) window = GTK_WIDGET(gtk_builder_get_object (builder, "stock_split_assistant")); info->window = window; + // Set the style context for this assistant so it can be easily manipulated with css + gnc_widget_set_style_context (GTK_WIDGET(window), "GncAssistStockSplit"); + /* Enable buttons on first, second, fourth and last page. */ gtk_assistant_set_page_complete (GTK_ASSISTANT (window), GTK_WIDGET(gtk_builder_get_object(builder, "intro_page_label")), diff --git a/src/gnome/dialog-commodities.c b/src/gnome/dialog-commodities.c index 3d47193f69..e04003b0d6 100644 --- a/src/gnome/dialog-commodities.c +++ b/src/gnome/dialog-commodities.c @@ -323,6 +323,9 @@ gnc_commodities_dialog_create (GtkWidget * parent, CommoditiesDialog *cd) cd->book = qof_session_get_book(cd->session); cd->show_currencies = gnc_prefs_get_bool(GNC_PREFS_GROUP, GNC_PREF_INCL_ISO); + // Set the style context for this dialog so it can be easily manipulated with css + gnc_widget_set_style_context (GTK_WIDGET(cd->dialog), "GncCommoditiesDialog"); + gtk_builder_connect_signals(builder, cd); /* parent */ diff --git a/src/gnome/dialog-fincalc.c b/src/gnome/dialog-fincalc.c index 2cbe10d159..fe6a3c1633 100644 --- a/src/gnome/dialog-fincalc.c +++ b/src/gnome/dialog-fincalc.c @@ -572,6 +572,9 @@ gnc_ui_fincalc_dialog_create(void) fcd->dialog = GTK_WIDGET(gtk_builder_get_object (builder, "financial_calculator_dialog")); + // Set the style context for this dialog so it can be easily manipulated with css + gnc_widget_set_style_context (GTK_WIDGET(fcd->dialog), "GncFinCalcDialog"); + gnc_register_gui_component (DIALOG_FINCALC_CM_CLASS, NULL, close_handler, fcd); diff --git a/src/gnome/dialog-find-account.c b/src/gnome/dialog-find-account.c index f247e66dbb..4c0e2891d0 100644 --- a/src/gnome/dialog-find-account.c +++ b/src/gnome/dialog-find-account.c @@ -270,6 +270,9 @@ gnc_find_account_dialog_create (GtkWidget *parent, FindAccountDialog *facc_dialo dialog = GTK_WIDGET(gtk_builder_get_object (builder, "find_account_dialog")); facc_dialog->dialog = dialog; + // Set the style context for this dialog so it can be easily manipulated with css + gnc_widget_set_style_context (GTK_WIDGET(dialog), "GncFindAccountDialog"); + facc_dialog->session = gnc_get_current_session(); /* parent */ diff --git a/src/gnome/dialog-find-transactions.c b/src/gnome/dialog-find-transactions.c index 8969d47550..cbd721a947 100644 --- a/src/gnome/dialog-find-transactions.c +++ b/src/gnome/dialog-find-transactions.c @@ -35,6 +35,7 @@ #include "gnc-main-window.h" #include "gnc-plugin-page-register.h" #include "search-param.h" +#include "dialog-utils.h" #define GNC_PREFS_GROUP_SEARCH "dialogs.find" @@ -225,6 +226,9 @@ gnc_ui_find_transactions_dialog_create(GNCLedgerDisplay * orig_ledg) NULL, do_find_cb, NULL, ftd, free_ftd_cb, GNC_PREFS_GROUP_SEARCH, NULL); + // Set the style context for this dialog so it can be easily manipulated with css + gnc_widget_set_style_context (GTK_WIDGET(ftd->sw), "GncFindTransDialog"); + if (!ftd->sw) { free_ftd_cb (ftd); diff --git a/src/gnome/dialog-find-transactions2.c b/src/gnome/dialog-find-transactions2.c index bd7749b93f..f4e255ba28 100644 --- a/src/gnome/dialog-find-transactions2.c +++ b/src/gnome/dialog-find-transactions2.c @@ -35,6 +35,7 @@ #include "gnc-main-window.h" #include "gnc-plugin-page-register2.h" #include "search-param.h" +#include "dialog-utils.h" #define GNC_PREFS_GROUP_SEARCH "dialogs.find" @@ -226,6 +227,9 @@ gnc_ui_find_transactions_dialog_create2 (GNCLedgerDisplay2 * orig_ledg) NULL, do_find_cb, NULL, ftd, free_ftd_cb, GNC_PREFS_GROUP_SEARCH, NULL); + // Set the style context for this dialog so it can be easily manipulated with css + gnc_widget_set_style_context (GTK_WIDGET(ftd->sw), "GncFindTransDialog"); + if (!ftd->sw) { free_ftd_cb (ftd); diff --git a/src/gnome/dialog-imap-editor.c b/src/gnome/dialog-imap-editor.c index b1236c1f35..6070ce8043 100644 --- a/src/gnome/dialog-imap-editor.c +++ b/src/gnome/dialog-imap-editor.c @@ -651,6 +651,9 @@ gnc_imap_dialog_create (GtkWidget *parent, ImapDialog *imap_dialog) dialog = GTK_WIDGET(gtk_builder_get_object (builder, "import_map_dialog")); imap_dialog->dialog = dialog; + // Set the style context for this dialog so it can be easily manipulated with css + gnc_widget_set_style_context (GTK_WIDGET(dialog), "GncImapDialog"); + imap_dialog->session = gnc_get_current_session(); imap_dialog->type = BAYES; diff --git a/src/gnome/dialog-lot-viewer.c b/src/gnome/dialog-lot-viewer.c index da85377a5d..628801be3d 100644 --- a/src/gnome/dialog-lot-viewer.c +++ b/src/gnome/dialog-lot-viewer.c @@ -991,6 +991,9 @@ lv_create (GNCLotViewer *lv) lv->window = GTK_WIDGET(gtk_builder_get_object (builder, "lot_viewer_dialog")); + // Set the style context for this dialog so it can be easily manipulated with css + gnc_widget_set_style_context (GTK_WIDGET(lv->window), "GncLotViewerDialog"); + win_title = g_strdup_printf (_("Lots in Account %s"), xaccAccountGetName(lv->account)); gtk_window_set_title (GTK_WINDOW (lv->window), win_title); diff --git a/src/gnome/dialog-new-user.c b/src/gnome/dialog-new-user.c index aa839fd6aa..52075cef13 100644 --- a/src/gnome/dialog-new-user.c +++ b/src/gnome/dialog-new-user.c @@ -86,6 +86,9 @@ gnc_ui_new_user_dialog (void) dialog = GTK_WIDGET(gtk_builder_get_object (builder, "new_user_dialog")); + // Set the style context for this dialog so it can be easily manipulated with css + gnc_widget_set_style_context (GTK_WIDGET(dialog), "GncNewUserDialog"); + new_accounts_button = GTK_WIDGET(gtk_builder_get_object (builder, "new_accounts_button")); import_qif_button = GTK_WIDGET(gtk_builder_get_object (builder, "import_qif_button")); tutorial_button = GTK_WIDGET(gtk_builder_get_object (builder, "tutorial_button")); diff --git a/src/gnome/dialog-price-edit-db.c b/src/gnome/dialog-price-edit-db.c index 5d0373f91f..c0bade96e2 100644 --- a/src/gnome/dialog-price-edit-db.c +++ b/src/gnome/dialog-price-edit-db.c @@ -430,6 +430,9 @@ gnc_prices_dialog_create (GtkWidget * parent, PricesDialog *pdb_dialog) dialog = GTK_WIDGET(gtk_builder_get_object (builder, "prices_dialog")); pdb_dialog->dialog = dialog; + // Set the style context for this dialog so it can be easily manipulated with css + gnc_widget_set_style_context (GTK_WIDGET(dialog), "GncPriceEditDialog"); + pdb_dialog->session = gnc_get_current_session(); pdb_dialog->book = qof_session_get_book(pdb_dialog->session); pdb_dialog->price_db = gnc_pricedb_get_db(pdb_dialog->book); diff --git a/src/gnome/dialog-print-check.c b/src/gnome/dialog-print-check.c index 5e07851185..15d6d1135f 100644 --- a/src/gnome/dialog-print-check.c +++ b/src/gnome/dialog-print-check.c @@ -1649,6 +1649,9 @@ gnc_ui_print_check_dialog_create(GtkWidget *parent, pcd->builder = builder; pcd->dialog = GTK_WIDGET(gtk_builder_get_object (builder, "print_check_dialog")); + // Set the style context for this dialog so it can be easily manipulated with css + gnc_widget_set_style_context (GTK_WIDGET(pcd->dialog), "GncPrintCheckDialog"); + /* now pick out the relevant child widgets */ pcd->format_combobox = GTK_WIDGET(gtk_builder_get_object (builder, "check_format_combobox")); pcd->position_combobox = GTK_WIDGET(gtk_builder_get_object (builder, "check_position_combobox")); diff --git a/src/gnome/dialog-progress.c b/src/gnome/dialog-progress.c index 528259a8ff..843d12971c 100644 --- a/src/gnome/dialog-progress.c +++ b/src/gnome/dialog-progress.c @@ -207,6 +207,9 @@ gnc_progress_dialog_create(GtkWidget * parent, GNCProgressDialog *progress) dialog = GTK_WIDGET(gtk_builder_get_object (builder, "progress_dialog")); progress->dialog = dialog; + // Set the style context for this dialog so it can be easily manipulated with css + gnc_widget_set_style_context (GTK_WIDGET(dialog), "GncProgressDialog"); + /* parent */ if (parent != NULL) gtk_window_set_transient_for(GTK_WINDOW(dialog), GTK_WINDOW(parent)); diff --git a/src/gnome/dialog-sx-editor.c b/src/gnome/dialog-sx-editor.c index 52025bd8dc..d5d9107657 100644 --- a/src/gnome/dialog-sx-editor.c +++ b/src/gnome/dialog-sx-editor.c @@ -1195,6 +1195,9 @@ gnc_ui_scheduled_xaction_editor_dialog_create (SchedXaction *sx, sxed->endCountSpin = GTK_ENTRY(gtk_builder_get_object (builder, "end_spin")); sxed->endRemainSpin = GTK_ENTRY(gtk_builder_get_object (builder, "remain_spin")); + // Set the style context for this dialog so it can be easily manipulated with css + gnc_widget_set_style_context (GTK_WIDGET(sxed->dialog), "GncSxEditorDialog"); + /* Setup the end-date GNC widget */ { GtkWidget *endDateBox = GTK_WIDGET(gtk_builder_get_object (builder, "editor_end_date_box")); diff --git a/src/gnome/dialog-sx-editor2.c b/src/gnome/dialog-sx-editor2.c index 18e1f87ada..32cabe89e7 100644 --- a/src/gnome/dialog-sx-editor2.c +++ b/src/gnome/dialog-sx-editor2.c @@ -1165,6 +1165,9 @@ gnc_ui_scheduled_xaction_editor_dialog_create2 (SchedXaction *sx, sxed->endCountSpin = GTK_ENTRY (gtk_builder_get_object (builder, "end_spin")); sxed->endRemainSpin = GTK_ENTRY (gtk_builder_get_object (builder, "remain_spin")); + // Set the style context for this dialog so it can be easily manipulated with css + gnc_widget_set_style_context (GTK_WIDGET(sxed->dialog), "GncSxEditorDialog"); + /* Setup the end-date GNC widget */ { GtkWidget *endDateBox = GTK_WIDGET(gtk_builder_get_object (builder, "editor_end_date_box")); diff --git a/src/gnome/dialog-sx-from-trans.c b/src/gnome/dialog-sx-from-trans.c index 3e0666d559..5c6a93cb6b 100644 --- a/src/gnome/dialog-sx-from-trans.c +++ b/src/gnome/dialog-sx-from-trans.c @@ -769,6 +769,9 @@ gnc_sx_create_from_trans( Transaction *trans ) gnc_builder_add_from_file (builder , "dialog-sx.glade", "sx_from_real_trans_dialog"); dialog = GTK_WIDGET(gtk_builder_get_object (builder, "sx_from_real_trans_dialog")); + // Set the style context for this dialog so it can be easily manipulated with css + gnc_widget_set_style_context (GTK_WIDGET(dialog), "GncSxFromTransDialog"); + sxfti->builder = builder; sxfti->dialog = dialog; sxfti->trans = trans; diff --git a/src/gnome/dialog-sx-since-last-run.c b/src/gnome/dialog-sx-since-last-run.c index 5795ed78a4..5b6a5c3e16 100644 --- a/src/gnome/dialog-sx-since-last-run.c +++ b/src/gnome/dialog-sx-since-last-run.c @@ -971,6 +971,9 @@ gnc_ui_sx_since_last_run_dialog(GncSxInstanceModel *sx_instances, GList *auto_cr dialog->dialog = GTK_WIDGET(gtk_builder_get_object (builder, "since_last_run_dialog")); + // Set the style context for this dialog so it can be easily manipulated with css + gnc_widget_set_style_context (GTK_WIDGET(dialog->dialog), "GncSxSinceLastRunDialog"); + dialog->editing_model = gnc_sx_slr_tree_model_adapter_new(sx_instances); dialog->review_created_txns_toggle = GTK_TOGGLE_BUTTON(gtk_builder_get_object (builder, "review_txn_toggle")); diff --git a/src/gnome/dialog-tax-info.c b/src/gnome/dialog-tax-info.c index 9d5ad76cda..4f04c4e73c 100644 --- a/src/gnome/dialog-tax-info.c +++ b/src/gnome/dialog-tax-info.c @@ -1280,6 +1280,9 @@ gnc_tax_info_dialog_create (GtkWidget * parent, TaxInfoDialog *ti_dialog) dialog = GTK_WIDGET(gtk_builder_get_object (builder, "tax_information_dialog")); ti_dialog->dialog = dialog; + // Set the style context for this dialog so it can be easily manipulated with css + gnc_widget_set_style_context (GTK_WIDGET(dialog), "GncTaxInfoDialog"); + initialize_getters (); g_signal_connect (G_OBJECT (dialog), "response", diff --git a/src/gnome/dialog-trans-assoc.c b/src/gnome/dialog-trans-assoc.c index dc087a9c37..9c752bf4dd 100644 --- a/src/gnome/dialog-trans-assoc.c +++ b/src/gnome/dialog-trans-assoc.c @@ -392,6 +392,9 @@ gnc_assoc_dialog_create (AssocDialog *assoc_dialog) dialog = GTK_WIDGET(gtk_builder_get_object (builder, "transaction_association_dialog")); assoc_dialog->dialog = dialog; + // Set the style context for this dialog so it can be easily manipulated with css + gnc_widget_set_style_context (GTK_WIDGET(dialog), "GncTransAssocDialog"); + assoc_dialog->view = GTK_WIDGET(gtk_builder_get_object (builder, "treeview")); path_head = GTK_WIDGET(gtk_builder_get_object (builder, "path-head")); diff --git a/src/gnome/gnc-budget-view.c b/src/gnome/gnc-budget-view.c index 0952ba7a0b..3b1df98fe5 100644 --- a/src/gnome/gnc-budget-view.c +++ b/src/gnome/gnc-budget-view.c @@ -332,6 +332,9 @@ gbv_create_widget(GncBudgetView *view) gtk_widget_show(GTK_WIDGET(vbox)); gtk_box_set_homogeneous(GTK_BOX(vbox), FALSE); + // Set the style context for this page so it can be easily manipulated with css + gnc_widget_set_style_context (GTK_WIDGET(vbox), "GncBudgetPage"); + scrolled_window = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_window), GTK_POLICY_AUTOMATIC, diff --git a/src/gnome/gnc-plugin-page-account-tree.c b/src/gnome/gnc-plugin-page-account-tree.c index 88cddbdc97..6ff83e7172 100644 --- a/src/gnome/gnc-plugin-page-account-tree.c +++ b/src/gnome/gnc-plugin-page-account-tree.c @@ -636,6 +636,9 @@ gnc_plugin_page_account_tree_create_widget (GncPluginPage *plugin_page) gtk_box_set_homogeneous (GTK_BOX (priv->widget), FALSE); gtk_widget_show (priv->widget); + // Set the style context for this page so it can be easily manipulated with css + gnc_widget_set_style_context (GTK_WIDGET(priv->widget), "GncAccountPage"); + scrolled_window = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); diff --git a/src/gnome/gnc-plugin-page-register.c b/src/gnome/gnc-plugin-page-register.c index 519f64759f..97f7e16a64 100644 --- a/src/gnome/gnc-plugin-page-register.c +++ b/src/gnome/gnc-plugin-page-register.c @@ -1085,6 +1085,9 @@ gnc_plugin_page_register_create_widget (GncPluginPage *plugin_page) gtk_box_set_homogeneous (GTK_BOX (priv->widget), FALSE); gtk_widget_show (priv->widget); + // Set the style context for this page so it can be easily manipulated with css + gnc_widget_set_style_context (GTK_WIDGET(priv->widget), "GncRegisterPage"); + numRows = priv->lines_default; numRows = MIN(numRows, DEFAULT_LINES_AMOUNT); diff --git a/src/gnome/gnc-plugin-page-register2.c b/src/gnome/gnc-plugin-page-register2.c index fbc414c188..89ad533335 100644 --- a/src/gnome/gnc-plugin-page-register2.c +++ b/src/gnome/gnc-plugin-page-register2.c @@ -1095,6 +1095,9 @@ gnc_plugin_page_register2_create_widget (GncPluginPage *plugin_page) gtk_box_set_homogeneous (GTK_BOX (priv->widget), FALSE); gtk_widget_show (priv->widget); + // Set the style context for this page so it can be easily manipulated with css + gnc_widget_set_style_context (GTK_WIDGET(priv->widget), "GncRegisterPage"); + numRows = priv->lines_default; numRows = MIN (numRows, DEFAULT_LINES_AMOUNT); diff --git a/src/gnome/gnc-plugin-page-sx-list.c b/src/gnome/gnc-plugin-page-sx-list.c index c410e242f5..dfeffd2d47 100644 --- a/src/gnome/gnc-plugin-page-sx-list.c +++ b/src/gnome/gnc-plugin-page-sx-list.c @@ -371,6 +371,9 @@ gnc_plugin_page_sx_list_create_widget (GncPluginPage *plugin_page) priv->widget = widget; gtk_widget_show (priv->widget); + // Set the style context for this page so it can be easily manipulated with css + gnc_widget_set_style_context (GTK_WIDGET(priv->widget), "GncSxPage"); + /* Add vbox and label */ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); gtk_box_set_homogeneous (GTK_BOX (vbox), FALSE); diff --git a/src/gnome/window-autoclear.c b/src/gnome/window-autoclear.c index 2b977f8ebb..fc7c2868a1 100644 --- a/src/gnome/window-autoclear.c +++ b/src/gnome/window-autoclear.c @@ -314,6 +314,9 @@ autoClearWindow (GtkWidget *parent, Account *account) gtk_window_set_title(GTK_WINDOW(data->window), title); g_free (title); + // Set the style context for this dialog so it can be easily manipulated with css + gnc_widget_set_style_context (GTK_WIDGET(data->window), "GncAutoClearDialog"); + /* Add amount edit box */ data->end_value = GNC_AMOUNT_EDIT(gnc_amount_edit_new()); g_signal_connect(GTK_WIDGET(data->end_value), "activate", diff --git a/src/gnome/window-reconcile.c b/src/gnome/window-reconcile.c index 7bece1d4b4..d6b6c66c06 100644 --- a/src/gnome/window-reconcile.c +++ b/src/gnome/window-reconcile.c @@ -732,6 +732,9 @@ startRecnWindow(GtkWidget *parent, Account *account, dialog = GTK_WIDGET(gtk_builder_get_object (builder, "reconcile_start_dialog")); + // Set the style context for this dialog so it can be easily manipulated with css + gnc_widget_set_style_context (GTK_WIDGET(dialog), "GncReconcileDialog"); + title = gnc_recn_make_window_name (account); gtk_window_set_title(GTK_WINDOW(dialog), title); g_free (title); diff --git a/src/gnome/window-reconcile2.c b/src/gnome/window-reconcile2.c index 4ad5af5b30..5f5409c397 100644 --- a/src/gnome/window-reconcile2.c +++ b/src/gnome/window-reconcile2.c @@ -695,6 +695,9 @@ startRecnWindow (GtkWidget *parent, Account *account, dialog = GTK_WIDGET(gtk_builder_get_object (builder, "reconcile_start_dialog")); + // Set the style context for this dialog so it can be easily manipulated with css + gnc_widget_set_style_context (GTK_WIDGET(dialog), "GncReconcileDialog"); + title = gnc_recn_make_window_name (account); gtk_window_set_title (GTK_WINDOW (dialog), title); g_free (title);