Commit Graph

58967 Commits

Author SHA1 Message Date
Artur Wieczorek
a4f2f2ec6c Fixed wxPropertyGrid::DoEndLabelEdit function
When label editing is finished then property label has to be always updated. If there is a text which is cached in the corresponding cell then it also needs to be updated.

See #16982.
2017-04-10 23:56:27 +02:00
Artur Wieczorek
6575ed47a1 Fixed setting property label with wxPGproperty::SetLabel
If there is a corresponding cell containing a cached text for column 0 then this text also needs to be updated when the label is changed.

See #16982.
2017-04-10 23:56:27 +02:00
Artur Wieczorek
6b236d5d7e Prevent sending wxEVT_PG_LABEL_EDIT_ENDING events recursively, cont.
Spurious wxEVT_PG_LABEL_EDIT_ENDING events shouldn't be generated also if wxPropertyGrid::DoEndLabelEdit() function is reentered multiple times (constraint for selected column should be removed from the guard because column index is set to 1 after first reentry and no longer reflects original value stored in the event object).

Closes #16864.
2017-04-10 23:56:27 +02:00
Artur Wieczorek
3dcdbe82b3 Prevent sending wxEVT_PG_LABEL_EDIT_ENDING events recursively.
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
2017-04-10 23:56:27 +02:00
Vadim Zeitlin
1a9900a813 Fix warning about undefined __cplusplus in wx/defs.h
Check that __cplusplus is defined before testing its value to avoid warnings
when compiling C code, e.g. regex library.

Notice that in master a check for __cplusplus covering a bigger part of this
file was added to solve the same problem, but it doesn't seem like a good idea
to stop defining other symbols which had been previously defined in 3.0, so
keep this check as narrow as possible here.
2017-04-10 00:02:21 +02:00
Artur Wieczorek
f93fe544c5 Allow wxPG to take focus on the entire area even if wxPG is not a standalone control.
By default, to prevent wxPG from stealing focus from other controls, focus is moved to the grid only if it was already in one of its child controls.
When newly introduced wxPG_EX_ALWAYS_ALLOW_FOCUS flag is set then wxPG can take focus on the entire grid area (on canvas) even if focus is moved from another control.
Default wxPG behavior remains unchanged because wxPG_EX_ALWAYS_ALLOW_FOCUS flag must be explicitly set with wxPropertyGrid::SetExtraStyle function.

Closes #16993.

(cherry picked from commit 7394dd8e1f)
2017-04-10 00:02:16 +02:00
Stefan Csomor
a34b9c1e01 adding wxFALLTHROUGH to indicate intended fall through in switch statements
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76236 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2017-04-07 11:42:08 -07:00
Václav Slavík
c228c55428 Fix "unknown keyboard accel" with 1-char translations
wxAcceleratorEntry::ParseAccel() incorrectly assumes that every
single-character accelerator must be a direct character code. But
that's not true, a human-friendly name for a key (e.g. "Down") may be
translated with a single character in some languages (or because a
translator decides to use a Unicode arrow…).

Amend the test to check if the character is a 7bit ASCII one. That
would be extremely unlikely to be a translation.

(cherry picked from commit 166f5c0abb)
2017-04-05 13:53:43 +02:00
Vadim Zeitlin
ed88188be7 Fix spurious assert in wxGTK wxDataViewCtrl::EditItem().
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.

(cherry picked from commit 24c0401e81)
2017-04-04 18:39:35 +02:00
Vadim Zeitlin
8fad217a6f Hide wxChoice before destroying it with GTK+ 3
This works around GTK+ critical error messages that we get otherwise with GTK+
since the change done in its commit 7401794de6b084fea469af297b7c144724b8492c
which appeared in 3.22.8 release and is still present in the latest version.

These messages happen because gtk_combo_box_popdown() ends up being called
during the widget destruction if it's still shown, so just hide the combobox
before destroying it to avoid them.

Closes https://github.com/wxWidgets/wxWidgets/pull/449

(cherry picked from commit 404f0f8587)
2017-04-04 07:46:34 -07:00
Paul Cornett
397e6e9e35 Fix typo: CFStringref --> CFStringRef
(cherry picked from commit 493643477c)
2017-03-24 08:35:33 -07:00
Tim Kosse
8f12eaf980 Create empty wxCFStringRef and not null one if conversion fails
If the passed string cannot be represented in the target encoding in the
wxCFStringRef constructor, create a reference to an empty string instead of a
null ref. Most users of wxCFStringRef cannot handle a null wxCFStringRef.

Closes #17825.

