Commit Graph

59666 Commits

Author SHA1 Message Date
Vadim Zeitlin
6c3dfd113b Suppress harmless unused parameter warnings in release build.
Use WXUNUSED_UNLESS_DEBUG() for the parameters used only inside debug checks.

Closes #16829.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78435 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-04 13:16:20 +00:00
Vadim Zeitlin
3d2d8fc4ab Consistently refuse to create bitmaps with 0 width or height.
Homogenize the behaviour of all ports when creating bitmaps with 0 width or
height: just fail always as it doesn't seem to make sense to support this.

Closes #16828.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78434 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-03 18:28:21 +00:00
Paul Cornett
0c0484eaae set transient parent for 'about' dialog, closes #16823
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78433 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-02 18:31:24 +00:00
Paul Cornett
1b14371f07 use logical operator, rather than bitwise, on bools, closes #16824
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78432 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-02 17:23:55 +00:00
Paul Cornett
ecd32f0583 avoid passing invalid rect to Refresh(), closes #16819
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78431 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-01 18:06:06 +00:00
Vadim Zeitlin
eeead5ff6d Prettify configure output when checking for backtrace().
The output of "checking for backtrace()" was interspersed with the output of
"checking for library containing backtrace", which was ugly and potentially
confusing, so move AC_SEARCH_LIBS() out of AC_CACHE_CHECK() to fix it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78430 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-01 11:33:13 +00:00
Artur Wieczorek
1127820164 Encapsulate wxPGProperty::m_children member variable.
Implement RemoveChild and SortChildren methods to perform operations on m_children member variable.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78428 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-31 21:49:01 +00:00
Artur Wieczorek
da0f4ce29e Use getter methods to get access to wxPGProperty member variables.
Use GetValueImage() getter to get access to m_valueBitmap data member.
Use GetMaxLength() getter to get access to m_maxLen data member.
Use GetAttributes() getter to get access to m_attributes data member.
Use GetChoices() to get access to m_choices data member.
Use GetDepth() to get access to m_depth member variable.
Use GetBaseName() method to get access to m_name data member
Use GetLabel() method to get access to m_label member variable.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78427 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-31 21:45:24 +00:00
Artur Wieczorek
9698181b45 Use getter/setter methods to get access to wxPGProperty::m_flags.
Use dedicated wxPGProperty::HasFlags, wxPGProperty::SetFlag methods to check or modify wxPGProperty::m_flags member variable.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78426 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-31 21:42:17 +00:00
Václav Slavík
3c0b17d4b5 Avoid unneeded use of wxLocale in wxDateTime::Format()
On OS X, wxDateTime::Format() uses wxString::Replace() to
unconditionally replace locale-specific %c, %x and %X specifiers in the
format string if present. Doing so causes three wxLocale::GetInfo()
calls that are often not necessary.

Check for the presence of these  specifiers before calling GetInfo().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78423 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-30 15:53:05 +00:00
Václav Slavík
f81d6f68c6 Handle 5+ letter codes in TranslateFromUnicodeFormat()
Unicode TR #35 v26 allows for five-letter (MMMMM) or even six-letter
(EEEEEE) forms of some of the fields, but TranslateFromUnicodeFormat()
asserts in these situations.

Fix it to fall back to short forms for MMMMM and EEEEEE that are used in
practice e.g. on OS X if the user has custom formatting settings.

Consulting the table of sensible specifiers from
http://userguide.icu-project.org/formatparse/datetime, it appears these
two were the only omissions in this function.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78422 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-30 15:53:02 +00:00
Vadim Zeitlin
9a126106a9 Reset wxUSE_LIBNOTIFY if libnotify not detected in configure.
This avoids

WARNING: libnotify not found, wxNotificationMessage will use generic implementation.

followed by

Which GUI toolkit should wxWidgets use?    GTK+ 2 with support for libnotify

