[Gnucash-changes] Changes because called functions have moved to
the base gnc tree view.
David Hampton
hampton at cvs.gnucash.org
Sat May 21 00:57:45 EDT 2005
Log Message:
-----------
Changes because called functions have moved to the base gnc tree view.
Tags:
----
gnucash-gnome2-dev
Modified Files:
--------------
gnucash/src/gnome:
dialog-budget-category.c
dialog-commodities.c
dialog-price-edit-db.c
druid-hierarchy.c
gnc-plugin-page-account-tree.c
gnucash/src/import-export:
import-account-matcher.c
Revision Data
-------------
Index: gnc-plugin-page-account-tree.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/Attic/gnc-plugin-page-account-tree.c,v
retrieving revision 1.1.2.38
retrieving revision 1.1.2.39
diff -Lsrc/gnome/gnc-plugin-page-account-tree.c -Lsrc/gnome/gnc-plugin-page-account-tree.c -u -r1.1.2.38 -r1.1.2.39
--- src/gnome/gnc-plugin-page-account-tree.c
+++ src/gnome/gnc-plugin-page-account-tree.c
@@ -114,7 +114,6 @@
static void gnc_plugin_page_acct_tree_options_new(GncPluginPageAccountTreePrivate *priv);
-static void gnc_plugin_page_account_tree_configure (GncPluginPageAccountTreePrivate *priv);
static guint plugin_page_signals[LAST_SIGNAL] = { 0 };
@@ -506,6 +505,11 @@
TRUE, TRUE, 0);
tree_view = gnc_tree_view_account_new(FALSE);
+ g_object_set(G_OBJECT(tree_view),
+ "gconf-section", GCONF_SECTION,
+ "show-column-menu", TRUE,
+ NULL);
+
page->priv->tree_view = tree_view;
selection = gtk_tree_view_get_selection(tree_view);
g_signal_connect (G_OBJECT (selection), "changed",
@@ -518,7 +522,6 @@
G_CALLBACK (gnc_plugin_page_account_tree_double_click_cb), page);
gtk_tree_view_set_headers_visible(tree_view, TRUE);
- gnc_plugin_page_account_tree_configure (page->priv);
gnc_plugin_page_account_tree_selection_changed_cb (NULL, page);
gtk_widget_show (GTK_WIDGET (tree_view));
gtk_container_add (GTK_CONTAINER (scrolled_window), GTK_WIDGET(tree_view));
@@ -532,8 +535,6 @@
gnc_get_current_session());
plugin_page->summarybar = gnc_main_window_summary_new();
- gnc_tree_view_account_restore_settings(GNC_TREE_VIEW_ACCOUNT(tree_view),
- GCONF_SECTION);
gtk_widget_show(plugin_page->summarybar);
LEAVE("widget = %p", page->priv->widget);
@@ -548,9 +549,6 @@
ENTER("page %p", plugin_page);
page = GNC_PLUGIN_PAGE_ACCOUNT_TREE (plugin_page);
- gnc_tree_view_account_save_settings(GNC_TREE_VIEW_ACCOUNT(page->priv->tree_view),
- GCONF_SECTION);
-
if (page->priv->widget) {
g_object_unref(G_OBJECT(page->priv->widget));
page->priv->widget = NULL;
@@ -897,23 +895,6 @@
/******************************/
static void
-gnc_plugin_page_account_tree_configure (GncPluginPageAccountTreePrivate *priv)
-{
- GtkTreeView *tree_view;
- GSList *list;
-
- ENTER(" ");
- tree_view = priv->tree_view;
- list = gnc_option_db_lookup_list_option(priv->odb,
- "Account Tree",
- "Account fields to display",
- NULL);
- gnc_tree_view_account_configure_columns (GNC_TREE_VIEW_ACCOUNT(tree_view), list);
- gnc_free_list_option_value (list);
- LEAVE(" ");
-}
-
-static void
gnc_plugin_page_account_tree_options_apply_cb (GNCOptionWin * propertybox,
gpointer user_data)
{
@@ -923,7 +904,6 @@
ENTER(" ");
gnc_option_db_commit(priv->odb);
- gnc_plugin_page_account_tree_configure (priv);
LEAVE(" ");
}
Index: dialog-budget-category.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/Attic/dialog-budget-category.c,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -Lsrc/gnome/dialog-budget-category.c -Lsrc/gnome/dialog-budget-category.c -u -r1.1.2.3 -r1.1.2.4
--- src/gnome/dialog-budget-category.c
+++ src/gnome/dialog-budget-category.c
@@ -257,7 +257,7 @@
dlg->relatedView = gnc_tree_view_account_new(FALSE);
gtk_container_add(GTK_CONTAINER(box), GTK_WIDGET(dlg->relatedView));
- gnc_tree_view_account_configure_columns(GNC_TREE_VIEW_ACCOUNT(dlg->relatedView), NULL);
+ gnc_tree_view_configure_columns(GNC_TREE_VIEW(dlg->relatedView), NULL);
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(dlg->relatedView));
gtk_tree_selection_set_mode (selection, GTK_SELECTION_MULTIPLE);
Index: druid-hierarchy.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/druid-hierarchy.c,v
retrieving revision 1.21.4.12
retrieving revision 1.21.4.13
diff -Lsrc/gnome/druid-hierarchy.c -Lsrc/gnome/druid-hierarchy.c -u -r1.21.4.12 -r1.21.4.13
--- src/gnome/druid-hierarchy.c
+++ src/gnome/druid-hierarchy.c
@@ -425,6 +425,8 @@
gtk_label_set_text (data->category_description, gea->long_description);
tree_view = gnc_tree_view_account_new_with_group (gea->group, FALSE);
+ gnc_tree_view_configure_columns (GNC_TREE_VIEW(tree_view), NULL);
+
data->category_accounts_tree = tree_view;
gtk_tree_view_expand_all (tree_view);
gtk_container_add(GTK_CONTAINER(data->category_accounts_box), GTK_WIDGET(tree_view));
@@ -697,7 +699,6 @@
GtkCellRenderer *renderer;
GtkTreeViewColumn *column;
gnc_commodity *com;
- GSList *list = NULL;
GtkWidget *entry;
/* Anything to do? */
@@ -726,10 +727,8 @@
tree_view = GTK_TREE_VIEW(data->final_account_tree);
gtk_tree_view_set_headers_visible (tree_view, TRUE);
- list = g_slist_append(list, "type");
- list = g_slist_append(list, "placeholder");
- gnc_tree_view_account_configure_columns (data->final_account_tree, list);
- g_slist_free(list);
+ gnc_tree_view_configure_columns (GNC_TREE_VIEW(data->final_account_tree),
+ "type", "placeholder", NULL);
selection = gtk_tree_view_get_selection (tree_view);
gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
@@ -747,7 +746,7 @@
gtk_tree_view_column_set_cell_data_func (column, renderer,
balance_cell_data_func,
(gpointer)data, NULL);
- gtk_tree_view_append_column (tree_view, column);
+ gnc_tree_view_append_column (GNC_TREE_VIEW(tree_view), column);
gtk_container_add(GTK_CONTAINER(data->final_account_tree_box),
GTK_WIDGET(data->final_account_tree));
Index: dialog-price-edit-db.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/dialog-price-edit-db.c,v
retrieving revision 1.5.4.13
retrieving revision 1.5.4.14
diff -Lsrc/gnome/dialog-price-edit-db.c -Lsrc/gnome/dialog-price-edit-db.c -u -r1.5.4.13 -r1.5.4.14
--- src/gnome/dialog-price-edit-db.c
+++ src/gnome/dialog-price-edit-db.c
@@ -340,10 +340,12 @@
/* price tree */
scrolled_window = glade_xml_get_widget (xml, "price_list_window");
- view = gnc_tree_view_price_new(gnc_get_current_book());
+ view = gnc_tree_view_price_new(gnc_get_current_book(),
+ "gconf-section", GCONF_SECTION,
+ "show-column-menu", TRUE,
+ NULL);
pdb_dialog->price_tree = GNC_TREE_VIEW_PRICE(view);
gtk_container_add (GTK_CONTAINER (scrolled_window), GTK_WIDGET(view));
- gtk_tree_view_set_headers_visible(view, TRUE);
gnc_tree_view_price_set_filter (pdb_dialog->price_tree,
gnc_price_dialog_filter_ns_func,
gnc_price_dialog_filter_cm_func,
@@ -369,7 +371,6 @@
}
gnc_restore_window_size(GCONF_SECTION, GTK_WINDOW(pdb_dialog->dialog));
- gnc_tree_view_price_restore_settings(pdb_dialog->price_tree, GCONF_SECTION);
LEAVE(" ");
}
@@ -380,7 +381,6 @@
ENTER(" ");
gnc_save_window_size(GCONF_SECTION, GTK_WINDOW(pdb_dialog->dialog));
- gnc_tree_view_price_save_settings(pdb_dialog->price_tree, GCONF_SECTION);
gtk_widget_destroy (GTK_WIDGET (pdb_dialog->dialog));
LEAVE(" ");
Index: dialog-commodities.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/dialog-commodities.c,v
retrieving revision 1.14.4.11
retrieving revision 1.14.4.12
diff -Lsrc/gnome/dialog-commodities.c -Lsrc/gnome/dialog-commodities.c -u -r1.14.4.11 -r1.14.4.12
--- src/gnome/dialog-commodities.c
+++ src/gnome/dialog-commodities.c
@@ -291,7 +291,10 @@
/* commodity tree */
scrolled_window = glade_xml_get_widget (xml, "commodity_list_window");
- view = gnc_tree_view_commodity_new(gnc_get_current_book ());
+ view = gnc_tree_view_commodity_new(gnc_get_current_book (),
+ "gconf-section", GCONF_SECTION,
+ "show-column-menu", TRUE,
+ NULL);
cd->commodity_tree = GNC_TREE_VIEW_COMMODITY(view);
gtk_container_add (GTK_CONTAINER (scrolled_window), GTK_WIDGET(view));
gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(cd->commodity_tree), TRUE);
@@ -309,8 +312,6 @@
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(button), cd->show_currencies);
gnc_restore_window_size (GCONF_SECTION, GTK_WINDOW(cd->dialog));
- gnc_tree_view_commodity_restore_settings (cd->commodity_tree,
- GCONF_SECTION);
}
static void
@@ -321,7 +322,6 @@
gnc_save_window_size(GCONF_SECTION, GTK_WINDOW(cd->dialog));
gnc_gconf_set_bool(GCONF_SECTION, "include_iso", cd->show_currencies, NULL);
- gnc_tree_view_commodity_save_settings (cd->commodity_tree, GCONF_SECTION);
gtk_widget_destroy(cd->dialog);
}
Index: import-account-matcher.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/import-account-matcher.c,v
retrieving revision 1.7.4.6
retrieving revision 1.7.4.7
diff -Lsrc/import-export/import-account-matcher.c -Lsrc/import-export/import-account-matcher.c -u -r1.7.4.6 -r1.7.4.7
--- src/import-export/import-account-matcher.c
+++ src/import-export/import-account-matcher.c
@@ -63,7 +63,6 @@
build_acct_tree(struct _accountpickerdialog * picker)
{
GtkTreeView *account_tree;
- GSList *list = NULL;
/* Build a new account tree */
TRACE("Begin");
@@ -72,10 +71,8 @@
gtk_tree_view_set_headers_visible (account_tree, TRUE);
/* Configure the columns */
- list = g_slist_append(list, "type");
- list = g_slist_append(list, "description");
- gnc_tree_view_account_configure_columns (picker->account_tree, list);
- g_slist_free(list);
+ gnc_tree_view_configure_columns (GNC_TREE_VIEW(picker->account_tree),
+ "type", "description");
/* Add our custom column. */
gnc_tree_view_account_add_kvp_column (picker->account_tree,
More information about the gnucash-changes
mailing list