Commit Graph

50721 Commits

Author SHA1 Message Date
Vadim Zeitlin
5eb342f9a2 Remove unused and empty src/x11/joystick.cpp file.
This was never implemented and is unlikely to ever be. In any case the file
didn't contain anything useful.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63724 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-20 13:03:09 +00:00
Vadim Zeitlin
679918f93d Rename wxWindow::GetMainWindow() to X11GetMainWindow() in wxX11.
This avoids conflicts with GetMainWindow() defined in other wxWindow-derived
classes (such as wxDataViewCtrl and potentially user-defined classes as well).

Closes #11818.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63723 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-20 13:03:05 +00:00
Vadim Zeitlin
21867d9888 Fix a couple of harmless unused parameter warnings in wxX11.
See #11818.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63722 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-20 13:03:00 +00:00
Vadim Zeitlin
e3728f8a8d De-TAB-bed src/x11/pango_x.cpp.
This is necessary in order to be able to check in its modified version in the
next commit.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63721 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-20 13:02:56 +00:00
Vadim Zeitlin
c514752837 Fix some harmless unused parameter warnings.
These warnings only happen in specific builds (when HAVE_LANGINFO_H and
wxUSE_DISPLAY are undefined/off).

See #11817.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63720 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-20 12:45:47 +00:00
Vadim Zeitlin
26844c729f Check whether SA_RESTART is defined and don't use it if it isn't.
SA_RESTART is not defined for QNX and not only VMS so test for it directly
instead of testing for the platform.

See #11817.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63719 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-20 12:45:43 +00:00
Vadim Zeitlin
feedacd880 Include sys/time.h from threadpsx.cpp for all systems.
It's needed by Linux and QNX and shouldn't do any harm under the others.

See #11817.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63718 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-20 12:45:39 +00:00
Vadim Zeitlin
7fbff80203 Add support for QNX to dialup detection code.
See #11817.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63717 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-20 12:45:33 +00:00
Vadim Zeitlin
d141826876 Always include sys/time.h and sys/select.h from selectdispatcher.h.
fd_set used by this header is supposed to be defined in sys/select.h and not
including this header resulted in compilation problems under QNX. And
including sys/time.h shouldn't hurt and is needed by select() under many
systems anyhow.

See #11817.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63716 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-20 12:45:28 +00:00
Vadim Zeitlin
ef40c54c63 Define wxGraphicsRenderer::GetDefaultRenderer() for all non-{MSW,Mac} ports.
wxGraphicsRenderer::GetDefaultRenderer() was only defined for wxGTK for some
reason but it needs to be defined in terms of GetCairoRenderer() for all ports
without native renderer implementation, i.e. everything but wxMSW and wxMac.

See #11817.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63715 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-20 12:45:23 +00:00
Vadim Zeitlin
636d5f3f23 Remove duplicate variable definition.
The splitterX variable in wxPropertyGrid::HandleMouseMove() was defined twice
with the same value, remove the second definition to avoid warnings about
shadowing the variable in outer scope from some compilers.

See #11817.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63714 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-20 12:45:19 +00:00
Francesco Montorsi
d86f721af3 Fix various doxygen warnings
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63713 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-19 22:35:30 +00:00
Vadim Zeitlin
60a7194e43 Postpone initialization of owner-drawn menu metrics.
Doing it during globals initialization time didn't work and could even result
in a crash due to dereferencing a NULL wxTheApp pointer.

Closes #11806.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63712 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-19 09:57:15 +00:00
Jaakko Salli
28756ab9c5 Clarify documentation for wxPropertyGridEvent::GetProperty()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63711 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-18 17:12:40 +00:00
Vadim Zeitlin
34e3a8105d Return exit code as signed integer from wxExecute(wxEXEC_SYNC).
The caller expects the function to return -1 if the child process exited with
-1 error code and not 255 that was returned before. The function is also
documented as returning -1 if the execution fails which wasn't true neither.

Fix this by explicitly handling the exit code as signed.

Closes #11824.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63710 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-18 15:51:19 +00:00
Vadim Zeitlin
0772a89875 Ensure that setting wxChoice height to its default value does set it.
Setting wxChoice height to its default value didn't change the height even if
the current height was different from the default. This resulted in problems
when a wxChoice was used inside a wxAuiToolBar because AUI temporarily reduces
the toolbar size to (1, 1) when docking it (thus ensuring that the height of
wxChoice is changed too) and generally didn't make sense.

Fix this by resetting the height to the default value if the value passed to
wxChoice::SetSize() is what it considers to be its default height.

