From 8b496553494edc5be9d8ceff28697555bc4fcfc8 Mon Sep 17 00:00:00 2001 From: David Hampton Date: Fri, 3 Feb 2006 04:38:01 +0000 Subject: [PATCH] Change the default visibilities of the GncTreeViewAccount widget to only show the account name column. This is the most commonly used case for this widget. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13085 57a11ea4-9604-0410-9ed3-97b8803252fd --- ChangeLog | 12 ++++++++++++ src/business/dialog-tax-table/dialog-tax-table.c | 1 - src/gnome-utils/dialog-account.c | 1 - src/gnome-utils/gnc-tree-view-account.c | 3 ++- src/gnome/dialog-tax-info.c | 1 - src/gnome/druid-hierarchy.c | 1 - src/gnome/druid-stock-split.c | 2 -- src/gnome/gnc-plugin-page-account-tree.c | 2 ++ 8 files changed, 16 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index a2211d6be3..f47a0afbdb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2006-02-02 David Hampton + + * src/business/dialog-tax-table/dialog-tax-table.c: + * src/gnome-utils/gnc-tree-view-account.c: + * src/gnome-utils/dialog-account.c: + * src/gnome/gnc-plugin-page-account-tree.c: + * src/gnome/druid-stock-split.c: + * src/gnome/dialog-tax-info.c: + * src/gnome/druid-hierarchy.c: Change the default visibilities of + the GncTreeViewAccount widget to only show the account name + column. This is the most commonly used case for this widget. + 2006-02-02 Joshua Sled * lib/libqof/qof/qofsession.c (qof_session_load_backend): get+load diff --git a/src/business/dialog-tax-table/dialog-tax-table.c b/src/business/dialog-tax-table/dialog-tax-table.c index 158f1d8f64..df42e13ab2 100644 --- a/src/business/dialog-tax-table/dialog-tax-table.c +++ b/src/business/dialog-tax-table/dialog-tax-table.c @@ -259,7 +259,6 @@ new_tax_table_dialog (TaxTableWindow *ttw, gboolean new_table, ntt->acct_tree = GTK_WIDGET(gnc_tree_view_account_new (FALSE)); gtk_container_add (GTK_CONTAINER (box), ntt->acct_tree); gtk_tree_view_set_headers_visible (GTK_TREE_VIEW(ntt->acct_tree), FALSE); - gnc_tree_view_configure_columns (GNC_TREE_VIEW(ntt->acct_tree), NULL); /* Make 'enter' do the right thing */ gtk_entry_set_activates_default(GTK_ENTRY (gnc_amount_edit_gtk_entry diff --git a/src/gnome-utils/dialog-account.c b/src/gnome-utils/dialog-account.c index 74a096576a..12c1fc1774 100644 --- a/src/gnome-utils/dialog-account.c +++ b/src/gnome-utils/dialog-account.c @@ -1339,7 +1339,6 @@ gnc_account_window_create(AccountWindow *aw) // group = gnc_book_get_group (gnc_get_current_book ()); aw->parent_tree = gnc_tree_view_account_new(TRUE); gtk_container_add(GTK_CONTAINER(box), GTK_WIDGET(aw->parent_tree)); - gnc_tree_view_configure_columns (GNC_TREE_VIEW(aw->parent_tree), NULL); gtk_widget_show(GTK_WIDGET(aw->parent_tree)); aw->top_level_account = gnc_tree_view_account_get_top_level (GNC_TREE_VIEW_ACCOUNT(aw->parent_tree)); diff --git a/src/gnome-utils/gnc-tree-view-account.c b/src/gnome-utils/gnc-tree-view-account.c index a059bace2b..aa2be74be1 100644 --- a/src/gnome-utils/gnc-tree-view-account.c +++ b/src/gnome-utils/gnc-tree-view-account.c @@ -512,7 +512,8 @@ gnc_tree_view_account_new_with_group (AccountGroup *group, gboolean show_root) sort_by_placeholder, gnc_tree_view_account_placeholder_toggled); - gnc_tree_view_configure_columns(view, "description", "total", NULL); + /* By default only the first column is visible. */ + gnc_tree_view_configure_columns(view, NULL); gtk_tree_model_filter_set_visible_func (GTK_TREE_MODEL_FILTER (f_model), gnc_tree_view_account_filter_helper, view, diff --git a/src/gnome/dialog-tax-info.c b/src/gnome/dialog-tax-info.c index 8595414eef..dfb408b11c 100644 --- a/src/gnome/dialog-tax-info.c +++ b/src/gnome/dialog-tax-info.c @@ -752,7 +752,6 @@ gnc_tax_info_dialog_create (GtkWidget * parent, TaxInfoDialog *ti_dialog) box = glade_xml_get_widget (xml, "account_hbox"); tree_view = gnc_tree_view_account_new (FALSE); - gnc_tree_view_configure_columns (GNC_TREE_VIEW(tree_view), NULL); gnc_tree_view_account_set_filter (GNC_TREE_VIEW_ACCOUNT(tree_view), gnc_tax_info_dialog_account_filter_func, ti_dialog, NULL); diff --git a/src/gnome/druid-hierarchy.c b/src/gnome/druid-hierarchy.c index d6d79071c5..2029daf6f0 100644 --- a/src/gnome/druid-hierarchy.c +++ b/src/gnome/druid-hierarchy.c @@ -384,7 +384,6 @@ categories_tree_selection_changed (GtkTreeSelection *selection, gtk_text_buffer_set_text(buffer, gea->long_description, -1); tree_view = gnc_tree_view_account_new_with_group (gea->group, FALSE); - gnc_tree_view_configure_columns (GNC_TREE_VIEW(tree_view), NULL); /* Override the normal fixed (user settable) sizing */ column = gtk_tree_view_get_column(GTK_TREE_VIEW(tree_view), 0); gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); diff --git a/src/gnome/druid-stock-split.c b/src/gnome/druid-stock-split.c index f9b2ecd690..6d8486b354 100644 --- a/src/gnome/druid-stock-split.c +++ b/src/gnome/druid-stock-split.c @@ -659,7 +659,6 @@ gnc_stock_split_druid_create (StockSplitInfo *info) /* income tree */ tree = GTK_WIDGET(gnc_tree_view_account_new (FALSE)); - gnc_tree_view_configure_columns(GNC_TREE_VIEW(tree), NULL); info->income_tree = tree; gnc_tree_view_account_set_filter (GNC_TREE_VIEW_ACCOUNT (tree), gnc_stock_split_druid_view_filter_income, @@ -677,7 +676,6 @@ gnc_stock_split_druid_create (StockSplitInfo *info) /* asset tree */ tree = GTK_WIDGET(gnc_tree_view_account_new (FALSE)); - gnc_tree_view_configure_columns(GNC_TREE_VIEW(tree), NULL); info->asset_tree = tree; gnc_tree_view_account_set_filter (GNC_TREE_VIEW_ACCOUNT (tree), gnc_stock_split_druid_view_filter_asset, diff --git a/src/gnome/gnc-plugin-page-account-tree.c b/src/gnome/gnc-plugin-page-account-tree.c index 88316a4868..6ea99dbbc8 100644 --- a/src/gnome/gnc-plugin-page-account-tree.c +++ b/src/gnome/gnc-plugin-page-account-tree.c @@ -417,6 +417,8 @@ gnc_plugin_page_account_tree_create_widget (GncPluginPage *plugin_page) TRUE, TRUE, 0); tree_view = gnc_tree_view_account_new(FALSE); + gnc_tree_view_configure_columns(GNC_TREE_VIEW(tree_view), + "description", "total", NULL); g_object_set(G_OBJECT(tree_view), "gconf-section", GCONF_SECTION, "show-column-menu", TRUE,