A new version of the sample standalone module was released: threshold-example-2.6. It was rewritten to use GwyParams for parameter handling. It now requires Gwyddion 2.59, but it is a lot shorter and contains basically no explicit GTK+ code. The comments were also improved. It should be a better base for writing a Gwyddion module if compatibility with older versions is not required.