Commit Graph

58942 Commits

Author SHA1 Message Date
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
Václav Slavík
90b124835e Fix accel handling when removing item from submenu
wxMSW propagates accelerators to the top menu in wxMenu::UpdateAccel(),
but the reverse operation in wxMenu::DoRemove() didn't do it, resulting
in leaked leftover accelerator entries that could prevent the same
accelerator from working if an item using it was later added. Fix by
adding RemoveAccel() helper method that behaves analogously to
UpdateAccel().

(backport of 60542745f6 from master)
2016-12-05 18:03:04 +01:00
Václav Slavík
97330c2706 Remove useless wxABI_VERSION checks in sources
They are only meaningful for headers, not when compiling the library
itself.
2016-12-05 17:52:30 +01:00
Paul Cornett
5a089901ef Improve wxSystemSettings::GetColour() for GTK3
Previous implementation was inadequate, particularly for GTK+ >= 3.20

(backport of 4b8c83cb09)
2016-12-04 12:38:49 -08:00
Robin Dunn
323d4fa7a1 Add missing Restore() method. 2016-11-30 08:40:01 -08:00
Robin Dunn
1cdab48bc3 Merge branch 'aui-interface-updates' into WX_3_0_BRANCH 2016-11-22 10:25:16 -08:00
VZ
d4a52c0ec1 Backport AVKit-based wxMediaCtrl to fix build under OS X 10.12
Allow building wxOSX using 10.12 SDK which doesn't include QTKit support any longer.

See https://github.com/wxWidgets/wxWidgets/pull/341
2016-11-19 18:30:17 +01:00
Paul Cornett
caaeb96d5e Implement wxLB_NO_SB style
See https://github.com/wxWidgets/wxWidgets/pull/346

(cherry picked from commit d24fbc7808)
2016-11-19 09:00:30 -08:00
Mikko P
c47837ea92 Fix owner drawn dropdown row height.
While m_combo->GetFont(); sets the proper font, the size of that font did not affect the character height.
(cherry picked from commit 2326ca72f1)
2016-11-19 08:51:27 -08:00
Vadim Zeitlin
29a514cfc6 Mention that wxOSX doesn't implement SetLayoutDirection()
At least avoid wasting people time with debugging why it doesn't work.

(cherry picked from commit 5ffb8de44d)
2016-11-19 08:50:33 -08:00
Paul Cornett
87289bdc04 Enable choosing paper size and orientation on print dialog, see #17712
(cherry picked from commit 1b0e7c17e3)
2016-11-19 08:49:41 -08:00
Paul Cornett
f1352bd458 Size text sample to it's contents, rather than using fixed arbitrary size
(cherry picked from commit d3497d32ec)
2016-11-19 08:47:24 -08:00
Paul Cornett
10b9ab4d8d Support setting initial position for TLW with GTK3
(cherry picked from commit 5fb89cb86e)
2016-11-19 08:46:34 -08:00
Paul Cornett
337e80da76 Set a minimal size for GtkEntry preferred size
This overrides the default minimum size of 150+ pixels, avoiding swarms of
GTK3 debug warnings about "attempt to underallocate wxPizza's child GtkEntry"

(cherry picked from commit 27d218a1f3)
2016-11-19 08:44:42 -08:00
Vadim Zeitlin
38ffc910b2 Convert docs/doxygen/regent.bat to DOS EOLs
Very partial backport of 3c59f46b64 from master.
2016-11-17 14:49:18 +01:00
Robin Dunn
896d385dc0 Add missing GetPageImage 2016-11-11 19:02:17 -08:00
Paul Cornett
553ec7537c Fix non-default window background color with GTK+ >= 3.20
GTK+ no longer automatically paints non-default window background. See #17586

(cherry picked from commit 9bb5d0435a)
2016-11-09 20:07:57 -08:00
Paul Cornett
2241f97775 Avoid calling ScreenToClient() on invisible window while processing wxSetCursorEvent
(cherry picked from commit b47319d515)
2016-11-05 19:46:07 -07:00
Paul Cornett
e465b4cb2d Avoid using deleted widget in idle callback
Use a slightly higher idle priority so callback runs before TLW is deleted,
and ref the widget just to make sure it doesn't disappear. Problem was
introduced in 0388ce8e25

(backport of 9c3900e40d, which modified
9dc7a89ccd, which wasn't backported)
2016-11-05 17:52:21 -07:00
Paul Cornett
49be360eab Avoid assert dialog in ClientToScreen()/ScreenToClient(), it's just too annoying
(cherry picked from commit e3f117c4f3)
2016-11-03 09:41:48 -07:00
Paul Cornett
cd8811bf14 Fix paint clipping region with GTK+ >= 3.20
Apparently the clip is no longer set properly. Fixes wxDC::Clear() overwriting
areas outside the window. Problem can be seen in the Audacity toolbars.

(cherry picked from commit bca7313499)
2016-11-03 09:41:07 -07:00
Paul Cornett
4206e4ce1c Partial workaround for stale styling information with GTK3
We can trigger size events when we know the style cache has been updated.
See #16088

(backport of 101c43d0aa)
2016-11-02 10:46:57 -07:00
Paul Cornett
6475376931 Fix some sizing problems with GTK3
A change in size-allocate handling with GTK+ 3.20 exposed a flaw in our method for
deferring queue-resize requests. Using an idle callback to process the requests
did not work well with the GdkFrameClock-based system used since GTK+ 3.8. Using
the "check-resize" signal works better. Also with GTK+ >= 3.20, it seems necessary
to manually work the queue-resize up to the TLW, as otherwise the resized widgets
don't get updated without an external size-allocate event.
See #17585

(backport of 3b4ee5a031)
2016-11-02 10:30:44 -07:00
Paul Cornett
856b2f6e09 avoid uninitialized result from size_request with Ubuntu, see #17707
(cherry picked from commit 83012dc082)
2016-10-31 09:34:30 -07:00
Paul Cornett
12948ba5e3 Fix a sizing problem with GTK3 when wxPizza is the child of a native GTK widget
See #17704

(cherry picked from commit 240f826185)
2016-10-30 17:35:42 -07:00
Robin Dunn
805dea9649 Add public attributes to wxAuiPaneInfo 2016-10-28 14:22:06 -07:00