gcompris r3590 - in branches/gcomprixogoo/src: gcompris searace-activity
- From: bcoudoin svn gnome org
- To: svn-commits-list gnome org
- Subject: gcompris r3590 - in branches/gcomprixogoo/src: gcompris searace-activity
- Date: Sun, 2 Nov 2008 14:34:46 +0000 (UTC)
Author: bcoudoin
Date: Sun Nov 2 14:34:45 2008
New Revision: 3590
URL: http://svn.gnome.org/viewvc/gcompris?rev=3590&view=rev
Log:
fixed bar repeat icon support
fixed searace activity
Modified:
branches/gcomprixogoo/src/gcompris/bar.c
branches/gcomprixogoo/src/searace-activity/searace.py
Modified: branches/gcomprixogoo/src/gcompris/bar.c
==============================================================================
--- branches/gcomprixogoo/src/gcompris/bar.c (original)
+++ branches/gcomprixogoo/src/gcompris/bar.c Sun Nov 2 14:34:45 2008
@@ -246,12 +246,18 @@
NULL);
current_level = 1;
- // REPEAT
+ // REPEAT (Default)
buttons = g_slist_append(buttons,
new_button(rootitem,
GC_BAR_REPEAT,
"repeat.png"));
+ // REPEAT ICON
+ buttons = g_slist_append(buttons,
+ new_button(rootitem,
+ GC_BAR_REPEAT_ICON,
+ "repeat.png"));
+
// HOME
buttons = g_slist_append(buttons,
new_button(rootitem,
@@ -313,7 +319,7 @@
GooCanvasItem *item;
goo_canvas_item_raise(rootitem, NULL);
/* Non yet initialized : Something Wrong */
- if( (item = get_item(GC_BAR_REPEAT)) == NULL)
+ if( (item = get_item(GC_BAR_REPEAT_ICON)) == NULL)
{
g_message("in bar_set_level, level_item uninitialized : should not happen\n");
return;
@@ -374,6 +380,12 @@
if(flags&GC_BAR_CONFIG)
current_flags |= GC_BAR_CONFIG;
+ if(flags&GC_BAR_REPEAT_ICON)
+ current_flags |= GC_BAR_REPEAT_ICON;
+
+ if(flags&GC_BAR_REPEAT)
+ current_flags |= GC_BAR_REPEAT;
+
update_exit_button();
GSList *list;
@@ -411,26 +423,6 @@
x / (bounds.x2 - bounds.x1),
1);
- if(flags&GC_BAR_REPEAT) {
- GdkPixbuf *pixmap;
-
- /* Set the repeat icon to the original one */
- pixmap = gc_skin_pixmap_load("repeat.png");
- g_object_set (get_item(GC_BAR_REPEAT),
- "pixbuf", pixmap,
- NULL);
- gdk_pixbuf_unref(pixmap);
-
- item_visibility(GC_BAR_REPEAT, TRUE);
-
- } else {
-
- if(flags&GC_BAR_REPEAT)
- item_visibility(GC_BAR_REPEAT, TRUE);
- else
- item_visibility(GC_BAR_REPEAT, FALSE);
- }
-
}
/* Hide all icons in the control bar
@@ -618,6 +610,7 @@
gc_help_start(gcomprisBoard);
}
break;
+ case GC_BAR_REPEAT_ICON:
case GC_BAR_REPEAT:
{
if(gcomprisBoard && gcomprisBoard->plugin->repeat != NULL)
Modified: branches/gcomprixogoo/src/searace-activity/searace.py
==============================================================================
--- branches/gcomprixogoo/src/searace-activity/searace.py (original)
+++ branches/gcomprixogoo/src/searace-activity/searace.py Sun Nov 2 14:34:45 2008
@@ -148,8 +148,7 @@
gcompris.utils.item_focus_init(item, None)
gcompris.bar_set_level(self.gcomprisBoard)
- gcompris.bar_location(gcompris.BOARD_WIDTH/2 - 60, -1, 0.6)
-
+ gcompris.bar_location(gcompris.BOARD_WIDTH/2 - 90, -1, 0.6)
def end(self):
@@ -685,8 +684,7 @@
cx = math.cos(angle_pi)
penalty=3
if(cx<0):
- penalty*=4
-
+ penalty*=5
return(cx*condition[1]*-1*penalty)
#
@@ -762,6 +760,7 @@
angle = abs(angle-360)
boat.speeditem.props.text = \
_("Angle:") + str(angle) + " " + _("Wind:") + str(int(wind)*-1)
+ boat.speeditem.raise_(None)
boat.timer = gobject.timeout_add(int(self.timerinc+wind),
self.cmd_forward, boat, value)
@@ -924,13 +923,13 @@
coord = (x, y, boat_angle, step_x, line_style) # x y angle distance line_style
# ----------
- goocanvas.Polyline(
- parent = self.root_weather_item,
- points = goocanvas.Points([(bx, by), (coord[0], coord[1])]),
- stroke_color_rgba = 0x00CC00FFL,
- line_width = 2.0,
- line_dash = coord[4]
- )
+ goocanvas.Polyline(
+ parent = self.root_weather_item,
+ points = goocanvas.Points([(bx, by), (coord[0], coord[1])]),
+ stroke_color_rgba = 0x00CC00FFL,
+ line_width = 2.0,
+ line_dash = coord[4]
+ )
bx = coord[0]
by = coord[1]
ba = coord[2]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]