From 9a6a01fabbe4dde1a8f77bff85b8865f0171ec1b Mon Sep 17 00:00:00 2001 From: Serge Noiraud Date: Thu, 20 May 2010 21:00:47 +0000 Subject: [PATCH] GeoView : bug #3973 ignore buttons_have_icons which avoid set_image() to change the image of a button. gnome => 2.26 now set this to false svn: r15433 --- src/plugins/view/geoview.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/plugins/view/geoview.py b/src/plugins/view/geoview.py index 420d6cede..28cd7a286 100644 --- a/src/plugins/view/geoview.py +++ b/src/plugins/view/geoview.py @@ -1527,12 +1527,16 @@ class GeoView(HtmlView): """ Change the lock/unlock icon depending on the button state. """ + child = self.savezoom.child + if child: + self.savezoom.remove(child) image = gtk.Image() if config.get('geoview.lock'): image.set_from_stock('geo-fixed-zoom', gtk.ICON_SIZE_MENU) else: image.set_from_stock('geo-free-zoom', gtk.ICON_SIZE_MENU) - self.savezoom.set_image(image) + image.show() + self.savezoom.add(image) def _save_zoom(self, button): # pylint: disable-msg=W0613 """ @@ -1568,12 +1572,16 @@ class GeoView(HtmlView): """ Change the provider icon depending on the button state. """ + child = self.provider.child + if child: + self.provider.remove(child) image = gtk.Image() if self._config.get('preferences.alternate-provider'): image.set_from_stock('gramps-geo-altmap', gtk.ICON_SIZE_MENU) else: image.set_from_stock('gramps-geo-mainmap', gtk.ICON_SIZE_MENU) - self.provider.set_image(image) + image.show() + self.provider.add(image) def _createpageplaceswithoutcoord(self): """