[Freeciv-commits] r27959 - in /branches/S2_6/client: gui-gtk-2.0/citydlg.c gui-gtk-3.0/citydlg.c

2015-02-03 Thread cazfi74
Author: cazfi
Date: Wed Feb  4 04:03:12 2015
New Revision: 27959

URL: http://svn.gna.org/viewcvs/freeciv?rev=27959view=rev
Log:
Removed unused change_shell field from gtk-clients' citydlg.

See patch #5775

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

Modified: branches/S2_6/client/gui-gtk-2.0/citydlg.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-2.0/citydlg.c?rev=27959r1=27958r2=27959view=diff
==
--- branches/S2_6/client/gui-gtk-2.0/citydlg.c  (original)
+++ branches/S2_6/client/gui-gtk-2.0/citydlg.c  Wed Feb  4 04:03:12 2015
@@ -181,7 +181,6 @@
   } misc;
 
   GtkWidget *buy_shell, *sell_shell;
-  GtkWidget *change_shell;
   GtkTreeSelection *change_selection;
   GtkWidget *rename_shell, *rename_input;
 
@@ -1279,7 +1278,6 @@
 
   pdialog = fc_malloc(sizeof(struct city_dialog));
   pdialog-pcity = pcity;
-  pdialog-change_shell = NULL;
   pdialog-buy_shell = NULL;
   pdialog-sell_shell = NULL;
   pdialog-rename_shell = NULL;
@@ -2910,12 +2908,15 @@
   unit_node_vector_free(pdialog-overview.supported_units);
   unit_node_vector_free(pdialog-overview.present_units);
 
-  if (pdialog-buy_shell)
+  if (pdialog-buy_shell) {
 gtk_widget_destroy(pdialog-buy_shell);
-  if (pdialog-sell_shell)
+  }
+  if (pdialog-sell_shell) {
 gtk_widget_destroy(pdialog-sell_shell);
-  if (pdialog-rename_shell)
+  }
+  if (pdialog-rename_shell) {
 gtk_widget_destroy(pdialog-rename_shell);
+  }
 
   g_object_unref(pdialog-map_canvas_store);
   if (pdialog-map_pixbuf_unscaled) {

Modified: branches/S2_6/client/gui-gtk-3.0/citydlg.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.0/citydlg.c?rev=27959r1=27958r2=27959view=diff
==
--- branches/S2_6/client/gui-gtk-3.0/citydlg.c  (original)
+++ branches/S2_6/client/gui-gtk-3.0/citydlg.c  Wed Feb  4 04:03:12 2015
@@ -182,7 +182,6 @@
   } misc;
 
   GtkWidget *buy_shell, *sell_shell;
-  GtkWidget *change_shell;
   GtkTreeSelection *change_selection;
   GtkWidget *rename_shell, *rename_input;
 
@@ -1344,7 +1343,6 @@
 
   pdialog = fc_malloc(sizeof(struct city_dialog));
   pdialog-pcity = pcity;
-  pdialog-change_shell = NULL;
   pdialog-buy_shell = NULL;
   pdialog-sell_shell = NULL;
   pdialog-rename_shell = NULL;
@@ -3081,12 +3079,15 @@
   unit_node_vector_free(pdialog-overview.supported_units);
   unit_node_vector_free(pdialog-overview.present_units);
 
-  if (pdialog-buy_shell)
+  if (pdialog-buy_shell) {
 gtk_widget_destroy(pdialog-buy_shell);
-  if (pdialog-sell_shell)
+  }
+  if (pdialog-sell_shell) {
 gtk_widget_destroy(pdialog-sell_shell);
-  if (pdialog-rename_shell)
+  }
+  if (pdialog-rename_shell) {
 gtk_widget_destroy(pdialog-rename_shell);
+  }
 
   cairo_surface_destroy(pdialog-map_canvas_store_unscaled);
 


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


[Freeciv-commits] r27958 - in /trunk/client: gui-gtk-2.0/citydlg.c gui-gtk-3.0/citydlg.c

2015-02-03 Thread cazfi74
Author: cazfi
Date: Wed Feb  4 04:03:05 2015
New Revision: 27958

URL: http://svn.gna.org/viewcvs/freeciv?rev=27958view=rev
Log:
Removed unused change_shell field from gtk-clients' citydlg.

See patch #5775

Modified:
trunk/client/gui-gtk-2.0/citydlg.c
trunk/client/gui-gtk-3.0/citydlg.c

Modified: trunk/client/gui-gtk-2.0/citydlg.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-2.0/citydlg.c?rev=27958r1=27957r2=27958view=diff
==
--- trunk/client/gui-gtk-2.0/citydlg.c  (original)
+++ trunk/client/gui-gtk-2.0/citydlg.c  Wed Feb  4 04:03:05 2015
@@ -181,7 +181,6 @@
   } misc;
 
   GtkWidget *buy_shell, *sell_shell;
-  GtkWidget *change_shell;
   GtkTreeSelection *change_selection;
   GtkWidget *rename_shell, *rename_input;
 
@@ -1279,7 +1278,6 @@
 
   pdialog = fc_malloc(sizeof(struct city_dialog));
   pdialog-pcity = pcity;
-  pdialog-change_shell = NULL;
   pdialog-buy_shell = NULL;
   pdialog-sell_shell = NULL;
   pdialog-rename_shell = NULL;
@@ -2910,12 +2908,15 @@
   unit_node_vector_free(pdialog-overview.supported_units);
   unit_node_vector_free(pdialog-overview.present_units);
 
