Commit Graph

60199 Commits

Author SHA1 Message Date
Vadim Zeitlin
5ae3e4ff12 Fix wxTaskBarButton code compilation in ANSI mode.
Correctly declare SHStrDupW() as always producing a wide char string on output
and pass a wide string to wxStrlcpy() using a wide char buffer.

Closes #17033.
2015-07-17 14:40:01 +02:00
Vadim Zeitlin
5fabf7e60d Add a debug check for HTML tag handlers being available.
This helps to detect the situation when HTML tag handlers are not linked in at
all, as it can happen with MSVC when using static libraries, as this doesn't
prevent wxHTML from parsing HTML, it just doesn't render it correctly at all
and it can be difficult to understand why exactly does this happen, so try to
detect this situation and provide a hint.
2015-07-17 14:38:48 +02:00
Artur Wieczorek
403dd5673f Use enum instead of macros to represent wxPropertyGrid::DoSelectProperty flags. 2015-07-16 21:04:25 +02:00
Artur Wieczorek
4588acb21b Use wxEmptyString instead of dedicated wxPropertyGridInterface member variable. 2015-07-16 21:00:38 +02:00
Paul Cornett
8749496b15 Fix wxSpinButton best size for GTK+ 3.12 and later, closes #17051 2015-07-16 07:13:42 -07:00
Jouk
4b704d4193 Define also != operator, since find on OpenVMS-AXP needs it 2015-07-16 07:47:43 +02:00
Artur Wieczorek
79794391e9 Declare wxPG_DEFAULT_IMAGE_SIZE as wxDefaultSize constant.
wxDefaultSize is an equivalent of wxSize(-1,-1) but is more portable.
2015-07-15 21:45:27 +02:00
Artur Wieczorek
4398e20655 Use wxDefaultCoord instead of explicit -1 value while initializing wxSize and wxPoint variables. 2015-07-15 21:45:08 +02:00
Jouk
a8bf2abcd0 Add new files to makefiles for compilation on OpenVMS 2015-07-13 14:46:42 +02:00
Jouk
38dfd91ca2 suppress harmless warning when compiling on OpenVMS 2015-07-13 12:32:32 +02:00
Vadim Zeitlin
af7ed311ed Fix wx2stclen() return values after upgrade to Scintilla 3.5.5.
The fix to the length allocated for the buffer (which was off by 1) in
wx2stc() in 9f81ac16f0 exposed another bug,
which used to compensate for that one, in wx2stclen(), so fix it too.

See #16776.
2015-07-11 22:41:34 +02:00
Vadim Zeitlin
0e8999cb2f Prevent unwanted line break after "i.e." in wxFontFamily docs.
Escape the following space to prevent Doxygen from thinking that the period
after "e" ends the brief documentation.
2015-07-10 13:45:33 +02:00
Vadim Zeitlin
9be928d6fb Fix destruction of wxNativeContainerWindow in wxMSW.
WM_CLOSE was not processed at all for native windows wrapped by
wxNativeContainerWindow because we don't handle it ourselves at wxWindow level
but still mark it as processed in order to prevent DefWindowProc() from
destroying the window. Unfortunately this also prevented the original handler
for this message in the native window from being called.

Calling just the original handler and not the wxWidgets one is not ideal
neither but is much better as it allows to e.g. close MFC frames wrapped in
wxNativeContainerWindow whereas before this didn't work at all as WM_CLOSE was
completely ignored.

Also call the original handler for WM_DESTROY to avoid similar potential
problems with this message, even if it doesn't seem to create any with MFC.

Extend the mfc sample to show how a wxPanel can be embedded into the existing
CFrameWnd.
2015-07-09 20:49:05 +02:00
Vadim Zeitlin
394b04b7e4 Document wxDC::{Set,Get}Logical{Scale,Origin}() functions.
They are relatively important, especially the origin-related ones as
SetUserScale() can (should?) be used instead of SetLogicalScale(), but
SetLogicalOrigin() can be more convenient than SetDeviceOrigin(), so provide
at least skeletal documentation for them.
2015-07-09 19:20:43 +02:00
Vadim Zeitlin
3e1dcf552e Update HDC in wxDC::SetLogicalScale() in wxMSW.
Unlike the similar (identical?) SetUserScale(), this function didn't call
RealizeScaleAndOrigin(), add it now for consistency.

Closes #17053.
2015-07-09 19:13:44 +02:00
Vadim Zeitlin
1d8522301b Avoid ambiguity to wx-defined wchar_t comparisons in STC code.
Comparing wchar_t with int doesn't compile under OpenVMS because of

%CXX-E-AMBIGUOUSOPRFUN, more than one operator ">=" matches these operands:
            built-in operator "arithmetic >= arithmetic"
            function "operator>=(wchar_t, const wxUniChar &)"
            operand types are: wchar_t >= enum <unnamed>

