Remove function that no longer adds value

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23352 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Geert Janssens
2013-10-29 19:26:39 +00:00
parent 4cfe666dfc
commit b3c33b7fdb
8 changed files with 6 additions and 39 deletions

View File

@@ -705,7 +705,7 @@ gnc_tree_view_account_new_with_root (Account *root, gboolean show_root)
/* Set up the view private sort layer on the common model. */
s_model = gtk_tree_model_sort_new_with_model(f_model);
g_object_unref(G_OBJECT(f_model));
gnc_tree_view_set_model (view, s_model);
gtk_tree_view_set_model (GTK_TREE_VIEW (view), s_model);
g_object_unref(G_OBJECT(s_model));
/* Set default visibilities */

View File

@@ -371,7 +371,7 @@ gnc_tree_view_commodity_new (QofBook *book,
/* Create our view */
view = g_object_new (GNC_TYPE_TREE_VIEW_COMMODITY,
"name", "commodity_tree", NULL);
gnc_tree_view_set_model (view, s_model);
gtk_tree_view_set_model (GTK_TREE_VIEW (view), s_model);
g_object_unref(G_OBJECT(s_model));
DEBUG("model ref count is %d", G_OBJECT(model)->ref_count);

View File

@@ -385,7 +385,7 @@ gnc_tree_view_owner_new (GncOwnerType owner_type)
/* Set up the view private sort layer on the common model. */
s_model = gtk_tree_model_sort_new_with_model(f_model);
g_object_unref(G_OBJECT(f_model));
gnc_tree_view_set_model (view, s_model);
gtk_tree_view_set_model (GTK_TREE_VIEW (view), s_model);
g_object_unref(G_OBJECT(s_model));
/* Set default visibilities */

View File

@@ -412,7 +412,7 @@ gnc_tree_view_price_new (QofBook *book,
/* Create our view */
view = g_object_new (GNC_TYPE_TREE_VIEW_PRICE,
"name", "price_tree", NULL);
gnc_tree_view_set_model (view, s_model);
gtk_tree_view_set_model (GTK_TREE_VIEW (view), s_model);
g_object_unref(G_OBJECT(s_model));
DEBUG("model ref count is %d", G_OBJECT(model)->ref_count);

View File

@@ -1076,7 +1076,7 @@ gnc_tree_view_split_reg_new_with_model (GncTreeModelSplitReg *model)
PINFO("#### Before View connected to Model ####");
// Connect model to tree view
gnc_tree_view_set_model (GNC_TREE_VIEW (view), s_model);
gtk_tree_view_set_model (GTK_TREE_VIEW (view), s_model);
g_object_unref (G_OBJECT (s_model));
PINFO("#### After View connected to Model ####");

View File

@@ -158,7 +158,7 @@ gnc_tree_view_sx_list_new(GncSxInstanceModel *sx_instances)
priv = GNC_TREE_VIEW_SX_LIST_GET_PRIVATE(view);
priv->tree_model = GTK_TREE_MODEL(gnc_sx_list_tree_model_adapter_new(sx_instances));
gnc_tree_view_set_model(view, GTK_TREE_MODEL(priv->tree_model));
gtk_tree_view_set_model (GTK_TREE_VIEW (view), GTK_TREE_MODEL(priv->tree_model));
col = gnc_tree_view_add_text_column(view, _("Name"), "name", NULL,
"Semi-Monthly Paycheck",

View File

@@ -1497,27 +1497,6 @@ gnc_tree_view_get_show_column_menu (GncTreeView *view)
/* Tree View Creation */
/************************************************************/
/** Attach a data model to a visible GncTreeView widget. Users of
* this view object must use this function instead of directly
* calling the gtk_tree_view_set_model function.
*
* FIXME Investigate if it still makes sense once saving/restoring
* state is reimplemented.
*
* Parameters are defined in gnc-tree-view.h
*/
void
gnc_tree_view_set_model(GncTreeView *view, GtkTreeModel *model)
{
GncTreeViewPrivate *priv;
GtkTreeModel *old_model;
/* Remove existing callback */
priv = GNC_TREE_VIEW_GET_PRIVATE(view);
gtk_tree_view_set_model (GTK_TREE_VIEW(view), model);
}
static gint
gnc_tree_view_count_visible_columns(GncTreeView *view)
{

View File

@@ -303,18 +303,6 @@ gint gnc_tree_view_append_column (GncTreeView *view,
/** @name Tree View Properties */
/** @{ */
/** Attach a data model to a visible GncTreeView widget. Users of
* this view object must use this function instead of directly
* calling the gtk_tree_view_set_model function. This function takes
* the additional step of attaching a callback function to the model
* to catch any changes to the sorting of the model.
*
* @param view The visible tree widget.
*
* @param model The data model to attach.
*/
void gnc_tree_view_set_model(GncTreeView *view, GtkTreeModel *model);
/** Make all the correct columns visible, respecting their default
* visibility setting, their "always" visibility setting, and the
* last saved state if available.