Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/lessonscreen.py
diff options
context:
space:
mode:
authorolpc <olpc@xo-05-26-CC.localdomain>2008-12-09 03:13:02 (GMT)
committer olpc <olpc@xo-05-26-CC.localdomain>2008-12-09 03:13:02 (GMT)
commit7ec25f9180d948dad7839c4f7187d83960e987fd (patch)
tree9f56d3b93faa6a0f3e26ca1a3f9040d03b74c276 /lessonscreen.py
parent103e65924809d04a1446774346ecfcc03379d556 (diff)
Optimize keyboard rendering using Cairo. Only draw the keys as they change, instead of drawing the entire keyboard.
Diffstat (limited to 'lessonscreen.py')
-rw-r--r--lessonscreen.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lessonscreen.py b/lessonscreen.py
index 25328dc..13f49c9 100644
--- a/lessonscreen.py
+++ b/lessonscreen.py
@@ -13,6 +13,7 @@
#
# You should have received a copy of the GNU General Public License
# along with Typing Turtle. If not, see <http://www.gnu.org/licenses/>.
+# vi:sw=4 et
# Import standard Python modules.
import logging, os, math, time, copy, json, locale, datetime, random, re
@@ -279,7 +280,7 @@ class LessonScreen(gtk.VBox):
if key_name == 'Return':
key = PARAGRAPH_CODE
- print "key_press_cb: key=%s key_name=%s event.keyval=%d" % (key, key_name, event.keyval)
+ #print "key_press_cb: key=%s key_name=%s event.keyval=%d" % (key, key_name, event.keyval)
# Timer starts with first keypress.
if not self.start_time:
@@ -352,7 +353,7 @@ class LessonScreen(gtk.VBox):
if len(self.line) > 0:
key = self.keyboard.find_key_by_letter(self.line[self.char_idx])
if key:
- key.set_hilite(True)
+ self.keyboard.hilite_key(key)
# Move the cursor to the insert location.
iter = self.lessonbuffer.get_iter_at_mark(self.line_mark)