Commit Graph

58476 Commits

Author SHA1 Message Date
Václav Slavík
6e35d4bc6b 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
http://userguide.icu-project.org/formatparse/datetime, it appears these
two were the only omissions in this function.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78424 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-30 15:53:17 +00:00
Vadim Zeitlin
f047d93c6a Fix wxEVT_TREE_STATE_IMAGE_CLICK generation in wxMSW wxTreeCtrl.
Use GET_{X,Y}_LPARAM() to extract them from the event position, which handle
negative coordinates (and coordinates can perfectly well be negative when
using multiple displays) correctly, unlike {LO,HI}WORD().

Closes #16812.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78419 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-27 11:49:44 +00:00
Václav Slavík
14f052a768 Allow disabling SetProcessDPIAware() call
Add Windows-specific wxMSWDisableSettingHighDPIAware() function then can
be called before startup (i.e. wxEntry() call) to disable wxWidgets'
handling of DPI awareness. This is useful for code embedded in non-wx
applications as well as for purely wx application that are not
HiDPI-ready (although the latter has the option of forcing
dpiAware=false in the manifest).

See also https://groups.google.com/d/msg/wx-dev/Z0VpgzCY34U/f1FfPqGDppMJ
and #16116.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78406 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-24 15:00:03 +00:00
Julian Smart
f4ac4fcab6 Remove selection before container is deleted or it could cause a crash later.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78397 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-21 14:31:04 +00:00
Václav Slavík
30ebabc9d0 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: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78396 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-20 15:26:56 +00:00
Tim Kosse
1bc8f00b82 Fix memory leak introduced in r78183: wxMenuItemBase::SetAccel does not take ownership of the passed pointer nor keeps it for later use.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78394 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-20 15:01:19 +00:00
Vadim Zeitlin
a2d8746ba7 only flush a client dc if it was not inheriting the native CGContextRef from an outside paint context, fixes #16334
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78356 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-08 14:11:05 +00:00
Vadim Zeitlin
c489816251 Fix wxBitmap conversion to wxImage in 64-bit wxOSX builds.
Don't assume that sizeof(long) == 4, this is just wrong.

