diff options
author | florent <florent.pigout@gmail.com> | 2011-06-17 19:23:27 (GMT) |
---|---|---|
committer | florent <florent.pigout@gmail.com> | 2011-06-17 19:23:27 (GMT) |
commit | 204fcb935f2e798f4f1fd4f40c26bb97c1c38de2 (patch) | |
tree | 7514c6f79b81652a9ec271f9546eaddb3e696379 /activity.py | |
parent | 74d06470998afa3c4204a02f29ebacbccbcf8f0c (diff) |
add simple splash when loading edit screens
Diffstat (limited to 'activity.py')
-rw-r--r-- | activity.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/activity.py b/activity.py index 2de755a..2cc4574 100644 --- a/activity.py +++ b/activity.py @@ -7,7 +7,7 @@ from functools import partial from gettext import gettext as _ # gtk import -import gtk +import gtk, glib # ... gtk.gdk.threads_init() @@ -154,6 +154,8 @@ class AToiDeJouerActivity(activity.Activity): self._current = None self._handler_id = None self._number_of_keys = 1 + # .. + self.__splash = None # sequence dict and list self.graphic_keys = StoryKeys('graphics', self) self.sound_keys = StoryKeys('sounds', self) @@ -236,6 +238,19 @@ class AToiDeJouerActivity(activity.Activity): else: # update current screen name self._current = toolbar.name if name is None else name + # init splash + if self._current in ['graphics', 'sounds']: + if self.__splash is None: + self.__splash = screens.Splash(toolbar) + else: + self.__splash._show() + # ... + glib.idle_add(partial(self.__idle_change, toolbar)) + else: + # .. + self.__idle_change(toolbar) + + def __idle_change(self, toolbar): # already exist if self._current in self._screens: # show |