Re: Please help me debug



Owen Taylor <otaylor@redhat.com> wrote:

> GtkText is geneally buggy, so if you have crashes, I'd tend to blame
> GtkText instead of your code.

Okay, thanks. I will tell them to upgrade before going deeper into
this.


> > 	// Show quoted text in a blue color
> > 	GdkColor blueish;
> > 	blueish.red   = 0;
> > 	blueish.green = 0;
> > 	blueish.blue  = 56000;
> > 	GdkColor* qc = &blueish;
> > 
> > 	GdkColormap* colormap = gtk_widget_get_colormap(GTK_WIDGET(textarea));
> > 	if (!gdk_colormap_alloc_color(colormap, qc, FALSE, TRUE))
> > 		qc = 0;
> 
> You don't need to allocate the colors that you pass into the
> Text widget.

And I didn't, until a few days ago. However, one user reported crashes
with 8 bit displays, and I traced it to this. How else would I make
sure that the blueish.index number is correct?

-- 
Mvh. Anders



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]