[Geany-devel] Use GtkBuilder

Matthew Brush mbrush at xxxxx
Mon Sep 26 22:41:13 UTC 2011

On 09/26/2011 09:15 AM, Jiří Techet wrote:

> In general it would be best just to try to substitute GTK version in
> configure, see what happens and start fixing the errors. I'm really
> tempted to try it myself but I'm not sure if I'll have enough time for
> that in the following few months. Also for changes like that it would
> be better to have git in place for easier merges once the work is
> done.
> My personal feeling is that the sooner some support for GTK 3 is
> added, the better. Of course first, until it is stable and working as
> expected, it could be an experimental configure option which ordinary
> mortals would be discouraged to use. Meanwhile thanks to the ifdefs
> the old GTK 2 code should work as before. And maybe the conversion
> will be quite easy - it's just you never know unless you try it, so
> it's better to try it to know :-).

I did start a little bit with this in my geany repository.

Some observations:

1) Need to get rid of direct access of struct members[1].

2) Geany should support at minimum GTK+ 2.18 so that we can use 
gtk_widget_get_allocation() if we want to (cleanly) pass GSEAL_ENABLE 
builds.  This actually wouldn't be needed strictly for GTK+ 3 since I 
think the old size allocation stuff is entirely gone.

3) The GeanyWrapLabel, I'm fairly sure can be #if'd out entirely for GTK+ 3.

4) The gdkkeysyms.h thing is easily solved by adding a #if to include 
gdkkeysyms-compat.h when using GTK+ 3.0.

5) Need to upgrade to Scintilla 2.29[2] since it supports GTK+ 3.0 (IIRC 
it still supports down to GTK+ 2.8 as well).

6) As you said, the configure.ac would need and option to enable this, 
to switch the package checks for gtk+-3.0 as well as another place where 
it collects the version of gtk+-2.0 using pkg-config.

7) Probably lots of other stuff I haven't discovered yet, since I 
haven't actually got Geany to build with GTK+ 3 yet.

In my opinion, I don't think it would *too* difficult to support GTK+ 
2.1x all the way through 3.x at the same time.


Matthew Brush

More information about the Devel mailing list