Skip to content

The initial gtk3 version of xsane

Christian Theis requested to merge hoagie/xsane:gtk3-only into gtk3_porting

This is the first initial gtk3 version of xsane. Except for the use of gtk_rc_parse, it compiles without warnings when compiled against gtk3 (I was not sure regarding the old rc files and switching to css providers - this whole mixing of a gtk3 application with a currently gtk2 gimp application is a bit odd - maybe for gtk3, rc files do not make much sens, but I left it in for now). There are again some quirks involved in the porting. For one thing, gtk3 developers apparently don't want accelerators in comboboxes (or at least have them displayed in the box), I had to do some odd trickery to not display the second column accelerators in the box. Removing depreciated GTK_STOCK items had the effect, that as outlined in the documentation, there are no icons any more for OK, Cancel and Apply buttons (they just want it that way?). I just disabled the code to deal with the previous range_update_policy options, not sure if any further adjustment is needed. Regarding rulers, I took the file from the current developer version of gimp and renamed all functions so that there should not be any problems when simulatenously linking against gimp gtk2 or not having gimp at all (function names start with gimp_gtk3_). There would have been huge dependencies when leaving the code for unit switching in, so I replaced that with a simpler function that just distinguished between decimal and inch values (for the scales). I included in the commit a change to the Makefile.in file that includes the gimpruler dependency, but left all other aspects of the make system unchanged, so there is still some need to check for gtk3 and adjust includes and library paths accordingly. I am still getting used to git, so I had some issues when rebasing the branch; when applying all commits there should not be any problem.

I must admit that the new style of gtk3 needs some getting used to. At the moment, I find it a bit confusing, that for example button accelerators are only shown when pressing the option key, or that scrollbars are also only displayed when the mouse is near.

Merge request reports