Re: RFC: gtk-thread.c



On Mon, 25 Oct 1999 15:12:14 -0400, Owen Taylor wrote:
> erik@it.et.tudelft.nl (Erik Mouw) writes:
>> In addition to my gtk-fork example I posted to this list a month ago,
>> I now made a GTK + threads example. This is also my first multi-threaded
>> program, so please tell me about errors. I tested this on Linux only,
>> so maybe it is not completely portable.
> 
> Looks good except for Sebastian's comment, and a few GTK+ nits.
> 
>> gint delete_event(GtkWidget *widget, GdkEvent *event, gpointer data)
>> {
>>   return(FALSE);
>> }
> 
> What's the point of this? This just replicates the default
> behavior.

Oops, you're correct. I shouldn't try to make examples that late %-).

>> #if (GTK_MAJOR_VERSION == 1) && (GTK_MINOR_VERSION == 0)
>>   gtk_container_border_width(GTK_CONTAINER (window), 10);
>> #else  
>>   gtk_container_set_border_width(GTK_CONTAINER (window), 10);
>> #endif
> 
> What's the point of this #ifdef? GTK+-1.0 didn't support
> threads. And I wouldn't encourage anybody to use GTK+-1.0
> at this point. It hasn't been bug-fixed for a least a
> year.

I coded this at home on a Linux box with GTK+-1.2, and had the idea to try
it at work on an SGI IRIX 6.x box with GTK+-1.0. I first send it to the
GTK+ mailinglist, before I realized this morning (well, I found out,
actually) that GTK+1.0 doesn't support threads. The #ifdef worked with my
gtk-fork() example, but it's useless with threads.


Thanks for your response,
Erik

-- 
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031,  2600 GA Delft, The Netherlands
Phone: +31-15-2785859  Fax: +31-15-2781843  Email J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/




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