Try to work around this by explicitly casting wchar_t to int.
2015-07-09 14:47:30 +02:00
Vadim Zeitlin
48338a304f Italian translations update from Roberto Boriotti. 2015-07-09 14:38:49 +02:00
Vadim Zeitlin
9c88e76752 Remove the never implemented wxPoint2D::SetPolarCoordinates().
This method was declared but never implemented, just remove it.

Closes #17065.
2015-07-09 14:38:49 +02:00
Vadim Zeitlin
d267735a2d Fix conflicting sizer flags in wxWizard under wxOSX.
Don't use wxGROW and wxALIGN_CENTRE together in a wxBoxSizer, this doesn't
make sense as the latter is just ignored.

Also use wxEXPAND instead of wxGROW for consistency with the flags elsewhere
in the same file.

Closes #17063.
2015-07-09 14:38:49 +02:00
Artur Wieczorek
7d77168936 Refactor: Use dedicated methods to manipulate wxRect members. 2015-07-07 21:56:17 +02:00
Leland Lucius
6a435345f5 Fix accessibility support in wxMSW.
Return the correct result from handing WM_GETOBJECT message.

See #17058.
2015-07-06 23:55:41 +02:00
Artur Wieczorek
98a4c40168 Use IsEmpty() function to check if wxRect represents empty rectangle. 2015-07-06 23:04:21 +02:00
Artur Wieczorek
9e77932278 Use wxBitmap::GetSize() to obtain size of the wxBitmap.
When assigning wxBitmap size to wxSize variable there is not necessary to assign bitmap width and height separately.
2015-07-06 22:13:23 +02:00
Artur Wieczorek
28e2e0f475 Removed unused local variable from wxPropertyGrid::GetPropertyRect 2015-07-06 21:50:23 +02:00
Artur Wieczorek
b2af64faaf Use variable of type wxEventType to store value returned by GetEventType function.
Since wxEvent::GetEventType() returns wxEventType value, the variable used to hold returned value should be also of this type.
2015-07-06 20:43:28 +02:00
Artur Wieczorek
6f3003c3e1 Fix drawing choice item bitmap when using wxPGEditor_Choice.
Horizontal alignment of bitmap associated with wxPGChoice item drawn in wxPGComboBox (in wxPropertyGrid::OnComboItemPaint) needs to be adjusted by 1 pixel (as it is already done for text label) in order to get the bitmap in the same position when wxPGComboBox is selected.
2015-07-05 21:17:35 +02:00
Artur Wieczorek
a253cdb413 Refactor wxPropertyGrid::OnComboItemPaint
Make the code more readable by reducing scope of some local variables, by simplifying their initialization, etc.
2015-07-05 21:14:50 +02:00
Vadim Zeitlin
b7f1ac40f4 Don't hard code the number of stack frames after wxOnAssert().
The number of frames between the code containing the assert and the code
generating the stack trace is not the same under different platforms and so
hardcoding 8 for it in wxAppTraitsBase::GetAssertStackTrace() worked for wxMSW
but not e.g. wxGTK.

Instead, just ignore all frames up to and including the one for wxOnAssert()
itself. This makes the code work correctly on all platforms and it also won't
need to be modified whenever any extra functions are added/removed
(wxGTK-specific code in utilsgtk.cpp used wrong number of frames too, even
though it was presumably correct once before).
2015-07-05 18:39:37 +02:00
Vadim Zeitlin
6c43aa90b6 Fix for PCH-less build of wxProtocol after recent changes.
Include wx/app.h in protocol.cpp, don't include it in http.cpp which doesn't
need it any more.

See #17031.
2015-07-05 17:50:02 +02:00
Vadim Zeitlin
610076aabd Merge branch with the changes upgrading to Scintilla 3.5.5.
Closes #16776.
2015-07-05 17:00:36 +02:00
Vadim Zeitlin
9f81ac16f0 Fix wx2stc() conversion after upgrade to 3.5.5.
UTF8FromUTF16() now only NUL-terminates the string if there is enough space in
it for the trailing NUL, so pass the correct length of the buffer, including
the last byte reserved for this NUL to this function.

Also allocate one byte less in wxCharBuffer, it was adding 1 extra byte
unnecessarily.

