Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAneesh Dogra <lionaneesh@gmail.com>2012-12-18 17:22:00 (GMT)
committer Aneesh Dogra <lionaneesh@gmail.com>2012-12-18 17:22:00 (GMT)
commit381577689496911d9b5661046f80bd92b421fc28 (patch)
tree6e5c803e90bae4fc29c82eb5259bf61e5aa5380a
parente613ca2924e44688f1629196773fe9d8753fe33d (diff)
Fixes.
-rw-r--r--SliderPuzzleActivity.py7
-rwxr-xr-xSliderPuzzleUI.py2
-rw-r--r--SliderPuzzleWidget.py6
-rwxr-xr-xmmm_modules/image_category.py6
-rw-r--r--mmm_modules/timer.py6
5 files changed, 14 insertions, 13 deletions
diff --git a/SliderPuzzleActivity.py b/SliderPuzzleActivity.py
index 2126404..b38c1e9 100644
--- a/SliderPuzzleActivity.py
+++ b/SliderPuzzleActivity.py
@@ -22,7 +22,8 @@
from gi.repository import GObject
GObject.threads_init()
-from sugar3.activity.activity import Activity, ActivityToolbox, get_bundle_path
+from sugar3.activity.activity import Activity, get_bundle_path
+from sugar3.activity.widgets import ActivityToolbar
from gettext import gettext as _
from SliderPuzzleUI import SliderPuzzleUI
from mamamedia_modules import TubeHelper
@@ -309,8 +310,8 @@ class SliderPuzzleActivity(Activity, TubeHelper):
os.chdir(get_bundle_path())
self.connect('destroy', self._destroy_cb)
- toolbox = ActivityToolbox(self)
- self.set_toolbox(toolbox)
+ toolbox = ActivityToolbar(self)
+ self.set_toolbar_box(toolbox)
toolbox.show()
title_widget = toolbox._activity_toolbar.title
title_widget.set_size_request(title_widget.get_layout().get_pixel_size()[0] + 20, -1)
diff --git a/SliderPuzzleUI.py b/SliderPuzzleUI.py
index 506bdc0..ab48577 100755
--- a/SliderPuzzleUI.py
+++ b/SliderPuzzleUI.py
@@ -100,7 +100,7 @@ def prepare_btn(btn, w=-1, h=-1):
class SliderPuzzleUI (Gtk.Table):
- __gsignals__ = {'game-state-changed' : (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, (int,))}
+ __gsignals__ = {'game-state-changed' : (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, (int,))}
def __init__(self, parent):
super(SliderPuzzleUI, self).__init__(3,3,False)
diff --git a/SliderPuzzleWidget.py b/SliderPuzzleWidget.py
index 60e0b21..6a92739 100644
--- a/SliderPuzzleWidget.py
+++ b/SliderPuzzleWidget.py
@@ -404,9 +404,9 @@ class SliderPuzzleMap (object):
###
class SliderPuzzleWidget (Gtk.Table):
- __gsignals__ = {'solved' : (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, ()),
- 'shuffled' : (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, ()),
- 'moved' : (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, ()),}
+ __gsignals__ = {'solved' : (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, ()),
+ 'shuffled' : (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, ()),
+ 'moved' : (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, ()),}
def __init__ (self, pieces=9, width=480, height=480):
self.jumbler = SliderPuzzleMap(pieces, self.jumblermap_piece_move_cb)
diff --git a/mmm_modules/image_category.py b/mmm_modules/image_category.py
index 92af2ee..30cc866 100755
--- a/mmm_modules/image_category.py
+++ b/mmm_modules/image_category.py
@@ -154,8 +154,8 @@ class CategoryDirectory (object):
class ImageSelectorWidget (Gtk.Table):
- __gsignals__ = {'category_press' : (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, ()),
- 'image_press' : (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, ()),}
+ __gsignals__ = {'category_press' : (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, ()),
+ 'image_press' : (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, ()),}
def __init__ (self,parentp,
width=IMAGE_SIZE,
@@ -393,7 +393,7 @@ class ImageSelectorWidget (Gtk.Table):
self.image.set_from_pixbuf(self.category.get_image(obj.get('filename', None)))
class CategorySelector (Gtk.ScrolledWindow):
- __gsignals__ = {'selected' : (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, (str,))}
+ __gsignals__ = {'selected' : (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, (str,))}
def __init__ (self, title=None, selected_category_path=None, path=None, extra=()):
Gtk.ScrolledWindow.__init__ (self)
diff --git a/mmm_modules/timer.py b/mmm_modules/timer.py
index 80eaaf4..0a4c104 100644
--- a/mmm_modules/timer.py
+++ b/mmm_modules/timer.py
@@ -41,7 +41,7 @@ else:
from utils import load_image
class TimerWidget (Gtk.HBox):
- __gsignals__ = {'timer_toggle' : (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, (bool,)),}
+ __gsignals__ = {'timer_toggle' : (GObject.SIGNAL_RUN_LAST, GObject.TYPE_NONE, (bool,)),}
def __init__ (self, bg_color="#DD4040", fg_color="#4444FF", lbl_color="#DD4040", can_stop=True):
Gtk.HBox.__init__(self)
self.counter = Gtk.EventBox()
@@ -100,7 +100,7 @@ class TimerWidget (Gtk.HBox):
self.start_time = time() - self.start_time
self.do_tick()
if self.timer_id is None:
- self.timer_id = gobject.timeout_add(1000, self.do_tick)
+ self.timer_id = GObject.timeout_add(1000, self.do_tick)
self.emit('timer_toggle', True)
def stop (self, finished=False):
@@ -108,7 +108,7 @@ class TimerWidget (Gtk.HBox):
return
self.icon.set_from_pixbuf(self.icons[1])
if self.timer_id is not None:
- gobject.source_remove(self.timer_id)
+ GObject.source_remove(self.timer_id)
self.timer_id = None
self.start_time = time() - self.start_time
if not finished: