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 06:59:14 (GMT)
committer Florent Pigout <florent.pigout@gmail.com>2011-09-22 06:59:14 (GMT)
commitfc04adb07b07e030f6cbde04d053b76c73953f0a (patch)
tree31fd16cb4b62f8f6313e6d8f594b3a8929b0b69c
parent8c14cc8fc665823e6c14ddccdcfcfe2f46916721 (diff)
do not go back just after import to do another imports in an easier way
-rw-r--r--atoidejouer/ui/timeline.py6
-rw-r--r--atoidejouer/ui/toolbar.py11
2 files changed, 10 insertions, 7 deletions
diff --git a/atoidejouer/ui/timeline.py b/atoidejouer/ui/timeline.py
index 60c741f..f359bd2 100644
--- a/atoidejouer/ui/timeline.py
+++ b/atoidejouer/ui/timeline.py
@@ -129,9 +129,11 @@ class Timeline(gtk.Frame):
return len(self._titles_box.get_children())
def _add_title(self, sequence_name):
+ # screen name
+ _screen_name = self.screen.toolbar.name.replace('_add', '')
# get first image name
- _img_name = storage.get_sequence_first_graphic_name(
- self.screen.toolbar.name, sequence_name)
+ _img_name = storage.get_sequence_first_graphic_name(_screen_name,
+ sequence_name)
# get button
_title = ui.get_button(label=sequence_name, img_name=_img_name,
width=0, padding=(4, 0), img_size=(16, 16))
diff --git a/atoidejouer/ui/toolbar.py b/atoidejouer/ui/toolbar.py
index 140565a..65be152 100644
--- a/atoidejouer/ui/toolbar.py
+++ b/atoidejouer/ui/toolbar.py
@@ -216,6 +216,9 @@ def _cb_back(widget, toolbar):
toolbar._switch(toolbar.name.replace('_add', ''))
# restore screen
toolbar.activity._change_screen(toolbar)
+ # get screen now
+ _screen = toolbar.activity.get_current_screen()
+ _screen.scene.refresh()
def _cb_import(widget, toolbar):
@@ -225,16 +228,14 @@ def _cb_import(widget, toolbar):
_screen = toolbar.activity.get_current_screen()
# shortcut
_filenames = _screen.sequence_preview.items
- # and back
- _cb_back(widget, toolbar)
# add sequence to the story keys
if toolbar.story_keys.add_sequence(_sequence_name, _filenames):
+ # screen name factory
+ _screen_name = toolbar.name.replace('_add', '')
# get screen now
- _screen = toolbar.activity.get_current_screen()
+ _screen = toolbar.activity.get_screen(_screen_name)
# add sequence to the timeline
_screen.timeline.add_sequence(_sequence_name)
- # ..
- _screen.scene.refresh()
# already added
else:
pass