Merge lp:~ecx69/bellepoule/linux into lp:bellepoule

Proposed by betonniere
Status: Merged
Merged at revision: not available
Proposed branch: lp:~ecx69/bellepoule/linux
Merge into: lp:bellepoule
Diff against target: 391 lines (+88/-59)
11 files modified
Makefile (+28/-0)
sources/attribute.cpp (+2/-2)
sources/contest.cpp (+13/-13)
sources/filter.cpp (+11/-12)
sources/filter.hpp (+2/-2)
sources/glade.cpp (+6/-7)
sources/main.cpp (+18/-16)
sources/module.cpp (+2/-1)
sources/players_list.cpp (+2/-2)
sources/players_list.hpp (+1/-1)
sources/pool_allocator.cpp (+3/-3)
To merge this branch: bzr merge lp:~ecx69/bellepoule/linux
Reviewer Review Type Date Requested Status
betonniere Approve
Review via email: mp+24294@code.launchpad.net
To post a comment you must log in.
lp:~ecx69/bellepoule/linux updated
135. By betonniere <>

Mise en place des écrans pour l'impression des tables.

136. By betonniere <>

Merge en provenance de la branche Linux

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=== added file 'Makefile'
2--- Makefile 1970-01-01 00:00:00 +0000
3+++ Makefile 2010-04-28 08:24:20 +0000
4@@ -0,0 +1,28 @@
5+CC=g++
6+SRCDIR=sources
7+OBJDIR=obj
8+#LIBS=$(shell pkg-config --libs pkg-config gtk+-2.0 gmodule-2.0 libxml-2.0 goocanvas)
9+#goocanvasmm-1.0 gtkmm-2.4 libglade-2.0 goocanvas
10+LIBS=`pkg-config --libs gtk+-2.0 gmodule-2.0 libxml-2.0 goocanvas`
11+#CFLAGS=$(shell pkg-config --cflags pkg-config gtk+-2.0 gmodule-2.0 libxml-2.0 goocanvas)
12+CFLAGS=`pkg-config --cflags gtk+-2.0 gmodule-2.0 libxml-2.0 goocanvas`
13+#OPTS=-Wall -Wno-write-strings -g -export-dynamic -Wl,--export-dynamic
14+OPTS=-Wl,--export-dynamic -Wall -Wno-write-strings -g
15+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
16+OBJS=$(SRCS:.cpp=.o)
17+PROG=BellePoule
18+
19+main: $(OBJS)
20+ @cd $(OBJDIR) && $(CC) $(OBJS) $(LIBS) $(OPTS) -o ../$(PROG)
21+
22+%.o: $(SRCDIR)/%.cpp
23+ @mkdir -p $(OBJDIR)
24+ @$(CC) -c $< -o $(OBJDIR)/$@ $(CFLAGS) $(OPTS)
25+
26+.PHONY: clean
27+clean:
28+ @mkdir -p $(OBJDIR)
29+ cd $(OBJDIR) && rm -f $(OBJS)
30+ cd $(SRCDIR) && rm -f *~
31+ rm -f $(PROG)
32+
33
34=== modified file 'sources/attribute.cpp'
35--- sources/attribute.cpp 2010-04-18 21:11:47 +0000
36+++ sources/attribute.cpp 2010-04-28 08:24:20 +0000
37@@ -273,7 +273,7 @@
38 *list = g_slist_copy (_list);
39
40 va_start (ap, list);
41- while (name = va_arg (ap, char *))
42+ while ( (name = va_arg (ap, char *)) )
43 {
44 for (guint i = 0; i < g_slist_length (*list); i++)
45 {
46@@ -637,4 +637,4 @@
47 attr->_value = _value;
48
49 return attr;
50-}
51+}
52
53=== modified file 'sources/contest.cpp'
54--- sources/contest.cpp 2010-04-22 20:04:15 +0000
55+++ sources/contest.cpp 2010-04-28 08:24:20 +0000
56@@ -22,9 +22,9 @@
57 #include <libxml/xpath.h>
58 #include <goocanvas.h>
59
60-#define WIN32_LEAN_AND_MEAN
61-#include <windows.h>
62-#include <shellapi.h>
63+//#define WIN32_LEAN_AND_MEAN
64+//#include <windows.h>
65+//#include <shellapi.h>
66
67 #include "canvas.hpp"
68 #include "tournament.hpp"
69@@ -839,16 +839,16 @@
70 {
71 GtkWidget *entry = _glade->GetWidget ("web_site_entry");
72
73- ShellExecuteA (NULL,
74- "open",
75- gtk_entry_get_text (GTK_ENTRY (entry)),
76- NULL,
77- NULL,
78- SW_SHOWNORMAL);
79- //gtk_show_uri (NULL,
80- //gtk_entry_get_text (GTK_ENTRY (entry)),
81- //GDK_CURRENT_TIME,
82- //NULL);
83+// ShellExecuteA (NULL,
84+// "open",
85+// gtk_entry_get_text (GTK_ENTRY (entry)),
86+// NULL,
87+// NULL,
88+// SW_SHOWNORMAL);
89+ gtk_show_uri (NULL,
90+ gtk_entry_get_text (GTK_ENTRY (entry)),
91+ GDK_CURRENT_TIME,
92+ NULL);
93 }
94
95 // --------------------------------------------------------------------------------
96
97=== modified file 'sources/filter.cpp'
98--- sources/filter.cpp 2010-04-18 21:11:47 +0000
99+++ sources/filter.cpp 2010-04-28 08:24:20 +0000
100@@ -36,7 +36,7 @@
101 GtkListStore *store;
102 GtkTreeIter iter;
103
104- store = gtk_list_store_new (NUM_COLS, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_STRING);
105+ store = gtk_list_store_new (NUM_COLS, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_STRING);
106
107 for (guint i = 0; i < g_slist_length (_attr_list); i++)
108 {
109@@ -55,7 +55,7 @@
110 g_signal_connect (G_OBJECT (store),
111 "row-deleted", G_CALLBACK (OnAttrDeleted), this);
112
113- _attr_filter_store = GTK_TREE_MODEL (store);
114+ _attr_filter_store = store;
115 }
116 }
117
118@@ -122,14 +122,14 @@
119 {
120 GtkTreeIter iter;
121 GtkTreeIter *sibling = NULL;
122- bool iter_is_valid;
123+ gboolean iter_is_valid;
124
125 iter_is_valid = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (_attr_filter_store),
126 &iter);
127
128 while (iter_is_valid)
129 {
130- bool current_visibility;
131+ gboolean current_visibility;
132 gchar *current_name;
133
134 gtk_tree_model_get (GTK_TREE_MODEL (_attr_filter_store),
135@@ -138,7 +138,7 @@
136 ATTR_XML_NAME, &current_name,
137 -1);
138
139- if (current_visibility == true)
140+ if (current_visibility == TRUE)
141 {
142 if (sibling)
143 {
144@@ -216,7 +216,7 @@
145 "text", ATTR_USER_NAME,
146 NULL);
147
148- gtk_tree_view_set_model (GTK_TREE_VIEW (view), _attr_filter_store);
149+ gtk_tree_view_set_model (GTK_TREE_VIEW (view), GTK_TREE_MODEL (_attr_filter_store));
150 gtk_container_add (GTK_CONTAINER (_filter_window), view);
151 }
152 }
153@@ -232,15 +232,15 @@
154
155 {
156 GtkTreeIter iter;
157- bool iter_is_valid;
158+ gboolean iter_is_valid;
159
160 iter_is_valid = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (_attr_filter_store),
161 &iter);
162
163 while (iter_is_valid)
164 {
165- gchar *current_name;
166- bool current_visibility;
167+ gchar *current_name;
168+ gboolean current_visibility;
169
170 gtk_tree_model_get (GTK_TREE_MODEL (_attr_filter_store),
171 &iter,
172@@ -248,7 +248,7 @@
173 ATTR_XML_NAME, &current_name,
174 -1);
175
176- if (current_visibility == true)
177+ if (current_visibility == TRUE)
178 {
179 _selected_attr = g_slist_append (_selected_attr,
180 AttributeDesc::GetDesc (current_name));
181@@ -295,5 +295,4 @@
182 Filter *f = (Filter *) user_data;
183
184 f->UpdateAttrList ();
185-}
186-
187+}
188
189=== modified file 'sources/filter.hpp'
190--- sources/filter.hpp 2010-04-18 21:11:47 +0000
191+++ sources/filter.hpp 2010-04-28 08:24:20 +0000
192@@ -57,7 +57,7 @@
193 Module *_owner;
194 GSList *_attr_list;
195 GSList *_selected_attr;
196- GtkTreeModel *_attr_filter_store;
197+ GtkListStore *_attr_filter_store;
198 GtkWidget *_filter_window;
199
200 virtual ~Filter ();
201@@ -72,4 +72,4 @@
202
203 };
204
205-#endif
206+#endif
207
208=== modified file 'sources/glade.cpp'
209--- sources/glade.cpp 2010-04-18 21:11:47 +0000
210+++ sources/glade.cpp 2010-04-28 08:24:20 +0000
211@@ -25,31 +25,30 @@
212 {
213 if (file_name)
214 {
215- GError *error;
216+ GError *error = NULL;
217 gchar *path = g_build_filename (_path, "resources", "glade", file_name, NULL);
218
219 _glade_xml = gtk_builder_new ();
220
221- error = NULL;
222 gtk_builder_add_from_file (_glade_xml,
223 path,
224 &error);
225 g_free (path);
226
227- if (error)
228+ if (error != NULL)
229 {
230 gchar *spare_file_name = g_build_filename (_path, "..", "..", "resources", "glade", file_name, NULL);
231
232- error = NULL;
233+ g_clear_error (&error);
234 gtk_builder_add_from_file (_glade_xml,
235 spare_file_name,
236 &error);
237 g_free (spare_file_name);
238
239- if (error)
240+ if (error != NULL)
241 {
242 g_print ("<<%s>> %s\n", spare_file_name, error->message);
243- g_free (error);
244+ g_clear_error (&error);
245
246 gtk_main_quit ();
247 }
248@@ -113,4 +112,4 @@
249 {
250 return GTK_WIDGET (gtk_builder_get_object (_glade_xml,
251 "root"));
252-}
253+}
254
255=== modified file 'sources/main.cpp'
256--- sources/main.cpp 2010-04-18 21:11:47 +0000
257+++ sources/main.cpp 2010-04-28 08:24:20 +0000
258@@ -17,9 +17,9 @@
259 #define GETTEXT_PACKAGE "gtk20"
260 #include <glib/gi18n-lib.h>
261
262-#define WIN32_LEAN_AND_MEAN
263-#include <windows.h>
264-#include <shellapi.h>
265+//#define WIN32_LEAN_AND_MEAN
266+//#include <windows.h>
267+//#include <shellapi.h>
268
269 #include <gtk/gtk.h>
270
271@@ -39,17 +39,17 @@
272 const gchar *link,
273 gpointer data)
274 {
275- ShellExecuteA (NULL,
276- "open",
277- link,
278- NULL,
279- NULL,
280- SW_SHOWNORMAL);
281+// ShellExecuteA (NULL,
282+// "open",
283+// link,
284+// NULL,
285+// NULL,
286+// SW_SHOWNORMAL);
287
288- //gtk_show_uri (NULL,
289- //link,
290- //GDK_CURRENT_TIME,
291- //NULL);
292+ gtk_show_uri (NULL,
293+ link,
294+ GDK_CURRENT_TIME,
295+ NULL);
296 }
297
298 // --------------------------------------------------------------------------------
299@@ -114,8 +114,10 @@
300 gchar *translation_path = g_strdup_printf ("%s/resources/translations", path);
301 #endif
302
303- libintl_bindtextdomain ("BellePoule", translation_path);
304- libintl_bind_textdomain_codeset ("BellePoule", "UTF-8");
305+// libintl_bindtextdomain ("BellePoule", translation_path);
306+// libintl_bind_textdomain_codeset ("BellePoule", "UTF-8");
307+ bindtextdomain ("BellePoule", translation_path);
308+ bind_textdomain_codeset ("BellePoule", "UTF-8");
309 textdomain ("BellePoule");
310
311 g_free (translation_path);
312@@ -236,4 +238,4 @@
313 gtk_main ();
314
315 return 0;
316-}
317+}
318
319=== modified file 'sources/module.cpp'
320--- sources/module.cpp 2010-04-22 20:04:15 +0000
321+++ sources/module.cpp 2010-04-28 08:24:20 +0000
322@@ -26,6 +26,7 @@
323 // --------------------------------------------------------------------------------
324 Module::Module (gchar *glade_file,
325 gchar *root)
326+//: Object ("Module")
327 {
328 _plugged_list = NULL;
329 _owner = NULL;
330@@ -337,4 +338,4 @@
331 {
332 module->OnEndPrint (operation,
333 context);
334-}
335+}
336
337=== modified file 'sources/players_list.cpp'
338--- sources/players_list.cpp 2010-04-23 15:53:34 +0000
339+++ sources/players_list.cpp 2010-04-28 08:24:20 +0000
340@@ -475,7 +475,7 @@
341 }
342
343 // --------------------------------------------------------------------------------
344-void PlayersList::SetSensitiveState (bool sensitive_value)
345+void PlayersList::SetSensitiveState (gboolean sensitive_value)
346 {
347 {
348 GList *columns = gtk_tree_view_get_columns (GTK_TREE_VIEW (_tree_view));
349@@ -1048,4 +1048,4 @@
350 GtkPrintContext *context)
351 {
352 g_free (_column_width);
353-}
354+}
355
356=== modified file 'sources/players_list.hpp'
357--- sources/players_list.hpp 2010-04-23 14:50:03 +0000
358+++ sources/players_list.hpp 2010-04-28 08:24:20 +0000
359@@ -49,7 +49,7 @@
360
361 void OnAttrListUpdated ();
362
363- void SetSensitiveState (bool sensitive_value);
364+ void SetSensitiveState (gboolean sensitive_value);
365
366 void Update (Player *player);
367
368
369=== modified file 'sources/pool_allocator.cpp'
370--- sources/pool_allocator.cpp 2010-04-18 21:11:47 +0000
371+++ sources/pool_allocator.cpp 2010-04-28 08:24:20 +0000
372@@ -25,7 +25,7 @@
373
374 #define VALUE_INIT {0,{{0}}}
375
376-enum
377+typedef enum
378 {
379 POOL_SIZE_COL,
380 NB_POOLS_COL,
381@@ -843,8 +843,8 @@
382 gchar *icon_name;
383
384 if ( (pool_size == _selected_config->size - 1)
385- || ( _selected_config->has_two_size
386- && (pool_size == _selected_config->size) || (pool_size == _selected_config->size - 1)))
387+ || (( _selected_config->has_two_size
388+ && (pool_size == _selected_config->size)) || (pool_size == _selected_config->size - 1)))
389 {
390 icon_name = GTK_STOCK_APPLY;
391 pool->SetData (this, "is_balanced", (void *) 1);

Subscribers

People subscribed via source and target branches

to all changes: