Re: Catching the row deleted from a GtkTreeModel implementation
- From: "Vivien Malerba" <vmalerba gmail com>
- To: "Suma H.S" <sumahs tataelxsi co in>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Catching the row deleted from a GtkTreeModel implementation
- Date: Fri, 9 Feb 2007 11:55:41 +0100
On 2/9/07, Suma H.S <sumahs tataelxsi co in> wrote:
how r u deleting the row?
It should be either through some key-press or mouse-click, in either case u
must select the row before selecting.
So...If it is through a key-press, catch the key-press signal and if it is
through a mouse-click,
catch mouse-click signal and access the selected row. Now do all the
updations u want and then delete the row from the model.
-----Original Message-----
From: gtk-app-devel-list-bounces gnome org
[mailto:gtk-app-devel-list-bounces gnome org]On Behalf Of Fontana Nicola
Sent: Friday, February 09, 2007 2:36 AM
To: gtk-app-devel-list gnome org
Subject: Catching the row deleted from a GtkTreeModel implementation
I'm keeping some summary fields of a GtkListStore and I need to update them
on
every model change. The problem is while catching the "row-deleted" signal
the row is yet deleted, so I can't access the row content to update my
summary fields.
How can I do it?
I would suggest a different approach: add your own column to the
GtkListStore which stores your information summary as a GObject (so
you know when that object is destroyed).
If you can't add a column to the GtkListStore, then I suggest creating
another GtkTreeModel implementation which "proxies" the GtkListStore
and adds a new column (in this case you'll have to write a method to
delete data so you'll know when it's deleted) - see the
GtkTreeModelFilter implementation for example.
Regards,
Vivien
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]