File: HACKING

package info (click to toggle)
minbar 0.2.1-5
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 4,900 kB
  • ctags: 165
  • sloc: xml: 58,701; sh: 3,664; ansic: 1,925; makefile: 111
file content (47 lines) | stat: -rw-r--r-- 1,175 bytes parent folder | download | duplicates (3)
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
Please feel free to edit as you see fit, I would appreciate however,
that you follow these guidelines:

STYLE
-----
Indenting
	Use tabs please. I use 8 spaces, switch to that and the code
	will look very readable.

Indent style
	I personally prefer the readable BSD style, all brackets
	should be on their own lines. Example:
		
	void function()
	{
		int i = 1;
		if(i)
		{
			do();
		}
		else
		{
			dont();
		}
	}

	I realise that this style is very verbose, but the emphasis is 
	on readability, unless you still code on really really old 
	terminals with only 24 lines (I doubt that).
Line Width
	100 Maximum, but I usually use 80.
	in vim, I use :match DIffAdd "\%80c.*" to highlight lines longer than 80 lines, like this one.


CODING
------
Functions
	All functions should be declared first, then defined. 

Glade Interfaces
	Use Glade 3.0 or above to edit the glade user interface files.
	Avoid using glade 2.0 at all cost. Load the xml files at run
	time, no need to "build".
Widgets
	Windows: Don't destroy them, just hide them! if the code needs to
	destroy the window, fix it. If absolutly necessary, please ask first,
	as other code my rely on widgets existing.