Gtk version again

John Ralls jralls at ceridwen.us
Thu Nov 17 10:13:42 EST 2011


On Nov 17, 2011, at 4:57 AM, Geert Janssens wrote:

> Recently there was some discussion on what version of Gtk we should target in 
> trunk.
> 
> The consensus was 2.18.1, which is what RHEL6 supports. Fedora 14 is shipping 
> with 2.22, so targetting 2.24 would exclude those two distributions.
> 
> However, I'm having some practical issues here. My goal is to get GnuCash 
> ready for Gnome 3 as fast as possible. All migration documentation specifies 
> that as a first step, you should target 2.24 and replace all deprecated gtk 
> code in the version.
> 
> It appears that is not possible if we still have to support 2.18.1 or 2.22.
> 
> An example:
> We are using GtkComboBoxEntry in several places in the code. This widget is 
> deprecated in 2.24, so it should be replaced. The replacement suggestion is a 
> regular GtkComboBox, but created with gtk_combo_box_new_with_entry. This will 
> give you a GtkComboBox with a GtkEntry child widget, effectively the same as 
> the original GtkComboBoxEntry. The problem is, gtk_combo_box_new_with_entry is 
> a new function only available starting from 2.24. So in order to replace a 
> deprecated widget, I have to use functionality that's not available in the 
> older Gtk versions we try to support.
> 
> So what choice should I make here:
> - give up on Gnome 3 for now (not my preference) ?
> - give up on the older Gtk versions (not nice either) ?
> - ...
> 

- Decide that 2.6 isn't going to be the Gtk3 port and branch 2.5, so that Gtk3 development can continue on trunk
- Set a variable in configure and build different versions of the GUI depending upon the version of Gtk.


A note on the second option: Rather than littering the GUI code with a bunch of ifdefs it's easier to read and maintain if one isolates the different implementation into separate implementation files having the same header, with the Makefile selecting the implementation file. 

Regards,
John Ralls





More information about the gnucash-devel mailing list