diff options
author | flavio <fdanesse@gmail.com> | 2012-11-04 20:30:46 (GMT) |
---|---|---|
committer | flavio <fdanesse@gmail.com> | 2012-11-04 20:30:46 (GMT) |
commit | c0c4ab3e1e9d96551f4596d229cdcd081bcb1527 (patch) | |
tree | 5abd0a8b6f9c9635cca2128fdeb7a12bbc75e5c0 | |
parent | d39aabd190c720477411a8444c6ddf747580a18d (diff) |
Fixmes.
-rw-r--r-- | montage.py | 19 | ||||
-rw-r--r-- | toolkit/activity_widgets.py | 8 | ||||
-rw-r--r-- | toolkit/combobox.py | 1 | ||||
-rw-r--r-- | toolkit/scrolledbox.py | 5 | ||||
-rw-r--r-- | toolkit/toolitem.py | 4 | ||||
-rw-r--r-- | utils.py | 1 |
6 files changed, 18 insertions, 20 deletions
@@ -98,7 +98,7 @@ class View(Gtk.EventBox): def set_emittion(self, value): self._emission = value - + frame = GObject.property(type=object, getter=None, setter=set_frame) ground = GObject.property(type=object, getter=None, setter=set_ground) sound = GObject.property(type=object, getter=None, setter=set_sound) @@ -182,11 +182,8 @@ class View(Gtk.EventBox): self._add_frame(i) # frames box - # FIXME: There is no longer VscrooledBox - #table_scroll = VScrolledBox() - table_scroll = Gtk.ScrolledWindow() - table_scroll.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC) - table_scroll.add_with_viewport(self.table) + table_scroll = VScrolledBox() + table_scroll.set_viewport(self.table) table_scroll.modify_bg(Gtk.StateType.NORMAL, Gdk.color_parse('BUTTON_BACKGROUND')) yellow_frames = Gtk.EventBox() @@ -455,11 +452,11 @@ class View(Gtk.EventBox): def _screen_size_cb(self, sender, aloc, widget): - size = min(aloc.width, aloc.height) - widget.set_size_request(size, size) + # FIXME: Clear the set_size() function and enable the following lines to avoid the error: received an X Window System error. + #size = min(aloc.width, aloc.height) + #widget.set_size_request(size, size) + #return True - return True - ''' def set_size(): size = min(aloc.width, aloc.height) @@ -469,4 +466,4 @@ class View(Gtk.EventBox): if self._screen_size_id is not None: GObject.source_remove(self._screen_size_id) - self._screen_size_id = GObject.timeout_add(500, set_size)''' + self._screen_size_id = GObject.timeout_add(500, set_size) diff --git a/toolkit/activity_widgets.py b/toolkit/activity_widgets.py index 33ab0df..385129c 100644 --- a/toolkit/activity_widgets.py +++ b/toolkit/activity_widgets.py @@ -30,13 +30,15 @@ from sugar3.graphics.xocolor import XoColor from sugar3.graphics.icon import Icon from sugar3.bundle.activitybundle import ActivityBundle -from toolkit.toolbarbox import ToolbarButton -from toolkit.radiopalette import RadioPalette -from toolkit.radiopalette import RadioMenuButton +from toolbarbox import ToolbarButton +from radiopalette import RadioPalette +from radiopalette import RadioMenuButton + from sugar3.graphics import style _ = lambda msg: gettext.dgettext('sugar3-toolkit', msg) +# FIXME: This module is not being used. def _create_activity_icon(metadata): diff --git a/toolkit/combobox.py b/toolkit/combobox.py index 99dbe72..28e6f04 100644 --- a/toolkit/combobox.py +++ b/toolkit/combobox.py @@ -25,6 +25,7 @@ from gi.repository import GObject from gi.repository import Gtk from gi.repository import GdkPixbuf +# FIXME: This class is not being used. class ComboBox(Gtk.ComboBox): diff --git a/toolkit/scrolledbox.py b/toolkit/scrolledbox.py index 77496d2..3653f4f 100644 --- a/toolkit/scrolledbox.py +++ b/toolkit/scrolledbox.py @@ -25,10 +25,11 @@ class ScrollButton(Gtk.ToolButton): Gtk.ToolButton.__init__(self) icon = Icon(icon_name = icon_name, - icon_size=Gdk.IconSize.SMALL_TOOLBAR) + icon_size=Gtk.IconSize.SMALL_TOOLBAR) # The alignment is a hack to work around gtk.ToolButton code # that sets the icon_size when the icon_widget is a gtk.Image - alignment = Gtk.Alignment(0.5, 0.5) + alignment = Gtk.Alignment() + alignment.set(0.0, 0.0, 0.5, 0.5) alignment.add(icon) self.set_icon_widget(alignment) diff --git a/toolkit/toolitem.py b/toolkit/toolitem.py index 428f109..b2a7407 100644 --- a/toolkit/toolitem.py +++ b/toolkit/toolitem.py @@ -23,9 +23,7 @@ from gi.repository import GObject from sugar3.graphics import style -from toolkit.combobox import ComboBox - - +# FIXME: This class is not being used. class ToolWidget(Gtk.ToolItem): def __init__(self): @@ -23,7 +23,6 @@ from sugar3.graphics.combobox import ComboBox as _ComboBox from theme import * - class ComboBox(_ComboBox): def __init__(self): |