Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/jarabe/desktop/transitionbox.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/jarabe/desktop/transitionbox.py')
-rw-r--r--src/jarabe/desktop/transitionbox.py44
1 files changed, 6 insertions, 38 deletions
diff --git a/src/jarabe/desktop/transitionbox.py b/src/jarabe/desktop/transitionbox.py
index fd2112c..f490381 100644
--- a/src/jarabe/desktop/transitionbox.py
+++ b/src/jarabe/desktop/transitionbox.py
@@ -14,8 +14,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-import hippo
import gobject
+import gtk
from sugar.graphics import style
from sugar.graphics import animator
@@ -36,35 +36,7 @@ class _Animation(animator.Animation):
d = (self.end_size - self.start_size) * current
self._icon.props.size = int(self.start_size + d)
-
-class _Layout(gobject.GObject, hippo.CanvasLayout):
- __gtype_name__ = 'SugarTransitionBoxLayout'
-
- def __init__(self):
- gobject.GObject.__init__(self)
- self._box = None
-
- def do_set_box(self, box):
- self._box = box
-
- def do_get_height_request(self, for_width):
- return 0, 0
-
- def do_get_width_request(self):
- return 0, 0
-
- def do_allocate(self, x, y, width, height,
- req_width, req_height, origin_changed):
- for child in self._box.get_layout_children():
- min_width, child_width = child.get_width_request()
- min_height, child_height = child.get_height_request(child_width)
-
- child.allocate(x + (width - child_width) / 2,
- y + (height - child_height) / 2,
- child_width, child_height, origin_changed)
-
-
-class TransitionBox(hippo.Canvas):
+class TransitionBox(gtk.VBox):
__gtype_name__ = 'SugarTransitionBox'
__gsignals__ = {
@@ -72,18 +44,14 @@ class TransitionBox(hippo.Canvas):
}
def __init__(self):
- gobject.GObject.__init__(self)
-
- self._box = hippo.CanvasBox()
- self._box.props.background_color = style.COLOR_WHITE.get_int()
- self.set_root(self._box)
+ gtk.VBox.__init__(self)
- self._layout = _Layout()
- self._box.set_layout(self._layout)
+ # how do you send a message to a VBox about its background?
+ # self._box.props.background_color = style.COLOR_WHITE.get_int()
self._my_icon = BuddyIcon(buddy=get_owner_instance(),
size=style.XLARGE_ICON_SIZE)
- self._box.append(self._my_icon)
+ self.pack_start(self._my_icon)
self._animator = animator.Animator(0.3)
self._animator.connect('completed', self._animation_completed_cb)