Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/editlessonscreen.py
diff options
context:
space:
mode:
authorWade Brainerd <wadetb@gmail.com>2009-10-28 02:18:22 (GMT)
committer Wade Brainerd <wadetb@gmail.com>2009-10-28 02:18:22 (GMT)
commit5bce688733859ac8c3d3b0be9a79beb1f07d2ba2 (patch)
treeee29a31dd9ba162de010bd95e09a22fd950e8681 /editlessonscreen.py
parentc2bfc92bb4e6364640856d2cffc55a33e93abe19 (diff)
Differentiate Key and Text steps. Key steps are presented one key a time, indicating which finger is used. Text steps are traditional text copying. Key steps can be created using the Lesson Editor.
Updated the English lessons to use Key steps. Added a little spacer between lines in Text steps. Translation updates.
Diffstat (limited to 'editlessonscreen.py')
-rw-r--r--editlessonscreen.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/editlessonscreen.py b/editlessonscreen.py
index 879416e..642c83f 100644
--- a/editlessonscreen.py
+++ b/editlessonscreen.py
@@ -124,6 +124,17 @@ class EditLessonScreen(gtk.VBox):
steplabel.set_alignment(0.0, 0.5)
steplabel.set_padding(10, 0)
+ # Build the step type combo box.
+ stepbox.typecombo = gtk.combo_box_new_text()
+ stepbox.typecombo.append_text(_('Keys'))
+ stepbox.typecombo.append_text(_('Words'))
+
+ steptype = step.get('mode', 'text')
+ if steptype == 'key':
+ stepbox.typecombo.set_active(0)
+ elif steptype == 'text':
+ stepbox.typecombo.set_active(1)
+
# Build the tool buttons.
delstepbtn = gtk.Button()
delstepbtn.add(sugar.graphics.icon.Icon(icon_name='list-remove'))
@@ -145,6 +156,7 @@ class EditLessonScreen(gtk.VBox):
btnbox = gtk.HBox()
btnbox.pack_start(steplabel, False, False)
+ btnbox.pack_start(stepbox.typecombo, expand=False, padding=10)
btnbox.pack_end(addstepbtn, False, False)
btnbox.pack_end(delstepbtn, False, False)
btnbox.pack_end(moveupbtn, False, False)
@@ -445,6 +457,11 @@ class EditLessonScreen(gtk.VBox):
buf = sb.texttext.get_buffer()
step['text'] = buf.get_text(buf.get_start_iter(), buf.get_end_iter())
+ if sb.typecombo.get_active() == 0:
+ step['mode'] = 'key'
+ elif sb.typecombo.get_active() == 1:
+ step['mode'] = 'text'
+
steps.append(step)
self.lesson['steps'] = steps