Add a unit test for this bug and also add a wxChoice to AUI sample to allow
testing for wxChoice behaviour inside a wxAuiToolBar being [un]docked.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63708 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-18 15:07:39 +00:00
Vadim Zeitlin
3f931438cc Remove wxAuiProportionalBoxSizer hack and replace it with wxBoxSizer.
The temporary workaround due to wxBoxSizer changes in 2.9.0 is not needed any
more, revert r59889 and use wxBoxSizer instead of custom
wxAuiProportionalBoxSizer again.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63707 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-18 15:07:32 +00:00
Vadim Zeitlin
729f53d421 Fix box sizer layout algorithm to respect both proportions and min sizes.
The new version of the algorithm tries to distribute the entire space
allocated to the sizer among its children, just as the version in 2.8 did,
while still respecting minimal children sizes first and foremost. This means
that the space allocated to the item will always be at least its minimal size
if the total space is at least equal to the sum of minimal sizes of the
children but that if there is enough space, the proportions will be respected
too.

Extended the unit test to check that laying out various combinations of three
elements results in the expected results.

Closes #11311.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63706 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-18 15:07:24 +00:00
Vadim Zeitlin
a71aeb2426 Ensure that size in the minor direction of box sizer doesn't exceed the total.
This is similar to the previous commit but for the transversal direction of a
box sizer: we could give an item size larger than the size of the sizer itself
making only part of its window visible (and thus potentially making the window
unusable e.g. because the scrollbar wasn't visible at all).

Fix this by always restricting the item size in the minor direction to the
total size available and add a unit test which failed previously and passes
now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63705 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-18 15:07:19 +00:00
Vadim Zeitlin
26022721e8 Ensure that size in the major direction of box sizer doesn't exceed the total.
After fixing the problem with "growing items by negative proportion" in r56010
(which still was the correct thing to do as it fixed such indefensibly broken
behaviour as shrinking items with larger proportion by more than "smaller"
items when there was not enough space) the items in a box sizer could become
larger than the total space allocated to the sizer resulting in only parts of
them being visible.

Fix this by truncating the items to the (remaining) total size even if this
means making them less than their minimal sizes -- because there is nothing
else we can do when the total space is smaller than the sum of minimal sizes
anyhow.

Closes #10008.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63704 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-18 15:07:14 +00:00
Vadim Zeitlin
869c7a944b Add (a very simple for now) wxBoxSizer unit test.
Only check that layout for a single sizer item works correctly for now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63703 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-18 15:07:10 +00:00
Vadim Zeitlin
bbf82147ab Czech translation update from Herbert Breunung.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63702 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-18 15:02:15 +00:00
Jaakko Salli
6cf5edea27 Use explicit wxPGPropertyFlags enum type with wxPGProperty::SetFlag() and similar member functions (thus preventing use of incorrect set of flags). Also now document wxPGProperty flags.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63700 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-17 18:17:19 +00:00
Stefan Csomor
bf06fbce41 fixing non-precomp builds
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63699 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-17 09:13:55 +00:00
Stefan Csomor
9aee121225 adding proper removal of observer for stacked event loops, using cfrunloop for console on osx as well
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63698 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-17 08:05:04 +00:00
Stefan Csomor
80eee8378f streamlining OSX event support third step, using platform specific native run methods for event loops
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63697 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-17 07:14:03 +00:00
Robert Roebling
0e92a846e4 Don't use grouping of different methods as this creates confusing output
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63694 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-16 19:13:36 +00:00
Vadim Zeitlin
0f1c3d30d4 Add white outline to bulls eye cursor used under MSW.
The cursor used black circles only making it perfectly invisible on black
background. Add a white outline as well to ensure that it can be seen in this
case too, similarly to how it's done for magnifying glass cursor and the same
bulls eye cursor in GTK+.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63693 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-16 14:48:02 +00:00
Vadim Zeitlin
459128ac88 Initialize picker style in native GTK file/dir pickers.
This fixes the styles used in the native wxGTK version after changes in
r63654: we must initialize base class m_pickerStyle now and the code didn't do
this before resulting in various asserts and incorrect behaviour.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63690 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-16 00:23:57 +00:00
Stefan Csomor
293a13bad7 streamlining OSX event support second step, moving pending and idle event handling to runloop-observer, see #11805, see #11797
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63689 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-15 19:31:57 +00:00
Stefan Csomor
0056673c67 streamlining OSX event support first step, see #11805, see #11797
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63687 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-15 15:40:47 +00:00
Jaakko Salli
be7e10393a Fixed label editor position for child properties
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63686 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-14 17:15:17 +00:00
Vadim Zeitlin
968d3a2461 Fix test for compilers not supporting \u escapes in strings (such as VC6).
Also reformat the code to follow wx style and explicitly use UTF-8 for the
test strings encoding instead of assuming the encoding of the current locale
was UTF-8 (which is never the case under Windows).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63685 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-14 14:47:11 +00:00
Vadim Zeitlin
a41b1a1bba Set correct properties for the new file added in r63660.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63684 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-14 14:44:25 +00:00
Vadim Zeitlin
b76b3d2854 Use an appropriate icon automatically in wxMSW wxMessageDialog.
wxMessageBox() functions uses wxICON_QUESTION or wxICON_INFORMATION
automatically if no other icon style (including wxICON_NONE) is specified but
wxMessageDialog under MSW didn't do this, unlike under e.g. wxGTK.

Fix this by also determining the appropriate icon automatically in
wxMessageDialog itself in wxMSW.

Ideally we'd do this in all ports wxMessageDialog implementations and remove
the code doing it from wxMessageBox() but right now it's still needed for the
platforms other than wxMSW and wxGTK.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63683 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-14 14:15:49 +00:00
Vadim Zeitlin
8bd410eb80 Document that message box with wxYES_NO but without wxCANCEL can't be closed.
Recommend using these styles together to avoid it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63682 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-14 14:15:46 +00:00
Vadim Zeitlin
8783d72f04 Add a "not specified" icon style to the message box test dialog.
The sample allowed to test the behaviour with all wxICON_XXX including
wxICON_NONE but not without any icon styles at all. Do allow it now.

Also use symbolic names for the radiobox indices for clarity.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63681 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-14 14:15:42 +00:00
Vadim Zeitlin
d9ffb9fdcc Use event tables instead of Bind() in uiaction sample.
This should fix VC6 build broken by addition of this sample as VC6 doesn't
support Bind(). Luckily, there is no need to use it here anyhow.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63680 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-13 21:58:04 +00:00
Vadim Zeitlin
229251afd8 Add minimal support for QNX to configure.
Recognize QNX and define __QNX__ under it.

Don't use -lpthreads as the thread functions are in libc under QNX.

Use wxX11 by default.

See #11790.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63664 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-12 22:59:56 +00:00
Jaakko Salli
226441f05f Fixed property editor re-positioning when additional column editor (e.g. label editor) is used
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63663 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-12 14:38:05 +00:00
Vadim Zeitlin
5d12911287 Revert unneeded fix for list control headers from r63177.
The call to SetItemMinSize() shouldn't be needed and the latest OS X version
does work correctly without it. Apparently the real bug was fixed somewhere
else in the meanwhile.

Closes #11309.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63662 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-12 09:36:37 +00:00
Vadim Zeitlin
7eb670ac14 Correct query for formats supported by wxDataObject in wxGTK wxClipboard.
We wrongly asked wxDataObject for the formats it could provide on output
instead of those it accepted as input in wxClipboard::GetData() in wxGTK.
This could result in clipboard not working for "asymmetrical" data objects.

See #11811.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63661 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-12 09:27:10 +00:00
Francesco Montorsi
a37da0fa55 Fix function wxControlBase::DoEllipsizeSingleLine to really make sure that the ellipsized string takes less pixels than maxFinalWidthPx.
Add comments to explain in more details what the function does and in particular the valid ranges of all internal variables; fix in that regard both the code of both wxELLIPSIZE_START, wxELLIPSIZE_MIDDLE and wxELLIPSIZE_END.
Add more asserts to check the valid ranges and turn a couple of time-expensive checks in level-2 asserts.
Add a test unit for the wxControl::Ellipsize function.
Fix minor details in the docs of wxControl::Ellipsize.
Closes #11567.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63660 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-10 13:57:47 +00:00
Francesco Montorsi
8ab11e46c0 no real changes, just rename the variables to make the code more readable and to prepare everything for the next commit:
- add postfix "Px" to all variables containing numbers of pixels
- add postfix "ToRemove" to initialChar and nChars vars to make it clear what they are for

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63659 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-10 11:07:57 +00:00
Vadim Zeitlin
5d7792236f Use _UNICODE instead of UNICODE in wx/msw/winundef.h.
This is consistent with the other checks and generally more correct.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63658 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-09 11:08:52 +00:00
Vadim Zeitlin
041a4f6d98 Another German translation update from Herbert Breunung.
German translation is now 100% complete again.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63655 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-08 23:34:08 +00:00
Vadim Zeitlin
8eca1205e2 Use correct style for the dialog shown by generic file/dir pickers.
The picker styles don't make sense for the button so we don't use them when
creating the button but we do need to somehow use the style the picker was
created with to create an appropriate dialog when it's clicked.

Fix the problem by simply storing the style in a member variable and using it
instead of wxWindow::m_windowStyle.

Closes #11635.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63654 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-08 19:37:08 +00:00
Václav Slavík
49e714e127 Fix wxTlsValue<> memory leaks.
Win32 API doesn't provide pthreads-like destructors, so we need to
emulate them to free per-thread allocated memory.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63653 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-08 12:21:58 +00:00
Stefan Csomor
a765eef35f pending events detected didn't work properly, go the safe route now, fixes #11797
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63652 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-08 11:08:10 +00:00
Francesco Montorsi
9bbb78b9c1 Provide more details about the major and minor version numbers returned by wxGetOsVersion() under linux,mac,windows.
Document that wxOS_UNIX, wxOS_MAC and wxOS_WINDOWS enum values are combinations of other values (unfortunately doxygen does not show the definition of those symbols in the HTML docs so we need to explicitely state that).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63650 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-07 16:03:53 +00:00