Commit Graph

60199 Commits

Author SHA1 Message Date
Vadim Zeitlin
5cdace59e8 Remove redundant call to wxGenericDirCtrl::Init() from Create().
Only ctors call Init(), by convention, and doing it again from Create() is
unnecessary.
2015-06-01 00:22:52 +02:00
Vadim Zeitlin
de252e1f4d Copy wxpoem.idx to the build directory in wxPoem makefiles.
Closes #17014.
2015-06-01 00:00:25 +02:00
Vadim Zeitlin
6a3cc8171b Remove declaration of wxWindow::GetAdjustedMinSize().
This deprecated method was never actually defined, so could never be used. The
fact that nobody complained about it would seem to be an indication that it is
not used anywhere, so just remove it.

See #17007.
2015-05-31 23:29:02 +02:00
Vadim Zeitlin
af3a5c8cb4 Avoid harmless warnings about non-virtual wxMSWOwnerDrawnButtonBase dtor.
Make the dtor protected to ensure that it's impossible to delete objects via
it as this is not supposed to be ever done anyhow.

Closes #17005.
2015-05-31 23:24:40 +02:00
Artur Wieczorek
9c9f80223b Exclude header demonstration in propgrid sample when wxUSE_HEADERCTRL == 0.
Code responsible for header demonstration should be excluded in this case because header management functions in wxPropertyGridManager depend on wxHeaderCtrl (via wxPGHeaderCtrl) and if it is not present then respective methods in wxPG are not exposed.
2015-05-31 19:20:17 +02:00
Artur Wieczorek
7d6f71bc5e Replaces references to wxS("") with wxEmptyString in wxPG. 2015-05-31 19:20:14 +02:00
Artur Wieczorek
67bfb78ace Replace wxT() with wxS() in wxPropertyGrid code. 2015-05-31 19:20:11 +02:00
Artur Wieczorek
5decea57f4 Don't declare wxPropertyGridManager::SetColumnTitle if wxUSE_HEADERCTRL == 0.
This method already has no definition in this case so there is no reason to declare it.
2015-05-31 19:20:08 +02:00
Vadim Zeitlin
f6d5f9728c Don't use arrays indexed by font weight/styles in wxSVGFileDC.
This is not natural for the non-consecutive values of the font styles and
doesn't properly check for the array indices being valid, resulting in static
analysis tools warnings about a possibly out of bound array access.
2015-05-31 18:14:17 +02:00
Vadim Zeitlin
c485f44ba0 Use GetMenuItemInfo() instead of GetMenuString() in wxMSW MDI code.
This allows to detect errors with retrieving the item label more reliably as
GetMenuItemInfo() sets the last error correctly while GetMenuString() doesn't
seem to always do it and some users report apparently bogus debug messages
about its failure.
2015-05-31 18:00:44 +02:00
Dimitri Schoolwerth
7cacde3b84 Re-enable symbols visibility support for the Clang compiler
Visibility support for Clang was disabled in 7198c33 because of linking
errors when building shared libraries, related to non-inline methods in
exported template classes.

The last Clang version to have these problems is version "4.1
(tags/Apple/clang-421.11.66)" as part of Xcode 4.5.2, and the next
release fixes them (version "4.2 (clang-425.0.24)", Xcode 4.6). Check
for the Clang version and only disable visibility support when compiling
with Apple Clang < 4.2.

Note that Apple Clang 4.2 is based on official Clang 3.2 so also check
for that version in case of non-Apple builds. The only official Clang
that has been tested successfully is 3.4 which worked fine with
visibility. Other versions that were tried (3.1 and 3.2) segfault while
compiling wx.
2015-05-31 03:08:17 +04:00
Dimitri Schoolwerth
c76c79a238 Change output of abicheck.sh
Besides the symbol name field also keep the field for the symbol type as
outputted by nm.
2015-05-31 03:07:16 +04:00
Dimitri Schoolwerth
6be7e28199 Change a reference to a doc section
Refer to a section by (partial) name instead of indexed number (a
leftover from before these docs were changed to use markdown).
2015-05-31 03:04:02 +04:00
Artur Wieczorek
be401b4532 Use wxID_ANY symbol for controls in propgrid sample. 2015-05-30 20:19:00 +02:00
Artur Wieczorek
65dee275f2 Fix minor typos in comments. 2015-05-30 20:12:02 +02:00
Artur Wieczorek
ff685a7a4c Use wxID_ANY symbol for internal wxPG controls. 2015-05-30 20:10:09 +02:00
Artur Wieczorek
6299874971 Use wxSizerFlags when constructing sizers in propgrid sample.
Use it instead of multiple argument wxSizer::Add() overload.
2015-05-30 18:33:25 +02:00
Vadim Zeitlin
ef30f6fe63 Fix recently added wxFileName::MakeRelativeTo() unit test for non-Unix.
Don't hard code the use of slashes as path separators.
2015-05-30 03:38:03 +02:00
Artur Wieczorek
6dfd6f4930 Use wxSizerFlags instead of multiple argument Add() overload when constructing sizers in wxPG.
Set sizer flags in wxLongStringProperty::DisplayEditorDialog and wxPGArrayEditorDialog::Create in this more convenient way.
2015-05-29 21:05:30 +02:00
Artur Wieczorek
a210cb0bbf Don't use wxALIGN_CENTRE_VERTICAL flags when adding item to the vertical sizer in wxPG.
This flag shouldn't be used in vertical sizers (in wxLongStringProperty and wxPGArrayEditorDialog) because vertical alignment flags are ignored in such sizers and the assertion message is thrown in wxBoxSizer::DoInsert. This can be observed e.g. in propgrid sample when there is launched wxLongStringProperty or ArrayDoubleProperty editor.
2015-05-29 20:56:42 +02:00
Vadim Zeitlin
ee0536f964 wxOSX: don't call strlen() on possibly null pointer.
Use wxCharBuffer::length() instead, this is more efficient and safer as it
correctly returns 0 in case the conversion fails.

