GPE Hacking
-
Please add and correct things. See also our ideas for the human interface at GpeHIG.
-
Use GTK2, not GTK1! See http://developer.gnome.org/dotplan/porting/index.html
-
Apps should not call 'gtk_set_locale()' or 'gtk_init()' directly. 'gpe_application_init()' takes care of these.
-
Apps should mark up the strings that are to be translated. See GPEInternationalisation.
-
Apps should use 'base/build/Makefile.dpkg_ipkg' and 'base/build/Makefile.translation'. Please read the README file in that directory.
-
Apps should use provide a .desktop file. In the .desktop file, apps should have a 48x48 PNG icon (*additional* smaller sizes, 32x32, 24x24, 16x16 are optional, but nice).
-
Apps should NOT follow the older debian /usr/lib/menu system
-
In the 'control' file, apps should only set a one-line description: a descriptive, coherent sentence fragment, 79 chars max. Long descriptions should go on the web page and/or in a README file.
-
Apps should use Pango markup for setting font properties (sizes, bold, italic) in applications.
-
Most modules have ChangeLog files; be sure to add an appropriate entry when checking in your changes.
-
When editing an existing module, respect its conventions for layout and formatting of code. In many cases, these will be as described in the GNU coding standards, see: http://www.gnu.org/prep/standards_22.html
-
Beware of the fact that your application might run on different screen layouts! Most obviously this is a rotated screen but completely other screens could be used in the future. Take this into account so that all GUI elements are always accessible using for example viewports scrollable areas in conjunction with automatic scrollbars.
-
Apps should have its license (it needs to be a GPL-compatible license, see http://www.gnu.org/philosophy/license-list.html#GPLCompatibleLicenses) stated in every source file.
-
Source code comments should be in English language.
-
There is an empty example project that may be used as base for a new application here: http://home.unix-ag.org/boor/files/gpe-dataconf-empty.tar.gz
-
Shipping startup files directly in /etc/X11/Xsession-gpe.d is discouraged. To ease the merge between GPE and non-GPE startup scripts, you should ship an entry in /etc/X11/Xsession.d and use postinst/postrm scripts to create and remove a symlink into /etc/X11/Xsession.d. See the gpe-soundserver package for an example.
-
Only put a trailing "2" in the name of GTK2 programs when it is actually necessary. Normally this would be if there is a pre-existing GTK1 version of the same program that needs to be kept around in the archive.
-
but instead use .desktop files for application launchers like GNOME and KDE. See http://standards.freedesktop.org/desktop-entry-spec/latest/
-
All libraries should be LGPL or any compatible license.
-
It is a little bit outdated now...
To compile/debug/test applications on my desktop, I run xnest as follows:
-
export DISPLAY=:1 && DISPLAY=:0 Xnest :1 -geometry 240x320 -auth /dev/null &
I'm sure there is a better way even...
There is matchbox-nest now that provides a better Xnest testing environment. Check out http://projects.o-hand.com/matchbox/ and http://projects.o-hand.com/matchbox/sources/matchbox-nest/