Commit Graph

49332 Commits

Author SHA1 Message Date
Vadim Zeitlin
07890fbeb5 Never overflow the output buffer in wxBase64Decode().
Don't write extra NUL bytes obtained by decoding the padding at the end of
input into the output buffer as there may be not enough place in it for them.
And in any case the buffer is not (always) NUL-terminated as no NUL bytes are
obtained in absence of padding, so it's better to never terminate it for
consistency.

Closes #11101.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61753 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-23 22:25:12 +00:00
Vadim Zeitlin
e331a94e90 Correct the order of coordinates in CGPoint initializer.
The order was reversed.

Closes #11020.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61752 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-23 22:25:00 +00:00
Vadim Zeitlin
7b342d55c3 Show the current range of valid dates in the calendar sample.
See #11081 (point C).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61751 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-23 22:24:54 +00:00
Vadim Zeitlin
0274a7973d Added wxGridSize::GetEffective{Cols,Rows}Count().
These functions return the number of columns or rows being currently used and
not 0, unlike the existing Get{Cols,Rows}(), if the corresponding number is
determined dynamically.

Closes #10254.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61750 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-23 22:24:48 +00:00
Vadim Zeitlin
fef6a2f1a0 No changes, just clarify a comment for WXK_XXX values.
Part of patch in #10268.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61749 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-23 21:39:42 +00:00
Vadim Zeitlin
4f742042b8 Make WXK_NUMPAD_TAB member of WXK_CATEGORY_TAB.
See #10268.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61748 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-23 21:39:32 +00:00
Vadim Zeitlin
12c9c01c24 Extract event handlers chain documentation in a separate section.
The explanation of event handlers chaining was too big and distracted from the
main point of the event processing section which was to explain in which order
different handlers are looked up.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61746 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-23 21:31:14 +00:00
Jaakko Salli
0ee316821c Made wxPropertyGridHitTestResult a real class (works better that way with SWIG)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61745 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-23 18:38:13 +00:00
Jaakko Salli
1bfcd80c2f Removed obsolete conditional compile option wxPG_CREATE_CONTROLS_HIDDEN
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61744 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-23 15:34:25 +00:00
Jaakko Salli
58935d4a5c Added label editing capability into wxPropertyGrid
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61743 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-23 15:31:03 +00:00
Vadim Zeitlin
7a34307e24 Added wxKeyEvent::IsKeyInCategory() method.
This allows to test whether a given key belongs to the category of e.g. arrow
keys or navigation keys in a more concise and more readable manner.

Closes #10268.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61736 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-23 00:32:17 +00:00
Vadim Zeitlin
2e4d0e91bf Document wxGraphicsPath::AddArc() better.
The angles passed to it are measured clockwise from the horizontal axis,
contrary to the usual mathematical convention so take care to mention this in
the documentation.

Closes #11112.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61732 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-22 13:59:14 +00:00
Vadim Zeitlin
7a91ad2cee Only use wxLocale functions if wxUSE_INTL == 1.
Don't use locale-dependent formats in wxDateTime::ParseFormat() when locale
support is disabled.

Closes #11121.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61731 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-21 18:46:39 +00:00
Vadim Zeitlin
c0f02dab27 Fix typo in wxNewEventFunctor() comment.
Closes #11117.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61730 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-21 18:46:32 +00:00
Stefan Csomor
7c17cb8c2c supporting earlier xcode version
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61729 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-21 18:22:28 +00:00
Vadim Zeitlin
1b4b608091 Do wait for connection in the server socket.
The code returned immediately from wxSocketBase::DoWait() if it wasn't
connected but it only made sense for the client sockets, not server ones which
could be calling this function precisely in order to wait until a connection
is made.

Also added a test for this bug in the sockets/server sample.

Closes #11107.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61726 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-21 15:25:09 +00:00
Vadim Zeitlin
d94e9b623a Allow creating initially hidden controls in wxOSX/Cocoa.
If wxWindow is hidden before being really created, we must create the native
control hidden too. Not only this allows to create the controls initially
hidden, as intended, but it also avoids the wx and native visibility flags
from getting out of sync which results in many other problems.

Closes #11131.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61725 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-21 10:54:53 +00:00
Vadim Zeitlin
03647350fc No changes, just removed hard tabs and trailing white space.
This commit is huge but there are no non-white-space changes in it.

Some files containing third-party sources (src/msw/wince/time.cpp,
src/x11/pango*.cpp) were left unchanged.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61724 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-21 10:41:26 +00:00
Vadim Zeitlin
545cb3fcf2 Fix signatures of various image handlers methods.
Use wxBitmapType instead of long for the type parameter and made SaveFile()
methods const to follow the base class changes.

