[glade--]Re: Gnomemm-2 support in glade--



Peter Wainwright wrote:
Hi, Christof

I'm posting my latest patches to try to get gnomemm2 support.

Well done. Actually you understood a lot of glademm's internals. Wow.

I only disagree in two points:
- I do not like the environment variable. I'd propose to default to gnome1 on glade-1 files and gnome2 on glade-2 files. But since I do not have a better solution, I took yours.

- You unconditionally overwrite configure.in, Makefile.am, autogen.sh and the like (patch to Cxx.cc). That's not how it's supposed to be. I'd like the user to delete the files to get them recreated. This way user changes to these files are preserved. Perhaps I should spend another option to overwrite these files.

I have set myself the task of getting a Gnome App widget working.
It's a challenge...

It had been a challenge when gnome 1.0 was there, too. If you have any questions, please ask.

A number of issues occur to me.
First and foremost, how to support different Gnome versions?

In Gnome 2, the "gnomemm" libraries have been split considerably.
There is libgnomemm, libgnomeuimm, libbonobomm, libbonobouimm,
libgnomecanvasmm, gconfmm - at least; as well as gtkmm itself.

This makes sense from the developer's perspective. However, if
glade-- is to automatically determine its target, we have to
cope with the situation when the user has inconsistent versions
of the libraries installed. It comes back to the question often
asked "how do i find out what version of GNOME I have installed"...
There is no simple answer when each library has its own versioning
scheme.

Hmm. I'd say: If gnomemm2 is detected, stay with it. If gnomemm2 is missing, we have a glade-1 file and we still detect gnomemm1, stay with it.

I see that the first routine called in glade-- is "call_gtkmm_config".
I split this into two parts, one which uses "pkg-config" style checks
as in Gnome 2; the other using "gtk-config" and "gnome-config" checks
as in Gnome 1. At present an environment variable GLADEMM_GNOME_VERSION
is used to select which of these sections is executed. If you set
GLADEMM_GNOME_VERSION to 0 both sections are executed, and the latest
version of each package is detected. This may leave you with
inconsistent versions - however at this stage we don't know if this
is a problem. For example, the user may be building a GTK-only
application, and then it doesn't matter if he has GTK 2 with Gnome 1.

The Gnome 2 detection however will become increasingly messy if we
add checks for all the new component libraries... Maybe we need to
simplify with a simple Gnome2/Gnome1 option - I'd really appreciate your
thoughts on the way you want to go with this.

Did I make my thoughts clear enough? (Please erase any sharp undertone propably found here) If not please ask.

It's not uncommon to have gtkmm2 and gnome-1 installed (I still do not have/need gnomemm). I'd vote for using gnome-2 even if it is missing if gtkmm2 is selected (not the default even if detected if passed a glade-1 file, see glade--.cc). The user should be able to figure out the missing packages to build his new app once configure complains.

BTW, there's also a patch in here I called "glademm.utsname.patch".
This is a configure problem I had with the code which tries to
get utsname by #defining _GNU_SOURCE or __USE_GNU.
(I'm using Red Hat 7.2 with updates).

already applied. But shouldn't we add -D_GNU_SOURCE to cflags to really support it?

Sometimes autoconf drives me mad...

I learned to need it. And it does it's job well ... unless you try to do things in unforeseen ways (which is easily done).

Thank you very much for your patch
   Christof




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