[Freeciv-commits] r34561 - /trunk/windows/installer_cross/winbuild.sh

2016-11-18 Thread cazfi74
Author: cazfi
Date: Sat Nov 19 03:32:47 2016
New Revision: 34561

URL: http://svn.gna.org/viewcvs/freeciv?rev=34561=rev
Log:
Winbuild.sh now errors out all the way when build fails.

See bug #25308

Modified:
trunk/windows/installer_cross/winbuild.sh

Modified: trunk/windows/installer_cross/winbuild.sh
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/windows/installer_cross/winbuild.sh?rev=34561=34560=34561=diff
==
--- trunk/windows/installer_cross/winbuild.sh   (original)
+++ trunk/windows/installer_cross/winbuild.sh   Sat Nov 19 03:32:47 2016
@@ -81,7 +81,7 @@
 
 INSTALL_DIR="$(pwd)/freeciv-${VERREV}"
 
-(
+if ! (
 cd build-$SETUP
 
 if ! ../../../configure CPPFLAGS="-I${DLLSPATH}/include 
-D_WIN32_WINNT=${MIN_WINVER}" CFLAGS="-Wno-error" 
PKG_CONFIG_LIBDIR="${DLLSPATH}/lib/pkgconfig" --enable-sys-tolua-cmd 
--with-magickwand="${DLLSPATH}/bin" --prefix="/" --enable-client=$CLIENTS 
--enable-fcmp=$FCMP --enable-svnrev --enable-debug --host=$TARGET 
--build=$(../../../bootstrap/config.guess) --with-libiconv-prefix=${DLLSPATH} 
--with-sqlite3-prefix=${DLLSPATH} --with-followtag="crosser" --enable-crosser 
--enable-ai-static=classic --disable-freeciv-manual --enable-sdl-mixer=sdl2 
--with-qt5-includes=${DLLSPATH}/include --with-qt5-libs=${DLLSPATH}/lib 
--with-tinycthread
@@ -100,7 +100,9 @@
   echo "Storing fc_config.h failed" >&2
   exit 1
 fi
-)
+) then
+  exit 1
+fi
 
 if ! 7z a -r freeciv-${VERREV}.7z freeciv-${VERREV}
 then


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


[Freeciv-commits] r34560 - /branches/S2_5/translations/nations/uk.po

2016-11-18 Thread swiatos
Author: swiatos
Date: Sat Nov 19 01:15:54 2016
New Revision: 34560

URL: http://svn.gna.org/viewcvs/freeciv?rev=34560=rev
Log:
update fro nations/uk.po : urgent corrections. left 390 empties.

Modified:
branches/S2_5/translations/nations/uk.po

Modified: branches/S2_5/translations/nations/uk.po
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/translations/nations/uk.po?rev=34560=34559=34560=diff
==
--- branches/S2_5/translations/nations/uk.po(original)
+++ branches/S2_5/translations/nations/uk.poSat Nov 19 01:15:54 2016
@@ -4,11 +4,11 @@
 # Roman Festchook , 2003.
 msgid ""
 msgstr ""
-"Project-Id-Version: freeciv 1.14.0\n"
+"Project-Id-Version: freeciv 2.5.5\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2016-07-30 12:10+0100\n"
-"PO-Revision-Date: 2011-10-06 17:27+0300\n"
-"Last-Translator: Vadim Mikhnevych \n"
+"PO-Revision-Date: 2016-11-19 1:27+0300\n"
+"Last-Translator: Swiatoslav Golda \n"
 "Language-Team: Ukrainian \n"
 "Language: uk\n"
 "MIME-Version: 1.0\n"
@@ -4163,7 +4163,7 @@
 
 #: data/nation/dryad.ruleset:3
 msgid "Dryad"
-msgstr "Дріди"
+msgstr "Дріади"
 
 #: data/nation/dryad.ruleset:4
 msgid "?plural:Dryads"


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


[Freeciv-commits] r34559 - /branches/S2_5/translations/nations/uk.po

2016-11-18 Thread swiatos
Author: swiatos
Date: Sat Nov 19 00:38:15 2016
New Revision: 34559

URL: http://svn.gna.org/viewcvs/freeciv?rev=34559=rev
Log:
update fro nations/uk.po : urgent corrections. left 390 empties.

Modified:
branches/S2_5/translations/nations/uk.po

