Commit Graph

49298 Commits

Author SHA1 Message Date
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
Vadim Zeitlin
05583a26e1 Don't forget to reset wxSocketImplMac members to NULL.
This avoids an assert in dtor.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61677 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-16 23:14:02 +00:00
Vadim Zeitlin
5815e95907 Use CF socket manager in GUI OS X applications.
wxSocketManagerMac was never created under OS X since wxSocket code
refactoring as wxGUIAppTraits::GetSocketManager() wasn't overridden.

Doing this required an extra nasty hack with a global variable in the base
library which is used just to pass the socket manager pointer from the net
library to the core one without creating a dependency between them but this
seems unfortunately unavoidable.

See #11030.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61676 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-16 23:13:55 +00:00
Vadim Zeitlin
4f260c9c68 Virtualize wxSocketImpl creation by routing it via wxSocketManager.
This is necessary to create different kinds of sockets for the console and GUI
applications under OS X: unlike Unix which use different socket managers for
the console and GUI programs but still use the same data structures in both
cases as X11 and derived toolkits APIs are very similar, Core Foundation
sockets don't have anything in common with their console counterparts and so
we need to use different wxSocketImpl versions too.

A side effect of this commit is that now we need to force linking of
src/msw/sockmsw.cpp when using sockets: this wasn't necessary before because
it contained wxSocketImpl method definition but now that there are no more
direct dependencies on it, MSVC linker simply discards the object file unless
we force it to link with it.

