udapted vi.po
[rhythmbox.git] / HACKING
blob287a75deb56b4a18255bd7617d468c18382241d4
1 First of all, Rhythmbox tries to have a consistent code style.  You will
2 need to follow this.  Here's a summary:
4 - Code must compile with -Wall -Werror
5 - use 8-space tabs for indentation
6 - curly brackets are NOT on a new line, except for function definitions.
7   (we are slowly converting the code)
8 - if statements are written like this: "if (this != that)"
9 - Major functions should have prototypes
10 - There should be a space between a function call and the parameters
11 - callback functions should have a suffix _cb
13 Rhythmbox is also highly object-oriented using GObject.  Any major
14 additions should generally go into their own class, and not be bolted onto
15 an existing one.
17 Any regular patches you send should be in unified diff format (-u
18 option to patch).
20 Rhythmbox is developed using the Arch revision control system.  For
21 simple changes, you can just get a copy of the source tree, and hack
22 away.  Then, you can get a changeset by doing:
24 tla changes -o /tmp/my-changes.cset
26 You can then tar this up (it'll be a directory) and send it via email.
28 If you want to make any major changes, it is highly recommended that
29 you create your own branch of the source tree, and work from there.
30 That way you can publish your archive somewhere, and we can directly
31 merge your changes.
33 When you are done, you can send a message to
34 rhythmbox-devel@gnome.org, or post a bugzilla bug with a merge
35 request.  For more information about this, see:
36 http://web.rhythmbox.org/development.html
39 Finally, here is some sample code written in the correct style:
41   Important comment blocks are written like this:
42   
43 /**
44  * bla_bla_cb: This is an example comment block
45  */
47   Here is a correctly indented code sample:
49 void
50 foo (const char *bla, gpointer cow)
52         if (!strcmp (bla, cow)) {
53                 g_print ("moo!");
54                 return;
55         } else {
56                 do_something (cow);     
57                 do_something_else (bla, cow);
58         }
60         if (foo)
61             return;
63         ...
64 }       
66 arch-tag: How to hack Rhythmbox and submit patches