Re: set attributes to rows in GtkTreeView

2002-03-14 Thread Havoc Pennington


Bernd Demian <[EMAIL PROTECTED]> writes: 
> > Looks like a divide-by-zero in gtkrange.c. This is in 2.0.0?
> Yes 2.0 on alpha - 64 bit - offen a problem.

Should be sure it's in bugzilla.

> btw I have a second question - we are porting a motif appl with
> bxm-widgets. the list widget has a feature to fixed the first column. so
> when the the record to show is very large, you can scroll to the rigth
> und the first column with the key is not scrolling, it named 'vertical
> title'. Is such a feature in GtkTreeView. 

No, it doesn't have that feature.

Havoc

___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



Re: set attributes to rows in GtkTreeView

2002-03-14 Thread Bernd Demian

Am Mit, 2002-03-13 um 16.57 schrieb Havoc Pennington:
> 
> I don't think there is one. What's the application?
> 
> You probably have to change the color of each cell separately by
> setting properties on the cell renderer or writing a custom cell
> renderer.
> 
> You can create alternating colors with gtk_tree_view_set_rules_hint().
> 
the target is, different typ of row to mark, z.b. red for total, green
for subtotal and so on. And the second goal is to mark record whith
certain semantics. 
> 
> Looks like a divide-by-zero in gtkrange.c. This is in 2.0.0?
Yes 2.0 on alpha - 64 bit - offen a problem.
>
btw I have a second question - we are porting a motif appl with
bxm-widgets. the list widget has a feature to fixed the first column. so
when the the record to show is very large, you can scroll to the rigth
und the first column with the key is not scrolling, it named 'vertical
title'. Is such a feature in GtkTreeView. 
Bernd


___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



Re: set attributes to rows in GtkTreeView

2002-03-13 Thread Olaf Fr±czyk

On 2002.03.13 16:57:49 +0100 Havoc Pennington wrote:
> 
> Bernd Demian <[EMAIL PROTECTED]> writes: 
> > 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. 
> 
> I don't think there is one. What's the application?
Hi,

I use it also. It is very useful for all purposes ;)
It is definietly nice to have it for database applications.
For example: you have database of equipment:
working ok - green,
not working properly - yellow
damaged - red,
in factory repair - blue
etc.

It will be pain to do it on per cell basis.
So please add it to bugzilla.

Regards,

Olaf Fraczyk


___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



Re: set attributes to rows in GtkTreeView

2002-03-13 Thread Havoc Pennington


Bernd Demian <[EMAIL PROTECTED]> writes: 
> 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. 

I don't think there is one. What's the application?

You probably have to change the color of each cell separately by
setting properties on the cell renderer or writing a custom cell
renderer.

You can create alternating colors with gtk_tree_view_set_rules_hint().

> 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.

Looks like a divide-by-zero in gtkrange.c. This is in 2.0.0?
 
> and thirdly the suspicion, when you compress a string with g_strcompress
> and the last char is '\', it seems the function destroyed the memory.

Indeed, it looks like the function is broken. Can you report this on
http://bugzilla.gnome.org.

You can put the tree-row-color feature request there too, but should
explain your use-case for the feature to aid in deciding on an API.

Havoc

___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



set attributes to rows in GtkTreeView

2002-03-13 Thread Bernd Demian

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,0x396e4bc] Source not available
(dbx) where
>  0 gtk_range_calc_layout(range = 0x1404b4800, adjustment_value = 0.0)
["gtkrange.c":2044, 0x396e4bc]
   1 gtk_range_size_allocate(widget = 0x1404b4800, allocation =
0x11fffca18) ["gtkrange.c":755, 0x396bc80]
   2 g_cclosure_marshal_VOID__BOXED(closure = 0x140032da0, return_value
= (nil), n_param_values = 2, param_values = 0x11fffc7d0, invocation_hint
= 0x11fffc688, marshal_data = 0x396bc20) ["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, 0x3989e88]
   8 gtk_widget_size_allocate(widget = 0x1404b4800, allocation =
0x11fffca70) ["gtkwidget.c":2323, 0x3a429c4]
   9 gtk_scrolled_window_size_allocate(widget = 0x1404c25a0, allocation
= 0x11fffcfc8) ["gtkscrolledwindow.c":1187, 0x3982280]
  10 g_cclosure_marshal_VOID__BOXED(closure = 0x140032da0, return_value
= (nil), n_param_values = 2, param_values = 0x11fffcd80, invocation_hint
= 0x11fffcc38, marshal_data = 0x3981d04) ["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, 0x3989e88]
  16 gtk_widget_size_allocate(widget = 0x1404c25a0, allocation =
0x11fffd028) ["gtkwidget.c":2323, 0x3a429c4]
  17 gtk_vbox_size_allocate(widget = 0x14046ee20, allocation =
0x11fffd588) ["gtkvbox.c":257, 0x3a38a8c]
  18 g_cclosure_marshal_VOID__BOXED(closure = 0x140032da0, return_value
= (nil), n_param_values = 2, param_values = 0x11fffd340, invocation_hint
= 0x11fffd1f8, marshal_data = 0x3a3870c) ["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, 0x3989e88]
  24 gtk_widget_size_allocate(widget = 0x14046ee20, allocation =
0x11fffd5e8) ["gtkwidget.c":2323, 0x3a429c4]
  25 gtk_vbox_size_allocate(widget = 0x1404ae600, allocation =
0x11fffdb48) ["gtkvbox.c":257, 0x3a38a8c]
  26 g_cclosure_marshal_VOID__BOXED(closure = 0x140032da0, return_value
= (nil), n_param_values = 2, param_values = 0x11fffd900, invocation_hint
= 0x11fffd7b8, marshal_data = 0x3a3870c) ["gmarshal.c":566,
0x30002025808]
  27 g_