Commits on Jul 10, 2016
  1. @vslavik
Commits on May 30, 2016
  1. @vslavik

    Don’t assert on weird custom number formatting settings

    On OS X at least, the user is free to customize numbers formatting rules
    and use more than one character for separators. Don’t assert in such
    cases (the rules are untrusted input), but instead fall back to
    something reasonable, as is already done if we can’t retrieve the rules.
    vslavik committed May 29, 2016
Commits on Apr 29, 2016
  1. @vslavik

    Don't set initial label in wxNativeWindow on OS X

    Differentiate between setting the label from SetLabel() and from
    SetPeer() (i.e. initially), because some native controls shouldn't have
    an empty string set as their intitial value.
    Override SetInitialSize() to be empty for wxNativeWindow in order to
    prevent label-setting issues when an unknown, caller-controlled native
    widget is attached. Reverts db9baf9,
    which was the previous attempt to fix this, but was causing too many
    problems elsewhere.
    vslavik committed Apr 29, 2016
Commits on Apr 23, 2016
  1. @vslavik

    wxMSW: Fix display of file history items in menus

    Unlike other platforms, wxMSW assumes natural text directionality (i.e.
    right to left under RTL locales), but absolutely filenames are always
    LTR because they begin with a Latin character. It is therefore necessary
    to add  an explicit directional mark in front of them on Windows.
    vslavik committed Apr 17, 2016
  2. @vslavik

    MSW: Fix dialog default positions under RTL locales

    Toplevel windows use their parent's coordinate system as the reference
    frame, not desktop's, so need to be adjusted accordingly if its
    mirrored. Without these changes, default-positioned wxDialogs would end
    to the right side of the parent window's right border (instead of being
    slightly inside the window) and changing their size would move them as
    vslavik committed Apr 4, 2016
Commits on Apr 6, 2016
  1. @vslavik

    Fix wxCheckListBox checkbox rendering under RTL

    When running under a RTL locale, checkboxes should not be mirrored, but
    should keep the same appearence in both RTL and LTR layouts.
    vslavik committed Apr 4, 2016
Commits on Mar 29, 2016
  1. @vslavik
  2. @vslavik
Commits on Mar 28, 2016
  1. @vslavik

    Don't mirror wxStyleTextCtrl under RTL locales

    Not onlu has Scintilla no support for RTL languages, it is rendered into
    a mirrored DC on Windows and so guaranteed unreadable and unsable. Fix
    it by explicitly setting the window's layout direction to LTR.
    vslavik committed Mar 28, 2016
Commits on Mar 23, 2016
  1. @vslavik

    Disable warnings in the standard shlobj.h header with MSVC14

    There is nothing we can do about these (harmless) warnings, so just
    disable them. Also make sure that the header is included via
    wx/msw/wrapshl.h  everywhere.
    vslavik committed Mar 23, 2016
Commits on Mar 13, 2016
  1. @vslavik
Commits on Feb 21, 2016
  1. @vslavik

    Fix inefficient delayed setting of wxSplitterWindow sash

    If setting sash position to a value that cannot be satisfied due to
    minimum size constraints, wxSplitterWindow would continue endlessly
    trying and failing to set it, causing constant CPU use on OS X. This was
    because delayed sash setting was invoked from idle handler and if it
    failed, the code would repeat the same action again and again.
    Instead, perform this delayed setting from OnSize handler. If setting
    sash position failed in the first place, it must have been due to too
    small size of the window. Therefore it's pointless to try again until
    the size changes.
    vslavik committed Feb 21, 2016
  2. @vslavik

    Don't redraw wxSplitterWindow sash needlessly

    Don't draw the sash in SizeWindows() unless its position was changed by
    the function.
    vslavik committed Feb 21, 2016
  3. @vslavik

    wxMSW: Fix wxToolBar rendering with double-buffering

    An old check - used for reasons that no longer apply - was preventing
    correct rendering of wxToolBar background in wxMSW. Fix this by removing
    the obsolete check.
    See #9666 for the original reason for the check.
    vslavik committed Feb 21, 2016
Commits on Oct 13, 2015
  1. @vslavik

    Allow NSAttributedString in [wxNSTextFieldEditor insertText]

    According to the documentation, insertText: argument is either NSString
    or NSAttributedString. The latter is not a subclass of the former, yet
    the code assumed the argument is always a NSString. This caused the
    following exception:
    Terminating app due to uncaught exception 'NSInvalidArgumentException', reason:
    -[NSConcreteMutableAttributedString characterAtIndex:]: unrecognized selector sent to instance
    Fix this by checking for NSAttributedString and extracting plain string
    from it.
    vslavik committed Oct 13, 2015
