Re: dynamic gtk_list_store
- From: John Coppens <john jcoppens com>
- To: gtk-app-devel-list gnome org
- Subject: Re: dynamic gtk_list_store
- Date: Mon, 14 Jun 2004 11:44:50 -0300
On Mon, 14 Jun 2004 00:32:14 +0100
Tim Müller <zen18864 zen co uk> wrote:
store = gtk_tree_view_get_model (view);
gtk_tree_view_set_model (view, NULL);
g_object_unref (store);
Tim,
I've done some more tracing, and the store's ref_count is incremented when
a row is added (see trace below). So it would be necessary to remove all
rows first, before unrefing the actual liststore. Is this right?
John
-----------
Old value = 1
New value = 2
g_object_ref (_object=0x8224ea0) at gobject.c:1571
1571 in gobject.c
(gdb) bt
#0 g_object_ref (_object=0x8224ea0) at gobject.c:1571
#1 0x4070b8ca in g_value_object_collect_value (value=0xbfffe360,
n_collect_values=1, collect_values=0x2, collect_flags=0) at
gobject.c:1750
#2 0x407261db in g_value_set_instance (value=0xbfffe360,
#instance=0x8224ea0)
at gvalue.c:217
#3 0x4071841b in g_signal_emit_valist (instance=0x8224ea0, signal_id=0,
detail=0,
var_args=0xbfffe4f4
"\200åÿ¿\båÿ¿¬íN ¸c\"\b N\"\b8åÿ¿ë\0027 N\"\b¸c\"\b\200åÿ¿J³D@@[\"\bÈZ\"
\bHåÿ¿") at gsignal.c:2193
#4 0x407189b4 in g_signal_emit (instance=0x2, signal_id=2, detail=2)
at gsignal.c:2239
#5 0x4042424b in gtk_tree_model_row_inserted (tree_model=0x8224ea0,
path=0x82263b8, iter=0xbfffe580) at gtktreemodel.c:1208
#6 0x403702eb in gtk_list_store_append (list_store=0x8224ea0,
#iter=0xbfffe580)
at gtkliststore.c:1346
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]