Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2004:
[Freeciv-Dev] (PR#977) Extended connect dialog
Home

[Freeciv-Dev] (PR#977) Extended connect dialog

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: dspeyer@xxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#977) Extended connect dialog
From: "Guest" <rt-guest@xxxxxxxxxxx>
Date: Tue, 16 Mar 2004 05:33:59 -0800
Reply-to: rt@xxxxxxxxxxx

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

> [guest - Tue Mar 16 13:30:31 2004]:
> 
> Here is a patch to fix the LAN refresh problem described in this thread.
> 


diff -ruN -Xfreeciv/diff_ignore freeciv/client/gui-gtk/connectdlg.c
freeciv-fix/client/gui-gtk/connectdlg.c
--- freeciv/client/gui-gtk/connectdlg.c 2003-11-28 09:37:19.000000000 -0800
+++ freeciv-fix/client/gui-gtk/connectdlg.c     2004-03-16
14:13:28.000000000 -0800
@@ -240,7 +240,8 @@
   char buf[6][64];
   struct server_list *server_list = get_lan_server_list();
                                                                       
        
-  if (server_list != NULL) {
+  if (dialog != NULL && server_list != NULL
+      && server_list_size(server_list) != GTK_CLIST(lan_list)->rows) {
     gtk_clist_freeze(GTK_CLIST(lan_list));
     gtk_clist_clear(GTK_CLIST(lan_list));
                                                                       
        
diff -ruN -Xfreeciv/diff_ignore freeciv/client/gui-gtk-2.0/connectdlg.c
freeciv-fix/client/gui-gtk-2.0/connectdlg.c
--- freeciv/client/gui-gtk-2.0/connectdlg.c     2003-11-28
09:37:20.000000000 -0800
+++ freeciv-fix/client/gui-gtk-2.0/connectdlg.c 2004-03-16
14:13:24.000000000 -0800
@@ -220,7 +220,8 @@
   struct server_list *server_list = get_lan_server_list();
   gchar *row[6];
                                                                       
        
-  if (server_list != NULL) {
+  if (dialog != NULL && server_list != NULL &&
server_list_size(server_list)
+      != gtk_tree_model_iter_n_children(GTK_TREE_MODEL(storelan), NULL) ) {
     gtk_list_store_clear(storelan);
                                                                       
        
     server_list_iterate(*server_list, pserver) {
                                                                       
        



[Prev in Thread] Current Thread [Next in Thread]