(cherry picked from commit a2b04536d3)
2017-03-23 14:08:55 +01:00
Paul Cornett
e4293e9e39 Avoid using stale nl_langinfo() pointer
See #17813

(cherry picked from commit a0cb7c1291)
2017-03-02 07:48:44 -08:00
Robin Dunn
6eb5943ed0 Add missing event type constants for propgrid 2017-02-20 19:36:16 -08:00
Robin Dunn
060df58bbf Add propgriddefs.h to the interface, containing macros, enums and such referenced elsewhere in the API. 2017-02-20 19:36:16 -08:00
Vadim Zeitlin
be0eb3d213 Support proportions for wxFlexGridSizer growables in XRC schema
The value of "growablerows" and "growablecols" elements is not just a
list of numbers, but a list of numbers with optional weights, specified
after a colon.

Update the XRC schema to account for the weights too.

See #17802.

(cherry picked from commit 0d73253111)
2017-02-19 15:51:15 +01:00
Paul Cornett
24604a2b5b Use spaces to avoid pasting arguments together
Don't rely on variables starting with a space, it's too fragile

(backport of b6fea21140)
2017-02-18 16:25:01 -08:00
Paul Cornett
bcb0382250 Avoid using negative width
(cherry picked from commit 95ae67d1f4)
2017-02-18 11:47:17 -08:00
Scott Talbert
dc7acca2cd Document missing wxGrid methods
Add documentation for the previously undocumented
IsCellEditControlShown(), Deselect{Col,Row,Cell}() and SetAttr().

See https://github.com/wxWidgets/wxWidgets/pull/405

(cherry picked from commit b1fd65a903)
2017-02-05 02:59:12 +01:00
Robin Dunn
c07c544720 SetSelection returns an int, not a size_t 2017-02-02 09:54:12 -08:00
Robin Dunn
732f3e5e61 Add missing wxImageHandler::SetType 2017-01-31 20:09:41 -08:00
Robin Dunn
c329fab727 wxPGVIterator does not inherit from wxObjectRefData 2017-01-23 15:01:38 -08:00
Robin Dunn
cc360cffbe wxSystemSettings does not inherit from wxObject 2017-01-23 15:01:37 -08:00
Scott Talbert
501b377435 Add support for GStreamer 1.x in Unix wxMediaCtrl implementation
Do it while keeping both 0.8 and 0.10 support, unlike the commit d0ef5d7,
which this is based on, that removed support for 0.8.

Closes https://github.com/wxWidgets/wxWidgets/pull/400
2017-01-23 13:47:50 +01:00
Paul Cornett
c047751abf Exclude DragAcceptFiles() when wxUSE_DRAG_AND_DROP==0
(backport of 42b2675806)
2016-12-22 22:23:38 -08:00
Paul Cornett
e7443259de Improve handling of wxUSE_FONTMAP==0 case with wxMSW
wxEncodingToCodepage() can be used when wxUSE_FONTMAP==0
Also avoid unreachable code warning with MSVC when using whole program optimization

(cherry picked from commit 64f1d760c6)
2016-12-22 22:15:04 -08:00
Paul Cornett
f90b768ea0 Fix generic wxWindow when used in toolbar
GtkToolbar uses item minimum size as actual size, so don't use 0 as minimum
for toolbar children.

See #17756, #17704

(cherry picked from commit 2155eb2fde)
2016-12-21 10:26:22 -08:00
Paul Cornett
4259ee7bd4 Reset static widget pointers when widgets are destroyed
See #17751

(cherry picked from commit 30a71c39f5)
2016-12-19 08:53:03 -08:00
Paul Cornett
6c7c4e4e2f Allow initializing wxWidgets multiple times against one instance of GTK+, episode 3
See #17751

(cherry picked from commit e0bcae1257)
2016-12-18 08:13:45 -08:00
Vadim Zeitlin
75c9715615 Fix wrong value used for wxFONTENCODING_MACROMANIAN in wxMSW
The correct code page for this encoding is 10010, see

https://msdn.microsoft.com/en-us/library/windows/desktop/dd317756.aspx

See #17752.

(cherry picked from commit aac66ea877)
2016-12-18 13:43:57 +01:00
Paul Cornett
cc73d56591 Remove unnecessary module variable
(cherry picked from commit d711c5c625)
2016-12-17 10:27:38 -08:00
Paul Cornett
fb5286d047 Dispose of GtkWidgets used by wxSystemSettings
(cherry picked from commit 4691926791)
2016-12-17 10:27:13 -08:00
Paul Cornett
4f607df3d2 Revert 21c1c552, "Allow initializing wxWidgets multiple times"
See #17751
2016-12-16 23:40:19 -08:00
Paul Cornett
21c1c5520d Allow initializing wxWidgets multiple times against one instance of GTK+
See #17751