at the end.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78421 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-29 12:25:35 +00:00
Vadim Zeitlin
041f9a4cf2 Fix wxEVT_TREE_STATE_IMAGE_CLICK generation in wxMSW wxTreeCtrl.
Use GET_{X,Y}_LPARAM() to extract them from the event position, which handle
negative coordinates (and coordinates can perfectly well be negative when
using multiple displays) correctly, unlike {LO,HI}WORD().

Closes #16812.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78420 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-27 11:51:27 +00:00
Vadim Zeitlin
ad72c3429f Improve wxThread::SetPriority() comment and documentation.
Don't claim that SetPriority() can only be called before the thread is
created, this is just wrong.

Do document that it must be done after creating the thread in wxMSW (this is a
limitation of this port as POSIX implementation allows calling it at any
moment and could be lifted in the future).

Closes #16809.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78418 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-27 11:03:08 +00:00
Vadim Zeitlin
a3747ac959 Don't leave too much blank space in wxDatePickerCtrl under XP.
In our efforts to account for the longest possible string we made the control
too wide by default which didn't look very good, so reduce the amount of space
added to it, this still seems to be (just) enough for all the reasonable date
formats (tested under Windows XP SP3 with default DPI).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78417 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-26 15:10:45 +00:00
Vadim Zeitlin
0eca25d395 Clarify wxExpectModal<> use and implementation.
The only change in this commit is the omission of the primary wxExpectModal<>
template as it's not needed and it's enough to just forward declare it,
otherwise the changes are to the comments only and try to better explain how
this class should be used, i.e. that it's not required, although it may be
convenient, to specialize it, and also how it is implemented, notably the need
for the CRTP in wxExpectModalBase<>.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78416 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-24 22:09:04 +00:00
Vadim Zeitlin
9ae625518d Use C++ RTTI in dialog testing code if wxRTTI is not available.
This allows to get the best possible description of the dialog: if its class
uses wxRTTI macros, its user-readable name will be used, but otherwise we now
fall back on possibly unreadable but still informative mangled C++ class name
rather than showing just "wxDialog" which is not useful at all.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78415 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-24 22:09:00 +00:00
Vadim Zeitlin
826320ca7b Cosmetic change to wxTestingModalHook error message.
Don't include the word "dialog" in it, by default the description is just the
class name and so typically already includes "dialog" in it, e.g. we could
have "Expected wxFileDialog dialog" which was redundant.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78414 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-24 22:08:57 +00:00
Vadim Zeitlin
677eb37619 Provide better description of the expected message boxes.
While the example in the previous commit message, with two identical
expectations, still requires a custom description to be have unambiguous
failure messages, in other cases it's enough to show the expected message box
buttons in the error to make it possible to immediately see which expectation
failed, so include the information deduced from the expected button into the
description.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78413 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-24 22:08:54 +00:00
Vadim Zeitlin
9099ae2ded Allow providing descriptions for dialog tests expectations.
This makes test failure errors much more intelligible, e.g. in the following
case

	... some code ...
	wxTEST_DIALOG(wxYield, wxExpectModal<wxMessageDialog>(wxID_OK));
	... some more code ...
	wxTEST_DIALOG(wxYield, wxExpectModal<wxMessageDialog>(wxID_OK));

it was previously impossible to distinguish the first test failure from the
second one from just the failure description (it could be done by looking at
the line numbers since the recent change however), but with

	...
	wxTEST_DIALOG(wxYield, wxExpectModal<wxMessageDialog>(wxID_OK).
		Describe("first warning message box"));
	...
	wxTEST_DIALOG(wxYield, wxExpectModal<wxMessageDialog>(wxID_OK).
		Describe("successful completion message box"));

