ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] Should we get rid of gtk/compat_macros.h?

From: Ulf Lamping <ulf.lamping@xxxxxx>
Date: Tue, 08 Apr 2008 07:50:46 +0200
Stephen Fisher schrieb:
Should we get rid of gtk/compat_macros.h now that we have dropped GTK1 support? It seems that its purpose was to create wrapper functions such as SIGNAL_CONNECT() around both the GTK1 gtk_signal_connect() and the GTK2 g_signal_connect(), depending on the GTK version that was being used.
Yes, we should really remove that stuff. After we removed the GTK1 support now, this wrapper code does no longer make a lot of sense.

I've recently remove a similiar wrapper about the GTK1/GTK2 font name preference handling already.
I prefer to use the gtk/glib function names themselves so I know what is really happening. I've run into instances in the past where I have to jump back and forth between code and compat_macros.h to see what function is really being called by the macros.
Well, reading through a lot of #if GTK_MAJOR_VERSION >= 2 ... #else ... #endif isn't also a lot of fun as well ;-)

However, leaving an indirection in the code that does no longer make sense - well, makes no sense :-)

So if you have the time to replace the macros in compat_macros.h with "the real GTK2 stuff", just go on ...

Regards, ULFL