From df931076749d939f902365faf27a2209f5baa434 Mon Sep 17 00:00:00 2001 From: Marc Maurer Date: Wed, 29 Aug 2007 11:09:33 +0000 Subject: Set the activity as the parent for the object chooser --- (limited to 'toolbar.py') diff --git a/toolbar.py b/toolbar.py index 74dafaf..756f69c 100644 --- a/toolbar.py +++ b/toolbar.py @@ -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() -- cgit v0.9.1