Author: cazfi
Date: Mon Apr 11 19:41:32 2016
New Revision: 32360

URL: http://svn.gna.org/viewcvs/freeciv?rev=32360&view=rev
Log:
Turned diplomacy dialog flags from GtkPixcomm to GtkImage in
gtk3- and gtk3x-clients.

See bug #24573

Modified:
    trunk/client/gui-gtk-3.0/diplodlg.c
    trunk/client/gui-gtk-3.x/diplodlg.c

Modified: trunk/client/gui-gtk-3.0/diplodlg.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.0/diplodlg.c?rev=32360&r1=32359&r2=32360&view=diff
==============================================================================
--- trunk/client/gui-gtk-3.0/diplodlg.c (original)
+++ trunk/client/gui-gtk-3.0/diplodlg.c Mon Apr 11 19:41:32 2016
@@ -1,4 +1,4 @@
-/********************************************************************** 
+/**********************************************************************
  Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -627,7 +627,8 @@
   GtkWidget *vbox, *hbox, *table, *mainbox;
   GtkWidget *label, *sw, *view, *image, *spin;
   GtkWidget *menubar, *menuitem, *menu, *notebook;
-  struct sprite *sprite;
+  struct sprite *flag_spr;
+  GdkPixbuf *pb;
   GtkListStore *store;
   GtkCellRenderer *rend;
   int i;
@@ -709,9 +710,11 @@
   gtk_container_add(GTK_CONTAINER(vbox), hbox);
 
   /* Our flag */
-  sprite = get_nation_flag_sprite(tileset, nation_of_player(plr0));
-  
-  image = gtk_pixcomm_new_from_sprite(sprite);
+  flag_spr = get_nation_flag_sprite(tileset, nation_of_player(plr0));
+
+  pb = sprite_get_pixbuf(flag_spr);
+  image = gtk_image_new_from_pixbuf(pb);
+  g_object_unref(pb);
   gtk_container_add(GTK_CONTAINER(hbox), image);
 
   /* Our name. */
@@ -794,9 +797,11 @@
   gtk_container_add(GTK_CONTAINER(vbox), hbox);
 
   /* Their flag */
-  sprite = get_nation_flag_sprite(tileset, nation_of_player(plr1));
-  
-  image = gtk_pixcomm_new_from_sprite(sprite);
+  flag_spr = get_nation_flag_sprite(tileset, nation_of_player(plr1));
+
+  pb = sprite_get_pixbuf(flag_spr);
+  image = gtk_image_new_from_pixbuf(pb);
+  g_object_unref(pb);
   gtk_container_add(GTK_CONTAINER(hbox), image);
 
   /* Their name. */

Modified: trunk/client/gui-gtk-3.x/diplodlg.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.x/diplodlg.c?rev=32360&r1=32359&r2=32360&view=diff
==============================================================================
--- trunk/client/gui-gtk-3.x/diplodlg.c (original)
+++ trunk/client/gui-gtk-3.x/diplodlg.c Mon Apr 11 19:41:32 2016
@@ -1,4 +1,4 @@
-/********************************************************************** 
+/**********************************************************************
  Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -627,7 +627,7 @@
   GtkWidget *vbox, *hbox, *table, *mainbox;
   GtkWidget *label, *sw, *view, *image, *spin;
   GtkWidget *menubar, *menuitem, *menu, *notebook;
-  struct sprite *sprite;
+  struct sprite *flag_spr;
   GtkListStore *store;
   GtkCellRenderer *rend;
   int i;
@@ -709,9 +709,9 @@
   gtk_container_add(GTK_CONTAINER(vbox), hbox);
 
   /* Our flag */
-  sprite = get_nation_flag_sprite(tileset, nation_of_player(plr0));
-  
-  image = gtk_pixcomm_new_from_sprite(sprite);
+  flag_spr = get_nation_flag_sprite(tileset, nation_of_player(plr0));
+
+  image = gtk_image_new_from_surface(flag_spr->surface);
   gtk_container_add(GTK_CONTAINER(hbox), image);
 
   /* Our name. */
@@ -791,9 +791,9 @@
   gtk_container_add(GTK_CONTAINER(vbox), hbox);
 
   /* Their flag */
-  sprite = get_nation_flag_sprite(tileset, nation_of_player(plr1));
-  
-  image = gtk_pixcomm_new_from_sprite(sprite);
+  flag_spr = get_nation_flag_sprite(tileset, nation_of_player(plr1));
+
+  image = gtk_image_new_from_surface(flag_spr->surface);
   gtk_container_add(GTK_CONTAINER(hbox), image);
 
   /* Their name. */


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to