Closes #9967.
2015-05-29 16:35:44 +02:00
Vadim Zeitlin
fda09f917a Fix wxFileName::MakeRelativeTo() for directory relatively to itself.
The expected result in this case is ".", but the filename became empty instead
when wxPATH_NATIVE was used.

Fix this by examining GetFormat(format), which takes care of mapping
wxPATH_NATIVE to its real value, instead of wxPATH_NATIVE itself.

Also add a unit test verifying that this works as expected.

Closes #17010.
2015-05-29 16:23:17 +02:00
Catalin
e606d83e88 Improved wxStandardPaths docs. 2015-05-29 16:46:33 +03:00
Artur Wieczorek
0508087ce2 Reduce the scope of variables using to indexing single loop only.
And adjust their types if necessary (to have uniform types in the test expression).
2015-05-28 19:39:14 +02:00
Artur Wieczorek
6908275ed2 Use wxDynamicCast() instead of IsKindOf() checks. 2015-05-28 19:20:12 +02:00
Vadim Zeitlin
ee973e1fe7 Add more wxString::Format() positional parameters tests.
Verify that repeating positional parameters does work with wxString::Format()
instead of keeping these tests commented out in wxVsnprintf() tests, which are
not run at all if we're using the compiler-provided vsprintf().

Closes #9367.
2015-05-28 14:12:48 +02:00
Artur Wieczorek
01cf62684c Use wxPGProperty::GetDepth() getter.
Use it instead of getting direct access to the corresponding member variable.
2015-05-27 21:15:28 +02:00
Artur Wieczorek
f740e5f784 Optimize wxNumericPropertyValidator::Validate method.
Remove second unnecessary casting from wxWindow to wxTextCtrl and use wxTextCtr::IsEmpty() function to check directly if the text control contains any text instead of examining retrieved string value.
2015-05-27 21:13:09 +02:00
Dimitri Schoolwerth
3f94084e29 Add DND move support on OS X
The drag mask passed by Cocoa is conservative and doesn't include
NSDragOperationMove which was added later. Override
draggingSourceOperationMaskForLocal to include that flag if it's wanted.

This also moving of text the default behaviour.

Closes #13819.
Closes #14726.
2015-05-27 20:20:17 +04:00
Dimitri Schoolwerth
143a8203bd Fix dragging always resulting in wxDragLink on OS X
Commit f40e8bf uncovered a problem with dragging where when the
NSDragOperationLink bit is set in the drag mask (which by default always
is the case) the result is a wxDragLink operation instead of wxDragCopy
or wxDragMove. To fix this give priority to move and copy instead when
converting the drag mask to a wxDrag result.

This fixes copying through DND in wxRichTextCtrl.

See #13819.
2015-05-27 20:20:12 +04:00
Dimitri Schoolwerth
f40e8bff69 Fix mouse cursor not changing on OS X during DND
The cursor almost always looks like the one used for copying. Add
missing breaks in a switch statement to fix this.

