gcompris r3532 - branches/gcomprixogoo/src/tuxpaint-activity
- From: bcoudoin svn gnome org
- To: svn-commits-list gnome org
- Subject: gcompris r3532 - branches/gcomprixogoo/src/tuxpaint-activity
- Date: Sun, 7 Sep 2008 22:51:09 +0000 (UTC)
Author: bcoudoin
Date: Sun Sep 7 22:51:08 2008
New Revision: 3532
URL: http://svn.gnome.org/viewvc/gcompris?rev=3532&view=rev
Log:
fixed tuxpaint laucher to cleanup properly at the end.
Modified:
branches/gcomprixogoo/src/tuxpaint-activity/tuxpaint.py
Modified: branches/gcomprixogoo/src/tuxpaint-activity/tuxpaint.py
==============================================================================
--- branches/gcomprixogoo/src/tuxpaint-activity/tuxpaint.py (original)
+++ branches/gcomprixogoo/src/tuxpaint-activity/tuxpaint.py Sun Sep 7 22:51:08 2008
@@ -33,13 +33,17 @@
from gcompris import gcompris_gettext as _
pid = None
+fles = None
class Gcompris_tuxpaint:
"""TuxPaint Launcher"""
- global pid
def __init__(self, gcomprisBoard):
self.gcomprisBoard = gcomprisBoard
+ self.rootitem = None
+ # global parameter to access object structures from global fonctions
+ global fles
+ fles=self
pass
def configuration(self, value, init):
@@ -72,9 +76,6 @@
self.window = self.gcomprisBoard.canvas.get_toplevel()
- #global board
- #board = self
-
Prop = gcompris.get_properties()
#get default values
@@ -83,7 +84,7 @@
#replace configured values
self.config_dict.update(gcompris.get_board_conf())
- self.rootitem = goocanvas.Group(parent = self.gcomprisBoard.canvas.get_root_item())
+ self.rootitem = goocanvas.Group(parent = self.gcomprisBoard.canvas.get_root_item())
options = [progname]
@@ -104,6 +105,7 @@
gcompris.sound.close()
+ global pid
try:
# bug in working_directory=None ?
if (tuxpaint_dir):
@@ -126,7 +128,7 @@
gcompris.bar_set(0)
gcompris.bar_hide(1)
- gcompris.set_background(self.rootitem,
+ gcompris.set_background(self.gcomprisBoard.canvas.get_root_item(),
gcompris.skin.image_to_skin("gcompris-bg.jpg"))
textItem = goocanvas.Text(
@@ -237,8 +239,13 @@
global pid
pid = None
+
+ global fles
+ fles.end()
gcompris.end_board()
def stop_board():
+ global fles
+ fles.end()
gcompris.end_board()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]