[Geany-devel] Use GtkBuilder

Matthew Brush mbrush at xxxxx
Mon Sep 26 14:12:43 UTC 2011

On 09/26/2011 04:08 AM, Lex Trotman wrote:
> [...]
>> I'm really happy about this change. First we get rid of the horrible
>> old glade editor and second it's the most important step towards
>> making Geany compile under GTK 3. Thanks for your work!
> Hi Jiri,
> How much do you (or anyone) know about supporting both GTK2 and 3,

I'm responding as one of the "anyone" category :)

> 1. with the same source,
> 2. with the same binary,
> 3. differing platforms
> The reason I ask is that my very preliminary evaluation is that
> 1. is possible but may need a bunch of #if sections :(,
> 2. is basically impossible>(, and
> 3. is unknown.>?

I didn't have time to dig up the actually commits and source involved, 
but for an example of a program supporting both, see:

For an example a little more close to home, see Scintilla 2.29, which 
AFAIK, supports all GTK+ versions between 2.8 and 3.x :)

IMO, it would just be good to even just get the "Preparation in GTK+ 
2.x" parts of the migration done in the very near future (from the 
Migration Guide).  There's nothing mind-blowing in there, mostly just 
good GTK+/programming conventions.

That way when GTK+ 3 is more common, supporting it will be much easier, 
probably only requiring a few #if sections and some tweaks to the build 
system to detect the right majour version (ie. gtk+-3.0.pc over 
gtk+-2.0.pc and so on).

My $0.02.

Matthew Brush

More information about the Devel mailing list