See #14726.
2015-05-27 20:10:39 +04:00
Dimitri Schoolwerth
ddbfe5720e Refactor some DND code in wxOSX/Cocoa
To reduce duplication of the same changes, merge the nearly identical
wxWidgetCocoaImpl::draggingEntered and draggingUpdated into private
function wxOnDraggingEnteredOrUpdated.
2015-05-27 19:08:22 +04:00
Dimitri Schoolwerth
35a68ef4ce Reduce height of frame in DND sample
Instead of moving the frame up every time to be able to reach the
dragging section at the bottom, change the sizer proportion of the log
control in the middle to reduce the frame's height.
2015-05-27 18:13:24 +04:00
Artur Wieczorek
bb27596219 Use wxPropertyGridPage::GetToolId() getter to get tool ID.
Use it instead of getting direct access to the corresponding member variable.
2015-05-26 21:15:19 +02:00
Artur Wieczorek
a6bdfa7fd0 Use variable of type wxEventType to store the value returned by GetEventType function.
Since wxEvent::GetEventType() returns wxEventType value the variable used to hold returned value should be also of the same type.
2015-05-26 21:13:13 +02:00
Artur Wieczorek
7e14b6e61f Fixed setting validation flags in the editor validation function (wxPropertyGrid::DoEditorValidate).
Currently, validation flags are initialized when post-process validation is invoked (in wxPropertyGrid::PerformValidation) and when first editing operation fails earlier on the pre-process validation (in wxPropertyGrid::DoEditorValidate) then these flags are not initialized and no validation error message is displayed.
Hence validation flags should be initialized in both validation functions.
2015-05-26 21:09:30 +02:00
JulianSmart
5251766edc Merge branch 'master' of https://github.com/wxWidgets/wxWidgets 2015-05-26 12:17:38 +01:00
JulianSmart
cbb9c722cb Use OnEndSession/OnQueryEndSession events instead of calling the functions directly. 2015-05-26 12:16:23 +01:00
Artur Wieczorek
be69f99317 Use getter functions to get access to some properties of wxPropertyGridPageState, cont.
Use existing DoGetRoot(), GetRoot(), GetVirtualWidth() functions instead of getting direct access to the corresponding member variables.
2015-05-25 22:48:47 +02:00
Artur Wieczorek
41201d661e Use embedded wxMax function to obtain largest of two values when calculating bitmap dimension. 2015-05-25 22:45:40 +02:00
Johannes Maibaum
2e5df8746a Use today as default date in wxDatePickerCtrl under OS X too.
This makes the behaviour consistent with the documentation and other ports.

Closes #29.
2015-05-25 16:37:31 +02:00
Dimitri Schoolwerth
94f8d80b6a Add OS X support to abicheck.sh
Make abicheck.sh work with *.dylib files and the nm that comes with
Xcode.
2015-05-25 04:38:08 +04:00
Artur Wieczorek
fec5f36139 Use getter functions to get access to some properties of wxPropertyGridPageState.
Use existing GetColumnCount(), GetColumnWidth() functions instead of getting direct access to corresponding member variables.
2015-05-24 20:44:20 +02:00
Artur Wieczorek
b3ad8dae84 Use empty() member function to determine if arrays are empty in wxPG.
Use this dedicated function instead of checking if size() function returns zero/non-zero value.
2015-05-24 20:36:44 +02:00
Artur Wieczorek
09a78c77d0 Fix assertion statement in wxPropertyGridManager::GetPageRoot.
Simple wxASSERT should be replaced with wxCHECK_MSG to return NULL if index is out range.
2015-05-24 20:33:15 +02:00
Vadim Zeitlin
7e215ee069 Ensure that Unix wxJoystick closes the associated device.
Close the device file descriptor in the dtor instead of doing it in the thread
used to poll it, this is more straightforward and ensures that it happens even
if the thread failed to run for whatever reason.
2015-05-24 02:55:16 +02:00
Vadim Zeitlin
b6e5a0a679 Try to avoid crashing in wxGTK wxCairoContext ctor.
Don't use an uninitialized pointer in wxCairoContext ctor from wxPrinterDC in
wxGTK if retrieving Cairo context of the DC failed, set m_context to NULL in
this case (not sure if this is still not going to crash when used in
cairo_translate() below though).
2015-05-24 02:51:54 +02:00
Vadim Zeitlin
d07c4cb826 Really fix check for maximal argument number in wxPrintf().
Increment nargs before comparing it with wxMAX_SVNPRINTF_ARGUMENTS, if the
comparison is true for the post increment, the value is already invalid.
2015-05-24 02:47:00 +02:00
Vadim Zeitlin
5a9ce576a2 No changes, just remove an unused variable.
Get rid of the g++ warning about it.
2015-05-24 02:00:34 +02:00
Vadim Zeitlin
982ebc8741 Simplify wxGIFHandler::LoadFile().
Don't use heap-allocated wxGIFDecoder when a stack-allocated object would do
just as well.

Don't handle errors different from the defined wxGIF_XXX constants: they can
never happen because LoadGIF() has no way of returning them.

Don't check for "ok" variable being false when it was set to true and never
changed until this check.
2015-05-24 01:53:11 +02:00