From 1ba14c1f6c3f05cc52a847d52c8a787c523de581 Mon Sep 17 00:00:00 2001 From: flavio Date: Fri, 04 Jan 2013 18:20:45 +0000 Subject: replace Imports --- diff --git a/clock.py b/clock.py index 873701b..bda3496 100755 --- a/clock.py +++ b/clock.py @@ -63,17 +63,19 @@ More about clocks and time in the World # displayed, it can spend a few seconds (20 to 30 is common) before # the GTK loop will process this low priority message. When we enable # the threads, the processing is almost instantaneous. -import gobject -gobject.threads_init() - -import pygtk -import gtk -from gtk import gdk -import pango -import gst + +import gi +gi.require_version('Gst', '1.0') + +from gi.repository import GObject +from gi.repository import Gtk +from gi.repository import Gdk +from gi.repository import Pango +from gi.repository import PangoCairo +from gi.repository import Gst +from gi.repository import Rsvg + import cairo -import pangocairo -import rsvg from sugar3.graphics.toolbarbox import ToolbarBox from sugar3.activity.widgets import StopButton @@ -106,6 +108,8 @@ _MODE_DIGITAL_CLOCK = 2 # named after our pid, to inhibit suspend. POWERD_INHIBIT_DIR = '/var/run/powerd-inhibit-suspend' +GObject.threads_init() + class ClockActivity(activity.Activity): """The clock activity displays a simple clock widget. """ -- cgit v0.9.1