diff options
author | Marc Maurer <uwog@uwog.net> | 2007-08-29 11:09:33 (GMT) |
---|---|---|
committer | Marc Maurer <uwog@uwog.net> | 2007-08-29 11:09:33 (GMT) |
commit | df931076749d939f902365faf27a2209f5baa434 (patch) | |
tree | a83670433958b6d98000e486a65fb2e780c0ac6d | |
parent | 2a803c040703dc3f5b2dba24546e3397d7aba466 (diff) |
Set the activity as the parent for the object chooser
-rw-r--r-- | AbiWordActivity.py | 2 | ||||
-rw-r--r-- | toolbar.py | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/AbiWordActivity.py b/AbiWordActivity.py index b75f99e..9130175 100644 --- a/AbiWordActivity.py +++ b/AbiWordActivity.py @@ -76,7 +76,7 @@ class AbiWordActivity (Activity): toolbox.add_toolbar(_('Text'), text_toolbar) text_toolbar.show() - image_toolbar = ImageToolbar(toolbox, self.abiword_canvas) + image_toolbar = ImageToolbar(toolbox, self.abiword_canvas, self) toolbox.add_toolbar(_('Image'), image_toolbar) image_toolbar.show() @@ -222,11 +222,12 @@ class TextToolbar(gtk.Toolbar): self._abiword_canvas.grab_focus() # hack: bad toolbox, bad! class ImageToolbar(gtk.Toolbar): - def __init__(self, toolbox, abiword_canvas): + def __init__(self, toolbox, abiword_canvas, parent): gtk.Toolbar.__init__(self) self._toolbox = toolbox self._abiword_canvas = abiword_canvas + self._parent = parent self._image = ToolButton('insert-image') self._image_id = self._image.connect('clicked', self._image_cb) @@ -236,7 +237,7 @@ class ImageToolbar(gtk.Toolbar): self._abiword_canvas.connect('image-selected', self._image_selected_cb) def _image_cb(self, button): - chooser = ObjectChooser(_('Choose image'), None, + chooser = ObjectChooser(_('Choose image'), self._parent, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT) try: result = chooser.run() |