From 2d8dab099bd3d8130c9ac0a99b70dcc00315bcbf Mon Sep 17 00:00:00 2001 From: Serge Noiraud Date: Thu, 20 May 2010 20:58:44 +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: r15432 --- 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 97174bb75..15da94df7 100644 --- a/src/plugins/view/geoview.py +++ b/src/plugins/view/geoview.py @@ -1227,12 +1227,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 """ @@ -1268,12 +1272,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): """