Closes #16770.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78354 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-06 20:08:25 +00:00
Tim Kosse
440e477ea7 On wxMac, modal event loops avoid deleting pending objects. Hide the text control after editing a label in the generic tree control so it does not remain visible e.g. if the tree control is used in a dialog.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78350 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-05 12:49:41 +00:00
Vadim Zeitlin
ef5232d289 Fix wxFileDialog::GetFilterIndex() when opening files in wxOSX.
Update m_filterIndex in the "opening" case, just as we already did in the
"saving" one (see #13158 and r67550).

Closes #16764.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78345 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-03 20:45:13 +00:00
Robin Dunn
4ae6049401 a commit to test Trac/SVN integration. Closes #16754
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78331 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-31 23:36:18 +00:00
Robin Dunn
d2f140abff just another test commit
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78330 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-31 22:25:00 +00:00
Robin Dunn
618e1a1891 just a test commit
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78329 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-31 22:20:45 +00:00
Vadim Zeitlin
e91a996fa4 Make disabling submenus work in wxMSW.
As submenu items don't have a valid ID, we need to address them by their
position when calling EnableMenuItem() -- and for simplicity do it for all the
items.

Closes #16747.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78323 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-27 14:17:51 +00:00
Vadim Zeitlin
7a8cfc7964 Fix handling of fast clicks in wxRibbonBar under MSW.
Second click can result in a double click event instead of the usual simple
click if it happens quickly enough after the first one, so handle double
clicks in the same way as simple clicks instead of ignoring them.

Closes #16551.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78322 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-27 14:17:46 +00:00
Tim Kosse
a2b3702934 Add Windows 10 support to wxGetOsDescription(). Map Windows 10 to wxWinVersion_8 in wxGetWinVersion() to not change ABI.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78285 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-20 10:15:51 +00:00
Paul Cornett
2decc6f669 guard functions with wxCHECK_* macros rather than wxASSERT_*
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78281 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-17 17:44:06 +00:00
Vadim Zeitlin
01b12b8839 No real changes, just fix some typos in comments in the samples.
Closes #16734 (for 3.0).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78276 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-16 20:15:56 +00:00
Vadim Zeitlin
f7cf6e1e9e Fix inserting tools removed from wxToolBar back into it in wxMSW.
Make sure to reset the "to be deleted" flag we set on the tool when removing
it from the toolbar to avoid layout problems if the tool is added back later.

Closes #16735 (for 3.0).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78275 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-16 20:15:51 +00:00
Stefan Neis
e086d73560 No real changes, just fixed a couple of typos in comments, fixes #16726.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78271 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-14 11:12:31 +00:00
Paul Cornett
1f054661a4 Allow setting icon before m_widget is valid.
There is no need to require a valid m_widget,
the "realize" handler will take care of things later.
Closes #16731


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78270 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-13 17:40:29 +00:00
Tim Kosse
c7e52048e6 In wxMBConvStrictUTF8::ToWChar the length of a multibyte UTF-8 sequence is obtained from a table, with the leading byte as offset. Later in that function, the prefix of the leading byte is compared against the expected prefix for the given length.
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
2014-12-11 20:31:31 +00:00
Paul Cornett
7a50451196 avoid generating wxEVT_CHAR when WriteText() is called from wxEVT_CHAR handler, closes #16717
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78263 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-11 18:34:37 +00:00
Václav Slavík
ef6a412dcf 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: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78256 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-07 16:40:39 +00:00
Vadim Zeitlin
24490bc933 Remove .cvsignore files from expat sources.
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
2014-12-07 13:46:30 +00:00
Vadim Zeitlin
70f3c3023d Don't keep out of date column widths in generic wxDataViewCtrl.
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
2014-12-05 22:15:28 +00:00
Václav Slavík
f0c6aa2478 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: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78217 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-05 15:56:02 +00:00
Robin Dunn
163f2169ed Allow explicitly selecting the carbon build since it is not the default anymore.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78202 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-27 22:23:49 +00:00
Robin Dunn
a20ff140f1 Add gtk3 build support
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78201 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-27 22:23:31 +00:00
Václav Slavík
8ce2d4d9ea Refresh PO files after accelerators changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78186 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-25 19:05:24 +00:00
Václav Slavík
c37ab7266f 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: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78185 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-25 19:05:10 +00:00
Václav Slavík
bfd939027c 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: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78184 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-25 19:05:07 +00:00
Václav Slavík
4509ef837d 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: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78183 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-25 19:05:04 +00:00
Václav Slavík
2568dec27f Close NSWindows properly
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
2014-11-25 18:23:26 +00:00
Václav Slavík
9b9b96b88b Skip Cocoa's options in wxCmdLineParser on OS X
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
2014-11-24 13:45:21 +00:00
Paul Cornett
8f1792829e Remove gtk_tree_view_set_fixed_height_mode() call from AssociateModel()
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
2014-11-22 19:12:41 +00:00
Paul Cornett
8918fb945a fix assert in dataview sample, closes #16679
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78169 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-21 17:20:04 +00:00
Paul Cornett
f037cbbc88 fix "wrong type" error when using wxDataViewChoiceByIndexRenderer, closes #15955
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78168 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-21 17:00:29 +00:00
Paul Cornett
4dccdf3749 fix crashes in wxGTK3 when running with non-X11 backend, see #16688
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78167 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-20 17:04:13 +00:00
Bryan Petty
b32e89eb64 Backported Doxygen 1.8.8 upgrade to 3.0 branch.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78166 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-19 23:25:12 +00:00
Václav Slavík
915a35aa96 Fix disabling wxStaticText repeatedly in wxOSX.
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
2014-11-12 15:11:13 +00:00
Vadim Zeitlin
6389c36e9b Use wxFILTER_EXCLUDE_CHAR_LIST in the sample.
It makes more sense than wxFILTER_EXCLUDE_LIST with SetCharExcludes().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78142 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-12 12:37:03 +00:00
Paul Cornett
574a636640 fix creating wxFont with non-ascii name, closes #16671
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78141 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-12 07:43:06 +00:00
Vadim Zeitlin
6b9910ac8c Fix size of the icon returned from wxFSVolume::GetIcon().
Calling SetHICON() is not enough, the icon size already needs to be set or,
even better, CreateFromHICON(), which does both atomically, should be used.

Closes #16672.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78122 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-11 00:59:13 +00:00
Vadim Zeitlin
386feaba50 Re-add wxFD_OVERWRITE_PROMPT and wxFD_FILE_MUST_EXIST to wxGenericFileDialog.
Support for these styles was accidentally removed in r48733, re-add them back.

Closes #16652.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78121 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-11 00:59:08 +00:00
Vadim Zeitlin
a29874984a German translation fixes from Sebastian Walderich.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78120 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-11 00:59:05 +00:00
Vadim Zeitlin
d2962540ff Update the out of date link to DebugView in logging overview.
The readable link that existed before is unfortunately not available any more.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78119 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-11 00:59:02 +00:00
Vadim Zeitlin
b3dc6b7ba2 Fix best size calculation for buttons with bitmaps in wxMSW.
Add the bitmap margins to the bitmap size, not the total button size.

This fixes the buttons becoming unnecessarily tall as soon as they were
assigned even a tiny bitmap.

Closes #16536.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78118 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-11 00:58:58 +00:00
Vadim Zeitlin
58d415807b Set the initial text value of wxSpinCtrlGeneric correctly.
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
2014-11-11 00:58:52 +00:00
Paul Cornett
a25c714163 avoid reconfiguring scrollbar when settings are not changing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78115 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-10 17:40:36 +00:00