Modified: branches/S2_5/translations/nations/uk.po
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/translations/nations/uk.po?rev=34559=34558=34559=diff
==
--- branches/S2_5/translations/nations/uk.po(original)
+++ branches/S2_5/translations/nations/uk.poSat Nov 19 00:38:15 2016
@@ -19,7 +19,7 @@
 
 #: data/nation/abkhaz.ruleset:3
 msgid "Abkhaz"
-msgstr "Абхазький"
+msgstr "Абхази"
 
 #: data/nation/abkhaz.ruleset:4
 msgid "?plural:Abkhazians"
@@ -231,7 +231,7 @@
 
 #: data/nation/acadian.ruleset:3
 msgid "Acadian"
-msgstr "Акадський"
+msgstr "Акадійці"
 
 #: data/nation/acadian.ruleset:4
 msgid "?plural:Acadians"
@@ -798,7 +798,7 @@
 
 #: data/nation/aleut.ruleset:3
 msgid "Aleut"
-msgstr "Алеутський"
+msgstr "Алеути"
 
 #: data/nation/aleut.ruleset:4
 msgid "?plural:Aleuts"
@@ -1398,7 +1398,7 @@
 "great-great-grandson of Noah. The modern Republic of Armenia gained "
 "independence from the Soviet Union in 1991."
 msgstr ""
-"Згідно легенди, Вірмени - це нащадки Хайка, 
пра-правнука Ноя. Сучасна "
+"За легендою, Вірмени - це нащадки Хайка, 
пра-правнука Ноя. Сучасна "
 "Республіка Вірменія здобула незалежність 
від Радянського Союзу в 1991."
 
 #: data/nation/armenian.ruleset:24 data/nation/assyrian.ruleset:21
@@ -2768,7 +2768,7 @@
 "founded Bulgaria in 681. This was the first Slavic nation-state in history."
 msgstr ""
 "Булгарський лідер хан Аспарух привів свій 
народ до північних Балкан, та "
-"заснував Болграію у 681 році. Це була перша 
славянська держава у істрорії."
+"заснував Болгарію у 681 році. Це була перша 
славянська держава у історії."
 
 #: data/nation/burgundian.ruleset:3
 msgid "Burgundian"
@@ -2911,7 +2911,7 @@
 
 #: data/nation/californian.ruleset:3
 msgid "Californian"
-msgstr "Каліфорнійський"
+msgstr "Каліфорнійці"
 
 #: data/nation/californian.ruleset:4
 msgid "?plural:Californians"
@@ -2961,7 +2961,7 @@
 
 #: data/nation/cameroonian.ruleset:3
 msgid "Cameroonian"
-msgstr "Камерунський"
+msgstr "Камерунці"
 
 #: data/nation/cameroonian.ruleset:4
 msgid "?plural:Cameroonians"
@@ -4589,7 +4589,7 @@
 
 #: data/nation/flemish.ruleset:3
 msgid "Flemish"
-msgstr "Фламандський"
+msgstr "Фламандці"
 
 #: data/nation/flemish.ruleset:4
 msgid "?plural:Flemings"
@@ -6987,7 +6987,7 @@
 
 #: data/nation/malawian.ruleset:3
 msgid "Malawian"
-msgstr "Малавійський"
+msgstr "Малавійці"
 
 #: data/nation/malawian.ruleset:4
 msgid "?plural:Malawians"
@@ -7678,7 +7678,7 @@
 
 #: data/nation/mozambican.ruleset:3
 msgid "Mozambican"
-msgstr "Мозамбіцький"
+msgstr "Мозамбік"
 
 #: data/nation/mozambican.ruleset:4
 msgid "?plural:Mozambicans"
@@ -7692,7 +7692,7 @@
 
 #: data/nation/mughal.ruleset:3
 msgid "Mughal"
-msgstr "Могольський"
+msgstr "Моголи"
 
 #: data/nation/mughal.ruleset:4
 msgid "?plural:Mughals"
@@ -8233,7 +8233,7 @@
 
 #: data/nation/ohlone.ruleset:2
 msgid "Ohlone"
-msgstr "Олонський"
+msgstr "Олоні"
 
 #: data/nation/ohlone.ruleset:3
 msgid "?plural:Ohlone"
@@ -10302,7 +10302,7 @@
 
 #: data/nation/tahitian.ruleset:3
 msgid "Tahitian"
-msgstr "Таїтійський"
+msgstr "Таїті"
 
 #: data/nation/tahitian.ruleset:4
 msgid "?plural:Tahitians"
