Right now GIMP has virtuall all of the UI imperatively constructed with 
code. This has a few problems:

* Tweaking the UI requires re-building the app
* A lot of code duplication
* Not very modern

The patch I am replying to ports the PNG save dialog to Glade and uses 
GtkBuilder to construct the UI. The purpose of this change is to 
introduce declarative construction of UIs in GIMP to give us experience 
in this area. The benefits of using Glade is:

* Tweaking the UI doesn't requires re-bulding the app
* Less code
* Easier to start using a script language like JavaScript in the core
* We make the GIMP code base more modern
* UIs can be constructed through drag-and-drop with Glade

There are a few things that should be noted:

* Translations still works
* Mnemonics still works
* The tooltip is still there (although only on the spinner, not scale)
* We use GtkBuilder, not the deprecated libglade
* There is no need for any proprocessing, GtkBuilder reads direct XML
* We don't rely on any extra tool, XML files can be written manually

And a warning:
* Order of XML properties, see GtkAdjustment comment in file-png.glade

So, do people think this is a step in the right direction? Personally
I do and would like to commit the patch. Opinions?



My GIMP Blog:
"Best way to keep up with GIMP from git"
Gimp-developer mailing list

Reply via email to