Commit Graph

60123 Commits

Author SHA1 Message Date
Artur Wieczorek
d30c075a22 Use wxID_ANY symbol for controls in propgrid sample.
Don't use arbitrary control ID's.
2015-06-07 23:14:37 +02:00
Artur Wieczorek
1d9c1b35fd Use pre-increment operator to increment iterator in the loop.
When the return value is ignored, the ++it is never less efficient than the it++.
2015-06-07 23:05:42 +02:00
Artur Wieczorek
06013ea36f Reduce the scope of variables using to index single loop only.
And adjust their types if necessary.
2015-06-06 17:55:39 +02:00
Artur Wieczorek
213df7dd88 Use conditional operator instead of conditional statement in wxBoolProperty::ValueToString. 2015-06-06 17:48:59 +02:00
Roberto Perpuly
aa5dbad410 Use FSEvents in wxFileSystemWatcher on OS X
The FSEvents API allows for creating watches in entire trees of
directories in an efficient manner.

Closes #16969.
2015-06-06 02:37:35 +04:00
Roberto Perpuly
f0e098fa06 Re-enable running FS watcher test on OS X
Use a workaround to compensate for the differences between a non-GUI and
GUI event loop with wxOSX. This allows the FS watcher tests to pass
(previously it would hang) under OS X without having to move the tests
to the test GUI application (where the tests do pass on OS X already,
without needing this workaround).

See #16969.
2015-06-06 01:29:52 +04:00
Roberto Perpuly
bb14d8e131 Fix re-running aborted FS watcher test
If the test is interrupted and run again an assert is raised because the
temporary fswatcher_test dir has had no chance to be deleted and still
exists. Fix this by removing the dir before each test.
2015-06-06 01:29:52 +04:00
Artur Wieczorek
ccd98c6ad9 Refactor: use <<= bit shift assignment operator in wxPGProperty::GetFlagsAsString.
Use it instead of << operator which is used to just shift bits in one variable.
2015-06-05 22:49:49 +02:00
Artur Wieczorek
3e3aaa33db Refactor string manipulations in wxPropertyGrid::ExpandEscapeSequence and CreateEscapeSequences.
Share wxString::clear() method to initialize empty destination string.
2015-06-05 22:47:28 +02:00
Vadim Zeitlin
efce9b2306 Improve detection of attaching windows to more than one sizer.
It's not only an error to insert a window twice into the same sizer, it's
already an error, and even a more insidious one, to insert it twice into
different sizers, so guard against this as well as debugging it (much) later,
when the window and the sizer is destroyed is much less fun.
2015-06-05 01:36:42 +02:00
Dimitri Schoolwerth
31145b8e3a Fix some typos, no code changes (besides strings) 2015-06-05 02:54:46 +04:00
Artur Wieczorek
8d9a9e286b Replaces references to wxT("") with wxEmptyString in propgrid sample. 2015-06-04 22:53:30 +02:00
Artur Wieczorek
f7322af25e Replace wxChar with wxStringCharType in wxPropertyGrid code. 2015-06-04 22:51:34 +02:00
Ilya Bizyaev
5973ad196e Delete dummy.txt 2015-06-04 19:26:46 +02:00
Ilya Bizyaev
9af0936673 Delete dummy
This file seems to be obsolete and not required any more.
2015-06-03 17:17:38 +02:00
Jan van Dijk
d2c1fce24e Further work around for clang warnings about typeid() side effects.
Apparently in some versions of the compiler even simply dereferencing a
pointer inside typeid() still provokes -Wpotentially-evaluated-expression.
Avoid this by dereferencing it outside and only using typeid() with
references.

Closes #16968.
2015-06-03 17:11:29 +02:00
Jan van Dijk
72a4c3a4d0 Don't test if a reference is null, this cannot happen.
Testing for null references is unnecessary and just results in clang warnings.

Closes #17016.
2015-06-03 17:08:30 +02:00
Bryan Petty
09e1223d2e Merge pull request #32 from catalinr/fixed_code_comments
Fixed wxAppConsole spelling in the comments.
2015-06-03 08:43:45 -06:00
Catalin
d31cfba540 Fixed wxAppConsole spelling in the comments. 2015-06-03 17:14:09 +03:00
Jan van Dijk
5aae7c7387 Work around clang warning about side effects inside typeid().
This warning was harmless but very annoying as it was given for each and every
inclusion of this header.

Closes #16968.
2015-06-02 02:07:39 +02:00
Artur Wieczorek
85a76d2d61 Fix calculating width of columns in the wxPG header.
When calculating widths of columns in the header there is necessary to take into account also width of the vertical scrollbar in the grid, if it exists. When scrollbar is ignored in calculations then we get wrong width of internal border and in result the columns of the header don't match the columns of the grid (this issue can be observed in the propgrid sample).
2015-06-01 20:19:11 +02:00
Artur Wieczorek
2d5beca260 Refactor: share duplicated code in the internal class wxPGHeaderCtrl.
Because code responsible for determining widths of all columns is duplicated in OnPageUpdated() and OnColumWidthsChanged() methods it can be moved to the new shared method DetermineAllColumnWidths().
Method DetermineColumnWidth() used now to determine width of the one column only is no longer necessary and can be removed.
2015-06-01 20:06:58 +02:00
Vadim Zeitlin
39b9a6bbeb Don't generate bogus root item selection events in wxMSW wxTreeCtrl.
Setting focus to the control when receiving a selection event can result in
another selection event being generated by the control itself if it hadn't had
any selection before, which is completely artificial, i.e. doesn't correspond
to any user action, and so has to be suppressed.

Closes #16999.
2015-06-01 00:40:26 +02:00
Vadim Zeitlin
e78b57308f Get rid of wxListCtrl::m_count in wxMSW.
This simplifies the code and fixes the bug with GetItemCount() returning wrong
(old) value in wxEVT_LIST_INSERT_ITEM event handler as m_count wasn't updated
by then yet.

Closes #3793.
2015-06-01 00:32:09 +02:00
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