Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2006:
[Freeciv-Dev] (PR#18936) ggz update patch
Home

[Freeciv-Dev] (PR#18936) ggz update patch

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#18936) ggz update patch
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 29 Jul 2006 00:01:58 -0700
Reply-to: bugs@xxxxxxxxxxx

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

This patch updates the gtk2 code for the latest ggz changes.

For 2.1 and dev branches.

-jason

Index: client/gui-gtk-2.0/gui_main.c
===================================================================
--- client/gui-gtk-2.0/gui_main.c       (revision 12170)
+++ client/gui-gtk-2.0/gui_main.c       (working copy)
@@ -1165,6 +1165,14 @@
 {
   ggz_begin();
 }
+
+/****************************************************************************
+  Callback function that's invoked when GGZ is exited.
+****************************************************************************/
+static void ggz_closed(void)
+{
+  set_client_page(PAGE_MAIN);
+}
 #endif
 
 /**************************************************************************
@@ -1176,8 +1184,8 @@
   /* Engine and version match what is provided in civclient.dsc.in and
    * civserver.dsc.in. */
   ggz_gtk_initialize(FALSE,
-                    ggz_connected, ggz_game_launched,
-                    "Freeciv", NETWORK_CAPSTRING);
+                    ggz_connected, ggz_game_launched, ggz_closed,
+                    "Freeciv", NETWORK_CAPSTRING, "Pubserver");
 #endif
 
   log_set_callback(log_callback_utf8);
Index: client/gui-gtk-2.0/pages.c
===================================================================
--- client/gui-gtk-2.0/pages.c  (revision 12170)
+++ client/gui-gtk-2.0/pages.c  (working copy)
@@ -67,7 +67,7 @@
 static GtkTreeSelection *load_selection, *scenario_selection,
   *nation_selection, *meta_selection, *lan_selection;
 
-static enum client_pages old_page;
+static enum client_pages old_page = -1;
 
 static void set_page_callback(GtkWidget *w, gpointer data);
 static void update_nation_page(struct packet_game_load *packet);
@@ -164,7 +164,7 @@
 ****************************************************************************/
 static void ggz_login(void)
 {
-  ggz_gtk_login_raise("Pubserver");
+  set_client_page(PAGE_GGZ);
 }
 #endif
 

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#18936) ggz update patch, Jason Short <=