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

> [dmarks - Mon Jun 30 13:09:18 2008]:
> 
> Tried the editor briefly and it seems to be working fine, except
> for the  fact that the editor toolbar items have no icons.

That's strange. :(

I assume since no assertions were triggered that the image
files are loading fine, just gtk has some problem putting
the image into the button.

It's just a guess, but try the attached patch to see if
it helps.
diff --git a/client/gui-gtk-2.0/editgui.c b/client/gui-gtk-2.0/editgui.c
index fd32851..b46d78e 100644
--- a/client/gui-gtk-2.0/editgui.c
+++ b/client/gui-gtk-2.0/editgui.c
@@ -359,7 +359,7 @@ static GtkWidget *create_editbar_radiobutton(struct editbar *eb,
   pixbuf = sprite_get_pixbuf(sprite);
   image = gtk_image_new_from_pixbuf(pixbuf);
 
-  gtk_button_set_image(GTK_BUTTON(button), image);
+  gtk_container_add(GTK_CONTAINER(button), image);
   gtk_toggle_button_set_mode(GTK_TOGGLE_BUTTON(button), FALSE);
   gtk_tooltips_set_tip(eb->tooltips, button,
                        editor_tool_get_tooltip(ett), "");
@@ -419,7 +419,7 @@ static struct editbar *editbar_create(void)
   button = gtk_toggle_button_new();
   pixbuf = sprite_get_pixbuf(sprites->erase);
   image = gtk_image_new_from_pixbuf(pixbuf);
-  gtk_button_set_image(GTK_BUTTON(button), image);
+  gtk_container_add(GTK_CONTAINER(button), image);
   gtk_tooltips_set_tip(eb->tooltips, button,
                        _("Set Erase Mode"), "");
   gtk_widget_set_size_request(button, BWIDTH, BHEIGHT);
@@ -487,7 +487,7 @@ static struct editbar *editbar_create(void)
   button = gtk_button_new();
   pixbuf = sprite_get_pixbuf(sprites->properties);
   image = gtk_image_new_from_pixbuf(pixbuf);
-  gtk_button_set_image(GTK_BUTTON(button), image);
+  gtk_container_add(GTK_CONTAINER(button), image);
   gtk_tooltips_set_tip(eb->tooltips, button,
                        _("Modify Player"), "");
   gtk_widget_set_size_request(button, BWIDTH, BHEIGHT);
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to