Ticket #8272: filezilla.wx9.updated.diff

File filezilla.wx9.updated.diff, 65.2 KB (added by Tautvydas Andrikys, 10 years ago)
  • configure.in

    diff -r 3ce9d545ef08 -r a823baea47d8 configure.in
    a b  
    9595  AM_OPTIONS_WXCONFIG
    9696
    9797  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])
    9999  if test "$wxWin" != 1; then
    100100    AC_MSG_ERROR([
    101101        wxWidgets must be installed on your system
     
    111111        equivalent variable and wxWidgets version is $MIN_WX_VERSION or above.
    112112    ])
    113113  fi
    114   if test "$wx_config_major_version" -gt "2" || test "$wx_config_minor_version" -gt "9"; then
    115     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.])
    116116  fi
    117117
    118118  # --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/2001
    6 dnl RCS-ID:          $Id$
    7 dnl ---------------------------------------------------------------------------
    8 
    9 dnl ===========================================================================
    10 dnl Table of Contents of this macro file:
    11 dnl -------------------------------------
    12 dnl
    13 dnl SECTION A: wxWidgets main macros
    14 dnl  - WX_CONFIG_OPTIONS
    15 dnl  - WX_CONFIG_CHECK
    16 dnl  - WXRC_CHECK
    17 dnl  - WX_STANDARD_OPTIONS
    18 dnl  - WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS
    19 dnl  - WX_DETECT_STANDARD_OPTION_VALUES
    20 dnl
    21 dnl SECTION B: wxWidgets-related utilities
    22 dnl  - WX_LIKE_LIBNAME
    23 dnl  - WX_ARG_ENABLE_YESNOAUTO
    24 dnl  - WX_ARG_WITH_YESNOAUTO
    25 dnl
    26 dnl SECTION C: messages to the user
    27 dnl  - WX_STANDARD_OPTIONS_SUMMARY_MSG
    28 dnl  - WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN
    29 dnl  - WX_STANDARD_OPTIONS_SUMMARY_MSG_END
    30 dnl  - WX_BOOLOPT_SUMMARY
    31 dnl
    32 dnl The special "WX_DEBUG_CONFIGURE" variable can be set to 1 to enable extra
    33 dnl debug output on stdout from these macros.
    34 dnl ===========================================================================
    35 
    36 
    371dnl ---------------------------------------------------------------------------
    382dnl Macros for wxWidgets detection. Typically used in configure.in as:
    393dnl
    404dnl     AC_ARG_ENABLE(...)
    415dnl     AC_ARG_WITH(...)
    426dnl        ...
    43 dnl     WX_CONFIG_OPTIONS
     7dnl     AM_OPTIONS_WXCONFIG
    448dnl        ...
    459dnl        ...
    46 dnl     WX_CONFIG_CHECK([2.6.0], [wxWin=1])
     10dnl     AM_PATH_WXCONFIG(2.6.0, wxWin=1)
    4711dnl     if test "$wxWin" != 1; then
    4812dnl        AC_MSG_ERROR([
    4913dnl                wxWidgets must be installed on your system
     
    6024dnl     CFLAGS="$CFLAGS $WX_CFLAGS_ONLY"
    6125dnl
    6226dnl     LIBS="$LIBS $WX_LIBS"
    63 dnl
    64 dnl If you want to support standard --enable-debug/unicode/shared options, you
    65 dnl may do the following:
    66 dnl
    67 dnl     ...
    68 dnl     AC_CANONICAL_SYSTEM
    69 dnl
    70 dnl     # define configure options
    71 dnl     WX_CONFIG_OPTIONS
    72 dnl     WX_STANDARD_OPTIONS([debug,unicode,shared,toolkit,wxshared])
    73 dnl
    74 dnl     # basic configure checks
    75 dnl     ...
    76 dnl
    77 dnl     # we want to always have DEBUG==WX_DEBUG and UNICODE==WX_UNICODE
    78 dnl     WX_DEBUG=$DEBUG
    79 dnl     WX_UNICODE=$UNICODE
    80 dnl
    81 dnl     WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS
    82 dnl     WX_CONFIG_CHECK([2.8.0], [wxWin=1],,[html,core,net,base],[$WXCONFIG_FLAGS])
    83 dnl     WX_DETECT_STANDARD_OPTION_VALUES
    84 dnl
    85 dnl     # write the output files
    86 dnl     AC_CONFIG_FILES([Makefile ...])
    87 dnl     AC_OUTPUT
    88 dnl
    89 dnl     # optional: just to show a message to the user
    90 dnl     WX_STANDARD_OPTIONS_SUMMARY_MSG
    91 dnl
    9227dnl ---------------------------------------------------------------------------
    9328
    94 
    9529dnl ---------------------------------------------------------------------------
    96 dnl WX_CONFIG_OPTIONS
     30dnl AM_OPTIONS_WXCONFIG
    9731dnl
    9832dnl adds support for --wx-prefix, --wx-exec-prefix, --with-wxdir and
    9933dnl --wx-config command line options
    10034dnl ---------------------------------------------------------------------------
    10135
    102 AC_DEFUN([WX_CONFIG_OPTIONS],
     36AC_DEFUN([AM_OPTIONS_WXCONFIG],
    10337[
    10438    AC_ARG_WITH(wxdir,
    10539                [  --with-wxdir=PATH       Use uninstalled version of wxWidgets in PATH],
     
    14276])
    14377
    14478dnl ---------------------------------------------------------------------------
    145 dnl WX_CONFIG_CHECK(VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND
     79dnl AM_PATH_WXCONFIG(VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND
    14680dnl                  [, WX-LIBS [, ADDITIONAL-WX-CONFIG-FLAGS]]]])
    14781dnl
    14882dnl Test for wxWidgets, and define WX_C*FLAGS, WX_LIBS and WX_LIBS_STATIC
     
    15286dnl case the macro won't even waste time on tests for its existence.
    15387dnl
    15488dnl 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_LIBS
    156 dnl and WX_LIBS_STATIC will contain flags to link with all of the core
    157 dnl wxWidgets libraries.
     89dnl wxWidgets libraries to link against (it may include contrib libraries). If
     90dnl it is not specified then WX_LIBS and WX_LIBS_STATIC will contain flags to
     91dnl link with all of the core wxWidgets libraries.
    15892dnl
    15993dnl Optional ADDITIONAL-WX-CONFIG-FLAGS argument is appended to wx-config
    16094dnl invocation command in present. It can be used to fine-tune lookup of
    16195dnl best wxWidgets build available.
    16296dnl
    16397dnl Example use:
    164 dnl   WX_CONFIG_CHECK([2.6.0], [wxWin=1], [wxWin=0], [html,core,net]
     98dnl   AM_PATH_WXCONFIG([2.6.0], [wxWin=1], [wxWin=0], [html,core,net]
    16599dnl                    [--unicode --debug])
    166100dnl ---------------------------------------------------------------------------
    167101
    168102dnl
    169103dnl Get the cflags and libraries from the wx-config script
    170104dnl
    171 AC_DEFUN([WX_CONFIG_CHECK],
     105AC_DEFUN([AM_PATH_WXCONFIG],
    172106[
    173107  dnl do we have wx-config name: it can be wx-config or wxd-config or ...
    174108  if test x${WX_CONFIG_NAME+set} != xset ; then
     
    211145      AC_MSG_CHECKING([for wxWidgets version >= $min_wx_version ($5)])
    212146    fi
    213147
    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"
    217149
    218150    WX_VERSION=`$WX_CONFIG_WITH_ARGS --version 2>/dev/null`
    219151    wx_config_major_version=`echo $WX_VERSION | \
     
    235167                              [$wx_requested_micro_version])
    236168
    237169    if test -n "$wx_ver_ok"; then
     170
    238171      AC_MSG_RESULT(yes (version $WX_VERSION))
    239       WX_LIBS=`$WX_CONFIG_WITH_ARGS --libs $4`
     172      WX_LIBS=`$WX_CONFIG_WITH_ARGS --libs`
    240173
    241174      dnl is this even still appropriate?  --static is a real option now
    242175      dnl and WX_CONFIG_WITH_ARGS is likely to contain it if that is
    243176      dnl what the user actually wants, making this redundant at best.
    244177      dnl For now keep it in case anyone actually used it in the past.
    245178      AC_MSG_CHECKING([for wxWidgets static library])
    246       WX_LIBS_STATIC=`$WX_CONFIG_WITH_ARGS --static --libs $4 2>/dev/null`
     179      WX_LIBS_STATIC=`$WX_CONFIG_WITH_ARGS --static --libs 2>/dev/null`
    247180      if test "x$WX_LIBS_STATIC" = "x"; then
    248181        AC_MSG_RESULT(no)
    249182      else
     
    288221
    289222      if test "x$wx_has_cppflags" = x ; then
    290223         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`
    292225         WX_CPPFLAGS=$WX_CFLAGS
    293226         WX_CXXFLAGS=$WX_CFLAGS
    294227
     
    296229         WX_CXXFLAGS_ONLY=$WX_CFLAGS
    297230      else
    298231         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`
    302235
    303236         WX_CFLAGS_ONLY=`echo $WX_CFLAGS | sed "s@^$WX_CPPFLAGS *@@"`
    304237         WX_CXXFLAGS_ONLY=`echo $WX_CXXFLAGS | sed "s@^$WX_CFLAGS *@@"`
     
    321254       WX_LIBS=""
    322255       WX_LIBS_STATIC=""
    323256       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])
    350258
    351259    fi
    352260  else
     
    371279  AC_SUBST(WX_LIBS_STATIC)
    372280  AC_SUBST(WX_VERSION)
    373281  AC_SUBST(WX_RESCOMP)
    374 
    375   dnl need to export also WX_VERSION_MINOR and WX_VERSION_MAJOR symbols
    376   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)
    383282])
    384283
    385284dnl ---------------------------------------------------------------------------
     
    389288dnl     AC_ARG_ENABLE(...)
    390289dnl     AC_ARG_WITH(...)
    391290dnl        ...
    392 dnl     WX_CONFIG_OPTIONS
     291dnl     AM_OPTIONS_WXCONFIG
    393292dnl        ...
    394 dnl     WX_CONFIG_CHECK(2.6.0, wxWin=1)
     293dnl     AM_PATH_WXCONFIG(2.6.0, wxWin=1)
    395294dnl     if test "$wxWin" != 1; then
    396295dnl        AC_MSG_ERROR([
    397296dnl                wxWidgets must be installed on your system
     
    404303dnl        ])
    405304dnl     fi
    406305dnl
    407 dnl     WXRC_CHECK([HAVE_WXRC=1], [HAVE_WXRC=0])
     306dnl     AM_PATH_WXRC([HAVE_WXRC=1], [HAVE_WXRC=0])
    408307dnl     if test "x$HAVE_WXRC" != x1; then
    409308dnl         AC_MSG_ERROR([
    410309dnl                The wxrc program was not installed or not found.
     
    420319dnl     LDFLAGS="$LDFLAGS $WX_LIBS"
    421320dnl ---------------------------------------------------------------------------
    422321
     322
     323
    423324dnl ---------------------------------------------------------------------------
    424 dnl WXRC_CHECK([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
     325dnl AM_PATH_WXRC([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
    425326dnl
    426327dnl Test for wxWidgets' wxrc program for creating either C++, Python or XRS
    427328dnl resources.  The variable WXRC will be set and substituted in the configure
    428329dnl script and Makefiles.
    429330dnl
    430331dnl Example use:
    431 dnl   WXRC_CHECK([wxrc=1], [wxrc=0])
     332dnl   AM_PATH_WXRC([wxrc=1], [wxrc=0])
    432333dnl ---------------------------------------------------------------------------
    433334
    434335dnl
    435336dnl wxrc program from the wx-config script
    436337dnl
    437 AC_DEFUN([WXRC_CHECK],
     338AC_DEFUN([AM_PATH_WXRC],
    438339[
    439340  AC_ARG_VAR([WXRC], [Path to wxWidget's wxrc resource compiler])
    440341
     
    463364    AC_SUBST(WXRC)
    464365  fi
    465366])
    466 
    467 dnl ---------------------------------------------------------------------------
    468 dnl WX_LIKE_LIBNAME([output-var] [prefix], [name])
    469 dnl
    470 dnl Sets the "output-var" variable to the name of a library named with same
    471 dnl wxWidgets rule.
    472 dnl E.g. for output-var=='lib', name=='test', prefix='mine', sets
    473 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=28
    476 dnl ---------------------------------------------------------------------------
    477 AC_DEFUN([WX_LIKE_LIBNAME],
    478     [
    479         wx_temp="$2""_""$WX_PORT"
    480 
    481         dnl add the [u][d] string
    482         if test "$WX_UNICODE" = "1"; then
    483             wx_temp="$wx_temp""u"
    484         fi
    485         if test "$WX_DEBUG" = "1"; then
    486             wx_temp="$wx_temp""d"
    487         fi
    488 
    489         dnl complete the name of the lib
    490         wx_temp="$wx_temp""_""$3""-$WX_VERSION_MAJOR.$WX_VERSION_MINOR"
    491 
    492         dnl save it in the user's variable
    493         $1=$wx_temp
    494     ])
    495 
    496 dnl ---------------------------------------------------------------------------
    497 dnl WX_ARG_ENABLE_YESNOAUTO/WX_ARG_WITH_YESNOAUTO
    498 dnl
    499 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  feature
    502 dnl $2 = the name of the variable associated
    503 dnl $3 = the description of that feature
    504 dnl $4 = the default value for that feature
    505 dnl $5 = additional action to do in case option is given with "yes" value
    506 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 option
    513             AC_MSG_CHECKING([for the --enable-$1 option])
    514             if test "$enableval" = "yes" ; then
    515                 AC_MSG_RESULT([yes])
    516                 $2=1
    517                 $5
    518             elif test "$enableval" = "no" ; then
    519                 AC_MSG_RESULT([no])
    520                 $2=0
    521             elif test "$enableval" = "auto" ; then
    522                 AC_MSG_RESULT([will be automatically detected])
    523                 $2="auto"
    524             else
    525                 AC_MSG_ERROR([
    526     Unrecognized option value (allowed values: yes, no, auto)
    527                 ])
    528             fi
    529          ])
    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 option
    537             AC_MSG_CHECKING([for the --with-$1 option])
    538             if test "$withval" = "yes" ; then
    539                 AC_MSG_RESULT([yes])
    540                 $2=1
    541                 $5
    542             dnl NB: by default we don't allow --with-$1=no option
    543             dnl     since it does not make much sense !
    544             elif test "$6" = "1" -a "$withval" = "no" ; then
    545                 AC_MSG_RESULT([no])
    546                 $2=0
    547             elif test "$withval" = "auto" ; then
    548                 AC_MSG_RESULT([will be automatically detected])
    549                 $2="auto"
    550             else
    551                 AC_MSG_ERROR([
    552     Unrecognized option value (allowed values: yes, auto)
    553                 ])
    554             fi
    555          ])
    556 
    557 
    558 dnl ---------------------------------------------------------------------------
    559 dnl WX_STANDARD_OPTIONS([options-to-add])
    560 dnl
    561 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-wxversion
    565 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 dnl
    568 dnl Note that e.g. UNICODE != WX_UNICODE; the first is the value of the
    569 dnl --enable-unicode option (in boolean format) while the second indicates
    570 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 if
    576         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 specified
    579         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 option
    589         dnl which must be able to accept the auto|gtk1|gtk2|msw|... values
    590         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 option
    598                 AC_MSG_CHECKING([for the --with-toolkit option])
    599                 if test "$withval" = "auto" ; then
    600                     AC_MSG_RESULT([will be automatically detected])
    601                     TOOLKIT="auto"
    602                 else
    603                     TOOLKIT="$withval"
    604 
    605                     dnl PORT must be one of the allowed values
    606                     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"; then
    610                         AC_MSG_ERROR([
    611     Unrecognized option value (allowed values: auto, gtk1, gtk2, msw, motif, osx_carbon, osx_cocoa, dfb, x11)
    612                         ])
    613                     fi
    614 
    615                     AC_MSG_RESULT([$TOOLKIT])
    616                 fi
    617                ])
    618 
    619         dnl ****** IMPORTANT *******
    620         dnl   Unlike for the UNICODE setting, you can build your program in
    621         dnl   shared mode against a static build of wxWidgets. Thus we have the
    622         dnl   following option which allows these mixtures. E.g.
    623         dnl
    624         dnl      ./configure --disable-shared --with-wxshared
    625         dnl
    626         dnl   will build your library in static mode against the first available
    627         dnl   shared build of wxWidgets.
    628         dnl
    629         dnl   Note that's not possible to do the viceversa:
    630         dnl
    631         dnl      ./configure --enable-shared --without-wxshared
    632         dnl
    633         dnl   Doing so you would try to build your library in shared mode against a static
    634         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_VALUES
    636         dnl   (where we know what 'auto' should be expanded to).
    637         dnl
    638         dnl   If you try to build something in ANSI mode against a UNICODE build
    639         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 adventurous
    652         dnl peoples will want to mix a wxWidgets release build with a debug build of
    653         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 option
    663         dnl which accepts the "auto|2.6|2.7|2.8|2.9|3.0" etc etc values
    664         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 option
    672                 AC_MSG_CHECKING([for the --with-wxversion option])
    673                 if test "$withval" = "auto" ; then
    674                     AC_MSG_RESULT([will be automatically detected])
    675                     WX_RELEASE="auto"
    676                 else
    677 
    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 digit
    684                     if test "${#wx_requested_major_version}" != "1" -o \
    685                             "${#wx_requested_minor_version}" != "1" ; then
    686                         AC_MSG_ERROR([
    687     Unrecognized option value (allowed values: auto, 2.6, 2.7, 2.8, 2.9, 3.0)
    688                         ])
    689                     fi
    690 
    691                     WX_RELEASE="$wx_requested_major_version"".""$wx_requested_minor_version"
    692                     AC_MSG_RESULT([$WX_RELEASE])
    693                 fi
    694                ])
    695 
    696         if test "$WX_DEBUG_CONFIGURE" = "1"; then
    697             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         fi
    703     ])
    704 
    705 
    706 dnl ---------------------------------------------------------------------------
    707 dnl WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS
    708 dnl
    709 dnl Sets the WXCONFIG_FLAGS string using the SHARED,DEBUG,UNICODE variable values
    710 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" ; then
    716             WXCONFIG_FLAGS="--static=no "
    717         elif test "$WX_SHARED" = "0" ; then
    718             WXCONFIG_FLAGS="--static=yes "
    719         fi
    720 
    721         if test "$WX_DEBUG" = "1" ; then
    722             WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--debug=yes "
    723         elif test "$WX_DEBUG" = "0" ; then
    724             WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--debug=no "
    725         fi
    726 
    727         dnl The user should have set WX_UNICODE=UNICODE
    728         if test "$WX_UNICODE" = "1" ; then
    729             WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--unicode=yes "
    730         elif test "$WX_UNICODE" = "0" ; then
    731             WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--unicode=no "
    732         fi
    733 
    734         if test "$TOOLKIT" != "auto" ; then
    735             WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--toolkit=$TOOLKIT "
    736         fi
    737 
    738         if test "$WX_RELEASE" != "auto" ; then
    739             WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--version=$WX_RELEASE "
    740         fi
    741 
    742         dnl strip out the last space of the string
    743         WXCONFIG_FLAGS=${WXCONFIG_FLAGS% }
    744 
    745         if test "$WX_DEBUG_CONFIGURE" = "1"; then
    746             echo "[[dbg]] WXCONFIG_FLAGS: $WXCONFIG_FLAGS"
    747         fi
    748     ])
    749 
    750 
    751 dnl ---------------------------------------------------------------------------
    752 dnl _WX_SELECTEDCONFIG_CHECKFOR([RESULTVAR], [STRING], [MSG]
    753 dnl                             [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
    754 dnl
    755 dnl Outputs the given MSG. Then searches the given STRING in the wxWidgets
    756 dnl additional CPP flags and put the result of the search in WX_$RESULTVAR
    757 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" ; then
    762 
    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 it
    765             AC_MSG_CHECKING([$3])
    766 
    767             dnl set WX_$1 variable to 1 if the $WX_SELECTEDCONFIG contains the $2
    768             dnl string or to 0 otherwise.
    769             dnl NOTE: 'expr match STRING REGEXP' cannot be used since on Mac it
    770             dnl       doesn't work; we use 'expr STRING : REGEXP' instead
    771             WX_$1=$(expr "$WX_SELECTEDCONFIG" : ".*$2.*")
    772 
    773             if test "$WX_$1" != "0"; then
    774                 WX_$1=1
    775                 AC_MSG_RESULT([yes])
    776                 ifelse([$4], , :, [$4])
    777             else
    778                 WX_$1=0
    779                 AC_MSG_RESULT([no])
    780                 ifelse([$5], , :, [$5])
    781             fi
    782         else
    783 
    784             dnl Use the setting given by the user
    785             WX_$1=$$1
    786         fi
    787     ])
    788 
    789 dnl ---------------------------------------------------------------------------
    790 dnl WX_DETECT_STANDARD_OPTION_VALUES
    791 dnl
    792 dnl Detects the values of the following variables:
    793 dnl 1) WX_RELEASE
    794 dnl 2) WX_UNICODE
    795 dnl 3) WX_DEBUG
    796 dnl 4) WX_SHARED    (and also WX_STATIC)
    797 dnl 5) WX_PORT
    798 dnl from the previously selected wxWidgets build; this macro in fact must be
    799 dnl called *after* calling the WX_CONFIG_CHECK macro.
    800 dnl
    801 dnl Note that the WX_VERSION_MAJOR, WX_VERSION_MINOR symbols are already set
    802 dnl by WX_CONFIG_CHECK macro
    803 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 ; then
    810 
    811             AC_MSG_ERROR([
    812     Cannot detect the wxWidgets configuration for the selected wxWidgets build
    813     since its version is $WX_VERSION < 2.6.0; please install a newer
    814     version of wxWidgets.
    815                          ])
    816         fi
    817 
    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"; then
    823             echo "[[dbg]] Using wx-config --selected-config"
    824             echo "[[dbg]] WX_SELECTEDCONFIG: $WX_SELECTEDCONFIG"
    825         fi
    826 
    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 the
    833         dnl 'static' word when built in static mode.
    834         if test $WX_SHARED = "1"; then
    835             STATIC=0
    836         elif test $WX_SHARED = "0"; then
    837             STATIC=1
    838         elif test $WX_SHARED = "auto"; then
    839             STATIC="auto"
    840         fi
    841 
    842         dnl Now set the WX_UNICODE, WX_DEBUG, WX_STATIC variables
    843         _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_STATIC
    851         if test "$WX_STATIC" != "0"; then
    852             WX_SHARED=0
    853         else
    854             WX_SHARED=1
    855         fi
    856 
    857         AC_SUBST(WX_UNICODE)
    858         AC_SUBST(WX_DEBUG)
    859         AC_SUBST(WX_SHARED)
    860 
    861         dnl detect the WX_PORT to use
    862         if test "$TOOLKIT" = "auto" ; then
    863 
    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 it
    866             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"; fi
    879             if test "$WX_GTKPORT2" != "0"; then WX_PORT="gtk2"; fi
    880             if test "$WX_MSWPORT" != "0"; then WX_PORT="msw"; fi
    881             if test "$WX_MOTIFPORT" != "0"; then WX_PORT="motif"; fi
    882             if test "$WX_OSXCOCOAPORT" != "0"; then WX_PORT="osx_cocoa"; fi
    883             if test "$WX_OSXCARBONPORT" != "0"; then WX_PORT="osx_carbon"; fi
    884             if test "$WX_X11PORT" != "0"; then WX_PORT="x11"; fi
    885             if test "$WX_DFBPORT" != "0"; then WX_PORT="dfb"; fi
    886 
    887             dnl NOTE: backward-compatible check for wx2.8; in wx2.9 the mac
    888             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"; fi
    891 
    892             dnl check at least one of the WX_*PORT has been set !
    893 
    894             if test "$WX_PORT" = "unknown" ; then
    895                 AC_MSG_ERROR([
    896         Cannot detect the currently installed wxWidgets port !
    897         Please check your 'wx-config --cxxflags'...
    898                             ])
    899             fi
    900 
    901             AC_MSG_RESULT([$WX_PORT])
    902         else
    903 
    904             dnl Use the setting given by the user
    905             if test -z "$TOOLKIT" ; then
    906                 WX_PORT=$TOOLKIT
    907             else
    908                 dnl try with PORT
    909                 WX_PORT=$PORT
    910             fi
    911         fi
    912 
    913         AC_SUBST(WX_PORT)
    914 
    915         if test "$WX_DEBUG_CONFIGURE" = "1"; then
    916             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         fi
    923 
    924         dnl Avoid problem described in the WX_STANDARD_OPTIONS which happens when
    925         dnl the user gives the options:
    926         dnl      ./configure --enable-shared --without-wxshared
    927         dnl or just do
    928         dnl      ./configure --enable-shared
    929         dnl but there is only a static build of wxWidgets available.
    930         if test "$WX_SHARED" = "0" -a "$SHARED" = "1"; then
    931             AC_MSG_ERROR([
    932     Cannot build shared library against a static build of wxWidgets !
    933     This error happens because the wxWidgets build which was selected
    934     has been detected as static while you asked to build $PACKAGE_NAME
    935     as shared library and this is not possible.
    936     Use the '--disable-shared' option to build $PACKAGE_NAME
    937     as static library or '--with-wxshared' to use wxWidgets as shared library.
    938                          ])
    939         fi
    940 
    941         dnl now we can finally update the DEBUG,UNICODE,SHARED options
    942         dnl to their final values if they were set to 'auto'
    943         if test "$DEBUG" = "auto"; then
    944             DEBUG=$WX_DEBUG
    945         fi
    946         if test "$UNICODE" = "auto"; then
    947             UNICODE=$WX_UNICODE
    948         fi
    949         if test "$SHARED" = "auto"; then
    950             SHARED=$WX_SHARED
    951         fi
    952         if test "$TOOLKIT" = "auto"; then
    953             TOOLKIT=$WX_PORT
    954         fi
    955 
    956         dnl in case the user needs a BUILD=debug/release var...
    957         if test "$DEBUG" = "1"; then
    958             BUILD="debug"
    959         elif test "$DEBUG" = "0" -o "$DEBUG" = ""; then
    960             BUILD="release"
    961         fi
    962 
    963         dnl respect the DEBUG variable adding the optimize/debug flags
    964         dnl NOTE: the CXXFLAGS are merged together with the CPPFLAGS so we
    965         dnl       don't need to set them, too
    966         if test "$DEBUG" = "1"; then
    967             CXXFLAGS="$CXXFLAGS -g -O0"
    968             CFLAGS="$CFLAGS -g -O0"
    969         else
    970             CXXFLAGS="$CXXFLAGS -O2"
    971             CFLAGS="$CFLAGS -O2"
    972         fi
    973     ])
    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 dnl
    980 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 dnl
    983 dnl NOTE: you need to use the [" my message"] syntax for 2nd and 3rd arguments
    984 dnl       if you want that m4 avoid to throw away the spaces prefixed to the
    985 dnl       argument value.
    986 dnl ---------------------------------------------------------------------------
    987 AC_DEFUN([WX_BOOLOPT_SUMMARY],
    988         [
    989         if test "x$$1" = "x1" ; then
    990             echo $2
    991         elif test "x$$1" = "x0" ; then
    992             echo $3
    993         else
    994             echo "$1 is $$1"
    995         fi
    996     ])
    997 
    998 dnl ---------------------------------------------------------------------------
    999 dnl WX_STANDARD_OPTIONS_SUMMARY_MSG
    1000 dnl
    1001 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         echo
    1007         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_END
    1019 dnl
    1020 dnl Like WX_STANDARD_OPTIONS_SUMMARY_MSG macro but these two macros also gives info
    1021 dnl about the configuration of the package which used the wxpresets.
    1022 dnl
    1023 dnl Typical usage:
    1024 dnl    WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN
    1025 dnl    echo "   - Package setting 1: $SETTING1"
    1026 dnl    echo "   - Package setting 2: $SETTING1"
    1027 dnl    ...
    1028 dnl    WX_STANDARD_OPTIONS_SUMMARY_MSG_END
    1029 dnl
    1030 dnl ---------------------------------------------------------------------------
    1031 AC_DEFUN([WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN],
    1032         [
    1033         echo
    1034         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_MSG
    1045         echo
    1046         echo "  Now, just run make."
    1047         echo " ----------------------------------------------------------------"
    1048         echo
    1049     ])
    1050 
    1051 
    1052 dnl ---------------------------------------------------------------------------
    1053 dnl Deprecated macro wrappers
    1054 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  
    4848
    4949    wxChar* out;
    5050    wxChar* start;
    51     wxStringBuffer* buffer = 0;
    5251    if (*in == '\\')
    5352    {
    5453        // possibly UNC
     
    6059            return false;
    6160        }
    6261
    63         buffer = new wxStringBuffer(m_path, path.Len() + 2);
    64         start = *buffer;
     62        start = m_path.GetWriteBuf(path.Len() + 2);
    6563        out = start;
    6664        *out++ = '\\';
    6765        *out++ = '\\';
     
    7977        {
    8078            // not a valid UNC path
    8179            *start = 0;
    82             delete buffer;
     80            m_path.UngetWriteBuf( 0 );
    8381            return false;
    8482        }
    8583
     
    8987    {
    9088        // Regular path
    9189
    92         buffer = new wxStringBuffer(m_path, path.Len() + 2);
    93         start = *buffer;
     90        start = m_path.GetWriteBuf(path.Len() + 2);
    9491        out = start;
    9592        *out++ = *in++;
    9693
    9794        if (*in++ != ':')
    9895        {
    9996            *start = 0;
    100             delete buffer;
     97            m_path.UngetWriteBuf( 0 );
    10198            return false;
    10299        }
    103100        *out++ = ':';
    104101        if (*in != '/' && *in != '\\' && *in)
    105102        {
    106103            *start = 0;
    107             delete buffer;
     104            m_path.UngetWriteBuf( 0 );
    108105            return false;
    109106        }
    110107        *out++ = path_separator;
     
    123120        return false;
    124121    }
    125122
    126 #if wxCHECK_VERSION(2, 9, 0)
    127     wxStringBuffer* buffer = new wxStringBuffer(m_path, path.Len() + 2);
    128     wxChar* out = *buffer;
    129 #else
    130123    wxChar* start = m_path.GetWriteBuf(path.Len() + 2);
    131124    wxChar* out = start;
    132 #endif
    133125
    134126    *out++ = '/';
    135127    segments.push_back(out);
     
    218210    }
    219211
    220212    *out = 0;
    221 #if !wxCHECK_VERSION(2, 9, 0)
     213
    222214    m_path.UngetWriteBuf( out - start );
    223 #else
    224     if (buffer != 0) {
    225         delete buffer;
    226     }
    227 #endif
     215
    228216    ::Coalesce(m_path);
    229217
    230218    return true;
  • src/engine/logging.cpp

    diff -r 3ce9d545ef08 -r a823baea47d8 src/engine/logging.cpp
    a b  
    5151    }
    5252}
    5353
    54 #if wxCHECK_VERSION(2, 9, 0)
    55 void CLogging::LogMessage(MessageType nMessageType, const wxChar *msgFormat, int value1) const
    56 {
    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) const
    61 {
    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) const
    66 {
    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) const
    71 {
    72         LogMessage(nMessageType, msgFormat, value1.AsWChar());
    73 }
    74 
    75 void CLogging::LogMessage(MessageType nMessageType, const wxChar *msgFormat, wxCStrData value1, wxCStrData value2) const
    76 {
    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) const
    81 {
    82         LogMessage(nMessageType, msgFormat, value1.AsWChar(), value2.AsWChar(), value3.AsWChar(), value4.AsWChar());
    83 }
    84 #endif
    85 
    8654void CLogging::LogMessage(MessageType nMessageType, const wxChar *msgFormat, ...) const
    8755{
    8856    InitLogFile();
  • src/engine/logging_private.h

    diff -r 3ce9d545ef08 -r a823baea47d8 src/engine/logging_private.h
    a b  
    66public:
    77    CLogging(CFileZillaEnginePrivate *pEngine);
    88    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 #endif
    189
    1910    void LogMessage(MessageType nMessageType, const wxChar *msgFormat, ...) const;
    2011    void LogMessageRaw(MessageType nMessageType, const wxChar *msg) const;
  • src/engine/misc.cpp

    diff -r 3ce9d545ef08 -r a823baea47d8 src/engine/misc.cpp
    a b  
    365365{
    366366    for (size_t i = 0; i < str.Len(); i++)
    367367    {
    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 #else
    377368        wxChar& c = str[i];
    378369        if (c >= 'A' && c <= 'Z')
    379370            c += 32;
    380 #endif
    381371    }
    382372}
    383373
  • src/engine/server.cpp

    diff -r 3ce9d545ef08 -r a823baea47d8 src/engine/server.cpp
    a b  
    1212};
    1313
    1414static 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  },
    1616    { SFTP,         _T("sftp"),   true,  22,  false, _T("SFTP - SSH File Transfer Protocol"),                              false },
    1717    { 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  },
    2222    { UNKNOWN,      _T(""),       false, 21,  false, _T("") }
    2323};
    2424
  • src/engine/serverpath.cpp

    diff -r 3ce9d545ef08 -r a823baea47d8 src/engine/serverpath.cpp
    a b  
    276276        len += iter->Length() + 2 + INTLENGTH;
    277277
    278278    wxString safepath;
    279 #if wxCHECK_VERSION(2, 9, 0)
    280     wxStringBuffer* buffer = new wxStringBuffer(safepath, len);
    281     wxChar* t = *buffer;
    282 #else
    283279    wxChar* start = safepath.GetWriteBuf(len);
    284280    wxChar* t = start;
    285 #endif
    286281
    287282    t = fast_sprint_number(t, m_type);
    288283    *(t++) = ' ';
     
    304299        t += iter->size();
    305300    }
    306301    *t = 0;
    307 #if !wxCHECK_VERSION(2, 9, 0)
     302
    308303    safepath.UngetWriteBuf( t - start );
    309 #else
    310     delete buffer;
    311 #endif
    312304    safepath.Shrink();
    313305
    314306    return safepath;
  • src/engine/socket.cpp

    diff -r 3ce9d545ef08 -r a823baea47d8 src/engine/socket.cpp
    a b  
    12731273    }
    12741274}
    12751275
    1276 #define ERRORDECL(c, desc) { c, _T(#c), _T(desc) },
     1276#define ERRORDECL(c, desc) { c, _T(#c), wxTRANSLATE(desc) },
    12771277
    12781278struct Error_table
    12791279{
  • src/engine/string_coalescer.cpp

    diff -r 3ce9d545ef08 -r a823baea47d8 src/engine/string_coalescer.cpp
    a b  
    6666    {
    6767        // wxString is CoW, yet it doesn't even do this fast pointer
    6868        // comparison in it's less and/or equal operator(s).
    69 #if wxCHECK_VERSION(2, 9, 0)
    70         return lhs == rhs;
    71 #else
    7269        return lhs.c_str() == rhs.c_str() || lhs == rhs;
    73 #endif
    7470    }
    7571};
    7672
  • src/include/libfilezilla.h

    diff -r 3ce9d545ef08 -r a823baea47d8 src/include/libfilezilla.h
    a b  
    2121#include <wx/datetime.h>
    2222#include <wx/event.h>
    2323#include <wx/string.h>
    24 #if wxCHECK_VERSION(2, 9, 0)
    25 #include <wx/translation.h>
    26 #include <wx/dcclient.h>
    27 #endif
    2824
    2925#include <list>
    3026#include <vector>
  • src/interface/FileZilla.cpp

    diff -r 3ce9d545ef08 -r a823baea47d8 src/interface/FileZilla.cpp
    a b  
    265265            COptions::Get()->SetOption(OPTION_LANGUAGE, _T(""));
    266266        }
    267267#else
    268         if (pInfo && !pInfo->Description.IsEmpty())
     268        if (!pInfo || !SetLocale(pInfo->Language))
    269269        {
    270270            if (pInfo && pInfo->Description)
    271271                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);
     
    803803    if (!found)
    804804    {
    805805        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);
    807807        executable.clear();
    808808    }
    809809#endif
  • src/interface/Mainfrm.cpp

    diff -r 3ce9d545ef08 -r a823baea47d8 src/interface/Mainfrm.cpp
    a b  
    754754            // Do a crude approach: Drop everything unexpected...
    755755            for (unsigned int i = 0; i < version.Len(); i++)
    756756            {
    757 #if wxCHECK_VERSION(2, 9, 0)
    758                 char c;
    759                 version.GetChar(i).GetAsChar(&c);
    760 #else
    761757                wxChar& c = version[i];
    762 #endif
    763758                if ((version[i] >= '0' && version[i] <= '9') ||
    764759                    (version[i] >= 'a' && version[i] <= 'z') ||
    765760                    (version[i] >= 'A' && version[i] <= 'Z') ||
    766761                    version[i] == '-' || version[i] == '.' ||
    767762                    version[i] == '_')
    768763                {
    769                     url.Append(c);
     764                    url += c;
    770765                }
    771766            }
    772767        }
     
    784779            {
    785780                pStatusBar->Show(show);
    786781                wxSizeEvent evt;
    787 #if wxCHECK_VERSION(2, 9, 0)
    788                 controls->pLocalListViewPanel->ProcessWindowEvent(evt);
    789 #else
    790782                controls->pLocalListViewPanel->ProcessEvent(evt);
    791 #endif
    792783            }
    793784        }
    794785        if (controls && controls->pRemoteListViewPanel)
     
    798789            {
    799790                pStatusBar->Show(show);
    800791                wxSizeEvent evt;
    801 #if wxCHECK_VERSION(2, 9, 0)
    802                 controls->pRemoteListViewPanel->ProcessWindowEvent(evt);
    803 #else
    804792                controls->pRemoteListViewPanel->ProcessEvent(evt);
    805 #endif
    806793            }
    807794        }
    808795    }
  • src/interface/QueueView.cpp

    diff -r 3ce9d545ef08 -r a823baea47d8 src/interface/QueueView.cpp
    a b  
    34193419    const wxChar replace = COptions::Get()->GetOption(OPTION_INVALID_CHAR_REPLACE)[0];
    34203420
    34213421    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
    34263423    wxChar* start = result.GetWriteBuf(filename.Len() + 1);
    34273424    wxChar* buf = start;
    3428 #endif
    34293425
    34303426    const wxChar* p = filename.c_str();
    34313427    while (*p)
     
    34603456        p++;
    34613457    }
    34623458    *buf = 0;
    3463 #if wxCHECK_VERSION(2, 9, 0)
    3464     delete buffer;
    3465 #else
     3459
    34663460    result.UngetWriteBuf( buf - start );
    3467 #endif
     3461
    34683462    return result;
    34693463}
    34703464
  • src/interface/RemoteTreeView.cpp

    diff -r 3ce9d545ef08 -r a823baea47d8 src/interface/RemoteTreeView.cpp
    a b  
    350350    SetItemImages(parent, false);
    351351
    352352#ifndef __WXMSW__
    353     Thaw();
     353    m_freezeCount--;
    354354#endif
    355355    if (!modified)
    356356        SafeSelectItem(parent);
  • src/interface/StatusView.cpp

    diff -r 3ce9d545ef08 -r a823baea47d8 src/interface/StatusView.cpp
    a b  
    5858    {
    5959        wxWindow* parent = GetParent();
    6060        event.SetEventObject(parent);
    61         parent->GetEventHandler()->ProcessEvent(event);
     61        parent->ProcessEvent(event);
    6262    }
    6363#else
    6464    void OnKeyDown(wxKeyEvent& event)
     
    7676        navEvent.SetDirection(!event.ShiftDown());
    7777        navEvent.SetFromTab(true);
    7878        navEvent.ResumePropagation(1);
    79         parent->GetEventHandler()->ProcessEvent(navEvent);
     79        parent->ProcessEvent(navEvent);
    8080    }
    8181#endif
    8282};
  • src/interface/aui_notebook_ex.cpp

    diff -r 3ce9d545ef08 -r a823baea47d8 src/interface/aui_notebook_ex.cpp
    a b  
    33#include "aui_notebook_ex.h"
    44#include <wx/dcmirror.h>
    55
    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 #else
    146wxColor wxAuiStepColour(const wxColor& c, int ialpha);
    15 #endif
    167
    178#ifdef __WXMSW__
    189#define TABCOLOUR wxSYS_COLOUR_3DFACE
     
    193184        }
    194185    }
    195186
     187#ifdef __WXGTK__
     188    virtual GdkWindow* GetGDKWindow() const { return m_original_dc->GetGDKWindow(); }
     189#endif
    196190protected:
    197191    int m_gradient_called;
    198192    int m_rectangle_called;
     
    221215    virtual wxAuiTabArt* Clone()
    222216    {
    223217        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 #else
    229218        art->SetNormalFont(m_normal_font);
    230219        art->SetSelectedFont(m_selected_font);
    231220        art->SetMeasuringFont(m_measuring_font);
    232 #endif
    233221        return art;
    234222    }
    235223
     
    269257                         int* x_extent)
    270258    {
    271259#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);
    277261#endif
    278262        if (!pane.active)
    279263        {
    280             if (m_baseColour.Red() + m_baseColour.Green() + m_baseColour.Blue() >= 384)
    281                 m_baseColour = 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 );
    282266
    283267            dc.SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));
    284268            if (m_pNotebook->Highlighted(m_pNotebook->GetPageIndex(pane.window)))
     
    286270                if (!m_fonts_initialized)
    287271                {
    288272                    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 #else
    293273                    m_original_normal_font = m_normal_font;
    294274                    m_highlighted_font = m_normal_font;
    295 #endif
    296275                    m_highlighted_font.SetWeight(wxFONTWEIGHT_BOLD);
    297276                    m_highlighted_font.SetStyle(wxFONTSTYLE_ITALIC);
    298277                }
    299 #if wxCHECK_VERSION(2, 9, 0)
    300                 m_normalFont = m_highlighted_font;
    301 #else
    302278                m_normal_font = m_highlighted_font;
    303 #endif
    304279            }
    305280            else if (m_fonts_initialized)
    306 #if wxCHECK_VERSION(2, 9, 0)
    307                 m_normalFont = m_original_normal_font;
    308 #else
    309281                m_normal_font = m_original_normal_font;
    310 #endif
    311282        }
    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
    316284        CFilterDC filter_dc(dc, pane.active ? 1 : 0, (m_tab_ctrl_height % 2) != 0, m_bottom);
    317285        wxAuiDefaultTabArt::DrawTab(*((wxDC*)&filter_dc), wnd, pane, in_rect, close_button_state, out_tab_rect, out_button_rect, x_extent);
    318 #endif
    319286
    320         m_baseColour = wxSystemSettings::GetColour(TABCOLOUR);
     287        m_base_colour = wxSystemSettings::GetColour(TABCOLOUR);
    321288    }
    322289
    323290    virtual void DrawBackground(wxDC& dc, wxWindow* wnd, const wxRect& rect)
    324291    {
    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 #else
    329292        CFilterDC filter_dc(dc, 2, (m_tab_ctrl_height % 2) != 0, m_bottom);
    330293        wxAuiDefaultTabArt::DrawBackground(*((wxDC*)&filter_dc), wnd, rect);
    331 #endif
    332294    }
    333295protected:
    334296    wxAuiNotebookEx* m_pNotebook;
  • src/interface/commandqueue.cpp

    diff -r 3ce9d545ef08 -r a823baea47d8 src/interface/commandqueue.cpp
    a b  
    289289
    290290    wxCommandEvent evt(fzEVT_GRANTEXCLUSIVEENGINEACCESS);
    291291    evt.SetId(m_requestId);
    292     m_pMainFrame->GetQueue()->GetEventHandler()->AddPendingEvent(evt);
     292    m_pMainFrame->GetQueue()->AddPendingEvent(evt);
    293293}
    294294
    295295CFileZillaEngine* CCommandQueue::GetEngineExclusive(int requestId)
  • src/interface/filezilla.h

    diff -r 3ce9d545ef08 -r a823baea47d8 src/interface/filezilla.h
    a b  
    7171#include <wx/toolbar.h>
    7272#include <wx/treectrl.h>
    7373#include <wx/xrc/xmlres.h>
    74 #include <wx/xml/xml.h>
    7574
    7675#endif
  • src/interface/import.cpp

    diff -r 3ce9d545ef08 -r a823baea47d8 src/interface/import.cpp
    a b  
    146146            return _T("");
    147147        int number = (pass[i] - '0') * 100 +
    148148                        (pass[i + 1] - '0') * 10 +
    149                         (pass[i + 2] - '0');
     149                        pass[i + 2] - '0';
    150150        wxChar c = number ^ key[(i / 3 + pos) % strlen(key)];
    151151        output += c;
    152152    }
  • src/interface/netconfwizard.cpp

    diff -r 3ce9d545ef08 -r a823baea47d8 src/interface/netconfwizard.cpp
    a b  
    777777            wxString hexIP = ip;
    778778            for (unsigned int i = 0; i < hexIP.Length(); i++)
    779779            {
    780 #if wxCHECK_VERSION(2, 9, 0)
    781                 char c;
    782                 hexIP.GetChar(i).GetAsChar(&c);
    783 #else
    784780                wxChar& c = hexIP[i];
    785 #endif
    786781                if (c == '.')
    787782                    c = '-';
    788783                else
  • src/interface/queue.cpp

    diff -r 3ce9d545ef08 -r a823baea47d8 src/interface/queue.cpp
    a b  
    13101310    }
    13111311    else
    13121312    {
    1313         if (m_folderScanCount && m_fileCount > 0)
     1313        if (m_folderScanCount)
    13141314            str.Printf(m_title + _T(" (0+)"), m_fileCount);
    13151315        else
    13161316            str = m_title;
     
    14421442void CQueueViewBase::OnNavigationKey(wxNavigationKeyEvent& event)
    14431443{
    14441444    event.SetEventObject(m_pQueue);
    1445 #if wxCHECK_VERSION(2, 9, 0)
    1446     m_pQueue->ProcessWindowEvent(event);
    1447 #else
    14481445    m_pQueue->ProcessEvent(event);
    1449 #endif
    14501446}
    14511447
    14521448void CQueueViewBase::OnChar(wxKeyEvent& event)
  • src/interface/queue_storage.cpp

    diff -r 3ce9d545ef08 -r a823baea47d8 src/interface/queue_storage.cpp
    a b  
    135135    {
    136136        // wxString is CoW, yet it doesn't even do this fast pointer
    137137        // 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 #else
    141138        return lhs.c_str() == rhs.c_str() || lhs == rhs;
    142 #endif
    143139    }
    144140};
    145141
     
    548544extern "C" {
    549545static void custom_free(void* v)
    550546{
    551 #if defined(__WXMSW__)
    552 #if !wxCHECK_VERSION(2, 9, 0)
     547#ifdef __WXMSW__
    553548    wxStringData* data = reinterpret_cast<wxStringData*>(v) - 1;
    554549    data->Unlock();
    555 #endif
    556550#else
    557551    char* s = reinterpret_cast<char*>(v);
    558552    delete [] s;
     
    563557bool CQueueStorage::Impl::Bind(sqlite3_stmt* statement, int index, const wxString& value)
    564558{
    565559#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 #else
    570560    // Increase string reference and pass the data to sqlite with a custom deallocator that
    571561    // reduces the reference once sqlite is done with it.
    572562    wxStringData* data = reinterpret_cast<wxStringData*>(const_cast<wxChar*>(value.c_str())) - 1;
    573563    data->Lock();
    574564    return sqlite3_bind_text16(statement, index, data + 1, data->nDataLength * 2, custom_free) == SQLITE_OK;
    575 #endif
    576565#else
    577566    char* out = new char[value.size() * 2];
    578567    size_t outlen = utf16_.FromWChar(out, value.size() * 2, value.c_str(), value.size());
     
    825814    int len = sqlite3_column_bytes16(statement, index);
    826815    if (text)
    827816    {
    828 #if wxCHECK_VERSION(2, 9, 0)
    829         wxStringBuffer* buffer = new wxStringBuffer(ret, len);
    830         wxChar* out = *buffer;
    831 #else
    832817        wxChar* out = ret.GetWriteBuf( len );
    833 #endif
    834818        int outlen = utf16_.ToWChar( out, len, text, len );
    835 #if wxCHECK_VERSION(2, 9, 0)
    836         delete buffer;
    837 #else
    838819        ret.UngetWriteBuf( outlen );
    839 #endif
    840820        if (shrink)
    841821            ret.Shrink();
    842822    }
  • src/interface/quickconnectbar.cpp

    diff -r 3ce9d545ef08 -r a823baea47d8 src/interface/quickconnectbar.cpp
    a b  
    222222    if (event.GetDirection() && event.GetEventObject() == XRCCTRL(*this, "ID_QUICKCONNECT_DROPDOWN", wxButton))
    223223    {
    224224        event.SetEventObject(this);
    225         GetParent()->GetEventHandler()->ProcessEvent(event);
     225        GetParent()->ProcessEvent(event);
    226226    }
    227227    else if (!event.GetDirection() && event.GetEventObject() == m_pHost)
    228228    {
    229229        event.SetEventObject(this);
    230         GetParent()->GetEventHandler()->ProcessEvent(event);
     230        GetParent()->ProcessEvent(event);
    231231    }
    232232    else
    233233        event.Skip();
  • src/interface/resources/settings.xrc

    diff -r 3ce9d545ef08 -r a823baea47d8 src/interface/resources/settings.xrc
    a b  
    427427              </object>
    428428              <cols>1</cols>
    429429              <vgap>3</vgap>
    430               <rows>3</rows>
     430              <rows>2</rows>
    431431            </object>
    432432            <flag>wxLEFT|wxRIGHT|wxBOTTOM</flag>
    433433            <border>4</border>
     
    632632              <object class="sizeritem">
    633633                <object class="wxListCtrl" name="ID_KEYS">
    634634                  <style>wxLC_REPORT|wxSUNKEN_BORDER</style>
    635                                     <size>400,-1</size>
    636635                </object>
    637                 <flag>wxSHAPED</flag>
     636                <option>1</option>
     637                <flag>wxGROW</flag>
    638638              </object>
    639639              <vgap>5</vgap>
    640640              <growablecols>0</growablecols>
     
    13631363          <object class="sizeritem">
    13641364            <object class="wxFlexGridSizer">
    13651365              <cols>2</cols>
    1366               <rows>3</rows>
     1366              <rows>2</rows>
    13671367              <object class="sizeritem">
    13681368                <object class="wxStaticText">
    13691369                  <label>&amp;Theme:</label>
     
    20762076                  </object>
    20772077                  <growablecols>1</growablecols>
    20782078                </object>
     2079                <flag>wxGROW</flag>
    20792080                <minsize>400,0</minsize>
    20802081              </object>
    20812082              <growablecols>0</growablecols>
  • src/interface/settings/optionspage_dateformatting.cpp

    diff -r 3ce9d545ef08 -r a823baea47d8 src/interface/settings/optionspage_dateformatting.cpp
    a b  
    1616    const wxString& dateFormat = m_pOptions->GetOption(OPTION_DATE_FORMAT);
    1717    if (dateFormat == _T("1"))
    1818        SetRCheck(XRCID("ID_DATEFORMAT_ISO"), true, failure);
    19     else if (!dateFormat.IsEmpty() && dateFormat[0] == '2')
     19    else if (dateFormat[0] == '2')
    2020    {
    2121        SetRCheck(XRCID("ID_DATEFORMAT_CUSTOM"), true, failure);
    2222        SetText(XRCID("ID_CUSTOM_DATEFORMAT"), dateFormat.Mid(1), failure);
     
    2727    const wxString& timeFormat = m_pOptions->GetOption(OPTION_TIME_FORMAT);
    2828    if (timeFormat == _T("1"))
    2929        SetRCheck(XRCID("ID_TIMEFORMAT_ISO"), true, failure);
    30     else if (!timeFormat.IsEmpty() && timeFormat[0] == '2')
     30    else if (timeFormat[0] == '2')
    3131    {
    3232        SetRCheck(XRCID("ID_TIMEFORMAT_CUSTOM"), true, failure);
    3333        SetText(XRCID("ID_CUSTOM_TIMEFORMAT"), timeFormat.Mid(1), failure);
  • src/interface/sitemanager.cpp

    diff -r 3ce9d545ef08 -r a823baea47d8 src/interface/sitemanager.cpp
    a b  
    516516
    517517bool CSiteManager::GetBookmarks(wxString sitePath, std::list<wxString> &bookmarks)
    518518{
    519     if (sitePath.IsEmpty())
    520         return false;
    521519    wxChar c = sitePath[0];
    522520    if (c != '0' && c != '1')
    523521        return false;
  • src/interface/statusbar.cpp

    diff -r 3ce9d545ef08 -r a823baea47d8 src/interface/statusbar.cpp
    a b  
    153153void wxStatusBarEx::SetStatusText(const wxString& text, int number /*=0*/)
    154154{
    155155    // Basically identical to the wx one, but not calling Update
    156     wxString oldText = GetStatusText(number);
     156    wxString oldText = m_statusStrings[number];
    157157    if (oldText != text)
    158158    {
    159         wxStatusBar::SetStatusText(text, number);
     159        m_statusStrings[number] = text;
    160160
    161161        wxRect rect;
    162162        GetFieldRect(number, rect);
  • src/interface/timeformatting.cpp

    diff -r 3ce9d545ef08 -r a823baea47d8 src/interface/timeformatting.cpp
    a b  
    2323
    2424        if (dateFormat == _T("1"))
    2525            m_dateFormat = _T("%Y-%m-%d");
    26         else if (!dateFormat.IsEmpty() && dateFormat[0] == '2')
     26        else if (dateFormat[0] == '2')
    2727            m_dateFormat = dateFormat.Mid(1);
    2828        else
    2929            m_dateFormat = _T("%x");
     
    3333
    3434        if (timeFormat == _T("1"))
    3535            m_dateTimeFormat += _T("%H:%M");
    36         else if (!timeFormat.IsEmpty() && timeFormat[0] == '2')
     36        else if (timeFormat[0] == '2')
    3737            m_dateTimeFormat += timeFormat.Mid(1);
    3838        else
    3939            m_dateTimeFormat += _T("%X");
  • src/interface/viewheader.cpp

    diff -r 3ce9d545ef08 -r a823baea47d8 src/interface/viewheader.cpp
    a b  
    6767        navEvent.SetDirection(!event.ShiftDown());
    6868        navEvent.SetFromTab(true);
    6969        navEvent.ResumePropagation(1);
    70         m_parent->GetEventHandler()->ProcessEvent(navEvent);
     70        m_parent->ProcessEvent(navEvent);
    7171    }
    7272
    7373    void OnChar(wxKeyEvent& event)
  • src/interface/wrapengine.cpp

    diff -r 3ce9d545ef08 -r a823baea47d8 src/interface/wrapengine.cpp
    a b  
    234234    bool containsURL = false;
    235235    for (int i = 0; i <= strLen; i++)
    236236    {
    237         if ((i < strLen - 2 && text[i] == ':' && text[i + 1] == '/' && text[i + 2] == '/') || // absolute
    238             (i < strLen && text[i] == '/' && (!i || text[i - 1] == ' '))) // relative
     237        if ((text[i] == ':' && text[i + 1] == '/' && text[i + 2] == '/') || // absolute
     238            (text[i] == '/' && (!i || text[i - 1] == ' '))) // relative
    239239        {
    240240            url = true;
    241241            containsURL = true;
    242242        }
    243         if (i < strLen && text[i] != ' ')
     243        if (text[i] != ' ' && text[i] != 0)
    244244        {
    245245            // If url, wrap on slashes and ampersands, but not first slash of something://
    246246            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] != '?'))
    248248            continue;
    249249        }
    250250
    251251        wxString segment;
    252252        if (wrapAfter == -1)
    253253        {
    254             if (i < strLen && (text[i] == '/' || text[i] == '?' || text[i] == '&'))
     254            if (text[i] == '/' || text[i] == '?' || text[i] == '&')
    255255                segment = text.Mid(start, i - start + 1);
    256256            else
    257257                segment = text.Mid(start, i - start);
     
    259259        }
    260260        else
    261261        {
    262             if (i < strLen && (text[i] == '/' || text[i] == '?' || text[i] == '&'))
     262            if (text[i] == '/' || text[i] == '?' || text[i] == '&')
    263263                segment = text.Mid(wrapAfter + 1, i - wrapAfter);
    264264            else
    265265                segment = text.Mid(wrapAfter + 1, i - wrapAfter - 1);
     
    274274            if (wrappedText != _T(""))
    275275                wrappedText += _T("\n");
    276276            wrappedText += text.Mid(start, wrapAfter - start);
    277             if (wrapAfter < strLen && text[wrapAfter] != ' ' && text[wrapAfter] != '\0')
     277            if (text[wrapAfter] != ' ' && text[wrapAfter] != '\0')
    278278                wrappedText += text[wrapAfter];
    279279
    280280            if (width + spaceWidth >= (int)maxLength)
     
    304304            if (wrappedText != _T(""))
    305305                wrappedText += _T("\n");
    306306            wrappedText += text.Mid(start, i - start);
    307             if (i < strLen && text[i] != ' ' && text[i] != '\0')
     307            if (text[i] != ' ' && text[i] != '\0')
    308308                wrappedText += text[i];
    309309            start = i + 1;
    310310            wrapAfter = -1;
     
    318318            wrapAfter = i;
    319319        }
    320320
    321         if (i < strLen && text[i] == ' ')
     321        if (text[i] == ' ')
    322322            url = false;
    323323    }
    324324    if (start < strLen)