Handle the passing of the child of the toolitem to the WidgetInvoker in ToolInvoker, FrameWidgetInvoker

This commit is contained in:
Simon Schampijer 2007-09-18 14:24:16 +02:00
parent 0b9eb71046
commit 53f1265252
6 changed files with 8 additions and 4 deletions

1
NEWS
View File

@ -1,3 +1,4 @@
* Handle the passing of the child of the toolitem to the WidgetInvoker in ToolInvoker, FrameWidgetInvoker (erikos)
* #3293 Fix that several palettes are not hooked up to the same button (erikos) * #3293 Fix that several palettes are not hooked up to the same button (erikos)
* #3514 Remove invite when the activiy disappear from the mesh. (cassidy) * #3514 Remove invite when the activiy disappear from the mesh. (cassidy)
* #3003 Make image drags on the clipboard work consistently. (marco) * #3003 Make image drags on the clipboard work consistently. (marco)

View File

@ -33,7 +33,7 @@ def _get_screen_area():
class FrameWidgetInvoker(WidgetInvoker): class FrameWidgetInvoker(WidgetInvoker):
def __init__(self, widget): def __init__(self, widget):
WidgetInvoker.__init__(self, widget) WidgetInvoker.__init__(self, widget.child)
self._position_hint = self.ANCHORED self._position_hint = self.ANCHORED
self._screen_area = _get_screen_area() self._screen_area = _get_screen_area()

View File

@ -668,6 +668,9 @@ class CanvasInvoker(Invoker):
return hippo.get_canvas_for_item(self._item).get_toplevel() return hippo.get_canvas_for_item(self._item).get_toplevel()
class ToolInvoker(WidgetInvoker): class ToolInvoker(WidgetInvoker):
def __init__(self, widget):
WidgetInvoker.__init__(self, widget.child)
def _get_alignments(self): def _get_alignments(self):
parent = self._widget.get_parent() parent = self._widget.get_parent()
if parent is None: if parent is None:

View File

@ -44,7 +44,7 @@ class RadioToolButton(gtk.RadioToolButton):
if self._palette is not None: if self._palette is not None:
self._palette.props.invoker = None self._palette.props.invoker = None
self._palette = palette self._palette = palette
self._palette.props.invoker = ToolInvoker(self.child) self._palette.props.invoker = ToolInvoker(self)
def set_tooltip(self, text): def set_tooltip(self, text):
self.set_palette(Palette(text)) self.set_palette(Palette(text))

View File

@ -40,7 +40,7 @@ class ToggleToolButton(gtk.ToggleToolButton):
if self._palette is not None: if self._palette is not None:
self._palette.props.invoker = None self._palette.props.invoker = None
self._palette = palette self._palette = palette
self._palette.props.invoker = ToolInvoker(self.child) self._palette.props.invoker = ToolInvoker(self)
def set_tooltip(self, text): def set_tooltip(self, text):
self.set_palette(Palette(text)) self.set_palette(Palette(text))

View File

@ -44,7 +44,7 @@ class ToolButton(gtk.ToolButton):
if self._palette is not None: if self._palette is not None:
self._palette.props.invoker = None self._palette.props.invoker = None
self._palette = palette self._palette = palette
self._palette.props.invoker = ToolInvoker(self.child) self._palette.props.invoker = ToolInvoker(self)
def set_tooltip(self, text): def set_tooltip(self, text):
self.set_palette(Palette(text)) self.set_palette(Palette(text))