Commit 8ceb14e2 authored by Bruno Coudoin's avatar Bruno Coudoin

- Fixed compilation warnings and potential bugs for x86-64.

	  Reviewed enumerate activity to have 9 level instead of 6 and make
	  it easier (less objects). Fixed the oject icons to keep their image
	  ratio in the entry section.
parent 843b1268
......@@ -465,7 +465,8 @@ static GnomeCanvasItem *algebra_guesscount_create_item(GnomeCanvasGroup *parent)
"height_set", TRUE,
NULL);
xOffset += BUTTON_WIDTH+HORIZONTAL_SEPARATION;
gtk_signal_connect(GTK_OBJECT(oper_item[i]), "event", (GtkSignalFunc) item_event_oper, (void *) &(token_value[i*2+1]));
gtk_signal_connect(GTK_OBJECT(oper_item[i]), "event", (GtkSignalFunc) item_event_oper,
GINT_TO_POINTER(&(token_value[i*2+1])) );
token_value[i*2+1].isNumber = FALSE;
token_value[i*2+1].isMoved = FALSE;
token_value[i*2+1].oper = oper_values[i];
......
......@@ -629,7 +629,7 @@ static void display_tool_selector(GnomeCanvasGroup *parent)
gtk_signal_connect(GTK_OBJECT(item), "event",
(GtkSignalFunc) tool_event,
(void *)TOOL_SAVE);
GINT_TO_POINTER(TOOL_SAVE) );
}
currentTool = TOOL_SAVE;
......@@ -668,7 +668,7 @@ static void display_tool_selector(GnomeCanvasGroup *parent)
gtk_signal_connect(GTK_OBJECT(item), "event",
(GtkSignalFunc) tool_event,
(void *)toolIndex);
GINT_TO_POINTER(toolIndex));
}
}
}
......
......@@ -147,7 +147,7 @@ static void start_board (GcomprisBoard *agcomprisBoard)
gcomprisBoard->disable_im_context = TRUE;
gcomprisBoard->level=1;
gcomprisBoard->maxlevel=5;
gcomprisBoard->maxlevel=9;
gcomprisBoard->sublevel=1;
gcomprisBoard->number_of_sublevel=1; /* Go to next level after this number of 'play' */
gcompris_bar_set(GCOMPRIS_BAR_LEVEL|GCOMPRIS_BAR_OK);
......@@ -305,27 +305,39 @@ static void enumerate_next_level()
switch(gcomprisBoard->level)
{
case 1:
number_of_item_type = 2;
number_of_item_type = 1;
number_of_item_max = 5;
break;
case 2:
number_of_item_type = 3;
number_of_item_max = 6;
number_of_item_type = 2;
number_of_item_max = 5;
break;
case 3:
number_of_item_type = 4;
number_of_item_max = 7;
number_of_item_type = 3;
number_of_item_max = 5;
break;
case 4:
number_of_item_type = 5;
number_of_item_max = 8;
number_of_item_type = 3;
number_of_item_max = 5;
break;
case 5:
number_of_item_type = 6;
number_of_item_type = 4;
number_of_item_max = 5;
break;
case 6:
number_of_item_type = 4;
number_of_item_max = 6;
break;
case 7:
number_of_item_type = 4;
number_of_item_max = 7;
break;
case 8:
number_of_item_type = 4;
number_of_item_max = 10;
break;
default:
number_of_item_type = 6;
number_of_item_type = 5;
number_of_item_max = 10;
}
......@@ -403,7 +415,7 @@ static GnomeCanvasItem *enumerate_create_item(GnomeCanvasGroup *parent)
"y", (double) current_y - ANSWER_HEIGHT/2,
NULL);
gtk_signal_connect(GTK_OBJECT(item), "event", (GtkSignalFunc) item_event_focus, (void *)i);
gtk_signal_connect(GTK_OBJECT(item), "event", (GtkSignalFunc) item_event_focus, GINT_TO_POINTER(i));
gdk_pixbuf_unref(pixmap_answer);
......@@ -425,14 +437,14 @@ static GnomeCanvasItem *enumerate_create_item(GnomeCanvasGroup *parent)
"pixbuf", pixmap,
"x", (double) ANSWER_X,
"y", (double) current_y,
"width", (double) ANSWER_WIDTH,
"width", (double) gdk_pixbuf_get_width(pixmap)*ANSWER_HEIGHT/gdk_pixbuf_get_height(pixmap),
"height", (double) ANSWER_HEIGHT,
"width_set", TRUE,
"height_set", TRUE,
NULL);
gtk_signal_connect(GTK_OBJECT(item), "event", (GtkSignalFunc) item_event_focus, (void *)i);
gtk_signal_connect(GTK_OBJECT(item), "event", (GtkSignalFunc) item_event_focus, GINT_TO_POINTER(i));
gtk_signal_connect(GTK_OBJECT(item), "event",
(GtkSignalFunc) gcompris_item_event_focus,
......@@ -443,12 +455,13 @@ static GnomeCanvasItem *enumerate_create_item(GnomeCanvasGroup *parent)
gnome_canvas_text_get_type (),
"text", "?",
"font", gcompris_skin_font_board_big,
"x", (double) ANSWER_X + 2*ANSWER_WIDTH,
"x", (double) ANSWER_X + 2.5*ANSWER_WIDTH,
"y", (double) current_y + ANSWER_HEIGHT/2,
"anchor", GTK_ANCHOR_EAST,
"fill_color", "blue",
NULL);
gtk_signal_connect(GTK_OBJECT(answer_item[i]), "event", (GtkSignalFunc) item_event_focus, (void *)i);
gtk_signal_connect(GTK_OBJECT(answer_item[i]), "event", (GtkSignalFunc) item_event_focus,
GINT_TO_POINTER(i));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment