annotate CODING @ 565:85b9cec260bc

Fix a bug occuring when using certain actions on a collection item which is not in the selection. Triggering it will either result in an assertion failure or a segfault. To reproduce: - open a collection - right-click on a non-selected image - select Delete... menu entry (or Copy, Move, Rename, Properties...) It results in the best case: ** ERROR **: file filelist.c: line 905 (file_data_ref): assertion failed: (fd->magick == 0x12345678) or a pure segfault due to corrupted data. collection_table_popup_file_list() has to return a list of filedata * not a list of gchar *.
author zas_
date Sat, 03 May 2008 16:58:17 +0000
parents 86f4c42afeab
children f31ae0d9e163
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
524
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
1 Please keep the general coding style of Geeqie:
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
2
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
3 Space after if, while and for:
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
4
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
5 while (...)
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
6 for (...)
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
7 if (...)
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
8
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
9 Indentation of {}:
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
10
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
11 while (...)
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
12 {
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
13 ...
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
14 }
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
15
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
16 if (...)
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
17 {
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
18 ...
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
19 }
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
20 else
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
21 {
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
22 ...
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
23 }
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
24
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
25 Spaces around operators:
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
26
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
27 i = 2;
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
28
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
29 Space after comma:
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
30 func(a, b, c);
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
31
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
32 Use glib functions when possible (ie. g_ascii_isspace() instead of isspace()).
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
33 Please use glib types when possible (ie. gint and gchar instead of int and char)
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
34 .
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
35
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
36 Check twice the indentation and spurious whitespaces.
7659ccaf2a74 Document the Geeqie coding style.
zas_
parents:
diff changeset
37
525
86f4c42afeab Add a line about variable and function names.
zas_
parents: 524
diff changeset
38 Try to use explicit variable and function names