[Freeciv-commits] r34205 - in /trunk/client: gui-gtk-3.0/citydlg.c gui-gtk-3.22/citydlg.c
Author: cazfi Date: Sat Oct 22 16:40:11 2016 New Revision: 34205 URL: http://svn.gna.org/viewcvs/freeciv?rev=34205&view=rev Log: Do not use small screen layout for gtk3-clients' citydlg when screen size is unknown. See patch #7861 Modified: trunk/client/gui-gtk-3.0/citydlg.c trunk/client/gui-gtk-3.22/citydlg.c 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=34205&r1=34204&r2=34205&view=diff == --- trunk/client/gui-gtk-3.0/citydlg.c (original) +++ trunk/client/gui-gtk-3.0/citydlg.c Sat Oct 22 16:40:11 2016 @@ -325,11 +325,17 @@ */ static void initialize_city_dialogs(void) { + int height; + fc_assert_ret(!city_dialogs_have_been_initialised); dialog_list = dialog_list_new(); init_citydlg_dimensions(); - if (screen_height() <= TINYSCREEN_MAX_HEIGHT) { + height = screen_height(); + + /* Use default layout when height cannot be determined + * (when height == 0) */ + if (height > 0 && height <= TINYSCREEN_MAX_HEIGHT) { low_citydlg = TRUE; } else { low_citydlg = FALSE; Modified: trunk/client/gui-gtk-3.22/citydlg.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.22/citydlg.c?rev=34205&r1=34204&r2=34205&view=diff == --- trunk/client/gui-gtk-3.22/citydlg.c (original) +++ trunk/client/gui-gtk-3.22/citydlg.c Sat Oct 22 16:40:11 2016 @@ -326,11 +326,17 @@ */ static void initialize_city_dialogs(void) { + int height; + fc_assert_ret(!city_dialogs_have_been_initialised); dialog_list = dialog_list_new(); init_citydlg_dimensions(); - if (screen_height() <= TINYSCREEN_MAX_HEIGHT) { + height = screen_height(); + + /* Use default layout when height cannot be determined + * (when height == 0) */ + if (height > 0 && height <= TINYSCREEN_MAX_HEIGHT) { low_citydlg = TRUE; } else { low_citydlg = FALSE; ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34203 - in /trunk: doc/README.msys2 windows/installer_msys2/Makefile
Author: cazfi Date: Fri Oct 21 21:54:17 2016 New Revision: 34203 URL: http://svn.gna.org/viewcvs/freeciv?rev=34203&view=rev Log: Updated msys2 environment to 161018 level. See patch #7757 Modified: trunk/doc/README.msys2 trunk/windows/installer_msys2/Makefile Modified: trunk/doc/README.msys2 URL: http://svn.gna.org/viewcvs/freeciv/trunk/doc/README.msys2?rev=34203&r1=34202&r2=34203&view=diff == --- trunk/doc/README.msys2 (original) +++ trunk/doc/README.msys2 Fri Oct 21 21:54:17 2016 @@ -39,7 +39,7 @@ > pacman -Syu 2) Install following packages with 'pacman -Su' - As of 22-Sep-16, one has to use also '--force' option. + As of 18-Oct-16, one has to use also '--force' option. 2.1) Packages needed for building freeciv These packages are needed even if you don't plan to make installer, @@ -118,7 +118,7 @@ win64 host: --- -msys2-freeciv-win64-160922.7z, based on +msys2-freeciv-win64-161018.7z, based on https://sourceforge.net/projects/msys2/files/Base/x86-64/msys2-x86_64-20160921.exe Only win64 target is included - replace with 'x86_64' in package names below @@ -135,6 +135,7 @@ - libtool - autoconf - python +- gdb - mingw-w64--gcc - mingw-w64--icu - mingw-w64--curl Modified: trunk/windows/installer_msys2/Makefile URL: http://svn.gna.org/viewcvs/freeciv/trunk/windows/installer_msys2/Makefile?rev=34203&r1=34202&r2=34203&view=diff == --- trunk/windows/installer_msys2/Makefile (original) +++ trunk/windows/installer_msys2/Makefile Fri Oct 21 21:54:17 2016 @@ -166,7 +166,7 @@ SOUND_DLLS := \ SDL2.dll \ - SDL2_mixer.dll \ + libSDL2_mixer-2-0-0.dll \ libFLAC-8.dll \ libfluidsynth-1.dll \ libmad-0.dll \ @@ -190,8 +190,8 @@ libcurl-4.dll \ libgmp-10.dll \ libgnutls-30.dll \ - libhogweed-4-2.dll \ - libnettle-6-2.dll \ + libhogweed-4.dll \ + libnettle-6.dll \ libp11-kit-0.dll \ libtasn1-6.dll \ libatk-1.0-0.dll \ @@ -317,8 +317,8 @@ libcurl-4.dll \ libgmp-10.dll \ libgnutls-30.dll \ - libhogweed-4-2.dll \ - libnettle-6-2.dll \ + libhogweed-4.dll \ + libnettle-6.dll \ libp11-kit-0.dll \ libtasn1-6.dll \ libatk-1.0-0.dll \ ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34204 - in /branches/S2_6: doc/README.msys2 win32/installer_msys2/Makefile
Author: cazfi Date: Fri Oct 21 21:54:23 2016 New Revision: 34204 URL: http://svn.gna.org/viewcvs/freeciv?rev=34204&view=rev Log: Updated msys2 environment to 161018 level. See patch #7757 Modified: branches/S2_6/doc/README.msys2 branches/S2_6/win32/installer_msys2/Makefile Modified: branches/S2_6/doc/README.msys2 URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/doc/README.msys2?rev=34204&r1=34203&r2=34204&view=diff == --- branches/S2_6/doc/README.msys2 (original) +++ branches/S2_6/doc/README.msys2 Fri Oct 21 21:54:23 2016 @@ -39,7 +39,7 @@ > pacman -Syu 2) Install following packages with 'pacman -Su' - As of 22-Sep-16, one has to use also '--force' option. + As of 18-Oct-16, one has to use also '--force' option. 2.1) Packages needed for building freeciv These packages are needed even if you don't plan to make installer, @@ -117,7 +117,7 @@ win64 host: --- -msys2-freeciv-win64-160922.7z, based on +msys2-freeciv-win64-161018.7z, based on https://sourceforge.net/projects/msys2/files/Base/x86-64/msys2-x86_64-20160921.exe Only win64 target is included - replace with 'x86_64' in package names below @@ -134,6 +134,7 @@ - libtool - autoconf - python +- gdb - mingw-w64--gcc - mingw-w64--icu - mingw-w64--curl Modified: branches/S2_6/win32/installer_msys2/Makefile URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/win32/installer_msys2/Makefile?rev=34204&r1=34203&r2=34204&view=diff == --- branches/S2_6/win32/installer_msys2/Makefile(original) +++ branches/S2_6/win32/installer_msys2/MakefileFri Oct 21 21:54:23 2016 @@ -159,7 +159,7 @@ SOUND_DLLS := \ SDL2.dll \ - SDL2_mixer.dll \ + libSDL2_mixer-2-0-0.dll \ libFLAC-8.dll \ libfluidsynth-1.dll \ libmad-0.dll \ @@ -183,8 +183,8 @@ libcurl-4.dll \ libgmp-10.dll \ libgnutls-30.dll \ - libhogweed-4-2.dll \ - libnettle-6-2.dll \ + libhogweed-4.dll \ + libnettle-6.dll \ libp11-kit-0.dll \ libtasn1-6.dll \ libatk-1.0-0.dll \ @@ -306,8 +306,8 @@ libcurl-4.dll \ libgmp-10.dll \ libgnutls-30.dll \ - libhogweed-4-2.dll \ - libnettle-6-2.dll \ + libhogweed-4.dll \ + libnettle-6.dll \ libp11-kit-0.dll \ libtasn1-6.dll \ libatk-1.0-0.dll \ ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34202 - /branches/S2_6/data/themes/gui-gtk-3.22/
Author: cazfi Date: Fri Oct 21 20:53:48 2016 New Revision: 34202 URL: http://svn.gna.org/viewcvs/freeciv?rev=34202&view=rev Log: Copied gui-gtk-3.22 theme from trunk to S2_6. See patch #7815 Added: branches/S2_6/data/themes/gui-gtk-3.22/ - copied from r34201, trunk/data/themes/gui-gtk-3.22/ ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34195 - in /trunk/windows: ./ installer_msys2/
Author: cazfi Date: Thu Oct 20 15:52:18 2016 New Revision: 34195 URL: http://svn.gna.org/viewcvs/freeciv?rev=34195&view=rev Log: Adjusted msys2 based Windows Installer makefile to recent gtk3.22-client binary name change. See patch #7851 Added: trunk/windows/installer_msys2/freeciv-gtk3.22.cmd - copied, changed from r34194, trunk/windows/installer_msys2/freeciv-gtk3x.cmd Removed: trunk/windows/installer_msys2/freeciv-gtk3x.cmd Modified: trunk/windows/Makefile.am trunk/windows/installer_msys2/create-freeciv-gtk3x-nsi.sh Modified: trunk/windows/Makefile.am URL: http://svn.gna.org/viewcvs/freeciv/trunk/windows/Makefile.am?rev=34195&r1=34194&r2=34195&view=diff == --- trunk/windows/Makefile.am (original) +++ trunk/windows/Makefile.am Thu Oct 20 15:52:18 2016 @@ -17,7 +17,7 @@ installer_msys2/create-freeciv-ruledit-nsi.sh \ installer_msys2/freeciv-gtk2.cmd\ installer_msys2/freeciv-gtk3.cmd\ - installer_msys2/freeciv-gtk3x.cmd \ + installer_msys2/freeciv-gtk3.22.cmd \ installer_msys2/freeciv-mp-gtk2.cmd \ installer_msys2/freeciv-mp-gtk3.cmd \ installer_msys2/freeciv-mp-gtk3x.cmd\ Modified: trunk/windows/installer_msys2/create-freeciv-gtk3x-nsi.sh URL: http://svn.gna.org/viewcvs/freeciv/trunk/windows/installer_msys2/create-freeciv-gtk3x-nsi.sh?rev=34195&r1=34194&r2=34195&view=diff == --- trunk/windows/installer_msys2/create-freeciv-gtk3x-nsi.sh (original) +++ trunk/windows/installer_msys2/create-freeciv-gtk3x-nsi.sh Thu Oct 20 15:52:18 2016 @@ -2,4 +2,4 @@ # ./create-freeciv-gtk3x-nsi.sh -./create-freeciv-gtk-qt-nsi.sh $1 $2 "gtk3x" "GTK+3x" $3 +./create-freeciv-gtk-qt-nsi.sh $1 $2 "gtk3.22" "GTK+3x" $3 Copied: trunk/windows/installer_msys2/freeciv-gtk3.22.cmd (from r34194, trunk/windows/installer_msys2/freeciv-gtk3x.cmd) URL: http://svn.gna.org/viewcvs/freeciv/trunk/windows/installer_msys2/freeciv-gtk3.22.cmd?p2=trunk/windows/installer_msys2/freeciv-gtk3.22.cmd&p1=trunk/windows/installer_msys2/freeciv-gtk3x.cmd&r1=34194&r2=34195&rev=34195&view=diff == --- trunk/windows/installer_msys2/freeciv-gtk3x.cmd (original) +++ trunk/windows/installer_msys2/freeciv-gtk3.22.cmd Thu Oct 20 15:52:18 2016 @@ -1,3 +1,3 @@ @echo off if %1 NEQ auto set LANG=%1 -start freeciv-gtk3x.exe %2 %3 %4 %5 %6 %7 %8 %9 +start freeciv-gtk3.22.exe %2 %3 %4 %5 %6 %7 %8 %9 Removed: trunk/windows/installer_msys2/freeciv-gtk3x.cmd URL: http://svn.gna.org/viewcvs/freeciv/trunk/windows/installer_msys2/freeciv-gtk3x.cmd?rev=34194&view=auto == --- trunk/windows/installer_msys2/freeciv-gtk3x.cmd (original) +++ trunk/windows/installer_msys2/freeciv-gtk3x.cmd (removed) @@ -1,3 +0,0 @@ -@echo off -if %1 NEQ auto set LANG=%1 -start freeciv-gtk3x.exe %2 %3 %4 %5 %6 %7 %8 %9 ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34186 - /trunk/client/gui-qt/ratesdlg.cpp
Author: cazfi Date: Thu Oct 20 09:47:30 2016 New Revision: 34186 URL: http://svn.gna.org/viewcvs/freeciv?rev=34186&view=rev Log: Changed Qt-client policies adjusting window title to speak of "policies" instead of "government modifiers" See patch #7840 Modified: trunk/client/gui-qt/ratesdlg.cpp Modified: trunk/client/gui-qt/ratesdlg.cpp URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/ratesdlg.cpp?rev=34186&r1=34185&r2=34186&view=diff == --- trunk/client/gui-qt/ratesdlg.cpp(original) +++ trunk/client/gui-qt/ratesdlg.cppThu Oct 20 09:47:30 2016 @@ -1,4 +1,4 @@ -/** +/*** Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -296,12 +296,13 @@ cancel_button = new QPushButton; ok_button = new QPushButton; - setWindowTitle(_("Change governments modifiers")); + setWindowTitle(_("Change policies")); main_layout = new QVBoxLayout; multipliers_iterate(pmul) { QHBoxLayout *hb = new QHBoxLayout; int val = player_multiplier_target_value(pplayer, pmul); + group_box = new QGroupBox(multiplier_name_translation(pmul)); slider = new QSlider(Qt::Horizontal, this); slider->setMinimum(mult_to_scale(pmul, pmul->start)); ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34187 - /branches/S2_6/client/gui-qt/ratesdlg.cpp
Author: cazfi Date: Thu Oct 20 09:47:36 2016 New Revision: 34187 URL: http://svn.gna.org/viewcvs/freeciv?rev=34187&view=rev Log: Changed Qt-client policies adjusting window title to speak of "policies" instead of "government modifiers" See patch #7840 Modified: branches/S2_6/client/gui-qt/ratesdlg.cpp Modified: branches/S2_6/client/gui-qt/ratesdlg.cpp URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-qt/ratesdlg.cpp?rev=34187&r1=34186&r2=34187&view=diff == --- branches/S2_6/client/gui-qt/ratesdlg.cpp(original) +++ branches/S2_6/client/gui-qt/ratesdlg.cppThu Oct 20 09:47:36 2016 @@ -1,4 +1,4 @@ -/** +/*** Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -296,12 +296,13 @@ cancel_button = new QPushButton; ok_button = new QPushButton; - setWindowTitle(_("Change governments modifiers")); + setWindowTitle(_("Change policies")); main_layout = new QVBoxLayout; multipliers_iterate(pmul) { QHBoxLayout *hb = new QHBoxLayout; int val = player_multiplier_target_value(pplayer, pmul); + group_box = new QGroupBox(multiplier_name_translation(pmul)); slider = new QSlider(Qt::Horizontal, this); slider->setMinimum(mult_to_scale(pmul, pmul->start)); ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34181 - /trunk/configure.ac
Author: cazfi Date: Wed Oct 19 23:55:02 2016 New Revision: 34181 URL: http://svn.gna.org/viewcvs/freeciv?rev=34181&view=rev Log: Turned gtk3.22 modpack installer in to new gtk3x version that builds with flags from gtk+-4.0.pc See patch #7846 Modified: trunk/configure.ac Modified: trunk/configure.ac URL: http://svn.gna.org/viewcvs/freeciv/trunk/configure.ac?rev=34181&r1=34180&r2=34181&view=diff == --- trunk/configure.ac (original) +++ trunk/configure.ac Wed Oct 19 23:55:02 2016 @@ -1030,7 +1030,7 @@ dnl freeciv-modpack checks AC_ARG_ENABLE([fcmp], - AS_HELP_STRING([--enable-fcmp=no/yes/gtk2/gtk3/gtk3.22/qt/cli/all/auto], [build freeciv-modpack-program [auto]]), + AS_HELP_STRING([--enable-fcmp=no/yes/gtk2/gtk3/gtk3x/qt/cli/all/auto], [build freeciv-modpack-program [auto]]), [fc_mp=${enableval}], [fc_mp=auto]) @@ -1063,8 +1063,8 @@ test "x$mp" = "xgtk30" || test "x$mp" = "xgtk-3.0" ; then req_fcmp_gtk3=yes -elif test "x$mp" = "xgtk3.22" ; then - req_fcmp_gtk3_22=yes +elif test "x$mp" = "xgtk3x" ; then + req_fcmp_gtk3x=yes elif test "x$mp" = "xqt" ; then req_fcmp_qt=yes elif test "x$mp" = "xcli" ; then @@ -1103,16 +1103,16 @@ AC_MSG_ERROR([Cannot build gtk3-version of freeciv-modpack as requested]) fi -if test "x$req_fcmp_gtk3_22" = "xyes" || +if test "x$req_fcmp_gtk3x" = "xyes" || test "x$modinst" = "xall" || test "x$modinst" = "xauto" ; then - PKG_CHECK_MODULES([GTK3X_MP], [gtk+-3.0 >= 3.18.0], + PKG_CHECK_MODULES([GTK3X_MP], [gtk+-4.0 >= 3.89.0], [ - GTK3X_MP_CFLAGS="$GTK3X_MP_CFLAGS -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_18" + GTK3X_MP_CFLAGS="$GTK3X_MP_CFLAGS -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_90" GTK3X_MP_CFLAGS="$GTK3X_MP_CFLAGS -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_46" PKG_CHECK_MODULES([GTHREAD_GTK3X], [gthread-2.0], [ - fcmp_gtk3_22=yes - fcmp_list="$fcmp_list gtk3.22" + fcmp_gtk3x=yes + fcmp_list="$fcmp_list gtk3x" mp_gtk3x_cflags="$GTK3X_MP_CFLAGS $GHTREAD_GTK3X_CFLAGS" mp_gtk3x_libs="$GTK3X_MP_LIBS $GTHREAD_GTK3X_LIBS" if test "x$MINGW32" = "xyes"; then @@ -1127,8 +1127,8 @@ ], [])], []) fi -if test "x$req_fcmp_gtk3_22" = "xyes" && test "x$fcmp_gtk3_22" != "xyes" ; then - AC_MSG_ERROR([Cannot build gtk3.22-version of freeciv-modpack as requested]) +if test "x$req_fcmp_gtk3x" = "xyes" && test "x$fcmp_gtk3x" != "xyes" ; then + AC_MSG_ERROR([Cannot build gtk3x-version of freeciv-modpack as requested]) fi if test "x$req_fcmp_gtk2" = "xyes" || @@ -1193,7 +1193,7 @@ test "x$modinst" != "xno" && test "x$modinst" != "xcli" && test "x$fcmp_gtk3" != "xyes" && - test "x$fcmp_gtk3_22" != "xyes" && + test "x$fcmp_gtk3x" != "xyes" && test "x$fcmp_gtk2" != "xyes" && test "x$fcmp_qt" != "xyes" ;then AC_MSG_ERROR([Cannot build modpack installer with any gui]) @@ -1212,7 +1212,7 @@ AM_CONDITIONAL([MODINST], [test "x$modinst" != "xno"]) AM_CONDITIONAL([MODINST_GTK3], [test "x$fcmp_gtk3" = "xyes"]) -AM_CONDITIONAL([MODINST_GTK3X], [test "x$fcmp_gtk3_22" = "xyes"]) +AM_CONDITIONAL([MODINST_GTK3X], [test "x$fcmp_gtk3x" = "xyes"]) AM_CONDITIONAL([MODINST_GTK2], [test "x$fcmp_gtk2" = "xyes"]) AM_CONDITIONAL([MODINST_QT], [test "x$fcmp_qt" = "xyes"]) AM_CONDITIONAL([MODINST_CLI], [test "x$fcmp_cli" = "xyes"]) ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34175 - in /branches/S2_6/client: gui-gtk-3.0/pages.c gui-gtk-3.22/pages.c
Author: cazfi Date: Wed Oct 19 09:53:09 2016 New Revision: 34175 URL: http://svn.gna.org/viewcvs/freeciv?rev=34175&view=rev Log: When screen size cannot be queried, assume minimum height instead of considering it zero, when deciding size for intro picture. See patch #7845 Modified: branches/S2_6/client/gui-gtk-3.0/pages.c branches/S2_6/client/gui-gtk-3.22/pages.c Modified: branches/S2_6/client/gui-gtk-3.0/pages.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.0/pages.c?rev=34175&r1=34174&r2=34175&view=diff == --- branches/S2_6/client/gui-gtk-3.0/pages.c(original) +++ branches/S2_6/client/gui-gtk-3.0/pages.cWed Oct 19 09:53:09 2016 @@ -254,6 +254,11 @@ intro_in = load_gfxfile(tileset_main_intro_filename(tileset)); get_sprite_dimensions(intro_in, &width, &height); sh = screen_height(); + + if (sh <= 0) { +/* Assume some minimum height */ +sh = 600; + } space_needed = 250; #if IS_BETA_VERSION Modified: branches/S2_6/client/gui-gtk-3.22/pages.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/pages.c?rev=34175&r1=34174&r2=34175&view=diff == --- branches/S2_6/client/gui-gtk-3.22/pages.c (original) +++ branches/S2_6/client/gui-gtk-3.22/pages.c Wed Oct 19 09:53:09 2016 @@ -254,6 +254,11 @@ intro_in = load_gfxfile(tileset_main_intro_filename(tileset)); get_sprite_dimensions(intro_in, &width, &height); sh = screen_height(); + + if (sh <= 0) { +/* Assume some minimum height */ +sh = 600; + } space_needed = 250; #if IS_BETA_VERSION ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34174 - in /trunk/client: gui-gtk-3.0/pages.c gui-gtk-3.22/pages.c
Author: cazfi Date: Wed Oct 19 09:53:01 2016 New Revision: 34174 URL: http://svn.gna.org/viewcvs/freeciv?rev=34174&view=rev Log: When screen size cannot be queried, assume minimum height instead of considering it zero, when deciding size for intro picture. See patch #7845 Modified: trunk/client/gui-gtk-3.0/pages.c trunk/client/gui-gtk-3.22/pages.c Modified: trunk/client/gui-gtk-3.0/pages.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.0/pages.c?rev=34174&r1=34173&r2=34174&view=diff == --- trunk/client/gui-gtk-3.0/pages.c(original) +++ trunk/client/gui-gtk-3.0/pages.cWed Oct 19 09:53:01 2016 @@ -254,6 +254,11 @@ intro_in = load_gfxfile(tileset_main_intro_filename(tileset)); get_sprite_dimensions(intro_in, &width, &height); sh = screen_height(); + + if (sh <= 0) { +/* Assume some minimum height */ +sh = 600; + } space_needed = 250; #if IS_BETA_VERSION Modified: trunk/client/gui-gtk-3.22/pages.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.22/pages.c?rev=34174&r1=34173&r2=34174&view=diff == --- trunk/client/gui-gtk-3.22/pages.c (original) +++ trunk/client/gui-gtk-3.22/pages.c Wed Oct 19 09:53:01 2016 @@ -254,6 +254,11 @@ intro_in = load_gfxfile(tileset_main_intro_filename(tileset)); get_sprite_dimensions(intro_in, &width, &height); sh = screen_height(); + + if (sh <= 0) { +/* Assume some minimum height */ +sh = 600; + } space_needed = 250; #if IS_BETA_VERSION ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34176 - /branches/S2_5/client/gui-gtk-3.0/pages.c
Author: cazfi Date: Wed Oct 19 09:53:15 2016 New Revision: 34176 URL: http://svn.gna.org/viewcvs/freeciv?rev=34176&view=rev Log: When screen size cannot be queried, assume minimum height instead of considering it zero, when deciding size for intro picture. See patch #7845 Modified: branches/S2_5/client/gui-gtk-3.0/pages.c Modified: branches/S2_5/client/gui-gtk-3.0/pages.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-gtk-3.0/pages.c?rev=34176&r1=34175&r2=34176&view=diff == --- branches/S2_5/client/gui-gtk-3.0/pages.c(original) +++ branches/S2_5/client/gui-gtk-3.0/pages.cWed Oct 19 09:53:15 2016 @@ -260,6 +260,11 @@ intro_in = load_gfxfile(tileset_main_intro_filename(tileset)); get_sprite_dimensions(intro_in, &width, &height); sh = screen_height(); + + if (sh <= 0) { +/* Assume some minimum height */ +sh = 600; + } space_needed = 250; #if IS_BETA_VERSION ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34172 - /trunk/client/gui-qt/fonts.h
Author: cazfi Date: Tue Oct 18 17:33:49 2016 New Revision: 34172 URL: http://svn.gna.org/viewcvs/freeciv?rev=34172&view=rev Log: Removed unnecessary line preventing compilation on msys1 environment from qt-client. See bug #25191 Modified: trunk/client/gui-qt/fonts.h Modified: trunk/client/gui-qt/fonts.h URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/fonts.h?rev=34172&r1=34171&r2=34172&view=diff == --- trunk/client/gui-qt/fonts.h (original) +++ trunk/client/gui-qt/fonts.h Tue Oct 18 17:33:49 2016 @@ -37,7 +37,6 @@ const char * const help_title = "gui_qt_font_help_title"; const char * const chatline = "gui_qt_font_chatline"; const char * const beta_label = "gui_qt_font_beta_label"; - const char * const small= "gui_qt_font_small"; const char * const comment_label= "gui_qt_font_comment_label"; const char * const city_names = "gui_qt_font_city_names"; const char * const city_productions = "gui_qt_font_city_productions"; ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34173 - /branches/S2_6/client/gui-qt/fonts.h
Author: cazfi Date: Tue Oct 18 17:33:58 2016 New Revision: 34173 URL: http://svn.gna.org/viewcvs/freeciv?rev=34173&view=rev Log: Removed unnecessary line preventing compilation on msys1 environment from qt-client. See bug #25191 Modified: branches/S2_6/client/gui-qt/fonts.h Modified: branches/S2_6/client/gui-qt/fonts.h URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-qt/fonts.h?rev=34173&r1=34172&r2=34173&view=diff == --- branches/S2_6/client/gui-qt/fonts.h (original) +++ branches/S2_6/client/gui-qt/fonts.h Tue Oct 18 17:33:58 2016 @@ -37,7 +37,6 @@ const char * const help_title = "gui_qt_font_help_title"; const char * const chatline = "gui_qt_font_chatline"; const char * const beta_label = "gui_qt_font_beta_label"; - const char * const small= "gui_qt_font_small"; const char * const comment_label= "gui_qt_font_comment_label"; const char * const city_names = "gui_qt_font_city_names"; const char * const city_productions = "gui_qt_font_city_productions"; ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34163 - in /trunk: ./ bootstrap/ client/
Author: cazfi Date: Mon Oct 17 16:08:09 2016 New Revision: 34163 URL: http://svn.gna.org/viewcvs/freeciv?rev=34163&view=rev Log: Added gtk3.22-client desktop and appdata files. See patch #7814 Added: trunk/bootstrap/freeciv-gtk3.22.appdata.xml.in trunk/bootstrap/freeciv-gtk3.22.desktop.in Modified: trunk/client/Makefile.am trunk/configure.ac Added: trunk/bootstrap/freeciv-gtk3.22.appdata.xml.in URL: http://svn.gna.org/viewcvs/freeciv/trunk/bootstrap/freeciv-gtk3.22.appdata.xml.in?rev=34163&view=auto == --- trunk/bootstrap/freeciv-gtk3.22.appdata.xml.in (added) +++ trunk/bootstrap/freeciv-gtk3.22.appdata.xml.in Mon Oct 17 16:08:09 2016 @@ -0,0 +1,19 @@ + + +freeciv.desktop +CC0 + + +Freeciv is a Free and Open Source empire-building strategy game inspired by the history of human civilization. The game commences in prehistory and your +mission is to lead your tribe from the Stone Age to the Space Age... + + +This client for connecting to network games, or to launch local single-player games, is based on gtk3 widget set. + + +http://www.freeciv.org/ + +http://images1.wikia.nocookie.net/__cb20120308234702/freeciv/images/thumb/4/43/Hex2.3.png/1000px-Hex2.3.png + +freeciv-...@gna.org + Added: trunk/bootstrap/freeciv-gtk3.22.desktop.in URL: http://svn.gna.org/viewcvs/freeciv/trunk/bootstrap/freeciv-gtk3.22.desktop.in?rev=34163&view=auto == --- trunk/bootstrap/freeciv-gtk3.22.desktop.in (added) +++ trunk/bootstrap/freeciv-gtk3.22.desktop.in Mon Oct 17 16:08:09 2016 @@ -0,0 +1,22 @@ +[Desktop Entry] +Name=Freeciv +Name[ca]=Freeciv +Name[es]=Freeciv +Name[fr]=Freeciv +Name[nb]=Freeciv +Name[pt]=Freeciv +Comment=Turn-based strategy game inspired by the history of human civilization +Comment[ca]=Joc d'estratègia inspirat en la història de la civilització humana +Comment[da]=Strategispil inspireret af den menneskelige civilisations historie +Comment[de]=Rundenbasiertes Strategiespiel, inspiriert durch die Geschichte der menschlichen Zivilisation +Comment[fi]=Ihmiskunnan historian inspiroima vuoropohjainen strategiapeli +Comment[nb]=Strategispill inspirert av historien til menneskelig sivilisasjon +Comment[pt]=Jogo de estratégia por turnos inspirado na História da civilização humana +Comment[sv]=Turordningsbaserat strategispel inspirerat av den mänskliga historien +Exec=freeciv-gtk3.22 +Icon=freeciv-client +StartupNotify=true +Terminal=false +Type=Application +Categories=GTK;Game;StrategyGame; +Keywords=strategy;simulation;civilization;tiles;history;mankind;multiplayer; Modified: trunk/client/Makefile.am URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/Makefile.am?rev=34163&r1=34162&r2=34163&view=diff == --- trunk/client/Makefile.am(original) +++ trunk/client/Makefile.amMon Oct 17 16:08:09 2016 @@ -32,6 +32,10 @@ endif if CLIENT_GUI_GTK_3_22 GUI_SUBDIRS += gui-gtk-3.22 +desktopfile_DATA += \ + freeciv-gtk3.22.desktop +appdatafile_DATA += \ + freeciv-gtk3.22.appdata.xml endif if CLIENT_GUI_GTK_3X GUI_SUBDIRS += gui-gtk-3.22 Modified: trunk/configure.ac URL: http://svn.gna.org/viewcvs/freeciv/trunk/configure.ac?rev=34163&r1=34162&r2=34163&view=diff == --- trunk/configure.ac (original) +++ trunk/configure.ac Mon Oct 17 16:08:09 2016 @@ -1792,8 +1792,9 @@ doc/sv/Makefile bootstrap/Makefile lua/Makefile - client/freeciv.desktop:bootstrap/freeciv.desktop.in + client/freeciv.desktop:bootstrap/freeciv.desktop.in client/freeciv-gtk2.desktop:bootstrap/freeciv-gtk2.desktop.in + client/freeciv-gtk3.22.desktop:bootstrap/freeciv-gtk3.22.desktop.in client/freeciv-sdl2.desktop:bootstrap/freeciv-sdl2.desktop.in client/freeciv-qt.desktop:bootstrap/freeciv-qt.desktop.in server/freeciv-server.desktop:bootstrap/freeciv-server.desktop.in @@ -1803,6 +1804,7 @@ tools/ruledit/freeciv-ruledit.desktop:bootstrap/freeciv-ruledit.desktop.in client/freeciv-gtk2.appdata.xml:bootstrap/freeciv-gtk2.appdata.xml.in client/freeciv-gtk3.appdata.xml:bootstrap/freeciv-gtk3.appdata.xml.in + client/freeciv-gtk3.22.appdata.xml:bootstrap/freeciv-gtk3.22.appdata.xml.in client/freeciv-sdl2.appdata.xml:bootstrap/freeciv-sdl2.appdata.xml.in client/freeciv-qt.appdata.xml:bootstrap/freeciv-qt.appdata.xml.in server/freeciv-server.appdata.xml:bootstrap/freeciv-server.appdata.xml.in ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/list
[Freeciv-commits] r34162 - in /branches/S2_6/bootstrap: freeciv-gtk3.22.appdata.xml.in freeciv-gtk3.22.desktop.in
Author: cazfi Date: Mon Oct 17 16:00:23 2016 New Revision: 34162 URL: http://svn.gna.org/viewcvs/freeciv?rev=34162&view=rev Log: Added gtk3.22-client desktop and appdata files. See patch #7814 Added: branches/S2_6/bootstrap/freeciv-gtk3.22.appdata.xml.in branches/S2_6/bootstrap/freeciv-gtk3.22.desktop.in Added: branches/S2_6/bootstrap/freeciv-gtk3.22.appdata.xml.in URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/bootstrap/freeciv-gtk3.22.appdata.xml.in?rev=34162&view=auto == --- branches/S2_6/bootstrap/freeciv-gtk3.22.appdata.xml.in (added) +++ branches/S2_6/bootstrap/freeciv-gtk3.22.appdata.xml.in Mon Oct 17 16:00:23 2016 @@ -0,0 +1,19 @@ + + +freeciv.desktop +CC0 + + +Freeciv is a Free and Open Source empire-building strategy game inspired by the history of human civilization. The game commences in prehistory and your +mission is to lead your tribe from the Stone Age to the Space Age... + + +This client for connecting to network games, or to launch local single-player games, is based on gtk3 widget set. + + +http://www.freeciv.org/ + +http://images1.wikia.nocookie.net/__cb20120308234702/freeciv/images/thumb/4/43/Hex2.3.png/1000px-Hex2.3.png + +freeciv-...@gna.org + Added: branches/S2_6/bootstrap/freeciv-gtk3.22.desktop.in URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/bootstrap/freeciv-gtk3.22.desktop.in?rev=34162&view=auto == --- branches/S2_6/bootstrap/freeciv-gtk3.22.desktop.in (added) +++ branches/S2_6/bootstrap/freeciv-gtk3.22.desktop.in Mon Oct 17 16:00:23 2016 @@ -0,0 +1,22 @@ +[Desktop Entry] +Name=Freeciv +Name[ca]=Freeciv +Name[es]=Freeciv +Name[fr]=Freeciv +Name[nb]=Freeciv +Name[pt]=Freeciv +Comment=Turn-based strategy game inspired by the history of human civilization +Comment[ca]=Joc d'estratègia inspirat en la història de la civilització humana +Comment[da]=Strategispil inspireret af den menneskelige civilisations historie +Comment[de]=Rundenbasiertes Strategiespiel, inspiriert durch die Geschichte der menschlichen Zivilisation +Comment[fi]=Ihmiskunnan historian inspiroima vuoropohjainen strategiapeli +Comment[nb]=Strategispill inspirert av historien til menneskelig sivilisasjon +Comment[pt]=Jogo de estratégia por turnos inspirado na História da civilização humana +Comment[sv]=Turordningsbaserat strategispel inspirerat av den mänskliga historien +Exec=freeciv-gtk3.22 +Icon=freeciv-client +StartupNotify=true +Terminal=false +Type=Application +Categories=GTK;Game;StrategyGame; +Keywords=strategy;simulation;civilization;tiles;history;mankind;multiplayer; ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34153 - /branches/S2_6/m4/gtk3.22-client.m4
Author: cazfi Date: Sun Oct 16 12:56:43 2016 New Revision: 34153 URL: http://svn.gna.org/viewcvs/freeciv?rev=34153&view=rev Log: Prevent things deprecated in gtk+ 3.10 from gtk3.22-client See patch #6731 Modified: branches/S2_6/m4/gtk3.22-client.m4 Modified: branches/S2_6/m4/gtk3.22-client.m4 URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/m4/gtk3.22-client.m4?rev=34153&r1=34152&r2=34153&view=diff == --- branches/S2_6/m4/gtk3.22-client.m4 (original) +++ branches/S2_6/m4/gtk3.22-client.m4 Sun Oct 16 12:56:43 2016 @@ -10,8 +10,8 @@ test "x$client" = "xall" ; then PKG_CHECK_MODULES([GTK3_22], [gtk+-3.0 >= 3.10.0], [ -GTK3_22_CFLAGS="$GTK3_22_CFLAGS -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_8" -GTK3_22_CFLAGS="$GTK3_22_CFLAGS -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_36" +GTK3_22_CFLAGS="$GTK3_22_CFLAGS -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_10" +GTK3_22_CFLAGS="$GTK3_22_CFLAGS -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_44" gui_gtk3_22=yes if test "x$client" = "xauto" ; then client=yes ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34152 - in /trunk: client/tilespec.c common/fc_types.h fc_version
Author: cazfi Date: Sun Oct 16 12:51:45 2016 New Revision: 34152 URL: http://svn.gna.org/viewcvs/freeciv?rev=34152&view=rev Log: Added GUI_GTK3_22 definition. See patch #7759 Modified: trunk/client/tilespec.c trunk/common/fc_types.h trunk/fc_version Modified: trunk/client/tilespec.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/tilespec.c?rev=34152&r1=34151&r2=34152&view=diff == --- trunk/client/tilespec.c (original) +++ trunk/client/tilespec.c Sun Oct 16 12:51:45 2016 @@ -6408,6 +6408,7 @@ default_theme_name_sz = sizeof(gui_options.gui_gtk2_default_theme_name); break; case GUI_GTK3: + case GUI_GTK3_22: default_theme_name = gui_options.gui_gtk3_default_theme_name; default_theme_name_sz = sizeof(gui_options.gui_gtk3_default_theme_name); break; Modified: trunk/common/fc_types.h URL: http://svn.gna.org/viewcvs/freeciv/trunk/common/fc_types.h?rev=34152&r1=34151&r2=34152&view=diff == --- trunk/common/fc_types.h (original) +++ trunk/common/fc_types.h Sun Oct 16 12:51:45 2016 @@ -520,18 +520,20 @@ #define SPECENUM_VALUE1NAME "gtk2" #define SPECENUM_VALUE2 GUI_GTK3 #define SPECENUM_VALUE2NAME "gtk3" +#define SPECENUM_VALUE3 GUI_GTK3_22 +#define SPECENUM_VALUE3NAME "gtk3.22" /* GUI_SDL remains for now for keeping client options alive until * user has migrated them to sdl2-client */ -#define SPECENUM_VALUE3 GUI_SDL -#define SPECENUM_VALUE3NAME "sdl" -#define SPECENUM_VALUE4 GUI_QT -#define SPECENUM_VALUE4NAME "qt" -#define SPECENUM_VALUE5 GUI_SDL2 -#define SPECENUM_VALUE5NAME "sdl2" -#define SPECENUM_VALUE6 GUI_WEB -#define SPECENUM_VALUE6NAME "web" -#define SPECENUM_VALUE7 GUI_GTK3x -#define SPECENUM_VALUE7NAME "gtk3x" +#define SPECENUM_VALUE4 GUI_SDL +#define SPECENUM_VALUE4NAME "sdl" +#define SPECENUM_VALUE5 GUI_QT +#define SPECENUM_VALUE5NAME "qt" +#define SPECENUM_VALUE6 GUI_SDL2 +#define SPECENUM_VALUE6NAME "sdl2" +#define SPECENUM_VALUE7 GUI_WEB +#define SPECENUM_VALUE7NAME "web" +#define SPECENUM_VALUE8 GUI_GTK3x +#define SPECENUM_VALUE8NAME "gtk3x" #include "specenum_gen.h" /* Used in the network protocol. */ Modified: trunk/fc_version URL: http://svn.gna.org/viewcvs/freeciv/trunk/fc_version?rev=34152&r1=34151&r2=34152&view=diff == --- trunk/fc_version(original) +++ trunk/fc_versionSun Oct 16 12:51:45 2016 @@ -56,7 +56,7 @@ # - Avoid adding a new mandatory capability to the development branch for # as long as possible. We want to maintain network compatibility with # the stable branch for as long as possible. -NETWORK_CAPSTRING_MANDATORY="+Freeciv.Devel-3.0-2016.Oct.08" +NETWORK_CAPSTRING_MANDATORY="+Freeciv.Devel-3.0-2016.Oct.16" NETWORK_CAPSTRING_OPTIONAL="" FREECIV_DISTRIBUTOR="" ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34151 - /branches/S2_6/translations/freeciv/fi.po
Author: cazfi Date: Sun Oct 16 10:26:06 2016 New Revision: 34151 URL: http://svn.gna.org/viewcvs/freeciv?rev=34151&view=rev Log: Typofix to Finnish translation Modified: branches/S2_6/translations/freeciv/fi.po Modified: branches/S2_6/translations/freeciv/fi.po URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/translations/freeciv/fi.po?rev=34151&r1=34150&r2=34151&view=diff == --- branches/S2_6/translations/freeciv/fi.po(original) +++ branches/S2_6/translations/freeciv/fi.poSun Oct 16 10:26:06 2016 @@ -30,7 +30,7 @@ "Project-Id-Version: freeciv 2.6\n" "Report-Msgid-Bugs-To: http://gna.org/projects/freeciv/\n"; "POT-Creation-Date: 2016-10-15 21:32+0300\n" -"PO-Revision-Date: 2016-10-16 11:10+0300\n" +"PO-Revision-Date: 2016-10-16 11:23+0300\n" "Last-Translator: Markus Linnakangas \n" "Language-Team: None \n" "Language: fi\n" @@ -7414,7 +7414,7 @@ #: client/gui-qt/pages.cpp:2031 msgid "Tax: %1% Science: %2% Luxury: %3%\n" -msgstr "Raha: %1% Tiede: %2% Luksis: %3%\n" +msgstr "Raha: %1% Tiede: %2% Luksus: %3%\n" #: client/gui-qt/pages.cpp:2036 client/gui-qt/ratesdlg.cpp:67 msgid "%1 - max rate: %2%" ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34150 - /trunk/translations/core/fi.po
Author: cazfi Date: Sun Oct 16 10:24:45 2016 New Revision: 34150 URL: http://svn.gna.org/viewcvs/freeciv?rev=34150&view=rev Log: Updated Finnish translation. Modified: trunk/translations/core/fi.po [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/translations/core/fi.po URL: http://svn.gna.org/viewcvs/freeciv/trunk/translations/core/fi.po?rev=34150&r1=34149&r2=34150&view=diff ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34149 - /branches/S2_6/translations/freeciv/fi.po
Author: cazfi Date: Sun Oct 16 10:21:31 2016 New Revision: 34149 URL: http://svn.gna.org/viewcvs/freeciv?rev=34149&view=rev Log: Updated Finnish translation. Modified: branches/S2_6/translations/freeciv/fi.po [This mail would be too long, it was shortened to contain the URLs only.] Modified: branches/S2_6/translations/freeciv/fi.po URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/translations/freeciv/fi.po?rev=34149&r1=34148&r2=34149&view=diff ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34144 - /branches/S2_6/client/gui-gtk-3.22/
Author: cazfi Date: Sat Oct 15 16:50:21 2016 New Revision: 34144 URL: http://svn.gna.org/viewcvs/freeciv?rev=34144&view=rev Log: Replaced deprecated GtkStock usages with modern solutions in gtk3.22-client See patch #6430 Modified: branches/S2_6/client/gui-gtk-3.22/action_dialog.c branches/S2_6/client/gui-gtk-3.22/chatline.c branches/S2_6/client/gui-gtk-3.22/choice_dialog.c branches/S2_6/client/gui-gtk-3.22/citydlg.c branches/S2_6/client/gui-gtk-3.22/cityrep.c branches/S2_6/client/gui-gtk-3.22/cma_fe.c branches/S2_6/client/gui-gtk-3.22/dialogs.c branches/S2_6/client/gui-gtk-3.22/diplodlg.c branches/S2_6/client/gui-gtk-3.22/editgui.c branches/S2_6/client/gui-gtk-3.22/editprop.c branches/S2_6/client/gui-gtk-3.22/gamedlgs.c branches/S2_6/client/gui-gtk-3.22/gotodlg.c branches/S2_6/client/gui-gtk-3.22/gui_stuff.c branches/S2_6/client/gui-gtk-3.22/gui_stuff.h branches/S2_6/client/gui-gtk-3.22/helpdlg.c branches/S2_6/client/gui-gtk-3.22/inputdlg.c branches/S2_6/client/gui-gtk-3.22/inteldlg.c branches/S2_6/client/gui-gtk-3.22/luaconsole.c branches/S2_6/client/gui-gtk-3.22/messagewin.c branches/S2_6/client/gui-gtk-3.22/optiondlg.c branches/S2_6/client/gui-gtk-3.22/pages.c branches/S2_6/client/gui-gtk-3.22/repodlgs.c branches/S2_6/client/gui-gtk-3.22/unitselect.c branches/S2_6/client/gui-gtk-3.22/voteinfo_bar.c branches/S2_6/client/gui-gtk-3.22/wldlg.c [This mail would be too long, it was shortened to contain the URLs only.] Modified: branches/S2_6/client/gui-gtk-3.22/action_dialog.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/action_dialog.c?rev=34144&r1=34143&r2=34144&view=diff Modified: branches/S2_6/client/gui-gtk-3.22/chatline.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/chatline.c?rev=34144&r1=34143&r2=34144&view=diff Modified: branches/S2_6/client/gui-gtk-3.22/choice_dialog.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/choice_dialog.c?rev=34144&r1=34143&r2=34144&view=diff Modified: branches/S2_6/client/gui-gtk-3.22/citydlg.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/citydlg.c?rev=34144&r1=34143&r2=34144&view=diff Modified: branches/S2_6/client/gui-gtk-3.22/cityrep.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/cityrep.c?rev=34144&r1=34143&r2=34144&view=diff Modified: branches/S2_6/client/gui-gtk-3.22/cma_fe.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/cma_fe.c?rev=34144&r1=34143&r2=34144&view=diff Modified: branches/S2_6/client/gui-gtk-3.22/dialogs.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/dialogs.c?rev=34144&r1=34143&r2=34144&view=diff Modified: branches/S2_6/client/gui-gtk-3.22/diplodlg.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/diplodlg.c?rev=34144&r1=34143&r2=34144&view=diff Modified: branches/S2_6/client/gui-gtk-3.22/editgui.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/editgui.c?rev=34144&r1=34143&r2=34144&view=diff Modified: branches/S2_6/client/gui-gtk-3.22/editprop.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/editprop.c?rev=34144&r1=34143&r2=34144&view=diff Modified: branches/S2_6/client/gui-gtk-3.22/gamedlgs.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/gamedlgs.c?rev=34144&r1=34143&r2=34144&view=diff Modified: branches/S2_6/client/gui-gtk-3.22/gotodlg.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/gotodlg.c?rev=34144&r1=34143&r2=34144&view=diff Modified: branches/S2_6/client/gui-gtk-3.22/gui_stuff.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/gui_stuff.c?rev=34144&r1=34143&r2=34144&view=diff Modified: branches/S2_6/client/gui-gtk-3.22/gui_stuff.h URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/gui_stuff.h?rev=34144&r1=34143&r2=34144&view=diff Modified: branches/S2_6/client/gui-gtk-3.22/helpdlg.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/helpdlg.c?rev=34144&r1=34143&r2=34144&view=diff Modified: branches/S2_6/client/gui-gtk-3.22/inputdlg.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/inputdlg.c?rev=34144&r1=34143&r2=34144&view=diff Modified: branches/S2_6/client/gui-gtk-3.22/inteldlg.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/inteldlg.c?rev=34144&r1=34143&r2=34144&view=diff Modified: branches/S2_6/client/gui-gtk-3.22/luaconsole.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/luaconsole.c?rev=34144&r1=34143&r2=34144&view=diff Modified: branches/S2_6/client/gui-gtk-3.22/messagewin.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/messagewin.c?rev=34144&r1=34143&r2=34144&view=diff Modified: branches/
[Freeciv-commits] r34141 - in /branches/S2_6/client: gui-gtk-3.0/gui_stuff.c gui-gtk-3.22/gui_stuff.c
Author: cazfi Date: Sat Oct 15 07:17:41 2016 New Revision: 34141 URL: http://svn.gna.org/viewcvs/freeciv?rev=34141&view=rev Log: Corrections to the way gtk3-clients produce font css - Size is considered pixels, not points - Handle font style and weight Reported by Jacob Nevins See patch #7162 Modified: branches/S2_6/client/gui-gtk-3.0/gui_stuff.c branches/S2_6/client/gui-gtk-3.22/gui_stuff.c Modified: branches/S2_6/client/gui-gtk-3.0/gui_stuff.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.0/gui_stuff.c?rev=34141&r1=34140&r2=34141&view=diff == --- branches/S2_6/client/gui-gtk-3.0/gui_stuff.c(original) +++ branches/S2_6/client/gui-gtk-3.0/gui_stuff.cSat Oct 15 07:17:41 2016 @@ -1013,6 +1013,8 @@ PangoFontDescription *desc; int size; const char *fam; + const char *style; + const char *weight; desc = pango_font_description_from_string(font_value); @@ -1026,14 +1028,26 @@ return; } + if (pango_font_description_get_style(desc) == PANGO_STYLE_ITALIC) { +style = "\n font-style: italic;"; + } else { +style = ""; + } + + if (pango_font_description_get_weight(desc) >= 700) { +weight = "\n font-style: bold;"; + } else { +weight = ""; + } + size = pango_font_description_get_size(desc); if (size != 0) { -str = g_strdup_printf("#Freeciv #%s { font-family: %s; font-size: %dpt;}", - font_name, fam, size / PANGO_SCALE); +str = g_strdup_printf("#Freeciv #%s { font-family: %s; font-size: %dpx;%s%s}", + font_name, fam, size / PANGO_SCALE, style, weight); } else { -str = g_strdup_printf("#Freeciv #%s { font-family: %s; }", - font_name, fam); +str = g_strdup_printf("#Freeciv #%s { font-family: %s;%s%s}", + font_name, fam, style, weight); } pango_font_description_free(desc); Modified: branches/S2_6/client/gui-gtk-3.22/gui_stuff.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/gui_stuff.c?rev=34141&r1=34140&r2=34141&view=diff == --- branches/S2_6/client/gui-gtk-3.22/gui_stuff.c (original) +++ branches/S2_6/client/gui-gtk-3.22/gui_stuff.c Sat Oct 15 07:17:41 2016 @@ -1031,6 +1031,8 @@ PangoFontDescription *desc; int size; const char *fam; + const char *style; + const char *weight; desc = pango_font_description_from_string(font_value); @@ -1044,14 +1046,26 @@ return; } + if (pango_font_description_get_style(desc) == PANGO_STYLE_ITALIC) { +style = "\n font-style: italic;"; + } else { +style = ""; + } + + if (pango_font_description_get_weight(desc) >= 700) { +weight = "\n font-style: bold;"; + } else { +weight = ""; + } + size = pango_font_description_get_size(desc); if (size != 0) { -str = g_strdup_printf("#Freeciv #%s { font-family: %s; font-size: %dpt;}", - font_name, fam, size / PANGO_SCALE); +str = g_strdup_printf("#Freeciv #%s { font-family: %s; font-size: %dpx;%s%s}", + font_name, fam, size / PANGO_SCALE, style, weight); } else { -str = g_strdup_printf("#Freeciv #%s { font-family: %s; }", - font_name, fam); +str = g_strdup_printf("#Freeciv #%s { font-family: %s;%s%s}", + font_name, fam, style, weight); } pango_font_description_free(desc); ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34140 - in /trunk/client: gui-gtk-3.0/gui_stuff.c gui-gtk-3.22/gui_stuff.c
Author: cazfi Date: Sat Oct 15 07:17:33 2016 New Revision: 34140 URL: http://svn.gna.org/viewcvs/freeciv?rev=34140&view=rev Log: Corrections to the way gtk3-clients produce font css - Size is considered pixels, not points - Handle font style and weight Reported by Jacob Nevins See patch #7162 Modified: trunk/client/gui-gtk-3.0/gui_stuff.c trunk/client/gui-gtk-3.22/gui_stuff.c Modified: trunk/client/gui-gtk-3.0/gui_stuff.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.0/gui_stuff.c?rev=34140&r1=34139&r2=34140&view=diff == --- trunk/client/gui-gtk-3.0/gui_stuff.c(original) +++ trunk/client/gui-gtk-3.0/gui_stuff.cSat Oct 15 07:17:33 2016 @@ -1013,6 +1013,8 @@ PangoFontDescription *desc; int size; const char *fam; + const char *style; + const char *weight; desc = pango_font_description_from_string(font_value); @@ -1026,14 +1028,26 @@ return; } + if (pango_font_description_get_style(desc) == PANGO_STYLE_ITALIC) { +style = "\n font-style: italic;"; + } else { +style = ""; + } + + if (pango_font_description_get_weight(desc) >= 700) { +weight = "\n font-style: bold;"; + } else { +weight = ""; + } + size = pango_font_description_get_size(desc); if (size != 0) { -str = g_strdup_printf("#Freeciv #%s { font-family: %s; font-size: %dpt;}", - font_name, fam, size / PANGO_SCALE); +str = g_strdup_printf("#Freeciv #%s { font-family: %s; font-size: %dpx;%s%s}", + font_name, fam, size / PANGO_SCALE, style, weight); } else { -str = g_strdup_printf("#Freeciv #%s { font-family: %s; }", - font_name, fam); +str = g_strdup_printf("#Freeciv #%s { font-family: %s;%s%s}", + font_name, fam, style, weight); } pango_font_description_free(desc); Modified: trunk/client/gui-gtk-3.22/gui_stuff.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.22/gui_stuff.c?rev=34140&r1=34139&r2=34140&view=diff == --- trunk/client/gui-gtk-3.22/gui_stuff.c (original) +++ trunk/client/gui-gtk-3.22/gui_stuff.c Sat Oct 15 07:17:33 2016 @@ -1006,6 +1006,8 @@ PangoFontDescription *desc; int size; const char *fam; + const char *style; + const char *weight; desc = pango_font_description_from_string(font_value); @@ -1019,14 +1021,26 @@ return; } + if (pango_font_description_get_style(desc) == PANGO_STYLE_ITALIC) { +style = "\n font-style: italic;"; + } else { +style = ""; + } + + if (pango_font_description_get_weight(desc) >= 700) { +weight = "\n font-style: bold;"; + } else { +weight = ""; + } + size = pango_font_description_get_size(desc); if (size != 0) { -str = g_strdup_printf("#Freeciv #%s { font-family: %s; font-size: %dpt;}", - font_name, fam, size / PANGO_SCALE); +str = g_strdup_printf("#Freeciv #%s { font-family: %s; font-size: %dpx;%s%s}", + font_name, fam, size / PANGO_SCALE, style, weight); } else { -str = g_strdup_printf("#Freeciv #%s { font-family: %s; }", - font_name, fam); +str = g_strdup_printf("#Freeciv #%s { font-family: %s;%s%s}", + font_name, fam, style, weight); } pango_font_description_free(desc); ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34142 - /branches/S2_5/client/gui-gtk-3.0/gui_stuff.c
Author: cazfi Date: Sat Oct 15 07:17:47 2016 New Revision: 34142 URL: http://svn.gna.org/viewcvs/freeciv?rev=34142&view=rev Log: Corrections to the way gtk3-clients produce font css - Size is considered pixels, not points - Handle font style and weight Reported by Jacob Nevins See patch #7162 Modified: branches/S2_5/client/gui-gtk-3.0/gui_stuff.c Modified: branches/S2_5/client/gui-gtk-3.0/gui_stuff.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-gtk-3.0/gui_stuff.c?rev=34142&r1=34141&r2=34142&view=diff == --- branches/S2_5/client/gui-gtk-3.0/gui_stuff.c(original) +++ branches/S2_5/client/gui-gtk-3.0/gui_stuff.cSat Oct 15 07:17:47 2016 @@ -1014,6 +1014,8 @@ PangoFontDescription *desc; int size; const char *fam; + const char *style; + const char *weight; desc = pango_font_description_from_string(font_value); @@ -1027,14 +1029,26 @@ return; } + if (pango_font_description_get_style(desc) == PANGO_STYLE_ITALIC) { +style = "\n font-style: italic;"; + } else { +style = ""; + } + + if (pango_font_description_get_weight(desc) >= 700) { +weight = "\n font-style: bold;"; + } else { +weight = ""; + } + size = pango_font_description_get_size(desc); if (size != 0) { -str = g_strdup_printf("#Freeciv #%s { font-family: %s; font-size: %dpt;}", - font_name, fam, size / PANGO_SCALE); +str = g_strdup_printf("#Freeciv #%s { font-family: %s; font-size: %dpx;%s%s}", + font_name, fam, size / PANGO_SCALE, style, weight); } else { -str = g_strdup_printf("#Freeciv #%s { font-family: %s; }", - font_name, fam); +str = g_strdup_printf("#Freeciv #%s { font-family: %s;%s%s}", + font_name, fam, style, weight); } pango_font_description_free(desc); ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34121 - /trunk/client/Makefile.am
Author: cazfi Date: Fri Oct 14 15:37:45 2016 New Revision: 34121 URL: http://svn.gna.org/viewcvs/freeciv?rev=34121&view=rev Log: Set name of the gtk3.22-client binary to freeciv-gtk3.22 See patch #7807 Modified: trunk/client/Makefile.am Modified: trunk/client/Makefile.am URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/Makefile.am?rev=34121&r1=34120&r2=34121&view=diff == --- trunk/client/Makefile.am(original) +++ trunk/client/Makefile.amFri Oct 14 15:37:45 2016 @@ -222,15 +222,15 @@ endif if CLIENT_GUI_GTK_3_22 -bin_PROGRAMS += freeciv-gtk3x -noinst_LTLIBRARIES += libfcgui-gtk3x.la -libfcgui_gtk3x_la_SOURCES = $(freeciv_client_src) -libfcgui_gtk3x_la_LIBADD = gui-gtk-3.22/libgui-gtk3x.la $(clientlibs) -freeciv_gtk3x_SOURCES = dummy.c -freeciv_gtk3x_LDFLAGS = $(gui_gtk3x_ldflags) -freeciv_gtk3x_LDADD = \ - $(SOUND_LIBS) \ - libfcgui-gtk3x.la \ +bin_PROGRAMS += freeciv-gtk3.22 +noinst_LTLIBRARIES += libfcgui-gtk3_22.la +libfcgui_gtk3_22_la_SOURCES = $(freeciv_client_src) +libfcgui_gtk3_22_la_LIBADD = gui-gtk-3.22/libgui-gtk3x.la $(clientlibs) +freeciv_gtk3_22_SOURCES = dummy.c +freeciv_gtk3_22_LDFLAGS = $(gui_gtk3x_ldflags) +freeciv_gtk3_22_LDADD = \ + $(SOUND_LIBS) \ + libfcgui-gtk3_22.la \ $(top_builddir)/common/libfreeciv.la \ $(INTLLIBS) $(CLIENT_LIBS) $(SOUND_LIBS) $(CLIENTICON) \ $(TINYCTHR_LIBS) $(MAPIMG_WAND_LIBS) \ ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34120 - in /branches/S2_6: client/gui-gtk-3.22/ m4/
Author: cazfi Date: Fri Oct 14 15:23:13 2016 New Revision: 34120 URL: http://svn.gna.org/viewcvs/freeciv?rev=34120&view=rev Log: Added icon_label_button_new() to gtk3.22-client for creating buttons with icon and/or label. Whether icon or label, or both, get shown, is considered "undefined" - do not rely on things not changing on underlying widget libraries or in the function itself. See patch #6708 Modified: branches/S2_6/client/gui-gtk-3.22/cma_fe.c branches/S2_6/client/gui-gtk-3.22/dialogs.c branches/S2_6/client/gui-gtk-3.22/finddlg.c branches/S2_6/client/gui-gtk-3.22/gui_stuff.c branches/S2_6/client/gui-gtk-3.22/gui_stuff.h branches/S2_6/client/gui-gtk-3.22/luaconsole.c branches/S2_6/client/gui-gtk-3.22/messagedlg.c branches/S2_6/client/gui-gtk-3.22/messagewin.c branches/S2_6/client/gui-gtk-3.22/pages.c branches/S2_6/client/gui-gtk-3.22/plrdlg.c branches/S2_6/client/gui-gtk-3.22/repodlgs.c branches/S2_6/client/gui-gtk-3.22/spaceshipdlg.c branches/S2_6/m4/gtk3.22-client.m4 Modified: branches/S2_6/client/gui-gtk-3.22/cma_fe.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/cma_fe.c?rev=34120&r1=34119&r2=34120&view=diff == --- branches/S2_6/client/gui-gtk-3.22/cma_fe.c (original) +++ branches/S2_6/client/gui-gtk-3.22/cma_fe.c Fri Oct 14 15:23:13 2016 @@ -215,7 +215,7 @@ struct cma_dialog *pdialog; struct cm_parameter param; GtkWidget *frame, *page, *hbox, *label, *table; - GtkWidget *vbox, *sw, *hscale, *button, *image; + GtkWidget *vbox, *sw, *hscale, *button; GtkListStore *store; GtkCellRenderer *rend; GtkWidget *view; @@ -295,15 +295,13 @@ gtk_button_box_set_layout(GTK_BUTTON_BOX(hbox), GTK_BUTTONBOX_EDGE); gtk_container_add(GTK_CONTAINER(vbox), hbox); - button = gtk_button_new_with_mnemonic(_("Ne_w")); - image = gtk_image_new_from_stock(GTK_STOCK_NEW, GTK_ICON_SIZE_BUTTON); - gtk_button_set_image(GTK_BUTTON(button), image); + button = icon_label_button_new("document-new", _("Ne_w")); gtk_container_add(GTK_CONTAINER(hbox), button); g_signal_connect(button, "clicked", G_CALLBACK(cma_add_preset_callback), pdialog); pdialog->add_preset_command = button; - pdialog->del_preset_command = gtk_button_new_from_stock(GTK_STOCK_DELETE); + pdialog->del_preset_command = icon_label_button_new("edit-delete", _("Delete")); gtk_container_add(GTK_CONTAINER(hbox), pdialog->del_preset_command); g_signal_connect(pdialog->del_preset_command, "clicked", G_CALLBACK(cma_del_preset_callback), pdialog); @@ -425,7 +423,7 @@ gtk_button_box_set_layout(GTK_BUTTON_BOX(hbox), GTK_BUTTONBOX_EDGE); gtk_container_add(GTK_CONTAINER(vbox), hbox); - button = gtk_button_new_from_stock(GTK_STOCK_HELP); + button = icon_label_button_new("help-browser", _("Help")); g_signal_connect(button, "clicked", G_CALLBACK(help_callback), NULL); gtk_container_add(GTK_CONTAINER(hbox), button); Modified: branches/S2_6/client/gui-gtk-3.22/dialogs.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/dialogs.c?rev=34120&r1=34119&r2=34120&view=diff == --- branches/S2_6/client/gui-gtk-3.22/dialogs.c (original) +++ branches/S2_6/client/gui-gtk-3.22/dialogs.c Fri Oct 14 15:23:13 2016 @@ -108,7 +108,8 @@ gui_dialog_new(&shell, GTK_NOTEBOOK(bottom_notebook), NULL, TRUE); gui_dialog_set_title(shell, caption); - gui_dialog_add_button(shell, GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE); + gui_dialog_add_button(shell, "window-close", _("Close"), +GTK_RESPONSE_CLOSE); gui_dialog_set_default_response(shell, GTK_RESPONSE_CLOSE); vbox = gtk_grid_new(); Modified: branches/S2_6/client/gui-gtk-3.22/finddlg.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/finddlg.c?rev=34120&r1=34119&r2=34120&view=diff == --- branches/S2_6/client/gui-gtk-3.22/finddlg.c (original) +++ branches/S2_6/client/gui-gtk-3.22/finddlg.c Fri Oct 14 15:23:13 2016 @@ -72,10 +72,10 @@ gui_dialog_set_title(find_dialog_shell, _("Find City")); gui_dialog_set_default_size(find_dialog_shell, -1, 240); -gui_dialog_add_button(find_dialog_shell, - GTK_STOCK_FIND, GTK_RESPONSE_ACCEPT); -gui_dialog_add_button(find_dialog_shell, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); +gui_dialog_add_button(find_dialog_shell, "edit-find", _("Find"), + GTK_RESPONSE_ACCEPT); +gui_dialog_add_button(find_dialog_shell, NULL, _("Cancel"), + GTK_RESPONSE_CANCEL); gui_dialog_set_default_response(find_dialog_shell, GTK_RESPONSE_ACCEPT); Modified: branches/S2_6/client/gui-gtk-3.22/gui_stuff.c URL: http://svn.gna.org/viewcvs/f
[Freeciv-commits] r34119 - /branches/S2_6/ai/default/daidiplomacy.c
Author: cazfi Date: Fri Oct 14 06:53:26 2016 New Revision: 34119 URL: http://svn.gna.org/viewcvs/freeciv?rev=34119&view=rev Log: Randomize AI love on first contact. Reported by Jacob Nevins See bug #25045 Modified: branches/S2_6/ai/default/daidiplomacy.c Modified: branches/S2_6/ai/default/daidiplomacy.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/ai/default/daidiplomacy.c?rev=34119&r1=34118&r2=34119&view=diff == --- branches/S2_6/ai/default/daidiplomacy.c (original) +++ branches/S2_6/ai/default/daidiplomacy.c Fri Oct 14 06:53:26 2016 @@ -922,6 +922,9 @@ struct player *aplayer) { bool wants_ceasefire = FALSE; + + /* Randomize initial love */ + pplayer->ai_common.love[player_index(aplayer)] += 2 - fc_rand(5); if (pplayer->ai_controlled && player_diplstate_get(pplayer, aplayer)->type == DS_WAR ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34118 - /trunk/ai/default/daidiplomacy.c
Author: cazfi Date: Fri Oct 14 06:53:19 2016 New Revision: 34118 URL: http://svn.gna.org/viewcvs/freeciv?rev=34118&view=rev Log: Randomize AI love on first contact. Reported by Jacob Nevins See bug #25045 Modified: trunk/ai/default/daidiplomacy.c Modified: trunk/ai/default/daidiplomacy.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/ai/default/daidiplomacy.c?rev=34118&r1=34117&r2=34118&view=diff == --- trunk/ai/default/daidiplomacy.c (original) +++ trunk/ai/default/daidiplomacy.c Fri Oct 14 06:53:19 2016 @@ -923,6 +923,9 @@ struct player *aplayer) { bool wants_ceasefire = FALSE; + + /* Randomize initial love */ + pplayer->ai_common.love[player_index(aplayer)] += 2 - fc_rand(5); if (is_ai(pplayer) && player_diplstate_get(pplayer, aplayer)->type == DS_WAR ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34116 - in /trunk: configure.ac m4/gtk3.22-client.m4
Author: cazfi Date: Thu Oct 13 18:06:37 2016 New Revision: 34116 URL: http://svn.gna.org/viewcvs/freeciv?rev=34116&view=rev Log: Changed gtk3.22-client enabling --enable-client value to 'gtk3.22' See patch #7806 Modified: trunk/configure.ac trunk/m4/gtk3.22-client.m4 Modified: trunk/configure.ac URL: http://svn.gna.org/viewcvs/freeciv/trunk/configure.ac?rev=34116&r1=34115&r2=34116&view=diff == --- trunk/configure.ac (original) +++ trunk/configure.ac Thu Oct 13 18:06:37 2016 @@ -417,7 +417,7 @@ gui_gtk2=no gui_gtk3=no -gui_gtk3x=no +gui_gtk3_22=no gui_sdl2=no gui_qt=no gui_stub=no @@ -440,8 +440,8 @@ test "x$gui" = "xgtk30" || test "x$gui" = "xgtk-3.0" ; then gui_gtk3=yes -elif test "x$gui" = "xgtk3x" ; then - gui_gtk3x=yes +elif test "x$gui" = "xgtk3.22" ; then + gui_gtk3_22=yes elif test "x$gui" = "xgtk" ; then AC_MSG_WARN([for requested client 'gtk' enabled gtk3-client, that has changed since earlier versions and will change again in the future]) gui_gtk3=yes @@ -999,7 +999,7 @@ if test "x$client" = "xall" ; then if test "x$gui_gtk2" = "xyes" || test "x$gui_gtk3" = "xyes" || - test "x$gui_gtk3x" = "xyes" || + test "x$gui_gtk3_22" = "xyes" || test "x$gui_sdl2" = "xyes" || test "x$gui_qt" = "xyes" || test "x$gui_stub" = "xyes" ; then @@ -1030,14 +1030,14 @@ dnl freeciv-modpack checks AC_ARG_ENABLE([fcmp], - AS_HELP_STRING([--enable-fcmp=no/yes/gtk2/gtk3/gtk3x/qt/cli/all/auto], [build freeciv-modpack-program [auto]]), + AS_HELP_STRING([--enable-fcmp=no/yes/gtk2/gtk3/gtk3.22/qt/cli/all/auto], [build freeciv-modpack-program [auto]]), [fc_mp=${enableval}], [fc_mp=auto]) fcmp_cli=no fcmp_gtk2=no fcmp_gtk3=no -fcmp_gtk3x=no +fcmp_gtk3_22=no fcmp_qt=no fcmp_list= @@ -1063,8 +1063,8 @@ test "x$mp" = "xgtk30" || test "x$mp" = "xgtk-3.0" ; then req_fcmp_gtk3=yes -elif test "x$mp" = "xgtk3x" ; then - req_fcmp_gtk3x=yes +elif test "x$mp" = "xgtk3.22" ; then + req_fcmp_gtk3_22=yes elif test "x$mp" = "xqt" ; then req_fcmp_qt=yes elif test "x$mp" = "xcli" ; then @@ -1103,7 +1103,7 @@ AC_MSG_ERROR([Cannot build gtk3-version of freeciv-modpack as requested]) fi -if test "x$req_fcmp_gtk3x" = "xyes" || +if test "x$req_fcmp_gtk3_22" = "xyes" || test "x$modinst" = "xall" || test "x$modinst" = "xauto" ; then PKG_CHECK_MODULES([GTK3X_MP], [gtk+-3.0 >= 3.18.0], [ @@ -,8 +,8 @@ GTK3X_MP_CFLAGS="$GTK3X_MP_CFLAGS -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_46" PKG_CHECK_MODULES([GTHREAD_GTK3X], [gthread-2.0], [ - fcmp_gtk3x=yes - fcmp_list="$fcmp_list gtk3x" + fcmp_gtk3_22=yes + fcmp_list="$fcmp_list gtk3.22" mp_gtk3x_cflags="$GTK3X_MP_CFLAGS $GHTREAD_GTK3X_CFLAGS" mp_gtk3x_libs="$GTK3X_MP_LIBS $GTHREAD_GTK3X_LIBS" if test "x$MINGW32" = "xyes"; then @@ -1127,8 +1127,8 @@ ], [])], []) fi -if test "x$req_fcmp_gtk3x" = "xyes" && test "x$fcmp_gtk3x" != "xyes" ; then - AC_MSG_ERROR([Cannot build gtk3x-version of freeciv-modpack as requested]) +if test "x$req_fcmp_gtk3_22" = "xyes" && test "x$fcmp_gtk3_22" != "xyes" ; then + AC_MSG_ERROR([Cannot build gtk3.22-version of freeciv-modpack as requested]) fi if test "x$req_fcmp_gtk2" = "xyes" || @@ -1193,7 +1193,7 @@ test "x$modinst" != "xno" && test "x$modinst" != "xcli" && test "x$fcmp_gtk3" != "xyes" && - test "x$fcmp_gtk3x" != "xyes" && + test "x$fcmp_gtk3_22" != "xyes" && test "x$fcmp_gtk2" != "xyes" && test "x$fcmp_qt" != "xyes" ;then AC_MSG_ERROR([Cannot build modpack installer with any gui]) @@ -1212,7 +1212,7 @@ AM_CONDITIONAL([MODINST], [test "x$modinst" != "xno"]) AM_CONDITIONAL([MODINST_GTK3], [test "x$fcmp_gtk3" = "xyes"]) -AM_CONDITIONAL([MODINST_GTK3X], [test "x$fcmp_gtk3x" = "xyes"]) +AM_CONDITIONAL([MODINST_GTK3X], [test "x$fcmp_gtk3_22" = "xyes"]) AM_CONDITIONAL([MODINST_GTK2], [test "x$fcmp_gtk2" = "xyes"]) AM_CONDITIONAL([MODINST_QT], [test "x$fcmp_qt" = "xyes"]) AM_CONDITIONAL([MODINST_CLI], [test "x$fcmp_cli" = "xyes"]) @@ -1300,7 +1300,7 @@ AM_CONDITIONAL(CLIENT_GUI_SDL2, test "x$gui_sdl2" = "xyes") AM_CONDITIONAL(CLIENT_GUI_GTK_2_0, test "x$gui_gtk2" = "xyes") AM_CONDITIONAL(CLIENT_GUI_GTK_3_0, test "x$gui_gtk3" = "xyes") -AM_CONDITIONAL(CLIENT_GUI_GTK_3_22, test "x$gui_gtk3x" = "xyes") +AM_CONDITIONAL(CLIENT_GUI_GTK_3_22, test "x$gui_gtk3_22" = "xyes") AM_CONDITIONAL(CLIENT_GUI_GTK_3X, /bin/false) AM_CONDITIONAL(CLIENT_GUI_QT, test "x$gui_qt" = "xyes") AM_CONDITIONAL(CLIENT_GUI_STUB, test "x$gui_stub" = "xyes") @@ -1848,7 +1848,7 @@ In-development client frontends: (these are not yet ready for general use) -Gtk-3.x $gui_gtk3x +Gtk-3.22 $gui_gtk3_22 Not maintained client frontends: Gtk-2.0: $gui_gtk2 Modified: trunk/m4/gtk3.22-client.m4 URL: http://svn.gna.org/viewcvs/freeci
[Freeciv-commits] r34109 - in /branches/S2_6/client/gui-gtk-3.22: diplodlg.c menu.c optiondlg.c wldlg.c
Author: cazfi Date: Wed Oct 12 19:37:38 2016 New Revision: 34109 URL: http://svn.gna.org/viewcvs/freeciv?rev=34109&view=rev Log: Got rid of deprecated gtk_image_menu_item_...() calls in gtk3.22-client. See patch #6706 Modified: branches/S2_6/client/gui-gtk-3.22/diplodlg.c branches/S2_6/client/gui-gtk-3.22/menu.c branches/S2_6/client/gui-gtk-3.22/optiondlg.c branches/S2_6/client/gui-gtk-3.22/wldlg.c Modified: branches/S2_6/client/gui-gtk-3.22/diplodlg.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/diplodlg.c?rev=34109&r1=34108&r2=34109&view=diff == --- branches/S2_6/client/gui-gtk-3.22/diplodlg.c(original) +++ branches/S2_6/client/gui-gtk-3.22/diplodlg.cWed Oct 12 19:37:38 2016 @@ -735,10 +735,7 @@ menu = gtk_menu_new(); pdialog->menu0 = menu; - menuitem = gtk_image_menu_item_new_with_label(_("Add Clause...")); - gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menuitem), -gtk_image_new_from_stock(GTK_STOCK_ADD, - GTK_ICON_SIZE_MENU)); + menuitem = gtk_menu_item_new_with_label(_("Add Clause...")); gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), menu); gtk_menu_shell_append(GTK_MENU_SHELL(menubar), menuitem); g_object_set_data(G_OBJECT(menu), "plr", plr0); @@ -820,10 +817,7 @@ menu = gtk_menu_new(); pdialog->menu1 = menu; - menuitem = gtk_image_menu_item_new_with_label(_("Add Clause...")); - gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menuitem), -gtk_image_new_from_stock(GTK_STOCK_ADD, - GTK_ICON_SIZE_MENU)); + menuitem = gtk_menu_item_new_with_label(_("Add Clause...")); gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), menu); gtk_menu_shell_append(GTK_MENU_SHELL(menubar), menuitem); g_object_set_data(G_OBJECT(menu), "plr", plr1); Modified: branches/S2_6/client/gui-gtk-3.22/menu.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/menu.c?rev=34109&r1=34108&r2=34109&view=diff == --- branches/S2_6/client/gui-gtk-3.22/menu.c(original) +++ branches/S2_6/client/gui-gtk-3.22/menu.cWed Oct 12 19:37:38 2016 @@ -2530,25 +2530,11 @@ governments_iterate(g) { if (g != game.government_during_revolution) { -struct sprite *gsprite; - /* TRANS: %s is a government name */ fc_snprintf(buf, sizeof(buf), _("%s..."), government_name_translation(g)); -item = gtk_image_menu_item_new_with_label(buf); +item = gtk_menu_item_new_with_label(buf); g_object_set_data(G_OBJECT(item), "government", g); - -if ((gsprite = get_government_sprite(tileset, g))) { - GtkWidget *image; - GdkPixbuf *pb = sprite_get_pixbuf(gsprite); - - image = gtk_image_new_from_pixbuf(pb); - g_object_unref(pb); - gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), image); - gtk_image_menu_item_set_always_show_image(GTK_IMAGE_MENU_ITEM(item), TRUE); - gtk_widget_show(image); -} - g_signal_connect(item, "activate", G_CALLBACK(government_callback), g); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); Modified: branches/S2_6/client/gui-gtk-3.22/optiondlg.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/optiondlg.c?rev=34109&r1=34108&r2=34109&view=diff == --- branches/S2_6/client/gui-gtk-3.22/optiondlg.c (original) +++ branches/S2_6/client/gui-gtk-3.22/optiondlg.c Wed Oct 12 19:37:38 2016 @@ -193,24 +193,17 @@ menu = gtk_menu_new(); - item = gtk_image_menu_item_new_with_label(_("Refresh this option")); - gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), - gtk_image_new_from_stock(GTK_STOCK_REFRESH, GTK_ICON_SIZE_MENU)); + item = gtk_menu_item_new_with_label(_("Refresh this option")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); g_signal_connect(item, "activate", G_CALLBACK(option_refresh_callback), poption); - item = gtk_image_menu_item_new_with_label(_("Reset this option")); - gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), - gtk_image_new_from_stock(GTK_STOCK_CLEAR, GTK_ICON_SIZE_MENU)); + item = gtk_menu_item_new_with_label(_("Reset this option")); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); g_signal_connect(item, "activate", G_CALLBACK(option_reset_callback), poption); - item = gtk_image_menu_item_new_with_label( - _("Apply the changes for this option")); - gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), - gtk_image_new_from_stock(GTK_ST
[Freeciv-commits] r34105 - /trunk/windows/installer_msys2/Makefile
Author: cazfi Date: Wed Oct 12 09:58:08 2016 New Revision: 34105 URL: http://svn.gna.org/viewcvs/freeciv?rev=34105&view=rev Log: Set msys2 Windows Installer makefile target 'all' to depend on those installers that can be built with official msys2 environment. See patch #7813 Modified: trunk/windows/installer_msys2/Makefile Modified: trunk/windows/installer_msys2/Makefile URL: http://svn.gna.org/viewcvs/freeciv/trunk/windows/installer_msys2/Makefile?rev=34105&r1=34104&r2=34105&view=diff == --- trunk/windows/installer_msys2/Makefile (original) +++ trunk/windows/installer_msys2/Makefile Wed Oct 12 09:58:08 2016 @@ -33,8 +33,9 @@ # Make rules # -# by default build all installers -all: gtk3-installer gtk2-installer sdl2-installer qt-installer ruledit-installer +# by default build all installers that are buildable with current msys2 environment +# gtk2-installer and qt-installers are not built. +all: gtk3-installer gtk3x-installer sdl2-installer ruledit-installer gtk3x-installer: make GUI=gtk3x FCMP=gtk3x EXTRA_CONFIG="--disable-ruledit $(EXTRA_CONFIG)" wrap-gtk3x ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34106 - /branches/S2_6/win32/installer_msys2/Makefile
Author: cazfi Date: Wed Oct 12 09:58:14 2016 New Revision: 34106 URL: http://svn.gna.org/viewcvs/freeciv?rev=34106&view=rev Log: Set msys2 Windows Installer makefile target 'all' to depend on those installers that can be built with official msys2 environment. See patch #7813 Modified: branches/S2_6/win32/installer_msys2/Makefile Modified: branches/S2_6/win32/installer_msys2/Makefile URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/win32/installer_msys2/Makefile?rev=34106&r1=34105&r2=34106&view=diff == --- branches/S2_6/win32/installer_msys2/Makefile(original) +++ branches/S2_6/win32/installer_msys2/MakefileWed Oct 12 09:58:14 2016 @@ -33,8 +33,9 @@ # Make rules # -# by default build all installers -all: gtk3-installer gtk2-installer sdl2-installer qt-installer ruledit-installer +# by default build all installers that are buildable with current msys2 environment +# gtk2-installer and qt-installers are not built. +all: gtk3-installer sdl2-installer ruledit-installer # These are what can be built in current official environment version buildable-win32: gtk3-installer sdl2-installer ruledit-installer ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34102 - in /branches/S2_6/client: client_main.c options.c options.h tilespec.c tilespec.h
Author: cazfi Date: Wed Oct 12 02:29:31 2016 New Revision: 34102 URL: http://svn.gna.org/viewcvs/freeciv?rev=34102&view=rev Log: Fill initial default for tileset option for all topologies. See patch #6875 Modified: branches/S2_6/client/client_main.c branches/S2_6/client/options.c branches/S2_6/client/options.h branches/S2_6/client/tilespec.c branches/S2_6/client/tilespec.h Modified: branches/S2_6/client/client_main.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/client_main.c?rev=34102&r1=34101&r2=34102&view=diff == --- branches/S2_6/client/client_main.c (original) +++ branches/S2_6/client/client_main.c Wed Oct 12 02:29:31 2016 @@ -662,10 +662,12 @@ helpdata_init(); boot_help_texts(); + fill_topo_ts_default(); + if (forced_tileset_name[0] != '\0') { -tilespec_try_read(forced_tileset_name, TRUE); +tilespec_try_read(forced_tileset_name, TRUE, -1, TRUE); } else { -tilespec_try_read(gui_options.default_tileset_name, FALSE); +tilespec_try_read(gui_options.default_tileset_name, FALSE, -1, TRUE); } audio_real_init(sound_set_name, music_set_name, sound_plugin_name); Modified: branches/S2_6/client/options.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/options.c?rev=34102&r1=34101&r2=34102&view=diff == --- branches/S2_6/client/options.c (original) +++ branches/S2_6/client/options.c Wed Oct 12 02:29:31 2016 @@ -6278,3 +6278,49 @@ opt->str_vtable->set(opt, tileset_basename(t)); option_gui_update(opt); } + +/ + Does topology-specific tileset option lack value? +/ +static bool is_ts_option_unset(const char *optname) +{ + struct option *opt; + const char *val; + + opt = optset_option_by_name(client_optset, optname); + + if (opt == NULL) { +return TRUE; + } + + val = opt->str_vtable->get(opt); + + if (val == NULL || val[0] == '\0') { +return TRUE; + } + + return FALSE; +} + +/ + Fill default tilesets for topology-specific settings. +/ +void fill_topo_ts_default(void) +{ + if (is_ts_option_unset("default_tileset_overhead_name")) { +log_debug("Setting tileset for overhead topology."); +tilespec_try_read(NULL, FALSE, 0, FALSE); + } + if (is_ts_option_unset("default_tileset_iso_name")) { +log_debug("Setting tileset for iso topology."); +tilespec_try_read(NULL, FALSE, TF_ISO, FALSE); + } + if (is_ts_option_unset("default_tileset_hex_name")) { +log_debug("Setting tileset for hex topology."); +tilespec_try_read(NULL, FALSE, TF_HEX, FALSE); + } + if (is_ts_option_unset("default_tileset_isohex_name")) { +log_debug("Setting tileset for isohex topology."); +tilespec_try_read(NULL, FALSE, TF_ISO | TF_HEX, FALSE); + } +} Modified: branches/S2_6/client/options.h URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/options.h?rev=34102&r1=34101&r2=34102&view=diff == --- branches/S2_6/client/options.h (original) +++ branches/S2_6/client/options.h Wed Oct 12 02:29:31 2016 @@ -565,6 +565,7 @@ const char *tileset_name_for_topology(int topology_id); void option_set_default_ts(struct tileset *t); +void fill_topo_ts_default(void); #ifdef __cplusplus } Modified: branches/S2_6/client/tilespec.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/tilespec.c?rev=34102&r1=34101&r2=34102&view=diff == --- branches/S2_6/client/tilespec.c (original) +++ branches/S2_6/client/tilespec.c Wed Oct 12 02:29:31 2016 @@ -967,7 +967,7 @@ return is_valid_tileset_dir(t, dir); } else { return (dir == DIR8_NORTH || dir == DIR8_EAST - || dir == DIR8_SOUTH || dir == DIR8_WEST); +|| dir == DIR8_SOUTH || dir == DIR8_WEST); } } @@ -979,14 +979,15 @@ { int idx; - if (actual_topology & TF_ISO) { + if ((actual_topology & TF_HEX) + && (actual_topology & TF_ISO)) { +idx = TS_TOPO_ISOHEX; + } else if (actual_topology & TF_ISO) { idx = TS_TOPO_ISO; + } else if (actual_topology & TF_HEX) { +idx = TS_TOPO_HEX; } else { -idx = 0; - } - - if (actual_topology & TF_HEX) { -idx |= TS_TOPO_HEX; +idx = TS_TOPO_OVERHEAD; } return idx; @@ -1187,18 +1188,22 @@ Call this function with the (guessed) name of the tileset, when starting the client. ***/ -void tilespec_try_read(const char *tileset_name, bool verbose
[Freeciv-commits] r34101 - in /trunk/client: client_main.c options.c options.h tilespec.c tilespec.h
Author: cazfi Date: Wed Oct 12 02:29:23 2016 New Revision: 34101 URL: http://svn.gna.org/viewcvs/freeciv?rev=34101&view=rev Log: Fill initial default for tileset option for all topologies. See patch #6875 Modified: trunk/client/client_main.c trunk/client/options.c trunk/client/options.h trunk/client/tilespec.c trunk/client/tilespec.h Modified: trunk/client/client_main.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/client_main.c?rev=34101&r1=34100&r2=34101&view=diff == --- trunk/client/client_main.c (original) +++ trunk/client/client_main.c Wed Oct 12 02:29:23 2016 @@ -662,10 +662,12 @@ helpdata_init(); boot_help_texts(); + fill_topo_ts_default(); + if (forced_tileset_name[0] != '\0') { -tilespec_try_read(forced_tileset_name, TRUE); +tilespec_try_read(forced_tileset_name, TRUE, -1, TRUE); } else { -tilespec_try_read(gui_options.default_tileset_name, FALSE); +tilespec_try_read(gui_options.default_tileset_name, FALSE, -1, TRUE); } audio_real_init(sound_set_name, music_set_name, sound_plugin_name); Modified: trunk/client/options.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/options.c?rev=34101&r1=34100&r2=34101&view=diff == --- trunk/client/options.c (original) +++ trunk/client/options.c Wed Oct 12 02:29:23 2016 @@ -6296,3 +6296,49 @@ opt->str_vtable->set(opt, tileset_basename(t)); option_gui_update(opt); } + +/ + Does topology-specific tileset option lack value? +/ +static bool is_ts_option_unset(const char *optname) +{ + struct option *opt; + const char *val; + + opt = optset_option_by_name(client_optset, optname); + + if (opt == NULL) { +return TRUE; + } + + val = opt->str_vtable->get(opt); + + if (val == NULL || val[0] == '\0') { +return TRUE; + } + + return FALSE; +} + +/ + Fill default tilesets for topology-specific settings. +/ +void fill_topo_ts_default(void) +{ + if (is_ts_option_unset("default_tileset_overhead_name")) { +log_debug("Setting tileset for overhead topology."); +tilespec_try_read(NULL, FALSE, 0, FALSE); + } + if (is_ts_option_unset("default_tileset_iso_name")) { +log_debug("Setting tileset for iso topology."); +tilespec_try_read(NULL, FALSE, TF_ISO, FALSE); + } + if (is_ts_option_unset("default_tileset_hex_name")) { +log_debug("Setting tileset for hex topology."); +tilespec_try_read(NULL, FALSE, TF_HEX, FALSE); + } + if (is_ts_option_unset("default_tileset_isohex_name")) { +log_debug("Setting tileset for isohex topology."); +tilespec_try_read(NULL, FALSE, TF_ISO | TF_HEX, FALSE); + } +} Modified: trunk/client/options.h URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/options.h?rev=34101&r1=34100&r2=34101&view=diff == --- trunk/client/options.h (original) +++ trunk/client/options.h Wed Oct 12 02:29:23 2016 @@ -566,6 +566,7 @@ const char *tileset_name_for_topology(int topology_id); void option_set_default_ts(struct tileset *t); +void fill_topo_ts_default(void); #ifdef __cplusplus } Modified: trunk/client/tilespec.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/tilespec.c?rev=34101&r1=34100&r2=34101&view=diff == --- trunk/client/tilespec.c (original) +++ trunk/client/tilespec.c Wed Oct 12 02:29:23 2016 @@ -980,7 +980,7 @@ return is_valid_tileset_dir(t, dir); } else { return (dir == DIR8_NORTH || dir == DIR8_EAST - || dir == DIR8_SOUTH || dir == DIR8_WEST); +|| dir == DIR8_SOUTH || dir == DIR8_WEST); } } @@ -992,14 +992,15 @@ { int idx; - if (actual_topology & TF_ISO) { + if ((actual_topology & TF_HEX) + && (actual_topology & TF_ISO)) { +idx = TS_TOPO_ISOHEX; + } else if (actual_topology & TF_ISO) { idx = TS_TOPO_ISO; + } else if (actual_topology & TF_HEX) { +idx = TS_TOPO_HEX; } else { -idx = 0; - } - - if (actual_topology & TF_HEX) { -idx |= TS_TOPO_HEX; +idx = TS_TOPO_OVERHEAD; } return idx; @@ -1200,18 +1201,22 @@ Call this function with the (guessed) name of the tileset, when starting the client. ***/ -void tilespec_try_read(const char *tileset_name, bool verbose) -{ - if (!(tileset = tileset_read_toplevel(tileset_name, verbose, -1))) { +void tilespec_try_read(const char *tileset_name, bool verbose, int topo_id, +
[Freeciv-commits] r34100 - in /branches/S2_6: client/gui-gtk-3.22/menu.c data/gtk3.22_menus.xml
Author: cazfi Date: Tue Oct 11 21:30:46 2016 New Revision: 34100 URL: http://svn.gna.org/viewcvs/freeciv?rev=34100&view=rev Log: Use gtk_builder instead of gtk_ui_manager in gtk3.22-client See patch #7771 Modified: branches/S2_6/client/gui-gtk-3.22/menu.c branches/S2_6/data/gtk3.22_menus.xml [This mail would be too long, it was shortened to contain the URLs only.] Modified: branches/S2_6/client/gui-gtk-3.22/menu.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/menu.c?rev=34100&r1=34099&r2=34100&view=diff Modified: branches/S2_6/data/gtk3.22_menus.xml URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/gtk3.22_menus.xml?rev=34100&r1=34099&r2=34100&view=diff ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34099 - in /trunk: Makefile.am m4/gtk3x-client.m4
Author: cazfi Date: Tue Oct 11 21:25:36 2016 New Revision: 34099 URL: http://svn.gna.org/viewcvs/freeciv?rev=34099&view=rev Log: Added gtk3x-client.m4 See patch #7799 Added: trunk/m4/gtk3x-client.m4 Modified: trunk/Makefile.am Modified: trunk/Makefile.am URL: http://svn.gna.org/viewcvs/freeciv/trunk/Makefile.am?rev=34099&r1=34098&r2=34099&view=diff == --- trunk/Makefile.am (original) +++ trunk/Makefile.am Tue Oct 11 21:25:36 2016 @@ -51,6 +51,7 @@ m4/gtk2-client.m4 \ m4/gtk3-client.m4 \ m4/gtk3.22-client.m4\ + m4/gtk3x-client.m4 \ m4/iconv.m4 \ m4/intlmacosx.m4\ m4/lib-ld.m4\ Added: trunk/m4/gtk3x-client.m4 URL: http://svn.gna.org/viewcvs/freeciv/trunk/m4/gtk3x-client.m4?rev=34099&view=auto == --- trunk/m4/gtk3x-client.m4(added) +++ trunk/m4/gtk3x-client.m4Tue Oct 11 21:25:36 2016 @@ -0,0 +1,31 @@ +# Try to configure the GTK+-3.x client (gui-gtk-3.9x) + +# FC_GTK3X_CLIENT +# Test for GTK+-3.90 libraries needed for gui-gtk-3.9x + +AC_DEFUN([FC_GTK3X_CLIENT], +[ + # Add check "x$client" = "xauto" when this becomes supported client + if test "x$gui_gtk3x" = "xyes" || + test "x$client" = "xall" ; then +PKG_CHECK_MODULES([GTK3X], [gtk+-4.0 >= 3.89.0], + [ +GTK3X_CFLAGS="$GTK3X_CFLAGS -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_90" +GTK3X_CFLAGS="$GTK3X_CFLAGS -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_50" +gui_gtk3x=yes +if test "x$client" = "xauto" ; then + client=yes +fi +gui_gtk3x_cflags="$GTK3X_CFLAGS" +gui_gtk3x_libs="$GTK3X_LIBS" +if test "x$MINGW" = "xyes"; then + dnl Required to compile gtk3 on Windows platform + gui_gtk3x_cflags="$gui_gtk3x_cflags -mms-bitfields" + gui_gtk3x_ldflags="$gui_gtk3x_ldflags -mwindows" +fi + ], + [ +FC_NO_CLIENT([gtk3x], [GTK+-3.9x libraries not found]) + ]) + fi +]) ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34093 - /branches/S2_6/doc/README.msys2
Author: cazfi Date: Tue Oct 11 13:25:47 2016 New Revision: 34093 URL: http://svn.gna.org/viewcvs/freeciv?rev=34093&view=rev Log: Removed mention of gtk3x-client from README.msys2 See patch #7809 Modified: branches/S2_6/doc/README.msys2 Modified: branches/S2_6/doc/README.msys2 URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/doc/README.msys2?rev=34093&r1=34092&r2=34093&view=diff == --- branches/S2_6/doc/README.msys2 (original) +++ branches/S2_6/doc/README.msys2 Tue Oct 11 13:25:47 2016 @@ -12,7 +12,7 @@ - Msys1, not msys2, is still the official freeciv Windows Installer build method - Buildable clients are gtk3, gtk2, sdl2, and Qt - - Official pre-made msys2 environment supports only gtk3-, gtk3x-, and + - Official pre-made msys2 environment supports only gtk3- and sdl2-client builds ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34091 - /branches/S2_6/doc/README.msys2
Author: cazfi Date: Tue Oct 11 07:27:04 2016 New Revision: 34091 URL: http://svn.gna.org/viewcvs/freeciv?rev=34091&view=rev Log: Updated documentation about location of the msys2 environment. See patch #7798 Modified: branches/S2_6/doc/README.msys2 Modified: branches/S2_6/doc/README.msys2 URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/doc/README.msys2?rev=34091&r1=34090&r2=34091&view=diff == --- branches/S2_6/doc/README.msys2 (original) +++ branches/S2_6/doc/README.msys2 Tue Oct 11 07:27:04 2016 @@ -111,7 +111,7 @@ Premade msys2 environment is available for download from -http://download.gna.org/freeciv/packages/windows/testing/cazfi/installer_msys2/envs/ +http://download.gna.org/freeciv/packages/windows/msys2/ Current version is ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34089 - in /trunk: configure.ac m4/gtk3.22-client.m4
Author: cazfi Date: Tue Oct 11 07:23:52 2016 New Revision: 34089 URL: http://svn.gna.org/viewcvs/freeciv?rev=34089&view=rev Log: Renamed m4-macro FC_GTK3X_CLIENT as FC_GTK3_22_CLIENT. See patch #7797 Modified: trunk/configure.ac trunk/m4/gtk3.22-client.m4 Modified: trunk/configure.ac URL: http://svn.gna.org/viewcvs/freeciv/trunk/configure.ac?rev=34089&r1=34088&r2=34089&view=diff == --- trunk/configure.ac (original) +++ trunk/configure.ac Tue Oct 11 07:23:52 2016 @@ -978,8 +978,8 @@ dnl SDL2-specific overrides FC_SDL2_CLIENT - dnl Gtk-3.x-specific overrides - FC_GTK3X_CLIENT + dnl Gtk-3.22-specific overrides + FC_GTK3_22_CLIENT dnl Stub-specific overrides if test "x$gui_stub" = "xyes" || test "x$client" = "xall" ; then Modified: trunk/m4/gtk3.22-client.m4 URL: http://svn.gna.org/viewcvs/freeciv/trunk/m4/gtk3.22-client.m4?rev=34089&r1=34088&r2=34089&view=diff == --- trunk/m4/gtk3.22-client.m4 (original) +++ trunk/m4/gtk3.22-client.m4 Tue Oct 11 07:23:52 2016 @@ -3,7 +3,7 @@ # FC_GTK3X_CLIENT # Test for GTK+-3.0 libraries needed for gui-gtk-3.x -AC_DEFUN([FC_GTK3X_CLIENT], +AC_DEFUN([FC_GTK3_22_CLIENT], [ # Add check "x$client" = "xauto" when this becomes supported client if test "x$gui_gtk3x" = "xyes" || ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34080 - in /branches/S2_6/client/gui-gtk-3.22: gui_main.c gui_main.h
Author: cazfi Date: Mon Oct 10 05:47:43 2016 New Revision: 34080 URL: http://svn.gna.org/viewcvs/freeciv?rev=34080&view=rev Log: Made gtk3.22-client to identify itself correctly. See patch #7769 Modified: branches/S2_6/client/gui-gtk-3.22/gui_main.c branches/S2_6/client/gui-gtk-3.22/gui_main.h Modified: branches/S2_6/client/gui-gtk-3.22/gui_main.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/gui_main.c?rev=34080&r1=34079&r2=34080&view=diff == --- branches/S2_6/client/gui-gtk-3.22/gui_main.c(original) +++ branches/S2_6/client/gui-gtk-3.22/gui_main.cMon Oct 10 05:47:43 2016 @@ -105,7 +105,7 @@ #include "gui_main.h" -const char *client_string = "gui-gtk-3.0"; +const char *client_string = "gui-gtk-3.22"; GtkWidget *map_canvas; /* GtkDrawingArea */ GtkWidget *map_horizontal_scrollbar; @@ -1649,20 +1649,19 @@ } /** - Migrate gtk3 client specific options from gtk2 client options. -**/ -static void migrate_options_from_gtk2(void) -{ - log_normal(_("Migrating options from gtk2 to gtk3 client")); - -#define MIGRATE_OPTION(opt) GUI_GTK_OPTION(opt) = gui_options.gui_gtk2_##opt; + Migrate gtk3.22 client specific options from gtk3 client options. +**/ +static void migrate_options_from_gtk3(void) +{ + log_normal(_("Migrating options from gtk3 to gtk3.22 client")); + +#define MIGRATE_OPTION(opt) GUI_GTK_OPTION(opt) = gui_options.gui_gtk3_##opt; #define MIGRATE_STR_OPTION(opt) \ - strncpy(GUI_GTK_OPTION(opt), gui_options.gui_gtk2_##opt, \ + strncpy(GUI_GTK_OPTION(opt), gui_options.gui_gtk3_##opt, \ sizeof(GUI_GTK_OPTION(opt))); /* Default theme name is never migrated */ - /* Fullscreen not migrated as gtk3-client differs from gtk2-client in a way that - * user is likely to want default even if gtk2-client setting differs. */ + MIGRATE_OPTION(fullscreen); MIGRATE_OPTION(map_scrollbars); MIGRATE_OPTION(dialogs_on_top); MIGRATE_OPTION(show_task_icons); @@ -1697,7 +1696,7 @@ #undef MIGRATE_OPTION #undef MIGRATE_STR_OPTION - GUI_GTK_OPTION(migrated_from_gtk2) = TRUE; + GUI_GTK_OPTION(migrated_from_gtk3) = TRUE; } /** @@ -1730,8 +1729,8 @@ gtk_widget_set_name(toplevel, "Freeciv"); root_window = gtk_widget_get_window(toplevel); - if (!GUI_GTK_OPTION(migrated_from_gtk2)) { -migrate_options_from_gtk2(); + if (!GUI_GTK_OPTION(migrated_from_gtk3)) { +migrate_options_from_gtk3(); } if (GUI_GTK_OPTION(fullscreen)) { @@ -1857,7 +1856,7 @@ **/ enum gui_type get_gui_type(void) { - return GUI_GTK3; + return GUI_GTK3_22; } /** Modified: branches/S2_6/client/gui-gtk-3.22/gui_main.h URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/gui_main.h?rev=34080&r1=34079&r2=34080&view=diff == --- branches/S2_6/client/gui-gtk-3.22/gui_main.h(original) +++ branches/S2_6/client/gui-gtk-3.22/gui_main.hMon Oct 10 05:47:43 2016 @@ -18,9 +18,9 @@ /* client */ #include "gui_main_g.h" -#define GUI_GTK_OPTION(optname) gui_options.gui_gtk3_##optname -#define GUI_GTK_OPTION_STR(optname) "gui_gtk3_" #optname -#define GUI_GTK_DEFAULT_THEME_NAME FC_GTK3_DEFAULT_THEME_NAME +#define GUI_GTK_OPTION(optname) gui_options.gui_gtk3_22_##optname +#define GUI_GTK_OPTION_STR(optname) "gui_gtk3_22_" #optname +#define GUI_GTK_DEFAULT_THEME_NAME FC_GTK3_22_DEFAULT_THEME_NAME /* network string charset conversion */ gchar *ntoh_str(const gchar *netstr); ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34075 - /branches/S2_6/client/gui-gtk-3.22/
Author: cazfi Date: Sun Oct 9 19:23:00 2016 New Revision: 34075 URL: http://svn.gna.org/viewcvs/freeciv?rev=34075&view=rev Log: Changed gtk3.22-client comments to speak of gui-gtk-3.22. See patch #7791 Modified: branches/S2_6/client/gui-gtk-3.22/action_dialog.c branches/S2_6/client/gui-gtk-3.22/canvas.c branches/S2_6/client/gui-gtk-3.22/canvas.h branches/S2_6/client/gui-gtk-3.22/chatline.c branches/S2_6/client/gui-gtk-3.22/chatline.h branches/S2_6/client/gui-gtk-3.22/choice_dialog.c branches/S2_6/client/gui-gtk-3.22/choice_dialog.h branches/S2_6/client/gui-gtk-3.22/citizensinfo.c branches/S2_6/client/gui-gtk-3.22/citydlg.c branches/S2_6/client/gui-gtk-3.22/citydlg.h branches/S2_6/client/gui-gtk-3.22/cityrep.c branches/S2_6/client/gui-gtk-3.22/cityrep.h branches/S2_6/client/gui-gtk-3.22/cma_fe.c branches/S2_6/client/gui-gtk-3.22/cma_fe.h branches/S2_6/client/gui-gtk-3.22/colors.c branches/S2_6/client/gui-gtk-3.22/colors.h branches/S2_6/client/gui-gtk-3.22/connectdlg.c branches/S2_6/client/gui-gtk-3.22/connectdlg.h branches/S2_6/client/gui-gtk-3.22/dialogs.c branches/S2_6/client/gui-gtk-3.22/dialogs.h branches/S2_6/client/gui-gtk-3.22/diplodlg.c branches/S2_6/client/gui-gtk-3.22/diplodlg.h branches/S2_6/client/gui-gtk-3.22/editgui.c branches/S2_6/client/gui-gtk-3.22/editprop.c branches/S2_6/client/gui-gtk-3.22/editprop.h branches/S2_6/client/gui-gtk-3.22/finddlg.c branches/S2_6/client/gui-gtk-3.22/finddlg.h branches/S2_6/client/gui-gtk-3.22/gamedlgs.c branches/S2_6/client/gui-gtk-3.22/gamedlgs.h branches/S2_6/client/gui-gtk-3.22/gotodlg.c branches/S2_6/client/gui-gtk-3.22/gotodlg.h branches/S2_6/client/gui-gtk-3.22/graphics.c branches/S2_6/client/gui-gtk-3.22/graphics.h branches/S2_6/client/gui-gtk-3.22/gtkpixcomm.c branches/S2_6/client/gui-gtk-3.22/gui_main.c branches/S2_6/client/gui-gtk-3.22/gui_stuff.c branches/S2_6/client/gui-gtk-3.22/happiness.c branches/S2_6/client/gui-gtk-3.22/happiness.h branches/S2_6/client/gui-gtk-3.22/helpdlg.c branches/S2_6/client/gui-gtk-3.22/helpdlg.h branches/S2_6/client/gui-gtk-3.22/inputdlg.c branches/S2_6/client/gui-gtk-3.22/inputdlg.h branches/S2_6/client/gui-gtk-3.22/inteldlg.c branches/S2_6/client/gui-gtk-3.22/inteldlg.h branches/S2_6/client/gui-gtk-3.22/luaconsole.c branches/S2_6/client/gui-gtk-3.22/mapctrl.c branches/S2_6/client/gui-gtk-3.22/mapctrl.h branches/S2_6/client/gui-gtk-3.22/mapview.c branches/S2_6/client/gui-gtk-3.22/mapview.h branches/S2_6/client/gui-gtk-3.22/menu.c branches/S2_6/client/gui-gtk-3.22/menu.h branches/S2_6/client/gui-gtk-3.22/messagedlg.c branches/S2_6/client/gui-gtk-3.22/messagedlg.h branches/S2_6/client/gui-gtk-3.22/messagewin.c branches/S2_6/client/gui-gtk-3.22/messagewin.h branches/S2_6/client/gui-gtk-3.22/optiondlg.c branches/S2_6/client/gui-gtk-3.22/optiondlg.h branches/S2_6/client/gui-gtk-3.22/pages.c branches/S2_6/client/gui-gtk-3.22/pages.h branches/S2_6/client/gui-gtk-3.22/plrdlg.c branches/S2_6/client/gui-gtk-3.22/plrdlg.h branches/S2_6/client/gui-gtk-3.22/ratesdlg.h branches/S2_6/client/gui-gtk-3.22/repodlgs.c branches/S2_6/client/gui-gtk-3.22/repodlgs.h branches/S2_6/client/gui-gtk-3.22/soundset_dlg.c branches/S2_6/client/gui-gtk-3.22/spaceshipdlg.c branches/S2_6/client/gui-gtk-3.22/spaceshipdlg.h branches/S2_6/client/gui-gtk-3.22/sprite.c branches/S2_6/client/gui-gtk-3.22/sprite.h branches/S2_6/client/gui-gtk-3.22/themes.c branches/S2_6/client/gui-gtk-3.22/tileset_dlg.c branches/S2_6/client/gui-gtk-3.22/transportdlg.c branches/S2_6/client/gui-gtk-3.22/unitselect.c branches/S2_6/client/gui-gtk-3.22/unitselunitdlg.c branches/S2_6/client/gui-gtk-3.22/voteinfo_bar.c branches/S2_6/client/gui-gtk-3.22/voteinfo_bar.h branches/S2_6/client/gui-gtk-3.22/wldlg.c branches/S2_6/client/gui-gtk-3.22/wldlg.h [This mail would be too long, it was shortened to contain the URLs only.] Modified: branches/S2_6/client/gui-gtk-3.22/action_dialog.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/action_dialog.c?rev=34075&r1=34074&r2=34075&view=diff Modified: branches/S2_6/client/gui-gtk-3.22/canvas.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/canvas.c?rev=34075&r1=34074&r2=34075&view=diff Modified: branches/S2_6/client/gui-gtk-3.22/canvas.h URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/canvas.h?rev=34075&r1=34074&r2=34075&view=diff Modified: branches/S2_6/client/gui-gtk-3.22/chatline.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/chatline.c?rev=34075&r1=34074&r2=34075&view=diff Modified: branches/S2_6/client/gui-gtk-3.22/chatline.h URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/chatline.h?rev=34
[Freeciv-commits] r34069 - in /branches/S2_6/client: gui-gtk-3.0/gui_stuff.c gui-gtk-3.22/gui_stuff.c
Author: cazfi Date: Sun Oct 9 12:51:35 2016 New Revision: 34069 URL: http://svn.gna.org/viewcvs/freeciv?rev=34069&view=rev Log: Gtk3-clients construct proper font definitions css using pango. Broken css reported by Bernhard See patch #7162 Modified: branches/S2_6/client/gui-gtk-3.0/gui_stuff.c branches/S2_6/client/gui-gtk-3.22/gui_stuff.c Modified: branches/S2_6/client/gui-gtk-3.0/gui_stuff.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.0/gui_stuff.c?rev=34069&r1=34068&r2=34069&view=diff == --- branches/S2_6/client/gui-gtk-3.0/gui_stuff.c(original) +++ branches/S2_6/client/gui-gtk-3.0/gui_stuff.cSun Oct 9 12:51:35 2016 @@ -1010,8 +1010,33 @@ { char *str; GtkCssProvider *provider; - - str = g_strdup_printf("#Freeciv #%s { font: %s;}", font_name, font_value); + PangoFontDescription *desc; + int size; + const char *fam; + + desc = pango_font_description_from_string(font_value); + + if (desc == NULL) { +return; + } + + fam = pango_font_description_get_family(desc); + + if (fam == NULL) { +return; + } + + size = pango_font_description_get_size(desc); + + if (size != 0) { +str = g_strdup_printf("#Freeciv #%s { font-family: %s; font-size: %dpt;}", + font_name, fam, size / PANGO_SCALE); + } else { +str = g_strdup_printf("#Freeciv #%s { font-family: %s; }", + font_name, fam); + } + + pango_font_description_free(desc); provider = gtk_css_provider_new(); gtk_css_provider_load_from_data(GTK_CSS_PROVIDER(provider), Modified: branches/S2_6/client/gui-gtk-3.22/gui_stuff.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/gui_stuff.c?rev=34069&r1=34068&r2=34069&view=diff == --- branches/S2_6/client/gui-gtk-3.22/gui_stuff.c (original) +++ branches/S2_6/client/gui-gtk-3.22/gui_stuff.c Sun Oct 9 12:51:35 2016 @@ -1010,8 +1010,33 @@ { char *str; GtkCssProvider *provider; - - str = g_strdup_printf("#Freeciv #%s { font: %s;}", font_name, font_value); + PangoFontDescription *desc; + int size; + const char *fam; + + desc = pango_font_description_from_string(font_value); + + if (desc == NULL) { +return; + } + + fam = pango_font_description_get_family(desc); + + if (fam == NULL) { +return; + } + + size = pango_font_description_get_size(desc); + + if (size != 0) { +str = g_strdup_printf("#Freeciv #%s { font-family: %s; font-size: %dpt;}", + font_name, fam, size / PANGO_SCALE); + } else { +str = g_strdup_printf("#Freeciv #%s { font-family: %s; }", + font_name, fam); + } + + pango_font_description_free(desc); provider = gtk_css_provider_new(); gtk_css_provider_load_from_data(GTK_CSS_PROVIDER(provider), ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34068 - in /trunk/client: gui-gtk-3.0/gui_stuff.c gui-gtk-3.22/gui_stuff.c
Author: cazfi Date: Sun Oct 9 12:51:28 2016 New Revision: 34068 URL: http://svn.gna.org/viewcvs/freeciv?rev=34068&view=rev Log: Gtk3-clients construct proper font definitions css using pango. Broken css reported by Bernhard See patch #7162 Modified: trunk/client/gui-gtk-3.0/gui_stuff.c trunk/client/gui-gtk-3.22/gui_stuff.c Modified: trunk/client/gui-gtk-3.0/gui_stuff.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.0/gui_stuff.c?rev=34068&r1=34067&r2=34068&view=diff == --- trunk/client/gui-gtk-3.0/gui_stuff.c(original) +++ trunk/client/gui-gtk-3.0/gui_stuff.cSun Oct 9 12:51:28 2016 @@ -1010,8 +1010,33 @@ { char *str; GtkCssProvider *provider; - - str = g_strdup_printf("#Freeciv #%s { font: %s;}", font_name, font_value); + PangoFontDescription *desc; + int size; + const char *fam; + + desc = pango_font_description_from_string(font_value); + + if (desc == NULL) { +return; + } + + fam = pango_font_description_get_family(desc); + + if (fam == NULL) { +return; + } + + size = pango_font_description_get_size(desc); + + if (size != 0) { +str = g_strdup_printf("#Freeciv #%s { font-family: %s; font-size: %dpt;}", + font_name, fam, size / PANGO_SCALE); + } else { +str = g_strdup_printf("#Freeciv #%s { font-family: %s; }", + font_name, fam); + } + + pango_font_description_free(desc); provider = gtk_css_provider_new(); gtk_css_provider_load_from_data(GTK_CSS_PROVIDER(provider), Modified: trunk/client/gui-gtk-3.22/gui_stuff.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.22/gui_stuff.c?rev=34068&r1=34067&r2=34068&view=diff == --- trunk/client/gui-gtk-3.22/gui_stuff.c (original) +++ trunk/client/gui-gtk-3.22/gui_stuff.c Sun Oct 9 12:51:28 2016 @@ -1003,8 +1003,33 @@ { char *str; GtkCssProvider *provider; - - str = g_strdup_printf("#Freeciv #%s { font: %s;}", font_name, font_value); + PangoFontDescription *desc; + int size; + const char *fam; + + desc = pango_font_description_from_string(font_value); + + if (desc == NULL) { +return; + } + + fam = pango_font_description_get_family(desc); + + if (fam == NULL) { +return; + } + + size = pango_font_description_get_size(desc); + + if (size != 0) { +str = g_strdup_printf("#Freeciv #%s { font-family: %s; font-size: %dpt;}", + font_name, fam, size / PANGO_SCALE); + } else { +str = g_strdup_printf("#Freeciv #%s { font-family: %s; }", + font_name, fam); + } + + pango_font_description_free(desc); provider = gtk_css_provider_new(); gtk_css_provider_load_from_data(GTK_CSS_PROVIDER(provider), ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34067 - /branches/S2_6/client/gui-gtk-3.22/gui_main.c
Author: cazfi Date: Sun Oct 9 10:33:31 2016 New Revision: 34067 URL: http://svn.gna.org/viewcvs/freeciv?rev=34067&view=rev Log: Dropped setting migration from freeciv-2.5 of gtk3.22-client, as there is no settings for that client to migrate in 2.5. See patch #7768 Modified: branches/S2_6/client/gui-gtk-3.22/gui_main.c Modified: branches/S2_6/client/gui-gtk-3.22/gui_main.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/gui_main.c?rev=34067&r1=34066&r2=34067&view=diff == --- branches/S2_6/client/gui-gtk-3.22/gui_main.c(original) +++ branches/S2_6/client/gui-gtk-3.22/gui_main.cSun Oct 9 10:33:31 2016 @@ -1701,20 +1701,6 @@ } /** - Migrate gtk3 client specific options from freeciv-2.5 options -**/ -static void migrate_options_from_2_5(void) -{ - if (!gui_options.first_boot) { -log_normal(_("Migrating gtk3-client options from freeciv-2.5 options.")); - -GUI_GTK_OPTION(fullscreen) = gui_options.migrate_fullscreen; - -GUI_GTK_OPTION(migrated_from_2_5) = TRUE; - } -} - -/** Called from client_main(), is what it's named. **/ void ui_main(int argc, char **argv) @@ -1746,9 +1732,6 @@ if (!GUI_GTK_OPTION(migrated_from_gtk2)) { migrate_options_from_gtk2(); - } - if (!GUI_GTK_OPTION(migrated_from_2_5)) { -migrate_options_from_2_5(); } if (GUI_GTK_OPTION(fullscreen)) { ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34062 - /branches/S2_5/data/themes/gui-gtk-3.0/Freeciv/gtk-3.0/gtk.css
Author: cazfi Date: Sat Oct 8 20:42:31 2016 New Revision: 34062 URL: http://svn.gna.org/viewcvs/freeciv?rev=34062&view=rev Log: Corrected font definition in gtk3-client Freeciv theme. See bug #25160 Modified: branches/S2_5/data/themes/gui-gtk-3.0/Freeciv/gtk-3.0/gtk.css Modified: branches/S2_5/data/themes/gui-gtk-3.0/Freeciv/gtk-3.0/gtk.css URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/themes/gui-gtk-3.0/Freeciv/gtk-3.0/gtk.css?rev=34062&r1=34061&r2=34062&view=diff == --- branches/S2_5/data/themes/gui-gtk-3.0/Freeciv/gtk-3.0/gtk.css (original) +++ branches/S2_5/data/themes/gui-gtk-3.0/Freeciv/gtk-3.0/gtk.css Sat Oct 8 20:42:31 2016 @@ -187,7 +187,8 @@ } #Freeciv #city_info_label { - font: Monospace 8; + font-family: Monospace; + font-size: 8px; } #Freeciv #help_label { ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34061 - /branches/S2_6/data/themes/gui-gtk-3.0/Freeciv/gtk-3.0/gtk.css
Author: cazfi Date: Sat Oct 8 20:42:26 2016 New Revision: 34061 URL: http://svn.gna.org/viewcvs/freeciv?rev=34061&view=rev Log: Corrected font definition in gtk3-client Freeciv theme. See bug #25160 Modified: branches/S2_6/data/themes/gui-gtk-3.0/Freeciv/gtk-3.0/gtk.css Modified: branches/S2_6/data/themes/gui-gtk-3.0/Freeciv/gtk-3.0/gtk.css URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/themes/gui-gtk-3.0/Freeciv/gtk-3.0/gtk.css?rev=34061&r1=34060&r2=34061&view=diff == --- branches/S2_6/data/themes/gui-gtk-3.0/Freeciv/gtk-3.0/gtk.css (original) +++ branches/S2_6/data/themes/gui-gtk-3.0/Freeciv/gtk-3.0/gtk.css Sat Oct 8 20:42:26 2016 @@ -187,7 +187,8 @@ } #Freeciv #city_info_label { - font: Monospace 8; + font-family: Monospace; + font-size: 8px; } #Freeciv #help_label { ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34060 - in /trunk/data/themes: gui-gtk-3.0/Freeciv/gtk-3.0/gtk.css gui-gtk-3.22/Freeciv/gtk-3.0/gtk.css
Author: cazfi Date: Sat Oct 8 20:42:22 2016 New Revision: 34060 URL: http://svn.gna.org/viewcvs/freeciv?rev=34060&view=rev Log: Corrected font definition in gtk3-client Freeciv theme. See bug #25160 Modified: trunk/data/themes/gui-gtk-3.0/Freeciv/gtk-3.0/gtk.css trunk/data/themes/gui-gtk-3.22/Freeciv/gtk-3.0/gtk.css Modified: trunk/data/themes/gui-gtk-3.0/Freeciv/gtk-3.0/gtk.css URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/themes/gui-gtk-3.0/Freeciv/gtk-3.0/gtk.css?rev=34060&r1=34059&r2=34060&view=diff == --- trunk/data/themes/gui-gtk-3.0/Freeciv/gtk-3.0/gtk.css (original) +++ trunk/data/themes/gui-gtk-3.0/Freeciv/gtk-3.0/gtk.css Sat Oct 8 20:42:22 2016 @@ -187,7 +187,8 @@ } #Freeciv #city_info_label { - font: Monospace 8; + font-family: Monospace; + font-size: 8px; } #Freeciv #help_label { Modified: trunk/data/themes/gui-gtk-3.22/Freeciv/gtk-3.0/gtk.css URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/themes/gui-gtk-3.22/Freeciv/gtk-3.0/gtk.css?rev=34060&r1=34059&r2=34060&view=diff == --- trunk/data/themes/gui-gtk-3.22/Freeciv/gtk-3.0/gtk.css (original) +++ trunk/data/themes/gui-gtk-3.22/Freeciv/gtk-3.0/gtk.css Sat Oct 8 20:42:22 2016 @@ -188,7 +188,8 @@ } #Freeciv #city_info_label { - font: Monospace 8; + font-family: Monospace; + font-size: 8px; } #Freeciv #help_label { ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34054 - /branches/S2_6/client/gui-gtk-3.22/
Author: cazfi Date: Sat Oct 8 17:51:22 2016 New Revision: 34054 URL: http://svn.gna.org/viewcvs/freeciv?rev=34054&view=rev Log: Added and properly use GUI_GTK_OPTION() macro in gtk3.22-client. See patch #7767 Modified: branches/S2_6/client/gui-gtk-3.22/chatline.c branches/S2_6/client/gui-gtk-3.22/citydlg.c branches/S2_6/client/gui-gtk-3.22/dialogs.c branches/S2_6/client/gui-gtk-3.22/gui_main.c branches/S2_6/client/gui-gtk-3.22/gui_main.h branches/S2_6/client/gui-gtk-3.22/gui_stuff.c branches/S2_6/client/gui-gtk-3.22/gui_stuff.h branches/S2_6/client/gui-gtk-3.22/luaconsole.c branches/S2_6/client/gui-gtk-3.22/mapctrl.c branches/S2_6/client/gui-gtk-3.22/mapview.c branches/S2_6/client/gui-gtk-3.22/menu.c branches/S2_6/client/gui-gtk-3.22/messagewin.c branches/S2_6/client/gui-gtk-3.22/pages.c branches/S2_6/client/gui-gtk-3.22/theme_dlg.c branches/S2_6/client/gui-gtk-3.22/themes.c branches/S2_6/client/gui-gtk-3.22/wldlg.c [This mail would be too long, it was shortened to contain the URLs only.] Modified: branches/S2_6/client/gui-gtk-3.22/chatline.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/chatline.c?rev=34054&r1=34053&r2=34054&view=diff Modified: branches/S2_6/client/gui-gtk-3.22/citydlg.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/citydlg.c?rev=34054&r1=34053&r2=34054&view=diff Modified: branches/S2_6/client/gui-gtk-3.22/dialogs.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/dialogs.c?rev=34054&r1=34053&r2=34054&view=diff Modified: branches/S2_6/client/gui-gtk-3.22/gui_main.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/gui_main.c?rev=34054&r1=34053&r2=34054&view=diff Modified: branches/S2_6/client/gui-gtk-3.22/gui_main.h URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/gui_main.h?rev=34054&r1=34053&r2=34054&view=diff Modified: branches/S2_6/client/gui-gtk-3.22/gui_stuff.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/gui_stuff.c?rev=34054&r1=34053&r2=34054&view=diff Modified: branches/S2_6/client/gui-gtk-3.22/gui_stuff.h URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/gui_stuff.h?rev=34054&r1=34053&r2=34054&view=diff Modified: branches/S2_6/client/gui-gtk-3.22/luaconsole.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/luaconsole.c?rev=34054&r1=34053&r2=34054&view=diff Modified: branches/S2_6/client/gui-gtk-3.22/mapctrl.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/mapctrl.c?rev=34054&r1=34053&r2=34054&view=diff Modified: branches/S2_6/client/gui-gtk-3.22/mapview.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/mapview.c?rev=34054&r1=34053&r2=34054&view=diff Modified: branches/S2_6/client/gui-gtk-3.22/menu.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/menu.c?rev=34054&r1=34053&r2=34054&view=diff Modified: branches/S2_6/client/gui-gtk-3.22/messagewin.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/messagewin.c?rev=34054&r1=34053&r2=34054&view=diff Modified: branches/S2_6/client/gui-gtk-3.22/pages.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/pages.c?rev=34054&r1=34053&r2=34054&view=diff Modified: branches/S2_6/client/gui-gtk-3.22/theme_dlg.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/theme_dlg.c?rev=34054&r1=34053&r2=34054&view=diff Modified: branches/S2_6/client/gui-gtk-3.22/themes.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/themes.c?rev=34054&r1=34053&r2=34054&view=diff Modified: branches/S2_6/client/gui-gtk-3.22/wldlg.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/wldlg.c?rev=34054&r1=34053&r2=34054&view=diff ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34052 - /branches/S2_6/ai/default/aisettler.c
Author: cazfi Date: Sat Oct 8 14:58:34 2016 New Revision: 34052 URL: http://svn.gna.org/viewcvs/freeciv?rev=34052&view=rev Log: Fixed compiler shadow warning from aisettler.c See bug #25159 Modified: branches/S2_6/ai/default/aisettler.c Modified: branches/S2_6/ai/default/aisettler.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/ai/default/aisettler.c?rev=34052&r1=34051&r2=34052&view=diff == --- branches/S2_6/ai/default/aisettler.c(original) +++ branches/S2_6/ai/default/aisettler.cSat Oct 8 14:58:34 2016 @@ -1186,8 +1186,8 @@ **/ void dai_auto_settler_reset(struct ai_type *ait, struct player *pplayer) { - bool close; - struct ai_plr *ai = dai_plr_data_get(ait, pplayer, &close); + bool caller_closes; + struct ai_plr *ai = dai_plr_data_get(ait, pplayer, &caller_closes); fc_assert_ret(ai != NULL); fc_assert_ret(ai->settler != NULL); @@ -1207,7 +1207,7 @@ tile_data_cache_hash_clear(ai->settler->tdc_hash); - if (close) { + if (caller_closes) { dai_data_phase_finished(ait, pplayer); } } ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34050 - in /trunk: ./ client/gui-gtk-2.0/ client/gui-gtk-3.0/ client/gui-gtk-3.22/ common/networking/ server/
Author: cazfi Date: Sat Oct 8 07:12:36 2016 New Revision: 34050 URL: http://svn.gna.org/viewcvs/freeciv?rev=34050&view=rev Log: Added support for editing scenario-reserved property of players. See patch #7784 Modified: trunk/client/gui-gtk-2.0/editprop.c trunk/client/gui-gtk-3.0/editprop.c trunk/client/gui-gtk-3.22/editprop.c trunk/common/networking/packets.def trunk/fc_version trunk/server/edithand.c Modified: trunk/client/gui-gtk-2.0/editprop.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-2.0/editprop.c?rev=34050&r1=34049&r2=34050&view=diff == --- trunk/client/gui-gtk-2.0/editprop.c (original) +++ trunk/client/gui-gtk-2.0/editprop.c Sat Oct 8 07:12:36 2016 @@ -360,6 +360,7 @@ OPID_PLAYER_ADDRESS, #endif /* FREECIV_DEBUG */ OPID_PLAYER_INVENTIONS, + OPID_PLAYER_SCENARIO_RESERVED, OPID_PLAYER_SCIENCE, OPID_PLAYER_GOLD, @@ -1786,6 +1787,9 @@ } advance_index_iterate_end; pv->must_free = TRUE; break; + case OPID_PLAYER_SCENARIO_RESERVED: +pv->data.v_bool = player_has_flag(pplayer, PLRF_SCENARIO_RESERVED); +break; case OPID_PLAYER_SCIENCE: presearch = research_get(pplayer); pv->data.v_int = presearch->bulbs_researched; @@ -2548,6 +2552,9 @@ advance_index_iterate(A_FIRST, tech) { packet->inventions[tech] = pv->data.v_inventions[tech]; } advance_index_iterate_end; +return; + case OPID_PLAYER_SCENARIO_RESERVED: +packet->scenario_reserved = pv->data.v_bool; return; case OPID_PLAYER_SCIENCE: packet->bulbs_researched = pv->data.v_int; @@ -3048,6 +3055,7 @@ case OPID_GAME_PREVENT_CITIES: case OPID_GAME_LAKE_FLOODING: case OPID_GAME_RULESET_LOCKED: + case OPID_PLAYER_SCENARIO_RESERVED: button = gtk_check_button_new(); g_signal_connect(button, "toggled", G_CALLBACK(objprop_widget_toggle_button_changed), op); @@ -3263,6 +3271,7 @@ case OPID_GAME_PREVENT_CITIES: case OPID_GAME_LAKE_FLOODING: case OPID_GAME_RULESET_LOCKED: + case OPID_PLAYER_SCENARIO_RESERVED: button = objprop_get_child_widget(op, "checkbutton"); disable_gobject_callback(G_OBJECT(button), G_CALLBACK(objprop_widget_toggle_button_changed)); @@ -4464,6 +4473,8 @@ OPF_HAS_WIDGET, VALTYPE_INT); ADDPROP(OPID_PLAYER_INVENTIONS, _("Inventions"), OPF_IN_LISTVIEW | OPF_HAS_WIDGET | OPF_EDITABLE, VALTYPE_INVENTIONS_ARRAY); +ADDPROP(OPID_PLAYER_SCENARIO_RESERVED, _("Reserved"), +OPF_HAS_WIDGET | OPF_EDITABLE, VALTYPE_BOOL); ADDPROP(OPID_PLAYER_SCIENCE, _("Science"), OPF_HAS_WIDGET | OPF_EDITABLE, VALTYPE_INT); ADDPROP(OPID_PLAYER_GOLD, _("Gold"), OPF_IN_LISTVIEW Modified: trunk/client/gui-gtk-3.0/editprop.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.0/editprop.c?rev=34050&r1=34049&r2=34050&view=diff == --- trunk/client/gui-gtk-3.0/editprop.c (original) +++ trunk/client/gui-gtk-3.0/editprop.c Sat Oct 8 07:12:36 2016 @@ -361,6 +361,7 @@ OPID_PLAYER_ADDRESS, #endif /* FREECIV_DEBUG */ OPID_PLAYER_INVENTIONS, + OPID_PLAYER_SCENARIO_RESERVED, OPID_PLAYER_SCIENCE, OPID_PLAYER_GOLD, @@ -1790,6 +1791,9 @@ } advance_index_iterate_end; pv->must_free = TRUE; break; + case OPID_PLAYER_SCENARIO_RESERVED: +pv->data.v_bool = player_has_flag(pplayer, PLRF_SCENARIO_RESERVED); +break; case OPID_PLAYER_SCIENCE: presearch = research_get(pplayer); pv->data.v_int = presearch->bulbs_researched; @@ -2552,6 +2556,9 @@ advance_index_iterate(A_FIRST, tech) { packet->inventions[tech] = pv->data.v_inventions[tech]; } advance_index_iterate_end; +return; + case OPID_PLAYER_SCENARIO_RESERVED: +packet->scenario_reserved = pv->data.v_bool; return; case OPID_PLAYER_SCIENCE: packet->bulbs_researched = pv->data.v_int; @@ -3080,6 +3087,7 @@ case OPID_GAME_PREVENT_CITIES: case OPID_GAME_LAKE_FLOODING: case OPID_GAME_RULESET_LOCKED: + case OPID_PLAYER_SCENARIO_RESERVED: button = gtk_check_button_new(); gtk_widget_set_hexpand(button, TRUE); gtk_widget_set_halign(button, GTK_ALIGN_END); @@ -3297,6 +3305,7 @@ case OPID_GAME_PREVENT_CITIES: case OPID_GAME_LAKE_FLOODING: case OPID_GAME_RULESET_LOCKED: + case OPID_PLAYER_SCENARIO_RESERVED: button = objprop_get_child_widget(op, "checkbutton"); disable_gobject_callback(G_OBJECT(button), G_CALLBACK(objprop_widget_toggle_button_changed)); @@ -4529,6 +4538,8 @@ ADDPROP(OPID_PLAYER_INVENTIONS, _("Inventions"), NULL, OPF_IN_LISTVIEW | OPF_HAS_WIDGET | OPF_EDITABLE, VALTYPE_INVENTIONS_ARRAY); +ADDPROP(OPID_PLAYER_SCEN
[Freeciv-commits] r34049 - in /branches/S2_6: common/Makefile.am common/srvdefs.h server/stdinhand.c
Author: cazfi Date: Fri Oct 7 18:17:18 2016 New Revision: 34049 URL: http://svn.gna.org/viewcvs/freeciv?rev=34049&view=rev Log: Added common srvdefs.h with TOKEN_DELIMITERS moved there also client end to use. See patch #7882 Added: branches/S2_6/common/srvdefs.h Modified: branches/S2_6/common/Makefile.am branches/S2_6/server/stdinhand.c Modified: branches/S2_6/common/Makefile.am URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/common/Makefile.am?rev=34049&r1=34048&r2=34049&view=diff == --- branches/S2_6/common/Makefile.am(original) +++ branches/S2_6/common/Makefile.amFri Oct 7 18:17:18 2016 @@ -97,6 +97,7 @@ spaceship.h \ specialist.c\ specialist.h\ + srvdefs.h \ style.c \ style.h \ team.c \ Added: branches/S2_6/common/srvdefs.h URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/common/srvdefs.h?rev=34049&view=auto == --- branches/S2_6/common/srvdefs.h (added) +++ branches/S2_6/common/srvdefs.h Fri Oct 7 18:17:18 2016 @@ -0,0 +1,26 @@ +/*** + Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. +***/ +#ifndef FC__SRVDEFS_H +#define FC__SRVDEFS_H + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +#define TOKEN_DELIMITERS " \t\n," + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* FC__SRVDEFS_H */ Modified: branches/S2_6/server/stdinhand.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/stdinhand.c?rev=34049&r1=34048&r2=34049&view=diff == --- branches/S2_6/server/stdinhand.c(original) +++ branches/S2_6/server/stdinhand.cFri Oct 7 18:17:18 2016 @@ -48,6 +48,7 @@ #include "player.h" #include "research.h" #include "rgbcolor.h" +#include "srvdefs.h" #include "unitlist.h" #include "version.h" @@ -83,8 +84,6 @@ #include "handicaps.h" #include "stdinhand.h" - -#define TOKEN_DELIMITERS " \t\n," #define OPTION_NAME_SPACE 25 ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34048 - in /trunk: common/Makefile.am common/srvdefs.h server/stdinhand.c
Author: cazfi Date: Fri Oct 7 18:17:04 2016 New Revision: 34048 URL: http://svn.gna.org/viewcvs/freeciv?rev=34048&view=rev Log: Added common srvdefs.h with TOKEN_DELIMITERS moved there also client end to use. See patch #7882 Added: trunk/common/srvdefs.h Modified: trunk/common/Makefile.am trunk/server/stdinhand.c Modified: trunk/common/Makefile.am URL: http://svn.gna.org/viewcvs/freeciv/trunk/common/Makefile.am?rev=34048&r1=34047&r2=34048&view=diff == --- trunk/common/Makefile.am(original) +++ trunk/common/Makefile.amFri Oct 7 18:17:04 2016 @@ -95,6 +95,7 @@ spaceship.h \ specialist.c\ specialist.h\ + srvdefs.h \ style.c \ style.h \ team.c \ Added: trunk/common/srvdefs.h URL: http://svn.gna.org/viewcvs/freeciv/trunk/common/srvdefs.h?rev=34048&view=auto == --- trunk/common/srvdefs.h (added) +++ trunk/common/srvdefs.h Fri Oct 7 18:17:04 2016 @@ -0,0 +1,26 @@ +/*** + Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. +***/ +#ifndef FC__SRVDEFS_H +#define FC__SRVDEFS_H + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +#define TOKEN_DELIMITERS " \t\n," + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* FC__SRVDEFS_H */ Modified: trunk/server/stdinhand.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/stdinhand.c?rev=34048&r1=34047&r2=34048&view=diff == --- trunk/server/stdinhand.c(original) +++ trunk/server/stdinhand.cFri Oct 7 18:17:04 2016 @@ -48,6 +48,7 @@ #include "player.h" #include "research.h" #include "rgbcolor.h" +#include "srvdefs.h" #include "unitlist.h" #include "version.h" @@ -83,8 +84,6 @@ #include "handicaps.h" #include "stdinhand.h" - -#define TOKEN_DELIMITERS " \t\n," #define OPTION_NAME_SPACE 25 ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34045 - /branches/S2_5/client/audio.c
Author: cazfi Date: Fri Oct 7 14:38:29 2016 New Revision: 34045 URL: http://svn.gna.org/viewcvs/freeciv?rev=34045&view=rev Log: Make sdl the default audio plugin when it's built it. See bug #24280 Modified: branches/S2_5/client/audio.c Modified: branches/S2_5/client/audio.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/audio.c?rev=34045&r1=34044&r2=34045&view=diff == --- branches/S2_5/client/audio.c(original) +++ branches/S2_5/client/audio.cFri Oct 7 14:38:29 2016 @@ -140,13 +140,14 @@ **/ void audio_init(void) { - audio_none_init(); - fc_assert(num_plugins_used == 1); - selected_plugin = 0; - #ifdef AUDIO_SDL audio_sdl_init(); #endif + + /* Initialize dummy plugin last, as lowest priority plugin. This + * affects which plugin gets selected as default in new installations. */ + audio_none_init(); + selected_plugin = 0; } /** ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34043 - /trunk/client/audio.c
Author: cazfi Date: Fri Oct 7 14:38:19 2016 New Revision: 34043 URL: http://svn.gna.org/viewcvs/freeciv?rev=34043&view=rev Log: Make sdl the default audio plugin when it's built it. See bug #24280 Modified: trunk/client/audio.c Modified: trunk/client/audio.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/audio.c?rev=34043&r1=34042&r2=34043&view=diff == --- trunk/client/audio.c(original) +++ trunk/client/audio.cFri Oct 7 14:38:19 2016 @@ -179,13 +179,14 @@ **/ void audio_init(void) { - audio_none_init(); - fc_assert(num_plugins_used == 1); - selected_plugin = 0; - #ifdef AUDIO_SDL audio_sdl_init(); #endif + + /* Initialize dummy plugin last, as lowest priority plugin. This + * affects which plugin gets selected as default in new installations. */ + audio_none_init(); + selected_plugin = 0; } /** ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34044 - /branches/S2_6/client/audio.c
Author: cazfi Date: Fri Oct 7 14:38:24 2016 New Revision: 34044 URL: http://svn.gna.org/viewcvs/freeciv?rev=34044&view=rev Log: Make sdl the default audio plugin when it's built it. See bug #24280 Modified: branches/S2_6/client/audio.c Modified: branches/S2_6/client/audio.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/audio.c?rev=34044&r1=34043&r2=34044&view=diff == --- branches/S2_6/client/audio.c(original) +++ branches/S2_6/client/audio.cFri Oct 7 14:38:24 2016 @@ -179,13 +179,14 @@ **/ void audio_init(void) { - audio_none_init(); - fc_assert(num_plugins_used == 1); - selected_plugin = 0; - #ifdef AUDIO_SDL audio_sdl_init(); #endif + + /* Initialize dummy plugin last, as lowest priority plugin. This + * affects which plugin gets selected as default in new installations. */ + audio_none_init(); + selected_plugin = 0; } /** ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34036 - /branches/S2_6/doc/README.nations
Author: cazfi Date: Fri Oct 7 14:02:09 2016 New Revision: 34036 URL: http://svn.gna.org/viewcvs/freeciv?rev=34036&view=rev Log: Documented use of nations override -directory. See patch #7565 Modified: branches/S2_6/doc/README.nations Modified: branches/S2_6/doc/README.nations URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/doc/README.nations?rev=34036&r1=34035&r2=34036&view=diff == --- branches/S2_6/doc/README.nations(original) +++ branches/S2_6/doc/README.nationsFri Oct 7 14:02:09 2016 @@ -14,6 +14,36 @@ -- +Local Nation files: +--- + +Starting from freeciv-2.6, to most supplied rulesets nations can be +added locally without need to modify freeciv distribution files. +This section discuss the way there local override files work. Later +sections assume that nation is being added to main freeciv distribution, +even if only to locally modified copy. + +Freeciv search data files from several directories in priority order. +Local nations overrides mechanism uses this to include files from +user data directory, ~/.freeciv//override/, +e.g., ~/.freeciv/2.6/override/ +Freeciv distribution has empty versions of those files in a lower priority +directory. Once user adds the file, it gets used instead of the empty +one. + +~/.freeciv//override/nation.ruleset + Ruleset sections for nations that user wants to add. This can of course + use *include directives so that individual nations are in separate files. + See below sections for the format of the nation rulesets. + +~/.freeciv//override/flags.spec +~/.freeciv//override/shields.spec +~/.freeciv//override/flags-large.spec +~/.freeciv//override/shields-large.spec + Spec files for flag graphics to add. See below sections for the format + of spec files and graphics files. + + How to add a Nation: @@ -36,12 +66,12 @@ This lists all nation files. Add your nation (data/nation/.ruleset) to this list. -data/flags/* +data/flags/* This is the flags directory. You will have to add a flag-file (see below) for your nation to work (see below). -data/scenario/* +data/scenario/* You can add starting position for your nation on a scenario map. @@ -49,16 +79,16 @@ files will also have to be edited. Unless you know what you're doing you shouldn't need to worry about this. -data/nation/Makefile.am +data/nation/Makefile.am Another list of nation files - add your nation (.ruleset) to this list. -data/flags/Makefile.am +data/flags/Makefile.am Another list of flag files - add your flag to this list. -translations/nations/POTFILES.in +translations/nations/POTFILES.in Here is yet another list of nations files; again add your nation (data/nation/.ruleset) to it. ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34035 - /trunk/doc/README.nations
Author: cazfi Date: Fri Oct 7 14:02:02 2016 New Revision: 34035 URL: http://svn.gna.org/viewcvs/freeciv?rev=34035&view=rev Log: Documented use of nations override -directory. See patch #7565 Modified: trunk/doc/README.nations Modified: trunk/doc/README.nations URL: http://svn.gna.org/viewcvs/freeciv/trunk/doc/README.nations?rev=34035&r1=34034&r2=34035&view=diff == --- trunk/doc/README.nations(original) +++ trunk/doc/README.nationsFri Oct 7 14:02:02 2016 @@ -14,6 +14,36 @@ -- +Local Nation files: +--- + +Starting from freeciv-2.6, to most supplied rulesets nations can be +added locally without need to modify freeciv distribution files. +This section discuss the way there local override files work. Later +sections assume that nation is being added to main freeciv distribution, +even if only to locally modified copy. + +Freeciv search data files from several directories in priority order. +Local nations overrides mechanism uses this to include files from +user data directory, ~/.freeciv//override/, +e.g., ~/.freeciv/2.6/override/ +Freeciv distribution has empty versions of those files in a lower priority +directory. Once user adds the file, it gets used instead of the empty +one. + +~/.freeciv//override/nation.ruleset + Ruleset sections for nations that user wants to add. This can of course + use *include directives so that individual nations are in separate files. + See below sections for the format of the nation rulesets. + +~/.freeciv//override/flags.spec +~/.freeciv//override/shields.spec +~/.freeciv//override/flags-large.spec +~/.freeciv//override/shields-large.spec + Spec files for flag graphics to add. See below sections for the format + of spec files and graphics files. + + How to add a Nation: @@ -36,12 +66,12 @@ This lists all nation files. Add your nation (data/nation/.ruleset) to this list. -data/flags/* +data/flags/* This is the flags directory. You will have to add a flag-file (see below) for your nation to work (see below). -data/scenario/* +data/scenario/* You can add starting position for your nation on a scenario map. @@ -49,16 +79,16 @@ files will also have to be edited. Unless you know what you're doing you shouldn't need to worry about this. -data/nation/Makefile.am +data/nation/Makefile.am Another list of nation files - add your nation (.ruleset) to this list. -data/flags/Makefile.am +data/flags/Makefile.am Another list of flag files - add your flag to this list. -translations/nations/POTFILES.in +translations/nations/POTFILES.in Here is yet another list of nations files; again add your nation (data/nation/.ruleset) to it. ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34029 - /branches/S2_6/client/gui-gtk-3.22/Makefile.am
Author: cazfi Date: Fri Oct 7 05:10:02 2016 New Revision: 34029 URL: http://svn.gna.org/viewcvs/freeciv?rev=34029&view=rev Log: Renamed gtk3.22-client library as libgui-gtk3_22 See patch #7766 Modified: branches/S2_6/client/gui-gtk-3.22/Makefile.am Modified: branches/S2_6/client/gui-gtk-3.22/Makefile.am URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.22/Makefile.am?rev=34029&r1=34028&r2=34029&view=diff == --- branches/S2_6/client/gui-gtk-3.22/Makefile.am (original) +++ branches/S2_6/client/gui-gtk-3.22/Makefile.am Fri Oct 7 05:10:02 2016 @@ -1,13 +1,13 @@ ## Process this file with automake to produce Makefile.in -noinst_LTLIBRARIES = libgui-gtk3.la +noinst_LTLIBRARIES = libgui-gtk3_22.la AM_CPPFLAGS = -I$(srcdir)/.. -I$(srcdir)/../include \ -I$(top_srcdir)/utility -I$(top_srcdir)/common \ -I$(top_srcdir)/common/aicore -I$(top_srcdir)/common/scriptcore \ -I$(srcdir)/../agents -I$(srcdir)/../luascript \ - $(gui_gtk3_cflags) $(SOUND_CFLAGS) + $(gui_gtk3_22_cflags) $(SOUND_CFLAGS) -libgui_gtk3_la_SOURCES = \ +libgui_gtk3_22_la_SOURCES = \ action_dialog.c \ canvas.c\ canvas.h\ @@ -97,4 +97,4 @@ wldlg.c \ wldlg.h -libgui_gtk3_la_LIBADD = -lm +libgui_gtk3_22_la_LIBADD = -lm ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34028 - /branches/S2_6/m4/gtk3.22-client.m4
Author: cazfi Date: Fri Oct 7 05:08:36 2016 New Revision: 34028 URL: http://svn.gna.org/viewcvs/freeciv?rev=34028&view=rev Log: Added gtk3.22-client.m4 See patch #7765 Added: branches/S2_6/m4/gtk3.22-client.m4 Added: branches/S2_6/m4/gtk3.22-client.m4 URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/m4/gtk3.22-client.m4?rev=34028&view=auto == --- branches/S2_6/m4/gtk3.22-client.m4 (added) +++ branches/S2_6/m4/gtk3.22-client.m4 Fri Oct 7 05:08:36 2016 @@ -0,0 +1,31 @@ +# Try to configure the GTK+-3.22 client (gui-gtk-3.22) + +# FC_GTK3_22_CLIENT +# Test for GTK+-3.0 libraries needed for gui-gtk-3.22 + +AC_DEFUN([FC_GTK3_22_CLIENT], +[ + # Add check "x$client" = "xauto" when this becomes supported client + if test "x$gui_gtk3_22" = "xyes" || + test "x$client" = "xall" ; then +PKG_CHECK_MODULES([GTK3_22], [gtk+-3.0 >= 3.8.0], + [ +GTK3_22_CFLAGS="$GTK3_22_CFLAGS -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_8" +GTK3_22_CFLAGS="$GTK3_22_CFLAGS -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_36" +gui_gtk3_22=yes +if test "x$client" = "xauto" ; then + client=yes +fi +gui_gtk3_22_cflags="$GTK3_22_CFLAGS" +gui_gtk3_22_libs="$GTK3_22_LIBS" +if test "x$MINGW" = "xyes"; then + dnl Required to compile gtk3 on Windows platform + gui_gtk3_22_cflags="$gui_gtk3_22_cflags -mms-bitfields" + gui_gtk3_22_ldflags="$gui_gtk3_22_ldflags -mwindows" +fi + ], + [ +FC_NO_CLIENT([gtk3_22], [GTK+-3.22 libraries not found]) + ]) + fi +]) ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34027 - /branches/S2_6/client/gui-gtk-3.22/
Author: cazfi Date: Fri Oct 7 05:06:54 2016 New Revision: 34027 URL: http://svn.gna.org/viewcvs/freeciv?rev=34027&view=rev Log: Copied gui-gtk-3.0 as base for gui-gtk-3.22 See patch #7762 Added: branches/S2_6/client/gui-gtk-3.22/ - copied from r34026, branches/S2_6/client/gui-gtk-3.0/ ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34024 - in /trunk/data: civ1/game.ruleset civ1/nations.ruleset civ2/game.ruleset civ2/nations.ruleset
Author: cazfi Date: Fri Oct 7 01:39:50 2016 New Revision: 34024 URL: http://svn.gna.org/viewcvs/freeciv?rev=34024&view=rev Log: Specified border colors for civ1 and civ2 ruleset nations and set plrcolormode to "NATION_ORDER" by default on those rulesets. Requested by Jacob Nevins See patch #3927 Modified: trunk/data/civ1/game.ruleset trunk/data/civ1/nations.ruleset trunk/data/civ2/game.ruleset trunk/data/civ2/nations.ruleset Modified: trunk/data/civ1/game.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/civ1/game.ruleset?rev=34024&r1=34023&r2=34024&view=diff == --- trunk/data/civ1/game.ruleset(original) +++ trunk/data/civ1/game.rulesetFri Oct 7 01:39:50 2016 @@ -919,4 +919,5 @@ ; Ruleset has no trait ranges, so player choosing EVEN would have ; no effect anyway "traitdistribution", "FIXED", TRUE -} + "plrcolormode", "NATION_ORDER", FALSE +} Modified: trunk/data/civ1/nations.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/civ1/nations.ruleset?rev=34024&r1=34023&r2=34024&view=diff == --- trunk/data/civ1/nations.ruleset (original) +++ trunk/data/civ1/nations.ruleset Fri Oct 7 01:39:50 2016 @@ -127,6 +127,10 @@ flag="usa" flag_alt="-" style = "Celtic" + +color.r = 115 +color.g = 255 +color.b = 255 init_techs="" init_buildings="" @@ -238,6 +242,10 @@ flag_alt="-" style = "Tropical" +color.r = 230 +color.g = 230 +color.b = 74 + init_techs="" init_buildings="" init_units="" @@ -335,6 +343,10 @@ flag_alt="-" style = "Babylonian" +color.r = 115 +color.g = 255 +color.b = 67 + init_techs="" init_buildings="" init_units="" @@ -401,6 +413,10 @@ flag="han" flag_alt="-" style = "Asian" + +color.r = 90 +color.g = 230 +color.b = 230 init_techs="" init_buildings="" @@ -542,6 +558,10 @@ flag_alt="-" style = "Babylonian" +color.r = 255 +color.g = 255 +color.b = 99 + init_techs="" init_buildings="" init_units="" @@ -618,6 +638,10 @@ flag="england" flag_alt="-" style = "European" + +color.r = 230 +color.g = 138 +color.b = 10 init_techs="" init_buildings="" @@ -728,6 +752,10 @@ flag="france_old" flag_alt="-" style = "Celtic" + +color.r = 90 +color.g = 42 +color.b = 230 init_techs="" init_buildings="" @@ -851,6 +879,10 @@ flag = "hre" flag_alt = "-" style= "European" + +color.r = 115 +color.g = 67 +color.b = 255 init_techs = "" init_buildings="" @@ -1000,6 +1032,10 @@ flag_alt="-" style = "Classical" +color.r = 255 +color.g = 163 +color.b = 35 + init_techs="" init_buildings="" init_units="" @@ -1150,6 +1186,10 @@ flag_alt="-" style = "Asian" +color.r = 255 +color.g = 51 +color.b = 255 + init_techs="" init_buildings="" init_units="" @@ -1244,6 +1284,10 @@ flag_alt="-" style = "Asian" +color.r = 230 +color.g = 26 +color.b = 230 + init_techs="" init_buildings="" init_units="" @@ -1308,6 +1352,10 @@ flag_alt="-" style = "Classical" +color.r = 255 +color.g = 255 +color.b = 255 + init_techs="" init_buildings="" init_units="" @@ -1363,6 +1411,10 @@ flag="kiev" flag_alt = "-" style = "European" + +color.r = 230 +color.g = 230 +color.b = 230 init_techs="" init_buildings="" @@ -1451,6 +1503,10 @@ flag_alt="-" style = "Tropical" +color.r = 90 +color.g = 230 +color.b = 42 + init_techs="" init_buildings="" init_units="" @@ -1516,6 +1572,10 @@ flag_alt = "-" style = "European" +color.r = 255 +color.g = 67 +color.b = 67 + init_techs="" init_buildings="" init_units="" @@ -1554,6 +1614,10 @@ flag_alt = "-" style = "European" +color.r = 255 +color.g = 67 +color.b = 67 + init_techs="" init_buildings="" init_units="" Modified: trunk/data/civ2/game.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2/game.ruleset?rev=34024&r1=34023&r2=34024&view=diff == --- trunk/data/civ2/game.ruleset(original) +++ trunk/data/civ2/game.rulesetFri Oct 7 01:39:50 2016 @@ -952,4 +952,5 @@ ; Ruleset has no trait ranges, so player choosing EVEN would have ; no effect anyway "traitdistribution", "FIXED", TRUE -} + "plrcolormode", "NATION_ORDER", FALSE +} Modified: trunk/data/civ2/nations.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2/nations.ruleset?rev=34024&r1=34023&r2=34024&view=diff == --- trunk/data/civ2/nations.ruleset (original) +++ trunk/data/civ2/nations.ruleset Fri Oct 7 01:39:50 2016 @@ -131,6 +131,10 @@ flag="usa" flag_alt="-" style = "Celtic" + +color.r = 115 +color.g = 255 +color.b = 255 init_techs="" init_buildings="" @@ -243,6 +247,10 @@ flag_alt="-" style = "Tropical" +color.r = 230 +color.g = 230 +color.b = 74 + init_t
[Freeciv-commits] r34025 - in /branches/S2_6/data: civ1/game.ruleset civ1/nations.ruleset civ2/game.ruleset civ2/nations.ruleset
Author: cazfi Date: Fri Oct 7 01:39:58 2016 New Revision: 34025 URL: http://svn.gna.org/viewcvs/freeciv?rev=34025&view=rev Log: Specified border colors for civ1 and civ2 ruleset nations and set plrcolormode to "NATION_ORDER" by default on those rulesets. Requested by Jacob Nevins See patch #3927 Modified: branches/S2_6/data/civ1/game.ruleset branches/S2_6/data/civ1/nations.ruleset branches/S2_6/data/civ2/game.ruleset branches/S2_6/data/civ2/nations.ruleset Modified: branches/S2_6/data/civ1/game.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/civ1/game.ruleset?rev=34025&r1=34024&r2=34025&view=diff == --- branches/S2_6/data/civ1/game.ruleset(original) +++ branches/S2_6/data/civ1/game.rulesetFri Oct 7 01:39:58 2016 @@ -655,4 +655,5 @@ ; Ruleset has no trait ranges, so player choosing EVEN would have ; no effect anyway "traitdistribution", "FIXED", TRUE -} + "plrcolormode", "NATION_ORDER", FALSE +} Modified: branches/S2_6/data/civ1/nations.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/civ1/nations.ruleset?rev=34025&r1=34024&r2=34025&view=diff == --- branches/S2_6/data/civ1/nations.ruleset (original) +++ branches/S2_6/data/civ1/nations.ruleset Fri Oct 7 01:39:58 2016 @@ -126,6 +126,10 @@ flag="usa" flag_alt="-" style = "Celtic" + +color.r = 115 +color.g = 255 +color.b = 255 init_techs="" init_buildings="" @@ -237,6 +241,10 @@ flag_alt="-" style = "Tropical" +color.r = 230 +color.g = 230 +color.b = 74 + init_techs="" init_buildings="" init_units="" @@ -334,6 +342,10 @@ flag_alt="-" style = "Babylonian" +color.r = 115 +color.g = 255 +color.b = 67 + init_techs="" init_buildings="" init_units="" @@ -400,6 +412,10 @@ flag="han" flag_alt="-" style = "Asian" + +color.r = 90 +color.g = 230 +color.b = 230 init_techs="" init_buildings="" @@ -541,6 +557,10 @@ flag_alt="-" style = "Babylonian" +color.r = 255 +color.g = 255 +color.b = 99 + init_techs="" init_buildings="" init_units="" @@ -617,6 +637,10 @@ flag="england" flag_alt="-" style = "European" + +color.r = 230 +color.g = 138 +color.b = 10 init_techs="" init_buildings="" @@ -727,6 +751,10 @@ flag="france_old" flag_alt="-" style = "Celtic" + +color.r = 90 +color.g = 42 +color.b = 230 init_techs="" init_buildings="" @@ -850,6 +878,10 @@ flag = "hre" flag_alt = "-" style= "European" + +color.r = 115 +color.g = 67 +color.b = 255 init_techs = "" init_buildings="" @@ -999,6 +1031,10 @@ flag_alt="-" style = "Classical" +color.r = 255 +color.g = 163 +color.b = 35 + init_techs="" init_buildings="" init_units="" @@ -1149,6 +1185,10 @@ flag_alt="-" style = "Asian" +color.r = 255 +color.g = 51 +color.b = 255 + init_techs="" init_buildings="" init_units="" @@ -1243,6 +1283,10 @@ flag_alt="-" style = "Asian" +color.r = 230 +color.g = 26 +color.b = 230 + init_techs="" init_buildings="" init_units="" @@ -1307,6 +1351,10 @@ flag_alt="-" style = "Classical" +color.r = 255 +color.g = 255 +color.b = 255 + init_techs="" init_buildings="" init_units="" @@ -1362,6 +1410,10 @@ flag="kiev" flag_alt = "-" style = "European" + +color.r = 230 +color.g = 230 +color.b = 230 init_techs="" init_buildings="" @@ -1450,6 +1502,10 @@ flag_alt="-" style = "Tropical" +color.r = 90 +color.g = 230 +color.b = 42 + init_techs="" init_buildings="" init_units="" @@ -1515,6 +1571,10 @@ flag_alt = "-" style = "European" +color.r = 255 +color.g = 67 +color.b = 67 + init_techs="" init_buildings="" init_units="" @@ -1551,6 +1611,10 @@ flag_alt = "-" style = "European" +color.r = 255 +color.g = 67 +color.b = 67 + init_techs="" init_buildings="" init_units="" Modified: branches/S2_6/data/civ2/game.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/civ2/game.ruleset?rev=34025&r1=34024&r2=34025&view=diff == --- branches/S2_6/data/civ2/game.ruleset(original) +++ branches/S2_6/data/civ2/game.rulesetFri Oct 7 01:39:58 2016 @@ -650,4 +650,5 @@ ; Ruleset has no trait ranges, so player choosing EVEN would have ; no effect anyway "traitdistribution", "FIXED", TRUE -} + "plrcolormode", "NATION_ORDER", FALSE +} Modified: branches/S2_6/data/civ2/nations.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/data/civ2/nations.ruleset?rev=34025&r1=34024&r2=34025&view=diff == --- branches/S2_6/data/civ2/nations.ruleset (original) +++ branches/S2_6/data/civ2/nations.ruleset Fri Oct 7 01:39:58 2016 @@ -130,6 +130,10 @@ flag="usa" flag_alt="-" style = "Celtic" + +color.r = 115 +color.g = 255 +c
[Freeciv-commits] r34014 - in /trunk/client: gui-gtk-3.0/editgui.c gui-gtk-3.0/helpdlg.c gui-gtk-3.22/editgui.c gui-gtk-3.22/helpdlg.c
Author: cazfi Date: Thu Oct 6 06:45:22 2016 New Revision: 34014 URL: http://svn.gna.org/viewcvs/freeciv?rev=34014&view=rev Log: Show terrain gfx on gtk3-client help browser. See bug #15132 Modified: trunk/client/gui-gtk-3.0/editgui.c trunk/client/gui-gtk-3.0/helpdlg.c trunk/client/gui-gtk-3.22/editgui.c trunk/client/gui-gtk-3.22/helpdlg.c Modified: trunk/client/gui-gtk-3.0/editgui.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.0/editgui.c?rev=34014&r1=34013&r2=34014&view=diff == --- trunk/client/gui-gtk-3.0/editgui.c (original) +++ trunk/client/gui-gtk-3.0/editgui.c Thu Oct 6 06:45:22 2016 @@ -734,8 +734,7 @@ / static GdkPixbuf *create_terrain_pixbuf(struct terrain *pterrain) { - struct drawn_sprite sprs[80]; - int count, w, h, canvas_x, canvas_y, i; + int w, h, i; GdkPixbuf *pixbuf; struct canvas canvas = FC_STATIC_CANVAS_INIT; cairo_t *cr; @@ -744,8 +743,6 @@ h = tileset_tile_height(tileset); canvas.surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, w, h); - canvas_x = 0; - canvas_y = 0; cr = cairo_create(canvas.surface); cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR); @@ -753,9 +750,11 @@ cairo_destroy(cr); for (i = 0; i < 3; i++) { -count = fill_basic_terrain_layer_sprite_array(tileset, sprs, - i, pterrain); -put_drawn_sprites(&canvas, 1.0, canvas_x, canvas_y, count, sprs, FALSE); +struct drawn_sprite sprs[80]; +int count = fill_basic_terrain_layer_sprite_array(tileset, sprs, + i, pterrain); + +put_drawn_sprites(&canvas, 1.0, 0, 0, count, sprs, FALSE); } pixbuf = surface_get_pixbuf(canvas.surface, w, h); Modified: trunk/client/gui-gtk-3.0/helpdlg.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.0/helpdlg.c?rev=34014&r1=34013&r2=34014&view=diff == --- trunk/client/gui-gtk-3.0/helpdlg.c (original) +++ trunk/client/gui-gtk-3.0/helpdlg.c Thu Oct 6 06:45:22 2016 @@ -750,6 +750,37 @@ gtk_image_set_from_surface(GTK_IMAGE(help_tile), spr->surface); gtk_widget_show(help_tile); +} + +/** + Set sprite to show for current terrain. +**/ +static void set_help_tile_from_terrain(struct terrain *pterr) +{ + struct canvas canvas = FC_STATIC_CANVAS_INIT; + cairo_t *cr; + int i; + + canvas.surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, + tileset_tile_width(tileset), + tileset_tile_height(tileset)); + + cr = cairo_create(canvas.surface); + cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR); + cairo_paint(cr); + cairo_destroy(cr); + + for (i = 0; i < 3; i++) { +struct drawn_sprite sprs[80]; +int count = fill_basic_terrain_layer_sprite_array(tileset, sprs, + i, pterr); + +put_drawn_sprites(&canvas, 1.0, 0, 0, count, sprs, FALSE); + } + + gtk_image_set_from_surface(GTK_IMAGE(help_tile), canvas.surface); + gtk_widget_show(help_tile); + cairo_surface_destroy(canvas.surface); } /** @@ -1166,10 +1197,13 @@ if (pterrain) { struct universal for_terr = { .kind = VUT_TERRAIN, .value = { .terrain = pterrain }}; +set_help_tile_from_terrain(pterrain); + { /* 25 => "1.25"; 50 => "1.5"; 100 => "2.0" */ int defbonus = pterrain->defense_bonus + 100; int frac = defbonus % 100; + if ((frac % 10) == 0) { frac /= 10; } Modified: trunk/client/gui-gtk-3.22/editgui.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.22/editgui.c?rev=34014&r1=34013&r2=34014&view=diff == --- trunk/client/gui-gtk-3.22/editgui.c (original) +++ trunk/client/gui-gtk-3.22/editgui.c Thu Oct 6 06:45:22 2016 @@ -734,8 +734,7 @@ / static GdkPixbuf *create_terrain_pixbuf(struct terrain *pterrain) { - struct drawn_sprite sprs[80]; - int count, w, h, canvas_x, canvas_y, i; + int w, h, i; GdkPixbuf *pixbuf; struct canvas canvas = FC_STATIC_CANVAS_INIT; cairo_t *cr; @@ -744,8 +743,6 @@ h = tileset_tile_height(tileset); canvas.surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, w, h); - canvas_x = 0; - canvas_y = 0; cr = cairo_create(canvas.surface); cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR); @@ -753,9 +750,11 @@ cairo_destroy(cr); for (i = 0; i < 3;
[Freeciv-commits] r34003 - in /trunk/client: gui-gtk-3.0/editprop.c gui-gtk-3.22/editprop.c
Author: cazfi Date: Wed Oct 5 07:27:25 2016 New Revision: 34003 URL: http://svn.gna.org/viewcvs/freeciv?rev=34003&view=rev Log: Support tooltips for properties in gtk3-clients' editor. Patch by pepeto and myself See bug #15580 Modified: trunk/client/gui-gtk-3.0/editprop.c trunk/client/gui-gtk-3.22/editprop.c [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/client/gui-gtk-3.0/editprop.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.0/editprop.c?rev=34003&r1=34002&r2=34003&view=diff Modified: trunk/client/gui-gtk-3.22/editprop.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.22/editprop.c?rev=34003&r1=34002&r2=34003&view=diff ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34004 - /branches/S2_6/client/gui-gtk-3.0/editprop.c
Author: cazfi Date: Wed Oct 5 07:27:31 2016 New Revision: 34004 URL: http://svn.gna.org/viewcvs/freeciv?rev=34004&view=rev Log: Support tooltips for properties in gtk3-clients' editor. Patch by pepeto and myself See bug #15580 Modified: branches/S2_6/client/gui-gtk-3.0/editprop.c Modified: branches/S2_6/client/gui-gtk-3.0/editprop.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.0/editprop.c?rev=34004&r1=34003&r2=34004&view=diff == --- branches/S2_6/client/gui-gtk-3.0/editprop.c (original) +++ branches/S2_6/client/gui-gtk-3.0/editprop.c Wed Oct 5 07:27:31 2016 @@ -387,6 +387,7 @@ struct objprop { int id; const char *name; + const char *tooltip; enum object_property_flags flags; enum value_types valtype; int column_id; @@ -398,11 +399,13 @@ static struct objprop *objprop_new(int id, const char *name, + const char *tooltip, enum object_property_flags flags, enum value_types valtype, struct property_page *parent); static int objprop_get_id(const struct objprop *op); static const char *objprop_get_name(const struct objprop *op); +static const char *objprop_get_tooltip(const struct objprop *op); static enum value_types objprop_get_valtype(const struct objprop *op); static struct property_page * objprop_get_property_page(const struct objprop *op); @@ -2807,6 +2810,17 @@ } / + Return a description (translated) of the property. +/ +static const char *objprop_get_tooltip(const struct objprop *op) +{ + if (!op) { +return NULL; + } + return op->tooltip; +} + +/ Create and return a cell renderer corresponding to this object property, suitable to be used with a tree view. May return NULL if this object property cannot exist in a list store. @@ -2909,8 +2923,7 @@ / static void objprop_setup_widget(struct objprop *op) { - GtkWidget *w = NULL; - GtkWidget *hbox, *hbox2, *label, *image, *entry, *spin, *button; + GtkWidget *ebox, *hbox, *hbox2, *label, *image, *entry, *spin, *button; struct extviewer *ev = NULL; enum object_property_ids propid; @@ -2922,10 +2935,13 @@ return; } + ebox = gtk_event_box_new(); + op->widget = ebox; + hbox = gtk_grid_new(); gtk_grid_set_column_spacing(GTK_GRID(hbox), 4); - w = hbox; - op->widget = w; + + gtk_container_add(GTK_CONTAINER(ebox), hbox); label = gtk_label_new(objprop_get_name(op)); gtk_widget_set_halign(label, GTK_ALIGN_START); @@ -3422,6 +3438,7 @@ / static struct objprop *objprop_new(int id, const char *name, + const char *tooltip, enum object_property_flags flags, enum value_types valtype, struct property_page *parent) @@ -3431,6 +3448,7 @@ op = fc_calloc(1, sizeof(*op)); op->id = id; op->name = name; + op->tooltip = tooltip; op->flags = flags; op->valtype = valtype; op->column_id = -1; @@ -4363,167 +4381,183 @@ / static void property_page_setup_objprops(struct property_page *pp) { -#define ADDPROP(ARG_id, ARG_name, ARG_flags, ARG_valtype) do {\ - struct objprop *MY_op = objprop_new(ARG_id, ARG_name,\ - ARG_flags, ARG_valtype, pp);\ - objprop_hash_insert(pp->objprop_table, MY_op->id, MY_op);\ +#define ADDPROP(ARG_id, ARG_name, ARG_tooltip, ARG_flags, ARG_valtype) do { \ + struct objprop *MY_op = objprop_new(ARG_id, ARG_name, ARG_tooltip, \ + ARG_flags, ARG_valtype, pp); \ + objprop_hash_insert(pp->objprop_table, MY_op->id, MY_op); \ } while (FALSE) switch (property_page_get_objtype(pp)) { case OBJTYPE_TILE: -ADDPROP(OPID_TILE_IMAGE, _("Image"), +ADDPROP(OPID_TILE_IMAGE, _("Image"), NULL, OPF_IN_LISTVIEW | OPF_HAS_WIDGET, VALTYPE_PIXBUF); -ADDPROP(OPID_TILE_TERRAIN, _("Terrain"), +ADDPROP(OPID_TILE_TERRAIN, _("Terrain"), NULL, OPF_IN_LISTVIEW | OPF_HAS_WIDGET, VALTYPE_STRING); -ADDPROP(OPID_TILE_RESOURCE, _("Resource"), +ADDPROP(OPID_TILE_RESOURCE, _("Resource"), NULL, OPF_IN_LISTVIEW | OPF_HAS_WIDGET, VALTYPE_STRING); -ADDPROP(OPID_TILE_INDEX, _("Index"), +ADDPROP(OPID_TILE_INDEX, _("Index"), NULL,
[Freeciv-commits] r34002 - /trunk/common/city.h
Author: cazfi Date: Wed Oct 5 07:15:38 2016 New Revision: 34002 URL: http://svn.gna.org/viewcvs/freeciv?rev=34002&view=rev Log: Changed specialist city options names so that those refer to target output, not specific specialist. See patch #7585 Modified: trunk/common/city.h Modified: trunk/common/city.h URL: http://svn.gna.org/viewcvs/freeciv/trunk/common/city.h?rev=34002&r1=34001&r2=34002&view=diff == --- trunk/common/city.h (original) +++ trunk/common/city.h Wed Oct 5 07:15:38 2016 @@ -52,10 +52,10 @@ #define SPECENUM_VALUE0NAME "Disband" /* If new citizens are science specialists */ #define SPECENUM_VALUE1 CITYO_SCIENCE_SPECIALISTS -#define SPECENUM_VALUE1NAME "New_Einstein" +#define SPECENUM_VALUE1NAME "Sci_Specialists" /* If new citizens are gold specialists */ #define SPECENUM_VALUE2 CITYO_GOLD_SPECIALISTS -#define SPECENUM_VALUE2NAME "New_Taxman" +#define SPECENUM_VALUE2NAME "Tax_Specialists" #define SPECENUM_COUNT CITYO_LAST #define SPECENUM_BITVECTOR bv_city_options #include "specenum_gen.h" ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r34001 - /trunk/data/
Author: cazfi Date: Wed Oct 5 07:04:46 2016 New Revision: 34001 URL: http://svn.gna.org/viewcvs/freeciv?rev=34001&view=rev Log: Fixed xgettext warnings about tileset layer order comments. Reported by Sveinung Kvilhaugsvik See bug #25126 Modified: trunk/data/alio.tilespec trunk/data/amplio.tilespec trunk/data/amplio2.tilespec trunk/data/cimpletoon.tilespec trunk/data/hex2t.tilespec trunk/data/hexemplio.tilespec trunk/data/isophex.tilespec trunk/data/isotrident.tilespec trunk/data/trident.tilespec Modified: trunk/data/alio.tilespec URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/alio.tilespec?rev=34001&r1=34000&r2=34001&view=diff == --- trunk/data/alio.tilespec(original) +++ trunk/data/alio.tilespecWed Oct 5 07:04:46 2016 @@ -117,7 +117,7 @@ ; "Grid1", ; Grid layer for isometric tilesets. ; "City1", ; City and walls. ; "Special2", ; 2nd layer for extras with "3Layers" and "Single2" styles. -; "Fog",; Fog of war (on tiles one knows but doesn't see). +; "Fog",; Fog of war (on tiles one knows but doesn`t see). ; "Unit", ; Units except the selected one(s). ; "Special3", ; 3rd layer for extras with "3Layers" style, and base flags. ; "City2", ; City size when the city bar is disabled. Modified: trunk/data/amplio.tilespec URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/amplio.tilespec?rev=34001&r1=34000&r2=34001&view=diff == --- trunk/data/amplio.tilespec (original) +++ trunk/data/amplio.tilespec Wed Oct 5 07:04:46 2016 @@ -107,7 +107,7 @@ ; "Grid1", ; Grid layer for isometric tilesets. ; "City1", ; City and walls. ; "Special2", ; 2nd layer for extras with "3Layers" and "Single2" styles. -; "Fog",; Fog of war (on tiles one knows but doesn't see). +; "Fog",; Fog of war (on tiles one knows but doesn`t see). ; "Unit", ; Units except the selected one(s). ; "Special3", ; 3rd layer for extras with "3Layers" style, and base flags. ; "City2", ; City size when the city bar is disabled. Modified: trunk/data/amplio2.tilespec URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/amplio2.tilespec?rev=34001&r1=34000&r2=34001&view=diff == --- trunk/data/amplio2.tilespec (original) +++ trunk/data/amplio2.tilespec Wed Oct 5 07:04:46 2016 @@ -107,7 +107,7 @@ ; "Grid1", ; Grid layer for isometric tilesets. ; "City1", ; City and walls. ; "Special2", ; 2nd layer for extras with "3Layers" and "Single2" styles. -; "Fog",; Fog of war (on tiles one knows but doesn't see). +; "Fog",; Fog of war (on tiles one knows but doesn`t see). ; "Unit", ; Units except the selected one(s). ; "Special3", ; 3rd layer for extras with "3Layers" style, and base flags. ; "City2", ; City size when the city bar is disabled. Modified: trunk/data/cimpletoon.tilespec URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/cimpletoon.tilespec?rev=34001&r1=34000&r2=34001&view=diff == --- trunk/data/cimpletoon.tilespec (original) +++ trunk/data/cimpletoon.tilespec Wed Oct 5 07:04:46 2016 @@ -111,7 +111,7 @@ ; "Grid1", ; Grid layer for isometric tilesets. ; "City1", ; City and walls. ; "Special2", ; 2nd layer for extras with "3Layers" and "Single2" styles. -; "Fog",; Fog of war (on tiles one knows but doesn't see). +; "Fog",; Fog of war (on tiles one knows but doesn`t see). ; "Unit", ; Units except the selected one(s). ; "Special3", ; 3rd layer for extras with "3Layers" style, and base flags. ; "City2", ; City size when the city bar is disabled. Modified: trunk/data/hex2t.tilespec URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/hex2t.tilespec?rev=34001&r1=34000&r2=34001&view=diff == --- trunk/data/hex2t.tilespec (original) +++ trunk/data/hex2t.tilespec Wed Oct 5 07:04:46 2016 @@ -110,7 +110,7 @@ ; "Grid1", ; Grid layer for isometric tilesets. ; "City1", ; City and walls. ; "Special2", ; 2nd layer for extras with "3Layers" and "Single2" styles. -; "Fog",; Fog of war (on tiles one knows but doesn't see). +; "Fog",; Fog of war (on tiles one knows but doesn`t see). ; "Unit", ; Units except the selected one(s). ; "Special3", ; 3rd layer for extras with "3Layers" style, and base flags. ; "City2", ; City size when the city bar is disabled. Modified: trunk/data/hexemplio.tilespec URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/hexemplio.tilespec?rev=34001&r1=34000&r2=34001&view=diff ==
[Freeciv-commits] r33994 - in /trunk: ./ ai/default/ client/ common/ common/networking/ data/alien/ data/civ1/ data/civ2/ data/civ2civ3/ data/...
Author: cazfi Date: Tue Oct 4 20:24:06 2016 New Revision: 33994 URL: http://svn.gna.org/viewcvs/freeciv?rev=33994&view=rev Log: Added support for unit slots of cities. - Unit type definition tells how many slots (if any) unit takes up - Effect controls how many unit slots city has Requested by Matthias Pfafferodt See patch #1936 Modified: trunk/ai/default/daieffects.c trunk/client/packhand.c trunk/common/actions.c trunk/common/city.c trunk/common/city.h trunk/common/effects.h trunk/common/networking/packets.def trunk/common/unittype.h trunk/data/alien/units.ruleset trunk/data/civ1/units.ruleset trunk/data/civ2/units.ruleset trunk/data/civ2civ3/units.ruleset trunk/data/classic/units.ruleset trunk/data/experimental/units.ruleset trunk/data/multiplayer/units.ruleset trunk/data/ruledit/comments.txt trunk/data/sandbox/units.ruleset trunk/data/stub/units.ruleset trunk/data/webperimental/units.ruleset trunk/doc/README.effects trunk/fc_version trunk/server/ruleset.c trunk/tools/ruleutil/rulesave.c [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/ai/default/daieffects.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/ai/default/daieffects.c?rev=33994&r1=33993&r2=33994&view=diff Modified: trunk/client/packhand.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/packhand.c?rev=33994&r1=33993&r2=33994&view=diff Modified: trunk/common/actions.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/common/actions.c?rev=33994&r1=33993&r2=33994&view=diff Modified: trunk/common/city.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/common/city.c?rev=33994&r1=33993&r2=33994&view=diff Modified: trunk/common/city.h URL: http://svn.gna.org/viewcvs/freeciv/trunk/common/city.h?rev=33994&r1=33993&r2=33994&view=diff Modified: trunk/common/effects.h URL: http://svn.gna.org/viewcvs/freeciv/trunk/common/effects.h?rev=33994&r1=33993&r2=33994&view=diff Modified: trunk/common/networking/packets.def URL: http://svn.gna.org/viewcvs/freeciv/trunk/common/networking/packets.def?rev=33994&r1=33993&r2=33994&view=diff Modified: trunk/common/unittype.h URL: http://svn.gna.org/viewcvs/freeciv/trunk/common/unittype.h?rev=33994&r1=33993&r2=33994&view=diff Modified: trunk/data/alien/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/alien/units.ruleset?rev=33994&r1=33993&r2=33994&view=diff Modified: trunk/data/civ1/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/civ1/units.ruleset?rev=33994&r1=33993&r2=33994&view=diff Modified: trunk/data/civ2/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2/units.ruleset?rev=33994&r1=33993&r2=33994&view=diff Modified: trunk/data/civ2civ3/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2civ3/units.ruleset?rev=33994&r1=33993&r2=33994&view=diff Modified: trunk/data/classic/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/classic/units.ruleset?rev=33994&r1=33993&r2=33994&view=diff Modified: trunk/data/experimental/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/experimental/units.ruleset?rev=33994&r1=33993&r2=33994&view=diff Modified: trunk/data/multiplayer/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/multiplayer/units.ruleset?rev=33994&r1=33993&r2=33994&view=diff Modified: trunk/data/ruledit/comments.txt URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/ruledit/comments.txt?rev=33994&r1=33993&r2=33994&view=diff Modified: trunk/data/sandbox/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/sandbox/units.ruleset?rev=33994&r1=33993&r2=33994&view=diff Modified: trunk/data/stub/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/stub/units.ruleset?rev=33994&r1=33993&r2=33994&view=diff Modified: trunk/data/webperimental/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/webperimental/units.ruleset?rev=33994&r1=33993&r2=33994&view=diff Modified: trunk/doc/README.effects URL: http://svn.gna.org/viewcvs/freeciv/trunk/doc/README.effects?rev=33994&r1=33993&r2=33994&view=diff Modified: trunk/fc_version URL: http://svn.gna.org/viewcvs/freeciv/trunk/fc_version?rev=33994&r1=33993&r2=33994&view=diff Modified: trunk/server/ruleset.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/ruleset.c?rev=33994&r1=33993&r2=33994&view=diff Modified: trunk/tools/ruleutil/rulesave.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/tools/ruleutil/rulesave.c?rev=33994&r1=33993&r2=33994&view=diff ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r33992 - /trunk/utility/registry.c
Author: cazfi Date: Tue Oct 4 20:01:40 2016 New Revision: 33992 URL: http://svn.gna.org/viewcvs/freeciv?rev=33992&view=rev Log: Check existence of a file before trying to run xml-parser on it. See bug #23759 Modified: trunk/utility/registry.c Modified: trunk/utility/registry.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/utility/registry.c?rev=33992&r1=33991&r2=33992&view=diff == --- trunk/utility/registry.c(original) +++ trunk/utility/registry.cTue Oct 4 20:01:40 2016 @@ -1,4 +1,4 @@ -/** +/*** Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -51,11 +51,15 @@ bool allow_duplicates) { #ifdef FREECIV_HAVE_XML_REGISTRY - xmlDoc *sec_doc; + struct stat buf; - sec_doc = xmlReadFile(filename, NULL, XML_PARSE_NOERROR); - if (sec_doc != NULL) { -return xmlfile_load(sec_doc, filename); + if (fc_stat(filename, &buf) == 0) { +xmlDoc *sec_doc; + +sec_doc = xmlReadFile(filename, NULL, XML_PARSE_NOERROR); +if (sec_doc != NULL) { + return xmlfile_load(sec_doc, filename); +} } #endif /* FREECIV_HAVE_XML_REGISTRY */ ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r33993 - /branches/S2_6/utility/registry.c
Author: cazfi Date: Tue Oct 4 20:01:46 2016 New Revision: 33993 URL: http://svn.gna.org/viewcvs/freeciv?rev=33993&view=rev Log: Check existence of a file before trying to run xml-parser on it. See bug #23759 Modified: branches/S2_6/utility/registry.c Modified: branches/S2_6/utility/registry.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/utility/registry.c?rev=33993&r1=33992&r2=33993&view=diff == --- branches/S2_6/utility/registry.c(original) +++ branches/S2_6/utility/registry.cTue Oct 4 20:01:46 2016 @@ -1,4 +1,4 @@ -/** +/*** Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -51,11 +51,15 @@ bool allow_duplicates) { #ifdef FREECIV_HAVE_XML_REGISTRY - xmlDoc *sec_doc; + struct stat buf; - sec_doc = xmlReadFile(filename, NULL, XML_PARSE_NOERROR); - if (sec_doc != NULL) { -return xmlfile_load(sec_doc, filename); + if (fc_stat(filename, &buf) == 0) { +xmlDoc *sec_doc; + +sec_doc = xmlReadFile(filename, NULL, XML_PARSE_NOERROR); +if (sec_doc != NULL) { + return xmlfile_load(sec_doc, filename); +} } #endif /* FREECIV_HAVE_XML_REGISTRY */ ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r33982 - in /trunk: ./ client/ client/gui-gtk-3.22/ client/gui-gtk-3.x/ data/ data/themes/ data/themes/gui-gtk-3.22/ data/th...
Author: cazfi Date: Tue Oct 4 06:11:34 2016 New Revision: 33982 URL: http://svn.gna.org/viewcvs/freeciv?rev=33982&view=rev Log: Renamed current gtk3x-client files and directories as gtk3.22-client. See patch #7750 Added: trunk/client/gui-gtk-3.22/ - copied from r33981, trunk/client/gui-gtk-3.x/ trunk/data/gtk3.22_menus.xml - copied unchanged from r33981, trunk/data/gtk3x_menus.xml trunk/data/themes/gui-gtk-3.22/ - copied from r33981, trunk/data/themes/gui-gtk-3.x/ trunk/m4/gtk3.22-client.m4 - copied unchanged from r33981, trunk/m4/gtk3x-client.m4 Removed: trunk/client/gui-gtk-3.x/ trunk/data/gtk3x_menus.xml trunk/data/themes/gui-gtk-3.x/ trunk/m4/gtk3x-client.m4 Modified: trunk/Makefile.am trunk/client/Makefile.am trunk/client/gui-gtk-3.22/menu.c trunk/client/gui-gtk-3.22/themes.c trunk/configure.ac trunk/data/Makefile.am trunk/data/themes/Makefile.am trunk/translations/core/POTFILES.in [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/Makefile.am URL: http://svn.gna.org/viewcvs/freeciv/trunk/Makefile.am?rev=33982&r1=33981&r2=33982&view=diff Modified: trunk/client/Makefile.am URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/Makefile.am?rev=33982&r1=33981&r2=33982&view=diff Modified: trunk/client/gui-gtk-3.22/menu.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.22/menu.c?rev=33982&r1=33981&r2=33982&view=diff Modified: trunk/client/gui-gtk-3.22/themes.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.22/themes.c?rev=33982&r1=33981&r2=33982&view=diff Modified: trunk/configure.ac URL: http://svn.gna.org/viewcvs/freeciv/trunk/configure.ac?rev=33982&r1=33981&r2=33982&view=diff Modified: trunk/data/Makefile.am URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/Makefile.am?rev=33982&r1=33981&r2=33982&view=diff Removed: trunk/data/gtk3x_menus.xml URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/gtk3x_menus.xml?rev=33981&view=auto Modified: trunk/data/themes/Makefile.am URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/themes/Makefile.am?rev=33982&r1=33981&r2=33982&view=diff Removed: trunk/m4/gtk3x-client.m4 URL: http://svn.gna.org/viewcvs/freeciv/trunk/m4/gtk3x-client.m4?rev=33981&view=auto Modified: trunk/translations/core/POTFILES.in URL: http://svn.gna.org/viewcvs/freeciv/trunk/translations/core/POTFILES.in?rev=33982&r1=33981&r2=33982&view=diff ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r33964 - /trunk/INSTALL
Author: cazfi Date: Mon Oct 3 05:49:59 2016 New Revision: 33964 URL: http://svn.gna.org/viewcvs/freeciv?rev=33964&view=rev Log: Corrected minimum gtk3x-client requirements in INSTALL See patch #7746 Modified: trunk/INSTALL Modified: trunk/INSTALL URL: http://svn.gna.org/viewcvs/freeciv/trunk/INSTALL?rev=33964&r1=33963&r2=33964&view=diff == --- trunk/INSTALL (original) +++ trunk/INSTALL Mon Oct 3 05:49:59 2016 @@ -111,7 +111,7 @@ The Freeciv client comes in the following forms: * Gtk+ 2.0 widget library ("Gtk+ 2.0"). * Gtk+ 3.0 widget library ("Gtk+ 3.0"). -* Gtk+ 3.0 widget library, latest versions ("Gtk+ 3.x") +* Gtk+ 3.0 widget library, current versions ("Gtk+ 3.x") * SDL2 * Qt @@ -275,12 +275,12 @@ The "Glib" utility library provides non-graphical functions used by the "Gdk" and "Gtk+" libraries, like hash tables, single linked lists, etc. - Freeciv requires a version of "Glib" greater or equal to 2.36 + Freeciv requires a version of "Glib" greater or equal to 2.46 If the Freeciv configure process tells you that you don't have the Glib library installed, then it may be obtained from here: - http://ftp.gnome.org/pub/gnome/sources/glib/2.46/glib-2.46.2.tar.xz + http://ftp.gnome.org/pub/gnome/sources/glib/2.48/glib-2.48.2.tar.xz - The "Atk" accessibility library. @@ -315,12 +315,12 @@ Provides an abstraction layer over X-Windows/LinuxFB/Win32 to implement basic drawing functions, windows, clipping, etc. - Freeciv requires a version of "Gtk+" greater or equal to 3.14.0. + Freeciv requires a version of "Gtk+" greater or equal to 3.18.0. If the Freeciv configure process tells you that you don't have the Gtk+ library installed, then it may be obtained from here: - http://ftp.gnome.org/pub/gnome/sources/gtk+/3.18/gtk+-3.18.6.tar.xz + http://ftp.gnome.org/pub/gnome/sources/gtk+/3.20/gtk+-3.20.9.tar.xz "Gtk+" depends on the "Glib", "Atk", "Gdk-Pixbuf", and "Pango" libraries. ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r33963 - in /trunk: ./ client/ common/ common/networking/ data/alien/ data/civ1/ data/civ2/ data/civ2civ3/ data/classic/ dat...
Author: cazfi Date: Sun Oct 2 19:12:17 2016 New Revision: 33963 URL: http://svn.gna.org/viewcvs/freeciv?rev=33963&view=rev Log: Added support for helptexts for goods. See patch #7741 Modified: trunk/client/helpdata.c trunk/client/packhand.c trunk/common/networking/packets.def trunk/common/traderoutes.c trunk/common/traderoutes.h trunk/data/alien/game.ruleset trunk/data/civ1/game.ruleset 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/ruledit/comments.txt trunk/data/sandbox/game.ruleset trunk/data/stub/game.ruleset trunk/data/webperimental/game.ruleset trunk/fc_version trunk/server/ruleset.c trunk/tools/ruleutil/rulesave.c Modified: trunk/client/helpdata.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/helpdata.c?rev=33963&r1=33962&r2=33963&view=diff == --- trunk/client/helpdata.c (original) +++ trunk/client/helpdata.c Sun Oct 2 19:12:17 2016 @@ -2819,13 +2819,11 @@ fc_assert_ret(NULL != buf && 0 < bufsz); buf[0] = '\0'; - /* if (NULL != pgood->helptext) { strvec_iterate(pgood->helptext, text) { cat_snprintf(buf, bufsz, "%s\n\n", _(text)); } strvec_iterate_end; } - */ cat_snprintf(buf, bufsz, _("Sending city enjoys %d%% income from the route.\n"), pgood->from_pct); Modified: trunk/client/packhand.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/packhand.c?rev=33963&r1=33962&r2=33963&view=diff == --- trunk/client/packhand.c (original) +++ trunk/client/packhand.c Sun Oct 2 19:12:17 2016 @@ -3944,6 +3944,8 @@ pgood->from_pct = p->from_pct; pgood->to_pct = p->to_pct; pgood->flags = p->flags; + + PACKET_STRVEC_EXTRACT(pgood->helptext, p->helptext); } /** Modified: trunk/common/networking/packets.def URL: http://svn.gna.org/viewcvs/freeciv/trunk/common/networking/packets.def?rev=33963&r1=33962&r2=33963&view=diff == --- trunk/common/networking/packets.def (original) +++ trunk/common/networking/packets.def Sun Oct 2 19:12:17 2016 @@ -1701,6 +1701,7 @@ UINT16 from_pct; UINT16 to_pct; BV_GOODS_FLAGS flags; + STRVEC helptext[MAX_LEN_PACKET]; end PACKET_RULESET_DISASTER = 224; sc, lsend Modified: trunk/common/traderoutes.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/common/traderoutes.c?rev=33963&r1=33962&r2=33963&view=diff == --- trunk/common/traderoutes.c (original) +++ trunk/common/traderoutes.c Sun Oct 2 19:12:17 2016 @@ -429,6 +429,7 @@ requirement_vector_init(&(goods[i].reqs)); goods[i].disabled = FALSE; +goods[i].helptext = NULL; } } @@ -441,6 +442,11 @@ for (i = 0; i < MAX_GOODS_TYPES; i++) { requirement_vector_free(&(goods[i].reqs)); + +if (NULL != goods[i].helptext) { + strvec_destroy(goods[i].helptext); + goods[i].helptext = NULL; +} } } Modified: trunk/common/traderoutes.h URL: http://svn.gna.org/viewcvs/freeciv/trunk/common/traderoutes.h?rev=33963&r1=33962&r2=33963&view=diff == --- trunk/common/traderoutes.h (original) +++ trunk/common/traderoutes.h Sun Oct 2 19:12:17 2016 @@ -176,6 +176,8 @@ int to_pct; bv_goods_flags flags; + + struct strvec *helptext; }; void goods_init(void); Modified: trunk/data/alien/game.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/alien/game.ruleset?rev=33963&r1=33962&r2=33963&view=diff == --- trunk/data/alien/game.ruleset (original) +++ trunk/data/alien/game.ruleset Sun Oct 2 19:12:17 2016 @@ -776,6 +776,8 @@ ; - "Depletes" = Trade route gets cancelled when the source city cannot provide ; goods any more. Bidirectional routes gets cancelled if either ; one of the involved cities cannot provide goods. +; helptext= Optional help text string; should escape all raw +; newlines so that xgettext parsing works ; ; */ <-- avoid gettext warnings Modified: trunk/data/civ1/game.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/civ1/game.ruleset?rev=33963&r1=33962&r2=33963&view=diff == --- trunk/data/civ1/game.ruleset(original) +++ trunk/data/civ1/game.rulesetSun Oct 2 19:12:17 2016 @@ -770,6 +770,8 @@ ; - "Depletes"
[Freeciv-commits] r33962 - /branches/S2_6/win32/installer_msys2/Makefile
Author: cazfi Date: Sun Oct 2 09:24:35 2016 New Revision: 33962 URL: http://svn.gna.org/viewcvs/freeciv?rev=33962&view=rev Log: Build Ruledit-installer as part of msys2 based Windows Installer snapshot build. See patch #7738 Modified: branches/S2_6/win32/installer_msys2/Makefile Modified: branches/S2_6/win32/installer_msys2/Makefile URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/win32/installer_msys2/Makefile?rev=33962&r1=33961&r2=33962&view=diff == --- branches/S2_6/win32/installer_msys2/Makefile(original) +++ branches/S2_6/win32/installer_msys2/MakefileSun Oct 2 09:24:35 2016 @@ -37,9 +37,9 @@ all: gtk3-installer gtk2-installer sdl2-installer qt-installer ruledit-installer # These are what can be built in current official environment version -buildable-win32: gtk3-installer sdl2-installer - -buildable-win64: gtk3-installer sdl2-installer +buildable-win32: gtk3-installer sdl2-installer ruledit-installer + +buildable-win64: gtk3-installer sdl2-installer ruledit-installer # See comments on 'snapshot' target why this wrapping is needed buildable: buildable-$(WINARCH) ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r33961 - /trunk/windows/installer_msys2/Makefile
Author: cazfi Date: Sun Oct 2 09:24:30 2016 New Revision: 33961 URL: http://svn.gna.org/viewcvs/freeciv?rev=33961&view=rev Log: Build Ruledit-installer as part of msys2 based Windows Installer snapshot build. See patch #7738 Modified: trunk/windows/installer_msys2/Makefile Modified: trunk/windows/installer_msys2/Makefile URL: http://svn.gna.org/viewcvs/freeciv/trunk/windows/installer_msys2/Makefile?rev=33961&r1=33960&r2=33961&view=diff == --- trunk/windows/installer_msys2/Makefile (original) +++ trunk/windows/installer_msys2/Makefile Sun Oct 2 09:24:30 2016 @@ -40,9 +40,9 @@ make GUI=gtk3x FCMP=gtk3x EXTRA_CONFIG="--disable-ruledit $(EXTRA_CONFIG)" wrap-gtk3x # These are what can be built in current official environment version -buildable-win32: gtk3-installer gtk3x-installer sdl2-installer - -buildable-win64: gtk3-installer gtk3x-installer sdl2-installer +buildable-win32: gtk3-installer gtk3x-installer sdl2-installer ruledit-installer + +buildable-win64: gtk3-installer gtk3x-installer sdl2-installer ruledit-installer # See comments on 'snapshot' target why this wrapping is needed buildable: buildable-$(WINARCH) ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r33960 - /branches/S2_5/server/unithand.c
Author: cazfi Date: Sun Oct 2 08:00:15 2016 New Revision: 33960 URL: http://svn.gna.org/viewcvs/freeciv?rev=33960&view=rev Log: Do not try to make 'disband' act like 'help wonder' for caravans. Reported by Sveinung Kvilhaugsvik See bug #23911 Modified: branches/S2_5/server/unithand.c Modified: branches/S2_5/server/unithand.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/unithand.c?rev=33960&r1=33959&r2=33960&view=diff == --- branches/S2_5/server/unithand.c (original) +++ branches/S2_5/server/unithand.c Sun Oct 2 08:00:15 2016 @@ -500,23 +500,11 @@ * Note: Nowadays it's possible to disband unit in allied city and * your ally receives those shields. Should it be like this? Why not? * That's why we must use city_owner instead of pplayer -- Zamar */ - -if (unit_has_type_flag(punit, UTYF_HELP_WONDER)) { - /* Count this just like a caravan that was added to a wonder. - * However don't actually give the city the extra shields unless - * they are building a wonder (but switching to a wonder later in - * the turn will give the extra shields back). */ - pcity->caravan_shields += unit_build_shield_cost(punit); - if (unit_can_help_build_wonder(punit, pcity)) { - pcity->shield_stock += unit_build_shield_cost(punit); - } else { - pcity->shield_stock += unit_disband_shields(punit); - } -} else { - pcity->shield_stock += unit_disband_shields(punit); - /* If we change production later at this turn. No penalty is added. */ - pcity->disbanded_shields += unit_disband_shields(punit); -} +int shields = unit_disband_shields(punit); + +pcity->shield_stock += shields; +/* If we change production later at this turn. No penalty is added. */ +pcity->disbanded_shields += shields; send_city_info(city_owner(pcity), pcity); } ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r33959 - /branches/S2_6/server/unithand.c
Author: cazfi Date: Sun Oct 2 08:00:08 2016 New Revision: 33959 URL: http://svn.gna.org/viewcvs/freeciv?rev=33959&view=rev Log: Do not try to make 'disband' act like 'help wonder' for caravans. Reported by Sveinung Kvilhaugsvik See bug #23911 Modified: branches/S2_6/server/unithand.c Modified: branches/S2_6/server/unithand.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/unithand.c?rev=33959&r1=33958&r2=33959&view=diff == --- branches/S2_6/server/unithand.c (original) +++ branches/S2_6/server/unithand.c Sun Oct 2 08:00:08 2016 @@ -1615,24 +1615,11 @@ * Note: Nowadays it's possible to disband unit in allied city and * your ally receives those shields. Should it be like this? Why not? * That's why we must use city_owner instead of pplayer -- Zamar */ - -if (unit_can_do_action(punit, ACTION_HELP_WONDER)) { - /* Count this just like a caravan that was added to a wonder. - * However don't actually give the city the extra shields unless - * they are building a wonder (but switching to a wonder later in - * the turn will give the extra shields back). */ - pcity->caravan_shields += unit_build_shield_cost(punit); - if (is_action_enabled_unit_on_city(ACTION_HELP_WONDER, - punit, pcity)) { - pcity->shield_stock += unit_build_shield_cost(punit); - } else { - pcity->shield_stock += unit_disband_shields(punit); - } -} else { - pcity->shield_stock += unit_disband_shields(punit); - /* If we change production later at this turn. No penalty is added. */ - pcity->disbanded_shields += unit_disband_shields(punit); -} +int shields = unit_disband_shields(punit); + +pcity->shield_stock += shields; +/* If we change production later at this turn. No penalty is added. */ +pcity->disbanded_shields += shields; send_city_info(city_owner(pcity), pcity); } ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r33958 - /trunk/server/unithand.c
Author: cazfi Date: Sun Oct 2 07:59:59 2016 New Revision: 33958 URL: http://svn.gna.org/viewcvs/freeciv?rev=33958&view=rev Log: Do not try to make 'disband' act like 'help wonder' for caravans. Reported by Sveinung Kvilhaugsvik See bug #23911 Modified: trunk/server/unithand.c Modified: trunk/server/unithand.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/unithand.c?rev=33958&r1=33957&r2=33958&view=diff == --- trunk/server/unithand.c (original) +++ trunk/server/unithand.c Sun Oct 2 07:59:59 2016 @@ -2561,6 +2561,8 @@ struct unit *punit, struct city *pcity) { + int shields; + /* Sanity check: The actor still exists. */ fc_assert_ret_val(pplayer, FALSE); fc_assert_ret_val(punit, FALSE); @@ -2568,19 +2570,14 @@ /* Sanity check: The target city still exists. */ fc_assert_ret_val(pcity, FALSE); + shields = unit_disband_shields(punit); + /* Add the shields from recycling the unit to the city's current * production. */ - pcity->shield_stock += unit_disband_shields(punit); - - if (unit_can_do_action(punit, ACTION_HELP_WONDER)) { -/* Count this just like a caravan that was added to a wonder. - * However don't actually give the city the extra shields. Switching - * to a wonder later in the turn will give the extra shields back. */ -pcity->caravan_shields += unit_build_shield_cost(punit); - } else { -/* If we change production later at this turn. No penalty is added. */ -pcity->disbanded_shields += unit_disband_shields(punit); - } + pcity->shield_stock += shields; + + /* If we change production later at this turn. No penalty is added. */ + pcity->disbanded_shields += shields; notify_player(pplayer, city_tile(pcity), E_CARAVAN_ACTION, ftc_server, /* TRANS: ... Ironclad ... New York */ ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r33957 - in /trunk/data/sandbox: README.sandbox effects.ruleset
Author: cazfi Date: Sat Oct 1 16:25:51 2016 New Revision: 33957 URL: http://svn.gna.org/viewcvs/freeciv?rev=33957&view=rev Log: Sandbox ruleset Republic has corruption increased by distance relative to the world size. See patch #7597 Modified: trunk/data/sandbox/README.sandbox trunk/data/sandbox/effects.ruleset Modified: trunk/data/sandbox/README.sandbox URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/sandbox/README.sandbox?rev=33957&r1=33956&r2=33957&view=diff == --- trunk/data/sandbox/README.sandbox (original) +++ trunk/data/sandbox/README.sandbox Sat Oct 1 16:25:51 2016 @@ -73,4 +73,10 @@ Trade routes can carry many kinds of goods. There is production chains like that city with Mine can trade Ore to a city that then can trade Metal to third city which can then trade Goods or Equipment to fourth -city. Goods later in chains trade for higher value. +city. Goods later in chains trade for higher value. + +Corruption and World Size: +Under Republic government, the speed corruption increases as one goes +further from the capital is relative to the size of the world. At +the maximum distance corruption is the same regardless of the size of +the world. Modified: trunk/data/sandbox/effects.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/sandbox/effects.ruleset?rev=33957&r1=33956&r2=33957&view=diff == --- trunk/data/sandbox/effects.ruleset (original) +++ trunk/data/sandbox/effects.ruleset Sat Oct 1 16:25:51 2016 @@ -518,8 +518,9 @@ type= "Output_Waste_By_Distance" value = 1 reqs= -{ "type", "name", "range" - "OutputType", "Trade", "Local" +{ "type", "name", "range", "present" + "OutputType", "Trade", "Local", TRUE + "Gov", "Republic", "Player", FALSE } ; 1 + 1 => -2% each tile without advanced tech / govs @@ -531,6 +532,14 @@ "OutputType", "Trade", "Local", TRUE "Tech", "The Corporation", "Player", FALSE "Gov", "Communism", "Player", FALSE +} + +[effect_corruption_distance_republic] +type= "Output_Waste_By_Rel_Distance" +value = 1 +reqs= +{ "type", "name", "range" + "Gov", "Republic", "Player" } ; Total = 0 for Communism ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r33956 - in /trunk/m4: debug.m4 gprof.m4
Author: cazfi Date: Sat Oct 1 16:14:43 2016 New Revision: 33956 URL: http://svn.gna.org/viewcvs/freeciv?rev=33956&view=rev Log: Removed double [[braces]] around some default values in configure --help. See patch #7737 Modified: trunk/m4/debug.m4 trunk/m4/gprof.m4 Modified: trunk/m4/debug.m4 URL: http://svn.gna.org/viewcvs/freeciv/trunk/m4/debug.m4?rev=33956&r1=33955&r2=33956&view=diff == --- trunk/m4/debug.m4 (original) +++ trunk/m4/debug.m4 Sat Oct 1 16:14:43 2016 @@ -1,6 +1,6 @@ AC_DEFUN([FC_DEBUG], [ AC_ARG_ENABLE(debug, - AS_HELP_STRING([--enable-debug[[=no/some/yes/checks]]], [turn on debugging [[default=some]]]), + AS_HELP_STRING([--enable-debug[[=no/some/yes/checks]]], [turn on debugging [default=some]]), [case "${enableval}" in yes)enable_debug=yes ;; some) enable_debug=some ;; Modified: trunk/m4/gprof.m4 URL: http://svn.gna.org/viewcvs/freeciv/trunk/m4/gprof.m4?rev=33956&r1=33955&r2=33956&view=diff == --- trunk/m4/gprof.m4 (original) +++ trunk/m4/gprof.m4 Sat Oct 1 16:14:43 2016 @@ -1,6 +1,6 @@ AC_DEFUN([FC_GPROF], [ AC_ARG_ENABLE([gprof], - AS_HELP_STRING([--enable-gprof], [turn on profiling [[default=no]]]), + AS_HELP_STRING([--enable-gprof], [turn on profiling [default=no]]), [case "${enableval}" in yes) enable_gprof=yes ;; no) enable_gprof=no ;; ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r33955 - /trunk/client/gui-qt/helpdlg.cpp
Author: cazfi Date: Sat Oct 1 15:20:04 2016 New Revision: 33955 URL: http://svn.gna.org/viewcvs/freeciv?rev=33955&view=rev Log: Fixed broken Qt-client compile. Reported by Jacob Nevins See patch #7735 Modified: trunk/client/gui-qt/helpdlg.cpp Modified: trunk/client/gui-qt/helpdlg.cpp URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/helpdlg.cpp?rev=33955&r1=33954&r2=33955&view=diff == --- trunk/client/gui-qt/helpdlg.cpp (original) +++ trunk/client/gui-qt/helpdlg.cpp Sat Oct 1 15:20:04 2016 @@ -698,6 +698,7 @@ case HELP_UNIT: set_topic_unit(topic, title); break; +case HELP_GOODS: case HELP_LAST: // Just to avoid warning break; } ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r33954 - /trunk/data/alien/terrain.ruleset
Author: cazfi Date: Sat Oct 1 07:05:18 2016 New Revision: 33954 URL: http://svn.gna.org/viewcvs/freeciv?rev=33954&view=rev Log: Added helptexts for alien ruleset Resources. See patch #7736 Modified: trunk/data/alien/terrain.ruleset Modified: trunk/data/alien/terrain.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/alien/terrain.ruleset?rev=33954&r1=33953&r2=33954&view=diff == --- trunk/data/alien/terrain.ruleset(original) +++ trunk/data/alien/terrain.rulesetSat Oct 1 07:05:18 2016 @@ -1109,6 +1109,11 @@ act_gfx_alt2 = "-" rmact_gfx = "None" rmact_gfx_alt = "-" +; /* xgettext:no-c-format */ +helptext = _("\ +There is more than avarage amount of various resources,\ + but nothing exciting.\ +") [extra_alien_mine] name = _("Alien Mine") @@ -1122,6 +1127,11 @@ act_gfx_alt2 = "-" rmact_gfx = "None" rmact_gfx_alt = "-" +; /* xgettext:no-c-format */ +helptext = _("\ +Mine run by superior alien technology ready to operate.\ + We have no idea who built it nor where they went.\ +") [extra_huge_plant] name = _("Huge Plant") @@ -1135,6 +1145,11 @@ act_gfx_alt2 = "-" rmact_gfx = "None" rmact_gfx_alt = "-" +; /* xgettext:no-c-format */ +helptext = _("\ +Entire forest seems to be of the single fast-growing organism with\ + huge central blooming.\ +") [extra_thermal_vent] name = _("Thermal Vent") @@ -1148,6 +1163,11 @@ act_gfx_alt2 = "-" rmact_gfx = "None" rmact_gfx_alt = "-" +; /* xgettext:no-c-format */ +helptext = _("\ +Where the heat from inside the planet escapes, mineral rich\ + hills form.\ +") [extra_fish] name = _("Fish") @@ -1161,6 +1181,11 @@ act_gfx_alt2 = "-" rmact_gfx = "None" rmact_gfx_alt = "-" +; /* xgettext:no-c-format */ +helptext = _("\ +Weird alien fish might look like something escaped from nighmares,\ + but are in fact very tasty.\ +") [extra_glowing_rocks] name = _("Glowing Rocks") @@ -1174,6 +1199,10 @@ act_gfx_alt2 = "-" rmact_gfx = "None" rmact_gfx_alt = "-" +; /* xgettext:no-c-format */ +helptext = _("\ +Rocks in the area have unusually bright glow.\ +") ; /* <-- avoid gettext warnings ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r33953 - in /trunk: client/ client/gui-gtk-2.0/ client/gui-gtk-3.0/ client/gui-gtk-3.x/ client/include/ common/ data/
Author: cazfi Date: Sat Oct 1 06:32:34 2016 New Revision: 33953 URL: http://svn.gna.org/viewcvs/freeciv?rev=33953&view=rev Log: Added goods help page. See patch #7735 Modified: trunk/client/gui-gtk-2.0/helpdlg.c trunk/client/gui-gtk-3.0/helpdlg.c trunk/client/gui-gtk-3.x/helpdlg.c trunk/client/helpdata.c trunk/client/helpdata.h trunk/client/include/helpdlg_g.h trunk/common/traderoutes.c trunk/common/traderoutes.h trunk/data/helpdata.txt Modified: trunk/client/gui-gtk-2.0/helpdlg.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-2.0/helpdlg.c?rev=33953&r1=33952&r2=33953&view=diff == --- trunk/client/gui-gtk-2.0/helpdlg.c (original) +++ trunk/client/gui-gtk-2.0/helpdlg.c Sat Oct 1 06:32:34 2016 @@ -1310,8 +1310,30 @@ /** This is currently just a text page, with special text: **/ +static void help_update_goods(const struct help_item *pitem, + char *title) +{ + char buf[8192]; + struct goods_type *pgood = goods_by_translated_name(title); + + create_help_page(HELP_GOODS); + + if (!pgood) { +strcat(buf, pitem->text); + } else { +helptext_goods(buf, sizeof(buf), client.conn.playing, pitem->text, + pgood); + } + create_help_page(HELP_GOODS); + gtk_text_buffer_set_text(help_text, buf, -1); + gtk_widget_show(help_text_sw); +} + +/** + This is currently just a text page, with special text: +**/ static void help_update_specialist(const struct help_item *pitem, - char *title) + char *title) { char buf[8192]; struct specialist *pspec = specialist_by_translated_name(title); @@ -1399,6 +1421,9 @@ case HELP_EXTRA: help_update_extra(pitem, top); break; + case HELP_GOODS: +help_update_goods(pitem, top); +break; case HELP_SPECIALIST: help_update_specialist(pitem, top); break; Modified: trunk/client/gui-gtk-3.0/helpdlg.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.0/helpdlg.c?rev=33953&r1=33952&r2=33953&view=diff == --- trunk/client/gui-gtk-3.0/helpdlg.c (original) +++ trunk/client/gui-gtk-3.0/helpdlg.c Sat Oct 1 06:32:34 2016 @@ -1334,8 +1334,30 @@ /** This is currently just a text page, with special text: **/ +static void help_update_goods(const struct help_item *pitem, + char *title) +{ + char buf[8192]; + struct goods_type *pgood = goods_by_translated_name(title); + + create_help_page(HELP_GOODS); + + if (!pgood) { +strcat(buf, pitem->text); + } else { +helptext_goods(buf, sizeof(buf), client.conn.playing, pitem->text, + pgood); + } + create_help_page(HELP_GOODS); + gtk_text_buffer_set_text(help_text, buf, -1); + gtk_widget_show(help_text_sw); +} + +/** + This is currently just a text page, with special text: +**/ static void help_update_specialist(const struct help_item *pitem, - char *title) + char *title) { char buf[8192]; struct specialist *pspec = specialist_by_translated_name(title); @@ -1423,6 +1445,9 @@ case HELP_EXTRA: help_update_extra(pitem, top); break; + case HELP_GOODS: +help_update_goods(pitem, top); +break; case HELP_SPECIALIST: help_update_specialist(pitem, top); break; Modified: trunk/client/gui-gtk-3.x/helpdlg.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.x/helpdlg.c?rev=33953&r1=33952&r2=33953&view=diff == --- trunk/client/gui-gtk-3.x/helpdlg.c (original) +++ trunk/client/gui-gtk-3.x/helpdlg.c Sat Oct 1 06:32:34 2016 @@ -1333,8 +1333,30 @@ /** This is currently just a text page, with special text: **/ +static void help_update_goods(const struct help_item *pitem, + char *title) +{ + char buf[8192]; + struct goods_type *pgood = goods_by_translated_name(title); + + create_help_page(HELP_GOODS); + + if (!pgood) { +strcat(buf, pitem->text); + } else { +helptext_goods(buf, siz
[Freeciv-commits] r33949 - in /branches/S2_6/utility: registry_ini.c section_file.c support.c support.h
Author: cazfi Date: Fri Sep 30 06:20:23 2016 New Revision: 33949 URL: http://svn.gna.org/viewcvs/freeciv?rev=33949&view=rev Log: Moved make_escapes() and remove_escapes() to support.c. See patch #7734 Modified: branches/S2_6/utility/registry_ini.c branches/S2_6/utility/section_file.c branches/S2_6/utility/support.c branches/S2_6/utility/support.h Modified: branches/S2_6/utility/registry_ini.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/utility/registry_ini.c?rev=33949&r1=33948&r2=33949&view=diff == --- branches/S2_6/utility/registry_ini.c(original) +++ branches/S2_6/utility/registry_ini.cFri Sep 30 06:20:23 2016 @@ -51,7 +51,7 @@ can, but they have no particular significance. There can be optional whitespace before and/or after the equals sign. You can put a newline after (but not before) the equals sign. - + Backslash is an escape character in strings (double-quoted strings only, not names); recognised escapes are \n, \\, and \". (Any other \ is just treated as .) @@ -188,39 +188,6 @@ static struct entry *section_entry_filereference_new(struct section *psection, const char *name, const char *value); - -/ - Copies a string and convert the following characters: - - '\n' to "\\n". - - '\\' to "". - - '\"' to "\\\"". - See also remove_escapes(). -/ -static void make_escapes(const char *str, char *buf, size_t buf_len) -{ - char *dest = buf; - /* Sometimes we insert 2 characters at once ('\n' -> "\\n"), so keep - * place for '\0' and an extra character. */ - const char *const max = buf + buf_len - 2; - - while (*str != '\0' && dest < max) { -switch (*str) { -case '\n': - *dest++ = '\\'; - *dest++ = 'n'; - str++; - break; -case '\\': -case '\"': - *dest++ = '\\'; - /* Fallthrough. */ -default: - *dest++ = *str++; - break; -} - } - *dest = 0; -} /*** Simplification of fileinfoname(). Modified: branches/S2_6/utility/section_file.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/utility/section_file.c?rev=33949&r1=33948&r2=33949&view=diff == --- branches/S2_6/utility/section_file.c(original) +++ branches/S2_6/utility/section_file.cFri Sep 30 06:20:23 2016 @@ -1,4 +1,4 @@ -/** +/*** Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -127,39 +127,6 @@ secfile->allow_digital_boolean = allow_digital_boolean; } -/ - Copies a string. Backslash followed by a genuine newline always - removes the newline. - If full_escapes is TRUE: -- '\n' -> newline translation. -- Other '\c' sequences (any character 'c') are just passed - through with the '\' removed (eg, includes '\\', '\"'). - See also make_escapes(). -/ -static void remove_escapes(const char *str, bool full_escapes, - char *buf, size_t buf_len) -{ - char *dest = buf; - const char *const max = buf + buf_len - 1; - - while (*str != '\0' && dest < max) { -if (*str == '\\' && *(str + 1) == '\n') { - /* Escape followed by newline. Skip both */ - str += 2; -} else if (full_escapes && *str == '\\') { - str++; - if (*str == 'n') { -*dest++ = '\n'; -str++; - } -} else { - *dest++ = *str++; -} - } - *dest = '\0'; -} - - /** Add entry to section from token. **/ Modified: branches/S2_6/utility/support.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/utility/support.c?rev=33949&r1=33948&r2=33949&view=diff == --- branches/S2_6/utility/support.c (original) +++ branches/S2_6/utility/support.c Fri Sep 30 06:20:23 2016 @@ -159,6 +159,71 @@ return ((int) (unsigned char) fc_tolower(*str0)) - ((int) (unsigned char) fc_tolower(*str1)); #endif /* HAVE_STRNCASECMP */ +} + +/ + Copies a string and convert th
[Freeciv-commits] r33948 - in /trunk/utility: registry_ini.c section_file.c support.c support.h
Author: cazfi Date: Fri Sep 30 06:20:15 2016 New Revision: 33948 URL: http://svn.gna.org/viewcvs/freeciv?rev=33948&view=rev Log: Moved make_escapes() and remove_escapes() to support.c. See patch #7734 Modified: trunk/utility/registry_ini.c trunk/utility/section_file.c trunk/utility/support.c trunk/utility/support.h Modified: trunk/utility/registry_ini.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/utility/registry_ini.c?rev=33948&r1=33947&r2=33948&view=diff == --- trunk/utility/registry_ini.c(original) +++ trunk/utility/registry_ini.cFri Sep 30 06:20:15 2016 @@ -51,7 +51,7 @@ can, but they have no particular significance. There can be optional whitespace before and/or after the equals sign. You can put a newline after (but not before) the equals sign. - + Backslash is an escape character in strings (double-quoted strings only, not names); recognised escapes are \n, \\, and \". (Any other \ is just treated as .) @@ -221,39 +221,6 @@ static struct entry *section_entry_filereference_new(struct section *psection, const char *name, const char *value); - -/ - Copies a string and convert the following characters: - - '\n' to "\\n". - - '\\' to "". - - '\"' to "\\\"". - See also remove_escapes(). -/ -static void make_escapes(const char *str, char *buf, size_t buf_len) -{ - char *dest = buf; - /* Sometimes we insert 2 characters at once ('\n' -> "\\n"), so keep - * place for '\0' and an extra character. */ - const char *const max = buf + buf_len - 2; - - while (*str != '\0' && dest < max) { -switch (*str) { -case '\n': - *dest++ = '\\'; - *dest++ = 'n'; - str++; - break; -case '\\': -case '\"': - *dest++ = '\\'; - /* Fallthrough. */ -default: - *dest++ = *str++; - break; -} - } - *dest = 0; -} /*** Simplification of fileinfoname(). Modified: trunk/utility/section_file.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/utility/section_file.c?rev=33948&r1=33947&r2=33948&view=diff == --- trunk/utility/section_file.c(original) +++ trunk/utility/section_file.cFri Sep 30 06:20:15 2016 @@ -1,4 +1,4 @@ -/** +/*** Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -128,39 +128,6 @@ secfile->allow_digital_boolean = allow_digital_boolean; } -/ - Copies a string. Backslash followed by a genuine newline always - removes the newline. - If full_escapes is TRUE: -- '\n' -> newline translation. -- Other '\c' sequences (any character 'c') are just passed - through with the '\' removed (eg, includes '\\', '\"'). - See also make_escapes(). -/ -static void remove_escapes(const char *str, bool full_escapes, - char *buf, size_t buf_len) -{ - char *dest = buf; - const char *const max = buf + buf_len - 1; - - while (*str != '\0' && dest < max) { -if (*str == '\\' && *(str + 1) == '\n') { - /* Escape followed by newline. Skip both */ - str += 2; -} else if (full_escapes && *str == '\\') { - str++; - if (*str == 'n') { -*dest++ = '\n'; -str++; - } -} else { - *dest++ = *str++; -} - } - *dest = '\0'; -} - - /** Add entry to section from token. **/ Modified: trunk/utility/support.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/utility/support.c?rev=33948&r1=33947&r2=33948&view=diff == --- trunk/utility/support.c (original) +++ trunk/utility/support.c Fri Sep 30 06:20:15 2016 @@ -270,6 +270,71 @@ fc_release_mutex(&cmp_buffer_mutex); return ret; +} + +/ + Copies a string and convert the following characters: + - '\n' to "\\n". + - '\\' to "". + - '\"' to "\\\"". + See also remove_escapes(). +/ +void make_es
[Freeciv-commits] r33943 - in /trunk/data/sandbox: README.sandbox game.ruleset
Author: cazfi Date: Thu Sep 29 06:27:34 2016 New Revision: 33943 URL: http://svn.gna.org/viewcvs/freeciv?rev=33943&view=rev Log: Set sandbox ruleset goods from_pct and to_pct values. See patch #7733 Modified: trunk/data/sandbox/README.sandbox trunk/data/sandbox/game.ruleset Modified: trunk/data/sandbox/README.sandbox URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/sandbox/README.sandbox?rev=33943&r1=33942&r2=33943&view=diff == --- trunk/data/sandbox/README.sandbox (original) +++ trunk/data/sandbox/README.sandbox Thu Sep 29 06:27:34 2016 @@ -73,4 +73,4 @@ Trade routes can carry many kinds of goods. There is production chains like that city with Mine can trade Ore to a city that then can trade Metal to third city which can then trade Goods or Equipment to fourth -city. +city. Goods later in chains trade for higher value. Modified: trunk/data/sandbox/game.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/sandbox/game.ruleset?rev=33943&r1=33942&r2=33943&view=diff == --- trunk/data/sandbox/game.ruleset (original) +++ trunk/data/sandbox/game.ruleset Thu Sep 29 06:27:34 2016 @@ -1057,6 +1057,8 @@ { "type", "name", "range" "Extra", "Spice", "City" } +from_pct = 135 +to_pct = 100 flags = "Depletes" [goods_gems] @@ -1065,6 +1067,8 @@ { "type", "name", "range" "Extra", "Gems", "City" } +from_pct = 135 +to_pct = 100 flags = "Depletes" [goods_jewelry] @@ -1073,6 +1077,8 @@ { "type", "name", "range" "Good", "Gems", "City" } +from_pct = 250 +to_pct = 150 flags = "Depletes" [goods_ore] @@ -1089,6 +1095,8 @@ { "type", "name", "range" "Good", "Ore", "City" } +from_pct = 135 +to_pct = 100 flags = "Depletes" [goods_good] @@ -1098,6 +1106,8 @@ "Good", "Metal", "City", TRUE "Tech", "Electronics", "Player", FALSE } +from_pct = 150 +to_pct = 135 flags = "Depletes" [goods_equipment] @@ -1107,6 +1117,8 @@ "Good", "Metal", "City" "Tech", "Electronics", "Player" } +from_pct = 200 +to_pct = 150 flags = "Depletes" [playercolors] ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r33942 - /trunk/data/hexemplio/bases.spec
Author: cazfi Date: Thu Sep 29 06:07:26 2016 New Revision: 33942 URL: http://svn.gna.org/viewcvs/freeciv?rev=33942&view=rev Log: Corrected Ruins tag in hexemplio. See bug #25127 Modified: trunk/data/hexemplio/bases.spec Modified: trunk/data/hexemplio/bases.spec URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/hexemplio/bases.spec?rev=33942&r1=33941&r2=33942&view=diff == --- trunk/data/hexemplio/bases.spec (original) +++ trunk/data/hexemplio/bases.spec Thu Sep 29 06:07:26 2016 @@ -57,7 +57,7 @@ ;[El] 1, 4, "base.buoy_mg" ;[VC] - 0, 5, "base.ruins_mg" + 0, 5, "extra.ruins_mg" ;[HH] ; 1, 5, "cd.occupied" ; 1, 5, "cd.city" ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r33941 - /trunk/tools/ruleutil/rulesave.c
Author: cazfi Date: Thu Sep 29 06:04:41 2016 New Revision: 33941 URL: http://svn.gna.org/viewcvs/freeciv?rev=33941&view=rev Log: Save goods flags to ruleset. See bug #25124 Modified: trunk/tools/ruleutil/rulesave.c Modified: trunk/tools/ruleutil/rulesave.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/tools/ruleutil/rulesave.c?rev=33941&r1=33940&r2=33941&view=diff == --- trunk/tools/ruleutil/rulesave.c (original) +++ trunk/tools/ruleutil/rulesave.c Thu Sep 29 06:04:41 2016 @@ -1239,6 +1239,8 @@ sect_idx = 0; goods_active_type_iterate(pgood) { char path[512]; +const char *flag_names[GF_COUNT]; +int flagi; fc_snprintf(path, sizeof(path), "goods_%d", sect_idx++); @@ -1249,6 +1251,17 @@ save_default_int(sfile, pgood->from_pct, 100, path, "from_pct"); save_default_int(sfile, pgood->to_pct, 100, path, "to_pct"); +set_count = 0; +for (flagi = 0; flagi < GF_COUNT; flagi++) { + if (goods_has_flag(pgood, flagi)) { +flag_names[set_count++] = goods_flag_id_name(flagi); + } +} + +if (set_count > 0) { + secfile_insert_str_vec(sfile, flag_names, set_count, + "%s.flags", path); +} } goods_active_type_iterate_end; locks = FALSE; ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r33940 - /trunk/common/city.c
Author: cazfi Date: Thu Sep 29 05:55:49 2016 New Revision: 33940 URL: http://svn.gna.org/viewcvs/freeciv?rev=33940&view=rev Log: Changed same EFT_OUTPUT_WASTE_BY_REL_DISTANCE value to give about same corruption level as EFT_OUTPUT_WASTE_BY_DISTANCE on typical world size. See patch #7732 Modified: trunk/common/city.c Modified: trunk/common/city.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/common/city.c?rev=33940&r1=33939&r2=33940&view=diff == --- trunk/common/city.c (original) +++ trunk/common/city.c Thu Sep 29 05:55:49 2016 @@ -3080,7 +3080,10 @@ } else { waste_level += waste_by_dist * min_dist; if (waste_by_rel_dist > 0) { - waste_level += waste_by_rel_dist * min_dist / MAX(wld.map.xsize, wld.map.ysize); + /* Multiply by 50 as an "standard size" for which EFT_OUTPUT_WASTE_BY_DISTANCE + * and EFT_OUTPUT_WASTE_BY_REL_DISTANCE would give same result. */ + waste_level += waste_by_rel_dist * 50 * min_dist + / MAX(wld.map.xsize, wld.map.ysize); } } } ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r33934 - in /branches/S2_5/server: srv_main.c stdinhand.c stdinhand.h
Author: cazfi Date: Wed Sep 28 07:13:45 2016 New Revision: 33934 URL: http://svn.gna.org/viewcvs/freeciv?rev=33934&view=rev Log: Lower default cmdlevel to basic on game start. Reported by taka See bug #24774 Modified: branches/S2_5/server/srv_main.c branches/S2_5/server/stdinhand.c branches/S2_5/server/stdinhand.h Modified: branches/S2_5/server/srv_main.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/srv_main.c?rev=33934&r1=33933&r2=33934&view=diff == --- branches/S2_5/server/srv_main.c (original) +++ branches/S2_5/server/srv_main.c Wed Sep 28 07:13:45 2016 @@ -1431,6 +1431,7 @@ conn_set_access(pconn, ALLOW_BASIC, FALSE); } } conn_list_iterate_end; + set_running_game_access_level(); con_puts(C_OK, _("Starting game.")); Modified: branches/S2_5/server/stdinhand.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/stdinhand.c?rev=33934&r1=33933&r2=33934&view=diff == --- branches/S2_5/server/stdinhand.c(original) +++ branches/S2_5/server/stdinhand.cWed Sep 28 07:13:45 2016 @@ -1620,6 +1620,15 @@ return TRUE; } +/** + Adjust default command level on game start. +**/ +void set_running_game_access_level(void) +{ + if (default_access_level > ALLOW_BASIC) { +default_access_level = ALLOW_BASIC; + } +} /** Returns possible parameters for the commands that take server options Modified: branches/S2_5/server/stdinhand.h URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/stdinhand.h?rev=33934&r1=33933&r2=33934&view=diff == --- branches/S2_5/server/stdinhand.h(original) +++ branches/S2_5/server/stdinhand.hWed Sep 28 07:13:45 2016 @@ -1,4 +1,4 @@ -/** +/*** Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -54,7 +54,7 @@ bool start_command(struct connection *caller, bool check, bool notify); void toggle_ai_player_direct(struct connection *caller, -struct player *pplayer); + struct player *pplayer); /* for sernet.c in initing a new connection */ enum cmdlevel access_level_for_next_connection(void); @@ -63,6 +63,8 @@ bool conn_is_kicked(struct connection *pconn, int *time_remaining); +void set_running_game_access_level(void); + #ifdef HAVE_LIBREADLINE char **freeciv_completion(const char *text, int start, int end); #endif ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r33932 - in /trunk/server: srv_main.c stdinhand.c stdinhand.h
Author: cazfi Date: Wed Sep 28 07:13:30 2016 New Revision: 33932 URL: http://svn.gna.org/viewcvs/freeciv?rev=33932&view=rev Log: Lower default cmdlevel to basic on game start. Reported by taka See bug #24774 Modified: trunk/server/srv_main.c trunk/server/stdinhand.c trunk/server/stdinhand.h Modified: trunk/server/srv_main.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/srv_main.c?rev=33932&r1=33931&r2=33932&view=diff == --- trunk/server/srv_main.c (original) +++ trunk/server/srv_main.c Wed Sep 28 07:13:30 2016 @@ -1541,6 +1541,7 @@ conn_set_access(pconn, ALLOW_BASIC, FALSE); } } conn_list_iterate_end; + set_running_game_access_level(); con_puts(C_OK, _("Starting game.")); Modified: trunk/server/stdinhand.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/stdinhand.c?rev=33932&r1=33931&r2=33932&view=diff == --- trunk/server/stdinhand.c(original) +++ trunk/server/stdinhand.cWed Sep 28 07:13:30 2016 @@ -1546,6 +1546,17 @@ return TRUE; } +/** + Adjust default command level on game start. +**/ +void set_running_game_access_level(void) +{ + if (default_access_level > ALLOW_BASIC) { +notify_conn(NULL, NULL, E_SETTING, ftc_server, +_("Default cmdlevel lowered to 'basic' on game start.")); +default_access_level = ALLOW_BASIC; + } +} /** Returns possible parameters for the commands that take server options Modified: trunk/server/stdinhand.h URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/stdinhand.h?rev=33932&r1=33931&r2=33932&view=diff == --- trunk/server/stdinhand.h(original) +++ trunk/server/stdinhand.hWed Sep 28 07:13:30 2016 @@ -1,4 +1,4 @@ -/** +/*** Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -53,7 +53,7 @@ bool start_command(struct connection *caller, bool check, bool notify); void toggle_ai_player_direct(struct connection *caller, -struct player *pplayer); + struct player *pplayer); /* for sernet.c in initing a new connection */ enum cmdlevel access_level_for_next_connection(void); @@ -62,6 +62,8 @@ bool conn_is_kicked(struct connection *pconn, int *time_remaining); +void set_running_game_access_level(void); + #ifdef FREECIV_HAVE_LIBREADLINE char **freeciv_completion(const char *text, int start, int end); #endif ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r33933 - in /branches/S2_6/server: srv_main.c stdinhand.c stdinhand.h
Author: cazfi Date: Wed Sep 28 07:13:38 2016 New Revision: 33933 URL: http://svn.gna.org/viewcvs/freeciv?rev=33933&view=rev Log: Lower default cmdlevel to basic on game start. Reported by taka See bug #24774 Modified: branches/S2_6/server/srv_main.c branches/S2_6/server/stdinhand.c branches/S2_6/server/stdinhand.h Modified: branches/S2_6/server/srv_main.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/srv_main.c?rev=33933&r1=33932&r2=33933&view=diff == --- branches/S2_6/server/srv_main.c (original) +++ branches/S2_6/server/srv_main.c Wed Sep 28 07:13:38 2016 @@ -1583,6 +1583,7 @@ conn_set_access(pconn, ALLOW_BASIC, FALSE); } } conn_list_iterate_end; + set_running_game_access_level(); con_puts(C_OK, _("Starting game.")); Modified: branches/S2_6/server/stdinhand.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/stdinhand.c?rev=33933&r1=33932&r2=33933&view=diff == --- branches/S2_6/server/stdinhand.c(original) +++ branches/S2_6/server/stdinhand.cWed Sep 28 07:13:38 2016 @@ -1538,6 +1538,17 @@ return TRUE; } +/** + Adjust default command level on game start. +**/ +void set_running_game_access_level(void) +{ + if (default_access_level > ALLOW_BASIC) { +notify_conn(NULL, NULL, E_SETTING, ftc_server, +_("Default cmdlevel lowered to 'basic' on game start.")); +default_access_level = ALLOW_BASIC; + } +} /** Returns possible parameters for the commands that take server options Modified: branches/S2_6/server/stdinhand.h URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/stdinhand.h?rev=33933&r1=33932&r2=33933&view=diff == --- branches/S2_6/server/stdinhand.h(original) +++ branches/S2_6/server/stdinhand.hWed Sep 28 07:13:38 2016 @@ -1,4 +1,4 @@ -/** +/*** Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -53,7 +53,7 @@ bool start_command(struct connection *caller, bool check, bool notify); void toggle_ai_player_direct(struct connection *caller, -struct player *pplayer); + struct player *pplayer); /* for sernet.c in initing a new connection */ enum cmdlevel access_level_for_next_connection(void); @@ -62,6 +62,8 @@ bool conn_is_kicked(struct connection *pconn, int *time_remaining); +void set_running_game_access_level(void); + #ifdef FREECIV_HAVE_LIBREADLINE char **freeciv_completion(const char *text, int start, int end); #endif ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r33930 - /branches/S2_6/client/mapview_common.c
Author: cazfi Date: Wed Sep 28 06:54:54 2016 New Revision: 33930 URL: http://svn.gna.org/viewcvs/freeciv?rev=33930&view=rev Log: Made mouse clicks to target correct tiles in hex topologies. Reported by Jacob Nevins See bug #24031 Modified: branches/S2_6/client/mapview_common.c Modified: branches/S2_6/client/mapview_common.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/mapview_common.c?rev=33930&r1=33929&r2=33930&view=diff == --- branches/S2_6/client/mapview_common.c (original) +++ branches/S2_6/client/mapview_common.c Wed Sep 28 06:54:54 2016 @@ -250,8 +250,8 @@ fc_assert(tileset_is_isometric(t)); -x = gui_x / W; -y = gui_y / H; +x = DIVIDE((int)gui_x, (int)W); +y = DIVIDE((int)gui_y, (int)H); dx = gui_x - x * W; dy = gui_y - y * H; fc_assert(dx >= 0 && dx < W); ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r33929 - /trunk/client/mapview_common.c
Author: cazfi Date: Wed Sep 28 06:54:47 2016 New Revision: 33929 URL: http://svn.gna.org/viewcvs/freeciv?rev=33929&view=rev Log: Made mouse clicks to target correct tiles in hex topologies. Reported by Jacob Nevins See bug #24031 Modified: trunk/client/mapview_common.c Modified: trunk/client/mapview_common.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/mapview_common.c?rev=33929&r1=33928&r2=33929&view=diff == --- trunk/client/mapview_common.c (original) +++ trunk/client/mapview_common.c Wed Sep 28 06:54:47 2016 @@ -250,8 +250,8 @@ fc_assert(tileset_is_isometric(t)); -x = gui_x / W; -y = gui_y / H; +x = DIVIDE((int)gui_x, (int)W); +y = DIVIDE((int)gui_y, (int)H); dx = gui_x - x * W; dy = gui_y - y * H; fc_assert(dx >= 0 && dx < W); ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r33928 - /branches/S2_5/server/srv_main.c
Author: cazfi Date: Wed Sep 28 06:42:21 2016 New Revision: 33928 URL: http://svn.gna.org/viewcvs/freeciv?rev=33928&view=rev Log: Made one to really get random nation, if one reverts to random nation after already selecting specific nation. Reported by Jacob Nevins See bug #24170 Modified: branches/S2_5/server/srv_main.c Modified: branches/S2_5/server/srv_main.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/srv_main.c?rev=33928&r1=33927&r2=33928&view=diff == --- branches/S2_5/server/srv_main.c (original) +++ branches/S2_5/server/srv_main.c Wed Sep 28 06:42:21 2016 @@ -1925,6 +1925,11 @@ pplayer->is_male = is_male; pplayer->city_style = city_style; + } else if (name[0] == '\0') { +char message[1024]; + +server_player_set_name_full(pc, pplayer, NULL, ANON_PLAYER_NAME, +message, sizeof(message)); } (void) player_set_nation(pplayer, new_nation); ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r33926 - /trunk/server/srv_main.c
Author: cazfi Date: Wed Sep 28 06:42:05 2016 New Revision: 33926 URL: http://svn.gna.org/viewcvs/freeciv?rev=33926&view=rev Log: Made one to really get random nation, if one reverts to random nation after already selecting specific nation. Reported by Jacob Nevins See bug #24170 Modified: trunk/server/srv_main.c Modified: trunk/server/srv_main.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/srv_main.c?rev=33926&r1=33925&r2=33926&view=diff == --- trunk/server/srv_main.c (original) +++ trunk/server/srv_main.c Wed Sep 28 06:42:05 2016 @@ -2058,6 +2058,11 @@ pplayer->is_male = is_male; pplayer->style = style_by_number(style); + } else if (name[0] == '\0') { +char message[1024]; + +server_player_set_name_full(pc, pplayer, NULL, ANON_PLAYER_NAME, +message, sizeof(message)); } (void) player_set_nation(pplayer, new_nation); ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r33927 - /branches/S2_6/server/srv_main.c
Author: cazfi Date: Wed Sep 28 06:42:13 2016 New Revision: 33927 URL: http://svn.gna.org/viewcvs/freeciv?rev=33927&view=rev Log: Made one to really get random nation, if one reverts to random nation after already selecting specific nation. Reported by Jacob Nevins See bug #24170 Modified: branches/S2_6/server/srv_main.c Modified: branches/S2_6/server/srv_main.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/srv_main.c?rev=33927&r1=33926&r2=33927&view=diff == --- branches/S2_6/server/srv_main.c (original) +++ branches/S2_6/server/srv_main.c Wed Sep 28 06:42:13 2016 @@ -2100,6 +2100,11 @@ pplayer->is_male = is_male; pplayer->style = style_by_number(style); + } else if (name[0] == '\0') { +char message[1024]; + +server_player_set_name_full(pc, pplayer, NULL, ANON_PLAYER_NAME, +message, sizeof(message)); } (void) player_set_nation(pplayer, new_nation); ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r33924 - /branches/S2_6/ai/default/aisettler.c
Author: cazfi Date: Wed Sep 28 06:33:42 2016 New Revision: 33924 URL: http://svn.gna.org/viewcvs/freeciv?rev=33924&view=rev Log: Close default ai data phase after calling ai settler reset for a newly created barbarian player. Reported by Frank See bug #24545 Modified: branches/S2_6/ai/default/aisettler.c Modified: branches/S2_6/ai/default/aisettler.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/ai/default/aisettler.c?rev=33924&r1=33923&r2=33924&view=diff == --- branches/S2_6/ai/default/aisettler.c(original) +++ branches/S2_6/ai/default/aisettler.cWed Sep 28 06:33:42 2016 @@ -1186,7 +1186,8 @@ **/ void dai_auto_settler_reset(struct ai_type *ait, struct player *pplayer) { - struct ai_plr *ai = dai_plr_data_get(ait, pplayer, NULL); + bool close; + struct ai_plr *ai = dai_plr_data_get(ait, pplayer, &close); fc_assert_ret(ai != NULL); fc_assert_ret(ai->settler != NULL); @@ -1205,6 +1206,10 @@ #endif /* DEBUG */ tile_data_cache_hash_clear(ai->settler->tdc_hash); + + if (close) { +dai_data_phase_finished(ait, pplayer); + } } /** ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r33925 - /branches/S2_5/ai/default/aisettler.c
Author: cazfi Date: Wed Sep 28 06:33:49 2016 New Revision: 33925 URL: http://svn.gna.org/viewcvs/freeciv?rev=33925&view=rev Log: Close default ai data phase after calling ai settler reset for a newly created barbarian player. Reported by Frank See bug #24545 Modified: branches/S2_5/ai/default/aisettler.c Modified: branches/S2_5/ai/default/aisettler.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/ai/default/aisettler.c?rev=33925&r1=33924&r2=33925&view=diff == --- branches/S2_5/ai/default/aisettler.c(original) +++ branches/S2_5/ai/default/aisettler.cWed Sep 28 06:33:49 2016 @@ -1183,7 +1183,8 @@ **/ void dai_auto_settler_reset(struct ai_type *ait, struct player *pplayer) { - struct ai_plr *ai = dai_plr_data_get(ait, pplayer, NULL); + bool close; + struct ai_plr *ai = dai_plr_data_get(ait, pplayer, &close); fc_assert_ret(ai != NULL); fc_assert_ret(ai->settler != NULL); @@ -1202,6 +1203,10 @@ #endif /* DEBUG */ tile_data_cache_hash_clear(ai->settler->tdc_hash); + + if (close) { +dai_data_phase_finished(ait, pplayer); + } } /** ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r33923 - /trunk/ai/default/aisettler.c
Author: cazfi Date: Wed Sep 28 06:33:36 2016 New Revision: 33923 URL: http://svn.gna.org/viewcvs/freeciv?rev=33923&view=rev Log: Close default ai data phase after calling ai settler reset for a newly created barbarian player. Reported by Frank See bug #24545 Modified: trunk/ai/default/aisettler.c Modified: trunk/ai/default/aisettler.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/ai/default/aisettler.c?rev=33923&r1=33922&r2=33923&view=diff == --- trunk/ai/default/aisettler.c(original) +++ trunk/ai/default/aisettler.cWed Sep 28 06:33:36 2016 @@ -1186,7 +1186,8 @@ **/ void dai_auto_settler_reset(struct ai_type *ait, struct player *pplayer) { - struct ai_plr *ai = dai_plr_data_get(ait, pplayer, NULL); + bool close; + struct ai_plr *ai = dai_plr_data_get(ait, pplayer, &close); fc_assert_ret(ai != NULL); fc_assert_ret(ai->settler != NULL); @@ -1205,6 +1206,10 @@ #endif /* FREECIV_DEBUG */ tile_data_cache_hash_clear(ai->settler->tdc_hash); + + if (close) { +dai_data_phase_finished(ait, pplayer); + } } /** ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits