Commit Graph

60097 Commits

Author SHA1 Message Date
Artur Wieczorek
a1c888437d Use dedicated IncBy method to increase wxSize value in propgrid sample.
Use this method instead of modifying directly wxSize data members.
2015-06-14 17:10:28 +02:00
Artur Wieczorek
87f0b6fe80 Fix and refactor wxString wxPGProperty::GetFlagsAsString and SetFlagsAsString.
Fixes the bug which could be observed if string containing more then one flag entry was provided to wxPGProperty::SetFlagsFromString. In this case property flags were not set properly (were not set all) due to the error in splitting the string into tokens (whole string instead of its individual token was taken to compare).
Lookup table used to map between flag values and their names is redesigned in order to reduce the size and to make indexing simpler. There are no longer NULL entries in the table and every flag name is identified explicitly by the corresponding flag value and not by the index of the name entry in the table. Thanks to this the relation between flag value and flag name is more clear and the loops in wxPGProperty::GetFlagsAsString/SetFlagsAsString can be simplified.
2015-06-14 17:07:24 +02:00
Artur Wieczorek
2bc4357088 Added unit test of wxPGProperty::SetFlagsAsString/GetFlagsAsString methods in propgrid sample.
This unit test will be executed for fast and full test. For each property there are generated random flags which are set with wxPGProperty::SetFlagsAsString(). Verification whether flags were set properly is done using wxPGProperty::GetFlagsAsString() and wxPGProperty::HasFlag() methods.
2015-06-14 16:56:06 +02:00
Vadim Zeitlin
14425f990c Correctly deinitialize wxUxThemeEngine in wxMSW.
Set ms_isThemeEngineAvailable to -1, meaning that we need to reinitialize
themes, instead of false, meaning that themes are not available.

This fixes problems when the library is initialized, shut down and then
initialized again.

Closes #17023.
2015-06-14 14:01:55 +02:00
Artur Wieczorek
6d29584b48 Use wxLogDebug instead of wxLogMessage to log column resizing with splitter in propgrid sample.
wxLogMessage displays message in pop-up window what prevents dragging the splitter and hence resizing cannot be in practice done. wxLogDebug is sufficient for the logging purposes in this place.
2015-06-13 22:39:16 +02:00
Artur Wieczorek
5d763571b0 Use pre-increment operator to increment iterator in the loop (propgrid sample).
When the return value is ignored, the ++it is never less efficient than the it++.
2015-06-13 22:32:14 +02:00
Artur Wieczorek
dc3f451acb Use empty() member function to determine if arrays are empty in propgrid sample.
Use this dedicated function instead of checking if size()/GetCount() functions return zero/non-zero value.
2015-06-13 22:30:13 +02:00
Artur Wieczorek
8ff74b727a Fixed minor typos in comments and strings in propgrid sample. 2015-06-13 22:28:28 +02:00
Artur Wieczorek
e4023cccc1 Removed unused identifier from propgrid sample. 2015-06-13 22:25:48 +02:00
Artur Wieczorek
8e2f1b47aa Use wxS macro with string literals.
To make string literals notation consistent.
2015-06-12 23:39:00 +02:00
Artur Wieczorek
4d4ece53f1 Use wxEmptyString instead of wxString().
To keep uniform notation of empty strings.
2015-06-12 23:35:17 +02:00
Vaclav Slavik
09e1fbef70 Fix MinGW and VC8 compilation error
3a8ad952 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.
2015-06-12 19:47:36 +02:00
Vadim Zeitlin
6037ce0e6f Disable unit test sporadically failing in wxGTK buildbot builds.
This failure seems to only happen on buildbot, at least it couldn't be
reproduced after 100 runs of the test locally, so it just doesn't seem
possible to debug it.

Disable it to allow detecting when other tests fail (which would be
unexpected, unlike this one).
2015-06-12 15:57:33 +02:00
Vadim Zeitlin
1c78ede551 Fix use of SetContainingSizer() in wxWrapSizer code.
Calling SetContainingSizer() on a window which had been contained in another
sizer previously asserts since efce9b2306, so
change wxWrapSizer to set the containing sizer to NULL before resetting it.
2015-06-12 14:34:26 +02:00
Catalin
6e72126894 Correctly map MAC_CHARSET to wxFONTENCODING_MACROMAN in wxMSW.
Recognize MAC_CHARSET when mapping MSW charsets to wx font encodings.
2015-06-12 13:41:33 +02:00
Vaclav Slavik
3a8ad95230 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
dialogs.
2015-06-11 19:35:04 +02:00
Artur Wieczorek
6cc7811394 Fixed minor typos in comments.
Yet another iteration.
2015-06-09 20:04:27 +02:00
Artur Wieczorek
c9417c41f5 Fix PCH-less build after cb6efbd.
Add missing wx/settings.h inclusion.
2015-06-09 18:03:56 +02:00
Artur Wieczorek
aeed3322f2 Fixed minor typos in comments. 2015-06-08 21:49:38 +02:00
Artur Wieczorek
c8088e479a Fixed minor typos in the name of variables. 2015-06-08 21:48:08 +02:00
Artur Wieczorek
cb6efbd3c3 Lay out various wxPG dialogs based on the current system screen design.
Currently, customizing some dialogs for small screen environment is done statically on the build stage by setting wxPG_SMALL_SCREEN to 1 (what is done for WXWINCE only).
Instead, we can do this for all platforms in a dynamic manner, based on the classification provided by wxSystemSettings::GetScreenType() function.
In order to do so there is introduced a static helper function wxPropertyGrid::IsSmallScreen() which is used to select right parameters (size, position) for several dialogs in order to display them correctly on the small screen.
2015-06-08 21:46:03 +02:00
Vadim Zeitlin
8367c3c0ca Czech translations update from Zbyněk Schwarz . 2015-06-08 18:10:32 +02:00
IlyaBizyaev
f2132ac0f3 Fixed more typos in the STC sample.
Replaced all occurrences of "hilight" with "highlight".
2015-06-08 01:16:51 +02:00
orbitcowboy
2afddd5e22 Fix some typos in the samples.
Mostly in the comments, but also a couple in the user-visible strings.
2015-06-08 01:14:47 +02:00
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