Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2004:
[Freeciv-Dev] (PR#9857) bugfix for single player gameload failure
Home

[Freeciv-Dev] (PR#9857) bugfix for single player gameload failure

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#9857) bugfix for single player gameload failure
From: "Mike Kaufman" <kaufman@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 28 Aug 2004 20:06:34 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=9857 >

In single-player mode if you attempt to load a game and it fails (you try
and load a non-savegame), then you can still click on the storesaved list
despite it being blank. It will start a game with no players and cause
trouble. This patch disallows that.

-mike

diff -Nur -Xcvs/diff_ignore snap/client/gui-gtk-2.0/connectdlg.c 
snap-list/client/gui-gtk-2.0/connectdlg.c
--- snap/client/gui-gtk-2.0/connectdlg.c        2004-08-28 10:38:51.000000000 
-0500
+++ snap-list/client/gui-gtk-2.0/connectdlg.c   2004-08-28 22:02:46.623900861 
-0500
@@ -365,6 +365,12 @@
 static gboolean saved_click_callback(GtkWidget *w, GdkEventButton *event, 
                                      gpointer data)
 {
+  GtkTreeIter iter;
+  
+  if (!gtk_tree_model_get_iter_first(GTK_TREE_MODEL(storesaved), &iter)) {
+    return FALSE;
+  }
+
   if (event->type == GDK_2BUTTON_PRESS) {
     really_close_connection_dialog();
     send_start_saved_game();

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#9857) bugfix for single player gameload failure, Mike Kaufman <=