HI,
Thank you for prompt reply. I am using this code so please check it out.
But when it reach to the method gtk_tree_model_iter_parent(), it shows
warning which is listed below.
GtkTreeModel *pModel = gtk_tree_view_get_model
(GTK_TREE_VIEW(m_pFileTreeView));
g_signal_connect((gpointer) m_pRendererCheck, "toggled", G_CALLBACK
(OnCellToggled), pModel);
void OnCellToggled(GtkCellRendererToggle *pCellRenderer, gchar *path,
gpointer pUserData)
{
GtkTreeModel *TreeModel = (GtkTreeModel *)pUserData;
if (!TreeModel)
{
ASSERT(FALSE);
return;
}
GtkTreeIter iter, cSessionIter;
GtkTreePath *TreePath = gtk_tree_path_new_from_string (path);
gboolean bFixed;
// Get toggled iter
gtk_tree_model_get_iter (TreeModel, &iter, TreePath);
gtk_tree_model_get (TreeModel, &iter, TRACK_TOOGLE_BOX_COL, &bFixed, -1);
// Do something with the value
bFixed = gtk_cell_renderer_toggle_get_active(pCellRenderer);
if (bFixed)
bFixed = FALSE;
else
bFixed = TRUE;
if (gtk_tree_model_iter_parent(GTK_TREE_MODEL (TreeModel), &iter,
&cSessionIter))
{
//gtk_tree_store_set (GTK_TREE_STORE (TreeModel), &cSessionIter,
column, bFixed, -1);
if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL (TreeModel),
&cSessionIter))
{
}
}
From: David Neèas (Yeti) <yeti@xxxxxxxxxxxxxxx>
To: gtk-list@xxxxxxxxx
Subject: Re: Handling parent & child behaviour using tree view
Date: Wed, 6 Dec 2006 09:09:32 +0100
On Wed, Dec 06, 2006 at 07:07:35AM +0000, Saba Khan wrote:
> I used this method, gtk_tree_model_iter_parent() but i have problem like
> this.
> gtk_tree_store_iter_parent: assertion `child->stamp == GTK_TREE_STORE
> (tree_model)->stamp' failed.
> (:7868): Gtk-CRITICAL **: gtk_tree_store_set: assertion `VALID_ITER
(iter,
> tree_store)' failed
>
> Please do me feedback.
The child iter you pass to gtk_tree_store_iter_parent() is
rubbish.
When you get failed assertions on function arguments like
this, it *ALWAYS* means the arguments you pass are rubbish
and don't pass an elementary sanity check.
Yeti
--
Whatever.
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list
_________________________________________________________________
Windows Live? Messenger has arrived. Click here to download it for free!
http://imagine-msn.com/messenger/launch80/?locale=en-gb
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list