-  if (pdialog-buy_shell)
+  if (pdialog-buy_shell) {
 gtk_widget_destroy(pdialog-buy_shell);
-  if (pdialog-sell_shell)
+  }
+  if (pdialog-sell_shell) {
 gtk_widget_destroy(pdialog-sell_shell);
-  if (pdialog-rename_shell)
+  }
+  if (pdialog-rename_shell) {
 gtk_widget_destroy(pdialog-rename_shell);
+  }
 
   g_object_unref(pdialog-map_canvas_store);
   if (pdialog-map_pixbuf_unscaled) {

Modified: trunk/client/gui-gtk-3.0/citydlg.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.0/citydlg.c?rev=27958r1=27957r2=27958view=diff
==
--- trunk/client/gui-gtk-3.0/citydlg.c  (original)
+++ trunk/client/gui-gtk-3.0/citydlg.c  Wed Feb  4 04:03:05 2015
@@ -182,7 +182,6 @@
   } misc;
 
   GtkWidget *buy_shell, *sell_shell;
-  GtkWidget *change_shell;
   GtkTreeSelection *change_selection;
   GtkWidget *rename_shell, *rename_input;
 
@@ -1344,7 +1343,6 @@
 
   pdialog = fc_malloc(sizeof(struct city_dialog));
   pdialog-pcity = pcity;
-  pdialog-change_shell = NULL;
   pdialog-buy_shell = NULL;
   pdialog-sell_shell = NULL;
   pdialog-rename_shell = NULL;
@@ -3081,12 +3079,15 @@
   unit_node_vector_free(pdialog-overview.supported_units);
   unit_node_vector_free(pdialog-overview.present_units);
 
-  if (pdialog-buy_shell)
+  if (pdialog-buy_shell) {
 gtk_widget_destroy(pdialog-buy_shell);
-  if (pdialog-sell_shell)
+  }
+  if (pdialog-sell_shell) {
 gtk_widget_destroy(pdialog-sell_shell);
-  if (pdialog-rename_shell)
+  }
+  if (pdialog-rename_shell) {
 gtk_widget_destroy(pdialog-rename_shell);
+  }
 
   cairo_surface_destroy(pdialog-map_canvas_store_unscaled);
 


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


[Freeciv-commits] r27961 - in /branches/S2_4/client: gui-gtk-2.0/citydlg.c gui-gtk-3.0/citydlg.c

2015-02-03 Thread cazfi74
Author: cazfi
Date: Wed Feb  4 04:03:24 2015
New Revision: 27961

URL: http://svn.gna.org/viewcvs/freeciv?rev=27961view=rev
Log:
Removed unused change_shell field from gtk-clients' citydlg.

See patch #5775

Modified:
branches/S2_4/client/gui-gtk-2.0/citydlg.c
branches/S2_4/client/gui-gtk-3.0/citydlg.c

Modified: branches/S2_4/client/gui-gtk-2.0/citydlg.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_4/client/gui-gtk-2.0/citydlg.c?rev=27961r1=27960r2=27961view=diff
==
--- branches/S2_4/client/gui-gtk-2.0/citydlg.c  (original)
+++ branches/S2_4/client/gui-gtk-2.0/citydlg.c  Wed Feb  4 04:03:24 2015
@@ -181,7 +181,6 @@
   } misc;
 
   GtkWidget *buy_shell, *sell_shell;
-  GtkWidget *change_shell;
   GtkTreeSelection *change_selection;
   GtkWidget *rename_shell, *rename_input;
 
@@ -1275,7 +1274,6 @@
 
   pdialog = fc_malloc(sizeof(struct city_dialog));
   pdialog-pcity = pcity;
-  pdialog-change_shell = NULL;
   pdialog-buy_shell = NULL;
   pdialog-sell_shell = NULL;
   pdialog-rename_shell = NULL;
@@ -2885,12 +2883,15 @@
   unit_node_vector_free(pdialog-overview.supported_units);
   unit_node_vector_free(pdialog-overview.present_units);
 
-  if (pdialog-buy_shell)
+  if (pdialog-buy_shell) {
 gtk_widget_destroy(pdialog-buy_shell);
-  if (pdialog-sell_shell)
+  }
+  if (pdialog-sell_shell) {
 gtk_widget_destroy(pdialog-sell_shell);
-  if (pdialog-rename_shell)
+  }
+  if (pdialog-rename_shell) {
 gtk_widget_destroy(pdialog-rename_shell);
+  }
 
   g_object_unref(pdialog-map_canvas_store);
   if (pdialog-map_pixbuf_unscaled) {

Modified: branches/S2_4/client/gui-gtk-3.0/citydlg.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_4/client/gui-gtk-3.0/citydlg.c?rev=27961r1=27960r2=27961view=diff
==
--- branches/S2_4/client/gui-gtk-3.0/citydlg.c  (original)
+++ branches/S2_4/client/gui-gtk-3.0/citydlg.c  Wed Feb  4 04:03:24 2015
@@ -180,7 +180,6 @@
   } misc;
 
   GtkWidget *buy_shell, *sell_shell;
-  GtkWidget *change_shell;
   GtkTreeSelection *change_selection;
   GtkWidget *rename_shell, *rename_input;
 
@@ -1330,7 +1329,6 @@
 
   pdialog = fc_malloc(sizeof(struct city_dialog));
   pdialog-pcity = pcity;
