fontforge/fontforge — pull request #579 by monkeyiq (2013-05-21 01:00:26+00:00)
Title: Split some UI code from collabclient.c and python.c

The python/pythonui split that existed before now has the ability to
augment the methods offered by the python objects if we are building
with a GUI. See pythonui.c/PythonUI_Init which calls
copyUIMethodsToBaseTable() to add methods to a python object only if
we are building with a GUI.

The majority of the collab code is now moved to collabclientui.c. This
should avoid issues with "import"ing fontforge from a command line
python script.

There are times where some of the code in python.c needs to call
collab code to work correctly in a collab session. Because python.c
can not directly call into pythonui.c there are a few callbacks
defined in python.c. See for example
pyFF_maybeCallCVPreserveState_Func_t and its getter
get_pyFF_maybeCallCVPreserveState_Func(). In python.c the default
callback for pyFF_maybeCallCVPreserveState_Func_t is set to a function
that does nothing. In pythonui.c that callback is set to a function
that really does something if need be. This way the callback can still
be run from the layer code in a collab session but will not interfere
with a non GUI build because the empty function will instead be run.