Now that the signatures are the same as in the base class these handlers have
a chance to work again while their methods couldn't be called at all before
this change.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61720 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-20 00:44:47 +00:00
Vadim Zeitlin
4462f911b1 Refactor and clean up slider labels drawing code.
This change fixes multiple g++ 4 warnings about unsafe expressions with
bit-wise operators (completely justified, for once, as the expressions were
absolutely incomprehensible and almost certainly incorrect too) and refactors
the determination of where to draw the slider labels in a single function
instead of triplicating it.

Also reformat to follow wxWidgets conventions and use more clear variable
names.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61719 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-20 00:44:42 +00:00
Vadim Zeitlin
ffbd0d14a6 Fix warning about converting literal strings to non-const char*.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61718 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-20 00:44:37 +00:00
Vadim Zeitlin
b275d34752 Remove declarations of two non-existent functions in wxMSW wxListCtrl.
wxGetInternalData() were left overs from old versions of the code and don't
exist any more.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61717 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-20 00:44:32 +00:00
Vadim Zeitlin
a0739a9a5e Fix harmless unused parameter warnings in wxX11 wxCursor.
Parameters in wxCursor ctor are unused because it is not implemented but this
is already indicated by a wxFAIL_MSG() in it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61716 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-20 00:44:27 +00:00
Vadim Zeitlin
6e6b532c1a Rename wxRendererNative::DrawRadioButton() to DrawRadioBitmap().
This old name function conflicted with the one in wxRenderer in wxUniv and
also was misleading as this function draws only a bitmap and not the entire
wxRadioButton control.

The old workaround for the warnings about the function names conflict was ugly
and unmaintainable, as proven by the fact that wxRenderer method signature
already became different from the wxRendererNative one.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61715 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-20 00:44:22 +00:00
Vadim Zeitlin
995a95737a Fix extraction of standard command line arguments in wxX11.
The original number of arguments should be used when checking the argument
index for validity. Additionally, memmove() wasn't moving the correct number
of bytes because of forgotten sizeof().

See #11124.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61714 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-20 00:44:11 +00:00
Vadim Zeitlin
0055cc0e4a Flush log events in console applications as well.
Move wxLog::FlushActive() call from wxAppBase::ProcessIdle() to
wxAppConsoleBase::ProcessIdle().

Now that log messages from background threads are queued until the main thread
log target is flushed, we need to call wxLog::FlushActive() periodically to
see them at all, see #11115.