@@ -11319,7 +11319,7 @@
 
 #: data/nation/walloon.ruleset:3
 msgid "Walloon"
-msgstr "Валлонський"
+msgstr "Валлони"
 
 #: data/nation/walloon.ruleset:4
 msgid "?plural:Walloons"


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


[Freeciv-commits] r34558 - /trunk/client/gui-qt/gotodlg.cpp

2016-11-18 Thread mlewczuk80
Author: mir3x
Date: Fri Nov 18 09:32:52 2016
New Revision: 34558

URL: http://svn.gna.org/viewcvs/freeciv?rev=34558=rev
Log:
Qt client - remove goto dialog stylesheet from code

See patch #8001


Modified:
trunk/client/gui-qt/gotodlg.cpp

Modified: trunk/client/gui-qt/gotodlg.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/gotodlg.cpp?rev=34558=34557=34558=diff
==
--- trunk/client/gui-qt/gotodlg.cpp (original)
+++ trunk/client/gui-qt/gotodlg.cpp Fri Nov 18 09:32:52 2016
@@ -41,29 +41,7 @@
 {
   QStringList headers_lst;
   QHBoxLayout *hb;
-  setStyleSheet("QPushButton {background-color: transparent;}"
-"QPushButton {color: #ff;}"
-"QPushButton:enabled {color: #ff;}"
-"QPushButton:disabled {color: grey;}"
-"QPushButton:hover:disabled {color: transparent;}"
-"QPushButton:hover {background-color: blue;}"
-"QPushButton {min-width: 80px;}"
-"QPushButton {border: noborder;}"
-"QScrollBar:vertical "
-"{border: 1px solid #90A4FF; background: transparent;}"
-"QScrollBar::sub-line:vertical {width: 0px;height: 0px}"
-"QScrollBar::sub-page:vertical {width: 0px;height: 0px}"
-"QScrollBar::add-line:vertical {width: 0px;height: 0px}"
-"QScrollBar::add-page:vertical {width: 0px;height: 0px}"
-"QScrollBar::handle:vertical {background: #90A4FF;"
-"min-height: 20px}"
-"QTableWidget {background-color: transparent;}"
-"QTableWidget:item {color: white;}"
-"QTableCornerButton::section "
-"{background-color: transparent;}"
-"QLabel {color: grey;}"
-"QHeaderView::section { background-color: "
-"QColor(90,90,90,90);}");
+
   setParent(parent);
   headers_lst << QString(_("City")) << QString(_("Nation"))
   << QString(_("Airlift"));
@@ -89,8 +67,9 @@
   goto_tab->setSelectionMode(QAbstractItemView::SingleSelection);
   goto_tab->setColumnCount(3);
   goto_tab->setHorizontalHeaderLabels(headers_lst);
-  goto_tab->horizontalHeader()->setStretchLastSection(true);
   goto_tab->setSortingEnabled(true);
+  goto_tab->horizontalHeader()->setSectionResizeMode(
+ QHeaderView::ResizeToContents);
 
   layout->addWidget(goto_tab, 0, 0, 4, 4);
   layout->addItem(hb, 4, 0, 1, 2);


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


[Freeciv-commits] r34557 - /branches/S2_6/client/gui-qt/gotodlg.cpp

2016-11-18 Thread mlewczuk80
Author: mir3x
Date: Fri Nov 18 09:32:43 2016
New Revision: 34557

URL: http://svn.gna.org/viewcvs/freeciv?rev=34557=rev
Log:
Qt client - remove goto dialog stylesheet from code

See patch #8001


Modified:
branches/S2_6/client/gui-qt/gotodlg.cpp

Modified: branches/S2_6/client/gui-qt/gotodlg.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-qt/gotodlg.cpp?rev=34557=34556=34557=diff
==
--- branches/S2_6/client/gui-qt/gotodlg.cpp (original)
+++ branches/S2_6/client/gui-qt/gotodlg.cpp Fri Nov 18 09:32:43 2016
@@ -41,29 +41,7 @@
 {
   QStringList headers_lst;
   QHBoxLayout *hb;
-  setStyleSheet("QPushButton {background-color: transparent;}"
-"QPushButton {color: #ff;}"
-"QPushButton:enabled {color: #ff;}"
-"QPushButton:disabled {color: grey;}"
-"QPushButton:hover:disabled {color: transparent;}"
-"QPushButton:hover {background-color: blue;}"
-"QPushButton {min-width: 80px;}"
-"QPushButton {border: noborder;}"
-"QScrollBar:vertical "
-"{border: 1px solid #90A4FF; background: transparent;}"
-"QScrollBar::sub-line:vertical {width: 0px;height: 0px}"
-"QScrollBar::sub-page:vertical {width: 0px;height: 0px}"
-"QScrollBar::add-line:vertical {width: 0px;height: 0px}"
-"QScrollBar::add-page:vertical {width: 0px;height: 0px}"
-"QScrollBar::handle:vertical {background: #90A4FF;"
-"min-height: 20px}"
-"QTableWidget {background-color: transparent;}"
-"QTableWidget:item {color: white;}"
-"QTableCornerButton::section "
-"{background-color: transparent;}"
-"QLabel {color: grey;}"
-"QHeaderView::section { background-color: "
-"QColor(90,90,90,90);}");
+
   setParent(parent);
   headers_lst << QString(_("City")) << QString(_("Nation"))
   << QString(_("Airlift"));
@@ -89,8 +67,9 @@
   goto_tab->setSelectionMode(QAbstractItemView::SingleSelection);
   goto_tab->setColumnCount(3);
   goto_tab->setHorizontalHeaderLabels(headers_lst);
-  goto_tab->horizontalHeader()->setStretchLastSection(true);
   goto_tab->setSortingEnabled(true);
+  goto_tab->horizontalHeader()->setSectionResizeMode(
+ QHeaderView::ResizeToContents);
 
   layout->addWidget(goto_tab, 0, 0, 4, 4);
   layout->addItem(hb, 4, 0, 1, 2);


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


[Freeciv-commits] r34556 - /trunk/client/gui-qt/pages.cpp

2016-11-18 Thread mlewczuk80
Author: mir3x
Date: Fri Nov 18 09:15:53 2016
New Revision: 34556

URL: http://svn.gna.org/viewcvs/freeciv?rev=34556=rev
Log:
Qt client - add tooltip to sidebar cities icon

See patch #8000


Modified:
trunk/client/gui-qt/pages.cpp

Modified: trunk/client/gui-qt/pages.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/pages.cpp?rev=34556=34555=34556=diff
==
--- trunk/client/gui-qt/pages.cpp   (original)
+++ trunk/client/gui-qt/pages.cpp   Fri Nov 18 09:15:53 2016
@@ -55,6 +55,7 @@
 const char *get_government_tooltip(void);
 const char *get_info_label_text_popup(void);
 const char *get_info_label_text(bool);
+const char *text_happiness_cities(const struct city *pcity);
 }
 
 int last_center_capital = 0;
@@ -2082,6 +2083,10 @@
 fc_snprintf(buf, sizeof(buf), _("Income: %dTotal Costs: %d"),
 tax, building_total + unit_total);
 sw_economy->set_tooltip(buf);
+if (player_capital(client_player())) {
+  sw_cities->set_tooltip(text_happiness_cities(
+  player_capital(client_player(;
+}
   } else {
 sw_tax->set_tooltip("");
 sw_science->set_tooltip("");


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


[Freeciv-commits] r34555 - /branches/S2_6/client/gui-qt/pages.cpp

2016-11-18 Thread mlewczuk80
Author: mir3x
Date: Fri Nov 18 09:15:45 2016
New Revision: 34555

URL: http://svn.gna.org/viewcvs/freeciv?rev=34555=rev
Log:
Qt client - add tooltip to sidebar cities icon

See patch #8000


Modified:
branches/S2_6/client/gui-qt/pages.cpp

Modified: branches/S2_6/client/gui-qt/pages.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-qt/pages.cpp?rev=34555=34554=34555=diff
==
--- branches/S2_6/client/gui-qt/pages.cpp   (original)
+++ branches/S2_6/client/gui-qt/pages.cpp   Fri Nov 18 09:15:45 2016
@@ -55,6 +55,7 @@
 const char *get_government_tooltip(void);
 const char *get_info_label_text_popup(void);
 const char *get_info_label_text(bool);
+const char *text_happiness_cities(const struct city *pcity);
 }
 
 int last_center_capital = 0;
@@ -2076,6 +2077,10 @@
 fc_snprintf(buf, sizeof(buf), _("Income: %dTotal Costs: %d"),
 tax, building_total + unit_total);
 sw_economy->set_tooltip(buf);
+if (player_capital(client_player())) {
+  sw_cities->set_tooltip(text_happiness_cities(
+  player_capital(client_player(;
+}
   } else {
 sw_tax->set_tooltip("");
 sw_science->set_tooltip("");


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


[Freeciv-commits] r34554 - in /trunk/client/gui-qt: menu.cpp pages.cpp

2016-11-18 Thread mlewczuk80
Author: mir3x
Date: Fri Nov 18 09:13:42 2016
New Revision: 34554

URL: http://svn.gna.org/viewcvs/freeciv?rev=34554=rev
Log:
Qt client - use mouse wheel up over sidebar icons to cycle via cities

See patch #7999


Modified:
trunk/client/gui-qt/menu.cpp
trunk/client/gui-qt/pages.cpp

Modified: trunk/client/gui-qt/menu.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/menu.cpp?rev=34554=34553=34554=diff
==
--- trunk/client/gui-qt/menu.cpp(original)
+++ trunk/client/gui-qt/menu.cppFri Nov 18 09:13:42 2016
@@ -63,6 +63,9 @@
 static bool tradecity_rand(const trade_city *t1, const trade_city *t2);
 static void enable_interface(bool enable);
 extern int last_center_enemy;
+extern int last_center_capital;
+extern int last_center_player_city;
+extern int last_center_enemy_city;
 /**
   New turn callback
 **/
@@ -71,6 +74,9 @@
   gui()->rallies.run();
   real_menus_update();
   last_center_enemy = 0;
+  last_center_capital = 0;
+  last_center_player_city = 0;
+  last_center_enemy_city = 0;
 }
 
 /**

Modified: trunk/client/gui-qt/pages.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/pages.cpp?rev=34554=34553=34554=diff
==
--- trunk/client/gui-qt/pages.cpp   (original)
+++ trunk/client/gui-qt/pages.cpp   Fri Nov 18 09:13:42 2016
@@ -57,7 +57,13 @@
 const char *get_info_label_text(bool);
 }
 
+int last_center_capital = 0;
+int last_center_player_city = 0;
+int last_center_enemy_city = 0;
 extern void popup_shortcuts_dialog();
+static void center_next_enemy_city();
+static void center_next_player_city();
+static void center_next_player_capital();
 static struct server_scan *meta_scan, *lan_scan;
 static bool holding_srv_list_mutex = false;
 static enum connection_state connection_status;
@@ -702,8 +708,12 @@
   sw_cities = new fc_sidewidget(fc_icons::instance()->get_pixmap("cities"),
 _("Cities"), "CTS",
 city_report_dialog_popup);
+  sw_cities->set_wheel_up(center_next_enemy_city);
+  sw_cities->set_wheel_down(center_next_player_city);
   sw_diplo = new fc_sidewidget(fc_icons::instance()->get_pixmap("nations"),
_("Nations"), "PLR", popup_players_dialog);
+  sw_diplo->set_wheel_up(center_next_player_capital);
+  sw_diplo->set_wheel_down(key_center_capital);
   sw_science = new fc_sidewidget(fc_icons::instance()->get_pixmap("research"),
  _("Research"), "SCI",
  science_report_dialog_popup);
@@ -2081,6 +2091,120 @@
   sw_indicators->set_tooltip(QString(get_info_label_text_popup()));
 }
 
+/
+  Centers next enemy city on view
+/
+void center_next_enemy_city()
+{
+  bool center_next = false;
+  bool first_tile = false;
+  int first_id;
+  struct tile *ptile = nullptr;
+
+  players_iterate(pplayer) {
+if (pplayer != client_player()) {
+  city_list_iterate(pplayer->cities, pcity) {
+if (first_tile == false) {
+  first_tile = true;
+  ptile = pcity->tile;
+  first_id = pcity->id;
+}
+if ((last_center_enemy_city == 0) || center_next == true) {
+  last_center_enemy_city = pcity->id;
+  center_tile_mapcanvas(pcity->tile);
+  return;
+}
+if (pcity->id == last_center_enemy_city) {
+  center_next = true;
+}
+  } city_list_iterate_end;
+}
+  } players_iterate_end;
+
+  if (ptile != nullptr) {
+center_tile_mapcanvas(ptile);
+last_center_enemy_city = first_id;
+  }
+}
+
+/
+  Centers next player city on view
+/
+void center_next_player_city()
+{
+  bool center_next = false;
+  bool first_tile = false;
+  int first_id;
+  struct tile *ptile = nullptr;
+
+  players_iterate(pplayer) {
+if (pplayer == client_player()) {
+  city_list_iterate(pplayer->cities, pcity) {
+if (first_tile == false) {
+  first_tile = true;
+  ptile = pcity->tile;
+  first_id = pcity->id;
+}
+if ((last_center_player_city == 0) || center_next == true) {
+  last_center_player_city = pcity->id;
+  center_tile_mapcanvas(pcity->tile);
+  return;
+}
+if (pcity->id == last_center_player_city) {
+  center_next = true;
+}
+  } city_list_iterate_end;
+   

[Freeciv-commits] r34553 - in /branches/S2_6/client/gui-qt: menu.cpp pages.cpp

2016-11-18 Thread mlewczuk80
Author: mir3x
Date: Fri Nov 18 09:13:32 2016
New Revision: 34553

URL: http://svn.gna.org/viewcvs/freeciv?rev=34553=rev
Log:
Qt client - use mouse wheel up over sidebar icons to cycle via cities

See patch #7999


Modified:
branches/S2_6/client/gui-qt/menu.cpp
branches/S2_6/client/gui-qt/pages.cpp

Modified: branches/S2_6/client/gui-qt/menu.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-qt/menu.cpp?rev=34553=34552=34553=diff
==
--- branches/S2_6/client/gui-qt/menu.cpp(original)
+++ branches/S2_6/client/gui-qt/menu.cppFri Nov 18 09:13:32 2016
@@ -63,6 +63,9 @@
 static bool tradecity_rand(const trade_city *t1, const trade_city *t2);
 static void enable_interface(bool enable);
 extern int last_center_enemy;
+extern int last_center_capital;
+extern int last_center_player_city;
+extern int last_center_enemy_city;
 /**
   New turn callback
 **/
@@ -71,6 +74,9 @@
   gui()->rallies.run();
   real_menus_update();
   last_center_enemy = 0;
+  last_center_capital = 0;
+  last_center_player_city = 0;
+  last_center_enemy_city = 0;
 }
 
 /**

Modified: branches/S2_6/client/gui-qt/pages.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-qt/pages.cpp?rev=34553=34552=34553=diff
==
--- branches/S2_6/client/gui-qt/pages.cpp   (original)
+++ branches/S2_6/client/gui-qt/pages.cpp   Fri Nov 18 09:13:32 2016
@@ -57,7 +57,13 @@
 const char *get_info_label_text(bool);
 }
 
+int last_center_capital = 0;
+int last_center_player_city = 0;
+int last_center_enemy_city = 0;
 extern void popup_shortcuts_dialog();
+static void center_next_enemy_city();
+static void center_next_player_city();
+static void center_next_player_capital();
 static struct server_scan *meta_scan, *lan_scan;
 static bool holding_srv_list_mutex = false;
 static enum connection_state connection_status;
@@ -702,8 +708,12 @@
   sw_cities = new fc_sidewidget(fc_icons::instance()->get_pixmap("cities"),
 _("Cities"), "CTS",
 city_report_dialog_popup);
+  sw_cities->set_wheel_up(center_next_enemy_city);
+  sw_cities->set_wheel_down(center_next_player_city);
   sw_diplo = new fc_sidewidget(fc_icons::instance()->get_pixmap("nations"),
_("Nations"), "PLR", popup_players_dialog);
+  sw_diplo->set_wheel_up(center_next_player_capital);
+  sw_diplo->set_wheel_down(key_center_capital);
   sw_science = new fc_sidewidget(fc_icons::instance()->get_pixmap("research"),
  _("Research"), "SCI",
  science_report_dialog_popup);
@@ -2075,6 +2085,120 @@
   sw_indicators->set_tooltip(QString(get_info_label_text_popup()));
 }
 
+/
+  Centers next enemy city on view
+/
+void center_next_enemy_city()
+{
+  bool center_next = false;
+  bool first_tile = false;
+  int first_id;
+  struct tile *ptile = nullptr;
+
+  players_iterate(pplayer) {
+if (pplayer != client_player()) {
+  city_list_iterate(pplayer->cities, pcity) {
+if (first_tile == false) {
+  first_tile = true;
+  ptile = pcity->tile;
+  first_id = pcity->id;
+}
+if ((last_center_enemy_city == 0) || center_next == true) {
+  last_center_enemy_city = pcity->id;
+  center_tile_mapcanvas(pcity->tile);
+  return;
+}
+if (pcity->id == last_center_enemy_city) {
+  center_next = true;
+}
+  } city_list_iterate_end;
+}
+  } players_iterate_end;
+
+  if (ptile != nullptr) {
+center_tile_mapcanvas(ptile);
+last_center_enemy_city = first_id;
+  }
+}
+
+/
+  Centers next player city on view
+/
+void center_next_player_city()
+{
+  bool center_next = false;
+  bool first_tile = false;
+  int first_id;
+  struct tile *ptile = nullptr;
+
+  players_iterate(pplayer) {
+if (pplayer == client_player()) {
+  city_list_iterate(pplayer->cities, pcity) {
+if (first_tile == false) {
+  first_tile = true;
+  ptile = pcity->tile;
+  first_id = pcity->id;
+}
+if ((last_center_player_city == 0) || center_next == true) {
+  last_center_player_city = pcity->id;
+  center_tile_mapcanvas(pcity->tile);
+  return;
+}
+if (pcity->id == last_center_player_city) 

[Freeciv-commits] r34552 - in /trunk/client/gui-qt: menu.cpp pages.cpp

2016-11-18 Thread mlewczuk80
Author: mir3x
Date: Fri Nov 18 09:10:00 2016
New Revision: 34552

URL: http://svn.gna.org/viewcvs/freeciv?rev=34552=rev
Log:
Qt client - use wheel up over sidebar unit icon to center enemy units

See patch #7998


Modified:
trunk/client/gui-qt/menu.cpp
trunk/client/gui-qt/pages.cpp

Modified: trunk/client/gui-qt/menu.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/menu.cpp?rev=34552=34551=34552=diff
==
--- trunk/client/gui-qt/menu.cpp(original)
+++ trunk/client/gui-qt/menu.cppFri Nov 18 09:10:00 2016
@@ -62,6 +62,7 @@
 
 static bool tradecity_rand(const trade_city *t1, const trade_city *t2);
 static void enable_interface(bool enable);
+extern int last_center_enemy;
 /**
   New turn callback
 **/
@@ -69,6 +70,7 @@
 {
   gui()->rallies.run();
   real_menus_update();
+  last_center_enemy = 0;
 }
 
 /**

Modified: trunk/client/gui-qt/pages.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/pages.cpp?rev=34552=34551=34552=diff
==
--- trunk/client/gui-qt/pages.cpp   (original)
+++ trunk/client/gui-qt/pages.cpp   Fri Nov 18 09:10:00 2016
@@ -62,8 +62,8 @@
 static bool holding_srv_list_mutex = false;
 static enum connection_state connection_status;
 static struct terrain *char2terrain(char ch);
-
-
+static void cycle_enemy_units();
+int last_center_enemy = 0;
 /
   Helper function for drawing map of savegames. Converts stored map char in
   savefile to proper terrain.
@@ -714,7 +714,7 @@
  _("Turn Done"), "", side_finish_turn);
   sw_endturn->set_right_click(side_indicators_menu);
   sw_cunit->set_right_click(side_center_unit);
-  sw_cunit->set_wheel_up(key_recall_previous_focus_unit);
+  sw_cunit->set_wheel_up(cycle_enemy_units);
   sw_cunit->set_wheel_down(key_unit_wait);
   sw_diplo->set_right_click(side_right_click_diplomacy);
 
@@ -2094,3 +2094,38 @@
   }
 }
 
+/***
+  Center on next enemy unit
+***/
+void cycle_enemy_units()
+{
+  bool center_next = false;
+  bool first_tile = false;
+  int first_id;
+  struct tile *ptile = nullptr;
+
+  players_iterate(pplayer) {
+if (pplayer != client_player()) {
+  unit_list_iterate(pplayer->units, punit) {
+if (first_tile == false) {
+  first_tile = true;
+  ptile = punit->tile;
+  first_id = punit->id;
+}
+if ((last_center_enemy == 0) || center_next == true) {
+  last_center_enemy = punit->id;
+  center_tile_mapcanvas(punit->tile);
+  return;
+}
+if (punit->id == last_center_enemy) {
+  center_next = true;
+}
+  } unit_list_iterate_end;
+}
+  } players_iterate_end;
+
+  if (ptile != nullptr) {
+center_tile_mapcanvas(ptile);
+last_center_enemy = first_id;
+  }
+}


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


[Freeciv-commits] r34551 - in /branches/S2_6/client/gui-qt: menu.cpp pages.cpp

2016-11-18 Thread mlewczuk80
Author: mir3x
Date: Fri Nov 18 09:09:34 2016
New Revision: 34551

URL: http://svn.gna.org/viewcvs/freeciv?rev=34551=rev
Log:
Qt client - use wheel up over sidebar unit icon to center enemy units

See patch #7998


Modified:
branches/S2_6/client/gui-qt/menu.cpp
branches/S2_6/client/gui-qt/pages.cpp

Modified: branches/S2_6/client/gui-qt/menu.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-qt/menu.cpp?rev=34551=34550=34551=diff
==
--- branches/S2_6/client/gui-qt/menu.cpp(original)
+++ branches/S2_6/client/gui-qt/menu.cppFri Nov 18 09:09:34 2016
@@ -62,6 +62,7 @@
 
 static bool tradecity_rand(const trade_city *t1, const trade_city *t2);
 static void enable_interface(bool enable);
+extern int last_center_enemy;
 /**
   New turn callback
 **/
@@ -69,6 +70,7 @@
 {
   gui()->rallies.run();
   real_menus_update();
+  last_center_enemy = 0;
 }
 
 /**

Modified: branches/S2_6/client/gui-qt/pages.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-qt/pages.cpp?rev=34551=34550=34551=diff
==
--- branches/S2_6/client/gui-qt/pages.cpp   (original)
+++ branches/S2_6/client/gui-qt/pages.cpp   Fri Nov 18 09:09:34 2016
@@ -62,8 +62,8 @@
 static bool holding_srv_list_mutex = false;
 static enum connection_state connection_status;
 static struct terrain *char2terrain(char ch);
-
-
+static void cycle_enemy_units();
+int last_center_enemy = 0;
 /
   Helper function for drawing map of savegames. Converts stored map char in
   savefile to proper terrain.
@@ -714,7 +714,7 @@
  _("Turn Done"), "", side_finish_turn);
   sw_endturn->set_right_click(side_indicators_menu);
   sw_cunit->set_right_click(side_center_unit);
-  sw_cunit->set_wheel_up(key_recall_previous_focus_unit);
+  sw_cunit->set_wheel_up(cycle_enemy_units);
   sw_cunit->set_wheel_down(key_unit_wait);
   sw_diplo->set_right_click(side_right_click_diplomacy);
 
@@ -2088,3 +2088,38 @@
   }
 }
 
+/***
+  Center on next enemy unit
+***/
+void cycle_enemy_units()
+{
+  bool center_next = false;
+  bool first_tile = false;
+  int first_id;
+  struct tile *ptile = nullptr;
+
+  players_iterate(pplayer) {
+if (pplayer != client_player()) {
+  unit_list_iterate(pplayer->units, punit) {
+if (first_tile == false) {
+  first_tile = true;
+  ptile = punit->tile;
+  first_id = punit->id;
+}
+if ((last_center_enemy == 0) || center_next == true) {
+  last_center_enemy = punit->id;
+  center_tile_mapcanvas(punit->tile);
+  return;
+}
+if (punit->id == last_center_enemy) {
+  center_next = true;
+}
+  } unit_list_iterate_end;
+}
+  } players_iterate_end;
+
+  if (ptile != nullptr) {
+center_tile_mapcanvas(ptile);
+last_center_enemy = first_id;
+  }
+}


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


[Freeciv-commits] r34550 - /branches/S2_5/server/unittools.c

2016-11-18 Thread mlewczuk80
Author: mir3x
Date: Fri Nov 18 09:02:22 2016
New Revision: 34550

URL: http://svn.gna.org/viewcvs/freeciv?rev=34550=rev
Log:
Flight units does not return automatically (sometimes)
Reported by Christian Stein 

See bug #25294


Modified:
branches/S2_5/server/unittools.c

Modified: branches/S2_5/server/unittools.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/unittools.c?rev=34550=34549=34550=diff
==
--- branches/S2_5/server/unittools.c(original)
+++ branches/S2_5/server/unittools.cFri Nov 18 09:02:22 2016
@@ -423,6 +423,9 @@
   struct pf_parameter parameter;
 
   pft_fill_unit_parameter(, punit);
+  parameter.move_rate = 0;
+  parameter.is_pos_dangerous = NULL;
+  parameter.get_moves_left_req = NULL;
   pfm = pf_map_new();
 
   pf_map_move_costs_iterate(pfm, ptile, move_cost, TRUE) {


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