Re: [patch] Allows linking with gtk+2.0 and gtk+3.0
- From: "Daniel P. Berrange" <dan berrange com>
- To: Jonh Wendell <jwendell gnome org>
- Cc: gtk-vnc-devel List <gtk-vnc-list gnome org>
- Subject: Re: [patch] Allows linking with gtk+2.0 and gtk+3.0
- Date: Wed, 30 Jun 2010 13:59:56 +0100
On Wed, Jun 30, 2010 at 09:25:03AM -0300, Jonh Wendell wrote:
> Em Qua, 2010-06-30 às 12:46 +0100, Daniel P. Berrange escreveu:
>
> > > default:
> > > g_assert_not_reached ();
> > > }
> > >
> > > + #if GTK_CHECK_VERSION (2, 90, 0)
> > > + fmt.byte_order = gdk_visual_get_byte_order (v) == GDK_LSB_FIRST ? G_BIG_ENDIAN : G_LITTLE_ENDIAN;
> > > + #else
> > > + fmt.byte_order = v->byte_order == GDK_LSB_FIRST ? G_BIG_ENDIAN : G_LITTLE_ENDIAN;
> > > + #endif
> > > +
> >
> > The API docs say this method is 'Since 2.22', so why is the check
> > doing 2.90 instead of 2.22 ?
>
> We rely on gtk+ 2.18 right now. I think our next big step would be to
> rely on gtk+3. IMHO there's no point in depend on gtk+ 2.22 in the
> future when we can safely upgrade to gtk+ 3.0.
>
> So, my thought was: either we depend on gtk 2.18 or 3.0. No middle term.
This isn't about dependancies though. The patch is actually doing two
completely separate jobs
1. Conditional complication that uses methods like gdk_visual_get_byte_order
instead of struct field access v->byte_order
2. Changing configure/Makefile to allow linking against GTK2 vs GTK3
The first bit of work shouldn't be tied to the second. They should actually
be separated into separate patches/commits. One patch adds the conditional
compilation that uses the new APIs for Gtk >= 2.22 (or whenever the API
in question was introduced). The second patch adds the GTK3 linking
ability.
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]