Ticket #8272: filezilla.wx9.updated.diff
File filezilla.wx9.updated.diff, 65.2 KB (added by , 10 years ago) |
---|
-
configure.in
diff -r 3ce9d545ef08 -r a823baea47d8 configure.in
a b 95 95 AM_OPTIONS_WXCONFIG 96 96 97 97 MIN_WX_VERSION="2.8.12" 98 WX_CONFIG_CHECK($MIN_WX_VERSION, wxWin=1, , [aui,html,xrc,adv,core,xml,net,base], [--unicode=yes --universal=no])98 AM_PATH_WXCONFIG($MIN_WX_VERSION, wxWin=1, , [aui,xrc,adv,core,xml,net,base], [--unicode=yes --universal=no]) 99 99 if test "$wxWin" != 1; then 100 100 AC_MSG_ERROR([ 101 101 wxWidgets must be installed on your system … … 111 111 equivalent variable and wxWidgets version is $MIN_WX_VERSION or above. 112 112 ]) 113 113 fi 114 if test "$wx_config_major_version" -gt "2" || test "$wx_config_minor_version" -gt " 9"; then115 AC_MSG_ERROR([You need to use wxWidgets 2. 9.x to compile this program.])114 if test "$wx_config_major_version" -gt "2" || test "$wx_config_minor_version" -gt "8"; then 115 AC_MSG_ERROR([You need to use wxWidgets 2.8.x to compile this program.]) 116 116 fi 117 117 118 118 # --universal=no doesn't work correctly, it still accepts universal builds. Reject it manually here. -
m4/wxwin.m4
diff -r 3ce9d545ef08 -r a823baea47d8 m4/wxwin.m4
a b 1 dnl ---------------------------------------------------------------------------2 dnl Author: wxWidgets development team,3 dnl Francesco Montorsi,4 dnl Bob McCown (Mac-testing)5 dnl Creation date: 24/11/20016 dnl RCS-ID: $Id$7 dnl ---------------------------------------------------------------------------8 9 dnl ===========================================================================10 dnl Table of Contents of this macro file:11 dnl -------------------------------------12 dnl13 dnl SECTION A: wxWidgets main macros14 dnl - WX_CONFIG_OPTIONS15 dnl - WX_CONFIG_CHECK16 dnl - WXRC_CHECK17 dnl - WX_STANDARD_OPTIONS18 dnl - WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS19 dnl - WX_DETECT_STANDARD_OPTION_VALUES20 dnl21 dnl SECTION B: wxWidgets-related utilities22 dnl - WX_LIKE_LIBNAME23 dnl - WX_ARG_ENABLE_YESNOAUTO24 dnl - WX_ARG_WITH_YESNOAUTO25 dnl26 dnl SECTION C: messages to the user27 dnl - WX_STANDARD_OPTIONS_SUMMARY_MSG28 dnl - WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN29 dnl - WX_STANDARD_OPTIONS_SUMMARY_MSG_END30 dnl - WX_BOOLOPT_SUMMARY31 dnl32 dnl The special "WX_DEBUG_CONFIGURE" variable can be set to 1 to enable extra33 dnl debug output on stdout from these macros.34 dnl ===========================================================================35 36 37 1 dnl --------------------------------------------------------------------------- 38 2 dnl Macros for wxWidgets detection. Typically used in configure.in as: 39 3 dnl 40 4 dnl AC_ARG_ENABLE(...) 41 5 dnl AC_ARG_WITH(...) 42 6 dnl ... 43 dnl WX_CONFIG_OPTIONS7 dnl AM_OPTIONS_WXCONFIG 44 8 dnl ... 45 9 dnl ... 46 dnl WX_CONFIG_CHECK([2.6.0], [wxWin=1])10 dnl AM_PATH_WXCONFIG(2.6.0, wxWin=1) 47 11 dnl if test "$wxWin" != 1; then 48 12 dnl AC_MSG_ERROR([ 49 13 dnl wxWidgets must be installed on your system … … 60 24 dnl CFLAGS="$CFLAGS $WX_CFLAGS_ONLY" 61 25 dnl 62 26 dnl LIBS="$LIBS $WX_LIBS" 63 dnl64 dnl If you want to support standard --enable-debug/unicode/shared options, you65 dnl may do the following:66 dnl67 dnl ...68 dnl AC_CANONICAL_SYSTEM69 dnl70 dnl # define configure options71 dnl WX_CONFIG_OPTIONS72 dnl WX_STANDARD_OPTIONS([debug,unicode,shared,toolkit,wxshared])73 dnl74 dnl # basic configure checks75 dnl ...76 dnl77 dnl # we want to always have DEBUG==WX_DEBUG and UNICODE==WX_UNICODE78 dnl WX_DEBUG=$DEBUG79 dnl WX_UNICODE=$UNICODE80 dnl81 dnl WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS82 dnl WX_CONFIG_CHECK([2.8.0], [wxWin=1],,[html,core,net,base],[$WXCONFIG_FLAGS])83 dnl WX_DETECT_STANDARD_OPTION_VALUES84 dnl85 dnl # write the output files86 dnl AC_CONFIG_FILES([Makefile ...])87 dnl AC_OUTPUT88 dnl89 dnl # optional: just to show a message to the user90 dnl WX_STANDARD_OPTIONS_SUMMARY_MSG91 dnl92 27 dnl --------------------------------------------------------------------------- 93 28 94 95 29 dnl --------------------------------------------------------------------------- 96 dnl WX_CONFIG_OPTIONS30 dnl AM_OPTIONS_WXCONFIG 97 31 dnl 98 32 dnl adds support for --wx-prefix, --wx-exec-prefix, --with-wxdir and 99 33 dnl --wx-config command line options 100 34 dnl --------------------------------------------------------------------------- 101 35 102 AC_DEFUN([ WX_CONFIG_OPTIONS],36 AC_DEFUN([AM_OPTIONS_WXCONFIG], 103 37 [ 104 38 AC_ARG_WITH(wxdir, 105 39 [ --with-wxdir=PATH Use uninstalled version of wxWidgets in PATH], … … 142 76 ]) 143 77 144 78 dnl --------------------------------------------------------------------------- 145 dnl WX_CONFIG_CHECK(VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND79 dnl AM_PATH_WXCONFIG(VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND 146 80 dnl [, WX-LIBS [, ADDITIONAL-WX-CONFIG-FLAGS]]]]) 147 81 dnl 148 82 dnl Test for wxWidgets, and define WX_C*FLAGS, WX_LIBS and WX_LIBS_STATIC … … 152 86 dnl case the macro won't even waste time on tests for its existence. 153 87 dnl 154 88 dnl Optional WX-LIBS argument contains comma- or space-separated list of 155 dnl wxWidgets libraries to link against . If it is not specified then WX_LIBS156 dnl and WX_LIBS_STATIC will contain flags to link with all of the core157 dnl wxWidgets libraries.89 dnl wxWidgets libraries to link against (it may include contrib libraries). If 90 dnl it is not specified then WX_LIBS and WX_LIBS_STATIC will contain flags to 91 dnl link with all of the core wxWidgets libraries. 158 92 dnl 159 93 dnl Optional ADDITIONAL-WX-CONFIG-FLAGS argument is appended to wx-config 160 94 dnl invocation command in present. It can be used to fine-tune lookup of 161 95 dnl best wxWidgets build available. 162 96 dnl 163 97 dnl Example use: 164 dnl WX_CONFIG_CHECK([2.6.0], [wxWin=1], [wxWin=0], [html,core,net]98 dnl AM_PATH_WXCONFIG([2.6.0], [wxWin=1], [wxWin=0], [html,core,net] 165 99 dnl [--unicode --debug]) 166 100 dnl --------------------------------------------------------------------------- 167 101 168 102 dnl 169 103 dnl Get the cflags and libraries from the wx-config script 170 104 dnl 171 AC_DEFUN([ WX_CONFIG_CHECK],105 AC_DEFUN([AM_PATH_WXCONFIG], 172 106 [ 173 107 dnl do we have wx-config name: it can be wx-config or wxd-config or ... 174 108 if test x${WX_CONFIG_NAME+set} != xset ; then … … 211 145 AC_MSG_CHECKING([for wxWidgets version >= $min_wx_version ($5)]) 212 146 fi 213 147 214 dnl don't add the libraries ($4) to this variable as this would result in 215 dnl an error when it's used with --version below 216 WX_CONFIG_WITH_ARGS="$WX_CONFIG_PATH $wx_config_args $5" 148 WX_CONFIG_WITH_ARGS="$WX_CONFIG_PATH $wx_config_args $5 $4" 217 149 218 150 WX_VERSION=`$WX_CONFIG_WITH_ARGS --version 2>/dev/null` 219 151 wx_config_major_version=`echo $WX_VERSION | \ … … 235 167 [$wx_requested_micro_version]) 236 168 237 169 if test -n "$wx_ver_ok"; then 170 238 171 AC_MSG_RESULT(yes (version $WX_VERSION)) 239 WX_LIBS=`$WX_CONFIG_WITH_ARGS --libs $4`172 WX_LIBS=`$WX_CONFIG_WITH_ARGS --libs` 240 173 241 174 dnl is this even still appropriate? --static is a real option now 242 175 dnl and WX_CONFIG_WITH_ARGS is likely to contain it if that is 243 176 dnl what the user actually wants, making this redundant at best. 244 177 dnl For now keep it in case anyone actually used it in the past. 245 178 AC_MSG_CHECKING([for wxWidgets static library]) 246 WX_LIBS_STATIC=`$WX_CONFIG_WITH_ARGS --static --libs $42>/dev/null`179 WX_LIBS_STATIC=`$WX_CONFIG_WITH_ARGS --static --libs 2>/dev/null` 247 180 if test "x$WX_LIBS_STATIC" = "x"; then 248 181 AC_MSG_RESULT(no) 249 182 else … … 288 221 289 222 if test "x$wx_has_cppflags" = x ; then 290 223 dnl no choice but to define all flags like CFLAGS 291 WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags $4`224 WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags` 292 225 WX_CPPFLAGS=$WX_CFLAGS 293 226 WX_CXXFLAGS=$WX_CFLAGS 294 227 … … 296 229 WX_CXXFLAGS_ONLY=$WX_CFLAGS 297 230 else 298 231 dnl we have CPPFLAGS included in CFLAGS included in CXXFLAGS 299 WX_CPPFLAGS=`$WX_CONFIG_WITH_ARGS --cppflags $4`300 WX_CXXFLAGS=`$WX_CONFIG_WITH_ARGS --cxxflags $4`301 WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags $4`232 WX_CPPFLAGS=`$WX_CONFIG_WITH_ARGS --cppflags` 233 WX_CXXFLAGS=`$WX_CONFIG_WITH_ARGS --cxxflags` 234 WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags` 302 235 303 236 WX_CFLAGS_ONLY=`echo $WX_CFLAGS | sed "s@^$WX_CPPFLAGS *@@"` 304 237 WX_CXXFLAGS_ONLY=`echo $WX_CXXFLAGS | sed "s@^$WX_CFLAGS *@@"` … … 321 254 WX_LIBS="" 322 255 WX_LIBS_STATIC="" 323 256 WX_RESCOMP="" 324 325 if test ! -z "$5"; then 326 327 wx_error_message=" 328 The configuration you asked for $PACKAGE_NAME requires a wxWidgets 329 build with the following settings: 330 $5 331 but such build is not available. 332 333 To see the wxWidgets builds available on this system, please use 334 'wx-config --list' command. To use the default build, returned by 335 'wx-config --selected-config', use the options with their 'auto' 336 default values." 337 338 fi 339 340 wx_error_message=" 341 The requested wxWidgets build couldn't be found. 342 $wx_error_message 343 344 If you still get this error, then check that 'wx-config' is 345 in path, the directory where wxWidgets libraries are installed 346 (returned by 'wx-config --libs' command) is in LD_LIBRARY_PATH 347 or equivalent variable and wxWidgets version is $1 or above." 348 349 ifelse([$3], , AC_MSG_ERROR([$wx_error_message]), [$3]) 257 ifelse([$3], , :, [$3]) 350 258 351 259 fi 352 260 else … … 371 279 AC_SUBST(WX_LIBS_STATIC) 372 280 AC_SUBST(WX_VERSION) 373 281 AC_SUBST(WX_RESCOMP) 374 375 dnl need to export also WX_VERSION_MINOR and WX_VERSION_MAJOR symbols376 dnl to support wxpresets bakefiles (we export also WX_VERSION_MICRO for completeness):377 WX_VERSION_MAJOR="$wx_config_major_version"378 WX_VERSION_MINOR="$wx_config_minor_version"379 WX_VERSION_MICRO="$wx_config_micro_version"380 AC_SUBST(WX_VERSION_MAJOR)381 AC_SUBST(WX_VERSION_MINOR)382 AC_SUBST(WX_VERSION_MICRO)383 282 ]) 384 283 385 284 dnl --------------------------------------------------------------------------- … … 389 288 dnl AC_ARG_ENABLE(...) 390 289 dnl AC_ARG_WITH(...) 391 290 dnl ... 392 dnl WX_CONFIG_OPTIONS291 dnl AM_OPTIONS_WXCONFIG 393 292 dnl ... 394 dnl WX_CONFIG_CHECK(2.6.0, wxWin=1)293 dnl AM_PATH_WXCONFIG(2.6.0, wxWin=1) 395 294 dnl if test "$wxWin" != 1; then 396 295 dnl AC_MSG_ERROR([ 397 296 dnl wxWidgets must be installed on your system … … 404 303 dnl ]) 405 304 dnl fi 406 305 dnl 407 dnl WXRC_CHECK([HAVE_WXRC=1], [HAVE_WXRC=0])306 dnl AM_PATH_WXRC([HAVE_WXRC=1], [HAVE_WXRC=0]) 408 307 dnl if test "x$HAVE_WXRC" != x1; then 409 308 dnl AC_MSG_ERROR([ 410 309 dnl The wxrc program was not installed or not found. … … 420 319 dnl LDFLAGS="$LDFLAGS $WX_LIBS" 421 320 dnl --------------------------------------------------------------------------- 422 321 322 323 423 324 dnl --------------------------------------------------------------------------- 424 dnl WXRC_CHECK([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])325 dnl AM_PATH_WXRC([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) 425 326 dnl 426 327 dnl Test for wxWidgets' wxrc program for creating either C++, Python or XRS 427 328 dnl resources. The variable WXRC will be set and substituted in the configure 428 329 dnl script and Makefiles. 429 330 dnl 430 331 dnl Example use: 431 dnl WXRC_CHECK([wxrc=1], [wxrc=0])332 dnl AM_PATH_WXRC([wxrc=1], [wxrc=0]) 432 333 dnl --------------------------------------------------------------------------- 433 334 434 335 dnl 435 336 dnl wxrc program from the wx-config script 436 337 dnl 437 AC_DEFUN([ WXRC_CHECK],338 AC_DEFUN([AM_PATH_WXRC], 438 339 [ 439 340 AC_ARG_VAR([WXRC], [Path to wxWidget's wxrc resource compiler]) 440 341 … … 463 364 AC_SUBST(WXRC) 464 365 fi 465 366 ]) 466 467 dnl ---------------------------------------------------------------------------468 dnl WX_LIKE_LIBNAME([output-var] [prefix], [name])469 dnl470 dnl Sets the "output-var" variable to the name of a library named with same471 dnl wxWidgets rule.472 dnl E.g. for output-var=='lib', name=='test', prefix='mine', sets473 dnl the $lib variable to:474 dnl 'mine_gtk2ud_test-2.8'475 dnl if WX_PORT=gtk2, WX_UNICODE=1, WX_DEBUG=1 and WX_RELEASE=28476 dnl ---------------------------------------------------------------------------477 AC_DEFUN([WX_LIKE_LIBNAME],478 [479 wx_temp="$2""_""$WX_PORT"480 481 dnl add the [u][d] string482 if test "$WX_UNICODE" = "1"; then483 wx_temp="$wx_temp""u"484 fi485 if test "$WX_DEBUG" = "1"; then486 wx_temp="$wx_temp""d"487 fi488 489 dnl complete the name of the lib490 wx_temp="$wx_temp""_""$3""-$WX_VERSION_MAJOR.$WX_VERSION_MINOR"491 492 dnl save it in the user's variable493 $1=$wx_temp494 ])495 496 dnl ---------------------------------------------------------------------------497 dnl WX_ARG_ENABLE_YESNOAUTO/WX_ARG_WITH_YESNOAUTO498 dnl499 dnl Two little custom macros which define the ENABLE/WITH configure arguments.500 dnl Macro arguments:501 dnl $1 = the name of the --enable / --with feature502 dnl $2 = the name of the variable associated503 dnl $3 = the description of that feature504 dnl $4 = the default value for that feature505 dnl $5 = additional action to do in case option is given with "yes" value506 dnl ---------------------------------------------------------------------------507 AC_DEFUN([WX_ARG_ENABLE_YESNOAUTO],508 [AC_ARG_ENABLE($1,509 AC_HELP_STRING([--enable-$1], [$3 (default is $4)]),510 [], [enableval="$4"])511 512 dnl Show a message to the user about this option513 AC_MSG_CHECKING([for the --enable-$1 option])514 if test "$enableval" = "yes" ; then515 AC_MSG_RESULT([yes])516 $2=1517 $5518 elif test "$enableval" = "no" ; then519 AC_MSG_RESULT([no])520 $2=0521 elif test "$enableval" = "auto" ; then522 AC_MSG_RESULT([will be automatically detected])523 $2="auto"524 else525 AC_MSG_ERROR([526 Unrecognized option value (allowed values: yes, no, auto)527 ])528 fi529 ])530 531 AC_DEFUN([WX_ARG_WITH_YESNOAUTO],532 [AC_ARG_WITH($1,533 AC_HELP_STRING([--with-$1], [$3 (default is $4)]),534 [], [withval="$4"])535 536 dnl Show a message to the user about this option537 AC_MSG_CHECKING([for the --with-$1 option])538 if test "$withval" = "yes" ; then539 AC_MSG_RESULT([yes])540 $2=1541 $5542 dnl NB: by default we don't allow --with-$1=no option543 dnl since it does not make much sense !544 elif test "$6" = "1" -a "$withval" = "no" ; then545 AC_MSG_RESULT([no])546 $2=0547 elif test "$withval" = "auto" ; then548 AC_MSG_RESULT([will be automatically detected])549 $2="auto"550 else551 AC_MSG_ERROR([552 Unrecognized option value (allowed values: yes, auto)553 ])554 fi555 ])556 557 558 dnl ---------------------------------------------------------------------------559 dnl WX_STANDARD_OPTIONS([options-to-add])560 dnl561 dnl Adds to the configure script one or more of the following options:562 dnl --enable-[debug|unicode|shared|wxshared|wxdebug]563 dnl --with-[gtk|msw|motif|x11|mac|dfb]564 dnl --with-wxversion565 dnl Then checks for their presence and eventually set the DEBUG, UNICODE, SHARED,566 dnl PORT, WX_SHARED, WX_DEBUG, variables to one of the "yes", "no", "auto" values.567 dnl568 dnl Note that e.g. UNICODE != WX_UNICODE; the first is the value of the569 dnl --enable-unicode option (in boolean format) while the second indicates570 dnl if wxWidgets was built in Unicode mode (and still is in boolean format).571 dnl ---------------------------------------------------------------------------572 AC_DEFUN([WX_STANDARD_OPTIONS],573 [574 575 dnl the following lines will expand to WX_ARG_ENABLE_YESNOAUTO calls if and only if576 dnl the $1 argument contains respectively the debug,unicode or shared options.577 578 dnl be careful here not to set debug flag if only "wxdebug" was specified579 ifelse(regexp([$1], [\bdebug]), [-1],,580 [WX_ARG_ENABLE_YESNOAUTO([debug], [DEBUG], [Build in debug mode], [auto])])581 582 ifelse(index([$1], [unicode]), [-1],,583 [WX_ARG_ENABLE_YESNOAUTO([unicode], [UNICODE], [Build in Unicode mode], [auto])])584 585 ifelse(regexp([$1], [\bshared]), [-1],,586 [WX_ARG_ENABLE_YESNOAUTO([shared], [SHARED], [Build as shared library], [auto])])587 588 dnl WX_ARG_WITH_YESNOAUTO cannot be used for --with-toolkit since it's an option589 dnl which must be able to accept the auto|gtk1|gtk2|msw|... values590 ifelse(index([$1], [toolkit]), [-1],,591 [592 AC_ARG_WITH([toolkit],593 AC_HELP_STRING([--with-toolkit],594 [Build against a specific wxWidgets toolkit (default is auto)]),595 [], [withval="auto"])596 597 dnl Show a message to the user about this option598 AC_MSG_CHECKING([for the --with-toolkit option])599 if test "$withval" = "auto" ; then600 AC_MSG_RESULT([will be automatically detected])601 TOOLKIT="auto"602 else603 TOOLKIT="$withval"604 605 dnl PORT must be one of the allowed values606 if test "$TOOLKIT" != "gtk1" -a "$TOOLKIT" != "gtk2" -a \607 "$TOOLKIT" != "msw" -a "$TOOLKIT" != "motif" -a \608 "$TOOLKIT" != "osx_carbon" -a "$TOOLKIT" != "osx_cocoa" -a \609 "$TOOLKIT" != "dfb" -a "$TOOLKIT" != "x11"; then610 AC_MSG_ERROR([611 Unrecognized option value (allowed values: auto, gtk1, gtk2, msw, motif, osx_carbon, osx_cocoa, dfb, x11)612 ])613 fi614 615 AC_MSG_RESULT([$TOOLKIT])616 fi617 ])618 619 dnl ****** IMPORTANT *******620 dnl Unlike for the UNICODE setting, you can build your program in621 dnl shared mode against a static build of wxWidgets. Thus we have the622 dnl following option which allows these mixtures. E.g.623 dnl624 dnl ./configure --disable-shared --with-wxshared625 dnl626 dnl will build your library in static mode against the first available627 dnl shared build of wxWidgets.628 dnl629 dnl Note that's not possible to do the viceversa:630 dnl631 dnl ./configure --enable-shared --without-wxshared632 dnl633 dnl Doing so you would try to build your library in shared mode against a static634 dnl build of wxWidgets. This is not possible (you would mix PIC and non PIC code) !635 dnl A check for this combination of options is in WX_DETECT_STANDARD_OPTION_VALUES636 dnl (where we know what 'auto' should be expanded to).637 dnl638 dnl If you try to build something in ANSI mode against a UNICODE build639 dnl of wxWidgets or in RELEASE mode against a DEBUG build of wxWidgets,640 dnl then at best you'll get ton of linking errors !641 dnl ************************642 643 ifelse(index([$1], [wxshared]), [-1],,644 [645 WX_ARG_WITH_YESNOAUTO(646 [wxshared], [WX_SHARED],647 [Force building against a shared build of wxWidgets, even if --disable-shared is given],648 [auto], [], [1])649 ])650 651 dnl Just like for SHARED and WX_SHARED it may happen that some adventurous652 dnl peoples will want to mix a wxWidgets release build with a debug build of653 dnl his app/lib. So, we have both DEBUG and WX_DEBUG variables.654 ifelse(index([$1], [wxdebug]), [-1],,655 [656 WX_ARG_WITH_YESNOAUTO(657 [wxdebug], [WX_DEBUG],658 [Force building against a debug build of wxWidgets, even if --disable-debug is given],659 [auto], [], [1])660 ])661 662 dnl WX_ARG_WITH_YESNOAUTO cannot be used for --with-wxversion since it's an option663 dnl which accepts the "auto|2.6|2.7|2.8|2.9|3.0" etc etc values664 ifelse(index([$1], [wxversion]), [-1],,665 [666 AC_ARG_WITH([wxversion],667 AC_HELP_STRING([--with-wxversion],668 [Build against a specific version of wxWidgets (default is auto)]),669 [], [withval="auto"])670 671 dnl Show a message to the user about this option672 AC_MSG_CHECKING([for the --with-wxversion option])673 if test "$withval" = "auto" ; then674 AC_MSG_RESULT([will be automatically detected])675 WX_RELEASE="auto"676 else677 678 wx_requested_major_version=`echo $withval | \679 sed 's/\([[0-9]]*\).\([[0-9]]*\).*/\1/'`680 wx_requested_minor_version=`echo $withval | \681 sed 's/\([[0-9]]*\).\([[0-9]]*\).*/\2/'`682 683 dnl both vars above must be exactly 1 digit684 if test "${#wx_requested_major_version}" != "1" -o \685 "${#wx_requested_minor_version}" != "1" ; then686 AC_MSG_ERROR([687 Unrecognized option value (allowed values: auto, 2.6, 2.7, 2.8, 2.9, 3.0)688 ])689 fi690 691 WX_RELEASE="$wx_requested_major_version"".""$wx_requested_minor_version"692 AC_MSG_RESULT([$WX_RELEASE])693 fi694 ])695 696 if test "$WX_DEBUG_CONFIGURE" = "1"; then697 echo "[[dbg]] DEBUG: $DEBUG, WX_DEBUG: $WX_DEBUG"698 echo "[[dbg]] UNICODE: $UNICODE, WX_UNICODE: $WX_UNICODE"699 echo "[[dbg]] SHARED: $SHARED, WX_SHARED: $WX_SHARED"700 echo "[[dbg]] TOOLKIT: $TOOLKIT, WX_TOOLKIT: $WX_TOOLKIT"701 echo "[[dbg]] VERSION: $VERSION, WX_RELEASE: $WX_RELEASE"702 fi703 ])704 705 706 dnl ---------------------------------------------------------------------------707 dnl WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS708 dnl709 dnl Sets the WXCONFIG_FLAGS string using the SHARED,DEBUG,UNICODE variable values710 dnl which are different from "auto".711 dnl Thus this macro needs to be called only once all options have been set.712 dnl ---------------------------------------------------------------------------713 AC_DEFUN([WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS],714 [715 if test "$WX_SHARED" = "1" ; then716 WXCONFIG_FLAGS="--static=no "717 elif test "$WX_SHARED" = "0" ; then718 WXCONFIG_FLAGS="--static=yes "719 fi720 721 if test "$WX_DEBUG" = "1" ; then722 WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--debug=yes "723 elif test "$WX_DEBUG" = "0" ; then724 WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--debug=no "725 fi726 727 dnl The user should have set WX_UNICODE=UNICODE728 if test "$WX_UNICODE" = "1" ; then729 WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--unicode=yes "730 elif test "$WX_UNICODE" = "0" ; then731 WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--unicode=no "732 fi733 734 if test "$TOOLKIT" != "auto" ; then735 WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--toolkit=$TOOLKIT "736 fi737 738 if test "$WX_RELEASE" != "auto" ; then739 WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--version=$WX_RELEASE "740 fi741 742 dnl strip out the last space of the string743 WXCONFIG_FLAGS=${WXCONFIG_FLAGS% }744 745 if test "$WX_DEBUG_CONFIGURE" = "1"; then746 echo "[[dbg]] WXCONFIG_FLAGS: $WXCONFIG_FLAGS"747 fi748 ])749 750 751 dnl ---------------------------------------------------------------------------752 dnl _WX_SELECTEDCONFIG_CHECKFOR([RESULTVAR], [STRING], [MSG]753 dnl [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])754 dnl755 dnl Outputs the given MSG. Then searches the given STRING in the wxWidgets756 dnl additional CPP flags and put the result of the search in WX_$RESULTVAR757 dnl also adding the "yes" or "no" message result to MSG.758 dnl ---------------------------------------------------------------------------759 AC_DEFUN([_WX_SELECTEDCONFIG_CHECKFOR],760 [761 if test "$$1" = "auto" ; then762 763 dnl The user does not have particular preferences for this option;764 dnl so we will detect the wxWidgets relative build setting and use it765 AC_MSG_CHECKING([$3])766 767 dnl set WX_$1 variable to 1 if the $WX_SELECTEDCONFIG contains the $2768 dnl string or to 0 otherwise.769 dnl NOTE: 'expr match STRING REGEXP' cannot be used since on Mac it770 dnl doesn't work; we use 'expr STRING : REGEXP' instead771 WX_$1=$(expr "$WX_SELECTEDCONFIG" : ".*$2.*")772 773 if test "$WX_$1" != "0"; then774 WX_$1=1775 AC_MSG_RESULT([yes])776 ifelse([$4], , :, [$4])777 else778 WX_$1=0779 AC_MSG_RESULT([no])780 ifelse([$5], , :, [$5])781 fi782 else783 784 dnl Use the setting given by the user785 WX_$1=$$1786 fi787 ])788 789 dnl ---------------------------------------------------------------------------790 dnl WX_DETECT_STANDARD_OPTION_VALUES791 dnl792 dnl Detects the values of the following variables:793 dnl 1) WX_RELEASE794 dnl 2) WX_UNICODE795 dnl 3) WX_DEBUG796 dnl 4) WX_SHARED (and also WX_STATIC)797 dnl 5) WX_PORT798 dnl from the previously selected wxWidgets build; this macro in fact must be799 dnl called *after* calling the WX_CONFIG_CHECK macro.800 dnl801 dnl Note that the WX_VERSION_MAJOR, WX_VERSION_MINOR symbols are already set802 dnl by WX_CONFIG_CHECK macro803 dnl ---------------------------------------------------------------------------804 AC_DEFUN([WX_DETECT_STANDARD_OPTION_VALUES],805 [806 dnl IMPORTANT: WX_VERSION contains all three major.minor.micro digits,807 dnl while WX_RELEASE only the major.minor ones.808 WX_RELEASE="$WX_VERSION_MAJOR""$WX_VERSION_MINOR"809 if test $WX_RELEASE -lt 26 ; then810 811 AC_MSG_ERROR([812 Cannot detect the wxWidgets configuration for the selected wxWidgets build813 since its version is $WX_VERSION < 2.6.0; please install a newer814 version of wxWidgets.815 ])816 fi817 818 dnl The wx-config we are using understands the "--selected_config"819 dnl option which returns an easy-parseable string !820 WX_SELECTEDCONFIG=$($WX_CONFIG_WITH_ARGS --selected_config)821 822 if test "$WX_DEBUG_CONFIGURE" = "1"; then823 echo "[[dbg]] Using wx-config --selected-config"824 echo "[[dbg]] WX_SELECTEDCONFIG: $WX_SELECTEDCONFIG"825 fi826 827 828 dnl we could test directly for WX_SHARED with a line like:829 dnl _WX_SELECTEDCONFIG_CHECKFOR([SHARED], [shared],830 dnl [if wxWidgets was built in SHARED mode])831 dnl but wx-config --selected-config DOES NOT outputs the 'shared'832 dnl word when wx was built in shared mode; it rather outputs the833 dnl 'static' word when built in static mode.834 if test $WX_SHARED = "1"; then835 STATIC=0836 elif test $WX_SHARED = "0"; then837 STATIC=1838 elif test $WX_SHARED = "auto"; then839 STATIC="auto"840 fi841 842 dnl Now set the WX_UNICODE, WX_DEBUG, WX_STATIC variables843 _WX_SELECTEDCONFIG_CHECKFOR([UNICODE], [unicode],844 [if wxWidgets was built with UNICODE enabled])845 _WX_SELECTEDCONFIG_CHECKFOR([DEBUG], [debug],846 [if wxWidgets was built in DEBUG mode])847 _WX_SELECTEDCONFIG_CHECKFOR([STATIC], [static],848 [if wxWidgets was built in STATIC mode])849 850 dnl init WX_SHARED from WX_STATIC851 if test "$WX_STATIC" != "0"; then852 WX_SHARED=0853 else854 WX_SHARED=1855 fi856 857 AC_SUBST(WX_UNICODE)858 AC_SUBST(WX_DEBUG)859 AC_SUBST(WX_SHARED)860 861 dnl detect the WX_PORT to use862 if test "$TOOLKIT" = "auto" ; then863 864 dnl The user does not have particular preferences for this option;865 dnl so we will detect the wxWidgets relative build setting and use it866 AC_MSG_CHECKING([which wxWidgets toolkit was selected])867 868 WX_GTKPORT1=$(expr "$WX_SELECTEDCONFIG" : ".*gtk1.*")869 WX_GTKPORT2=$(expr "$WX_SELECTEDCONFIG" : ".*gtk2.*")870 WX_MSWPORT=$(expr "$WX_SELECTEDCONFIG" : ".*msw.*")871 WX_MOTIFPORT=$(expr "$WX_SELECTEDCONFIG" : ".*motif.*")872 WX_OSXCOCOAPORT=$(expr "$WX_SELECTEDCONFIG" : ".*osx_cocoa.*")873 WX_OSXCARBONPORT=$(expr "$WX_SELECTEDCONFIG" : ".*osx_carbon.*")874 WX_X11PORT=$(expr "$WX_SELECTEDCONFIG" : ".*x11.*")875 WX_DFBPORT=$(expr "$WX_SELECTEDCONFIG" : ".*dfb.*")876 877 WX_PORT="unknown"878 if test "$WX_GTKPORT1" != "0"; then WX_PORT="gtk1"; fi879 if test "$WX_GTKPORT2" != "0"; then WX_PORT="gtk2"; fi880 if test "$WX_MSWPORT" != "0"; then WX_PORT="msw"; fi881 if test "$WX_MOTIFPORT" != "0"; then WX_PORT="motif"; fi882 if test "$WX_OSXCOCOAPORT" != "0"; then WX_PORT="osx_cocoa"; fi883 if test "$WX_OSXCARBONPORT" != "0"; then WX_PORT="osx_carbon"; fi884 if test "$WX_X11PORT" != "0"; then WX_PORT="x11"; fi885 if test "$WX_DFBPORT" != "0"; then WX_PORT="dfb"; fi886 887 dnl NOTE: backward-compatible check for wx2.8; in wx2.9 the mac888 dnl ports are called 'osx_cocoa' and 'osx_carbon' (see above)889 WX_MACPORT=$(expr "$WX_SELECTEDCONFIG" : ".*mac.*")890 if test "$WX_MACPORT" != "0"; then WX_PORT="mac"; fi891 892 dnl check at least one of the WX_*PORT has been set !893 894 if test "$WX_PORT" = "unknown" ; then895 AC_MSG_ERROR([896 Cannot detect the currently installed wxWidgets port !897 Please check your 'wx-config --cxxflags'...898 ])899 fi900 901 AC_MSG_RESULT([$WX_PORT])902 else903 904 dnl Use the setting given by the user905 if test -z "$TOOLKIT" ; then906 WX_PORT=$TOOLKIT907 else908 dnl try with PORT909 WX_PORT=$PORT910 fi911 fi912 913 AC_SUBST(WX_PORT)914 915 if test "$WX_DEBUG_CONFIGURE" = "1"; then916 echo "[[dbg]] Values of all WX_* options after final detection:"917 echo "[[dbg]] WX_DEBUG: $WX_DEBUG"918 echo "[[dbg]] WX_UNICODE: $WX_UNICODE"919 echo "[[dbg]] WX_SHARED: $WX_SHARED"920 echo "[[dbg]] WX_RELEASE: $WX_RELEASE"921 echo "[[dbg]] WX_PORT: $WX_PORT"922 fi923 924 dnl Avoid problem described in the WX_STANDARD_OPTIONS which happens when925 dnl the user gives the options:926 dnl ./configure --enable-shared --without-wxshared927 dnl or just do928 dnl ./configure --enable-shared929 dnl but there is only a static build of wxWidgets available.930 if test "$WX_SHARED" = "0" -a "$SHARED" = "1"; then931 AC_MSG_ERROR([932 Cannot build shared library against a static build of wxWidgets !933 This error happens because the wxWidgets build which was selected934 has been detected as static while you asked to build $PACKAGE_NAME935 as shared library and this is not possible.936 Use the '--disable-shared' option to build $PACKAGE_NAME937 as static library or '--with-wxshared' to use wxWidgets as shared library.938 ])939 fi940 941 dnl now we can finally update the DEBUG,UNICODE,SHARED options942 dnl to their final values if they were set to 'auto'943 if test "$DEBUG" = "auto"; then944 DEBUG=$WX_DEBUG945 fi946 if test "$UNICODE" = "auto"; then947 UNICODE=$WX_UNICODE948 fi949 if test "$SHARED" = "auto"; then950 SHARED=$WX_SHARED951 fi952 if test "$TOOLKIT" = "auto"; then953 TOOLKIT=$WX_PORT954 fi955 956 dnl in case the user needs a BUILD=debug/release var...957 if test "$DEBUG" = "1"; then958 BUILD="debug"959 elif test "$DEBUG" = "0" -o "$DEBUG" = ""; then960 BUILD="release"961 fi962 963 dnl respect the DEBUG variable adding the optimize/debug flags964 dnl NOTE: the CXXFLAGS are merged together with the CPPFLAGS so we965 dnl don't need to set them, too966 if test "$DEBUG" = "1"; then967 CXXFLAGS="$CXXFLAGS -g -O0"968 CFLAGS="$CFLAGS -g -O0"969 else970 CXXFLAGS="$CXXFLAGS -O2"971 CFLAGS="$CFLAGS -O2"972 fi973 ])974 975 dnl ---------------------------------------------------------------------------976 dnl WX_BOOLOPT_SUMMARY([name of the boolean variable to show summary for],977 dnl [what to print when var is 1],978 dnl [what to print when var is 0])979 dnl980 dnl Prints $2 when variable $1 == 1 and prints $3 when variable $1 == 0.981 dnl This macro mainly exists just to make configure.ac scripts more readable.982 dnl983 dnl NOTE: you need to use the [" my message"] syntax for 2nd and 3rd arguments984 dnl if you want that m4 avoid to throw away the spaces prefixed to the985 dnl argument value.986 dnl ---------------------------------------------------------------------------987 AC_DEFUN([WX_BOOLOPT_SUMMARY],988 [989 if test "x$$1" = "x1" ; then990 echo $2991 elif test "x$$1" = "x0" ; then992 echo $3993 else994 echo "$1 is $$1"995 fi996 ])997 998 dnl ---------------------------------------------------------------------------999 dnl WX_STANDARD_OPTIONS_SUMMARY_MSG1000 dnl1001 dnl Shows a summary message to the user about the WX_* variable contents.1002 dnl This macro is used typically at the end of the configure script.1003 dnl ---------------------------------------------------------------------------1004 AC_DEFUN([WX_STANDARD_OPTIONS_SUMMARY_MSG],1005 [1006 echo1007 echo " The wxWidgets build which will be used by $PACKAGE_NAME $PACKAGE_VERSION"1008 echo " has the following settings:"1009 WX_BOOLOPT_SUMMARY([WX_DEBUG], [" - DEBUG build"], [" - RELEASE build"])1010 WX_BOOLOPT_SUMMARY([WX_UNICODE], [" - UNICODE mode"], [" - ANSI mode"])1011 WX_BOOLOPT_SUMMARY([WX_SHARED], [" - SHARED mode"], [" - STATIC mode"])1012 echo " - VERSION: $WX_VERSION"1013 echo " - PORT: $WX_PORT"1014 ])1015 1016 1017 dnl ---------------------------------------------------------------------------1018 dnl WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN, WX_STANDARD_OPTIONS_SUMMARY_MSG_END1019 dnl1020 dnl Like WX_STANDARD_OPTIONS_SUMMARY_MSG macro but these two macros also gives info1021 dnl about the configuration of the package which used the wxpresets.1022 dnl1023 dnl Typical usage:1024 dnl WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN1025 dnl echo " - Package setting 1: $SETTING1"1026 dnl echo " - Package setting 2: $SETTING1"1027 dnl ...1028 dnl WX_STANDARD_OPTIONS_SUMMARY_MSG_END1029 dnl1030 dnl ---------------------------------------------------------------------------1031 AC_DEFUN([WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN],1032 [1033 echo1034 echo " ----------------------------------------------------------------"1035 echo " Configuration for $PACKAGE_NAME $PACKAGE_VERSION successfully completed."1036 echo " Summary of main configuration settings for $PACKAGE_NAME:"1037 WX_BOOLOPT_SUMMARY([DEBUG], [" - DEBUG build"], [" - RELEASE build"])1038 WX_BOOLOPT_SUMMARY([UNICODE], [" - UNICODE mode"], [" - ANSI mode"])1039 WX_BOOLOPT_SUMMARY([SHARED], [" - SHARED mode"], [" - STATIC mode"])1040 ])1041 1042 AC_DEFUN([WX_STANDARD_OPTIONS_SUMMARY_MSG_END],1043 [1044 WX_STANDARD_OPTIONS_SUMMARY_MSG1045 echo1046 echo " Now, just run make."1047 echo " ----------------------------------------------------------------"1048 echo1049 ])1050 1051 1052 dnl ---------------------------------------------------------------------------1053 dnl Deprecated macro wrappers1054 dnl ---------------------------------------------------------------------------1055 1056 AC_DEFUN([AM_OPTIONS_WXCONFIG], [WX_CONFIG_OPTIONS])1057 AC_DEFUN([AM_PATH_WXCONFIG], [1058 WX_CONFIG_CHECK([$1],[$2],[$3],[$4],[$5])1059 ])1060 AC_DEFUN([AM_PATH_WXRC], [WXRC_CHECK([$1],[$2])]) -
src/engine/local_path.cpp
diff -r 3ce9d545ef08 -r a823baea47d8 src/engine/local_path.cpp
a b 48 48 49 49 wxChar* out; 50 50 wxChar* start; 51 wxStringBuffer* buffer = 0;52 51 if (*in == '\\') 53 52 { 54 53 // possibly UNC … … 60 59 return false; 61 60 } 62 61 63 buffer = new wxStringBuffer(m_path, path.Len() + 2); 64 start = *buffer; 62 start = m_path.GetWriteBuf(path.Len() + 2); 65 63 out = start; 66 64 *out++ = '\\'; 67 65 *out++ = '\\'; … … 79 77 { 80 78 // not a valid UNC path 81 79 *start = 0; 82 delete buffer;80 m_path.UngetWriteBuf( 0 ); 83 81 return false; 84 82 } 85 83 … … 89 87 { 90 88 // Regular path 91 89 92 buffer = new wxStringBuffer(m_path, path.Len() + 2); 93 start = *buffer; 90 start = m_path.GetWriteBuf(path.Len() + 2); 94 91 out = start; 95 92 *out++ = *in++; 96 93 97 94 if (*in++ != ':') 98 95 { 99 96 *start = 0; 100 delete buffer;97 m_path.UngetWriteBuf( 0 ); 101 98 return false; 102 99 } 103 100 *out++ = ':'; 104 101 if (*in != '/' && *in != '\\' && *in) 105 102 { 106 103 *start = 0; 107 delete buffer;104 m_path.UngetWriteBuf( 0 ); 108 105 return false; 109 106 } 110 107 *out++ = path_separator; … … 123 120 return false; 124 121 } 125 122 126 #if wxCHECK_VERSION(2, 9, 0)127 wxStringBuffer* buffer = new wxStringBuffer(m_path, path.Len() + 2);128 wxChar* out = *buffer;129 #else130 123 wxChar* start = m_path.GetWriteBuf(path.Len() + 2); 131 124 wxChar* out = start; 132 #endif133 125 134 126 *out++ = '/'; 135 127 segments.push_back(out); … … 218 210 } 219 211 220 212 *out = 0; 221 #if !wxCHECK_VERSION(2, 9, 0) 213 222 214 m_path.UngetWriteBuf( out - start ); 223 #else 224 if (buffer != 0) { 225 delete buffer; 226 } 227 #endif 215 228 216 ::Coalesce(m_path); 229 217 230 218 return true; -
src/engine/logging.cpp
diff -r 3ce9d545ef08 -r a823baea47d8 src/engine/logging.cpp
a b 51 51 } 52 52 } 53 53 54 #if wxCHECK_VERSION(2, 9, 0)55 void CLogging::LogMessage(MessageType nMessageType, const wxChar *msgFormat, int value1) const56 {57 LogMessage(nMessageType, msgFormat, (const char*)(wxString() << value1).c_str());58 }59 60 void CLogging::LogMessage(MessageType nMessageType, const wxChar *msgFormat, int value1, wxCStrData value2) const61 {62 LogMessage(nMessageType, msgFormat, (const char*)(wxString() << value1).c_str(), value2.AsWChar());63 }64 65 void CLogging::LogMessage(MessageType nMessageType, const wxChar *msgFormat, int value1, wxCStrData value2, wxCStrData value3) const66 {67 LogMessage(nMessageType, msgFormat, (const char*)(wxString() << value1).c_str(), value2.AsWChar(), value3.AsWChar());68 }69 70 void CLogging::LogMessage(MessageType nMessageType, const wxChar *msgFormat, wxCStrData value1) const71 {72 LogMessage(nMessageType, msgFormat, value1.AsWChar());73 }74 75 void CLogging::LogMessage(MessageType nMessageType, const wxChar *msgFormat, wxCStrData value1, wxCStrData value2) const76 {77 LogMessage(nMessageType, msgFormat, value1.AsWChar(), value2.AsWChar());78 }79 80 void CLogging::LogMessage(MessageType nMessageType, const wxChar *msgFormat, wxCStrData value1, wxCStrData value2, wxCStrData value3, wxCStrData value4) const81 {82 LogMessage(nMessageType, msgFormat, value1.AsWChar(), value2.AsWChar(), value3.AsWChar(), value4.AsWChar());83 }84 #endif85 86 54 void CLogging::LogMessage(MessageType nMessageType, const wxChar *msgFormat, ...) const 87 55 { 88 56 InitLogFile(); -
src/engine/logging_private.h
diff -r 3ce9d545ef08 -r a823baea47d8 src/engine/logging_private.h
a b 6 6 public: 7 7 CLogging(CFileZillaEnginePrivate *pEngine); 8 8 virtual ~CLogging(); 9 10 #if wxCHECK_VERSION(2, 9, 0)11 void LogMessage(MessageType nMessageType, const wxChar *msgFormat, int value1) const;12 void LogMessage(MessageType nMessageType, const wxChar *msgFormat, int value1, wxCStrData value2) const;13 void LogMessage(MessageType nMessageType, const wxChar *msgFormat, int value1, wxCStrData value2, wxCStrData value3) const;14 void LogMessage(MessageType nMessageType, const wxChar *msgFormat, wxCStrData value1) const;15 void LogMessage(MessageType nMessageType, const wxChar *msgFormat, wxCStrData value1, wxCStrData value2) const;16 void LogMessage(MessageType nMessageType, const wxChar *msgFormat, wxCStrData value1, wxCStrData value2, wxCStrData value3, wxCStrData value4) const;17 #endif18 9 19 10 void LogMessage(MessageType nMessageType, const wxChar *msgFormat, ...) const; 20 11 void LogMessageRaw(MessageType nMessageType, const wxChar *msg) const; -
src/engine/misc.cpp
diff -r 3ce9d545ef08 -r a823baea47d8 src/engine/misc.cpp
a b 365 365 { 366 366 for (size_t i = 0; i < str.Len(); i++) 367 367 { 368 #if wxCHECK_VERSION(2, 9, 0)369 char c;370 str.GetChar(i).GetAsChar(&c);371 if (c >= 'A' && c <= 'Z')372 {373 c += 32;374 str.SetChar(i, wxUniChar(c));375 }376 #else377 368 wxChar& c = str[i]; 378 369 if (c >= 'A' && c <= 'Z') 379 370 c += 32; 380 #endif381 371 } 382 372 } 383 373 -
src/engine/server.cpp
diff -r 3ce9d545ef08 -r a823baea47d8 src/engine/server.cpp
a b 12 12 }; 13 13 14 14 static const t_protocolInfo protocolInfos[] = { 15 { FTP, _T("ftp"), false, 21, true, _T("FTP - File Transfer Protocol with optional encryption"), true },15 { FTP, _T("ftp"), false, 21, true, wxTRANSLATE("FTP - File Transfer Protocol with optional encryption"), true }, 16 16 { SFTP, _T("sftp"), true, 22, false, _T("SFTP - SSH File Transfer Protocol"), false }, 17 17 { HTTP, _T("http"), true, 80, false, _T("HTTP - Hypertext Transfer Protocol"), true }, 18 { HTTPS, _T("https"), true, 443, true, _T("HTTPS - HTTP over TLS"), true },19 { FTPS, _T("ftps"), true, 990, true, _T("FTPS - FTP over implicit TLS/SSL"), true },20 { FTPES, _T("ftpes"), true, 21, true, _T("FTPES - FTP over explicit TLS/SSL"), true },21 { INSECURE_FTP, _T("ftp"), false, 21, true, _T("FTP - Insecure File Transfer Protocol"), true },18 { HTTPS, _T("https"), true, 443, true, wxTRANSLATE("HTTPS - HTTP over TLS"), true }, 19 { FTPS, _T("ftps"), true, 990, true, wxTRANSLATE("FTPS - FTP over implicit TLS/SSL"), true }, 20 { FTPES, _T("ftpes"), true, 21, true, wxTRANSLATE("FTPES - FTP over explicit TLS/SSL"), true }, 21 { INSECURE_FTP, _T("ftp"), false, 21, true, wxTRANSLATE("FTP - Insecure File Transfer Protocol"), true }, 22 22 { UNKNOWN, _T(""), false, 21, false, _T("") } 23 23 }; 24 24 -
src/engine/serverpath.cpp
diff -r 3ce9d545ef08 -r a823baea47d8 src/engine/serverpath.cpp
a b 276 276 len += iter->Length() + 2 + INTLENGTH; 277 277 278 278 wxString safepath; 279 #if wxCHECK_VERSION(2, 9, 0)280 wxStringBuffer* buffer = new wxStringBuffer(safepath, len);281 wxChar* t = *buffer;282 #else283 279 wxChar* start = safepath.GetWriteBuf(len); 284 280 wxChar* t = start; 285 #endif286 281 287 282 t = fast_sprint_number(t, m_type); 288 283 *(t++) = ' '; … … 304 299 t += iter->size(); 305 300 } 306 301 *t = 0; 307 #if !wxCHECK_VERSION(2, 9, 0) 302 308 303 safepath.UngetWriteBuf( t - start ); 309 #else310 delete buffer;311 #endif312 304 safepath.Shrink(); 313 305 314 306 return safepath; -
src/engine/socket.cpp
diff -r 3ce9d545ef08 -r a823baea47d8 src/engine/socket.cpp
a b 1273 1273 } 1274 1274 } 1275 1275 1276 #define ERRORDECL(c, desc) { c, _T(#c), _T(desc) },1276 #define ERRORDECL(c, desc) { c, _T(#c), wxTRANSLATE(desc) }, 1277 1277 1278 1278 struct Error_table 1279 1279 { -
src/engine/string_coalescer.cpp
diff -r 3ce9d545ef08 -r a823baea47d8 src/engine/string_coalescer.cpp
a b 66 66 { 67 67 // wxString is CoW, yet it doesn't even do this fast pointer 68 68 // comparison in it's less and/or equal operator(s). 69 #if wxCHECK_VERSION(2, 9, 0)70 return lhs == rhs;71 #else72 69 return lhs.c_str() == rhs.c_str() || lhs == rhs; 73 #endif74 70 } 75 71 }; 76 72 -
src/include/libfilezilla.h
diff -r 3ce9d545ef08 -r a823baea47d8 src/include/libfilezilla.h
a b 21 21 #include <wx/datetime.h> 22 22 #include <wx/event.h> 23 23 #include <wx/string.h> 24 #if wxCHECK_VERSION(2, 9, 0)25 #include <wx/translation.h>26 #include <wx/dcclient.h>27 #endif28 24 29 25 #include <list> 30 26 #include <vector> -
src/interface/FileZilla.cpp
diff -r 3ce9d545ef08 -r a823baea47d8 src/interface/FileZilla.cpp
a b 265 265 COptions::Get()->SetOption(OPTION_LANGUAGE, _T("")); 266 266 } 267 267 #else 268 if ( pInfo && !pInfo->Description.IsEmpty())268 if (!pInfo || !SetLocale(pInfo->Language)) 269 269 { 270 270 if (pInfo && pInfo->Description) 271 271 wxMessageBox(wxString::Format(_("Failed to set language to %s (%s), using default system language"), pInfo->Description.c_str(), language.c_str()), _("Failed to change language"), wxICON_EXCLAMATION); … … 803 803 if (!found) 804 804 { 805 805 wxMessageBox(wxString::Format(_("%s could not be found. Without this component of FileZilla, SFTP will not work.\n\nPossible solutions:\n- Make sure %s is in a directory listed in your PATH environment variable.\n- Set the full path to %s in the FZ_FZSFTP environment variable."), program.c_str(), program.c_str(), program.c_str()), 806 _("File not found"), wxICON_ERROR | wxOK);806 _("File not found"), wxICON_ERROR); 807 807 executable.clear(); 808 808 } 809 809 #endif -
src/interface/Mainfrm.cpp
diff -r 3ce9d545ef08 -r a823baea47d8 src/interface/Mainfrm.cpp
a b 754 754 // Do a crude approach: Drop everything unexpected... 755 755 for (unsigned int i = 0; i < version.Len(); i++) 756 756 { 757 #if wxCHECK_VERSION(2, 9, 0)758 char c;759 version.GetChar(i).GetAsChar(&c);760 #else761 757 wxChar& c = version[i]; 762 #endif763 758 if ((version[i] >= '0' && version[i] <= '9') || 764 759 (version[i] >= 'a' && version[i] <= 'z') || 765 760 (version[i] >= 'A' && version[i] <= 'Z') || 766 761 version[i] == '-' || version[i] == '.' || 767 762 version[i] == '_') 768 763 { 769 url .Append(c);764 url += c; 770 765 } 771 766 } 772 767 } … … 784 779 { 785 780 pStatusBar->Show(show); 786 781 wxSizeEvent evt; 787 #if wxCHECK_VERSION(2, 9, 0)788 controls->pLocalListViewPanel->ProcessWindowEvent(evt);789 #else790 782 controls->pLocalListViewPanel->ProcessEvent(evt); 791 #endif792 783 } 793 784 } 794 785 if (controls && controls->pRemoteListViewPanel) … … 798 789 { 799 790 pStatusBar->Show(show); 800 791 wxSizeEvent evt; 801 #if wxCHECK_VERSION(2, 9, 0)802 controls->pRemoteListViewPanel->ProcessWindowEvent(evt);803 #else804 792 controls->pRemoteListViewPanel->ProcessEvent(evt); 805 #endif806 793 } 807 794 } 808 795 } -
src/interface/QueueView.cpp
diff -r 3ce9d545ef08 -r a823baea47d8 src/interface/QueueView.cpp
a b 3419 3419 const wxChar replace = COptions::Get()->GetOption(OPTION_INVALID_CHAR_REPLACE)[0]; 3420 3420 3421 3421 wxString result; 3422 #if wxCHECK_VERSION(2, 9, 0) 3423 wxStringBuffer* buffer = new wxStringBuffer(result, filename.Len() + 1); 3424 wxChar* buf = *buffer; 3425 #else 3422 3426 3423 wxChar* start = result.GetWriteBuf(filename.Len() + 1); 3427 3424 wxChar* buf = start; 3428 #endif3429 3425 3430 3426 const wxChar* p = filename.c_str(); 3431 3427 while (*p) … … 3460 3456 p++; 3461 3457 } 3462 3458 *buf = 0; 3463 #if wxCHECK_VERSION(2, 9, 0) 3464 delete buffer; 3465 #else 3459 3466 3460 result.UngetWriteBuf( buf - start ); 3467 #endif 3461 3468 3462 return result; 3469 3463 } 3470 3464 -
src/interface/RemoteTreeView.cpp
diff -r 3ce9d545ef08 -r a823baea47d8 src/interface/RemoteTreeView.cpp
a b 350 350 SetItemImages(parent, false); 351 351 352 352 #ifndef __WXMSW__ 353 Thaw();353 m_freezeCount--; 354 354 #endif 355 355 if (!modified) 356 356 SafeSelectItem(parent); -
src/interface/StatusView.cpp
diff -r 3ce9d545ef08 -r a823baea47d8 src/interface/StatusView.cpp
a b 58 58 { 59 59 wxWindow* parent = GetParent(); 60 60 event.SetEventObject(parent); 61 parent-> GetEventHandler()->ProcessEvent(event);61 parent->ProcessEvent(event); 62 62 } 63 63 #else 64 64 void OnKeyDown(wxKeyEvent& event) … … 76 76 navEvent.SetDirection(!event.ShiftDown()); 77 77 navEvent.SetFromTab(true); 78 78 navEvent.ResumePropagation(1); 79 parent-> GetEventHandler()->ProcessEvent(navEvent);79 parent->ProcessEvent(navEvent); 80 80 } 81 81 #endif 82 82 }; -
src/interface/aui_notebook_ex.cpp
diff -r 3ce9d545ef08 -r a823baea47d8 src/interface/aui_notebook_ex.cpp
a b 3 3 #include "aui_notebook_ex.h" 4 4 #include <wx/dcmirror.h> 5 5 6 #if wxCHECK_VERSION(2, 9, 0)7 wxColor wxAuiStepColour(const wxColor& c, int ialpha)8 {9 wxColor* result = new wxColor(c);10 result->ChangeLightness(ialpha);11 return *result;12 }13 #else14 6 wxColor wxAuiStepColour(const wxColor& c, int ialpha); 15 #endif16 7 17 8 #ifdef __WXMSW__ 18 9 #define TABCOLOUR wxSYS_COLOUR_3DFACE … … 193 184 } 194 185 } 195 186 187 #ifdef __WXGTK__ 188 virtual GdkWindow* GetGDKWindow() const { return m_original_dc->GetGDKWindow(); } 189 #endif 196 190 protected: 197 191 int m_gradient_called; 198 192 int m_rectangle_called; … … 221 215 virtual wxAuiTabArt* Clone() 222 216 { 223 217 wxAuiTabArtEx *art = new wxAuiTabArtEx(m_pNotebook, m_bottom, m_data); 224 #if wxCHECK_VERSION(2, 9, 0)225 art->SetNormalFont(m_normalFont);226 art->SetSelectedFont(m_selectedFont);227 art->SetMeasuringFont(m_measuringFont);228 #else229 218 art->SetNormalFont(m_normal_font); 230 219 art->SetSelectedFont(m_selected_font); 231 220 art->SetMeasuringFont(m_measuring_font); 232 #endif233 221 return art; 234 222 } 235 223 … … 269 257 int* x_extent) 270 258 { 271 259 #ifndef __WXMAC__ 272 #if wxCHECK_VERSION(2, 9, 0) 273 m_baseColour = wxSystemSettings::GetColour(TABCOLOUR); 274 #else 275 m_baseColour = wxSystemSettings::GetColour(TABCOLOUR); 276 #endif 260 m_base_colour = wxSystemSettings::GetColour(TABCOLOUR); 277 261 #endif 278 262 if (!pane.active) 279 263 { 280 if (m_base Colour.Red() + m_baseColour.Green() + m_baseColour.Blue() >= 384)281 m_base Colour = wxColour( m_baseColour.Red() * 0.95, m_baseColour.Green() * 0.95, m_baseColour.Blue() * 0.95 );264 if (m_base_colour.Red() + m_base_colour.Green() + m_base_colour.Blue() >= 384) 265 m_base_colour = wxColour( m_base_colour.Red() * 0.95, m_base_colour.Green() * 0.95, m_base_colour.Blue() * 0.95 ); 282 266 283 267 dc.SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT)); 284 268 if (m_pNotebook->Highlighted(m_pNotebook->GetPageIndex(pane.window))) … … 286 270 if (!m_fonts_initialized) 287 271 { 288 272 m_fonts_initialized = true; 289 #if wxCHECK_VERSION(2, 9, 0)290 m_original_normal_font = m_normalFont;291 m_highlighted_font = m_normalFont;292 #else293 273 m_original_normal_font = m_normal_font; 294 274 m_highlighted_font = m_normal_font; 295 #endif296 275 m_highlighted_font.SetWeight(wxFONTWEIGHT_BOLD); 297 276 m_highlighted_font.SetStyle(wxFONTSTYLE_ITALIC); 298 277 } 299 #if wxCHECK_VERSION(2, 9, 0)300 m_normalFont = m_highlighted_font;301 #else302 278 m_normal_font = m_highlighted_font; 303 #endif304 279 } 305 280 else if (m_fonts_initialized) 306 #if wxCHECK_VERSION(2, 9, 0)307 m_normalFont = m_original_normal_font;308 #else309 281 m_normal_font = m_original_normal_font; 310 #endif311 282 } 312 #if wxCHECK_VERSION(2, 9, 0) 313 CFilterDC filter_dc(dc, pane.active ? 1 : 0, (m_tabCtrlHeight % 2) != 0, m_bottom); 314 wxAuiGenericTabArt::DrawTab(*((wxDC*)&filter_dc), wnd, pane, in_rect, close_button_state, out_tab_rect, out_button_rect, x_extent); 315 #else 283 316 284 CFilterDC filter_dc(dc, pane.active ? 1 : 0, (m_tab_ctrl_height % 2) != 0, m_bottom); 317 285 wxAuiDefaultTabArt::DrawTab(*((wxDC*)&filter_dc), wnd, pane, in_rect, close_button_state, out_tab_rect, out_button_rect, x_extent); 318 #endif319 286 320 m_base Colour = wxSystemSettings::GetColour(TABCOLOUR);287 m_base_colour = wxSystemSettings::GetColour(TABCOLOUR); 321 288 } 322 289 323 290 virtual void DrawBackground(wxDC& dc, wxWindow* wnd, const wxRect& rect) 324 291 { 325 #if wxCHECK_VERSION(2, 9, 0)326 CFilterDC filter_dc(dc, 2, (m_tabCtrlHeight % 2) != 0, m_bottom);327 wxAuiGenericTabArt::DrawBackground(*((wxDC*)&filter_dc), wnd, rect);328 #else329 292 CFilterDC filter_dc(dc, 2, (m_tab_ctrl_height % 2) != 0, m_bottom); 330 293 wxAuiDefaultTabArt::DrawBackground(*((wxDC*)&filter_dc), wnd, rect); 331 #endif332 294 } 333 295 protected: 334 296 wxAuiNotebookEx* m_pNotebook; -
src/interface/commandqueue.cpp
diff -r 3ce9d545ef08 -r a823baea47d8 src/interface/commandqueue.cpp
a b 289 289 290 290 wxCommandEvent evt(fzEVT_GRANTEXCLUSIVEENGINEACCESS); 291 291 evt.SetId(m_requestId); 292 m_pMainFrame->GetQueue()-> GetEventHandler()->AddPendingEvent(evt);292 m_pMainFrame->GetQueue()->AddPendingEvent(evt); 293 293 } 294 294 295 295 CFileZillaEngine* CCommandQueue::GetEngineExclusive(int requestId) -
src/interface/filezilla.h
diff -r 3ce9d545ef08 -r a823baea47d8 src/interface/filezilla.h
a b 71 71 #include <wx/toolbar.h> 72 72 #include <wx/treectrl.h> 73 73 #include <wx/xrc/xmlres.h> 74 #include <wx/xml/xml.h>75 74 76 75 #endif -
src/interface/import.cpp
diff -r 3ce9d545ef08 -r a823baea47d8 src/interface/import.cpp
a b 146 146 return _T(""); 147 147 int number = (pass[i] - '0') * 100 + 148 148 (pass[i + 1] - '0') * 10 + 149 (pass[i + 2] - '0');149 pass[i + 2] - '0'; 150 150 wxChar c = number ^ key[(i / 3 + pos) % strlen(key)]; 151 151 output += c; 152 152 } -
src/interface/netconfwizard.cpp
diff -r 3ce9d545ef08 -r a823baea47d8 src/interface/netconfwizard.cpp
a b 777 777 wxString hexIP = ip; 778 778 for (unsigned int i = 0; i < hexIP.Length(); i++) 779 779 { 780 #if wxCHECK_VERSION(2, 9, 0)781 char c;782 hexIP.GetChar(i).GetAsChar(&c);783 #else784 780 wxChar& c = hexIP[i]; 785 #endif786 781 if (c == '.') 787 782 c = '-'; 788 783 else -
src/interface/queue.cpp
diff -r 3ce9d545ef08 -r a823baea47d8 src/interface/queue.cpp
a b 1310 1310 } 1311 1311 else 1312 1312 { 1313 if (m_folderScanCount && m_fileCount > 0)1313 if (m_folderScanCount) 1314 1314 str.Printf(m_title + _T(" (0+)"), m_fileCount); 1315 1315 else 1316 1316 str = m_title; … … 1442 1442 void CQueueViewBase::OnNavigationKey(wxNavigationKeyEvent& event) 1443 1443 { 1444 1444 event.SetEventObject(m_pQueue); 1445 #if wxCHECK_VERSION(2, 9, 0)1446 m_pQueue->ProcessWindowEvent(event);1447 #else1448 1445 m_pQueue->ProcessEvent(event); 1449 #endif1450 1446 } 1451 1447 1452 1448 void CQueueViewBase::OnChar(wxKeyEvent& event) -
src/interface/queue_storage.cpp
diff -r 3ce9d545ef08 -r a823baea47d8 src/interface/queue_storage.cpp
a b 135 135 { 136 136 // wxString is CoW, yet it doesn't even do this fast pointer 137 137 // comparison in it's less and/or equal operator(s). 138 #if wxCHECK_VERSION(2, 9, 0)139 return (const char*)lhs.c_str() == (const char*)rhs.c_str() || lhs == rhs;140 #else141 138 return lhs.c_str() == rhs.c_str() || lhs == rhs; 142 #endif143 139 } 144 140 }; 145 141 … … 548 544 extern "C" { 549 545 static void custom_free(void* v) 550 546 { 551 #if defined(__WXMSW__) 552 #if !wxCHECK_VERSION(2, 9, 0) 547 #ifdef __WXMSW__ 553 548 wxStringData* data = reinterpret_cast<wxStringData*>(v) - 1; 554 549 data->Unlock(); 555 #endif556 550 #else 557 551 char* s = reinterpret_cast<char*>(v); 558 552 delete [] s; … … 563 557 bool CQueueStorage::Impl::Bind(sqlite3_stmt* statement, int index, const wxString& value) 564 558 { 565 559 #ifdef __WXMSW__ 566 #if wxCHECK_VERSION(2, 9, 0)567 char* data = value.char_str();568 return sqlite3_bind_text16(statement, index, data, value.length(), custom_free) == SQLITE_OK;569 #else570 560 // Increase string reference and pass the data to sqlite with a custom deallocator that 571 561 // reduces the reference once sqlite is done with it. 572 562 wxStringData* data = reinterpret_cast<wxStringData*>(const_cast<wxChar*>(value.c_str())) - 1; 573 563 data->Lock(); 574 564 return sqlite3_bind_text16(statement, index, data + 1, data->nDataLength * 2, custom_free) == SQLITE_OK; 575 #endif576 565 #else 577 566 char* out = new char[value.size() * 2]; 578 567 size_t outlen = utf16_.FromWChar(out, value.size() * 2, value.c_str(), value.size()); … … 825 814 int len = sqlite3_column_bytes16(statement, index); 826 815 if (text) 827 816 { 828 #if wxCHECK_VERSION(2, 9, 0)829 wxStringBuffer* buffer = new wxStringBuffer(ret, len);830 wxChar* out = *buffer;831 #else832 817 wxChar* out = ret.GetWriteBuf( len ); 833 #endif834 818 int outlen = utf16_.ToWChar( out, len, text, len ); 835 #if wxCHECK_VERSION(2, 9, 0)836 delete buffer;837 #else838 819 ret.UngetWriteBuf( outlen ); 839 #endif840 820 if (shrink) 841 821 ret.Shrink(); 842 822 } -
src/interface/quickconnectbar.cpp
diff -r 3ce9d545ef08 -r a823baea47d8 src/interface/quickconnectbar.cpp
a b 222 222 if (event.GetDirection() && event.GetEventObject() == XRCCTRL(*this, "ID_QUICKCONNECT_DROPDOWN", wxButton)) 223 223 { 224 224 event.SetEventObject(this); 225 GetParent()-> GetEventHandler()->ProcessEvent(event);225 GetParent()->ProcessEvent(event); 226 226 } 227 227 else if (!event.GetDirection() && event.GetEventObject() == m_pHost) 228 228 { 229 229 event.SetEventObject(this); 230 GetParent()-> GetEventHandler()->ProcessEvent(event);230 GetParent()->ProcessEvent(event); 231 231 } 232 232 else 233 233 event.Skip(); -
src/interface/resources/settings.xrc
diff -r 3ce9d545ef08 -r a823baea47d8 src/interface/resources/settings.xrc
a b 427 427 </object> 428 428 <cols>1</cols> 429 429 <vgap>3</vgap> 430 <rows> 3</rows>430 <rows>2</rows> 431 431 </object> 432 432 <flag>wxLEFT|wxRIGHT|wxBOTTOM</flag> 433 433 <border>4</border> … … 632 632 <object class="sizeritem"> 633 633 <object class="wxListCtrl" name="ID_KEYS"> 634 634 <style>wxLC_REPORT|wxSUNKEN_BORDER</style> 635 <size>400,-1</size>636 635 </object> 637 <flag>wxSHAPED</flag> 636 <option>1</option> 637 <flag>wxGROW</flag> 638 638 </object> 639 639 <vgap>5</vgap> 640 640 <growablecols>0</growablecols> … … 1363 1363 <object class="sizeritem"> 1364 1364 <object class="wxFlexGridSizer"> 1365 1365 <cols>2</cols> 1366 <rows> 3</rows>1366 <rows>2</rows> 1367 1367 <object class="sizeritem"> 1368 1368 <object class="wxStaticText"> 1369 1369 <label>&Theme:</label> … … 2076 2076 </object> 2077 2077 <growablecols>1</growablecols> 2078 2078 </object> 2079 <flag>wxGROW</flag> 2079 2080 <minsize>400,0</minsize> 2080 2081 </object> 2081 2082 <growablecols>0</growablecols> -
src/interface/settings/optionspage_dateformatting.cpp
diff -r 3ce9d545ef08 -r a823baea47d8 src/interface/settings/optionspage_dateformatting.cpp
a b 16 16 const wxString& dateFormat = m_pOptions->GetOption(OPTION_DATE_FORMAT); 17 17 if (dateFormat == _T("1")) 18 18 SetRCheck(XRCID("ID_DATEFORMAT_ISO"), true, failure); 19 else if ( !dateFormat.IsEmpty() &&dateFormat[0] == '2')19 else if (dateFormat[0] == '2') 20 20 { 21 21 SetRCheck(XRCID("ID_DATEFORMAT_CUSTOM"), true, failure); 22 22 SetText(XRCID("ID_CUSTOM_DATEFORMAT"), dateFormat.Mid(1), failure); … … 27 27 const wxString& timeFormat = m_pOptions->GetOption(OPTION_TIME_FORMAT); 28 28 if (timeFormat == _T("1")) 29 29 SetRCheck(XRCID("ID_TIMEFORMAT_ISO"), true, failure); 30 else if ( !timeFormat.IsEmpty() &&timeFormat[0] == '2')30 else if (timeFormat[0] == '2') 31 31 { 32 32 SetRCheck(XRCID("ID_TIMEFORMAT_CUSTOM"), true, failure); 33 33 SetText(XRCID("ID_CUSTOM_TIMEFORMAT"), timeFormat.Mid(1), failure); -
src/interface/sitemanager.cpp
diff -r 3ce9d545ef08 -r a823baea47d8 src/interface/sitemanager.cpp
a b 516 516 517 517 bool CSiteManager::GetBookmarks(wxString sitePath, std::list<wxString> &bookmarks) 518 518 { 519 if (sitePath.IsEmpty())520 return false;521 519 wxChar c = sitePath[0]; 522 520 if (c != '0' && c != '1') 523 521 return false; -
src/interface/statusbar.cpp
diff -r 3ce9d545ef08 -r a823baea47d8 src/interface/statusbar.cpp
a b 153 153 void wxStatusBarEx::SetStatusText(const wxString& text, int number /*=0*/) 154 154 { 155 155 // Basically identical to the wx one, but not calling Update 156 wxString oldText = GetStatusText(number);156 wxString oldText = m_statusStrings[number]; 157 157 if (oldText != text) 158 158 { 159 wxStatusBar::SetStatusText(text, number);159 m_statusStrings[number] = text; 160 160 161 161 wxRect rect; 162 162 GetFieldRect(number, rect); -
src/interface/timeformatting.cpp
diff -r 3ce9d545ef08 -r a823baea47d8 src/interface/timeformatting.cpp
a b 23 23 24 24 if (dateFormat == _T("1")) 25 25 m_dateFormat = _T("%Y-%m-%d"); 26 else if ( !dateFormat.IsEmpty() &&dateFormat[0] == '2')26 else if (dateFormat[0] == '2') 27 27 m_dateFormat = dateFormat.Mid(1); 28 28 else 29 29 m_dateFormat = _T("%x"); … … 33 33 34 34 if (timeFormat == _T("1")) 35 35 m_dateTimeFormat += _T("%H:%M"); 36 else if ( !timeFormat.IsEmpty() &&timeFormat[0] == '2')36 else if (timeFormat[0] == '2') 37 37 m_dateTimeFormat += timeFormat.Mid(1); 38 38 else 39 39 m_dateTimeFormat += _T("%X"); -
src/interface/viewheader.cpp
diff -r 3ce9d545ef08 -r a823baea47d8 src/interface/viewheader.cpp
a b 67 67 navEvent.SetDirection(!event.ShiftDown()); 68 68 navEvent.SetFromTab(true); 69 69 navEvent.ResumePropagation(1); 70 m_parent-> GetEventHandler()->ProcessEvent(navEvent);70 m_parent->ProcessEvent(navEvent); 71 71 } 72 72 73 73 void OnChar(wxKeyEvent& event) -
src/interface/wrapengine.cpp
diff -r 3ce9d545ef08 -r a823baea47d8 src/interface/wrapengine.cpp
a b 234 234 bool containsURL = false; 235 235 for (int i = 0; i <= strLen; i++) 236 236 { 237 if (( i < strLen - 2 &&text[i] == ':' && text[i + 1] == '/' && text[i + 2] == '/') || // absolute238 ( i < strLen &&text[i] == '/' && (!i || text[i - 1] == ' '))) // relative237 if ((text[i] == ':' && text[i + 1] == '/' && text[i + 2] == '/') || // absolute 238 (text[i] == '/' && (!i || text[i - 1] == ' '))) // relative 239 239 { 240 240 url = true; 241 241 containsURL = true; 242 242 } 243 if ( i < strLen && text[i] != ' ')243 if (text[i] != ' ' && text[i] != 0) 244 244 { 245 245 // If url, wrap on slashes and ampersands, but not first slash of something:// 246 246 if (!url || 247 (( i < strLen - 1 && (text[i] != '/' || text[i + 1] == '/')) && (i < strLen - 1 && (text[i] != '&' || text[i + 1] == '&')) && text[i] != '?'))247 ((text[i] != '/' || text[i + 1] == '/') && (text[i] != '&' || text[i + 1] == '&') && text[i] != '?')) 248 248 continue; 249 249 } 250 250 251 251 wxString segment; 252 252 if (wrapAfter == -1) 253 253 { 254 if ( i < strLen && (text[i] == '/' || text[i] == '?' || text[i] == '&'))254 if (text[i] == '/' || text[i] == '?' || text[i] == '&') 255 255 segment = text.Mid(start, i - start + 1); 256 256 else 257 257 segment = text.Mid(start, i - start); … … 259 259 } 260 260 else 261 261 { 262 if ( i < strLen && (text[i] == '/' || text[i] == '?' || text[i] == '&'))262 if (text[i] == '/' || text[i] == '?' || text[i] == '&') 263 263 segment = text.Mid(wrapAfter + 1, i - wrapAfter); 264 264 else 265 265 segment = text.Mid(wrapAfter + 1, i - wrapAfter - 1); … … 274 274 if (wrappedText != _T("")) 275 275 wrappedText += _T("\n"); 276 276 wrappedText += text.Mid(start, wrapAfter - start); 277 if ( wrapAfter < strLen &&text[wrapAfter] != ' ' && text[wrapAfter] != '\0')277 if (text[wrapAfter] != ' ' && text[wrapAfter] != '\0') 278 278 wrappedText += text[wrapAfter]; 279 279 280 280 if (width + spaceWidth >= (int)maxLength) … … 304 304 if (wrappedText != _T("")) 305 305 wrappedText += _T("\n"); 306 306 wrappedText += text.Mid(start, i - start); 307 if ( i < strLen &&text[i] != ' ' && text[i] != '\0')307 if (text[i] != ' ' && text[i] != '\0') 308 308 wrappedText += text[i]; 309 309 start = i + 1; 310 310 wrapAfter = -1; … … 318 318 wrapAfter = i; 319 319 } 320 320 321 if ( i < strLen &&text[i] == ' ')321 if (text[i] == ' ') 322 322 url = false; 323 323 } 324 324 if (start < strLen)