Status: | Merged |
---|---|
Merged at revision: | 249 |
Proposed branch: | lp:~ecx69/bellepoule/linux |
Merge into: | lp:bellepoule |
Diff against target: |
1526 lines (+235/-214) 40 files modified
Makefile (+4/-3) resources/glade/checkin.glade (+1/-1) resources/glade/pool_supervisor.glade (+3/-3) resources/glade/table.glade (+1/-1) sources/attribute.cpp (+26/-23) sources/attribute.hpp (+17/-17) sources/canvas.cpp (+5/-5) sources/canvas.hpp (+5/-5) sources/canvas_module.cpp (+2/-2) sources/canvas_module.hpp (+2/-2) sources/checkin.cpp (+17/-17) sources/checkin.hpp (+1/-1) sources/classification.cpp (+3/-3) sources/classification.hpp (+3/-3) sources/contest.cpp (+13/-13) sources/contest.hpp (+10/-10) sources/data.cpp (+7/-6) sources/data.hpp (+4/-4) sources/filter.cpp (+2/-2) sources/filter.hpp (+2/-2) sources/general_classification.cpp (+3/-2) sources/glade.cpp (+8/-4) sources/glade.hpp (+4/-4) sources/main.cpp (+1/-0) sources/module.cpp (+5/-3) sources/module.hpp (+5/-5) sources/object.cpp (+18/-13) sources/object.hpp (+6/-6) sources/player.cpp (+5/-5) sources/player.hpp (+7/-7) sources/players_list.cpp (+4/-4) sources/players_list.hpp (+4/-4) sources/pool.cpp (+15/-15) sources/pool.hpp (+5/-5) sources/pool_allocator.cpp (+3/-2) sources/score_collector.cpp (+2/-2) sources/score_collector.hpp (+2/-2) sources/stage.hpp (+1/-1) sources/table.cpp (+7/-5) sources/table.hpp (+2/-2) |
To merge this branch: | bzr merge lp:~ecx69/bellepoule/linux |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
betonniere | Approve | ||
Review via email:
|
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message

