diff options
Diffstat (limited to 'journal.py')
-rw-r--r-- | journal.py | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -3,6 +3,7 @@ # Author: Arjun Sarwal arjun@laptop.org # Copyright (C) 2007, Arjun Sarwal # Copyright (C) 2009-12 Walter Bender +# Copyright (C) 2013, Ignacio Rodriguez # # # This program is free software; you can redistribute it and/or modify @@ -19,14 +20,14 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -import gtk +from gi.repository import Gtk import cairo import time import os from numpy import array from gettext import gettext as _ -from sugar.datastore import datastore +from sugar3.datastore import datastore # Initialize logging. import logging @@ -90,7 +91,7 @@ class DataLogger(): log.debug('saving screen capture to temp file %s' % (tmp_file_path)) - gtk.threads_enter() + Gtk.threads_enter() win = self.activity.wave.get_window() width, height = win.get_size() @@ -102,7 +103,7 @@ class DataLogger(): cr.paint() img_surface.write_to_png(tmp_file_path) - gtk.threads_leave() + Gtk.threads_leave() if os.path.exists(tmp_file_path): dsobject = datastore.create() try: |