Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/toolbar.py
diff options
context:
space:
mode:
authorMarc Maurer <uwog@uwog.net>2007-08-29 11:09:33 (GMT)
committer Marc Maurer <uwog@uwog.net>2007-08-29 11:09:33 (GMT)
commitdf931076749d939f902365faf27a2209f5baa434 (patch)
treea83670433958b6d98000e486a65fb2e780c0ac6d /toolbar.py
parent2a803c040703dc3f5b2dba24546e3397d7aba466 (diff)
Set the activity as the parent for the object chooser
Diffstat (limited to 'toolbar.py')
-rw-r--r--toolbar.py5
1 files changed, 3 insertions, 2 deletions
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()