[Freeciv-commits] r35628 - /branches/S3_0/m4/web-client.m4

2017-05-17 Thread cazfi74
Author: cazfi
Date: Thu May 18 01:54:16 2017
New Revision: 35628

URL: http://svn.gna.org/viewcvs/freeciv?rev=35628=rev
Log:
Make --enable-fcweb help clearer

Reported by Christian Knoke

See hrm Bug #660894

Modified:
branches/S3_0/m4/web-client.m4

Modified: branches/S3_0/m4/web-client.m4
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/m4/web-client.m4?rev=35628=35627=35628=diff
==
--- branches/S3_0/m4/web-client.m4  (original)
+++ branches/S3_0/m4/web-client.m4  Thu May 18 01:54:16 2017
@@ -5,7 +5,7 @@
   AM_CONDITIONAL([FREECIV_WEB], [test "x$fcweb" = "xtrue"])
 
   if test "x$fcweb" = "xtrue" ; then
-AC_DEFINE([FREECIV_WEB], [1], [Build freeciv-web version])
+AC_DEFINE([FREECIV_WEB], [1], [Build freeciv-web version instead of 
regular freeciv])
   fi
 ])
 


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


[Freeciv-commits] r35627 - /trunk/m4/web-client.m4

2017-05-17 Thread cazfi74
Author: cazfi
Date: Thu May 18 01:54:08 2017
New Revision: 35627

URL: http://svn.gna.org/viewcvs/freeciv?rev=35627=rev
Log:
Make --enable-fcweb help clearer

Reported by Christian Knoke

See hrm Bug #660894

Modified:
trunk/m4/web-client.m4

Modified: trunk/m4/web-client.m4
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/m4/web-client.m4?rev=35627=35626=35627=diff
==
--- trunk/m4/web-client.m4  (original)
+++ trunk/m4/web-client.m4  Thu May 18 01:54:08 2017
@@ -5,7 +5,7 @@
   AM_CONDITIONAL([FREECIV_WEB], [test "x$fcweb" = "xtrue"])
 
   if test "x$fcweb" = "xtrue" ; then
-AC_DEFINE([FREECIV_WEB], [1], [Build freeciv-web version])
+AC_DEFINE([FREECIV_WEB], [1], [Build freeciv-web version instead of 
regular freeciv])
   fi
 ])
 


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


[Freeciv-commits] r35625 - in /branches/S3_0: ./ ai/default/ client/ client/gui-gtk-2.0/ client/gui-gtk-3.0/ client/gui-gtk-3.22/ client/gui-q...

2017-05-17 Thread sveinung84
Author: sveinung
Date: Wed May 17 12:46:42 2017
New Revision: 35625

URL: http://svn.gna.org/viewcvs/freeciv?rev=35625=rev
Log:
Split the action "Incite City".

Stop relying on the Spy unit type flag to decide if the "Incite City" action
consumes the actor unit. Split the new action "Incite City Escape" from
"Incite City". The former will have its actor try to escape. The latter will
always consume the actor unit.

This makes it possible to create a ruleset where all actor units, including
those with the Spy utype flag, are consumed when inciting a foreign city to
revolt and join the actor's side. It makes a ruleset where no actor units,
including those without the Spy utype flag, will try to escape after
inciting a revolt. It also makes more complex rules, like "inciting a revolt
consumes the unit unless the city belongs to a democracy, possible.

See hrm Feature #660927

Modified:
branches/S3_0/ai/default/aicity.c
branches/S3_0/ai/default/aidata.c
branches/S3_0/ai/default/aidiplomat.c
branches/S3_0/client/gui-gtk-2.0/action_dialog.c
branches/S3_0/client/gui-gtk-3.0/action_dialog.c
branches/S3_0/client/gui-gtk-3.22/action_dialog.c
branches/S3_0/client/gui-qt/dialogs.cpp
branches/S3_0/client/gui-qt/menu.cpp
branches/S3_0/client/gui-sdl2/action_dialog.c
branches/S3_0/client/helpdata.c
branches/S3_0/client/packhand.c
branches/S3_0/common/actions.c
branches/S3_0/common/actions.h
branches/S3_0/common/aicore/pf_tools.c
branches/S3_0/common/unittype.c
branches/S3_0/data/civ2/game.ruleset
branches/S3_0/data/civ2civ3/game.ruleset
branches/S3_0/data/classic/game.ruleset
branches/S3_0/data/experimental/game.ruleset
branches/S3_0/data/multiplayer/game.ruleset
branches/S3_0/data/sandbox/game.ruleset
branches/S3_0/data/webperimental/game.ruleset
branches/S3_0/doc/README.actions
branches/S3_0/fc_version
branches/S3_0/server/advisors/advdata.c
branches/S3_0/server/rscompat.c
branches/S3_0/server/ruleset.c
branches/S3_0/server/savegame3.c
branches/S3_0/server/unithand.c
branches/S3_0/tools/ruleutil/rulesave.c