Besides, even though the default log target in console applications outputs
the messages immediately without queuing them, it is quite possible to use a
non-default target which does require flushing so this change also fixes a
potential bug with non-default log targets.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61712 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-19 23:51:24 +00:00
Jaakko Salli
afaf3b7037 Have DoRemoveFromSelection() take active editor into account
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61711 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-19 14:09:33 +00:00
Stefan Csomor
9a038ddca4 adding gc aware code, fixes #11061
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61710 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-19 13:01:08 +00:00
Stefan Csomor
aa30d6c896 making sure an empty label is not reserving place above, fixes #11123
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61709 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-19 12:39:49 +00:00
Paul Cornett
38e23f1020 Fix loading BMPs, broken in r60852. Parenthesize shift expressions.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61708 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-19 06:00:13 +00:00
Julian Smart
ab52bac815 Fix numpad Del not working in wxRTC
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61703 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-18 17:33:28 +00:00
Stefan Csomor
6fd21e1655 support for plug-in unloading, closes #10836
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61701 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-18 15:54:36 +00:00
Stefan Csomor
71da935dd2 better variant support, fixes #11114
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61700 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-18 15:39:53 +00:00
Stefan Csomor
eb1d8888a1 gcc 4.2 warning fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61699 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-18 15:32:04 +00:00
Stefan Csomor
f66ecdc4fb simplifying native string handling, see #11061
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61698 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-18 15:30:24 +00:00
Stefan Csomor
eceb28f912 fixing 64bit OSX, closes #11118
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61697 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-18 15:19:32 +00:00
Stefan Csomor
80c765ac5a added wakeup implementation for osx_cocoa
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61696 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-18 14:49:38 +00:00
Jaakko Salli
7f3f8f1e85 Made code that uses wxArrayPGProperty more STL compliant (still can't use wxVector for it because I think there is no wx equivalent of std::sort)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61695 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-18 14:28:08 +00:00
Vadim Zeitlin
f9136b63ee Include wx/filefn.h to fix PCH-less compilation.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61694 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-18 11:44:31 +00:00
Vadim Zeitlin
b0d58b0ea8 Fix compilation for wxUSE_LOG==0.
Move wxObject and wxFrame forward declarations so that they are accessible to
empty wxLogXXX() functions defined in wxUSE_LOG==0 case too.

Also take wxFormatString, not wxString, in these functions to avoid overload
ambiguities.

Closes #11103.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61693 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-18 01:22:57 +00:00
Vadim Zeitlin
b804f9924d Fix last error display in wxLogSysError().
After recent changes of wxLogXXX() functions into macros the last error was
overwritten by wxString::Format() called between the call to wxLogSysError()
and wxLog::CallDoLogNow() which called wxSysErrorCode() and so its original
value was lost and, unless the last error was specified explicitly, it always
came out as 0.

To fix this, call wxSysErrorCode() directly when calling wxLogSysError(). This
may be unnecessary (if the error is given explicitly) but there doesn't seem
to be any other way to fix it and the overhead of calling wxSysErrorCode()
shouldn't be that big.

Also add a unit test checking that wxLogSysError() behaves as expected.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61692 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-18 01:22:48 +00:00
Vadim Zeitlin
29a35dd5fe Don't define wxArrayPGProperty as std::vector in STL build.
wxArray::Remove() method is used on it so defining it as std::vector<> breaks
compilation in STL build. It is also insonsistent with all the other arrays in
wx none of which used "#if wxUSE_STL" around its definition.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61691 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-18 00:27:21 +00:00
Vadim Zeitlin
b725344420 Added missing wx/log.h header.
This fixes compilation without PCH.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61690 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-17 23:46:48 +00:00
Vadim Zeitlin
3270038fb4 Force linking of src/osx/core/sockosx.cpp.
Without this the file was omitted by linker entirely in the static build and
the correct socket manager wasn't used for the GUI applications (see #11030).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61689 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-17 23:02:56 +00:00
Vadim Zeitlin
6bcc1145fe Cleanly separate GUI socket-related code from net library.
This fixes linking problems under Unix introduced by recent changes which
fixed previous problems which were due to files not being linked in at all.

In order to provide a clean separation between base, net and core libraries we
now use the same wxSocketManager (wxSocketFDBasedManager), defined in net
library for both console and GUI Unix applications and just use different FD
IO manager for them: the latter can be defined in base and core libraries as
it doesn't involve wxSocketImpl at all, only its base wxFDIOHandler class.

At more detailed level, these changes required:
 1. Adding the new wxFDIOManager class.
 2. Refactoring the old (and now removed) wxSocketFDIOManager to use the same
    code as wxSocketFDIOManager. This involved:
  a) Adding handler and direction parameter to RemoveInput().
  b) Storing the mask of registered events in wxFDIOHandler itself.
  c) Defining wxFDIOManagerUnix which works with wxFDIODispatcher.
 3. Changing the traits classes in Unix ports to define GetFDIOManager()
    instead of GetSocketManager().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61688 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-17 23:02:46 +00:00
Vadim Zeitlin
b79dfbca98 No changes, just put the files in alphabetical order.
List files in BASE_UNIX_AND_DARWIN_SRC in alphabetical order for consistency
with the other file names variables and to make it more convenient to update
it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61687 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-17 23:02:34 +00:00
Vadim Zeitlin
3327957c0f Extract wxFDIOHandler in its own header.
The files defining classes processing events on file descriptor only need this
class and not wxFDIODispatcher itself so reduce build dependencies by extracting
wxFDIOHandler in a separate header which they can include instead of the
entire fdiodispatcher.h.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61686 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-17 23:02:29 +00:00
Vadim Zeitlin
251e98cb73 Added wxFDIOHandler::IsOk() and use it with wxSocketImplUnix.
This will allow to use the base wxFDIOHandler class only in GUI-specific
network code and this remove its dependency on wxSocketImplUnix. IOW it paves
the way for a proper solution of the problem fixed by r61336 without the hack
of r61335 which results in linking problems (which went undiscovered until now
but were, in fact, always present, i.e. r61335 couldn't work).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61685 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-17 23:02:18 +00:00
Jaakko Salli
fc72fab6c6 Added multiple selection feature to wxPropertyGrid (enabled by setting wxPG_EX_MULTIPLE_SELECTION style)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61681 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-17 18:36:00 +00:00
Vadim Zeitlin
17a5460272 Fix hangups when using sockets under OS X.
A socket event apparently doesn't count as a real event under OS X and our
wxEventLoop::DispatchTimeout() doesn't return when it happens -- so we need to
generate an artificial wake up event ourselves to make it do it and return
control to the code in wxSocket::DoWait() in order for it to process the event.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61678 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-16 23:14:07 +00:00