summaryrefslogtreecommitdiff
path: root/HACKING
blob: 307b09f0154937263dc0e30db41f4bceaf85a478 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
If you are the maintainer of an applet, feel free to commit - unless we're 
very close to a release. In that case, contact us.

If you just want to hack, let us know. Most of the applets are unmaintained, 
but you should try to contact the maintainer (or past maintainer) before 
working on them, to avoid duplicate work and stepping on any toes. If unsure,
ask us about it.

Release planning for GNOME Applets is online at
  http://live.gnome.org/GnomeApplets
We share a mailing list with GNOME Utilities, you can subscribe to
  gnome-utils-list@gnome.org

Please attach your patches to a bug in http://bugzilla.gnome.org, either by
filing new bugs or attaching it to an old one.
Patches should be generated with `diff -uprN` (you can add "diff -up" to your
~/.cvsrc).

Some tips for hacking/debugging the applets:

1) The Panel Applet Writer's Reference Manual, including the PanelApplet
   library documentation, can be found at 
   http://developer.gnome.org/doc/API/2.0/panel-applet/libpanel-applet.html,
   or in gnome-panel/doc/reference/panel-applet (source). It is not
   completely up to date, but it covers the basics of writing an applet.

2) Look at the other applet implementations. One of the simpler applets is
   the fish applet, which lives in gnome-panel/applets/fish.

3) Read the article about debugging GNOME Applets at 
   http://www.davyd.id.au/articles/debugging-gnome-applets.shtml.
   This article also contains a list of common considerations when developing
   applets. Please, please read this article, it covers everything you're
   likely to need to know. If you find anything is missing, then contact
   the maintainers.

4) Be weary of static, global variables if you plan to allow the user
   to be able to add multiple instances of the applet. Each instance will
   share the static varible. This is described in the debugging article, under
   "Other considerations".

5) You'd probably want to run the applets from CVS, without nescessarily doing
   the same with all of GNOME. To do this, install the applets from CVS to a
   different prefix than the rest of GNOME, and change your bonobo servers 
   directory to $prefix/lib/bonobo/servers. You'll find the config file by
   running "bonobo-activation-sysconf --config-file-path". Add the directory to
   as an <item> at the top of <searchpath>. Log out, run bonobo-slay and make
   sure no bonobo processes are running. When you log in again, your applets
   should be running from the new prefix.
   Running single applets from CVS is described further in Davyd's debugging
   article.

6) Please make use of the global defines already provided for you, rather
   then defining your own in your Makefile.am. Some useful global defines are
   GNOME_ICONDIR, GNOME_PIXMAPSDIR, GNOME_LOCALEDIR, GNOME_GLADEDIR, DATADIR,
   SYSCONFDIR, LIBDIR and VERSION.

7) Attempt to use the Nautilus/GNOME-VFS coding style in GNOME-Applets. Code
   should be neatly tabbed, with 8 character tabs, and fit on an 80 character
   wide terminal. Ideally
     functions (will_be_called (LIKE, THIS));
   opening braces will be on a new line and variables will be declared at the
   top of the block without assignment, C89 style.

Davyd Madeley <davyd@madeley.id.au>
Kevin Vandersloot <kfv101 at psu dot edu>
Christoffer Olsen <co at deworks dot net>