[This mail would be too long, it was shortened to contain the URLs only.]

Modified: branches/S3_0/ai/default/aicity.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/ai/default/aicity.c?rev=35625=35624=35625=diff

Modified: branches/S3_0/ai/default/aidata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/ai/default/aidata.c?rev=35625=35624=35625=diff

Modified: branches/S3_0/ai/default/aidiplomat.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/ai/default/aidiplomat.c?rev=35625=35624=35625=diff

Modified: branches/S3_0/client/gui-gtk-2.0/action_dialog.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/client/gui-gtk-2.0/action_dialog.c?rev=35625=35624=35625=diff

Modified: branches/S3_0/client/gui-gtk-3.0/action_dialog.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/client/gui-gtk-3.0/action_dialog.c?rev=35625=35624=35625=diff

Modified: branches/S3_0/client/gui-gtk-3.22/action_dialog.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/client/gui-gtk-3.22/action_dialog.c?rev=35625=35624=35625=diff

Modified: branches/S3_0/client/gui-qt/dialogs.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/client/gui-qt/dialogs.cpp?rev=35625=35624=35625=diff

Modified: branches/S3_0/client/gui-qt/menu.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/client/gui-qt/menu.cpp?rev=35625=35624=35625=diff

Modified: branches/S3_0/client/gui-sdl2/action_dialog.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/client/gui-sdl2/action_dialog.c?rev=35625=35624=35625=diff

Modified: branches/S3_0/client/helpdata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/client/helpdata.c?rev=35625=35624=35625=diff

Modified: branches/S3_0/client/packhand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/client/packhand.c?rev=35625=35624=35625=diff

Modified: branches/S3_0/common/actions.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/common/actions.c?rev=35625=35624=35625=diff

Modified: branches/S3_0/common/actions.h
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/common/actions.h?rev=35625=35624=35625=diff

Modified: branches/S3_0/common/aicore/pf_tools.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/common/aicore/pf_tools.c?rev=35625=35624=35625=diff

Modified: branches/S3_0/common/unittype.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/common/unittype.c?rev=35625=35624=35625=diff

Modified: branches/S3_0/data/civ2/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/data/civ2/game.ruleset?rev=35625=35624=35625=diff

Modified: branches/S3_0/data/civ2civ3/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/data/civ2civ3/game.ruleset?rev=35625=35624=35625=diff

Modified: branches/S3_0/data/classic/game.ruleset
URL: 

[Freeciv-commits] r35626 - in /branches/S3_0/client: ./ gui-gtk-2.0/ gui-gtk-3.0/ gui-gtk-3.22/ gui-qt/ gui-sdl2/ gui-stub/ include/

2017-05-17 Thread sveinung84
Author: sveinung
Date: Wed May 17 12:46:52 2017
New Revision: 35626

URL: http://svn.gna.org/viewcvs/freeciv?rev=35626=rev
Log:
Prepare popup_bribe_dialog() for gen actions.

Make popup_bribe_dialog() take the action it is a response to as a
parameter. This allows more than one action to use it.

See hrm Feature #660895

Modified:
branches/S3_0/client/gui-gtk-2.0/action_dialog.c
branches/S3_0/client/gui-gtk-3.0/action_dialog.c
branches/S3_0/client/gui-gtk-3.22/action_dialog.c
branches/S3_0/client/gui-qt/dialogs.cpp
branches/S3_0/client/gui-sdl2/action_dialog.c
branches/S3_0/client/gui-stub/dialogs.c
branches/S3_0/client/include/dialogs_g.h
branches/S3_0/client/packhand.c