Commits on Oct 10, 2015
  1. @vslavik

    Even more workaround for clang warnings about typeid() side effects.

    Even after 5aae7c7 and
    d2c1fce clang would still emit the
    warning in code using templates via
    Silence the warning by putting the typeid() expressions into a trivial
    helper function with two wxAnyValueType reference arguments, so the
    class the macro is used in doesn't come into play (it shouldn't in the
    previous version of the code either, but clang apparently thought it
    Hopefully really closes #16968.
    vslavik committed Oct 10, 2015
Commits on Aug 15, 2015
  1. @vslavik

    Only set native label if nonempty in wxWindowMac::SetPeer()

    Some native controls don't take kindly to being set setStringValue: with
    a value invalid for the control (such as empty string for
    NSPathControl). Don't do this if the label is empty anyway to avoid
    problems with wxNativeWindow when the underlying native control is like
    vslavik committed Aug 15, 2015
Commits on Jun 15, 2015
  1. @vslavik

    Really fix MinGW compilation of SetThreadUILanguage-using code

    09e1fbe fixed compilation, but not linking. Just use the same code as on
    the 3.0 branch, with dynamic loading of SetThreadUILanguage.
    vslavik committed Jun 15, 2015
Commits on Jun 12, 2015
  1. @vslavik

    Fix MinGW and VC8 compilation error

    3a8ad95 introduced compilation failures with (some versions of) MinGW
    and VC8 because their winnls.h apparently doesn't declare
    SetThreadUILanguage(). Just declare the function ourselves to fix it.
    vslavik committed Jun 12, 2015
Commits on Jun 11, 2015
  1. @vslavik

    Call SetThreadUILanguage() on Windows

    Starting with Vista, SetThreadLocale() does basically nothing and does
    not affect UI language. We need to call SetThreadUILanguage() as well
    from wxLocale::Init() to have the locale reflected in e.g. standard
    vslavik committed Jun 10, 2015
Commits on May 1, 2015
  1. @vslavik
Commits on Apr 19, 2015
  1. @vslavik

    Don't check for always-available CGColorCreateGenericRGB

    This function is available on OS X since 10.5, which is the minimum
    supported version of wx 3.0.
    Fixes Xcode 6.3 warning triggered by checking availability of a symbol
    that wasn't marked as weak_import.
    vslavik committed Apr 19, 2015
Commits on Mar 29, 2015
  1. @vslavik

    Use IsThisEnabled() for wxActivityIndicator appearance

    Determine the enabled state using IsThisEnabled() instead of
    IsEnabled(), because the latter returns false if the entire window is
    disabled without its appearance being affected, e.g. if another window
    is shown modally.
    vslavik committed Mar 29, 2015
Commits on Mar 7, 2015
  1. @vslavik

    Only use NSCriticalAlertStyle for serious questions

    Don't use NSCriticalAlertStyle for wxICON_WARNING unconditionally, this
    was a violation of the OS X guidelines. According to the hig HIG,
    NSCriticalAlertStyle (aka caution icon) is only appropriate in rare
    cases and only if the user is performing a task that might result in the
    inadvertent and unexpected destruction of data.
    It therefore doesn't make sense to use it for information warnings, but
    only for _questions_, and so NSCriticalAlertStyle is only used if a
    combination of wxICON_WARNING with either wxYES_NO or wxCANCEL is used.
    vslavik committed Mar 7, 2015
  2. @vslavik

    Make semantic wxICON_XXX styles the canonical ones

    Make wxICON_WARNING and wxICON_ERROR the primary constants for their
    purpose and define their visual Windows-based synonyms wxICON_HAND and
    wxICON_EXCLAMATION in terms of the semantic ones, instead of the other
    way around.
    vslavik committed Mar 1, 2015