betonniere (betonniere) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'Makefile' | |||
2 | --- Makefile 2010-05-13 17:56:58 +0000 | |||
3 | +++ Makefile 2011-01-21 08:07:55 +0000 | |||
4 | @@ -11,11 +11,12 @@ | |||
5 | 11 | 11 | ||
6 | 12 | # Options de compilation, l'option -Wno-write-strings est utilisé car beaucoup de warnings | 12 | # Options de compilation, l'option -Wno-write-strings est utilisé car beaucoup de warnings |
7 | 13 | # sur la conversion de chaines constantes en *gchar | 13 | # sur la conversion de chaines constantes en *gchar |
9 | 14 | OPTS=-Wall -Wno-write-strings | 14 | #OPTS=-Wall -Wno-write-strings -Werror -pedantic-errors |
10 | 15 | OPTS=-Wall -std=c++98 -pedantic | ||
11 | 15 | OPTSDBG=$(OPTS) -g | 16 | OPTSDBG=$(OPTS) -g |
12 | 16 | 17 | ||
13 | 17 | # Fichiers source à compiler et à linker, ATTENTION à mettre à jour la liste à chaque nouvelle version | 18 | # Fichiers source à compiler et à linker, ATTENTION à mettre à jour la liste à chaque nouvelle version |
15 | 18 | SRCS=attribute.cpp canvas.cpp canvas_module.cpp checkin.cpp classification.cpp contest.cpp data.cpp filter.cpp general_classification.cpp glade.cpp main.cpp match.cpp module.cpp object.cpp player.cpp players_list.cpp pool_allocator.cpp pool.cpp pool_match_order.cpp pool_supervisor.cpp schedule.cpp score_collector.cpp score.cpp sensitivity_trigger.cpp splitting.cpp stage.cpp table.cpp tournament.cpp | 19 | SRCS=attendees.cpp attribute.cpp canvas.cpp canvas_module.cpp checkin.cpp classification.cpp contest.cpp data.cpp filter.cpp general_classification.cpp glade.cpp main.cpp match.cpp module.cpp object.cpp player.cpp players_list.cpp pool_allocator.cpp pool.cpp pool_match_order.cpp pool_supervisor.cpp schedule.cpp score_collector.cpp score.cpp sensitivity_trigger.cpp splitting.cpp stage.cpp swapper.cpp table.cpp tournament.cpp |
16 | 19 | OBJS=$(SRCS:.cpp=.o) | 20 | OBJS=$(SRCS:.cpp=.o) |
17 | 20 | 21 | ||
18 | 21 | # Nom du fichier exécutable à générer dans $(DBGDIR) et $(RLSDIR) | 22 | # Nom du fichier exécutable à générer dans $(DBGDIR) et $(RLSDIR) |
19 | @@ -29,7 +30,7 @@ | |||
20 | 29 | 30 | ||
21 | 30 | %.o: $(SRCDIR)/%.cpp | 31 | %.o: $(SRCDIR)/%.cpp |
22 | 31 | @mkdir -p $(OBJDIR) | 32 | @mkdir -p $(OBJDIR) |
24 | 32 | @$(CC) -c $< -o $(OBJDIR)/$@ $(CFLAGS) $(OPTS) | 33 | @$(CC) -c $< -o $(OBJDIR)/$@ $(CFLAGS) $(OPTSDBG) |
25 | 33 | 34 | ||
26 | 34 | .PHONY: clean | 35 | .PHONY: clean |
27 | 35 | clean: | 36 | clean: |
28 | 36 | 37 | ||
29 | === modified file 'resources/glade/checkin.glade' | |||
30 | --- resources/glade/checkin.glade 2010-10-04 20:12:34 +0000 | |||
31 | +++ resources/glade/checkin.glade 2011-01-21 08:07:55 +0000 | |||
32 | @@ -274,7 +274,7 @@ | |||
33 | 274 | <property name="visible">True</property> | 274 | <property name="visible">True</property> |
34 | 275 | <property name="spacing">2</property> | 275 | <property name="spacing">2</property> |
35 | 276 | <child> | 276 | <child> |
37 | 277 | <object class="GtkHBox" id="hbox2"> | 277 | <object class="GtkHBox" id="hbox4"> |
38 | 278 | <property name="visible">True</property> | 278 | <property name="visible">True</property> |
39 | 279 | <child> | 279 | <child> |
40 | 280 | <object class="GtkVBox" id="check_vbox"> | 280 | <object class="GtkVBox" id="check_vbox"> |
41 | 281 | 281 | ||
42 | === modified file 'resources/glade/pool_supervisor.glade' | |||
43 | --- resources/glade/pool_supervisor.glade 2010-12-19 17:35:40 +0000 | |||
44 | +++ resources/glade/pool_supervisor.glade 2011-01-21 08:07:55 +0000 | |||
45 | @@ -318,7 +318,7 @@ | |||
46 | 318 | <property name="label_xalign">0</property> | 318 | <property name="label_xalign">0</property> |
47 | 319 | <property name="shadow_type">none</property> | 319 | <property name="shadow_type">none</property> |
48 | 320 | <child> | 320 | <child> |
50 | 321 | <object class="GtkAspectFrame" id="aspectframe1"> | 321 | <object class="GtkAspectFrame" id="aspectframe3"> |
51 | 322 | <property name="visible">True</property> | 322 | <property name="visible">True</property> |
52 | 323 | <property name="label_xalign">0</property> | 323 | <property name="label_xalign">0</property> |
53 | 324 | <property name="shadow_type">none</property> | 324 | <property name="shadow_type">none</property> |
54 | @@ -358,7 +358,7 @@ | |||
55 | 358 | </object> | 358 | </object> |
56 | 359 | </child> | 359 | </child> |
57 | 360 | <child type="label"> | 360 | <child type="label"> |
59 | 361 | <object class="GtkLabel" id="label2"> | 361 | <object class="GtkLabel" id="label3"> |
60 | 362 | <property name="visible">True</property> | 362 | <property name="visible">True</property> |
61 | 363 | <property name="label" translatable="yes"><b>What?</b></property> | 363 | <property name="label" translatable="yes"><b>What?</b></property> |
62 | 364 | <property name="use_markup">True</property> | 364 | <property name="use_markup">True</property> |
63 | @@ -417,7 +417,7 @@ | |||
64 | 417 | </object> | 417 | </object> |
65 | 418 | </child> | 418 | </child> |
66 | 419 | <child type="label"> | 419 | <child type="label"> |
68 | 420 | <object class="GtkLabel" id="label1"> | 420 | <object class="GtkLabel" id="label5"> |
69 | 421 | <property name="visible">True</property> | 421 | <property name="visible">True</property> |
70 | 422 | <property name="label" translatable="yes"><b>For what?</b></property> | 422 | <property name="label" translatable="yes"><b>For what?</b></property> |
71 | 423 | <property name="use_markup">True</property> | 423 | <property name="use_markup">True</property> |
72 | 424 | 424 | ||
73 | === modified file 'resources/glade/table.glade' | |||
74 | --- resources/glade/table.glade 2010-12-19 17:35:40 +0000 | |||
75 | +++ resources/glade/table.glade 2011-01-21 08:07:55 +0000 | |||
76 | @@ -530,7 +530,7 @@ | |||
77 | 530 | <property name="orientation">vertical</property> | 530 | <property name="orientation">vertical</property> |
78 | 531 | <property name="spacing">2</property> | 531 | <property name="spacing">2</property> |
79 | 532 | <child> | 532 | <child> |
81 | 533 | <object class="GtkAspectFrame" id="aspectframe1"> | 533 | <object class="GtkAspectFrame" id="aspectframe4"> |
82 | 534 | <property name="visible">True</property> | 534 | <property name="visible">True</property> |
83 | 535 | <property name="label_xalign">0</property> | 535 | <property name="label_xalign">0</property> |
84 | 536 | <property name="shadow_type">none</property> | 536 | <property name="shadow_type">none</property> |
85 | 537 | 537 | ||
86 | === modified file 'sources/attribute.cpp' | |||
87 | --- sources/attribute.cpp 2010-12-13 21:03:47 +0000 | |||
88 | +++ sources/attribute.cpp 2011-01-21 08:07:55 +0000 | |||
89 | @@ -23,7 +23,7 @@ | |||
90 | 23 | GSList *AttributeDesc::_list = NULL; | 23 | GSList *AttributeDesc::_list = NULL; |
91 | 24 | 24 | ||
92 | 25 | // -------------------------------------------------------------------------------- | 25 | // -------------------------------------------------------------------------------- |
94 | 26 | static gchar *GetUndivadableText (gchar *text) | 26 | static gchar *GetUndivadableText (const gchar *text) |
95 | 27 | { | 27 | { |
96 | 28 | gchar *result = NULL; | 28 | gchar *result = NULL; |
97 | 29 | 29 | ||
98 | @@ -31,7 +31,7 @@ | |||
99 | 31 | { | 31 | { |
100 | 32 | guint nb_space = 0; | 32 | guint nb_space = 0; |
101 | 33 | 33 | ||
103 | 34 | for (gchar *current = text; *current != 0; current++) | 34 | for (gchar *current = (gchar *) text; *current != 0; current++) |
104 | 35 | { | 35 | { |
105 | 36 | if (*current == ' ') | 36 | if (*current == ' ') |
106 | 37 | { | 37 | { |
107 | @@ -67,16 +67,16 @@ | |||
108 | 67 | } | 67 | } |
109 | 68 | 68 | ||
110 | 69 | // -------------------------------------------------------------------------------- | 69 | // -------------------------------------------------------------------------------- |
115 | 70 | AttributeDesc::AttributeDesc (GType type, | 70 | AttributeDesc::AttributeDesc (GType type, |
116 | 71 | gchar *code_name, | 71 | const gchar *code_name, |
117 | 72 | gchar *xml_name, | 72 | const gchar *xml_name, |
118 | 73 | gchar *user_name) | 73 | const gchar *user_name) |
119 | 74 | : Object ("AttributeDesc") | 74 | : Object ("AttributeDesc") |
120 | 75 | { | 75 | { |
121 | 76 | _type = type; | 76 | _type = type; |
125 | 77 | _code_name = code_name; | 77 | _code_name = g_strdup (code_name); |
126 | 78 | _xml_name = xml_name; | 78 | _xml_name = g_strdup (xml_name); |
127 | 79 | _user_name = user_name; | 79 | _user_name = g_strdup (user_name); |
128 | 80 | _uniqueness = SINGULAR; | 80 | _uniqueness = SINGULAR; |
129 | 81 | _persistency = PERSISTENT; | 81 | _persistency = PERSISTENT; |
130 | 82 | _scope = GLOBAL; | 82 | _scope = GLOBAL; |
131 | @@ -98,6 +98,9 @@ | |||
132 | 98 | { | 98 | { |
133 | 99 | g_object_unref (_discrete_store); | 99 | g_object_unref (_discrete_store); |
134 | 100 | } | 100 | } |
135 | 101 | g_free (_code_name); | ||
136 | 102 | g_free (_xml_name); | ||
137 | 103 | g_free (_user_name); | ||
138 | 101 | } | 104 | } |
139 | 102 | 105 | ||
140 | 103 | // -------------------------------------------------------------------------------- | 106 | // -------------------------------------------------------------------------------- |
141 | @@ -107,10 +110,10 @@ | |||
142 | 107 | } | 110 | } |
143 | 108 | 111 | ||
144 | 109 | // -------------------------------------------------------------------------------- | 112 | // -------------------------------------------------------------------------------- |
149 | 110 | AttributeDesc *AttributeDesc::Declare (GType type, | 113 | AttributeDesc *AttributeDesc::Declare (GType type, |
150 | 111 | gchar *code_name, | 114 | const gchar *code_name, |
151 | 112 | gchar *xml_name, | 115 | const gchar *xml_name, |
152 | 113 | gchar *user_name) | 116 | gchar *user_name) |
153 | 114 | { | 117 | { |
154 | 115 | AttributeDesc *attr_desc = new AttributeDesc (type, | 118 | AttributeDesc *attr_desc = new AttributeDesc (type, |
155 | 116 | code_name, | 119 | code_name, |
156 | @@ -271,9 +274,9 @@ | |||
157 | 271 | } | 274 | } |
158 | 272 | 275 | ||
159 | 273 | // -------------------------------------------------------------------------------- | 276 | // -------------------------------------------------------------------------------- |
163 | 274 | void AttributeDesc::AddDiscreteValues (gchar *first_xml_image, | 277 | void AttributeDesc::AddDiscreteValues (const gchar *first_xml_image, |
164 | 275 | gchar *first_user_image, | 278 | gchar *first_user_image, |
165 | 276 | gchar *first_icon, | 279 | const gchar *first_icon, |
166 | 277 | ...) | 280 | ...) |
167 | 278 | { | 281 | { |
168 | 279 | if (_discrete_store == NULL) | 282 | if (_discrete_store == NULL) |
169 | @@ -286,9 +289,9 @@ | |||
170 | 286 | 289 | ||
171 | 287 | { | 290 | { |
172 | 288 | va_list ap; | 291 | va_list ap; |
174 | 289 | gchar *xml_image = first_xml_image; | 292 | gchar *xml_image = g_strdup (first_xml_image); |
175 | 290 | gchar *user_image = first_user_image; | 293 | gchar *user_image = first_user_image; |
177 | 291 | gchar *icon = first_icon; | 294 | gchar *icon = g_strdup (first_icon); |
178 | 292 | 295 | ||
179 | 293 | va_start (ap, first_icon); | 296 | va_start (ap, first_icon); |
180 | 294 | while (xml_image) | 297 | while (xml_image) |
181 | @@ -324,7 +327,7 @@ | |||
182 | 324 | } | 327 | } |
183 | 325 | 328 | ||
184 | 326 | // -------------------------------------------------------------------------------- | 329 | // -------------------------------------------------------------------------------- |
186 | 327 | void AttributeDesc::AddDiscreteValues (gchar *file) | 330 | void AttributeDesc::AddDiscreteValues (const gchar *file) |
187 | 328 | { | 331 | { |
188 | 329 | if (_discrete_store == NULL) | 332 | if (_discrete_store == NULL) |
189 | 330 | { | 333 | { |
190 | @@ -434,7 +437,7 @@ | |||
191 | 434 | } | 437 | } |
192 | 435 | 438 | ||
193 | 436 | // -------------------------------------------------------------------------------- | 439 | // -------------------------------------------------------------------------------- |
195 | 437 | AttributeDesc *AttributeDesc::GetDesc (gchar *name) | 440 | AttributeDesc *AttributeDesc::GetDesc (const gchar *name) |
196 | 438 | { | 441 | { |
197 | 439 | for (guint i = 0; i < g_slist_length (_list); i++) | 442 | for (guint i = 0; i < g_slist_length (_list); i++) |
198 | 440 | { | 443 | { |
199 | @@ -554,7 +557,7 @@ | |||
200 | 554 | } | 557 | } |
201 | 555 | 558 | ||
202 | 556 | // -------------------------------------------------------------------------------- | 559 | // -------------------------------------------------------------------------------- |
204 | 557 | void TextAttribute::SetValue (gchar *value) | 560 | void TextAttribute::SetValue (const gchar *value) |
205 | 558 | { | 561 | { |
206 | 559 | if (value) | 562 | if (value) |
207 | 560 | { | 563 | { |
208 | @@ -648,7 +651,7 @@ | |||
209 | 648 | } | 651 | } |
210 | 649 | 652 | ||
211 | 650 | // -------------------------------------------------------------------------------- | 653 | // -------------------------------------------------------------------------------- |
213 | 651 | void BooleanAttribute::SetValue (gchar *value) | 654 | void BooleanAttribute::SetValue (const gchar *value) |
214 | 652 | { | 655 | { |
215 | 653 | if (value) | 656 | if (value) |
216 | 654 | { | 657 | { |
217 | @@ -726,7 +729,7 @@ | |||
218 | 726 | } | 729 | } |
219 | 727 | 730 | ||
220 | 728 | // -------------------------------------------------------------------------------- | 731 | // -------------------------------------------------------------------------------- |
222 | 729 | void IntAttribute::SetValue (gchar *value) | 732 | void IntAttribute::SetValue (const gchar *value) |
223 | 730 | { | 733 | { |
224 | 731 | if (value) | 734 | if (value) |
225 | 732 | { | 735 | { |
226 | 733 | 736 | ||
227 | === modified file 'sources/attribute.hpp' | |||
228 | --- sources/attribute.hpp 2010-12-13 21:03:47 +0000 | |||
229 | +++ sources/attribute.hpp 2011-01-21 08:07:55 +0000 | |||
230 | @@ -72,28 +72,28 @@ | |||
231 | 72 | 72 | ||
232 | 73 | static void SetPath (gchar *path); | 73 | static void SetPath (gchar *path); |
233 | 74 | 74 | ||
238 | 75 | static AttributeDesc *Declare (GType type, | 75 | static AttributeDesc *Declare (GType type, |
239 | 76 | gchar *code_name, | 76 | const gchar *code_name, |
240 | 77 | gchar *xml_name, | 77 | const gchar *xml_name, |
241 | 78 | gchar *user_name); | 78 | gchar *user_name); |
242 | 79 | 79 | ||
243 | 80 | static void CreateList (GSList **list, ...); | 80 | static void CreateList (GSList **list, ...); |
244 | 81 | 81 | ||
245 | 82 | static GSList *GetList (); | 82 | static GSList *GetList (); |
246 | 83 | 83 | ||
248 | 84 | static AttributeDesc *GetDesc (gchar *name); | 84 | static AttributeDesc *GetDesc (const gchar *name); |
249 | 85 | 85 | ||
250 | 86 | void BindDiscreteValues (GObject *object, | 86 | void BindDiscreteValues (GObject *object, |
251 | 87 | GtkCellRenderer *renderer = NULL); | 87 | GtkCellRenderer *renderer = NULL); |
252 | 88 | 88 | ||
253 | 89 | gboolean HasDiscreteValue (); | 89 | gboolean HasDiscreteValue (); |
254 | 90 | 90 | ||
258 | 91 | void AddDiscreteValues (gchar *first_xml_image, | 91 | void AddDiscreteValues (const gchar *first_xml_image, |
259 | 92 | gchar *first_user_image, | 92 | gchar *first_user_image, |
260 | 93 | gchar *first_icon, | 93 | const gchar *first_icon, |
261 | 94 | ...); | 94 | ...); |
262 | 95 | 95 | ||
264 | 96 | void AddDiscreteValues (gchar *file); | 96 | void AddDiscreteValues (const gchar *file); |
265 | 97 | 97 | ||
266 | 98 | void *GetDiscreteValue (guint from_code); | 98 | void *GetDiscreteValue (guint from_code); |
267 | 99 | 99 | ||
268 | @@ -107,10 +107,10 @@ | |||
269 | 107 | static gchar *_path; | 107 | static gchar *_path; |
270 | 108 | static GSList *_list; | 108 | static GSList *_list; |
271 | 109 | 109 | ||
276 | 110 | AttributeDesc (GType type, | 110 | AttributeDesc (GType type, |
277 | 111 | gchar *code_name, | 111 | const gchar *code_name, |
278 | 112 | gchar *xml_name, | 112 | const gchar *xml_name, |
279 | 113 | gchar *user_name); | 113 | const gchar *user_name); |
280 | 114 | 114 | ||
281 | 115 | ~AttributeDesc (); | 115 | ~AttributeDesc (); |
282 | 116 | }; | 116 | }; |
283 | @@ -132,7 +132,7 @@ | |||
284 | 132 | 132 | ||
285 | 133 | GType GetType (); | 133 | GType GetType (); |
286 | 134 | 134 | ||
288 | 135 | virtual void SetValue (gchar *value) = 0; | 135 | virtual void SetValue (const gchar *value) = 0; |
289 | 136 | 136 | ||
290 | 137 | virtual void SetValue (guint value) = 0; | 137 | virtual void SetValue (guint value) = 0; |
291 | 138 | 138 | ||
292 | @@ -170,7 +170,7 @@ | |||
293 | 170 | 170 | ||
294 | 171 | virtual ~TextAttribute (); | 171 | virtual ~TextAttribute (); |
295 | 172 | 172 | ||
297 | 173 | void SetValue (gchar *value); | 173 | void SetValue (const gchar *value); |
298 | 174 | 174 | ||
299 | 175 | void SetValue (guint value); | 175 | void SetValue (guint value); |
300 | 176 | 176 | ||
301 | @@ -201,7 +201,7 @@ | |||
302 | 201 | 201 | ||
303 | 202 | virtual ~BooleanAttribute (); | 202 | virtual ~BooleanAttribute (); |
304 | 203 | 203 | ||
306 | 204 | void SetValue (gchar *value); | 204 | void SetValue (const gchar *value); |
307 | 205 | 205 | ||
308 | 206 | void SetValue (guint value); | 206 | void SetValue (guint value); |
309 | 207 | 207 | ||
310 | @@ -231,7 +231,7 @@ | |||
311 | 231 | 231 | ||
312 | 232 | virtual ~IntAttribute (); | 232 | virtual ~IntAttribute (); |
313 | 233 | 233 | ||
315 | 234 | void SetValue (gchar *value); | 234 | void SetValue (const gchar *value); |
316 | 235 | 235 | ||
317 | 236 | void SetValue (guint value); | 236 | void SetValue (guint value); |
318 | 237 | 237 | ||
319 | 238 | 238 | ||
320 | === modified file 'sources/canvas.cpp' | |||
321 | --- sources/canvas.cpp 2010-12-13 21:03:47 +0000 | |||
322 | +++ sources/canvas.cpp 2011-01-21 08:07:55 +0000 | |||
323 | @@ -37,7 +37,7 @@ | |||
324 | 37 | 37 | ||
325 | 38 | // -------------------------------------------------------------------------------- | 38 | // -------------------------------------------------------------------------------- |
326 | 39 | void Canvas::SetTableItemAttribute (GooCanvasItem *item, | 39 | void Canvas::SetTableItemAttribute (GooCanvasItem *item, |
328 | 40 | gchar *attribute, | 40 | const gchar *attribute, |
329 | 41 | gdouble value) | 41 | gdouble value) |
330 | 42 | { | 42 | { |
331 | 43 | GooCanvasItem *parent = goo_canvas_item_get_parent (item); | 43 | GooCanvasItem *parent = goo_canvas_item_get_parent (item); |
332 | @@ -54,7 +54,7 @@ | |||
333 | 54 | 54 | ||
334 | 55 | // -------------------------------------------------------------------------------- | 55 | // -------------------------------------------------------------------------------- |
335 | 56 | void Canvas::SetTableItemAttribute (GooCanvasItem *item, | 56 | void Canvas::SetTableItemAttribute (GooCanvasItem *item, |
337 | 57 | gchar *attribute, | 57 | const gchar *attribute, |
338 | 58 | guint value) | 58 | guint value) |
339 | 59 | { | 59 | { |
340 | 60 | GooCanvasItem *parent = goo_canvas_item_get_parent (item); | 60 | GooCanvasItem *parent = goo_canvas_item_get_parent (item); |
341 | @@ -71,7 +71,7 @@ | |||
342 | 71 | 71 | ||
343 | 72 | // -------------------------------------------------------------------------------- | 72 | // -------------------------------------------------------------------------------- |
344 | 73 | GooCanvasItem *Canvas::PutTextInTable (GooCanvasItem *table, | 73 | GooCanvasItem *Canvas::PutTextInTable (GooCanvasItem *table, |
346 | 74 | gchar *text, | 74 | const gchar *text, |
347 | 75 | guint row, | 75 | guint row, |
348 | 76 | guint column) | 76 | guint column) |
349 | 77 | { | 77 | { |
350 | @@ -108,7 +108,7 @@ | |||
351 | 108 | 108 | ||
352 | 109 | // -------------------------------------------------------------------------------- | 109 | // -------------------------------------------------------------------------------- |
353 | 110 | GooCanvasItem *Canvas::CreateIcon (GooCanvasItem *parent, | 110 | GooCanvasItem *Canvas::CreateIcon (GooCanvasItem *parent, |
355 | 111 | gchar *icon_name, | 111 | const gchar *icon_name, |
356 | 112 | gdouble x, | 112 | gdouble x, |
357 | 113 | gdouble y) | 113 | gdouble y) |
358 | 114 | { | 114 | { |
359 | @@ -138,7 +138,7 @@ | |||
360 | 138 | 138 | ||
361 | 139 | // -------------------------------------------------------------------------------- | 139 | // -------------------------------------------------------------------------------- |
362 | 140 | GooCanvasItem *Canvas::PutStockIconInTable (GooCanvasItem *table, | 140 | GooCanvasItem *Canvas::PutStockIconInTable (GooCanvasItem *table, |
364 | 141 | gchar *icon_name, | 141 | const gchar *icon_name, |
365 | 142 | guint row, | 142 | guint row, |
366 | 143 | guint column) | 143 | guint column) |
367 | 144 | { | 144 | { |
368 | 145 | 145 | ||
369 | === modified file 'sources/canvas.hpp' | |||
370 | --- sources/canvas.hpp 2010-12-13 21:03:47 +0000 | |||
371 | +++ sources/canvas.hpp 2011-01-21 08:07:55 +0000 | |||
372 | @@ -31,12 +31,12 @@ | |||
373 | 31 | guint column); | 31 | guint column); |
374 | 32 | 32 | ||
375 | 33 | static GooCanvasItem *PutTextInTable (GooCanvasItem *table, | 33 | static GooCanvasItem *PutTextInTable (GooCanvasItem *table, |
377 | 34 | gchar *text, | 34 | const gchar *text, |
378 | 35 | guint row, | 35 | guint row, |
379 | 36 | guint column); | 36 | guint column); |
380 | 37 | 37 | ||
381 | 38 | static GooCanvasItem *CreateIcon (GooCanvasItem *parent, | 38 | static GooCanvasItem *CreateIcon (GooCanvasItem *parent, |
383 | 39 | gchar *icon_name, | 39 | const gchar *icon_name, |
384 | 40 | gdouble x, | 40 | gdouble x, |
385 | 41 | gdouble y); | 41 | gdouble y); |
386 | 42 | 42 | ||
387 | @@ -46,16 +46,16 @@ | |||
388 | 46 | guint column); | 46 | guint column); |
389 | 47 | 47 | ||
390 | 48 | static GooCanvasItem *PutStockIconInTable (GooCanvasItem *table, | 48 | static GooCanvasItem *PutStockIconInTable (GooCanvasItem *table, |
392 | 49 | gchar *icon_name, | 49 | const gchar *icon_name, |
393 | 50 | guint row, | 50 | guint row, |
394 | 51 | guint column); | 51 | guint column); |
395 | 52 | 52 | ||
396 | 53 | static void SetTableItemAttribute (GooCanvasItem *item, | 53 | static void SetTableItemAttribute (GooCanvasItem *item, |
398 | 54 | gchar *attribute, | 54 | const gchar *attribute, |
399 | 55 | guint value); | 55 | guint value); |
400 | 56 | 56 | ||
401 | 57 | static void SetTableItemAttribute (GooCanvasItem *item, | 57 | static void SetTableItemAttribute (GooCanvasItem *item, |
403 | 58 | gchar *attribute, | 58 | const gchar *attribute, |
404 | 59 | gdouble value); | 59 | gdouble value); |
405 | 60 | 60 | ||
406 | 61 | static GooCanvas *CreatePrinterCanvas (GtkPrintContext *context); | 61 | static GooCanvas *CreatePrinterCanvas (GtkPrintContext *context); |
407 | 62 | 62 | ||
408 | === modified file 'sources/canvas_module.cpp' | |||
409 | --- sources/canvas_module.cpp 2010-12-19 17:35:40 +0000 | |||
410 | +++ sources/canvas_module.cpp 2011-01-21 08:07:55 +0000 | |||
411 | @@ -25,8 +25,8 @@ | |||
412 | 25 | #include "canvas_module.hpp" | 25 | #include "canvas_module.hpp" |
413 | 26 | 26 | ||
414 | 27 | // -------------------------------------------------------------------------------- | 27 | // -------------------------------------------------------------------------------- |
417 | 28 | CanvasModule::CanvasModule (gchar *glade_file, | 28 | CanvasModule::CanvasModule (const gchar *glade_file, |
418 | 29 | gchar *root) | 29 | const gchar *root) |
419 | 30 | : Module (glade_file, | 30 | : Module (glade_file, |
420 | 31 | root) | 31 | root) |
421 | 32 | { | 32 | { |
422 | 33 | 33 | ||
423 | === modified file 'sources/canvas_module.hpp' | |||
424 | --- sources/canvas_module.hpp 2010-05-17 12:24:43 +0000 | |||
425 | +++ sources/canvas_module.hpp 2011-01-21 08:07:55 +0000 | |||
426 | @@ -26,8 +26,8 @@ | |||
427 | 26 | class CanvasModule : public Module | 26 | class CanvasModule : public Module |
428 | 27 | { | 27 | { |
429 | 28 | protected: | 28 | protected: |
432 | 29 | CanvasModule (gchar *glade_file, | 29 | CanvasModule (const gchar *glade_file, |
433 | 30 | gchar *root = NULL); | 30 | const gchar *root = NULL); |
434 | 31 | virtual ~CanvasModule (); | 31 | virtual ~CanvasModule (); |
435 | 32 | 32 | ||
436 | 33 | static void WipeItem (GooCanvasItem *item); | 33 | static void WipeItem (GooCanvasItem *item); |
437 | 34 | 34 | ||
438 | === modified file 'sources/checkin.cpp' | |||
439 | --- sources/checkin.cpp 2010-12-02 21:35:29 +0000 | |||
440 | +++ sources/checkin.cpp 2011-01-21 08:07:55 +0000 | |||
441 | @@ -264,7 +264,7 @@ | |||
442 | 264 | 264 | ||
443 | 265 | // -------------------------------------------------------------------------------- | 265 | // -------------------------------------------------------------------------------- |
444 | 266 | void Checkin::Load (xmlXPathContext *xml_context, | 266 | void Checkin::Load (xmlXPathContext *xml_context, |
446 | 267 | gchar *from_node) | 267 | const gchar *from_node) |
447 | 268 | { | 268 | { |
448 | 269 | gchar *path = g_strdup_printf ("%s/Tireurs", from_node); | 269 | gchar *path = g_strdup_printf ("%s/Tireurs", from_node); |
449 | 270 | xmlXPathObject *xml_object = xmlXPathEval (BAD_CAST path, xml_context); | 270 | xmlXPathObject *xml_object = xmlXPathEval (BAD_CAST path, xml_context); |
450 | @@ -778,24 +778,24 @@ | |||
451 | 778 | 778 | ||
452 | 779 | player = new Player; | 779 | player = new Player; |
453 | 780 | 780 | ||
455 | 781 | attr_id._name = "attending"; | 781 | attr_id._name = (gchar *) "attending"; |
456 | 782 | player->SetAttributeValue (&attr_id, (guint) FALSE); | 782 | player->SetAttributeValue (&attr_id, (guint) FALSE); |
457 | 783 | 783 | ||
458 | 784 | if (tokens) | 784 | if (tokens) |
459 | 785 | { | 785 | { |
461 | 786 | attr_id._name = "name"; | 786 | attr_id._name = (gchar *) "name"; |
462 | 787 | player->SetAttributeValue (&attr_id, tokens[0]); | 787 | player->SetAttributeValue (&attr_id, tokens[0]); |
463 | 788 | 788 | ||
465 | 789 | attr_id._name = "first_name"; | 789 | attr_id._name = (gchar *) "first_name"; |
466 | 790 | player->SetAttributeValue (&attr_id, tokens[1]); | 790 | player->SetAttributeValue (&attr_id, tokens[1]); |
467 | 791 | 791 | ||
469 | 792 | attr_id._name = "birth_date"; | 792 | attr_id._name = (gchar *) "birth_date"; |
470 | 793 | player->SetAttributeValue (&attr_id, tokens[2]); | 793 | player->SetAttributeValue (&attr_id, tokens[2]); |
471 | 794 | 794 | ||
473 | 795 | attr_id._name = "gender"; | 795 | attr_id._name = (gchar *) "gender"; |
474 | 796 | player->SetAttributeValue (&attr_id, tokens[3]); | 796 | player->SetAttributeValue (&attr_id, tokens[3]); |
475 | 797 | 797 | ||
477 | 798 | attr_id._name = "country"; | 798 | attr_id._name = (gchar *) "country"; |
478 | 799 | player->SetAttributeValue (&attr_id, tokens[4]); | 799 | player->SetAttributeValue (&attr_id, tokens[4]); |
479 | 800 | 800 | ||
480 | 801 | g_strfreev (tokens); | 801 | g_strfreev (tokens); |
481 | @@ -815,7 +815,7 @@ | |||
482 | 815 | 0); | 815 | 0); |
483 | 816 | if (tokens) | 816 | if (tokens) |
484 | 817 | { | 817 | { |
486 | 818 | attr_id._name = "licence"; | 818 | attr_id._name = (gchar *) "licence"; |
487 | 819 | player->SetAttributeValue (&attr_id, tokens[0]); | 819 | player->SetAttributeValue (&attr_id, tokens[0]); |
488 | 820 | 820 | ||
489 | 821 | if (strlen (tokens[0]) > 2) | 821 | if (strlen (tokens[0]) > 2) |
490 | @@ -830,27 +830,27 @@ | |||
491 | 830 | 830 | ||
492 | 831 | if (league) | 831 | if (league) |
493 | 832 | { | 832 | { |
495 | 833 | attr_id._name = "league"; | 833 | attr_id._name = (gchar *) "league"; |
496 | 834 | player->SetAttributeValue (&attr_id, league); | 834 | player->SetAttributeValue (&attr_id, league); |
497 | 835 | g_free (league); | 835 | g_free (league); |
498 | 836 | } | 836 | } |
499 | 837 | } | 837 | } |
500 | 838 | } | 838 | } |
501 | 839 | 839 | ||
503 | 840 | attr_id._name = "club"; | 840 | attr_id._name = (gchar *) "club"; |
504 | 841 | player->SetAttributeValue (&attr_id, tokens[2]); | 841 | player->SetAttributeValue (&attr_id, tokens[2]); |
505 | 842 | 842 | ||
507 | 843 | attr_id._name = "exported"; | 843 | attr_id._name = (gchar *) "exported"; |
508 | 844 | player->SetAttributeValue (&attr_id, (guint) FALSE); | 844 | player->SetAttributeValue (&attr_id, (guint) FALSE); |
509 | 845 | 845 | ||
510 | 846 | if (tokens[3] == NULL) | 846 | if (tokens[3] == NULL) |
511 | 847 | { | 847 | { |
513 | 848 | attr_id._name = "rating"; | 848 | attr_id._name = (gchar *) "rating"; |
514 | 849 | player->SetAttributeValue (&attr_id, (guint) 0); | 849 | player->SetAttributeValue (&attr_id, (guint) 0); |
515 | 850 | } | 850 | } |
516 | 851 | else | 851 | else |
517 | 852 | { | 852 | { |
519 | 853 | attr_id._name = "rating"; | 853 | attr_id._name = (gchar *) "rating"; |
520 | 854 | player->SetAttributeValue (&attr_id, tokens[3]); | 854 | player->SetAttributeValue (&attr_id, tokens[3]); |
521 | 855 | } | 855 | } |
522 | 856 | 856 | ||
523 | @@ -922,16 +922,16 @@ | |||
524 | 922 | Player *player = new Player; | 922 | Player *player = new Player; |
525 | 923 | Player::AttributeId attr_id (""); | 923 | Player::AttributeId attr_id (""); |
526 | 924 | 924 | ||
528 | 925 | attr_id._name = "attending"; | 925 | attr_id._name = (gchar *) "attending"; |
529 | 926 | player->SetAttributeValue (&attr_id, (guint) FALSE); | 926 | player->SetAttributeValue (&attr_id, (guint) FALSE); |
530 | 927 | 927 | ||
532 | 928 | attr_id._name = "name"; | 928 | attr_id._name = (gchar *) "name"; |
533 | 929 | player->SetAttributeValue (&attr_id, tokens[i]); | 929 | player->SetAttributeValue (&attr_id, tokens[i]); |
534 | 930 | 930 | ||
536 | 931 | attr_id._name = "first_name"; | 931 | attr_id._name = (gchar *) "first_name"; |
537 | 932 | player->SetAttributeValue (&attr_id, tokens[i+1]); | 932 | player->SetAttributeValue (&attr_id, tokens[i+1]); |
538 | 933 | 933 | ||
540 | 934 | attr_id._name = "exported"; | 934 | attr_id._name = (gchar *) "exported"; |
541 | 935 | player->SetAttributeValue (&attr_id, (guint) FALSE); | 935 | player->SetAttributeValue (&attr_id, (guint) FALSE); |
542 | 936 | 936 | ||
543 | 937 | 937 | ||
544 | 938 | 938 | ||
545 | === modified file 'sources/checkin.hpp' | |||
546 | --- sources/checkin.hpp 2010-11-03 12:00:16 +0000 | |||
547 | +++ sources/checkin.hpp 2011-01-21 08:07:55 +0000 | |||
548 | @@ -72,7 +72,7 @@ | |||
549 | 72 | void Load (xmlNode *xml_node); | 72 | void Load (xmlNode *xml_node); |
550 | 73 | 73 | ||
551 | 74 | void Load (xmlXPathContext *xml_context, | 74 | void Load (xmlXPathContext *xml_context, |
553 | 75 | gchar *from_node); | 75 | const gchar *from_node); |
554 | 76 | 76 | ||
555 | 77 | void Save (xmlTextWriter *xml_writer); | 77 | void Save (xmlTextWriter *xml_writer); |
556 | 78 | 78 | ||
557 | 79 | 79 | ||
558 | === modified file 'sources/classification.cpp' | |||
559 | --- sources/classification.cpp 2010-12-09 21:33:26 +0000 | |||
560 | +++ sources/classification.cpp 2011-01-21 08:07:55 +0000 | |||
561 | @@ -245,9 +245,9 @@ | |||
562 | 245 | } | 245 | } |
563 | 246 | 246 | ||
564 | 247 | // -------------------------------------------------------------------------------- | 247 | // -------------------------------------------------------------------------------- |
568 | 248 | void Classification::WriteFFFString (FILE *file, | 248 | void Classification::WriteFFFString (FILE *file, |
569 | 249 | Player *player, | 249 | Player *player, |
570 | 250 | gchar *attr_name) | 250 | const gchar *attr_name) |
571 | 251 | { | 251 | { |
572 | 252 | Player::AttributeId attr_id (attr_name); | 252 | Player::AttributeId attr_id (attr_name); |
573 | 253 | Attribute *attr = player->GetAttribute (&attr_id); | 253 | Attribute *attr = player->GetAttribute (&attr_id); |
574 | 254 | 254 | ||
575 | === modified file 'sources/classification.hpp' | |||
576 | --- sources/classification.hpp 2010-11-30 22:28:25 +0000 | |||
577 | +++ sources/classification.hpp 2011-01-21 08:07:55 +0000 | |||
578 | @@ -43,9 +43,9 @@ | |||
579 | 43 | private: | 43 | private: |
580 | 44 | void OnPlugged (); | 44 | void OnPlugged (); |
581 | 45 | 45 | ||
585 | 46 | void WriteFFFString (FILE *file, | 46 | void WriteFFFString (FILE *file, |
586 | 47 | Player *player, | 47 | Player *player, |
587 | 48 | gchar *attr_name); | 48 | const gchar *attr_name); |
588 | 49 | 49 | ||
589 | 50 | ~Classification (); | 50 | ~Classification (); |
590 | 51 | }; | 51 | }; |
591 | 52 | 52 | ||
592 | === modified file 'sources/contest.cpp' | |||
593 | --- sources/contest.cpp 2010-12-29 20:11:22 +0000 | |||
594 | +++ sources/contest.cpp 2011-01-21 08:07:55 +0000 | |||
595 | @@ -35,35 +35,35 @@ | |||
596 | 35 | 35 | ||
597 | 36 | #include "contest.hpp" | 36 | #include "contest.hpp" |
598 | 37 | 37 | ||
600 | 38 | gchar *Contest::weapon_image[_nb_weapon] = | 38 | const gchar *Contest::weapon_image[_nb_weapon] = |
601 | 39 | { | 39 | { |
602 | 40 | N_ ("Sabre"), | 40 | N_ ("Sabre"), |
603 | 41 | N_ ("Epée"), | 41 | N_ ("Epée"), |
604 | 42 | N_ ("Foil") | 42 | N_ ("Foil") |
605 | 43 | }; | 43 | }; |
606 | 44 | 44 | ||
608 | 45 | gchar *Contest::weapon_xml_image[_nb_weapon] = | 45 | const gchar *Contest::weapon_xml_image[_nb_weapon] = |
609 | 46 | { | 46 | { |
610 | 47 | "S", | 47 | "S", |
611 | 48 | "E", | 48 | "E", |
612 | 49 | "F" | 49 | "F" |
613 | 50 | }; | 50 | }; |
614 | 51 | 51 | ||
616 | 52 | gchar *Contest::gender_image[_nb_gender] = | 52 | const gchar *Contest::gender_image[_nb_gender] = |
617 | 53 | { | 53 | { |
618 | 54 | N_ ("Male"), | 54 | N_ ("Male"), |
619 | 55 | N_ ("Female"), | 55 | N_ ("Female"), |
620 | 56 | N_ ("Mixed") | 56 | N_ ("Mixed") |
621 | 57 | }; | 57 | }; |
622 | 58 | 58 | ||
624 | 59 | gchar *Contest::gender_xml_image[_nb_gender] = | 59 | const gchar *Contest::gender_xml_image[_nb_gender] = |
625 | 60 | { | 60 | { |
626 | 61 | "M", | 61 | "M", |
627 | 62 | "F", | 62 | "F", |
628 | 63 | "FM" | 63 | "FM" |
629 | 64 | }; | 64 | }; |
630 | 65 | 65 | ||
632 | 66 | gchar *Contest::category_image[_nb_category] = | 66 | const gchar *Contest::category_image[_nb_category] = |
633 | 67 | { | 67 | { |
634 | 68 | N_ ("U8"), | 68 | N_ ("U8"), |
635 | 69 | N_ ("U10"), | 69 | N_ ("U10"), |
636 | @@ -75,7 +75,7 @@ | |||
637 | 75 | N_ ("Veteran") | 75 | N_ ("Veteran") |
638 | 76 | }; | 76 | }; |
639 | 77 | 77 | ||
641 | 78 | gchar *Contest::category_xml_image[_nb_category] = | 78 | const gchar *Contest::category_xml_image[_nb_category] = |
642 | 79 | { | 79 | { |
643 | 80 | "O", | 80 | "O", |
644 | 81 | "P", | 81 | "P", |
645 | @@ -90,9 +90,9 @@ | |||
646 | 90 | GList *Contest::_color_list = NULL; | 90 | GList *Contest::_color_list = NULL; |
647 | 91 | 91 | ||
648 | 92 | // -------------------------------------------------------------------------------- | 92 | // -------------------------------------------------------------------------------- |
650 | 93 | Contest::Time::Time (gchar *name) | 93 | Contest::Time::Time (const gchar *name) |
651 | 94 | { | 94 | { |
653 | 95 | _name = name; | 95 | _name = g_strdup (name); |
654 | 96 | _hour = 12; | 96 | _hour = 12; |
655 | 97 | _minute = 0; | 97 | _minute = 0; |
656 | 98 | } | 98 | } |
657 | @@ -104,12 +104,12 @@ | |||
658 | 104 | 104 | ||
659 | 105 | // -------------------------------------------------------------------------------- | 105 | // -------------------------------------------------------------------------------- |
660 | 106 | void Contest::Time::Save (xmlTextWriter *xml_writer, | 106 | void Contest::Time::Save (xmlTextWriter *xml_writer, |
662 | 107 | gchar *attr_name) | 107 | const gchar *attr_name) |
663 | 108 | { | 108 | { |
664 | 109 | xmlTextWriterWriteFormatAttribute (xml_writer, | 109 | xmlTextWriterWriteFormatAttribute (xml_writer, |
665 | 110 | BAD_CAST attr_name, | 110 | BAD_CAST attr_name, |
666 | 111 | "%02d:%02d", _hour, _minute); | 111 | "%02d:%02d", _hour, _minute); |
668 | 112 | }; | 112 | } |
669 | 113 | 113 | ||
670 | 114 | // -------------------------------------------------------------------------------- | 114 | // -------------------------------------------------------------------------------- |
671 | 115 | void Contest::Time::Load (gchar *attr) | 115 | void Contest::Time::Load (gchar *attr) |
672 | @@ -971,8 +971,8 @@ | |||
673 | 971 | } | 971 | } |
674 | 972 | 972 | ||
675 | 973 | // -------------------------------------------------------------------------------- | 973 | // -------------------------------------------------------------------------------- |
678 | 974 | gchar *Contest::GetSaveFileName (gchar *title, | 974 | gchar *Contest::GetSaveFileName (gchar *title, |
679 | 975 | gchar *config_key) | 975 | const gchar *config_key) |
680 | 976 | { | 976 | { |
681 | 977 | GtkWidget *chooser; | 977 | GtkWidget *chooser; |
682 | 978 | char *filename = NULL; | 978 | char *filename = NULL; |
683 | @@ -1291,7 +1291,7 @@ | |||
684 | 1291 | // -------------------------------------------------------------------------------- | 1291 | // -------------------------------------------------------------------------------- |
685 | 1292 | gchar *Contest::GetGender () | 1292 | gchar *Contest::GetGender () |
686 | 1293 | { | 1293 | { |
688 | 1294 | return gender_xml_image[_gender]; | 1294 | return (char *) gender_xml_image[_gender]; |
689 | 1295 | } | 1295 | } |
690 | 1296 | 1296 | ||
691 | 1297 | // -------------------------------------------------------------------------------- | 1297 | // -------------------------------------------------------------------------------- |
692 | 1298 | 1298 | ||
693 | === modified file 'sources/contest.hpp' | |||
694 | --- sources/contest.hpp 2010-11-30 22:28:25 +0000 | |||
695 | +++ sources/contest.hpp 2011-01-21 08:07:55 +0000 | |||
696 | @@ -64,13 +64,13 @@ | |||
697 | 64 | private: | 64 | private: |
698 | 65 | struct Time : public Object | 65 | struct Time : public Object |
699 | 66 | { | 66 | { |
701 | 67 | Time (gchar *name); | 67 | Time (const gchar *name); |
702 | 68 | 68 | ||
703 | 69 | ~Time (); | 69 | ~Time (); |
704 | 70 | 70 | ||
705 | 71 | void Load (gchar *attr); | 71 | void Load (gchar *attr); |
706 | 72 | void Save (xmlTextWriter *xml_writer, | 72 | void Save (xmlTextWriter *xml_writer, |
708 | 73 | gchar *attr_name); | 73 | const gchar *attr_name); |
709 | 74 | void ReadProperties (Glade *glade); | 74 | void ReadProperties (Glade *glade); |
710 | 75 | void FillInProperties (Glade *glade); | 75 | void FillInProperties (Glade *glade); |
711 | 76 | void Copy (Time *to); | 76 | void Copy (Time *to); |
712 | @@ -81,16 +81,16 @@ | |||
713 | 81 | }; | 81 | }; |
714 | 82 | 82 | ||
715 | 83 | static const guint _nb_weapon = 3; | 83 | static const guint _nb_weapon = 3; |
718 | 84 | static gchar *weapon_image[_nb_weapon]; | 84 | static const gchar *weapon_image[_nb_weapon]; |
719 | 85 | static gchar *weapon_xml_image[_nb_weapon]; | 85 | static const gchar *weapon_xml_image[_nb_weapon]; |
720 | 86 | 86 | ||
721 | 87 | static const guint _nb_gender = 3; | 87 | static const guint _nb_gender = 3; |
724 | 88 | static gchar *gender_image[_nb_gender]; | 88 | static const gchar *gender_image[_nb_gender]; |
725 | 89 | static gchar *gender_xml_image[_nb_gender]; | 89 | static const gchar *gender_xml_image[_nb_gender]; |
726 | 90 | 90 | ||
727 | 91 | static const guint _nb_category = 8; | 91 | static const guint _nb_category = 8; |
730 | 92 | static gchar *category_image[_nb_category]; | 92 | static const gchar *category_image[_nb_category]; |
731 | 93 | static gchar *category_xml_image[_nb_category]; | 93 | static const gchar *category_xml_image[_nb_category]; |
732 | 94 | 94 | ||
733 | 95 | static GList *_color_list; | 95 | static GList *_color_list; |
734 | 96 | 96 | ||
735 | @@ -126,8 +126,8 @@ | |||
736 | 126 | void InitInstance (); | 126 | void InitInstance (); |
737 | 127 | void ReadProperties (); | 127 | void ReadProperties (); |
738 | 128 | void DisplayProperties (); | 128 | void DisplayProperties (); |
741 | 129 | gchar *GetSaveFileName (gchar *title, | 129 | gchar *GetSaveFileName (gchar *title, |
742 | 130 | gchar *config_key); | 130 | const gchar *config_key); |
743 | 131 | void Save (gchar *filename); | 131 | void Save (gchar *filename); |
744 | 132 | void FillInProperties (); | 132 | void FillInProperties (); |
745 | 133 | void FillInDate (guint day, | 133 | void FillInDate (guint day, |
746 | 134 | 134 | ||
747 | === modified file 'sources/data.cpp' | |||
748 | --- sources/data.cpp 2010-07-10 20:17:09 +0000 | |||
749 | +++ sources/data.cpp 2011-01-21 08:07:55 +0000 | |||
750 | @@ -22,20 +22,20 @@ | |||
751 | 22 | #include "data.hpp" | 22 | #include "data.hpp" |
752 | 23 | 23 | ||
753 | 24 | // -------------------------------------------------------------------------------- | 24 | // -------------------------------------------------------------------------------- |
756 | 25 | Data::Data (gchar *xml_name, | 25 | Data::Data (const gchar *xml_name, |
757 | 26 | guint default_value) | 26 | guint default_value) |
758 | 27 | { | 27 | { |
760 | 28 | _xml_name = xml_name; | 28 | _xml_name = g_strdup (xml_name); |
761 | 29 | _value = default_value; | 29 | _value = default_value; |
762 | 30 | 30 | ||
763 | 31 | _is_integer = TRUE; | 31 | _is_integer = TRUE; |
764 | 32 | } | 32 | } |
765 | 33 | 33 | ||
766 | 34 | // -------------------------------------------------------------------------------- | 34 | // -------------------------------------------------------------------------------- |
769 | 35 | Data::Data (gchar *xml_name, | 35 | Data::Data (const gchar *xml_name, |
770 | 36 | gchar *default_value) | 36 | gchar *default_value) |
771 | 37 | { | 37 | { |
773 | 38 | _xml_name = xml_name; | 38 | _xml_name = g_strdup (xml_name); |
774 | 39 | _string = default_value; | 39 | _string = default_value; |
775 | 40 | 40 | ||
776 | 41 | _is_integer = FALSE; | 41 | _is_integer = FALSE; |
777 | @@ -44,6 +44,7 @@ | |||
778 | 44 | // -------------------------------------------------------------------------------- | 44 | // -------------------------------------------------------------------------------- |
779 | 45 | Data::~Data () | 45 | Data::~Data () |
780 | 46 | { | 46 | { |
781 | 47 | g_free (_xml_name); | ||
782 | 47 | } | 48 | } |
783 | 48 | 49 | ||
784 | 49 | // -------------------------------------------------------------------------------- | 50 | // -------------------------------------------------------------------------------- |
785 | 50 | 51 | ||
786 | === modified file 'sources/data.hpp' | |||
787 | --- sources/data.hpp 2010-07-10 20:17:09 +0000 | |||
788 | +++ sources/data.hpp 2011-01-21 08:07:55 +0000 | |||
789 | @@ -28,11 +28,11 @@ | |||
790 | 28 | guint _value; | 28 | guint _value; |
791 | 29 | gchar *_string; | 29 | gchar *_string; |
792 | 30 | 30 | ||
795 | 31 | Data (gchar *xml_name, | 31 | Data (const gchar *xml_name, |
796 | 32 | guint default_value); | 32 | guint default_value); |
797 | 33 | 33 | ||
800 | 34 | Data (gchar *xml_name, | 34 | Data (const gchar *xml_name, |
801 | 35 | gchar *default_value); | 35 | gchar *default_value); |
802 | 36 | 36 | ||
803 | 37 | void Save (xmlTextWriter *xml_writer); | 37 | void Save (xmlTextWriter *xml_writer); |
804 | 38 | 38 | ||
805 | 39 | 39 | ||
806 | === modified file 'sources/filter.cpp' | |||
807 | --- sources/filter.cpp 2010-10-07 11:38:36 +0000 | |||
808 | +++ sources/filter.cpp 2011-01-21 08:07:55 +0000 | |||
809 | @@ -81,7 +81,7 @@ | |||
810 | 81 | } | 81 | } |
811 | 82 | 82 | ||
812 | 83 | // -------------------------------------------------------------------------------- | 83 | // -------------------------------------------------------------------------------- |
814 | 84 | guint Filter::GetAttributeId (gchar *name) | 84 | guint Filter::GetAttributeId (const gchar *name) |
815 | 85 | { | 85 | { |
816 | 86 | if (_attr_list) | 86 | if (_attr_list) |
817 | 87 | { | 87 | { |
818 | @@ -118,7 +118,7 @@ | |||
819 | 118 | } | 118 | } |
820 | 119 | 119 | ||
821 | 120 | // -------------------------------------------------------------------------------- | 120 | // -------------------------------------------------------------------------------- |
823 | 121 | void Filter::ShowAttribute (gchar *name) | 121 | void Filter::ShowAttribute (const gchar *name) |
824 | 122 | { | 122 | { |
825 | 123 | GtkTreeIter iter; | 123 | GtkTreeIter iter; |
826 | 124 | GtkTreeIter *sibling = NULL; | 124 | GtkTreeIter *sibling = NULL; |
827 | 125 | 125 | ||
828 | === modified file 'sources/filter.hpp' | |||
829 | --- sources/filter.hpp 2010-06-25 21:16:12 +0000 | |||
830 | +++ sources/filter.hpp 2011-01-21 08:07:55 +0000 | |||
831 | @@ -31,7 +31,7 @@ | |||
832 | 31 | 31 | ||
833 | 32 | void SetAttributeList (GSList *list); | 32 | void SetAttributeList (GSList *list); |
834 | 33 | 33 | ||
836 | 34 | void ShowAttribute (gchar *name); | 34 | void ShowAttribute (const gchar *name); |
837 | 35 | 35 | ||
838 | 36 | void UpdateAttrList (); | 36 | void UpdateAttrList (); |
839 | 37 | 37 | ||
840 | @@ -41,7 +41,7 @@ | |||
841 | 41 | 41 | ||
842 | 42 | GSList *GetSelectedAttrList (); | 42 | GSList *GetSelectedAttrList (); |
843 | 43 | 43 | ||
845 | 44 | guint GetAttributeId (gchar *name); | 44 | guint GetAttributeId (const gchar *name); |
846 | 45 | 45 | ||
847 | 46 | void SetOwner (Module *owner); | 46 | void SetOwner (Module *owner); |
848 | 47 | 47 | ||
849 | 48 | 48 | ||
850 | === modified file 'sources/general_classification.cpp' | |||
851 | --- sources/general_classification.cpp 2010-12-29 07:36:17 +0000 | |||
852 | +++ sources/general_classification.cpp 2011-01-21 08:07:55 +0000 | |||
853 | @@ -265,11 +265,11 @@ | |||
854 | 265 | 265 | ||
855 | 266 | if (export_type == CSV) | 266 | if (export_type == CSV) |
856 | 267 | { | 267 | { |
858 | 268 | suffix = ".csv"; | 268 | suffix = g_strdup (".csv"); |
859 | 269 | } | 269 | } |
860 | 270 | else | 270 | else |
861 | 271 | { | 271 | { |
863 | 272 | suffix = ".fff"; | 272 | suffix = g_strdup (".fff"); |
864 | 273 | } | 273 | } |
865 | 274 | 274 | ||
866 | 275 | { | 275 | { |
867 | @@ -300,6 +300,7 @@ | |||
868 | 300 | g_free (dirname); | 300 | g_free (dirname); |
869 | 301 | } | 301 | } |
870 | 302 | } | 302 | } |
871 | 303 | g_free (suffix); | ||
872 | 303 | } | 304 | } |
873 | 304 | } | 305 | } |
874 | 305 | 306 | ||
875 | 306 | 307 | ||
876 | === modified file 'sources/glade.cpp' | |||
877 | --- sources/glade.cpp 2010-09-05 20:04:10 +0000 | |||
878 | +++ sources/glade.cpp 2011-01-21 08:07:55 +0000 | |||
879 | @@ -19,8 +19,8 @@ | |||
880 | 19 | gchar *Glade::_path = NULL; | 19 | gchar *Glade::_path = NULL; |
881 | 20 | 20 | ||
882 | 21 | // -------------------------------------------------------------------------------- | 21 | // -------------------------------------------------------------------------------- |
885 | 22 | Glade::Glade (gchar *file_name, | 22 | Glade::Glade (const gchar *file_name, |
886 | 23 | Object *owner) | 23 | Object *owner) |
887 | 24 | : Object ("Glade") | 24 | : Object ("Glade") |
888 | 25 | { | 25 | { |
889 | 26 | if (file_name) | 26 | if (file_name) |
890 | @@ -33,6 +33,10 @@ | |||
891 | 33 | gtk_builder_add_from_file (_glade_xml, | 33 | gtk_builder_add_from_file (_glade_xml, |
892 | 34 | path, | 34 | path, |
893 | 35 | &error); | 35 | &error); |
894 | 36 | if (error != NULL) | ||
895 | 37 | { | ||
896 | 38 | g_print ("<<%s>> %s\n", path, error->message); | ||
897 | 39 | } | ||
898 | 36 | g_free (path); | 40 | g_free (path); |
899 | 37 | 41 | ||
900 | 38 | if (error != NULL) | 42 | if (error != NULL) |
901 | @@ -94,14 +98,14 @@ | |||
902 | 94 | } | 98 | } |
903 | 95 | 99 | ||
904 | 96 | // -------------------------------------------------------------------------------- | 100 | // -------------------------------------------------------------------------------- |
906 | 97 | GtkWidget *Glade::GetWidget (gchar *name) | 101 | GtkWidget *Glade::GetWidget (const gchar *name) |
907 | 98 | { | 102 | { |
908 | 99 | return (GtkWidget *) (gtk_builder_get_object (_glade_xml, | 103 | return (GtkWidget *) (gtk_builder_get_object (_glade_xml, |
909 | 100 | name)); | 104 | name)); |
910 | 101 | } | 105 | } |
911 | 102 | 106 | ||
912 | 103 | // -------------------------------------------------------------------------------- | 107 | // -------------------------------------------------------------------------------- |
914 | 104 | GObject *Glade::GetObject (gchar *name) | 108 | GObject *Glade::GetObject (const gchar *name) |
915 | 105 | { | 109 | { |
916 | 106 | return gtk_builder_get_object (_glade_xml, | 110 | return gtk_builder_get_object (_glade_xml, |
917 | 107 | name); | 111 | name); |
918 | 108 | 112 | ||
919 | === modified file 'sources/glade.hpp' | |||
920 | --- sources/glade.hpp 2010-04-18 21:11:47 +0000 | |||
921 | +++ sources/glade.hpp 2011-01-21 08:07:55 +0000 | |||
922 | @@ -23,15 +23,15 @@ | |||
923 | 23 | class Glade : public Object | 23 | class Glade : public Object |
924 | 24 | { | 24 | { |
925 | 25 | public: | 25 | public: |
928 | 26 | Glade (gchar *file_name, | 26 | Glade (const gchar *file_name, |
929 | 27 | Object *owner); | 27 | Object *owner); |
930 | 28 | ~Glade (); | 28 | ~Glade (); |
931 | 29 | 29 | ||
932 | 30 | static void SetPath (gchar *path); | 30 | static void SetPath (gchar *path); |
933 | 31 | 31 | ||
934 | 32 | GtkWidget *GetRootWidget (); | 32 | GtkWidget *GetRootWidget (); |
937 | 33 | GtkWidget *GetWidget (gchar *name); | 33 | GtkWidget *GetWidget (const gchar *name); |
938 | 34 | GObject *GetObject (gchar *name); | 34 | GObject *GetObject (const gchar *name); |
939 | 35 | void DetachFromParent (GtkWidget *widget); | 35 | void DetachFromParent (GtkWidget *widget); |
940 | 36 | 36 | ||
941 | 37 | private: | 37 | private: |
942 | 38 | 38 | ||
943 | === modified file 'sources/main.cpp' | |||
944 | --- sources/main.cpp 2011-01-04 22:21:11 +0000 | |||
945 | +++ sources/main.cpp 2011-01-21 08:07:55 +0000 | |||
946 | @@ -40,6 +40,7 @@ | |||
947 | 40 | #include "attribute.hpp" | 40 | #include "attribute.hpp" |
948 | 41 | #include "general_classification.hpp" | 41 | #include "general_classification.hpp" |
949 | 42 | #include "glade.hpp" | 42 | #include "glade.hpp" |
950 | 43 | #include "locale" | ||
951 | 43 | 44 | ||
952 | 44 | // -------------------------------------------------------------------------------- | 45 | // -------------------------------------------------------------------------------- |
953 | 45 | static void AboutDialogActivateLinkFunc (GtkAboutDialog *about, | 46 | static void AboutDialogActivateLinkFunc (GtkAboutDialog *about, |
954 | 46 | 47 | ||
955 | === modified file 'sources/module.cpp' | |||
956 | --- sources/module.cpp 2010-12-13 21:03:47 +0000 | |||
957 | +++ sources/module.cpp 2011-01-21 08:07:55 +0000 | |||
958 | @@ -22,12 +22,14 @@ | |||
959 | 22 | 22 | ||
960 | 23 | #include "module.hpp" | 23 | #include "module.hpp" |
961 | 24 | 24 | ||
962 | 25 | const gdouble Module::PRINT_HEADER_HEIGHT = 10.0; // % of paper width | ||
963 | 26 | const gdouble Module::PRINT_FONT_HEIGHT = 2.0; // % of paper width | ||
964 | 25 | GKeyFile *Module::_config_file = NULL; | 27 | GKeyFile *Module::_config_file = NULL; |
965 | 26 | GtkTreeModel *Module::_status_model = NULL; | 28 | GtkTreeModel *Module::_status_model = NULL; |
966 | 27 | 29 | ||
967 | 28 | // -------------------------------------------------------------------------------- | 30 | // -------------------------------------------------------------------------------- |
970 | 29 | Module::Module (gchar *glade_file, | 31 | Module::Module (const gchar *glade_file, |
971 | 30 | gchar *root) | 32 | const gchar *root) |
972 | 31 | //: Object ("Module") | 33 | //: Object ("Module") |
973 | 32 | { | 34 | { |
974 | 33 | _plugged_list = NULL; | 35 | _plugged_list = NULL; |
975 | @@ -115,7 +117,7 @@ | |||
976 | 115 | } | 117 | } |
977 | 116 | 118 | ||
978 | 117 | // -------------------------------------------------------------------------------- | 119 | // -------------------------------------------------------------------------------- |
980 | 118 | GtkWidget *Module::GetWidget (gchar *name) | 120 | GtkWidget *Module::GetWidget (const gchar *name) |
981 | 119 | { | 121 | { |
982 | 120 | return _glade->GetWidget (name); | 122 | return _glade->GetWidget (name); |
983 | 121 | } | 123 | } |
984 | 122 | 124 | ||
985 | === modified file 'sources/module.hpp' | |||
986 | --- sources/module.hpp 2010-12-13 21:03:47 +0000 | |||
987 | +++ sources/module.hpp 2011-01-21 08:07:55 +0000 | |||
988 | @@ -47,7 +47,7 @@ | |||
989 | 47 | 47 | ||
990 | 48 | GtkWidget *GetRootWidget (); | 48 | GtkWidget *GetRootWidget (); |
991 | 49 | 49 | ||
993 | 50 | GtkWidget *GetWidget (gchar *name); | 50 | GtkWidget *GetWidget (const gchar *name); |
994 | 51 | 51 | ||
995 | 52 | virtual void SetFilter (Filter *filter); | 52 | virtual void SetFilter (Filter *filter); |
996 | 53 | 53 | ||
997 | @@ -57,13 +57,13 @@ | |||
998 | 57 | Filter *_filter; | 57 | Filter *_filter; |
999 | 58 | Glade *_glade; | 58 | Glade *_glade; |
1000 | 59 | 59 | ||
1003 | 60 | static const gdouble PRINT_HEADER_HEIGHT = 10.0; // % of paper width | 60 | static const gdouble PRINT_HEADER_HEIGHT; |
1004 | 61 | static const gdouble PRINT_FONT_HEIGHT = 2.0; // % of paper width | 61 | static const gdouble PRINT_FONT_HEIGHT; |
1005 | 62 | 62 | ||
1006 | 63 | static GKeyFile *_config_file; | 63 | static GKeyFile *_config_file; |
1007 | 64 | 64 | ||
1010 | 65 | Module (gchar *glade_file, | 65 | Module (const gchar *glade_file, |
1011 | 66 | gchar *root = NULL); | 66 | const gchar *root = NULL); |
1012 | 67 | 67 | ||
1013 | 68 | virtual void OnPlugged () {}; | 68 | virtual void OnPlugged () {}; |
1014 | 69 | virtual void OnUnPlugged () {}; | 69 | virtual void OnUnPlugged () {}; |
1015 | 70 | 70 | ||
1016 | === modified file 'sources/object.cpp' | |||
1017 | --- sources/object.cpp 2010-06-30 21:14:15 +0000 | |||
1018 | +++ sources/object.cpp 2011-01-21 08:07:55 +0000 | |||
1019 | @@ -28,7 +28,7 @@ | |||
1020 | 28 | }; | 28 | }; |
1021 | 29 | 29 | ||
1022 | 30 | // -------------------------------------------------------------------------------- | 30 | // -------------------------------------------------------------------------------- |
1024 | 31 | Object::Object (gchar *class_name) | 31 | Object::Object (const gchar *class_name) |
1025 | 32 | { | 32 | { |
1026 | 33 | g_datalist_init (&_datalist); | 33 | g_datalist_init (&_datalist); |
1027 | 34 | _ref_count = 1; | 34 | _ref_count = 1; |
1028 | @@ -37,10 +37,12 @@ | |||
1029 | 37 | #ifdef DEBUG | 37 | #ifdef DEBUG |
1030 | 38 | if (class_name == NULL) | 38 | if (class_name == NULL) |
1031 | 39 | { | 39 | { |
1036 | 40 | class_name = "anonymous"; | 40 | _class_name = g_strdup ("anonymous"); |
1037 | 41 | } | 41 | } |
1038 | 42 | 42 | else | |
1039 | 43 | _class_name = class_name; | 43 | { |
1040 | 44 | _class_name = g_strdup (class_name); | ||
1041 | 45 | } | ||
1042 | 44 | 46 | ||
1043 | 45 | for (guint i = 0; i < g_list_length (_list); i++) | 47 | for (guint i = 0; i < g_list_length (_list); i++) |
1044 | 46 | { | 48 | { |
1045 | @@ -90,6 +92,9 @@ | |||
1046 | 90 | return; | 92 | return; |
1047 | 91 | } | 93 | } |
1048 | 92 | } | 94 | } |
1049 | 95 | |||
1050 | 96 | g_free (_class_name); | ||
1051 | 97 | |||
1052 | 93 | #endif | 98 | #endif |
1053 | 94 | } | 99 | } |
1054 | 95 | 100 | ||
1055 | @@ -130,11 +135,11 @@ | |||
1056 | 130 | 135 | ||
1057 | 131 | // -------------------------------------------------------------------------------- | 136 | // -------------------------------------------------------------------------------- |
1058 | 132 | void Object::SetData (Object *owner, | 137 | void Object::SetData (Object *owner, |
1060 | 133 | gchar *key, | 138 | const gchar *key, |
1061 | 134 | void *data, | 139 | void *data, |
1062 | 135 | GDestroyNotify destroy_cbk) | 140 | GDestroyNotify destroy_cbk) |
1063 | 136 | { | 141 | { |
1065 | 137 | gchar *full_key = g_strdup_printf ("%p::%s", owner, key); | 142 | gchar *full_key = g_strdup_printf ("%p::%s", (void *) owner, key); |
1066 | 138 | 143 | ||
1067 | 139 | g_datalist_set_data_full (&_datalist, | 144 | g_datalist_set_data_full (&_datalist, |
1068 | 140 | full_key, | 145 | full_key, |
1069 | @@ -144,10 +149,10 @@ | |||
1070 | 144 | } | 149 | } |
1071 | 145 | 150 | ||
1072 | 146 | // -------------------------------------------------------------------------------- | 151 | // -------------------------------------------------------------------------------- |
1075 | 147 | void Object::RemoveData (Object *owner, | 152 | void Object::RemoveData (Object *owner, |
1076 | 148 | gchar *key) | 153 | const gchar *key) |
1077 | 149 | { | 154 | { |
1079 | 150 | gchar *full_key = g_strdup_printf ("%p::%s", owner, key); | 155 | gchar *full_key = g_strdup_printf ("%p::%s", (void *) owner, key); |
1080 | 151 | 156 | ||
1081 | 152 | g_datalist_remove_data (&_datalist, | 157 | g_datalist_remove_data (&_datalist, |
1082 | 153 | full_key); | 158 | full_key); |
1083 | @@ -165,11 +170,11 @@ | |||
1084 | 165 | } | 170 | } |
1085 | 166 | 171 | ||
1086 | 167 | // -------------------------------------------------------------------------------- | 172 | // -------------------------------------------------------------------------------- |
1089 | 168 | void *Object::GetData (Object *owner, | 173 | void *Object::GetData (Object *owner, |
1090 | 169 | gchar *key) | 174 | const gchar *key) |
1091 | 170 | { | 175 | { |
1092 | 171 | void *data; | 176 | void *data; |
1094 | 172 | gchar *full_key = g_strdup_printf ("%p::%s", owner, key); | 177 | gchar *full_key = g_strdup_printf ("%p::%s", (void *) owner, key); |
1095 | 173 | 178 | ||
1096 | 174 | data = g_datalist_get_data (&_datalist, | 179 | data = g_datalist_get_data (&_datalist, |
1097 | 175 | full_key); | 180 | full_key); |
1098 | 176 | 181 | ||
1099 | === modified file 'sources/object.hpp' | |||
1100 | --- sources/object.hpp 2010-09-21 12:47:35 +0000 | |||
1101 | +++ sources/object.hpp 2011-01-21 08:07:55 +0000 | |||
1102 | @@ -24,18 +24,18 @@ | |||
1103 | 24 | class Object | 24 | class Object |
1104 | 25 | { | 25 | { |
1105 | 26 | public: | 26 | public: |
1107 | 27 | Object (gchar *class_name = NULL); | 27 | Object (const gchar *class_name = NULL); |
1108 | 28 | 28 | ||
1109 | 29 | void SetData (Object *owner, | 29 | void SetData (Object *owner, |
1111 | 30 | gchar *key, | 30 | const gchar *key, |
1112 | 31 | void *data, | 31 | void *data, |
1113 | 32 | GDestroyNotify destroy_cbk = NULL); | 32 | GDestroyNotify destroy_cbk = NULL); |
1114 | 33 | 33 | ||
1117 | 34 | void *GetData (Object *owner, | 34 | void *GetData (Object *owner, |
1118 | 35 | gchar *key); | 35 | const gchar *key); |
1119 | 36 | 36 | ||
1122 | 37 | void RemoveData (Object *owner, | 37 | void RemoveData (Object *owner, |
1123 | 38 | gchar *key); | 38 | const gchar *key); |
1124 | 39 | 39 | ||
1125 | 40 | void Retain (); | 40 | void Retain (); |
1126 | 41 | 41 | ||
1127 | 42 | 42 | ||
1128 | === modified file 'sources/player.cpp' | |||
1129 | --- sources/player.cpp 2010-12-02 21:35:29 +0000 | |||
1130 | +++ sources/player.cpp 2011-01-21 08:07:55 +0000 | |||
1131 | @@ -167,13 +167,13 @@ | |||
1132 | 167 | } | 167 | } |
1133 | 168 | 168 | ||
1134 | 169 | // -------------------------------------------------------------------------------- | 169 | // -------------------------------------------------------------------------------- |
1138 | 170 | void Player::SetChangeCbk (gchar *attr_name, | 170 | void Player::SetChangeCbk (const gchar *attr_name, |
1139 | 171 | OnChange change_cbk, | 171 | OnChange change_cbk, |
1140 | 172 | void *data) | 172 | void *data) |
1141 | 173 | { | 173 | { |
1142 | 174 | Client *client = new Client; | 174 | Client *client = new Client; |
1143 | 175 | 175 | ||
1145 | 176 | client->_attr_name = attr_name; | 176 | client->_attr_name = g_strdup (attr_name); |
1146 | 177 | client->_change_cbk = change_cbk; | 177 | client->_change_cbk = change_cbk; |
1147 | 178 | client->_data = data; | 178 | client->_data = data; |
1148 | 179 | 179 | ||
1149 | @@ -203,7 +203,7 @@ | |||
1150 | 203 | 203 | ||
1151 | 204 | // -------------------------------------------------------------------------------- | 204 | // -------------------------------------------------------------------------------- |
1152 | 205 | void Player::SetAttributeValue (AttributeId *attr_id, | 205 | void Player::SetAttributeValue (AttributeId *attr_id, |
1154 | 206 | gchar *value) | 206 | const gchar *value) |
1155 | 207 | { | 207 | { |
1156 | 208 | Attribute *attr = GetAttribute (attr_id); | 208 | Attribute *attr = GetAttribute (attr_id); |
1157 | 209 | 209 | ||
1158 | 210 | 210 | ||
1159 | === modified file 'sources/player.hpp' | |||
1160 | --- sources/player.hpp 2010-10-13 13:09:59 +0000 | |||
1161 | +++ sources/player.hpp 2011-01-21 08:07:55 +0000 | |||
1162 | @@ -29,10 +29,10 @@ | |||
1163 | 29 | class AttributeId : public Object | 29 | class AttributeId : public Object |
1164 | 30 | { | 30 | { |
1165 | 31 | public: | 31 | public: |
1168 | 32 | AttributeId (gchar *name, | 32 | AttributeId (const gchar *name, |
1169 | 33 | Object *owner = NULL) | 33 | Object *owner = NULL) |
1170 | 34 | { | 34 | { |
1172 | 35 | _name = name; | 35 | _name = g_strdup (name); |
1173 | 36 | _owner = owner; | 36 | _owner = owner; |
1174 | 37 | _rand_seed = 0; | 37 | _rand_seed = 0; |
1175 | 38 | } | 38 | } |
1176 | @@ -62,7 +62,7 @@ | |||
1177 | 62 | Attribute *GetAttribute (AttributeId *attr_id); | 62 | Attribute *GetAttribute (AttributeId *attr_id); |
1178 | 63 | 63 | ||
1179 | 64 | void SetAttributeValue (AttributeId *attr_id, | 64 | void SetAttributeValue (AttributeId *attr_id, |
1181 | 65 | gchar *value); | 65 | const gchar *value); |
1182 | 66 | 66 | ||
1183 | 67 | void SetAttributeValue (AttributeId *attr_id, | 67 | void SetAttributeValue (AttributeId *attr_id, |
1184 | 68 | guint value); | 68 | guint value); |
1185 | @@ -75,9 +75,9 @@ | |||
1186 | 75 | 75 | ||
1187 | 76 | gchar *GetName (); | 76 | gchar *GetName (); |
1188 | 77 | 77 | ||
1192 | 78 | void SetChangeCbk (gchar *attr_name, | 78 | void SetChangeCbk (const gchar *attr_name, |
1193 | 79 | OnChange change_cbk, | 79 | OnChange change_cbk, |
1194 | 80 | void *data); | 80 | void *data); |
1195 | 81 | 81 | ||
1196 | 82 | static gint CompareWithRef (Player *player, | 82 | static gint CompareWithRef (Player *player, |
1197 | 83 | guint ref); | 83 | guint ref); |
1198 | 84 | 84 | ||
1199 | === modified file 'sources/players_list.cpp' | |||
1200 | --- sources/players_list.cpp 2010-11-30 07:58:46 +0000 | |||
1201 | +++ sources/players_list.cpp 2011-01-21 08:07:55 +0000 | |||
1202 | @@ -25,8 +25,8 @@ | |||
1203 | 25 | #include "players_list.hpp" | 25 | #include "players_list.hpp" |
1204 | 26 | 26 | ||
1205 | 27 | // -------------------------------------------------------------------------------- | 27 | // -------------------------------------------------------------------------------- |
1208 | 28 | PlayersList::PlayersList (gchar *glade_file, | 28 | PlayersList::PlayersList (const gchar *glade_file, |
1209 | 29 | guint rights) | 29 | guint rights) |
1210 | 30 | : Module (glade_file) | 30 | : Module (glade_file) |
1211 | 31 | { | 31 | { |
1212 | 32 | _rights = rights; | 32 | _rights = rights; |
1213 | @@ -494,8 +494,8 @@ | |||
1214 | 494 | } | 494 | } |
1215 | 495 | 495 | ||
1216 | 496 | // -------------------------------------------------------------------------------- | 496 | // -------------------------------------------------------------------------------- |
1219 | 497 | void PlayersList::SetAttributeRight (gchar *name, | 497 | void PlayersList::SetAttributeRight (const gchar *name, |
1220 | 498 | gboolean modifiable) | 498 | gboolean modifiable) |
1221 | 499 | { | 499 | { |
1222 | 500 | AttributeDesc *desc = AttributeDesc::GetDesc (name); | 500 | AttributeDesc *desc = AttributeDesc::GetDesc (name); |
1223 | 501 | 501 | ||
1224 | 502 | 502 | ||
1225 | === modified file 'sources/players_list.hpp' | |||
1226 | --- sources/players_list.hpp 2010-09-21 12:47:35 +0000 | |||
1227 | +++ sources/players_list.hpp 2011-01-21 08:07:55 +0000 | |||
1228 | @@ -40,8 +40,8 @@ | |||
1229 | 40 | 40 | ||
1230 | 41 | typedef gboolean (*CustomFilter) (Player *player); | 41 | typedef gboolean (*CustomFilter) (Player *player); |
1231 | 42 | 42 | ||
1234 | 43 | PlayersList (gchar *glade_file, | 43 | PlayersList (const gchar *glade_file, |
1235 | 44 | guint rights = SORTABLE | MODIFIABLE); | 44 | guint rights = SORTABLE | MODIFIABLE); |
1236 | 45 | 45 | ||
1237 | 46 | ~PlayersList (); | 46 | ~PlayersList (); |
1238 | 47 | 47 | ||
1239 | @@ -59,8 +59,8 @@ | |||
1240 | 59 | 59 | ||
1241 | 60 | void SetFilter (Filter *filter); | 60 | void SetFilter (Filter *filter); |
1242 | 61 | 61 | ||
1245 | 62 | void SetAttributeRight (gchar *name, | 62 | void SetAttributeRight (const gchar *name, |
1246 | 63 | gboolean modifiable); | 63 | gboolean modifiable); |
1247 | 64 | 64 | ||
1248 | 65 | virtual void OnListChanged () {}; | 65 | virtual void OnListChanged () {}; |
1249 | 66 | 66 | ||
1250 | 67 | 67 | ||
1251 | === modified file 'sources/pool.cpp' | |||
1252 | --- sources/pool.cpp 2010-12-29 20:11:22 +0000 | |||
1253 | +++ sources/pool.cpp 2011-01-21 08:07:55 +0000 | |||
1254 | @@ -838,14 +838,14 @@ | |||
1255 | 838 | } | 838 | } |
1256 | 839 | 839 | ||
1257 | 840 | // -------------------------------------------------------------------------------- | 840 | // -------------------------------------------------------------------------------- |
1262 | 841 | void Pool::SetDisplayData (Player *player, | 841 | void Pool::SetDisplayData (Player *player, |
1263 | 842 | GooCanvas *on_canvas, | 842 | GooCanvas *on_canvas, |
1264 | 843 | gchar *name, | 843 | const gchar *name, |
1265 | 844 | void *value) | 844 | void *value) |
1266 | 845 | { | 845 | { |
1267 | 846 | player->SetData (GetDataOwner (), name, value); | 846 | player->SetData (GetDataOwner (), name, value); |
1268 | 847 | 847 | ||
1270 | 848 | _display_data = g_slist_prepend (_display_data, name); | 848 | _display_data = g_slist_prepend (_display_data, (void *) name); |
1271 | 849 | } | 849 | } |
1272 | 850 | 850 | ||
1273 | 851 | // -------------------------------------------------------------------------------- | 851 | // -------------------------------------------------------------------------------- |
1274 | @@ -921,19 +921,19 @@ | |||
1275 | 921 | guint HS_B; | 921 | guint HS_B; |
1276 | 922 | Player::AttributeId attr_id ("", data_owner); | 922 | Player::AttributeId attr_id ("", data_owner); |
1277 | 923 | 923 | ||
1279 | 924 | attr_id._name = "victories_ratio"; | 924 | attr_id._name = (gchar *) "victories_ratio"; |
1280 | 925 | ratio_A = (guint) A->GetAttribute (&attr_id)->GetValue (); | 925 | ratio_A = (guint) A->GetAttribute (&attr_id)->GetValue (); |
1281 | 926 | ratio_B = (guint) B->GetAttribute (&attr_id)->GetValue (); | 926 | ratio_B = (guint) B->GetAttribute (&attr_id)->GetValue (); |
1282 | 927 | 927 | ||
1284 | 928 | attr_id._name = "indice"; | 928 | attr_id._name = (gchar *) "indice"; |
1285 | 929 | average_A = (gint) A->GetAttribute (&attr_id)->GetValue (); | 929 | average_A = (gint) A->GetAttribute (&attr_id)->GetValue (); |
1286 | 930 | average_B = (gint) B->GetAttribute (&attr_id)->GetValue (); | 930 | average_B = (gint) B->GetAttribute (&attr_id)->GetValue (); |
1287 | 931 | 931 | ||
1289 | 932 | attr_id._name = "HS"; | 932 | attr_id._name = (gchar *) "HS"; |
1290 | 933 | HS_A = (guint) A->GetAttribute (&attr_id)->GetValue (); | 933 | HS_A = (guint) A->GetAttribute (&attr_id)->GetValue (); |
1291 | 934 | HS_B = (guint) B->GetAttribute (&attr_id)->GetValue (); | 934 | HS_B = (guint) B->GetAttribute (&attr_id)->GetValue (); |
1292 | 935 | 935 | ||
1294 | 936 | attr_id._name = "status"; | 936 | attr_id._name = (gchar *) "status"; |
1295 | 937 | attr_id._owner = main_data_owner; | 937 | attr_id._owner = main_data_owner; |
1296 | 938 | if (A->GetAttribute (&attr_id) && B->GetAttribute (&attr_id)) | 938 | if (A->GetAttribute (&attr_id) && B->GetAttribute (&attr_id)) |
1297 | 939 | { | 939 | { |
1298 | @@ -1195,7 +1195,7 @@ | |||
1299 | 1195 | 1195 | ||
1300 | 1196 | // -------------------------------------------------------------------------------- | 1196 | // -------------------------------------------------------------------------------- |
1301 | 1197 | void Pool::RefreshAttribute (Player *player, | 1197 | void Pool::RefreshAttribute (Player *player, |
1303 | 1198 | gchar *name, | 1198 | const gchar *name, |
1304 | 1199 | guint value, | 1199 | guint value, |
1305 | 1200 | CombinedOperation operation) | 1200 | CombinedOperation operation) |
1306 | 1201 | { | 1201 | { |
1307 | @@ -1293,7 +1293,7 @@ | |||
1308 | 1293 | } | 1293 | } |
1309 | 1294 | } | 1294 | } |
1310 | 1295 | 1295 | ||
1312 | 1296 | attr_id._name = "victories_ratio"; | 1296 | attr_id._name = (gchar *) "victories_ratio"; |
1313 | 1297 | attr = player->GetAttribute (&attr_id); | 1297 | attr = player->GetAttribute (&attr_id); |
1314 | 1298 | data = player->GetData (GetDataOwner (), "VictoriesRatioItem"); | 1298 | data = player->GetData (GetDataOwner (), "VictoriesRatioItem"); |
1315 | 1299 | if (data) | 1299 | if (data) |
1316 | @@ -1318,7 +1318,7 @@ | |||
1317 | 1318 | g_free (text); | 1318 | g_free (text); |
1318 | 1319 | } | 1319 | } |
1319 | 1320 | 1320 | ||
1321 | 1321 | attr_id._name = "HS"; | 1321 | attr_id._name = (gchar *) "HS"; |
1322 | 1322 | attr = player->GetAttribute (&attr_id); | 1322 | attr = player->GetAttribute (&attr_id); |
1323 | 1323 | data = player->GetData (GetDataOwner (), "HSItem"); | 1323 | data = player->GetData (GetDataOwner (), "HSItem"); |
1324 | 1324 | if (data) | 1324 | if (data) |
1325 | @@ -1343,7 +1343,7 @@ | |||
1326 | 1343 | g_free (text); | 1343 | g_free (text); |
1327 | 1344 | } | 1344 | } |
1328 | 1345 | 1345 | ||
1330 | 1346 | attr_id._name = "indice"; | 1346 | attr_id._name = (gchar *) "indice"; |
1331 | 1347 | attr = player->GetAttribute (&attr_id); | 1347 | attr = player->GetAttribute (&attr_id); |
1332 | 1348 | data = player->GetData (GetDataOwner (), "IndiceItem"); | 1348 | data = player->GetData (GetDataOwner (), "IndiceItem"); |
1333 | 1349 | if (data) | 1349 | if (data) |
1334 | @@ -1452,7 +1452,7 @@ | |||
1335 | 1452 | xmlTextWriterWriteFormatAttribute (xml_writer, | 1452 | xmlTextWriterWriteFormatAttribute (xml_writer, |
1336 | 1453 | BAD_CAST "NbMatches", | 1453 | BAD_CAST "NbMatches", |
1337 | 1454 | "%d", GetNbPlayers ()-1); | 1454 | "%d", GetNbPlayers ()-1); |
1339 | 1455 | attr_id._name = "HS"; | 1455 | attr_id._name = (gchar *) "HS"; |
1340 | 1456 | attr = player->GetAttribute (&attr_id); | 1456 | attr = player->GetAttribute (&attr_id); |
1341 | 1457 | if (attr) | 1457 | if (attr) |
1342 | 1458 | { | 1458 | { |
1343 | @@ -1460,7 +1460,7 @@ | |||
1344 | 1460 | xmlTextWriterWriteFormatAttribute (xml_writer, | 1460 | xmlTextWriterWriteFormatAttribute (xml_writer, |
1345 | 1461 | BAD_CAST "TD", | 1461 | BAD_CAST "TD", |
1346 | 1462 | "%d", HS); | 1462 | "%d", HS); |
1348 | 1463 | attr_id._name = "indice"; | 1463 | attr_id._name = (gchar *) "indice"; |
1349 | 1464 | indice = (guint) player->GetAttribute (&attr_id)->GetValue (); | 1464 | indice = (guint) player->GetAttribute (&attr_id)->GetValue (); |
1350 | 1465 | xmlTextWriterWriteFormatAttribute (xml_writer, | 1465 | xmlTextWriterWriteFormatAttribute (xml_writer, |
1351 | 1466 | BAD_CAST "TR", | 1466 | BAD_CAST "TR", |
1352 | 1467 | 1467 | ||
1353 | === modified file 'sources/pool.hpp' | |||
1354 | --- sources/pool.hpp 2010-12-09 21:33:26 +0000 | |||
1355 | +++ sources/pool.hpp 2011-01-21 08:07:55 +0000 | |||
1356 | @@ -130,10 +130,10 @@ | |||
1357 | 130 | 130 | ||
1358 | 131 | void OnUnPlugged (); | 131 | void OnUnPlugged (); |
1359 | 132 | 132 | ||
1364 | 133 | void SetDisplayData (Player *player, | 133 | void SetDisplayData (Player *player, |
1365 | 134 | GooCanvas *on_canvas, | 134 | GooCanvas *on_canvas, |
1366 | 135 | gchar *name, | 135 | const gchar *name, |
1367 | 136 | void *value); | 136 | void *value); |
1368 | 137 | 137 | ||
1369 | 138 | void Draw (GooCanvas *on_canvas, | 138 | void Draw (GooCanvas *on_canvas, |
1370 | 139 | gboolean print_for_referees); | 139 | gboolean print_for_referees); |
1371 | @@ -151,7 +151,7 @@ | |||
1372 | 151 | void RefreshDashBoard (); | 151 | void RefreshDashBoard (); |
1373 | 152 | 152 | ||
1374 | 153 | void RefreshAttribute (Player *player, | 153 | void RefreshAttribute (Player *player, |
1376 | 154 | gchar *name, | 154 | const gchar *name, |
1377 | 155 | guint value, | 155 | guint value, |
1378 | 156 | CombinedOperation operation); | 156 | CombinedOperation operation); |
1379 | 157 | 157 | ||
1380 | 158 | 158 | ||
1381 | === modified file 'sources/pool_allocator.cpp' | |||
1382 | --- sources/pool_allocator.cpp 2010-12-14 13:21:36 +0000 | |||
1383 | +++ sources/pool_allocator.cpp 2011-01-21 08:07:55 +0000 | |||
1384 | @@ -1107,18 +1107,19 @@ | |||
1385 | 1107 | || ( _selected_config->has_two_size | 1107 | || ( _selected_config->has_two_size |
1386 | 1108 | && ((pool_size == _selected_config->size)) || (pool_size == _selected_config->size + 1))) | 1108 | && ((pool_size == _selected_config->size)) || (pool_size == _selected_config->size + 1))) |
1387 | 1109 | { | 1109 | { |
1389 | 1110 | icon_name = GTK_STOCK_APPLY; | 1110 | icon_name = g_strdup (GTK_STOCK_APPLY); |
1390 | 1111 | pool->SetData (this, "is_balanced", (void *) 1); | 1111 | pool->SetData (this, "is_balanced", (void *) 1); |
1391 | 1112 | } | 1112 | } |
1392 | 1113 | else | 1113 | else |
1393 | 1114 | { | 1114 | { |
1395 | 1115 | icon_name = GTK_STOCK_DIALOG_WARNING; | 1115 | icon_name = g_strdup (GTK_STOCK_DIALOG_WARNING); |
1396 | 1116 | pool->SetData (this, "is_balanced", 0); | 1116 | pool->SetData (this, "is_balanced", 0); |
1397 | 1117 | } | 1117 | } |
1398 | 1118 | 1118 | ||
1399 | 1119 | Canvas::PutStockIconInTable (name_table, | 1119 | Canvas::PutStockIconInTable (name_table, |
1400 | 1120 | icon_name, | 1120 | icon_name, |
1401 | 1121 | 0, 0); | 1121 | 0, 0); |
1402 | 1122 | g_free (icon_name); | ||
1403 | 1122 | } | 1123 | } |
1404 | 1123 | 1124 | ||
1405 | 1124 | // Name | 1125 | // Name |
1406 | 1125 | 1126 | ||
1407 | === modified file 'sources/score_collector.cpp' | |||
1408 | --- sources/score_collector.cpp 2010-11-30 21:45:57 +0000 | |||
1409 | +++ sources/score_collector.cpp 2011-01-21 08:07:55 +0000 | |||
1410 | @@ -540,8 +540,8 @@ | |||
1411 | 540 | } | 540 | } |
1412 | 541 | 541 | ||
1413 | 542 | // -------------------------------------------------------------------------------- | 542 | // -------------------------------------------------------------------------------- |
1416 | 543 | void ScoreCollector::SetConsistentColors (gchar *normal_color, | 543 | void ScoreCollector::SetConsistentColors (const gchar *normal_color, |
1417 | 544 | gchar *focus_color) | 544 | const gchar *focus_color) |
1418 | 545 | { | 545 | { |
1419 | 546 | g_free (_consistent_normal_color); | 546 | g_free (_consistent_normal_color); |
1420 | 547 | _consistent_normal_color = g_strdup (normal_color); | 547 | _consistent_normal_color = g_strdup (normal_color); |
1421 | 548 | 548 | ||
1422 | === modified file 'sources/score_collector.hpp' | |||
1423 | --- sources/score_collector.hpp 2010-04-18 21:11:47 +0000 | |||
1424 | +++ sources/score_collector.hpp 2011-01-21 08:07:55 +0000 | |||
1425 | @@ -61,8 +61,8 @@ | |||
1426 | 61 | void SetNextCollectingPoint (GooCanvasItem *to, | 61 | void SetNextCollectingPoint (GooCanvasItem *to, |
1427 | 62 | GooCanvasItem *next); | 62 | GooCanvasItem *next); |
1428 | 63 | 63 | ||
1431 | 64 | void SetConsistentColors (gchar *normal_color, | 64 | void SetConsistentColors (const gchar *normal_color, |
1432 | 65 | gchar *focus_color); | 65 | const gchar *focus_color); |
1433 | 66 | 66 | ||
1434 | 67 | void SetUnConsistentColors (gchar *normal_color, | 67 | void SetUnConsistentColors (gchar *normal_color, |
1435 | 68 | gchar *focus_colorg); | 68 | gchar *focus_colorg); |
1436 | 69 | 69 | ||
1437 | === modified file 'sources/stage.hpp' | |||
1438 | --- sources/stage.hpp 2010-11-17 11:21:48 +0000 | |||
1439 | +++ sources/stage.hpp 2011-01-21 08:07:55 +0000 | |||
1440 | @@ -125,7 +125,7 @@ | |||
1441 | 125 | virtual void Load (xmlNode *xml_node); | 125 | virtual void Load (xmlNode *xml_node); |
1442 | 126 | 126 | ||
1443 | 127 | virtual void Load (xmlXPathContext *xml_context, | 127 | virtual void Load (xmlXPathContext *xml_context, |
1445 | 128 | gchar *from_node) {}; | 128 | const gchar *from_node) {}; |
1446 | 129 | 129 | ||
1447 | 130 | virtual void Save (xmlTextWriter *xml_writer) {}; | 130 | virtual void Save (xmlTextWriter *xml_writer) {}; |
1448 | 131 | 131 | ||
1449 | 132 | 132 | ||
1450 | === modified file 'sources/table.cpp' | |||
1451 | --- sources/table.cpp 2010-12-29 07:36:17 +0000 | |||
1452 | +++ sources/table.cpp 2011-01-21 08:07:55 +0000 | |||
1453 | @@ -29,6 +29,7 @@ | |||
1454 | 29 | 29 | ||
1455 | 30 | const gchar *Table::_class_name = N_("Table"); | 30 | const gchar *Table::_class_name = N_("Table"); |
1456 | 31 | const gchar *Table::_xml_class_name = "PhaseDeTableaux"; | 31 | const gchar *Table::_xml_class_name = "PhaseDeTableaux"; |
1457 | 32 | const gdouble Table::_score_rect_size = 30.0; | ||
1458 | 32 | const gdouble Table::_level_spacing = 10.0; | 33 | const gdouble Table::_level_spacing = 10.0; |
1459 | 33 | 34 | ||
1460 | 34 | typedef enum | 35 | typedef enum |
1461 | @@ -246,7 +247,7 @@ | |||
1462 | 246 | } | 247 | } |
1463 | 247 | 248 | ||
1464 | 248 | // -------------------------------------------------------------------------------- | 249 | // -------------------------------------------------------------------------------- |
1466 | 249 | GooCanvasItem *Table::GetQuickScore (gchar *container) | 250 | GooCanvasItem *Table::GetQuickScore (const gchar *container) |
1467 | 250 | { | 251 | { |
1468 | 251 | GtkWidget *view_port = _glade->GetWidget (container); | 252 | GtkWidget *view_port = _glade->GetWidget (container); |
1469 | 252 | GooCanvas *canvas = GOO_CANVAS (goo_canvas_new ()); | 253 | GooCanvas *canvas = GOO_CANVAS (goo_canvas_new ()); |
1470 | @@ -317,15 +318,15 @@ | |||
1471 | 317 | 318 | ||
1472 | 318 | if (_level_status[i]._has_error) | 319 | if (_level_status[i]._has_error) |
1473 | 319 | { | 320 | { |
1475 | 320 | icon = GTK_STOCK_DIALOG_WARNING; | 321 | icon = g_strdup (GTK_STOCK_DIALOG_WARNING); |
1476 | 321 | } | 322 | } |
1477 | 322 | else if (_level_status[i]._is_over == TRUE) | 323 | else if (_level_status[i]._is_over == TRUE) |
1478 | 323 | { | 324 | { |
1480 | 324 | icon = GTK_STOCK_APPLY; | 325 | icon = g_strdup (GTK_STOCK_APPLY); |
1481 | 325 | } | 326 | } |
1482 | 326 | else | 327 | else |
1483 | 327 | { | 328 | { |
1485 | 328 | icon = GTK_STOCK_EXECUTE; | 329 | icon = g_strdup (GTK_STOCK_EXECUTE); |
1486 | 329 | } | 330 | } |
1487 | 330 | 331 | ||
1488 | 331 | _level_status[i]._status_item = Canvas::PutStockIconInTable (_level_status[i-nb_missing_level]._level_header, | 332 | _level_status[i]._status_item = Canvas::PutStockIconInTable (_level_status[i-nb_missing_level]._level_header, |
1489 | @@ -339,6 +340,7 @@ | |||
1490 | 339 | gtk_list_store_set (_from_table_liststore, &iter, | 340 | gtk_list_store_set (_from_table_liststore, &iter, |
1491 | 340 | FROM_STATUS_COLUMN, icon, | 341 | FROM_STATUS_COLUMN, icon, |
1492 | 341 | -1); | 342 | -1); |
1493 | 343 | g_free (icon); | ||
1494 | 342 | } | 344 | } |
1495 | 343 | } | 345 | } |
1496 | 344 | SignalStatusUpdate (); | 346 | SignalStatusUpdate (); |
1497 | @@ -954,7 +956,7 @@ | |||
1498 | 954 | 956 | ||
1499 | 955 | if (parent_data->_match->IsDropped () == FALSE) | 957 | if (parent_data->_match->IsDropped () == FALSE) |
1500 | 956 | { | 958 | { |
1502 | 957 | text = "Q"; | 959 | text = (gchar *) "Q"; |
1503 | 958 | } | 960 | } |
1504 | 959 | else | 961 | else |
1505 | 960 | { | 962 | { |
1506 | 961 | 963 | ||
1507 | === modified file 'sources/table.hpp' | |||
1508 | --- sources/table.hpp 2010-12-19 17:35:40 +0000 | |||
1509 | +++ sources/table.hpp 2011-01-21 08:07:55 +0000 | |||
1510 | @@ -60,7 +60,7 @@ | |||
1511 | 60 | gint page_nr); | 60 | gint page_nr); |
1512 | 61 | 61 | ||
1513 | 62 | private: | 62 | private: |
1515 | 63 | static const gdouble _score_rect_size = 30.0; | 63 | static const gdouble _score_rect_size; |
1516 | 64 | 64 | ||
1517 | 65 | struct LevelStatus | 65 | struct LevelStatus |
1518 | 66 | { | 66 | { |
1519 | @@ -110,7 +110,7 @@ | |||
1520 | 110 | guint _print_nb_y_pages; | 110 | guint _print_nb_y_pages; |
1521 | 111 | GData *_match_list; | 111 | GData *_match_list; |
1522 | 112 | 112 | ||
1524 | 113 | GooCanvasItem *GetQuickScore (gchar *container); | 113 | GooCanvasItem *GetQuickScore (const gchar *container); |
1525 | 114 | 114 | ||
1526 | 115 | void Display (); | 115 | void Display (); |
1527 | 116 | 116 |