Modified: branches/S3_0/client/gui-gtk-2.0/action_dialog.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/client/gui-gtk-2.0/action_dialog.c?rev=35626=35625=35626=diff
==
--- branches/S3_0/client/gui-gtk-2.0/action_dialog.c(original)
+++ branches/S3_0/client/gui-gtk-2.0/action_dialog.cWed May 17 12:46:52 2017
@@ -439,7 +439,8 @@
 /*
   Popup unit bribe dialog
 **/
-void popup_bribe_dialog(struct unit *actor, struct unit *punit, int cost)
+void popup_bribe_dialog(struct unit *actor, struct unit *punit, int cost,
+const struct action *paction)
 {
   GtkWidget *shell;
   char buf[1024];
@@ -469,8 +470,7 @@
   gtk_window_present(GTK_WINDOW(shell));
   
   g_signal_connect(shell, "response", G_CALLBACK(bribe_response),
-   act_data(ACTION_SPY_BRIBE_UNIT,
-actor->id, 0, punit->id, 0, cost));
+   act_data(paction->id, actor->id, 0, punit->id, 0, cost));
 }
 
 /

Modified: branches/S3_0/client/gui-gtk-3.0/action_dialog.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/client/gui-gtk-3.0/action_dialog.c?rev=35626=35625=35626=diff
==
--- branches/S3_0/client/gui-gtk-3.0/action_dialog.c(original)
+++ branches/S3_0/client/gui-gtk-3.0/action_dialog.cWed May 17 12:46:52 2017
@@ -449,7 +449,8 @@
 /*
   Popup unit bribe dialog
 **/
-void popup_bribe_dialog(struct unit *actor, struct unit *punit, int cost)
+void popup_bribe_dialog(struct unit *actor, struct unit *punit, int cost,
+const struct action *paction)
 {
   GtkWidget *shell;
   char buf[1024];
@@ -479,8 +480,7 @@
   gtk_window_present(GTK_WINDOW(shell));
   
   g_signal_connect(shell, "response", G_CALLBACK(bribe_response),
-   act_data(ACTION_SPY_BRIBE_UNIT,
-actor->id, 0, punit->id, 0, cost));
+   act_data(paction->id, actor->id, 0, punit->id, 0, cost));
 }
 
 /

Modified: branches/S3_0/client/gui-gtk-3.22/action_dialog.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/client/gui-gtk-3.22/action_dialog.c?rev=35626=35625=35626=diff
==
--- branches/S3_0/client/gui-gtk-3.22/action_dialog.c   (original)
+++ branches/S3_0/client/gui-gtk-3.22/action_dialog.c   Wed May 17 12:46:52 2017
@@ -449,7 +449,8 @@
 /*
   Popup unit bribe dialog
 **/
-void popup_bribe_dialog(struct unit *actor, struct unit *punit, int cost)
+void popup_bribe_dialog(struct unit *actor, struct unit *punit, int cost,
+const struct action *paction)
 {
   GtkWidget *shell;
   char buf[1024];
@@ -479,8 +480,7 @@
   gtk_window_present(GTK_WINDOW(shell));
   
   g_signal_connect(shell, "response", G_CALLBACK(bribe_response),
-   act_data(ACTION_SPY_BRIBE_UNIT,
-actor->id, 0, punit->id, 0, cost));
+   act_data(paction->id, actor->id, 0, punit->id, 0, cost));
 }
 
 /

Modified: branches/S3_0/client/gui-qt/dialogs.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/client/gui-qt/dialogs.cpp?rev=35626=35625=35626=diff
==
--- branches/S3_0/client/gui-qt/dialogs.cpp (original)
+++ branches/S3_0/client/gui-qt/dialogs.cpp Wed May 17 12:46:52 2017
@@ -2583,7 +2583,8 @@
   Popup a dialog asking a diplomatic unit if it wishes to bribe the
   given enemy unit.
 

[Freeciv-commits] r35623 - /branches/S3_0/client/gui-sdl2/action_dialog.c

2017-05-17 Thread sveinung84
Author: sveinung
Date: Wed May 17 12:46:23 2017
New Revision: 35623

URL: http://svn.gna.org/viewcvs/freeciv?rev=35623=rev
Log:
SDL2 client: add action to small dipl dialog.

