Mercurial > geeqie.yaz
annotate CODING @ 622:54e20abb5c6d
Fix display of collection in overlay info.
Due to markup escaped <i>collection</i> was displayed instead of collection's in italic.
Overlay info syntax was extended to allow the wrapping of displayed data with markup.
General syntax is: %name[:length limit][:extra]%
Extra string uses special character '*' to mark the place of the data to display.
If no '*' is present, then extra string is just appended to data.
Any "\n" is replaced by a newline on display.
Pango mark up is accepted in left and right parts.
If data is empty, nothing will be displayed.
Examples:
"%name:<i>*</i>\n%" -> name is displayed in italics ended with a newline
"%size:\n%" -> size is displayed with a newline at end
"%formatted.ISOSpeedRating:ISO *%" -> prefix iso number with "ISO " (ie. "ISO 100")
"Collection <b>*</b>\n" -> display collection name in bold prefixed by "Collection " and a newline is appended
Collection name formatting was slighly improved by not displaying the .gqv extension.
The default overlay info string was modified to use the new syntax, but older info strings should be
displayed as usual.
author | zas_ |
---|---|
date | Sat, 10 May 2008 21:29:53 +0000 |
parents | f31ae0d9e163 |
children | f20e7cebcb12 |
rev | line source |
---|---|
524 | 1 Please keep the general coding style of Geeqie: |
2 | |
3 Space after if, while and for: | |
611
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
4 ------------------------------ |
524 | 5 |
6 while (...) | |
7 for (...) | |
8 if (...) | |
9 | |
10 Indentation of {}: | |
611
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
11 ------------------ |
524 | 12 |
13 while (...) | |
14 { | |
15 ... | |
16 } | |
17 | |
18 if (...) | |
19 { | |
20 ... | |
21 } | |
22 else | |
23 { | |
24 ... | |
25 } | |
26 | |
27 Spaces around operators: | |
611
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
28 ------------------------ |
524 | 29 |
30 i = 2; | |
611
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
31 x = i * (j / 2); |
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
32 |
524 | 33 |
34 Space after comma: | |
611
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
35 ------------------ |
524 | 36 func(a, b, c); |
37 | |
611
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
38 Functions without any parameter should be declared using void: |
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
39 -------------------------------------------------------------- |
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
40 gint function(void) |
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
41 { |
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
42 ... |
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
43 } |
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
44 |
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
45 Use glib types: |
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
46 --------------- |
524 | 47 Please use glib types when possible (ie. gint and gchar instead of int and char) |
48 . | |
49 | |
611
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
50 Use glib functions: |
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
51 ------------------- |
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
52 Use glib functions when possible (ie. g_ascii_isspace() instead of isspace()). |
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
53 Check if used functions are not deprecated. |
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
54 |
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
55 Others: |
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
56 ------- |
524 | 57 Check twice the indentation and spurious whitespaces. |
58 | |
611
f31ae0d9e163
Update CODING and HACKING files, and add po/README file for translators.
zas_
parents:
525
diff
changeset
|
59 Try to use explicit variable and function names. |