Notice that this commit doesn't change anything yet, it simply refactors the
code to use wxSocketManager::CreateSocket() instead of wxSocketImpl::Create()
in preparation for the next change.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61675 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-16 23:13:45 +00:00
Vadim Zeitlin
439293064d Create both the full and OS X specific tag files in makeosxtags.sh.
Also don't duplicate the files already processed by the generic create_tags in
OS X-specific part.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61674 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-16 23:13:37 +00:00
Jaakko Salli
5fdb635092 Fixed bug: wxPGProperty::SetName() crashed if it was called before property was added to grid (fixes #11111)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61673 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-16 15:17:50 +00:00
Vadim Zeitlin
95bd284e77 Add samples files missing from distribution.
Mostly XPM icons but also a header from dataview sample.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61672 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-16 13:32:11 +00:00
Jaakko Salli
832c54d43e Added workaround for VC6 internal compiler error (fixes #11104)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61668 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-15 05:30:18 +00:00
Michael Wetherell
02e3338904 Remove buildbot.css as it's never been used.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61667 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-14 19:09:55 +00:00
Michael Wetherell
d2da8c9716 Remove testdrive bots.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61666 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-14 18:57:15 +00:00
Michael Wetherell
1441bb60df Add new unix bots.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61665 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-14 18:55:36 +00:00
Michael Wetherell
15bab90f6c Rename ravnsgaard.xml to unix.xml
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61664 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-14 18:45:55 +00:00
Vadim Zeitlin
fdf20a26db Allow customizing wxDebugReportCompress output file.
It may be useful to change the directory where it is generated to allow the
users to find it more quickly. Also allow changing the crash report base name
for completeness.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61663 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-14 00:06:03 +00:00
Vadim Zeitlin
94aff795d4 Added wxStandardPaths::MSWGetShellDir().
This function allows to get the location of Windows shell special folders not
covered by wxStandardPaths methods (yet), e.g. CSIDL_DESKTOPDIRECTORY.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61662 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-14 00:05:56 +00:00
Vadim Zeitlin
1886760277 Minor updates to Vietnamese translations.
Patch from Trần Ngọc Quân.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61657 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-13 09:58:30 +00:00
Vadim Zeitlin
7079797917 Set correct EOL style for .po files which didn't have it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61656 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-13 09:50:57 +00:00
Vadim Zeitlin
b78df8565c Create compressed debug report file outside of temporary directory.
Otherwise the compressed file is deleted when the temporary directory is (it
doesn't happen if temporarily files are left because an error occurred while
the report generation but perversely enough no useful information was left if
no errors happened).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61646 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-11 18:16:39 +00:00
Vadim Zeitlin
7735b2ea69 Use the app name, not display name, as debug report name,
This name is used for files/directories and so should be short and not contain
spaces while the display name usually does contain them.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61645 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-11 18:16:32 +00:00
Jaakko Salli
01b5ad3b50 Do not generate wxEVT_PG_SELECTED with direct ClearSelection() and SelectProperty() calls
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61644 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-11 16:53:05 +00:00
Vadim Zeitlin
90666795d4 Another compilation fix after wxFlexGridSizer ctors change.
wxFlexGridSizer ctor was even used incorrectly even in layout sample itself,
once again the code was supposed to create 3*3 sizer, not 3-column sizer with
3 pixel vertical gap.

Changed ctors to be more explicit and to use a 5 pixel gap in both directions.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61643 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-11 10:54:40 +00:00
Julian Smart
2b2c1044f9 If zero spacing after paragraph is explicitly specified, suppress spacing after paragraph.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61642 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-11 09:28:02 +00:00
Vadim Zeitlin
bb9e19db3d Compilation fix after wxFlexGridSizer ctors change.
wxFlexGridSizer ctor was even used incorrectly in a wx sample: the sizer was
supposed to have 2 columns, not 4 with 2 pixels of vertical gap.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61639 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-11 00:19:03 +00:00
Vadim Zeitlin
58c69c44d0 Reorganize and improve wxSizer::SetItemMinSize() documentation.
Closes #11093.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61638 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-10 11:18:45 +00:00
Vadim Zeitlin
f81114dcd7 Correct wxSizer::InsertSpacer() description.
Closes #11092.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61637 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-10 11:18:38 +00:00
Vadim Zeitlin
0be3080aed Use "non-negative" in assert message instead of "positive".
Closes #11059.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61636 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-10 11:18:31 +00:00
Vadim Zeitlin
4a00e77ce6 Update wxFlexGridSizer ctors to match (new) wxGridSizer ones.
Confusing wxFlexGridSizer(int cols, int vgap = 0, int hgap = 0) was removed as
well as corresponding wxGridSizer ctor overload. New ctor overloads taking gap
as wxSize were added.

See #11040.

Closes #11091.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61635 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-10 11:18:23 +00:00
Vadim Zeitlin
c5cc7fbd27 Made wxWindow::HasScrollbar() do what it says.
Added wxWindow::CanScroll() with the old HasScrollbar() meaning but changed
HasScrollbar() to check for the scrollbar existence instead of just checking
if it might exist.

Closes #10897.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61634 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-10 11:18:09 +00:00
Julian Smart
4cd4a9ff70 Mark a couple of labels for translation.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61632 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-09 15:56:09 +00:00
Jaakko Salli
a6ca568ce0 Fixed wxPGProperty ctor documentation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61630 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-09 09:14:29 +00:00
Vadim Zeitlin
338c3ec73a Correct examples in wxStaticBox(Sizer) documentation.
Added missing wxID_ANY in the control creation calls.

Also rephrase/extend the discussion about creating windows shown inside the
static box as its children or siblings.

Closes #11086.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61628 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-07 12:39:41 +00:00
Vadim Zeitlin
f0f03f3242 Don't overwrite status message when restoring it if it changed.
wxFrameBase::DoGiveHelp() could rewrite the status bar message if it was
changed while the menu was showing.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61626 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-06 00:21:16 +00:00
Vadim Zeitlin
958f8790ce Use 0 instead of NULL to initialize wxUIntPtr.
This avoids warning about assigning NULL to a non-pointer with some g++
versions.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61625 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-06 00:03:08 +00:00
Vadim Zeitlin
6cf6897100 Don't pop explicitly changed status messages.
Calls to SetStatusText() in between Push/PopStatusText() were simply lost
before, now the text explicitly changed by SetStatusText() is preserved by the
next call to PopStatusText().

This required adding a new virtual method, called DoUpdateStatusText(), which
is now implemented in all the derived classes instead of overriding
SetStatusText() (on the bright side, it doesn't need to do any checks already
done in the base class any more).

Also fix PushStatusText() to actually show the text being pushed at all under
wxMSW as a side effect.

And further reduce code duplication between wxStatusBarBase and the derived
classes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61624 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-06 00:01:43 +00:00
Vadim Zeitlin
0751510c21 Fix DrawStatusField() to work correctly with wxSB_FLAT style.
It didn't draw the text at all before.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61623 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-06 00:01:12 +00:00
Vadim Zeitlin
1454b44261 Add test for Push/PopStatusText().
Allow to interactively push and pop status messages for the selected field.

This shows that currently PushStatusText() is completely broken under wxMSW
as it never shows the text being pushed at all because it is "optimized" away
due to an incorrect comparison with the old value (which turns out to be the
new one)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61622 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-06 00:00:47 +00:00