-  pdialog-change_shell = NULL;
   pdialog-buy_shell = NULL;
   pdialog-sell_shell = NULL;
   pdialog-rename_shell = NULL;
@@ -2936,12 +2934,15 @@
   unit_node_vector_free(pdialog-overview.supported_units);
   unit_node_vector_free(pdialog-overview.present_units);
 
-  if (pdialog-buy_shell)
+  if (pdialog-buy_shell) {
 gtk_widget_destroy(pdialog-buy_shell);
-  if (pdialog-sell_shell)
+  }
+  if (pdialog-sell_shell) {
 gtk_widget_destroy(pdialog-sell_shell);
-  if (pdialog-rename_shell)
+  }
+  if (pdialog-rename_shell) {
 gtk_widget_destroy(pdialog-rename_shell);
+  }
 
   cairo_surface_destroy(pdialog-map_canvas_store_unscaled);
 


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


[Freeciv-commits] r27960 - in /branches/S2_5/client: gui-gtk-2.0/citydlg.c gui-gtk-3.0/citydlg.c

2015-02-03 Thread cazfi74
Author: cazfi
Date: Wed Feb  4 04:03:18 2015
New Revision: 27960

URL: http://svn.gna.org/viewcvs/freeciv?rev=27960view=rev
Log:
Removed unused change_shell field from gtk-clients' citydlg.

See patch #5775

Modified:
branches/S2_5/client/gui-gtk-2.0/citydlg.c
branches/S2_5/client/gui-gtk-3.0/citydlg.c

Modified: branches/S2_5/client/gui-gtk-2.0/citydlg.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-gtk-2.0/citydlg.c?rev=27960r1=27959r2=27960view=diff
==
--- branches/S2_5/client/gui-gtk-2.0/citydlg.c  (original)
+++ branches/S2_5/client/gui-gtk-2.0/citydlg.c  Wed Feb  4 04:03:18 2015
@@ -181,7 +181,6 @@
   } misc;
 
   GtkWidget *buy_shell, *sell_shell;
-  GtkWidget *change_shell;
   GtkTreeSelection *change_selection;
   GtkWidget *rename_shell, *rename_input;
 
@@ -1275,7 +1274,6 @@
 
   pdialog = fc_malloc(sizeof(struct city_dialog));
   pdialog-pcity = pcity;
-  pdialog-change_shell = NULL;
   pdialog-buy_shell = NULL;
   pdialog-sell_shell = NULL;
   pdialog-rename_shell = NULL;
@@ -2903,12 +2901,15 @@
   unit_node_vector_free(pdialog-overview.supported_units);
   unit_node_vector_free(pdialog-overview.present_units);
 
-  if (pdialog-buy_shell)
+  if (pdialog-buy_shell) {
 gtk_widget_destroy(pdialog-buy_shell);
-  if (pdialog-sell_shell)
+  }
+  if (pdialog-sell_shell) {
 gtk_widget_destroy(pdialog-sell_shell);
-  if (pdialog-rename_shell)
+  }
+  if (pdialog-rename_shell) {
 gtk_widget_destroy(pdialog-rename_shell);
+  }
 
   g_object_unref(pdialog-map_canvas_store);
   if (pdialog-map_pixbuf_unscaled) {

Modified: branches/S2_5/client/gui-gtk-3.0/citydlg.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-gtk-3.0/citydlg.c?rev=27960r1=27959r2=27960view=diff
==
--- branches/S2_5/client/gui-gtk-3.0/citydlg.c  (original)
+++ branches/S2_5/client/gui-gtk-3.0/citydlg.c  Wed Feb  4 04:03:18 2015
@@ -180,7 +180,6 @@
   } misc;
 
   GtkWidget *buy_shell, *sell_shell;
-  GtkWidget *change_shell;
   GtkTreeSelection *change_selection;
   GtkWidget *rename_shell, *rename_input;
 
@@ -1330,7 +1329,6 @@
 
   pdialog = fc_malloc(sizeof(struct city_dialog));
   pdialog-pcity = pcity;
-  pdialog-change_shell = NULL;
   pdialog-buy_shell = NULL;
   pdialog-sell_shell = NULL;
   pdialog-rename_shell = NULL;
@@ -2954,12 +2952,15 @@
   unit_node_vector_free(pdialog-overview.supported_units);
   unit_node_vector_free(pdialog-overview.present_units);
 
-  if (pdialog-buy_shell)
+  if (pdialog-buy_shell) {
 gtk_widget_destroy(pdialog-buy_shell);
-  if (pdialog-sell_shell)
+  }
+  if (pdialog-sell_shell) {
 gtk_widget_destroy(pdialog-sell_shell);
-  if (pdialog-rename_shell)
+  }
+  if (pdialog-rename_shell) {
 gtk_widget_destroy(pdialog-rename_shell);
+  }
 
   cairo_surface_destroy(pdialog-map_canvas_store_unscaled);
 


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


[Freeciv-commits] r27956 - /branches/S2_5/client/gui-gtk-3.0/gotodlg.c

2015-02-03 Thread cazfi74
Author: cazfi
Date: Wed Feb  4 04:00:25 2015
New Revision: 27956

URL: http://svn.gna.org/viewcvs/freeciv?rev=27956view=rev
Log:
Prevent gtk3-client Goto dialog from focusing in all cities in turn when 
refreshing the list of cities.

Reported by Jacob Nevins jtn

See bug #20624