the failure becomes immediately clear.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78412 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-24 22:08:51 +00:00
Vadim Zeitlin
95177f3876 Allow predefining wxTEST_DIALOG_HOOK_CLASS before wx/testing.h inclusion.
Although it already was (and remains) possible to #undef and re-#define
wxTEST_DIALOG_HOOK_CLASS after including wx/testing.h, it should also be
possible to just define it globally in the testing code before including
anything else and not have to bother with the #undef part.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78411 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-24 22:08:48 +00:00
Vadim Zeitlin
7231f2fdf5 Improve error reporting from wxTEST_DIALOG() macro.
Give the location (i.e. file name, line number and the name of the function)
at which this macro itself appears instead of the location of ReportFailure()
method inside wxTestingModalHook which was quite useless as it was the same
for all the tests.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78410 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-24 22:08:44 +00:00
Vadim Zeitlin
3dff63b563 Add wxASSERT_MSG_AT() and wxFAIL_MSG_AT() macros.
These macros are useful for functions called from other macros to allow
pretending that an assert inside such function actually happens at the point
in the sources where the macro itself appears.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78409 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-24 22:08:41 +00:00
Vadim Zeitlin
54d2b38643 Define wxTrap() as a macro for gcc on Intel platforms too.
It is more convenient to break into the debugger at the exact location of the
assert instead of inside a nested wxTrap() function.

This does the same thing for gcc/x86 as was done for MSVC in r73124.

See #11184.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-24 22:08:36 +00:00
Vadim Zeitlin
0499b8375f Fix typo in a comment for NewCloseButton().
s/common/current/

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78407 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-24 22:08:32 +00:00
Artur Wieczorek
cafff4405a Use constant variables to store cached constants in wxPGGlobalVarsClass.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78405 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-22 17:32:48 +00:00
Vadim Zeitlin
5699e20e4e Remove accidentally left over wxLogMessage() from wxGTK wxWebViewWebKit.
This resulted in a message box being shown each time Find() was called and was
clearly undesirable.

Closes #16801.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78404 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-22 16:24:13 +00:00
Artur Wieczorek
5788b4b3d9 Use polymorphism to differentiate behaviour of wxEnumProperty and wxEditEnumProperty.
Override OnSetValue(), StringToValue(), ValidateValue() methods instead of using RTTI in conditional statements to check if wxEditEnumProperty object is actually handled.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78403 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-21 17:28:43 +00:00
Artur Wieczorek
9977d7daa9 Refactor propgrid sample (rounding numbers).
Use wxRound function to round floating point numbers.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78402 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-21 17:14:22 +00:00
Artur Wieczorek
c529c68c7a Refactor propgrid sample (attribute constants).
Use attribute constants instead of strings when calling wxPGProperty::SetProperty and wxPGProperty::GetProperty in propgrid samples.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78401 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-21 17:11:36 +00:00
Artur Wieczorek
1bac5cfbe0 Refactor property attribute names in wxPGProperty::GetAttribute calls.
Use attribute constants instead of strings in wxPGProperty and wxPGDefaultRenderer classes and in NumericValidation() function.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78400 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-21 17:06:16 +00:00
Artur Wieczorek
3100258aa1 Refactor wxPGSpinCtrlEditor.
Declare and use attribute constant instead of explicit string "MotionSpin".


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78399 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-21 16:59:46 +00:00
Julian Smart
4a5ae79a36 Remove selection before container is deleted or it could cause a crash later.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78398 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-21 14:31:28 +00:00
Václav Slavík
8af006cfd8 Use wxNB_MULTILINE in wxPreferencesEditor
The size of the dialog in wxPreferencesEditor's generic implementation
is determined from notebook pages alone and doesn't account for label
size, which may be significantly longer in some languages (German,
Danish). If the labels don't fit into the window, some of the tabs are
hidden behind scroll buttons that are easy to overlook.

