Howto: Versioned Docs with libxfce4ui 4.11

Simon Steinbeiß simon at xfce.org
Tue Dec 9 14:21:47 CET 2014


Hey everyone,

I've been meaning to send this out a longer while ago, but somehow I
haven't found the time or simply forgot.
One very cool feature that was added to libxfce4ui [0] in its current
development release state (i.e. 4.11.1) is support for versioned
documentation. This will become more interesting once 4.12 is released,
but even on the road to 4.12, we can already create the docs for it.

The new function that enables versioned docs is called
xfce_dialog_show_help_with_version. The old API call
xfce_dialog_show_help is still there and works (with Eric's fix [1]).

To give you an example of how to add support for versioned docs to your
app, I'll refer you to two commits in xfce4-power-manager, which now
has both documentation for 1.2 and the 1.4 series and the respective
versions open the correct version on the wiki.
First, a patch that implements the new API call:
http://git.xfce.org/xfce/xfce4-power-manager/commit/?id=fd1eb3f3376788682334bd4bc02864677404d51e
Second, a patch that adds a fallback for libxfce4ui 4.10, so your app
remains usable with both:
http://git.xfce.org/xfce/xfce4-power-manager/commit/?id=0ea4b967127dfea6b2a7ca433e07b8b317bf71b9

Another example of an app that uses versioned docs is Parole, which
gained the feature last night [2].

Obviously, this looks slightly different for components of core (let's
not start a discussion of how xfce4-power-manager is part of "core" on
git.xfce.org, but having its own versioning scheme...).
Here goes another example for core components. Since xfdesktop changed
quite a bit during the 4.12 cycle, we've created updated docs for it
(since 4.11.4).
Here's the series of commits related to it (hopefully haven't
overlooked any):
http://git.xfce.org/xfce/xfdesktop/commit/?id=67a8cfb24fc4131e6cd74a52901e5389cc9b6757
and
http://git.xfce.org/xfce/xfdesktop/commit/?id=d27d14f242cbd94fcfbdf881d62c6e2b60f806a7

If needed, I guess this could also be documented somewhere in the wiki.

Cheers,
Simon



[0]
http://git.xfce.org/xfce/libxfce4ui/commit/?id=d5467df1c64ff6cf6884cd7347a3c8c62c49b32e
[1]
http://git.xfce.org/xfce/libxfce4ui/commit/?id=686267e52e340f9160f050abb6949b2b7a469c7c
[2]
http://git.xfce.org/apps/parole/commit/?id=707e6bbcf0da60c232107ed806a45c5b3b9d0557


More information about the Xfce4-dev mailing list