Modified:
branches/S2_5/client/gui-gtk-3.0/gotodlg.c

Modified: branches/S2_5/client/gui-gtk-3.0/gotodlg.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-gtk-3.0/gotodlg.c?rev=27956r1=27955r2=27956view=diff
==
--- branches/S2_5/client/gui-gtk-3.0/gotodlg.c  (original)
+++ branches/S2_5/client/gui-gtk-3.0/gotodlg.c  Wed Feb  4 04:00:25 2015
@@ -60,6 +60,7 @@
 static GtkListStore *store;
 static GtkTreeSelection *selection;
 struct tile *original_tile;
+static bool gotodlg_updating = FALSE;
 
 static void update_goto_dialog(GtkToggleButton *button);
 static void update_source_label(void);
@@ -423,12 +424,14 @@
 **/
 static void update_goto_dialog(GtkToggleButton *button)
 {
-  gtk_list_store_clear(store);
-
   if (!client_has_player()) {
 /* Case global observer. */
 return;
   }
+
+  gotodlg_updating = TRUE;
+
+  gtk_list_store_clear(store);
 
   if (gtk_toggle_button_get_active(button)) {
 players_iterate(pplayer) {
@@ -437,6 +440,9 @@
   } else {
 list_store_append_player_cities(store, client_player());
   }
+
+  gotodlg_updating = FALSE;
+
   refresh_airlift_column();
 }
 
@@ -498,7 +504,14 @@
 static void goto_selection_callback(GtkTreeSelection *selection,
 gpointer data)
 {
-  struct city *pdestcity = get_selected_city();
+  struct city *pdestcity;
+
+  if (gotodlg_updating) {
+return;
+  }
+
+  pdestcity = get_selected_city();
+
   if (NULL != pdestcity) {
 center_tile_mapcanvas(city_tile(pdestcity));
   }


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


[Freeciv-commits] r27955 - /branches/S2_6/client/gui-gtk-3.0/gotodlg.c

2015-02-03 Thread cazfi74
Author: cazfi
Date: Wed Feb  4 04:00:12 2015
New Revision: 27955

URL: http://svn.gna.org/viewcvs/freeciv?rev=27955view=rev
Log:
Prevent gtk3-client Goto dialog from focusing in all cities in turn when 
refreshing the list of cities.

Reported by Jacob Nevins jtn

See bug #20624

Modified:
branches/S2_6/client/gui-gtk-3.0/gotodlg.c

Modified: branches/S2_6/client/gui-gtk-3.0/gotodlg.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.0/gotodlg.c?rev=27955r1=27954r2=27955view=diff
==
--- branches/S2_6/client/gui-gtk-3.0/gotodlg.c  (original)
+++ branches/S2_6/client/gui-gtk-3.0/gotodlg.c  Wed Feb  4 04:00:12 2015
@@ -60,6 +60,7 @@
 static GtkListStore *store;
 static GtkTreeSelection *selection;
 struct tile *original_tile;
+static bool gotodlg_updating = FALSE;
 
 static void update_goto_dialog(GtkToggleButton *button);
 static void update_source_label(void);
@@ -423,12 +424,14 @@
 **/
 static void update_goto_dialog(GtkToggleButton *button)
 {
-  gtk_list_store_clear(store);
-
   if (!client_has_player()) {
 /* Case global observer. */
 return;
   }
+
+  gotodlg_updating = TRUE;
+
+  gtk_list_store_clear(store);
 
   if (gtk_toggle_button_get_active(button)) {
 players_iterate(pplayer) {
@@ -437,6 +440,9 @@
   } else {
 list_store_append_player_cities(store, client_player());
   }
+
+  gotodlg_updating = FALSE;
+
   refresh_airlift_column();
 }
 
@@ -498,7 +504,14 @@
 static void goto_selection_callback(GtkTreeSelection *selection,
 gpointer data)
 {
-  struct city *pdestcity = get_selected_city();
+  struct city *pdestcity;
+
+  if (gotodlg_updating) {
+return;
+  }
+
+  pdestcity = get_selected_city();
+
   if (NULL != pdestcity) {
 center_tile_mapcanvas(city_tile(pdestcity));
   }


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


[Freeciv-commits] r27954 - /trunk/client/gui-gtk-3.0/gotodlg.c

2015-02-03 Thread cazfi74
Author: cazfi
Date: Wed Feb  4 04:00:06 2015
New Revision: 27954

URL: http://svn.gna.org/viewcvs/freeciv?rev=27954view=rev
Log:
Prevent gtk3-client Goto dialog from focusing in all cities in turn when 
refreshing the list of cities.

Reported by Jacob Nevins jtn

See bug #20624

Modified:
trunk/client/gui-gtk-3.0/gotodlg.c

Modified: trunk/client/gui-gtk-3.0/gotodlg.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.0/gotodlg.c?rev=27954r1=27953r2=27954view=diff
==
--- trunk/client/gui-gtk-3.0/gotodlg.c  (original)
+++ trunk/client/gui-gtk-3.0/gotodlg.c  Wed Feb  4 04:00:06 2015
@@ -60,6 +60,7 @@
 static GtkListStore *store;
 static GtkTreeSelection *selection;
 struct tile *original_tile;
+static bool gotodlg_updating = FALSE;
 
 static void update_goto_dialog(GtkToggleButton *button);
 static void update_source_label(void);
@@ -423,12 +424,14 @@
 **/
 static void update_goto_dialog(GtkToggleButton *button)
 {
-  gtk_list_store_clear(store);
-
   if (!client_has_player()) {
 /* Case global observer. */
 return;
   }
+
+  gotodlg_updating = TRUE;
+
+  gtk_list_store_clear(store);
 
   if (gtk_toggle_button_get_active(button)) {
 players_iterate(pplayer) {
@@ -437,6 +440,9 @@
   } else {
 list_store_append_player_cities(store, client_player());
   }
+
+  gotodlg_updating = FALSE;
+
   refresh_airlift_column();
 }
 
@@ -498,7 +504,14 @@
 static void goto_selection_callback(GtkTreeSelection *selection,
 gpointer data)
 {
-  struct city *pdestcity = get_selected_city();
+  struct city *pdestcity;
+
+  if (gotodlg_updating) {
+return;
+  }
+
+  pdestcity = get_selected_city();
+
   if (NULL != pdestcity) {
 center_tile_mapcanvas(city_tile(pdestcity));
   }


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


[Freeciv-commits] r27957 - /branches/S2_4/client/gui-gtk-3.0/gotodlg.c

2015-02-03 Thread cazfi74
Author: cazfi
Date: Wed Feb  4 04:00:32 2015
New Revision: 27957

URL: http://svn.gna.org/viewcvs/freeciv?rev=27957view=rev
Log:
Prevent gtk3-client Goto dialog from focusing in all cities in turn when 
refreshing the list of cities.

Reported by Jacob Nevins jtn

See bug #20624

Modified:
branches/S2_4/client/gui-gtk-3.0/gotodlg.c

Modified: branches/S2_4/client/gui-gtk-3.0/gotodlg.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_4/client/gui-gtk-3.0/gotodlg.c?rev=27957r1=27956r2=27957view=diff
==
--- branches/S2_4/client/gui-gtk-3.0/gotodlg.c  (original)
+++ branches/S2_4/client/gui-gtk-3.0/gotodlg.c  Wed Feb  4 04:00:32 2015
@@ -60,6 +60,7 @@
 static GtkListStore *store;
 static GtkTreeSelection *selection;
 struct tile *original_tile;
+static bool gotodlg_updating = FALSE;
 
 static void update_goto_dialog(GtkToggleButton *button);
 static void update_source_label(void);
@@ -423,12 +424,14 @@
 **/
 static void update_goto_dialog(GtkToggleButton *button)
 {
-  gtk_list_store_clear(store);
-
   if (!client_has_player()) {
 /* Case global observer. */
 return;
   }
+
+  gotodlg_updating = TRUE;
+
+  gtk_list_store_clear(store);
 
   if (gtk_toggle_button_get_active(button)) {
 players_iterate(pplayer) {
@@ -437,6 +440,9 @@
   } else {
 list_store_append_player_cities(store, client_player());
   }
+
+  gotodlg_updating = FALSE;
+
   refresh_airlift_column();
 }
 
@@ -498,7 +504,14 @@
 static void goto_selection_callback(GtkTreeSelection *selection,
 gpointer data)
 {
-  struct city *pdestcity = get_selected_city();
+  struct city *pdestcity;
+
+  if (gotodlg_updating) {
+return;
+  }
+
+  pdestcity = get_selected_city();
+
   if (NULL != pdestcity) {
 center_tile_mapcanvas(city_tile(pdestcity));
   }


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


[Freeciv-commits] r27965 - /trunk/server/savegame3.c

2015-02-03 Thread cazfi74
Author: cazfi
Date: Wed Feb  4 06:20:11 2015
New Revision: 27965

URL: http://svn.gna.org/viewcvs/freeciv?rev=27965view=rev
Log:
When loading version3 savegame, load [scenario] -section before [savegame] 
one.

See patch #5772

Modified:
trunk/server/savegame3.c

Modified: trunk/server/savegame3.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/savegame3.c?rev=27965r1=27964r2=27965view=diff
==
--- trunk/server/savegame3.c(original)
+++ trunk/server/savegame3.cWed Feb  4 06:20:11 2015
@@ -539,6 +539,8 @@
   /* Load the savegame data. */
   /* [compat] */
   sg_load_compat(loading);
+  /* [scenario] */
+  sg_load_scenario(loading);
   /* [savefile] */
   sg_load_savefile(loading);
   /* [game] */
@@ -547,8 +549,6 @@
   sg_load_random(loading);
   /* [script] */
   sg_load_script(loading);
-  /* [scenario] */
-  sg_load_scenario(loading);
   /* [settings] */
   sg_load_settings(loading);
   /* [ruldata] */


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


[Freeciv-commits] r27962 - /trunk/client/helpdata.c

2015-02-03 Thread cazfi74
Author: cazfi
Date: Wed Feb  4 04:37:13 2015
New Revision: 27962

URL: http://svn.gna.org/viewcvs/freeciv?rev=27962view=rev
Log:
Check that relevant _Possible effect can ever be enabled in the ruleset 
before claiming
in the help that Settler can do some activity.

See patch #5774

Modified:
trunk/client/helpdata.c

Modified: trunk/client/helpdata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/helpdata.c?rev=27962r1=27961r2=27962view=diff
==
--- trunk/client/helpdata.c (original)
+++ trunk/client/helpdata.c Wed Feb  4 04:37:13 2015
@@ -3669,8 +3669,21 @@
   if (utype_has_flag(utype, UTYF_SETTLERS)) {
 /* Roads, rail, mines, irrigation. */
 CATLSTR(buf, bufsz, _(* Can build roads and railroads.\n));
-CATLSTR(buf, bufsz, _(* Can build mines on tiles.\n));
-CATLSTR(buf, bufsz, _(* Can build irrigation and farmland on tiles.\n));
+
+/* TODO: Check also that specific unit fulfills the requirements of the 
effects */
+if (effect_cumulative_max(EFT_MINING_POSSIBLE)  0) {
+  CATLSTR(buf, bufsz, _(* Can build mines on tiles.\n));
+}
+if (effect_cumulative_max(EFT_MINING_TF_POSSIBLE)  0) {
+  CATLSTR(buf, bufsz, _(* Can mine terrain to another.\n));
+}
+
+if (effect_cumulative_max(EFT_IRRIG_POSSIBLE)  0) {
+  CATLSTR(buf, bufsz, _(* Can build irrigation and farmland on 
tiles.\n));
+}
+if (effect_cumulative_max(EFT_IRRIG_TF_POSSIBLE)  0) {
+  CATLSTR(buf, bufsz, _(* Can irrigate terrain to another.\n));
+}
 
 /* Pollution, fallout. */
 CATLSTR(buf, bufsz, _(* Can clean pollution from tiles.\n));


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


[Freeciv-commits] r27953 - /branches/S2_4/server/advisors/advbuilding.c

2015-02-03 Thread cazfi74
Author: cazfi
Date: Wed Feb  4 03:56:49 2015
New Revision: 27953

URL: http://svn.gna.org/viewcvs/freeciv?rev=27953view=rev
Log:
Fixed a illegal array index usage in building advisor when handling an city on 
ocean.

See bug #23227

Modified:
branches/S2_4/server/advisors/advbuilding.c

Modified: branches/S2_4/server/advisors/advbuilding.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_4/server/advisors/advbuilding.c?rev=27953r1=27952r2=27953view=diff
==
--- branches/S2_4/server/advisors/advbuilding.c (original)
+++ branches/S2_4/server/advisors/advbuilding.c Wed Feb  4 03:56:49 2015
@@ -219,16 +219,18 @@
* continent. */
   if (first_role_unit_for_player(pplayer, F_HELP_WONDER)) {
 value += city_data-downtown;
-value += adv-stats.cities[place] / 8;
-  }
-  if (adv-threats.continent[place]  0) {
+if (place = 0) {
+  value += adv-stats.cities[place] / 8;
+}
+  }
+  if (place = 0  adv-threats.continent[place]  0) {
 /* We have threatening neighbours: -25% */
 value -= value / 4;
   }
   /* Require that there is at least some neighbors for wonder helpers,
* if ruleset supports it. */
   if (value  best_candidate_value
-   (!has_help || adv-stats.cities[place]  5)
+   (!has_help || (place = 0  adv-stats.cities[place]  5))
(!has_help || city_data-downtown  3)) {
 best_candidate = pcity;
 best_candidate_value = value;


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


[Freeciv-commits] r27951 - /branches/S2_6/server/advisors/advbuilding.c

2015-02-03 Thread cazfi74
Author: cazfi
Date: Wed Feb  4 03:56:36 2015
New Revision: 27951

URL: http://svn.gna.org/viewcvs/freeciv?rev=27951view=rev
Log:
Fixed a illegal array index usage in building advisor when handling an city on 
ocean.

See bug #23227

Modified:
branches/S2_6/server/advisors/advbuilding.c

Modified: branches/S2_6/server/advisors/advbuilding.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/advisors/advbuilding.c?rev=27951r1=27950r2=27951view=diff
==
--- branches/S2_6/server/advisors/advbuilding.c (original)
+++ branches/S2_6/server/advisors/advbuilding.c Wed Feb  4 03:56:36 2015
@@ -232,18 +232,21 @@
* These may be able to help with caravans. Also look at the whole
* continent. */
   if (first_role_unit_for_player(pplayer,
-  action_get_role(ACTION_HELP_WONDER))) {
+ action_get_role(ACTION_HELP_WONDER))) {
 value += city_data-downtown;
-value += adv-stats.cities[place] / 8;
-  }
-  if (adv-threats.continent[place]  0) {
+
+if (place = 0) {
+  value += adv-stats.cities[place] / 8;
+}
+  }
+  if (place = 0  adv-threats.continent[place]  0) {
 /* We have threatening neighbours: -25% */
 value -= value / 4;
   }
   /* Require that there is at least some neighbors for wonder helpers,
* if ruleset supports it. */
   if (value  best_candidate_value
-   (!has_help || adv-stats.cities[place]  5)
+   (!has_help || (place = 0  adv-stats.cities[place]  5))
(!has_help || city_data-downtown  3)) {
 best_candidate = pcity;
 best_candidate_value = value;


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


[Freeciv-commits] r27952 - /branches/S2_5/server/advisors/advbuilding.c

2015-02-03 Thread cazfi74
Author: cazfi
Date: Wed Feb  4 03:56:43 2015
New Revision: 27952

URL: http://svn.gna.org/viewcvs/freeciv?rev=27952view=rev
Log:
Fixed a illegal array index usage in building advisor when handling an city on 
ocean.

See bug #23227

Modified:
branches/S2_5/server/advisors/advbuilding.c

Modified: branches/S2_5/server/advisors/advbuilding.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/advisors/advbuilding.c?rev=27952r1=27951r2=27952view=diff
==
--- branches/S2_5/server/advisors/advbuilding.c (original)
+++ branches/S2_5/server/advisors/advbuilding.c Wed Feb  4 03:56:43 2015
@@ -221,16 +221,18 @@
* continent. */
   if (first_role_unit_for_player(pplayer, UTYF_HELP_WONDER)) {
 value += city_data-downtown;
-value += adv-stats.cities[place] / 8;
-  }
-  if (adv-threats.continent[place]  0) {
+if (place = 0) {
+  value += adv-stats.cities[place] / 8;
+}
+  }
+  if (place = 0  adv-threats.continent[place]  0) {
 /* We have threatening neighbours: -25% */
 value -= value / 4;
   }
   /* Require that there is at least some neighbors for wonder helpers,
* if ruleset supports it. */
   if (value  best_candidate_value
-   (!has_help || adv-stats.cities[place]  5)
+   (!has_help || (place = 0  adv-stats.cities[place]  5))
(!has_help || city_data-downtown  3)) {
 best_candidate = pcity;
 best_candidate_value = value;


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


[Freeciv-commits] r27950 - /trunk/server/advisors/advbuilding.c

2015-02-03 Thread cazfi74
Author: cazfi
Date: Wed Feb  4 03:56:29 2015
New Revision: 27950

URL: http://svn.gna.org/viewcvs/freeciv?rev=27950view=rev
Log:
Fixed a illegal array index usage in building advisor when handling an city on 
ocean.

See bug #23227

Modified:
trunk/server/advisors/advbuilding.c

Modified: trunk/server/advisors/advbuilding.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/advisors/advbuilding.c?rev=27950r1=27949r2=27950view=diff
==
--- trunk/server/advisors/advbuilding.c (original)
+++ trunk/server/advisors/advbuilding.c Wed Feb  4 03:56:29 2015
@@ -232,18 +232,21 @@
* These may be able to help with caravans. Also look at the whole
* continent. */
   if (first_role_unit_for_player(pplayer,
-  action_get_role(ACTION_HELP_WONDER))) {
+ action_get_role(ACTION_HELP_WONDER))) {
 value += city_data-downtown;
-value += adv-stats.cities[place] / 8;
-  }
-  if (adv-threats.continent[place]  0) {
+
+if (place = 0) {
+  value += adv-stats.cities[place] / 8;
+}
+  }
+  if (place = 0  adv-threats.continent[place]  0) {
 /* We have threatening neighbours: -25% */
 value -= value / 4;
   }
   /* Require that there is at least some neighbors for wonder helpers,
* if ruleset supports it. */
   if (value  best_candidate_value
-   (!has_help || adv-stats.cities[place]  5)
+   (!has_help || (place = 0  adv-stats.cities[place]  5))
(!has_help || city_data-downtown  3)) {
 best_candidate = pcity;
 best_candidate_value = value;


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


[Freeciv-commits] r27964 - /branches/S2_5/client/helpdata.c

2015-02-03 Thread cazfi74
Author: cazfi
Date: Wed Feb  4 04:37:25 2015
New Revision: 27964

URL: http://svn.gna.org/viewcvs/freeciv?rev=27964view=rev
Log:
Check that relevant _Possible effect can ever be enabled in the ruleset 
before claiming
in the help that Settler can do some activity.

See patch #5774

Modified:
branches/S2_5/client/helpdata.c

Modified: branches/S2_5/client/helpdata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/helpdata.c?rev=27964r1=27963r2=27964view=diff
==
--- branches/S2_5/client/helpdata.c (original)
+++ branches/S2_5/client/helpdata.c Wed Feb  4 04:37:25 2015
@@ -2593,23 +2593,35 @@
 
 /* Roads, rail, mines, irrigation. */
 CATLSTR(buf, bufsz, _(* Can build roads and railroads.\n));
-CATLSTR(buf, bufsz, _(* Can build mines on tiles.\n));
-CATLSTR(buf, bufsz, _(* Can build irrigation on tiles.\n));
-
-/* Farmland. */
-switch (techs_with_flag_string(buf2, sizeof(buf2), pplayer, TF_FARMLAND)) {
-case 0:
-  /* Can never build farmland */
-  break;
-case 1:
-  cat_snprintf(buf, bufsz,
-  _(* Can build farmland (if %s is known).\n), buf2);
-  break;
-default:
-  cat_snprintf(buf, bufsz,
-  _(* Can build farmland (if any of the following are
- known: %s).\n), buf2);
-  break;
+
+/* TODO: Check also that specific unit fulfills the requirements of the 
effects */
+if (effect_cumulative_max(EFT_MINING_POSSIBLE)  0) {
+  CATLSTR(buf, bufsz, _(* Can build mines on tiles.\n));
+}
+if (effect_cumulative_max(EFT_MINING_TF_POSSIBLE)  0) {
+  CATLSTR(buf, bufsz, _(* Can mine terrain to another.\n));
+}
+
+if (effect_cumulative_max(EFT_IRRIG_POSSIBLE)  0) {
+  CATLSTR(buf, bufsz, _(* Can build irrigation on tiles.\n));
+  /* Farmland. */
+  switch (techs_with_flag_string(buf2, sizeof(buf2), pplayer, 
TF_FARMLAND)) {
+  case 0:
+/* Can never build farmland */
+break;
+  case 1:
+cat_snprintf(buf, bufsz,
+ _(* Can build farmland (if %s is known).\n), buf2);
+break;
+  default:
+cat_snprintf(buf, bufsz,
+ _(* Can build farmland (if any of the following are
+known: %s).\n), buf2);
+break;
+  }
+}
+if (effect_cumulative_max(EFT_IRRIG_TF_POSSIBLE)  0) {
+  CATLSTR(buf, bufsz, _(* Can irrigate terrain to another.\n));
 }
 
 /* Pollution, fallout. */


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


[Freeciv-commits] r27963 - /branches/S2_6/client/helpdata.c

2015-02-03 Thread cazfi74
Author: cazfi
Date: Wed Feb  4 04:37:19 2015
New Revision: 27963

URL: http://svn.gna.org/viewcvs/freeciv?rev=27963view=rev
Log:
Check that relevant _Possible effect can ever be enabled in the ruleset 
before claiming
in the help that Settler can do some activity.

See patch #5774

Modified:
branches/S2_6/client/helpdata.c

Modified: branches/S2_6/client/helpdata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/helpdata.c?rev=27963r1=27962r2=27963view=diff
==
--- branches/S2_6/client/helpdata.c (original)
+++ branches/S2_6/client/helpdata.c Wed Feb  4 04:37:19 2015
@@ -3669,8 +3669,21 @@
   if (utype_has_flag(utype, UTYF_SETTLERS)) {
 /* Roads, rail, mines, irrigation. */
 CATLSTR(buf, bufsz, _(* Can build roads and railroads.\n));
-CATLSTR(buf, bufsz, _(* Can build mines on tiles.\n));
-CATLSTR(buf, bufsz, _(* Can build irrigation and farmland on tiles.\n));
+
+/* TODO: Check also that specific unit fulfills the requirements of the 
effects */
+if (effect_cumulative_max(EFT_MINING_POSSIBLE)  0) {
+  CATLSTR(buf, bufsz, _(* Can build mines on tiles.\n));
+}
+if (effect_cumulative_max(EFT_MINING_TF_POSSIBLE)  0) {
+  CATLSTR(buf, bufsz, _(* Can mine terrain to another.\n));
+}
+
+if (effect_cumulative_max(EFT_IRRIG_POSSIBLE)  0) {
+  CATLSTR(buf, bufsz, _(* Can build irrigation and farmland on 
tiles.\n));
+}
+if (effect_cumulative_max(EFT_IRRIG_TF_POSSIBLE)  0) {
+  CATLSTR(buf, bufsz, _(* Can irrigate terrain to another.\n));
+}
 
 /* Pollution, fallout. */
 CATLSTR(buf, bufsz, _(* Can clean pollution from tiles.\n));


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


[Freeciv-commits] r27948 - /trunk/doc/README

2015-02-03 Thread cazfi74
Author: cazfi
Date: Wed Feb  4 03:51:58 2015
New Revision: 27948

URL: http://svn.gna.org/viewcvs/freeciv?rev=27948view=rev
Log:
Updated list of tilesets in README

See patch #5770

Modified:
trunk/doc/README

Modified: trunk/doc/README
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/doc/README?rev=27948r1=27947r2=27948view=diff
==
--- trunk/doc/README(original)
+++ trunk/doc/READMEWed Feb  4 03:51:58 2015
@@ -205,12 +205,15 @@
   Another option for the client you may like to try is the '--tiles'
   option, which can be used to select different tilesets (that is,
   different graphics for the map terrain, units, and so on).  The
-  distribution comes with 6 main tilesets:
+  distribution comes with 8 main tilesets:
   - amplio2: An isometric tileset with larger and more detailed tiles.
   - isotrident: An isometric tileset similar in shape to the one in Civ 2.
   - cimpletoon: amplio2 with alternative units that display direction they
 are facing.
   - trident: a Civ 1-style tileset with 30x30 tiles.
+  - hexemplio: an isometric hexagonal tileset with larger tiles derived
+   from amplio2
+  - toonhex: tileset combining hexemplio tiles with cimpletoon units
   - isophex: an isometric hexagonal tileset
   - hex2t: an overhead hexagonal tileset
 


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


[Freeciv-commits] r27949 - /branches/S2_6/doc/README

2015-02-03 Thread cazfi74
Author: cazfi
Date: Wed Feb  4 03:52:05 2015
New Revision: 27949

URL: http://svn.gna.org/viewcvs/freeciv?rev=27949view=rev
Log:
Updated list of tilesets in README

See patch #5770

Modified:
branches/S2_6/doc/README

Modified: branches/S2_6/doc/README
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/doc/README?rev=27949r1=27948r2=27949view=diff
==
--- branches/S2_6/doc/README(original)
+++ branches/S2_6/doc/READMEWed Feb  4 03:52:05 2015
@@ -205,12 +205,15 @@
   Another option for the client you may like to try is the '--tiles'
   option, which can be used to select different tilesets (that is,
   different graphics for the map terrain, units, and so on).  The
-  distribution comes with 6 main tilesets:
+  distribution comes with 8 main tilesets:
   - amplio2: An isometric tileset with larger and more detailed tiles.
   - isotrident: An isometric tileset similar in shape to the one in Civ 2.
   - cimpletoon: amplio2 with alternative units that display direction they
 are facing.
   - trident: a Civ 1-style tileset with 30x30 tiles.
+  - hexemplio: an isometric hexagonal tileset with larger tiles derived
+   from amplio2
+  - toonhex: tileset combining hexemplio tiles with cimpletoon units
   - isophex: an isometric hexagonal tileset
   - hex2t: an overhead hexagonal tileset
 


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