Re: Problem with gtk drawing primitive

2007-05-28 Thread Jerome Blondel
David Nec(as (Yeti) :
> On Mon, May 28, 2007 at 08:21:01PM +0200, Jerome Blondel wrote:
>   
>> I'm making a widget from scratch using the tutorial's GtkDial as a base. 
>> For now I  just want to draw something in my widget. The following error 
>> occurs
>>
>> (test_sw:4242): Gtk-CRITICAL **: gtk_paint_polygon: assertion 
>> `style->depth == gdk_drawable_get_depth (window)' failed
>>
>> This is the code in the WIDGET_expose callback:
>>
>> blankstyle = gtk_style_new();
>> blankstyle->bg[GTK_STATE_NORMAL] = sw->color;
>> gtk_style_set_background(blankstyle, w->window, GTK_STATE_NORMAL);
>> gtk_paint_polygon(blankstyle, w->window, GTK_STATE_NORMAL, GTK_SHADOW_OUT,
>>   NULL, w, NULL, points, 8, TRUE);
>>
>> Please could anyone help me with this problem?
>> 
>
> I suspect
>
>   blankstyle = gtk_style_attach(blankstyle, w->window);
>
> is missing.
>   

Thanks !

Jerome Blondel






___ 
Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son 
interface révolutionnaire.
http://fr.mail.yahoo.com
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Problem with gtk drawing primitive

2007-05-28 Thread Yeti
On Mon, May 28, 2007 at 08:21:01PM +0200, Jerome Blondel wrote:
> I'm making a widget from scratch using the tutorial's GtkDial as a base. 
> For now I  just want to draw something in my widget. The following error 
> occurs
> 
> (test_sw:4242): Gtk-CRITICAL **: gtk_paint_polygon: assertion 
> `style->depth == gdk_drawable_get_depth (window)' failed
> 
> This is the code in the WIDGET_expose callback:
> 
> blankstyle = gtk_style_new();
> blankstyle->bg[GTK_STATE_NORMAL] = sw->color;
> gtk_style_set_background(blankstyle, w->window, GTK_STATE_NORMAL);
> gtk_paint_polygon(blankstyle, w->window, GTK_STATE_NORMAL, GTK_SHADOW_OUT,
>   NULL, w, NULL, points, 8, TRUE);
> 
> Please could anyone help me with this problem?

I suspect

  blankstyle = gtk_style_attach(blankstyle, w->window);

is missing.

Yeti

--
http://gwyddion.net/
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Problem with gtk drawing primitive

2007-05-28 Thread Jerome Blondel
Hi

I'm making a widget from scratch using the tutorial's GtkDial as a base. 
For now I  just want to draw something in my widget. The following error 
occurs

(test_sw:4242): Gtk-CRITICAL **: gtk_paint_polygon: assertion 
`style->depth == gdk_drawable_get_depth (window)' failed

This is the code in the WIDGET_expose callback:

blankstyle = gtk_style_new();
blankstyle->bg[GTK_STATE_NORMAL] = sw->color;
gtk_style_set_background(blankstyle, w->window, GTK_STATE_NORMAL);
gtk_paint_polygon(blankstyle, w->window, GTK_STATE_NORMAL, GTK_SHADOW_OUT,
  NULL, w, NULL, points, 8, TRUE);

Please could anyone help me with this problem?

Jerome Blondel






___ 
Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son 
interface révolutionnaire.
http://fr.mail.yahoo.com
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list