Ethereal

Re: [Ethereal-dev] Re: [Ethereal-cvs] cvs commit: ethereal Makefile.am configure.in
Google
 
Web Ethereal.com

Home | Introduction | Documentation | Lists | FAQ | Development | Wiki | Bugs

Ethereal-dev: November 2002


On Sun, Nov 03, 2002 at 07:06:53PM +0100, Joerg Mayer wrote:
> Looking at the amount of resulting #ifdefs (GTK_MAJOR...) I'm not sure
> that this was such a good idea.

Perhaps the next step should be to create "gtk12" and "gtk2"
subdirectories and move stuff that has lots of #ifdefs there, and leave
the rest of the stuff in "gtk".  For routines that are mostly the same,
perhaps helper routines or macros could be put in "gtk12" and "gtk2",
with the stuff in "gtk" calling it (e.g.:

    gtk12:

	#define SIGNAL_CONNECT(widget, name, callback, arg) \
		gtk_signal_connect(GTK_OBJECT(widget), name, \
                     GTK_SIGNAL_FUNC(callback), \
		     (arg) == NULL ? NULL : GTK_OBJECT(arg));

    gtk2:

	#define SIGNAL_CONNECT(widget, name, callback, arg) \
		g_signal_connect(G_OBJECT(widget), name, \
                   G_CALLBACK(callback), \
                   (arg) == NULL ? NULL : G_OBJECT(arg));


Powered by MHonArc 2.6.10