Commit 339bf895 authored by Bruno Coudoin's avatar Bruno Coudoin

Continued the port to the Sugar architecture, more activities are working now

svn path=/branches/gcomprixo/; revision=2827
parent 1d8edfbb
activity=anim
plugindir=.
if [ -f .libs/lib$activity.so ]
if [ -f ../boards/.libs/libpython.so ]
then
plugindir=.libs
plugindir=../boards/.libs
fi
./gcompris.bin -L $plugindir -P . -A resources \
......
SUBDIRS = activity
SUBDIRS = activity resources
if PLATFORM_WIN32
shared = -shared
......
SUBDIRS = activity
SUBDIRS = activity resources
activity=chess
activity=chess_computer
type=chess
plugindir=.
if [ -f .libs/lib$activity.so ]
if [ -f .libs/lib$type.so ]
then
plugindir=.libs
fi
......
SUBDIRS = activity
SUBDIRS = activity resources
../boards/python/gcompris/
\ No newline at end of file
../boards/python/gcompris
\ No newline at end of file
......@@ -113,22 +113,30 @@ class Gcompris_drawnumber :
self.gcomprisBoard.sublevel=sublevel
self.gcomprisBoard.number_of_sublevel=len(self.data)
#Display of score
gcompris.score.start(gcompris.score.STYLE_NOTE, 10, 485,self.gcomprisBoard.number_of_sublevel)
gcompris.score.start(gcompris.score.STYLE_NOTE, 10, 485,
self.gcomprisBoard.number_of_sublevel)
gcompris.score.set(self.gcomprisBoard.sublevel)
#Set point number 0 from which the draw start. This point is equal to first one.
self.POINT[0]=self.point(0,self.data[sublevel][1][0],self.data[sublevel][1][1],30)
self.POINT[0]=self.point(0,
self.data[sublevel][1][0],
self.data[sublevel][1][1],30)
self.POINT[0].hide()
self.MAX=self.data[sublevel][0][0]
print "ICI1"
#Data loading from global data and display of points and numbers
i=1
while(i<=(self.MAX)):
self.TEXT.append(self.texte(i,self.data[sublevel][i][0],self.data[sublevel][i][1]))
self.TEXT[i].connect('event',self.action,i)
print i
self.TEXT.append(self.texte(i,
self.data[sublevel][i][0],
self.data[sublevel][i][1]))
self.TEXT[i].connect('event', self.action, i)
self.TEXT[i].lower(300-i)
self.POINT.append(self.point(i,self.data[sublevel][i][0],self.data[sublevel][i][1],30))
self.POINT[i].connect('event',self.action,i)
self.POINT.append(self.point(i,self.data[sublevel][i][0],
self.data[sublevel][i][1],30))
self.POINT[i].connect('event', self.action, i)
#Setting of display level to prevent from covert a point with another point which
#cause an impossibility to select it.
......@@ -138,8 +146,9 @@ class Gcompris_drawnumber :
#Setting color of the first point to blue instead of green
self.POINT[1].set(fill_color='blue')
def point(self,idpt,x,y,d=30):
def point(self, idpt, x, y, d=30):
"""Setting point from his x and y location"""
print "point"
rond=self.ROOT.add(gnomecanvas.CanvasEllipse,
x1=(x-(d/2)),y1=(y-(d/2)),
x2=(x+(d/2)),y2=(y+(d/2)),
......@@ -150,7 +159,7 @@ class Gcompris_drawnumber :
rond.x,rond.y=x,y
return rond
def texte(self,idpt,xt,yt):
def texte(self, idpt, xt, yt):
"""Setting text beside the point number idpt locate as xt, yt"""
labell = self.ROOT.add(gnomecanvas.CanvasText,
x=xt,
......
......@@ -640,7 +640,9 @@ gc_file_find_absolute(const gchar *format, ...)
FOUND:
g_free(filename);
return absolute_filename;
char *abs_name = realpath(absolute_filename, NULL);
g_free(absolute_filename);
return abs_name;
}
/** Create a directory if needed.
......
......@@ -119,14 +119,6 @@ class Gcompris_tuxpaint:
gcompris.sound.close()
# release pointergrab if running fullscreen, tuxpaint wants to grab the
# pointer itself
if (Prop.fullscreen and not Prop.noxf86vm):
gtk.gdk.pointer_ungrab()
#self.window.set_property("accept-focus", 0)
#self.window.set_keep_below(False)
try:
# bug in working_directory=None ?
if (tuxpaint_dir):
......
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