Merge branch 'master' of git+ssh://dev.laptop.org/git/sugar
Conflicts: sugar/graphics/palette.py
This commit is contained in:
@@ -49,7 +49,7 @@ class Palette(gobject.GObject):
|
||||
|
||||
self._alignment = ALIGNMENT_AUTOMATIC
|
||||
|
||||
self._popup_anim = animator.Animator(0.6, 10)
|
||||
self._popup_anim = animator.Animator(0.3, 10)
|
||||
self._popup_anim.add(_PopupAnimation(self))
|
||||
self._popup_anim.start()
|
||||
|
||||
@@ -300,7 +300,9 @@ class CanvasInvoker(Invoker):
|
||||
|
||||
def get_rect(self):
|
||||
context = self._item.get_context()
|
||||
x, y = context.translate_to_screen(self._item)
|
||||
if context:
|
||||
x, y = context.translate_to_screen(self._item)
|
||||
|
||||
width, height = self._item.get_allocation()
|
||||
|
||||
return gtk.gdk.Rectangle(x, y, width, height)
|
||||
|
||||
@@ -25,6 +25,13 @@ _N_TABS = 8
|
||||
|
||||
class Toolbox(gtk.VBox):
|
||||
__gtype_name__ = 'SugarToolbox'
|
||||
|
||||
__gsignals__ = {
|
||||
'current-toolbar-changed': (gobject.SIGNAL_RUN_FIRST,
|
||||
gobject.TYPE_NONE,
|
||||
([int]))
|
||||
}
|
||||
|
||||
def __init__(self):
|
||||
gtk.VBox.__init__(self)
|
||||
|
||||
@@ -34,7 +41,12 @@ class Toolbox(gtk.VBox):
|
||||
self._notebook.set_show_tabs(False)
|
||||
self.pack_start(self._notebook)
|
||||
self._notebook.show()
|
||||
|
||||
|
||||
self._notebook.connect('notify::page', self._notify_page_cb)
|
||||
|
||||
def _notify_page_cb(self, notebook, pspec):
|
||||
self.emit('current-toolbar-changed', notebook.props.page)
|
||||
|
||||
def _toolbar_box_expose_cb(self, widget, event):
|
||||
widget.style.paint_flat_box(widget.window,
|
||||
gtk.STATE_NORMAL, gtk.SHADOW_NONE,
|
||||
|
||||
Reference in New Issue
Block a user