Commits on Jan 30, 2015
  1. @vslavik

    Avoid unneeded use of wxLocale in wxDateTime::Format()

    On OS X, wxDateTime::Format() uses wxString::Replace() to
    unconditionally replace locale-specific %c, %x and %X specifiers in the
    format string if present. Doing so causes three wxLocale::GetInfo()
    calls that are often not necessary.
    Check for the presence of these  specifiers before calling GetInfo().
    git-svn-id: c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
    vslavik committed Jan 30, 2015
  2. @vslavik

    Handle 5+ letter codes in TranslateFromUnicodeFormat()

    Unicode TR #35 v26 allows for five-letter (MMMMM) or even six-letter
    (EEEEEE) forms of some of the fields, but TranslateFromUnicodeFormat()
    asserts in these situations.
    Fix it to fall back to short forms for MMMMM and EEEEEE that are used in
    practice e.g. on OS X if the user has custom formatting settings.
    Consulting the table of sensible specifiers from, it appears these
    two were the only omissions in this function.
    git-svn-id: c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
    vslavik committed Jan 30, 2015
Commits on Jan 20, 2015
  1. @vslavik

    Use wxNB_MULTILINE in wxPreferencesEditor

    The size of the dialog in wxPreferencesEditor's generic implementation
    is determined from notebook pages alone and doesn't account for label
    size, which may be significantly longer in some languages (German,
    Danish). If the labels don't fit into the window, some of the tabs are
    hidden behind scroll buttons that are easy to overlook.
    Improve usability by using wxNB_MULTILINE, which will use multiple rows
    of tabs in this situation. This is what e.g. Internet Explorer does in
    its preferences as well.
    git-svn-id: c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
    vslavik committed Jan 20, 2015
Commits on Dec 7, 2014
  1. @vslavik

    Use int& type for argc in wxInitialize and wxInitializer

    Other functions that take (argc,argv) arguments (wxEntry, wxEntryStart)
    take argc by reference, because they may manipulate the arguments list.
    wxInitialize() used passing by value, so any modifications would be
    silently lost. Make all the functions consistent in their handling of
    argc by using int& everywhere.
    git-svn-id: c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
    vslavik committed Dec 7, 2014
  2. @vslavik

    Don't crash on OS X on exit if -NS* argument used

    When converting argv[] from char* to wchar_t* in ConvertArgsToUnicode(),
    keep an extra (shallow) copy of argc and the argv[] array so that it can
    be safely freed in FreeConvertedArgs().
    The reason is that other functions such as wxApp::Initialize() may
    modify argv[] and remove some arguments from it; this is indeed exactly
    what wxOSX does. After such changes, gs_initData.argv would no longer be
    in the original state and could contain e.g. duplicate pointers or be
    missing some of the pointers that we should free.
    git-svn-id: c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
    vslavik committed Dec 7, 2014
Commits on Dec 5, 2014
  1. @vslavik

    Xcode project: src/regex must be in non-user search path

    Otherwise it wouldn't be included as <regex.h> and the system copy would
    be used. We need to always use the builtin, wxChar-aware copy.
    git-svn-id: c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
    vslavik committed Dec 5, 2014
Commits on Nov 25, 2014
  1. @vslavik

    Refresh PO files after accelerators changes

    git-svn-id: c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
    vslavik committed Nov 25, 2014
  2. @vslavik

    Improve wxAcceleratorEntry::ToString() formatting

    This method used the wxKeyNames[] array originally intended for parsing
    accelerator specification and not for human-friendly formatting. In
    particular, non-alphanumeric keys such as WXK_DOWN and many others were
    formatted using all-uppercase name, which was highly unusual and not
    native on any platforms (the only unaffected one was OS X).
    Improve the formatting by doing the following:
    a) use Title case for the entries; because parsing is case-insensitive,
       this has no effect on it;
    b) add display_name field for keys where the symbolic name wasn't
       appropriate for display and set it for some of the keys that are
       likely to show up in menus;
    c) add explanatory comments for translators
    git-svn-id: c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
    vslavik committed Nov 25, 2014
  3. @vslavik

    Extract translator comments into wxstd.pot

    Extract the commonly used TRANSLATORS: prefix into translation files, to
    provide some additional context where needed.
    git-svn-id: c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
    vslavik committed Nov 25, 2014
  4. @vslavik

    Translate menu accelerators from XRC

    The content of <accel> property was taken verbatim and appended to the
    (translated) label; this bypassed wx's internal accelerators translation
    mechanism, because wxMenuItem code quite reasonably assumes that the
    string passed to it is translated.
    Explicitly use SetAccel() instead, to force translation. This matters
    for languages such as German where e.g. Ctrl+ is translated as Strg+.
    git-svn-id: c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
    vslavik committed Nov 25, 2014