Unless the table is faulty, this comparison can never fail. It is thus redundant and not needed. As optimizing compilers aren't smart enough yet to detect this, this commit removes the redundant check.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78265 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
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: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78256 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These files shouldn't be included in the distribution and it's simpler to just
remove them, as it is pretty unlikely that a new Expat release is going to be
made, and even less likely that it would still use CVS if it does happen, than
to filter them out from the distribution creation scripts.
Closes#16711.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78252 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The cached widths need to be invalidated whenever an item is expanded or
collapsed, whether it's done programmatically (which was already handled) or
interactively by the user (which wasn't).
Closes#16678.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78218 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
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: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78185 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
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: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78183 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't just release the window, call the close method. This is usually
the same, but in some situations, the difference (close sends
NSWindowWillCloseNotification, which wx doesn't use) is significant.
In particular, if the window is shown as fullscreen, OS X won't dispose
of its space correctly when the window is released, but not closed
first. See https://github.com/vslavik/poedit/issues/119
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78178 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Skip Cocoa-specific flags used by Xcode (such as -AppleLanguages) on OS
X when parsing the command line. They all take a single argument, so
skip both the flag and the following value in the argv list.
Also fix handling of -ApplePersistenceIgnoreState, which didn't skip the
value as it should.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78172 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The check for wxDV_VARIABLE_LINE_HEIGHT is already done in Create(), and the
IsVirtualListModel() check was probably an attempt to get around a performance
problem (#16680), but it's not a valid criteria for changing the height mode.
closes#16683
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78170 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Changes in r78108 would reset control's color to gray if it was disabled
more than once in a row. Guard against this and only remember the color
of an enabled control.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78145 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The text control was left empty if the string value was not specified, but
it should use the numeric initial value instead in this case.
This notably affected wxSpinCtrlDouble under non-GTK platforms.
Closes#16621.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78117 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxStaticText emulates disabled state on OS X by changing text color to
light grey. When re-enabling the control, though, it always set the
color to the standard text color, which broke static texts with a custom
color.
Fix this by keeping track of the original color and restoring it back
when setEnabled:YES is called.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78108 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxOSX's wxToolBar code uses toolbar size computed by
AdjustToolBitmapSize() to determine which of the builtin toolbar sizes
to use. Because AdjustToolBitmapSize() returned 2x the "logical" size,
it would always pick NSToolbarSizeModeRegular regardless of icon size,
resulting in differently-sized toolbar on HiDPI and low-DPI screens.
Use scaled size instead.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78088 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Opening the font dialog would result in an exception in
RunMixedFontDialog:
-[NSView resetFlags]: unrecognized selector sent to instance 0x6080001285c0
The code in question assumed that NSFontPanel's accessory view either
didn't exist or was created by wx, and casted it to
wxMacFontPanelAccView* without checking. But this assumption is no
longer true on OS X 10.10, the view is apparently pre-set to some
default NSView instance.
Fix the code to check accessoryView's class before treating it as
wxMacFontPanelAccView.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78071 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add EXTRALIBS_WEBVIEW similar to the existing EXTRALIBS_MEDIA and such and set
it in configure instead of adding libwebkitgtk and dependent libraries
directly to GUI_TK_LIBRARY.
This ensure that the core library doesn't have any dependencies on
libwebkitgtk which it doesn't need.
Closes#16624.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78027 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775