gcompris r3198 - in branches/gcomprixo: . src src/gcompris src/hexagon-activity src/hexagon-activity/resources src/hexagon-activity/resources/hexagon src/redraw-activity
- From: bcoudoin svn gnome org
- To: svn-commits-list gnome org
- Subject: gcompris r3198 - in branches/gcomprixo: . src src/gcompris src/hexagon-activity src/hexagon-activity/resources src/hexagon-activity/resources/hexagon src/redraw-activity
- Date: Sun, 6 Jan 2008 16:51:44 +0000 (GMT)
Author: bcoudoin
Date: Sun Jan 6 16:51:44 2008
New Revision: 3198
URL: http://svn.gnome.org/viewvc/gcompris?rev=3198&view=rev
Log:
Fixed sugar bundle startup script to use the local resourse dir as
we copy it at bundle time. It should fix all activities that have their
resources in another activity.
Fixed missing strawberry in hexagon. Now hexagon restarts at the end instead
of exiting.
Added:
branches/gcomprixo/src/hexagon-activity/resources/Makefile.am
branches/gcomprixo/src/hexagon-activity/resources/hexagon/
branches/gcomprixo/src/hexagon-activity/resources/hexagon/Makefile.am
branches/gcomprixo/src/hexagon-activity/resources/hexagon/strawberry.png (contents, props changed)
Modified:
branches/gcomprixo/configure.in
branches/gcomprixo/src/activity.info
branches/gcomprixo/src/gcompris/bar.c
branches/gcomprixo/src/hexagon-activity/hexagon.py
branches/gcomprixo/src/redraw-activity/redraw.py
branches/gcomprixo/src/runit.sh
Modified: branches/gcomprixo/configure.in
==============================================================================
--- branches/gcomprixo/configure.in (original)
+++ branches/gcomprixo/configure.in Sun Jan 6 16:51:44 2008
@@ -760,6 +760,8 @@
src/sudoku-activity/resources/Makefile
src/sudoku-activity/resources/sudoku/Makefile
src/hexagon-activity/Makefile
+src/hexagon-activity/resources/Makefile
+src/hexagon-activity/resources/hexagon/Makefile
src/magic_hat_plus-activity/Makefile
src/railroad-activity/Makefile
src/railroad-activity/resources/Makefile
Modified: branches/gcomprixo/src/activity.info
==============================================================================
--- branches/gcomprixo/src/activity.info (original)
+++ branches/gcomprixo/src/activity.info Sun Jan 6 16:51:44 2008
@@ -1,6 +1,6 @@
[Activity]
name = @ACTIVITY_NAME@
-activity_version = 3
+activity_version = 4
host_version = 1
service_name = net gcompris ACTIVITY_NAME@Activity
icon = activity-gcompris
Modified: branches/gcomprixo/src/gcompris/bar.c
==============================================================================
--- branches/gcomprixo/src/gcompris/bar.c (original)
+++ branches/gcomprixo/src/gcompris/bar.c Sun Jan 6 16:51:44 2008
@@ -595,11 +595,16 @@
}
else if(!strcmp((char *)data, "quit"))
{
- gc_confirm_box( _("GCompris confirmation"),
+ GcomprisProperties *properties = gc_prop_get();
+
+ if(strlen(properties->root_menu) == 1)
+ gc_confirm_box( _("GCompris confirmation"),
_("Are you sure you want to quit?"),
_("Yes, I am sure!"),
_("No, I want to keep going"),
(ConfirmCallBack) confirm_quit);
+ else
+ confirm_quit(TRUE);
}
break;
Modified: branches/gcomprixo/src/hexagon-activity/hexagon.py
==============================================================================
--- branches/gcomprixo/src/hexagon-activity/hexagon.py (original)
+++ branches/gcomprixo/src/hexagon-activity/hexagon.py Sun Jan 6 16:51:44 2008
@@ -143,7 +143,15 @@
return color
def finished(self):
- gcompris.bonus.board_finished(gcompris.bonus.FINISHED_RANDOM)
+ self.cleanup()
+ self.rootitem = self.gcomprisBoard.canvas.root().add(
+ gnomecanvas.CanvasGroup,
+ x=0.0,
+ y=0.0
+ )
+ self.paint_skin()
+ self.random_catx = random.randrange(21)
+ self.random_caty = random.randrange(15)
def on_click (self, widget, event=None, x=0, y=0):
if event.type == gtk.gdk.BUTTON_PRESS and event.button == 1 :
@@ -169,7 +177,7 @@
if self.random_caty%2:
position +=self.sqrt3/2*self.r
pixbuf2 = gcompris.utils.load_pixmap \
- ("gcompris/misc/strawberry.png")
+ ("hexagon/strawberry.png")
h2 = 30
w2 = pixbuf2.get_width()*h2/pixbuf2.get_height()
self.rootitem.add(gnomecanvas.CanvasPixbuf,
Added: branches/gcomprixo/src/hexagon-activity/resources/Makefile.am
==============================================================================
--- (empty file)
+++ branches/gcomprixo/src/hexagon-activity/resources/Makefile.am Sun Jan 6 16:51:44 2008
@@ -0,0 +1 @@
+SUBDIRS=hexagon
Added: branches/gcomprixo/src/hexagon-activity/resources/hexagon/Makefile.am
==============================================================================
--- (empty file)
+++ branches/gcomprixo/src/hexagon-activity/resources/hexagon/Makefile.am Sun Jan 6 16:51:44 2008
@@ -0,0 +1,5 @@
+imgdir = $(pkgdatadir)/@PACKAGE_DATA_DIR@/hexagon
+img_DATA = \
+ strawberry.png
+
+EXTRA_DIST = $(img_DATA)
Added: branches/gcomprixo/src/hexagon-activity/resources/hexagon/strawberry.png
==============================================================================
Binary file. No diff available.
Modified: branches/gcomprixo/src/redraw-activity/redraw.py
==============================================================================
--- branches/gcomprixo/src/redraw-activity/redraw.py (original)
+++ branches/gcomprixo/src/redraw-activity/redraw.py Sun Jan 6 16:51:44 2008
@@ -671,7 +671,7 @@
ca = 0x1D0DFFFFL
cb = 0xAAEEAAFFL
- for i in range(x1,x2,step):
+ for i in range(int(x1), int(x2), int(step)):
if(ci%2):
color = ca
else:
@@ -709,7 +709,7 @@
else:
item.connect("event", self.target_item_event)
- for i in range(y1,y2,step):
+ for i in range(int(y1),int(y2),int(step)):
if(ci%2):
color = ca
else:
Modified: branches/gcomprixo/src/runit.sh
==============================================================================
--- branches/gcomprixo/src/runit.sh (original)
+++ branches/gcomprixo/src/runit.sh Sun Jan 6 16:51:44 2008
@@ -18,6 +18,10 @@
plugindir=$path
fi
+if [ ! -d $resourcedir ]; then
+ resourcedir=$path/resources
+fi
+
gcompris=$1/gcompris.bin
if [ ! -f $gcompris ]; then
gcompris=$1/../gcompris/gcompris
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]