Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorent Pigout <florent.pigout@gmail.com>2011-09-22 00:05:16 (GMT)
committer Florent Pigout <florent.pigout@gmail.com>2011-09-22 00:05:16 (GMT)
commitb6c75a65a14d8c02466a812c8113e42edc384ff7 (patch)
tree3dc2619cefb76689a1c8407c96d1c4b7a8927367
parente85ab66af32c01a2e029cd069528feb905c2fdaf (diff)
switch to edit page if new project
-rw-r--r--activity.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/activity.py b/activity.py
index a08ddeb..029b77f 100644
--- a/activity.py
+++ b/activity.py
@@ -162,6 +162,9 @@ class AToiDeJouerActivity(activity.Activity):
# sequence dict and list
self.graphic_keys = StoryKeys('graphics', self)
self.sound_keys = StoryKeys('sounds', self)
+ # current toolbar or screen index
+ _cur_tuple = (2, 'graphics') if len(self.graphic_keys._names) == 0\
+ else (1, 'story')
# show
self._toolbox.show()
# tmp var
@@ -172,11 +175,11 @@ class AToiDeJouerActivity(activity.Activity):
# init toolbar
_t = toolbar.Toolbar(self, name=_n)
# if default toolbar .. set default screen
- if _n == 'story':
+ if _n == _cur_tuple[1]:
self._change_screen(_t)
_toolbar = _t
# set default tab
- self._toolbox.set_current_toolbar(1)
+ self._toolbox.set_current_toolbar(_cur_tuple[0])
# ..
self._toolbox.connect('current-toolbar-changed', _toolbar_changed, self)
# do anim