Ethereal-dev: Re: [Ethereal-dev] Re: [Ethereal-cvs] cvs commit: ethereal Makefile.am configure

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxx>
Date: Sun, 3 Nov 2002 11:51:38 -0800
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));