Improve usability by using wxNB_MULTILINE, which will use multiple rows
of tabs in this situation. This is what e.g. Internet Explorer does in
its preferences as well.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78395 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-20 15:26:39 +00:00
Tim Kosse
9396ae004b Fix memory leak introduced in r78179: wxMenuItemBase::SetAccel does not take ownership of the passed pointer nor keeps it for later use.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78393 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-20 15:00:28 +00:00
Artur Wieczorek
5675ba1e84 Function wxPGProperty::HasFlag should return Boolean value.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78392 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-19 20:19:26 +00:00
Artur Wieczorek
42a1064ea8 Implement deprecated wxPGProperty::GetValueString function only in wxPG 1.4 compatibility mode.
This function was marked as deprecated in 2008.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78391 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-19 19:58:32 +00:00
Artur Wieczorek
752938cecd Fix a hack implemented in wxEnumProperty::ValueFromString_ and wxEnumProperty::ValueFromInt_ functions.
wxEnumProperty code is refactored in order to fix a hack which purpose was (apparently) to bypass constness of these functions by caching determined indices in wxEnumProperty::ms_nextIndex static member variable for further processing. (Unclear concept of using this static member was referred in http://trac.wxwidgets.org/ticket/12779#comment:9)
Now, determined index is returned to the caller and processed there if necessary and hence caching of this index is not necessary.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78390 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-19 17:22:29 +00:00
Vadim Zeitlin
eec7ef7232 Use logical operations instead of bit-wise ones for booleans.
wxUniv "Windows" theme code wrongly used bitwise operations on boolean values,
fix this.

Closes #16796.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78389 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-19 12:18:47 +00:00
Mariano Reingart
e59e6abe7d remove wxMISSING_IMPLEMENTATION because wxQtDCImpl::DoBlit is implemented
Thanks @seandepagnier


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78388 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-19 03:05:09 +00:00
Mariano Reingart
e01005e27c Fix problem with scrollbar events in wxQT
the local variable event shadowed the parameter which caused
the incorrect value to be sent

Thanks @seandepagnier


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78387 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-19 03:03:59 +00:00
Mariano Reingart
c8e56fa2cf Fix crash from possible NULL pointer in wxQT list ctrl
Thanks @seandepagnier


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78386 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-19 03:02:23 +00:00
Mariano Reingart
0476cf3791 Fix problem with clipping region in wxqt.
QPainter cannot set the clipping region when it is not active.

Thanks @seandepagnier


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78385 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-19 03:01:18 +00:00
Mariano Reingart
e67fbf1579 wxQT: move destroyed debug log into class method
(remove global function to handle destroyed signal)
This is needed for applications because the global function is not exported, yet it
is used by the opengl library.  An alternative is to add utils.cpp to the opengl library

Thanks @seandepagnier


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78384 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-19 02:57:06 +00:00
Mariano Reingart
3be53c43d7 wxQt: Fix compiler error for ambiguous call
(when compiling without unicode support)

Thanks @seandepagnier

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78383 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-19 02:44:11 +00:00
Mariano Reingart
bb2db9d890 wxQT: Add guard to wxWindowQt for building without unicode support
Thanks @seandepagnier

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78382 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-19 02:41:44 +00:00
Mariano Reingart
eab495c496 wxQt: fix performance issue with font comparisons
Thanks @seandepagnier

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78381 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-19 02:39:52 +00:00
Mariano Reingart
f4c0e0c342 Added wxUSE_XLOCALE ifdef guard to wxTimePickerGenericImp
Allow to compile wxQT when configure with --disable-xlocal

Thanks @seandepagnier

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78380 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-19 02:38:19 +00:00
Mariano Reingart
437af7bcff Fix building for wxQT-android with sockets enabled
The bionic library on android does not have gethostbyname_r even
though it has gethostbyname_r.  The configure script in wxwidgets
assumes if it has one it has the other.   This change does the right
thing for android, but perhaps the script should instead test for both?

Thanks @seandepagnier

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78379 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-19 02:31:49 +00:00
Mariano Reingart
aeb68ff500 Fix Select on wxQT DC implementation
Need to set the underlying qt painter up with the current pen, brush and font when a new object is selected
Thanks @seandepagnier


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78378 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-19 02:29:38 +00:00