mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Add grid line preference to various tree views
I have tried to add the grid line preference to tree views with more than one column. There maybe more required. With the addition of css classes, individual tree view grids maybe turned off by setting the border colour to transparent.
This commit is contained in:
parent
4cd13a0e17
commit
632764e1e2
@ -993,6 +993,9 @@ new_payment_window (GncOwner *owner, QofBook *book, GncInvoice *invoice)
|
||||
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(pw->docs_list_tree_view));
|
||||
gtk_tree_selection_set_mode (selection, GTK_SELECTION_MULTIPLE);
|
||||
|
||||
// Set grid lines option to preference
|
||||
gtk_tree_view_set_grid_lines (GTK_TREE_VIEW(pw->docs_list_tree_view), gnc_tree_view_get_grid_lines_pref ());
|
||||
|
||||
/* Configure date column */
|
||||
renderer = gtk_cell_renderer_text_new ();
|
||||
column = gtk_tree_view_get_column (GTK_TREE_VIEW (pw->docs_list_tree_view), 0);
|
||||
|
@ -322,6 +322,9 @@ gnc_query_view_init_view (GNCQueryView *qview)
|
||||
/* compute the number of columns and fill in the rest of the view */
|
||||
qview->num_columns = g_list_length (qview->column_params);
|
||||
|
||||
// Set grid lines option to preference
|
||||
gtk_tree_view_set_grid_lines (GTK_TREE_VIEW(view), gnc_tree_view_get_grid_lines_pref ());
|
||||
|
||||
for (i = 0, node = qview->column_params; node; node = node->next, i++)
|
||||
{
|
||||
const char *type;
|
||||
|
@ -44,6 +44,7 @@
|
||||
#include "gnc-gobject-utils.h"
|
||||
#include "gnc-cell-renderer-date.h"
|
||||
#include "gnc-state.h"
|
||||
#include "dialog-utils.h"
|
||||
|
||||
/* The actual state key for a particular column visibility. This is
|
||||
* attached to the menu items that are in the column selection menu.
|
||||
@ -266,6 +267,9 @@ gnc_tree_view_init (GncTreeView *view, GncTreeViewClass *klass)
|
||||
|
||||
gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_FIXED);
|
||||
|
||||
// Set grid lines option to preference
|
||||
gtk_tree_view_set_grid_lines (GTK_TREE_VIEW(view), gnc_tree_view_get_grid_lines_pref ());
|
||||
|
||||
/* Create the last column which contains the column selection
|
||||
* widget. gnc_tree_view_add_text_column will do most of the
|
||||
* work. */
|
||||
|
@ -1822,6 +1822,9 @@ loan_rev_prep( GtkAssistant *assistant, gpointer user_data )
|
||||
gtk_tree_view_new_with_model( GTK_TREE_MODEL(store) ));
|
||||
g_object_unref(store);
|
||||
|
||||
// Set grid lines option to preference
|
||||
gtk_tree_view_set_grid_lines (GTK_TREE_VIEW(ldd->revView), gnc_tree_view_get_grid_lines_pref ());
|
||||
|
||||
renderer = gtk_cell_renderer_text_new();
|
||||
column = gtk_tree_view_column_new_with_attributes(_("Date"), renderer,
|
||||
"text", LOAN_COL_DATE,
|
||||
|
@ -564,6 +564,9 @@ gnc_stock_split_assistant_create (StockSplitInfo *info)
|
||||
|
||||
view = GTK_TREE_VIEW(info->account_view);
|
||||
|
||||
// Set grid lines option to preference
|
||||
gtk_tree_view_set_grid_lines (GTK_TREE_VIEW(view), gnc_tree_view_get_grid_lines_pref ());
|
||||
|
||||
store = gtk_list_store_new(NUM_SPLIT_COLS, G_TYPE_POINTER, G_TYPE_STRING,
|
||||
G_TYPE_STRING, G_TYPE_STRING);
|
||||
gtk_tree_view_set_model(view, GTK_TREE_MODEL(store));
|
||||
|
@ -301,6 +301,9 @@ gnc_find_account_dialog_create (GtkWidget *parent, FindAccountDialog *facc_dialo
|
||||
gtk_tree_view_set_rules_hint (GTK_TREE_VIEW(facc_dialog->view), TRUE);
|
||||
#endif
|
||||
|
||||
// Set grid lines option to preference
|
||||
gtk_tree_view_set_grid_lines (GTK_TREE_VIEW(facc_dialog->view), gnc_tree_view_get_grid_lines_pref ());
|
||||
|
||||
/* default to 'close' button */
|
||||
gtk_dialog_set_default_response (GTK_DIALOG(dialog), GTK_RESPONSE_CLOSE);
|
||||
|
||||
|
@ -691,6 +691,10 @@ gnc_imap_dialog_create (GtkWidget *parent, ImapDialog *imap_dialog)
|
||||
#if !GTK_CHECK_VERSION(3, 14, 0)
|
||||
gtk_tree_view_set_rules_hint (GTK_TREE_VIEW(imap_dialog->view), TRUE);
|
||||
#endif
|
||||
|
||||
// Set grid lines option to preference
|
||||
gtk_tree_view_set_grid_lines (GTK_TREE_VIEW(imap_dialog->view), gnc_tree_view_get_grid_lines_pref ());
|
||||
|
||||
/* default to 'close' button */
|
||||
gtk_dialog_set_default_response (GTK_DIALOG(dialog), GTK_RESPONSE_CLOSE);
|
||||
|
||||
|
@ -1017,6 +1017,15 @@ lv_create (GNCLotViewer *lv)
|
||||
lv->remove_split_from_lot_button = GTK_BUTTON(gtk_builder_get_object (builder, "remove_split_from_lot_button"));
|
||||
lv_init_split_buttons(lv);
|
||||
|
||||
// Set grid lines option to preference
|
||||
gtk_tree_view_set_grid_lines (GTK_TREE_VIEW(lv->lot_view), gnc_tree_view_get_grid_lines_pref ());
|
||||
|
||||
// Set grid lines option to preference
|
||||
gtk_tree_view_set_grid_lines (GTK_TREE_VIEW(lv->split_in_lot_view), gnc_tree_view_get_grid_lines_pref ());
|
||||
|
||||
// Set grid lines option to preference
|
||||
gtk_tree_view_set_grid_lines (GTK_TREE_VIEW(lv->split_free_view), gnc_tree_view_get_grid_lines_pref ());
|
||||
|
||||
|
||||
if (gnc_prefs_get_bool(GNC_PREFS_GROUP_GENERAL, GNC_PREF_SAVE_GEOMETRY))
|
||||
{
|
||||
|
@ -1774,6 +1774,9 @@ _sx_engine_event_handler(QofInstance *ent, QofEventId event_type, gpointer user_
|
||||
|
||||
list = GTK_TREE_VIEW(gtk_builder_get_object (builder, "sx_list"));
|
||||
|
||||
// Set grid lines option to preference
|
||||
gtk_tree_view_set_grid_lines (GTK_TREE_VIEW(list), gnc_tree_view_get_grid_lines_pref ());
|
||||
|
||||
data = (acct_deletion_handler_data*)g_new0(acct_deletion_handler_data, 1);
|
||||
data->dialog = dialog;
|
||||
data->affected_sxes = affected_sxes;
|
||||
|
@ -1722,6 +1722,9 @@ _sx_engine_event_handler (QofInstance *ent, QofEventId event_type, gpointer user
|
||||
|
||||
list = GTK_TREE_VIEW (gtk_builder_get_object (builder, "sx_list"));
|
||||
|
||||
// Set grid lines option to preference
|
||||
gtk_tree_view_set_grid_lines (GTK_TREE_VIEW(list), gnc_tree_view_get_grid_lines_pref ());
|
||||
|
||||
data = (acct_deletion_handler_data*)g_new0 (acct_deletion_handler_data, 1);
|
||||
data->dialog = dialog;
|
||||
data->affected_sxes = affected_sxes;
|
||||
|
@ -1029,6 +1029,9 @@ gnc_ui_sx_since_last_run_dialog(GncSxInstanceModel *sx_instances, GList *auto_cr
|
||||
gtk_tree_view_expand_all(dialog->instance_view);
|
||||
}
|
||||
|
||||
// Set grid lines option to preference
|
||||
gtk_tree_view_set_grid_lines (GTK_TREE_VIEW(dialog->instance_view), gnc_tree_view_get_grid_lines_pref ());
|
||||
|
||||
g_signal_connect(G_OBJECT(dialog->dialog), "response", G_CALLBACK(dialog_response_cb), dialog);
|
||||
g_signal_connect(G_OBJECT(dialog->dialog), "destroy", G_CALLBACK(dialog_destroy_cb), dialog);
|
||||
|
||||
|
@ -438,6 +438,10 @@ gnc_assoc_dialog_create (AssocDialog *assoc_dialog)
|
||||
#if !GTK_CHECK_VERSION(3, 14, 0)
|
||||
gtk_tree_view_set_rules_hint (GTK_TREE_VIEW(assoc_dialog->view), TRUE);
|
||||
#endif
|
||||
|
||||
// Set grid lines option to preference
|
||||
gtk_tree_view_set_grid_lines (GTK_TREE_VIEW(assoc_dialog->view), gnc_tree_view_get_grid_lines_pref ());
|
||||
|
||||
/* default to 'close' button */
|
||||
gtk_dialog_set_default_response (GTK_DIALOG(dialog), GTK_RESPONSE_CLOSE);
|
||||
|
||||
|
@ -399,6 +399,9 @@ gbv_create_widget(GncBudgetView *view)
|
||||
totals_tree_view = GTK_TREE_VIEW(gtk_tree_view_new());
|
||||
priv->totals_tree_view = totals_tree_view;
|
||||
|
||||
// Set grid lines option to preference
|
||||
gtk_tree_view_set_grid_lines (GTK_TREE_VIEW(totals_tree_view), gnc_tree_view_get_grid_lines_pref ());
|
||||
|
||||
gtk_widget_show(GTK_WIDGET(totals_tree_view));
|
||||
gtk_tree_selection_set_mode(gtk_tree_view_get_selection(totals_tree_view),
|
||||
GTK_SELECTION_NONE);
|
||||
|
Loading…
Reference in New Issue
Block a user