set attributes to rows in GtkTreeView
- From: Bernd Demian <bdemian csc-dd de>
- To: GTK <gtk-list gnome org>
- Subject: set attributes to rows in GtkTreeView
- Date: 13 Mar 2002 12:43:16 +0100
Hi all,
thanks for the gtk-version, great job
btw I have one question, one bug and one suspicion.
First the question: Can somebody show me a simple way to change the
color of one or more rows in GtkTreeView. In CList it was simple to use
the function gtk_clist_set_background.
Second the bug : I have gtk+ installed on True64 and in the testgtk appl
it crased when I select the text.
Here is the stack from core file. I hope somebody can find the bug.
dbx testgtk core
dbx version 3.11.10
Type 'help' for help.
Core file created by program "testgtk"
signal Floating point exception at [gtk_range_calc_layout:2044
+0x34,0x3000096e4bc] Source not available
(dbx) where
> 0 gtk_range_calc_layout(range = 0x1404b4800, adjustment_value = 0.0)
["gtkrange.c":2044, 0x3000096e4bc]
1 gtk_range_size_allocate(widget = 0x1404b4800, allocation =
0x11fffca18) ["gtkrange.c":755, 0x3000096bc80]
2 g_cclosure_marshal_VOID__BOXED(closure = 0x140032da0, return_value
= (nil), n_param_values = 2, param_values = 0x11fffc7d0, invocation_hint
= 0x11fffc688, marshal_data = 0x3000096bc20) ["gmarshal.c":566,
0x30002025808]
3 g_type_class_meta_marshal(closure = 0x140032da0, return_value =
(nil), n_param_values = 2, param_values = 0x11fffc7d0, invocation_hint =
0x11fffc688, marshal_data = 0xf8) ["gclosure.c":514, 0x3000200d314]
4 g_closure_invoke(closure = 0x140032da0, return_value = (nil),
n_param_values = 2, param_values = 0x11fffc7d0, invocation_hint =
0x11fffc688) ["gclosure.c":437, 0x3000200cfa8]
5 signal_emit_unlocked_R(node = 0x140032bc0, detail = 0, instance =
0x1404b4800, emission_return = (nil), instance_and_params = 0x11fffc7d0)
["gsignal.c":2270, 0x30002023c2c]
6 g_signal_emit_valist(instance = 0x1404b4800, signal_id = 10, detail
= 0, var_args = struct {
_a0 = 0x11fffc9a0
_offset = 24
}) ["gsignal.c":2099, 0x30002023164]
7 gtk_signal_emit(object = 0x1404b4800, signal_id = 10)
["gtksignal.c":355, 0x30000989e88]
8 gtk_widget_size_allocate(widget = 0x1404b4800, allocation =
0x11fffca70) ["gtkwidget.c":2323, 0x30000a429c4]
9 gtk_scrolled_window_size_allocate(widget = 0x1404c25a0, allocation
= 0x11fffcfc8) ["gtkscrolledwindow.c":1187, 0x30000982280]
10 g_cclosure_marshal_VOID__BOXED(closure = 0x140032da0, return_value
= (nil), n_param_values = 2, param_values = 0x11fffcd80, invocation_hint
= 0x11fffcc38, marshal_data = 0x30000981d04) ["gmarshal.c":566,
0x30002025808]
11 g_type_class_meta_marshal(closure = 0x140032da0, return_value =
(nil), n_param_values = 2, param_values = 0x11fffcd80, invocation_hint =
0x11fffcc38, marshal_data = 0xf8) ["gclosure.c":514, 0x3000200d314]
12 g_closure_invoke(closure = 0x140032da0, return_value = (nil),
n_param_values = 2, param_values = 0x11fffcd80, invocation_hint =
0x11fffcc38) ["gclosure.c":437, 0x3000200cfa8]
13 signal_emit_unlocked_R(node = 0x140032bc0, detail = 0, instance =
0x1404c25a0, emission_return = (nil), instance_and_params = 0x11fffcd80)
["gsignal.c":2270, 0x30002023c2c]
14 g_signal_emit_valist(instance = 0x1404c25a0, signal_id = 10, detail
= 0, var_args = struct {
_a0 = 0x11fffcf50
_offset = 24
}) ["gsignal.c":2099, 0x30002023164]
15 gtk_signal_emit(object = 0x1404c25a0, signal_id = 10)
["gtksignal.c":355, 0x30000989e88]
16 gtk_widget_size_allocate(widget = 0x1404c25a0, allocation =
0x11fffd028) ["gtkwidget.c":2323, 0x30000a429c4]
17 gtk_vbox_size_allocate(widget = 0x14046ee20, allocation =
0x11fffd588) ["gtkvbox.c":257, 0x30000a38a8c]
18 g_cclosure_marshal_VOID__BOXED(closure = 0x140032da0, return_value
= (nil), n_param_values = 2, param_values = 0x11fffd340, invocation_hint
= 0x11fffd1f8, marshal_data = 0x30000a3870c) ["gmarshal.c":566,
0x30002025808]
19 g_type_class_meta_marshal(closure = 0x140032da0, return_value =
(nil), n_param_values = 2, param_values = 0x11fffd340, invocation_hint =
0x11fffd1f8, marshal_data = 0xf8) ["gclosure.c":514, 0x3000200d314]
20 g_closure_invoke(closure = 0x140032da0, return_value = (nil),
n_param_values = 2, param_values = 0x11fffd340, invocation_hint =
0x11fffd1f8) ["gclosure.c":437, 0x3000200cfa8]
21 signal_emit_unlocked_R(node = 0x140032bc0, detail = 0, instance =
0x14046ee20, emission_return = (nil), instance_and_params = 0x11fffd340)
["gsignal.c":2270, 0x30002023c2c]
22 g_signal_emit_valist(instance = 0x14046ee20, signal_id = 10, detail
= 0, var_args = struct {
_a0 = 0x11fffd510
_offset = 24
}) ["gsignal.c":2099, 0x30002023164]
23 gtk_signal_emit(object = 0x14046ee20, signal_id = 10)
["gtksignal.c":355, 0x30000989e88]
24 gtk_widget_size_allocate(widget = 0x14046ee20, allocation =
0x11fffd5e8) ["gtkwidget.c":2323, 0x30000a429c4]
25 gtk_vbox_size_allocate(widget = 0x1404ae600, allocation =
0x11fffdb48) ["gtkvbox.c":257, 0x30000a38a8c]
26 g_cclosure_marshal_VOID__BOXED(closure = 0x140032da0, return_value
= (nil), n_param_values = 2, param_values = 0x11fffd900, invocation_hint
= 0x11fffd7b8, marshal_data = 0x30000a3870c) ["gmarshal.c":566,
0x30002025808]
27 g_type_class_meta_marshal(closure = 0x140032da0, return_value =
(nil), n_param_values = 2, param_values = 0x11fffd900, invocation_hint =
0x11fffd7b8, marshal_data = 0xf8) ["gclosure.c":514, 0x3000200d314]
28 g_closure_invoke(closure = 0x140032da0, return_value = (nil),
n_param_values = 2, param_values = 0x11fffd900, invocation_hint =
0x11fffd7b8) ["gclosure.c":437, 0x3000200cfa8]
29 signal_emit_unlocked_R(node = 0x140032bc0, detail = 0, instance =
0x1404ae600, emission_return = (nil), instance_and_params = 0x11fffd900)
["gsignal.c":2270, 0x30002023c2c]
30 g_signal_emit_valist(instance = 0x1404ae600, signal_id = 10, detail
= 0, var_args = struct {
_a0 = 0x11fffdad0
_offset = 24
}) ["gsignal.c":2099, 0x30002023164]
31 gtk_signal_emit(object = 0x1404ae600, signal_id = 10)
["gtksignal.c":355, 0x30000989e88]
32 gtk_widget_size_allocate(widget = 0x1404ae600, allocation =
0x11fffdb80) ["gtkwidget.c":2323, 0x30000a429c4]
33 gtk_window_size_allocate(widget = 0x1404b4100, allocation =
0x11fffe0b8) ["gtkwindow.c":3402, 0x30000a52b34]
34 g_cclosure_marshal_VOID__BOXED(closure = 0x140032da0, return_value
= (nil), n_param_values = 2, param_values = 0x11fffde70, invocation_hint
= 0x11fffdd28, marshal_data = 0x30000a52a3c) ["gmarshal.c":566,
0x30002025808]
35 g_type_class_meta_marshal(closure = 0x140032da0, return_value =
(nil), n_param_values = 2, param_values = 0x11fffde70, invocation_hint =
0x11fffdd28, marshal_data = 0xf8) ["gclosure.c":514, 0x3000200d314]
36 g_closure_invoke(closure = 0x140032da0, return_value = (nil),
n_param_values = 2, param_values = 0x11fffde70, invocation_hint =
0x11fffdd28) ["gclosure.c":437, 0x3000200cfa8]
37 signal_emit_unlocked_R(node = 0x140032bc0, detail = 0, instance =
0x1404b4100, emission_return = (nil), instance_and_params = 0x11fffde70)
["gsignal.c":2270, 0x30002023c2c]
38 g_signal_emit_valist(instance = 0x1404b4100, signal_id = 10, detail
= 0, var_args = struct {
_a0 = 0x11fffe040
_offset = 24
}) ["gsignal.c":2099, 0x30002023164]
39 gtk_signal_emit(object = 0x1404b4100, signal_id = 10)
["gtksignal.c":355, 0x30000989e88]
40 gtk_widget_size_allocate(widget = 0x1404b4100, allocation =
0x11fffe148) ["gtkwidget.c":2323, 0x30000a429c4]
41 gtk_window_show(widget = 0x1404b4100) ["gtkwindow.c":3059,
0x30000a52054]
42 g_cclosure_marshal_VOID__VOID(closure = 0x1400149b0, return_value =
(nil), n_param_values = 1, param_values = 0x11fffe440, invocation_hint =
0x11fffe2f8, marshal_data = 0x30000a51f7c) ["gmarshal.c":77,
0x30002024794]
43 g_type_class_meta_marshal(closure = 0x1400149b0, return_value =
(nil), n_param_values = 1, param_values = 0x11fffe440, invocation_hint =
0x11fffe2f8, marshal_data = 0xb0) ["gclosure.c":514, 0x3000200d314]
44 g_closure_invoke(closure = 0x1400149b0, return_value = (nil),
n_param_values = 1, param_values = 0x11fffe440, invocation_hint =
0x11fffe2f8) ["gclosure.c":437, 0x3000200cfa8]
45 signal_emit_unlocked_R(node = 0x140032800, detail = 0, instance =
0x1404b4100, emission_return = (nil), instance_and_params = 0x11fffe440)
["gsignal.c":2270, 0x30002023c2c]
46 g_signal_emit_valist(instance = 0x1404b4100, signal_id = 3, detail
= 0, var_args = struct {
_a0 = 0x11fffe610
_offset = 16
}) ["gsignal.c":2099, 0x30002023164]
47 gtk_signal_emit(object = 0x1404b4100, signal_id = 3)
["gtksignal.c":355, 0x30000989e88]
48 gtk_widget_show(widget = 0x1404b4100) ["gtkwidget.c":1637,
0x30000a4144c]
49 create_text() ["testgtk.c":7598, 0x1200273fc]
50 g_cclosure_marshal_VOID__VOID(closure = 0x14005ad70, return_value =
(nil), n_param_values = 1, param_values = 0x11fffe970, invocation_hint =
0x11fffe828, marshal_data = (nil)) ["gmarshal.c":77, 0x30002024794]
51 g_closure_invoke(closure = 0x14005ad70, return_value = (nil),
n_param_values = 1, param_values = 0x11fffe970, invocation_hint =
0x11fffe828) ["gclosure.c":437, 0x3000200cfa8]
52 signal_emit_unlocked_R(node = 0x140051820, detail = 0, instance =
0x14005dec0, emission_return = (nil), instance_and_params = 0x11fffe970)
["gsignal.c":2340, 0x30002023f90]
53 g_signal_emit_valist(instance = 0x14005dec0, signal_id = 85, detail
= 0, var_args = struct {
_a0 = 0x11fffeb40
_offset = 16
}) ["gsignal.c":2099, 0x30002023164]
54 gtk_signal_emit(object = 0x14005dec0, signal_id = 85)
["gtksignal.c":355, 0x30000989e88]
55 gtk_button_clicked(button = 0x14005dec0) ["gtkbutton.c":549,
0x30000895478]
56 gtk_real_button_released(button = 0x14005dec0) ["gtkbutton.c":1038,
0x3000089692c]
57 g_cclosure_marshal_VOID__VOID(closure = 0x140051760, return_value =
(nil), n_param_values = 1, param_values = 0x11fffee70, invocation_hint =
0x11fffed28, marshal_data = 0x300008968dc) ["gmarshal.c":77,
0x30002024794]
58 g_type_class_meta_marshal(closure = 0x140051760, return_value =
(nil), n_param_values = 1, param_values = 0x11fffee70, invocation_hint =
0x11fffed28, marshal_data = 0x340) ["gclosure.c":514, 0x3000200d314]
59 g_closure_invoke(closure = 0x140051760, return_value = (nil),
n_param_values = 1, param_values = 0x11fffee70, invocation_hint =
0x11fffed28) ["gclosure.c":437, 0x3000200cfa8]
60 signal_emit_unlocked_R(node = 0x1400517c0, detail = 0, instance =
0x14005dec0, emission_return = (nil), instance_and_params = 0x11fffee70)
["gsignal.c":2270, 0x30002023c2c]
61 g_signal_emit_valist(instance = 0x14005dec0, signal_id = 84, detail
= 0, var_args = struct {
_a0 = 0x11ffff040
_offset = 16
}) ["gsignal.c":2099, 0x30002023164]
62 gtk_signal_emit(object = 0x14005dec0, signal_id = 84)
["gtksignal.c":355, 0x30000989e88] 63 gtk_button_released(button =
0x14005dec0) ["gtkbutton.c":541, 0x300008953d4]
64 gtk_button_button_release(widget = 0x14005dec0, event =
0x14044b030) ["gtkbutton.c":954, 0x300008966dc]
65 _gtk_marshal_BOOLEAN__BOXED(closure = 0x140033d00, return_value =
0x11ffff1f0, n_param_values = 2, param_values = 0x11ffff380,
invocation_hint = 0x11ffff238, marshal_data = 0x300008966a4)
["gtkmarshalers.c":82, 0x300009377b4]
66 g_type_class_meta_marshal(closure = 0x140033d00, return_value =
0x11ffff1f0, n_param_values = 2, param_values = 0x11ffff380,
invocation_hint = 0x11ffff238, marshal_data = 0x160) ["gclosure.c":514,
0x3000200d314]
67 g_closure_invoke(closure = 0x140033d00, return_value = 0x11ffff1f0,
n_param_values = 2, param_values = 0x11ffff380, invocation_hint =
0x11ffff238) ["gclosure.c":437, 0x3000200cfa8]
68 signal_emit_unlocked_R(node = 0x140033d60, detail = 0, instance =
0x14005dec0, emission_return = 0x11ffff328, instance_and_params =
0x11ffff380) ["gsignal.c":2378, 0x30002024164]
69 g_signal_emit_valist(instance = 0x14005dec0, signal_id = 24, detail
= 0, var_args = struct {
_a0 = 0x11ffff550
_offset = 24
}) ["gsignal.c":2109, 0x300020231c4]
70 gtk_signal_emit(object = 0x14005dec0, signal_id = 24)
["gtksignal.c":355, 0x30000989e88]
71 gtk_widget_event_internal(widget = 0x14005dec0, event =
0x14044b030) ["gtkwidget.c":3076, 0x30000a44368]
72 gtk_widget_event(widget = 0x14005dec0, event = 0x14044b030)
["gtkwidget.c":2937, 0x30000a43fe0]
73 gtk_propagate_event(widget = 0x14005dec0, event = 0x14044b030)
["gtkmain.c":2067, 0x30000937584]
74 gtk_main_do_event(event = 0x14044b030) ["gtkmain.c":1316,
0x30000935cdc]
75 gdk_event_dispatch(source = 0x140028d00, callback = (nil),
user_data = (nil)) ["gdkevents-x11.c":1752, 0x30000046d54]
76 g_main_dispatch(context = 0x140028e00) ["gmain.c":1617,
0x300030460e8]
77 g_main_context_dispatch(context = 0x140028e00) ["gmain.c":2161,
0x300030474e0]
78 g_main_context_iterate(context = 0x140028e00, block = 1, dispatch =
1, self = 0x140076d00) ["gmain.c":2242, 0x300030479e8]
79 g_main_loop_run(loop = 0x140161ec0) ["gmain.c":2462, 0x30003048410]
80 gtk_main() ["gtkmain.c":915, 0x30000935148]
81 main(argc = 1, argv = 0x11ffff848) ["testgtk.c":11934, 0x120034378]
and thirdly the suspicion, when you compress a string with g_strcompress
and the last char is '\', it seems the function destroyed the memory.
thanks bernd
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]