(backport of db9858a93c)
2016-12-15 19:41:32 -08:00
Paul Cornett
1690d8b886 avoid unused variable warning with GTK2 after a050652c 2016-12-14 09:36:08 -08:00
Paul Cornett
a050652c6a Use "notify::gtk-theme-name" from GtkSettings to generate wxSysColourChangedEvent
"style-updated" occurs frequently for other reasons, such as switching focus between TLWs

(cherry picked from commit 61c8a7ca60)
2016-12-13 09:07:50 -08:00
Paul Cornett
b2854a20de Avoid generating scroll event when our scrollbar is disabled by other software
webkitgtk apparently manipulates our scrollbar GtkAdjustment directly, setting
all members to zero to disable it. Since we never do that, those values were
unexpected. This is a better fix for the problem papered over by 45d66f592

(cherry picked from commit ccd1d40dd9)
2016-12-12 10:55:54 -08:00
Paul Cornett
20a504707a Draw a blank header button in any remaining space after last header column
(cherry picked from commit c70abf23aa)
2016-12-11 23:44:21 -08:00
Paul Cornett
9206a5aec8 Fix drawing header buttons with GTK3 renderer on GTK+ >= 3.20
Lines between columns were missing with default Adwaita theme

(cherry picked from commit 48e6a0c851)
2016-12-11 23:43:56 -08:00
Paul Cornett
617a0cb433 Improve appearance of tree item button with GTK3 renderer
(cherry picked from commit 38246b96a4)
2016-12-11 10:55:41 -08:00
Paul Cornett
61a90436f1 Fix drawing of splitter sash with GTK3 renderer
(cherry picked from commit c5adf1f854)
2016-12-11 09:17:05 -08:00
Václav Slavík
723489e2d9 Fix GetInstallPrefix availability check
Add wxHAS_STDPATHS_INSTALL_PREFIX to make checking for
wxStandardPaths::GetInstallPrefix()'s availability simpler, as the
condition under which it is compiled is nontrivial.

Fixes compilation after 2c24ee9216 on
Cygwin, which is a UNIX, but its wxStandardPaths implementation is a
Windows one.

(cherry picked from commit 13862ad8e6)
2016-12-11 15:19:42 +01:00
Paul Cornett
ef12daba86 Improve appearance of text control with GTK3 renderer
(cherry picked from commit c2b9f650e4)
2016-12-10 21:53:38 -08:00
Paul Cornett
ec023e9977 Fix rendering of check and radio buttons with GTK+ >= 3.20
(cherry picked from commit e627970ba6)
2016-12-10 21:53:10 -08:00
Paul Cornett
9518d52ba8 Improve appearance of header button with GTK3 renderer
Remove the mysterious insetting by 4. Where that came from I don't know,
but it makes the button look stupid

(cherry picked from commit 49361b6bb8)
2016-12-10 18:54:35 -08:00
Paul Cornett
309f5fe529 Fix infinite sizing loop caused by 64753769
Avoid the problems 64753769 attempted to address in a much simpler way:
when a "size-allocate" is in progress, call gtk_widget_size_allocate()
directly, rather than deferring a call to gtk_widget_queue_resize().
See #17585

(backport of d5681ee4a8)
2016-12-09 21:43:54 -08:00
Vadim Zeitlin
28aea07674 Fix wxString::From[C]Double() unit test for MSVC 14 and later
Since MSVC 14, VC CRT uses standard-conforming 2 digits for the exponent
instead of the non-standard 3 used previously.

(cherry picked from commit 7122288416)
2016-12-09 17:45:46 +01:00
Vadim Zeitlin
d57c75a2e5 Make wx/valnum.h self-contained by including wx/textentry.h
This header uses (i.e. forward declaration wouldn't be sufficient)
wxTextEntry, so it must include the header declaring it.

(cherry picked from commit 9db6f6ca1a)
2016-12-09 02:00:31 +01:00
Václav Slavík
7ae5b6442f Search $PREFIX/share/locale for translations on Unix
The changes introduced in ​ea160f0 accidentally omitted this search
location, so only wx's own install prefix was searched. This probably
went undetected for so long because these two are often, but not always,
the same.

Fixes #17740.

(cherry picked from commit 2c24ee9216)
2016-12-06 16:49:03 +01:00
Václav Slavík
87c55ca242 Fix typo in wxABI_VERSION check in 90b12483 2016-12-06 09:55:32 +01:00