<URL: http://bugs.freeciv.org/Ticket/Display.html?id=40343 >

> [book - Sun Jun 29 18:36:10 2008]:
> 
> > [EMAIL PROTECTED] - Sun Jun 29 16:57:24 2008]:
> > 
> > 2008/6/29 Daniel Markstedt:
> > >
> > > ld: Undefined symbols:
> > > _gtk_image_clear
> > 
> >  gtk_image_clear() seems to be gtk 2.8 feature. Either we have to
> > replace this call or to make 2.8 minimum gtk version.
> > 
> > > This is on MacOSX 10.3.9, with GTK+ 2.6.8
> 
> I'll look into finding a compatible replacement for this
> function.

Attached patch gets rid of the two calls to gtk_image_clear
by taking advantage of the fact that passing a NULL pixbuf
to gtk_image_set_from_pixbuf does the same thing.


----------------------------------------------------------------------
しやすい
diff --git a/client/gui-gtk-2.0/editgui.c b/client/gui-gtk-2.0/editgui.c
index fd32851..b96b3df 100644
--- a/client/gui-gtk-2.0/editgui.c
+++ b/client/gui-gtk-2.0/editgui.c
@@ -1464,22 +1464,18 @@ static void editinfobox_refresh(struct editinfobox *ei)
     pixbuf = get_brush_pixbuf();
   }
 
+  gtk_image_set_from_pixbuf(GTK_IMAGE(ei->mode_image), pixbuf);
   if (pixbuf) {
-    gtk_image_set_from_pixbuf(GTK_IMAGE(ei->mode_image), pixbuf);
     g_object_unref(pixbuf);
     pixbuf = NULL;
-  } else {
-    gtk_image_clear(GTK_IMAGE(ei->mode_image));
   }
 
   pixbuf = get_tool_value_pixbuf(ett, value);
 
+  gtk_image_set_from_pixbuf(GTK_IMAGE(ei->tool_image), pixbuf);
   if (pixbuf) {
-    gtk_image_set_from_pixbuf(GTK_IMAGE(ei->tool_image), pixbuf);
     g_object_unref(pixbuf);
     pixbuf = NULL;
-  } else {
-    gtk_image_clear(GTK_IMAGE(ei->tool_image));
   }
 
   my_snprintf(buf, sizeof(buf), "<span weight=\"bold\">%s</span>",
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to