See #16776.
2015-07-05 16:58:13 +02:00
Vadim Zeitlin
7ece217abc Remove unused file with obsolete PenWindows support.
This file was apparently never compiled in, just drop it, as well as the
mention of wxUSE_PENWINDOWS in the documentation.
2015-07-05 16:55:26 +02:00
Vadim Zeitlin
73119a37ae Remove obsolete _EXPORT macro not used under Win32.
This was a leftover from bad old Win16 days.
2015-07-05 16:55:26 +02:00
Vadim Zeitlin
30b523d1f2 Remove redundant tests for __WIN32__ in wxMSW code.
This is always defined, Win16 is not supported since ages and Win64 defines
both __WIN32__ and __WIN64__.
2015-07-05 16:55:25 +02:00
Vadim Zeitlin
d421373c2e Use blocking sockets from non-main threads in wxProtocol.
Non-blocking sockets can't work in worker threads without additional locking
as they generate events that can be dispatched from the main thread after the
socket object, created in the worker thread, is already destroyed, so don't
even attempt to use them if wxProtocol object is created from non-main thread.

Also simplify the code by removing the calls to SetFlags(), Notify() and
{Save,Restore}State() and simply put the socket from the beginning in
blocking, wait all mode that it needs to be in.

This, with the fixes in the previous commit, allows wxHTTP and wxFTP to work
from worker threads too.

Test using wxHTTP from a worker thread in the socket client sample.

Closes #17031.
2015-07-05 16:45:07 +02:00
Vadim Zeitlin
e18c8fd29a Never use events for blocking sockets under Unix.
Events are not needed for this kind of sockets, using wxSOCKET_BLOCK is
supposed to ensure that calling socket IO operations blocks until the bytes
are read/written without dispatching any events.

See #17031.
2015-07-05 16:45:07 +02:00
Vadim Zeitlin
c4df7fcf91 Remove accidentally checked in debugging code in Unix wxDir.
Undo the accidental change in c6c19dc580.

Closes #17052.
2015-07-04 19:45:38 +02:00
Vadim Zeitlin
82f3234d95 Avoid g++ 3.4.5 warning about wxMSWOwnerDrawnButtonBase dtor.
Fixing the warning for recent g++ versions introduced it for the old one, so
work around this inside our workaround.

See #17005.
2015-07-04 18:25:05 +02:00
Vadim Zeitlin
b7f3d0d752 Correct wxAuiNotebook::SetUniformBitmapSize() documentation.
This function used the same documentation as Split() for some reason, document
it correctly now.

Closes #17049.
2015-07-04 16:33:21 +02:00
Vadim Zeitlin
086d4230cd Allow testing hiding the widget in the widgets sample.
This provides a convenient way for testing that it actually works, which is
currently not quite the case for wxSlider under OS X, see #2388.
2015-07-04 00:21:47 +02:00
Vadim Zeitlin
e70d597c2e Fix propgrid sample compilation.
Resolve ambiguity in assignment of wxImage to wxBitmap in wxMSW which also has
wxBitmap::operator=(wxCursor). This should allow the sample to compile under
MSW after the changes of 1fce152d3c.
2015-07-02 17:07:32 +02:00
Catalin
de5571a744 Added "since 2.9.3" tag to wxEXEC_HIDE_CONSOLE documentation.
Closes https://github.com/wxWidgets/wxWidgets/pull/47
2015-07-01 13:57:05 +02:00
Vadim Zeitlin
c6c19dc580 Remove extraneous semicolons after wxDECL_FOR_STRICT_MINGW32().
This macro shouldn't be followed by a semicolon because it can be empty, so
remove the extra semicolons to avoid -Wpedantic g++ warnings about it.
2015-07-01 00:39:05 +02:00
Simon Richter
711827a6ee Remove duplicate code from wxGTK wxDataViewCtrl.
Code checking got wxDATAVIEW_CELL_INSENSITIVE was repeated twice, leave just
one copy of it.

Closes #17047.
2015-06-30 15:58:29 +02:00
Artur Wieczorek
de38b5da25 Use wxUniChar instead of wxChar for operations with wxString iterators. 2015-06-29 20:06:27 +02:00
Artur Wieczorek
d9acff9cd8 Use variable of proper type in wxPropertyGrid::SelectProperty
Variable should be declared as unsigned int because it is passed as an unsigned int parameter.
2015-06-29 20:04:48 +02:00
Artur Wieczorek
2770f76de5 Fix wxPropertyGridManager::SelectProperty
Call wxPropertyGridpageState::DoSelectProperty with explicitly set flags instead of casting from bool to unisgned int. It cannot be guaranteed that 0/1 values of this implicit conversion will be mapped to the proper flags also int the future.
2015-06-29 20:03:25 +02:00
Artur Wieczorek
22cc1736ab Add the demonstration of wxEnumProperty with value bitmap to propgrid sample. 2015-06-29 00:04:47 +02:00
Artur Wieczorek
27032e71d2 Remove unused variable from wxFontProperty::wxFontProperty 2015-06-28 19:31:52 +02:00
Artur Wieczorek
f48439cfc6 Fix casting variable in wxFlagsProperty::GetLabel
Cast GetLabel parameter to a proper type (unsigned int instead of int).
2015-06-28 19:31:48 +02:00