Author: cazfi
Date: Tue Sep  8 21:30:34 2015
New Revision: 29823

URL: http://svn.gna.org/viewcvs/freeciv?rev=29823&view=rev
Log:
Destroy toplevel tabs on both gtk2- and gtk3-client. Free intro sprite in 
gtk3-client (not relevant in
gtk2-client implementation)

See bug #23854

Modified:
    branches/S2_6/client/gui-gtk-2.0/gui_main.c
    branches/S2_6/client/gui-gtk-3.0/gui_main.c
    branches/S2_6/client/gui-gtk-3.0/pages.c

Modified: branches/S2_6/client/gui-gtk-2.0/gui_main.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-2.0/gui_main.c?rev=29823&r1=29822&r2=29823&view=diff
==============================================================================
--- branches/S2_6/client/gui-gtk-2.0/gui_main.c (original)
+++ branches/S2_6/client/gui-gtk-2.0/gui_main.c Tue Sep  8 21:30:34 2015
@@ -1693,6 +1693,7 @@
   happiness_dialog_done();
   diplomacy_dialog_done();
   cma_fe_done();
+  gtk_widget_destroy(toplevel_tabs);
   tileset_free_tiles(tileset);
 }
 

Modified: branches/S2_6/client/gui-gtk-3.0/gui_main.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.0/gui_main.c?rev=29823&r1=29822&r2=29823&view=diff
==============================================================================
--- branches/S2_6/client/gui-gtk-3.0/gui_main.c (original)
+++ branches/S2_6/client/gui-gtk-3.0/gui_main.c Tue Sep  8 21:30:34 2015
@@ -1726,6 +1726,7 @@
   happiness_dialog_done();
   diplomacy_dialog_done();
   cma_fe_done();
+  gtk_widget_destroy(toplevel_tabs);
   tileset_free_tiles(tileset);
 }
 

Modified: branches/S2_6/client/gui-gtk-3.0/pages.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.0/pages.c?rev=29823&r1=29822&r2=29823&view=diff
==============================================================================
--- branches/S2_6/client/gui-gtk-3.0/pages.c    (original)
+++ branches/S2_6/client/gui-gtk-3.0/pages.c    Tue Sep  8 21:30:34 2015
@@ -215,6 +215,16 @@
 }
 
 /**************************************************************************
+  This is called when main page is getting destroyed.
+**************************************************************************/
+static void intro_free(GtkWidget *w, gpointer *data)
+{
+  struct sprite *intro = (struct sprite *)data;
+
+  free_sprite(intro);
+}
+
+/**************************************************************************
   create the main page.
 **************************************************************************/
 GtkWidget *create_main_page(void)
@@ -269,6 +279,8 @@
   gtk_widget_set_size_request(darea, width, height);
   g_signal_connect(darea, "draw",
                    G_CALLBACK(intro_expose), intro);
+  g_signal_connect(widget, "destroy",
+                   G_CALLBACK(intro_free), intro);
   gtk_container_add(GTK_CONTAINER(frame), darea);
 
 #if IS_BETA_VERSION
@@ -332,7 +344,6 @@
 
   return widget;
 }
-
 
 /****************************************************************************
                             GENERIC SAVE DIALOG


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

Reply via email to