Use it in unit bribery and in city inciting.

See hrm Feature #660837

Modified:
branches/S3_0/client/gui-sdl2/action_dialog.c

Modified: branches/S3_0/client/gui-sdl2/action_dialog.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/client/gui-sdl2/action_dialog.c?rev=35623=35622=35623=diff
==
--- branches/S3_0/client/gui-sdl2/action_dialog.c   (original)
+++ branches/S3_0/client/gui-sdl2/action_dialog.c   Wed May 17 12:46:23 2017
@@ -58,6 +58,7 @@
 struct small_diplomat_dialog {
   int actor_unit_id;
   int target_id;
+  int action_id;
   struct SMALL_DLG *pdialog;
 };
  
@@ -1910,15 +1911,15 @@
   return -1;
 }
 
-/
+/**
   User confirmed incite
-*/
+**/
 static int diplomat_incite_yes_callback(struct widget *pWidget)
 {
   if (Main.event.button.button == SDL_BUTTON_LEFT) {
 if (NULL != game_unit_by_number(pIncite_Dlg->actor_unit_id)
 && NULL != game_city_by_number(pIncite_Dlg->target_id)) {
-  request_do_action(ACTION_SPY_INCITE_CITY, pIncite_Dlg->actor_unit_id,
+  request_do_action(pIncite_Dlg->action_id, pIncite_Dlg->actor_unit_id,
 pIncite_Dlg->target_id, 0, "");
 }
 
@@ -1987,6 +1988,7 @@
   pIncite_Dlg = fc_calloc(1, sizeof(struct small_diplomat_dialog));
   pIncite_Dlg->actor_unit_id = actor->id;
   pIncite_Dlg->target_id = pCity->id;
+  pIncite_Dlg->action_id = ACTION_SPY_INCITE_CITY;
   pIncite_Dlg->pdialog = fc_calloc(1, sizeof(struct SMALL_DLG));
 
   fc_snprintf(tBuf, ARRAY_SIZE(tBuf), PL_("Treasury contains %d gold.",
@@ -2180,7 +2182,7 @@
   if (Main.event.button.button == SDL_BUTTON_LEFT) {
 if (NULL != game_unit_by_number(pBribe_Dlg->actor_unit_id)
 && NULL != game_unit_by_number(pBribe_Dlg->target_id)) {
-  request_do_action(ACTION_SPY_BRIBE_UNIT, pBribe_Dlg->actor_unit_id,
+  request_do_action(pBribe_Dlg->action_id, pBribe_Dlg->actor_unit_id,
 pBribe_Dlg->target_id, 0, "");
 }
 popdown_bribe_dialog();
@@ -2246,6 +2248,7 @@
   is_unit_move_blocked = TRUE;
 
   pBribe_Dlg = fc_calloc(1, sizeof(struct small_diplomat_dialog));
+  pBribe_Dlg->action_id = ACTION_SPY_BRIBE_UNIT;
   pBribe_Dlg->actor_unit_id = actor->id;
   pBribe_Dlg->target_id = pUnit->id;
   pBribe_Dlg->pdialog = fc_calloc(1, sizeof(struct SMALL_DLG));


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


[Freeciv-commits] r35624 - in /branches/S3_0/client: ./ gui-gtk-2.0/ gui-gtk-3.0/ gui-gtk-3.22/ gui-qt/ gui-sdl2/ gui-stub/ include/

2017-05-17 Thread sveinung84
Author: sveinung
Date: Wed May 17 12:46:33 2017
New Revision: 35624

URL: http://svn.gna.org/viewcvs/freeciv?rev=35624=rev
Log:
Prepare popup_incite_dialog() for gen actions.

Make popup_incite_dialog() take the action it is a response to as a
parameter. This allows more than one action to use it.

See hrm Feature #660843

Modified:
branches/S3_0/client/gui-gtk-2.0/action_dialog.c
branches/S3_0/client/gui-gtk-3.0/action_dialog.c
branches/S3_0/client/gui-gtk-3.22/action_dialog.c
branches/S3_0/client/gui-qt/dialogs.cpp
branches/S3_0/client/gui-sdl2/action_dialog.c
branches/S3_0/client/gui-stub/dialogs.c
branches/S3_0/client/include/dialogs_g.h
branches/S3_0/client/packhand.c

Modified: branches/S3_0/client/gui-gtk-2.0/action_dialog.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/client/gui-gtk-2.0/action_dialog.c?rev=35624=35623=35624=diff
==
--- branches/S3_0/client/gui-gtk-2.0/action_dialog.c(original)
+++ branches/S3_0/client/gui-gtk-2.0/action_dialog.cWed May 17 12:46:33 2017
@@ -1205,7 +1205,8 @@
 /*
 Popup the yes/no dialog for inciting, since we know the cost now
 **/
-void popup_incite_dialog(struct unit *actor, struct city *pcity, int cost)
+void popup_incite_dialog(struct unit *actor, struct city *pcity, int cost,
+ const struct action *paction)
 {
   GtkWidget *shell;
   char buf[1024];
@@ -1243,8 +1244,7 @@
   gtk_window_present(GTK_WINDOW(shell));
   
   g_signal_connect(shell, "response", G_CALLBACK(incite_response),
-   act_data(ACTION_SPY_INCITE_CITY,
-actor->id, pcity->id, 0, 0, cost));
+   act_data(paction->id, actor->id, pcity->id, 0, 0, cost));
 }
 
 

Modified: branches/S3_0/client/gui-gtk-3.0/action_dialog.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/client/gui-gtk-3.0/action_dialog.c?rev=35624=35623=35624=diff
==
--- branches/S3_0/client/gui-gtk-3.0/action_dialog.c(original)
+++ branches/S3_0/client/gui-gtk-3.0/action_dialog.cWed May 17 12:46:33 2017
@@ -1225,7 +1225,8 @@
 /*
 Popup the yes/no dialog for inciting, since we know the cost now
 **/
-void popup_incite_dialog(struct unit *actor, struct city *pcity, int cost)
+void popup_incite_dialog(struct unit *actor, struct city *pcity, int cost,
+ const struct action *paction)
 {
   GtkWidget *shell;
   char buf[1024];
@@ -1263,8 +1264,7 @@
   gtk_window_present(GTK_WINDOW(shell));
   
   g_signal_connect(shell, "response", G_CALLBACK(incite_response),
-   act_data(ACTION_SPY_INCITE_CITY,
-actor->id, pcity->id, 0, 0, cost));
+   act_data(paction->id, actor->id, pcity->id, 0, 0, cost));
 }
 
 /**

Modified: branches/S3_0/client/gui-gtk-3.22/action_dialog.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/client/gui-gtk-3.22/action_dialog.c?rev=35624=35623=35624=diff
==
--- branches/S3_0/client/gui-gtk-3.22/action_dialog.c   (original)
+++ branches/S3_0/client/gui-gtk-3.22/action_dialog.c   Wed May 17 12:46:33 2017
@@ -1219,7 +1219,8 @@
 /*
 Popup the yes/no dialog for inciting, since we know the cost now
 **/
-void popup_incite_dialog(struct unit *actor, struct city *pcity, int cost)
+void popup_incite_dialog(struct unit *actor, struct city *pcity, int cost,
+ const struct action *paction)
 {
   GtkWidget *shell;
   char buf[1024];
@@ -1257,8 +1258,7 @@
   gtk_window_present(GTK_WINDOW(shell));
   
   g_signal_connect(shell, "response", G_CALLBACK(incite_response),
-   act_data(ACTION_SPY_INCITE_CITY,
-actor->id, pcity->id, 0, 0, cost));
+   act_data(paction->id, actor->id, pcity->id, 0, 0, cost));
 }
 
 /**

Modified: branches/S3_0/client/gui-qt/dialogs.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/client/gui-qt/dialogs.cpp?rev=35624=35623=35624=diff
==
--- branches/S3_0/client/gui-qt/dialogs.cpp (original)
+++ branches/S3_0/client/gui-qt/dialogs.cpp Wed May 17 12:46:33 2017
@@ -2501,7 +2501,8 @@
   Popup a window asking a 

[Freeciv-commits] r35621 - in /trunk: ./ ai/default/ client/ client/gui-gtk-3.0/ client/gui-gtk-3.22/ client/gui-gtk-4.0/ client/gui-qt/ clien...

2017-05-17 Thread sveinung84
Author: sveinung
Date: Wed May 17 12:45:32 2017
New Revision: 35621

URL: http://svn.gna.org/viewcvs/freeciv?rev=35621=rev
Log:
Split the action "Incite City".

Stop relying on the Spy unit type flag to decide if the "Incite City" action
consumes the actor unit. Split the new action "Incite City Escape" from
"Incite City". The former will have its actor try to escape. The latter will
always consume the actor unit.

This makes it possible to create a ruleset where all actor units, including
those with the Spy utype flag, are consumed when inciting a foreign city to
revolt and join the actor's side. It makes a ruleset where no actor units,
including those without the Spy utype flag, will try to escape after
inciting a revolt. It also makes more complex rules, like "inciting a revolt
consumes the unit unless the city belongs to a democracy, possible.

See hrm Feature #660927

Modified:
trunk/ai/default/aicity.c
trunk/ai/default/aidata.c
trunk/ai/default/aidiplomat.c
trunk/client/gui-gtk-3.0/action_dialog.c
trunk/client/gui-gtk-3.22/action_dialog.c
trunk/client/gui-gtk-4.0/action_dialog.c
trunk/client/gui-qt/dialogs.cpp
trunk/client/gui-qt/menu.cpp
trunk/client/gui-sdl2/action_dialog.c
trunk/client/helpdata.c
trunk/client/packhand.c
trunk/common/actions.c
trunk/common/actions.h
trunk/common/aicore/pf_tools.c
trunk/common/unittype.c
trunk/data/civ2/game.ruleset
trunk/data/civ2civ3/game.ruleset
trunk/data/classic/game.ruleset
trunk/data/experimental/game.ruleset
trunk/data/multiplayer/game.ruleset
trunk/data/sandbox/game.ruleset
trunk/data/webperimental/game.ruleset
trunk/doc/README.actions
trunk/fc_version
trunk/server/advisors/advdata.c
trunk/server/ruleset.c
trunk/server/savegame3.c
trunk/server/unithand.c
trunk/tools/ruleutil/rulesave.c

[This mail would be too long, it was shortened to contain the URLs only.]

Modified: trunk/ai/default/aicity.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/ai/default/aicity.c?rev=35621=35620=35621=diff

Modified: trunk/ai/default/aidata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/ai/default/aidata.c?rev=35621=35620=35621=diff

Modified: trunk/ai/default/aidiplomat.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/ai/default/aidiplomat.c?rev=35621=35620=35621=diff

Modified: trunk/client/gui-gtk-3.0/action_dialog.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.0/action_dialog.c?rev=35621=35620=35621=diff

Modified: trunk/client/gui-gtk-3.22/action_dialog.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.22/action_dialog.c?rev=35621=35620=35621=diff

Modified: trunk/client/gui-gtk-4.0/action_dialog.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-4.0/action_dialog.c?rev=35621=35620=35621=diff

Modified: trunk/client/gui-qt/dialogs.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/dialogs.cpp?rev=35621=35620=35621=diff

Modified: trunk/client/gui-qt/menu.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/menu.cpp?rev=35621=35620=35621=diff

Modified: trunk/client/gui-sdl2/action_dialog.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-sdl2/action_dialog.c?rev=35621=35620=35621=diff

Modified: trunk/client/helpdata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/helpdata.c?rev=35621=35620=35621=diff

Modified: trunk/client/packhand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/packhand.c?rev=35621=35620=35621=diff

Modified: trunk/common/actions.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/actions.c?rev=35621=35620=35621=diff

Modified: trunk/common/actions.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/actions.h?rev=35621=35620=35621=diff

Modified: trunk/common/aicore/pf_tools.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/aicore/pf_tools.c?rev=35621=35620=35621=diff

Modified: trunk/common/unittype.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/unittype.c?rev=35621=35620=35621=diff

Modified: trunk/data/civ2/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2/game.ruleset?rev=35621=35620=35621=diff

Modified: trunk/data/civ2civ3/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2civ3/game.ruleset?rev=35621=35620=35621=diff

Modified: trunk/data/classic/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/classic/game.ruleset?rev=35621=35620=35621=diff

Modified: trunk/data/experimental/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/experimental/game.ruleset?rev=35621=35620=35621=diff

Modified: trunk/data/multiplayer/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/multiplayer/game.ruleset?rev=35621=35620=35621=diff

Modified: trunk/data/sandbox/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/sandbox/game.ruleset?rev=35621=35620=35621=diff

Modified: trunk/data/webperimental/game.ruleset
URL: 

[Freeciv-commits] r35619 - /trunk/client/gui-sdl2/action_dialog.c

2017-05-17 Thread sveinung84
Author: sveinung
Date: Wed May 17 12:45:09 2017
New Revision: 35619

URL: http://svn.gna.org/viewcvs/freeciv?rev=35619=rev
Log:
SDL2 client: add action to small dipl dialog.

Use it in unit bribery and in city inciting.

See hrm Feature #660837

Modified:
trunk/client/gui-sdl2/action_dialog.c

Modified: trunk/client/gui-sdl2/action_dialog.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-sdl2/action_dialog.c?rev=35619=35618=35619=diff
==
--- trunk/client/gui-sdl2/action_dialog.c   (original)
+++ trunk/client/gui-sdl2/action_dialog.c   Wed May 17 12:45:09 2017
@@ -58,6 +58,7 @@
 struct small_diplomat_dialog {
   int actor_unit_id;
   int target_id;
+  int action_id;
   struct SMALL_DLG *pdialog;
 };
  
@@ -1911,15 +1912,15 @@
   return -1;
 }
 
-/
+/**
   User confirmed incite
-*/
+**/
 static int diplomat_incite_yes_callback(struct widget *pWidget)
 {
   if (Main.event.button.button == SDL_BUTTON_LEFT) {
 if (NULL != game_unit_by_number(pIncite_Dlg->actor_unit_id)
 && NULL != game_city_by_number(pIncite_Dlg->target_id)) {
-  request_do_action(ACTION_SPY_INCITE_CITY, pIncite_Dlg->actor_unit_id,
+  request_do_action(pIncite_Dlg->action_id, pIncite_Dlg->actor_unit_id,
 pIncite_Dlg->target_id, 0, "");
 }
 
@@ -1988,6 +1989,7 @@
   pIncite_Dlg = fc_calloc(1, sizeof(struct small_diplomat_dialog));
   pIncite_Dlg->actor_unit_id = actor->id;
   pIncite_Dlg->target_id = pCity->id;
+  pIncite_Dlg->action_id = ACTION_SPY_INCITE_CITY;
   pIncite_Dlg->pdialog = fc_calloc(1, sizeof(struct SMALL_DLG));
 
   fc_snprintf(tBuf, ARRAY_SIZE(tBuf), PL_("Treasury contains %d gold.",
@@ -2181,7 +2183,7 @@
   if (Main.event.button.button == SDL_BUTTON_LEFT) {
 if (NULL != game_unit_by_number(pBribe_Dlg->actor_unit_id)
 && NULL != game_unit_by_number(pBribe_Dlg->target_id)) {
-  request_do_action(ACTION_SPY_BRIBE_UNIT, pBribe_Dlg->actor_unit_id,
+  request_do_action(pBribe_Dlg->action_id, pBribe_Dlg->actor_unit_id,
 pBribe_Dlg->target_id, 0, "");
 }
 popdown_bribe_dialog();
@@ -2247,6 +2249,7 @@
   is_unit_move_blocked = TRUE;
 
   pBribe_Dlg = fc_calloc(1, sizeof(struct small_diplomat_dialog));
+  pBribe_Dlg->action_id = ACTION_SPY_BRIBE_UNIT;
   pBribe_Dlg->actor_unit_id = actor->id;
   pBribe_Dlg->target_id = pUnit->id;
   pBribe_Dlg->pdialog = fc_calloc(1, sizeof(struct SMALL_DLG));


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


[Freeciv-commits] r35622 - in /trunk/client: ./ gui-gtk-3.0/ gui-gtk-3.22/ gui-gtk-4.0/ gui-qt/ gui-sdl2/ gui-stub/ include/

2017-05-17 Thread sveinung84
Author: sveinung
Date: Wed May 17 12:45:42 2017
New Revision: 35622

URL: http://svn.gna.org/viewcvs/freeciv?rev=35622=rev
Log:
Prepare popup_bribe_dialog() for gen actions.

Make popup_bribe_dialog() take the action it is a response to as a
parameter. This allows more than one action to use it.

See hrm Feature #660895

Modified:
trunk/client/gui-gtk-3.0/action_dialog.c
trunk/client/gui-gtk-3.22/action_dialog.c
trunk/client/gui-gtk-4.0/action_dialog.c
trunk/client/gui-qt/dialogs.cpp
trunk/client/gui-sdl2/action_dialog.c
trunk/client/gui-stub/dialogs.c
trunk/client/include/dialogs_g.h
trunk/client/packhand.c

Modified: trunk/client/gui-gtk-3.0/action_dialog.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.0/action_dialog.c?rev=35622=35621=35622=diff
==
--- trunk/client/gui-gtk-3.0/action_dialog.c(original)
+++ trunk/client/gui-gtk-3.0/action_dialog.cWed May 17 12:45:42 2017
@@ -449,7 +449,8 @@
 /*
   Popup unit bribe dialog
 **/
-void popup_bribe_dialog(struct unit *actor, struct unit *punit, int cost)
+void popup_bribe_dialog(struct unit *actor, struct unit *punit, int cost,
+const struct action *paction)
 {
   GtkWidget *shell;
   char buf[1024];
@@ -479,8 +480,7 @@
   gtk_window_present(GTK_WINDOW(shell));
   
   g_signal_connect(shell, "response", G_CALLBACK(bribe_response),
-   act_data(ACTION_SPY_BRIBE_UNIT,
-actor->id, 0, punit->id, 0, cost));
+   act_data(paction->id, actor->id, 0, punit->id, 0, cost));
 }
 
 /

Modified: trunk/client/gui-gtk-3.22/action_dialog.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.22/action_dialog.c?rev=35622=35621=35622=diff
==
--- trunk/client/gui-gtk-3.22/action_dialog.c   (original)
+++ trunk/client/gui-gtk-3.22/action_dialog.c   Wed May 17 12:45:42 2017
@@ -449,7 +449,8 @@
 /*
   Popup unit bribe dialog
 **/
-void popup_bribe_dialog(struct unit *actor, struct unit *punit, int cost)
+void popup_bribe_dialog(struct unit *actor, struct unit *punit, int cost,
+const struct action *paction)
 {
   GtkWidget *shell;
   char buf[1024];
@@ -479,8 +480,7 @@
   gtk_window_present(GTK_WINDOW(shell));
   
   g_signal_connect(shell, "response", G_CALLBACK(bribe_response),
-   act_data(ACTION_SPY_BRIBE_UNIT,
-actor->id, 0, punit->id, 0, cost));
+   act_data(paction->id, actor->id, 0, punit->id, 0, cost));
 }
 
 /

Modified: trunk/client/gui-gtk-4.0/action_dialog.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-4.0/action_dialog.c?rev=35622=35621=35622=diff
==
--- trunk/client/gui-gtk-4.0/action_dialog.c(original)
+++ trunk/client/gui-gtk-4.0/action_dialog.cWed May 17 12:45:42 2017
@@ -449,7 +449,8 @@
 /*
   Popup unit bribe dialog
 **/
-void popup_bribe_dialog(struct unit *actor, struct unit *punit, int cost)
+void popup_bribe_dialog(struct unit *actor, struct unit *punit, int cost,
+const struct action *paction)
 {
   GtkWidget *shell;
   char buf[1024];
@@ -479,8 +480,7 @@
   gtk_window_present(GTK_WINDOW(shell));
   
   g_signal_connect(shell, "response", G_CALLBACK(bribe_response),
-   act_data(ACTION_SPY_BRIBE_UNIT,
-actor->id, 0, punit->id, 0, cost));
+   act_data(paction->id, actor->id, 0, punit->id, 0, cost));
 }
 
 /

Modified: trunk/client/gui-qt/dialogs.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/dialogs.cpp?rev=35622=35621=35622=diff
==
--- trunk/client/gui-qt/dialogs.cpp (original)
+++ trunk/client/gui-qt/dialogs.cpp Wed May 17 12:45:42 2017
@@ -2584,7 +2584,8 @@
   Popup a dialog asking a diplomatic unit if it wishes to bribe the
   given enemy unit.
 **/
-void popup_bribe_dialog(struct unit *actor, struct unit *tunit, int cost)
+void popup_bribe_dialog(struct unit *actor, struct unit *tunit, int cost,
+