Don't send wxEVT_PG_SELECTED event when wxPG is ordered to unselect current property but no property is actually selected.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78519 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Added wxArrayDoubleProperty::ValidateValue() method checks if pending value is of proper type (wxArrayDouble). Pending value of improper type is used to signal that invalid numeric value was entered into the edit field.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78513 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Platforms that don't make use of wxGaugeBase::Create when creating a
wxGauge (such as GTK and MSW) access the uninitialised
m_appProgressIndicator. Fix by initialising m_appProgressIndicator to NULL
in the wxGaugeBase constructor. Regression since r78499.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78512 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This avoids failing to set the host name if the system /etc/hosts file has any
host names that wouldn't fit in our buffer: at least under Linux/glibc,
gethostname_r() returns error if any such names exist even if we don't ask for
them.
Closes#16641.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78506 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Currently, wxEVT_PG_SELECTED event object generated when property is unselected doesn't refer to the property being unselected (in fact it doesn't refer to any property; pointer to the property is NULL) and therefore it is not possible to determine unselected property or to check its state.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78503 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use the correct, i.e. logical, as wxDC does the translation to physical
internally, coordinates for drawing the highlighted rows.
Closes#16815.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78502 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
By preventing sending wxEVT_PG_LABEL_EDIT_ENDING events recursively (recursive generation can happen due to the calling wxPropertyGrid::RefreshProperty() directly or indirectly from within wxEVT_PG_LABEL_EDIT_ENDING event handler) spurious events are not sent to the application and wxPropertyGrid::DoEndLabelEdit() function is not reentered.
Closes#16864.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78500 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Referring to enumerated type name (wxNumericPropertyValidator::NumericType) in expression is incorrect however it is accepted by VC++. GCC is not so merciful.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78496 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Currently this only really works when using the standard US keyboard layout as
we don't have information about the mapping from the characters to the keyboard
keys for the other layouts, which is not ideal but better than nothing as it
allows e.g. Text("foo_bar") to really produce "foo_bar" in the currently
focused text control instead of "foo-bar" as before.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78495 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The changes of r69762 and r69960 cancelled each other out, leaving a long
switch statement which didn't do absolutely anything -- and doesn't seem to be
needed at all, so drop it.
See #13671.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78494 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The event coordinates remained in the client coordinates of the window the
initial event had been sent to, even when the event was propagated to its
parent.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78489 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This prevented calls to AdjustScrollbars() of another window from doing
anything if they were called due to a size change from AdjustScrollbars() of
an outer window.
Closes#16852.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78483 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Explicitly ignore errors if we can't read from the associated FD.
This is mostly done to avoid -Wunused-result warning about not checking read()
return value under Ubuntu.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78481 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Give error if changing directory when wxFD_CHANGE_DIR or wxDIRP_CHANGE_DIR
flags are used, this is a good idea generally speaking and it also avoids
warnings about not checking chdir() return value that we got under Ubuntu.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78480 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Any frozen window in the whole TLW could be affected, not just a child of the enabled window.
Also do a more complete search for scrollbars.
Closes#16795
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78479 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Alignment was silently ignored in wxStaticText with GTK+ 2 since 2.12 or so,
make it work even at the price of using a non-default ellipsize mode as this
seems to be the only way to have it at all.
Closes#12539.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78478 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is simply a combination of all 3 different wxST_ELLIPSIZE_XXX styles and
makes it simpler to test if any of them is specified.
No real changes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78477 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These functions are needed due Android NDK lacking wide character support,
as wchar_t == char according to Android NDK bionic libc/include/wchar.h
WARNING: They are minimally functional (provided provisorily until proper
workaround is found, specially maybe using Qt built-in functionality).
"Basically they produce complete garbage with non-ASCII characters"
For more info see discussion in wx-dev list:
https://groups.google.com/d/msg/wx-dev/71qtIFcujgM/Q-lbwl59vOIJ
Thanks @seandepagnier (modified a bit the comments, added #warning and
restructured #if blocks to be only specific for __ANDROID__)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78473 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The assert in wxGtkTreeSelectionLock ctor failed after the first time this
object was created as it doesn't reset the selection function to NULL with
wxGTK2, fix this by checking for different values depending on whether it's
actually the first time we do it or not.
In the future we should just reset the selection function to NULL as it does
work in GTK+ 3, also update the comment explaining the problem to mention this.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78471 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The original code (see r66404 and r66416) didn't work because it used
wxDataViewRenderer::SetMode() to make the renderer inactive but then used its
GetMode() to restore the previous state -- which was lost. The result of this
was that if the overridden IsEnabled() in the model ever returned false for
any row, all the cells in this column, in all the rows, became insensitive, as
could be seen by the inability to edit any rating in the first page of the
dataview sample (even though it was disabled for a single row only) and any
checkboxes on its third page (even though only the last two of them were
supposed to be disabled).
Fix this simply by making the renderer insensitive at GTK level only, but do
not change the mode at wx level.
See #12686.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78470 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is unexpected and resulted e.g. in calling the user-defined
TransferDataFromWindow() multiple times for wxPreferencesPages used in
wxPreferencesEditor under wxGTK (where it is modeless).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78467 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775