Previously used macro's arguments were evaluated twice, but there were
many occurences of their use in our code that didn't account for this
and used expensive-to-evaluate arguments as if they were functions.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65920 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
There are no real changes but ensure that the new objects of classes using
DECLARE_OLE_UNKNOWN() macro are created with valid reference count of 1
instead of being created in phantom state with reference count of 0.
Remove the now unnecessary AddRef() and add the now required DecRef() calls.
See #11566.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65912 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Ensure that the IFrameSite object is created with valid (i.e. non-zero)
reference count by calling AddRef() on it immediately after creation and
remove the weird QueryInterface() call which was used to work around this bug.
Closes#11566.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65911 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Handle CONNECT_E_NOCONNECTION return value from IConnectionPointContainer::
FindConnectionPoint() as an expected error and don't complain about it.
See #11566.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65910 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add SWP_NOACTIVATE to the flags used by wxWindow::MSWUpdateStyle(). This
allows to change the style of a window without necessarily activating it.
Closes#11560.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65909 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Replace wxLogDebug() with wxLogTrace() as was probably intended. This fixes
the assert which happened when running the sample because of the wrong number
of parameters passed to wxLogDebug().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65908 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This makes it more convenient to run the sample repeatedly as the directory to
watch can be specified only once instead of having to choose it interactively
after the sample startup every time.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65907 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
When changing the selected item programmatically 2 CHANGING and CHANGED events
were sent because the assumption that comctl32.dll didn't send these events
itself was not correct any more, it does send them at least since XP. However
to avoid the tests for its exact version it's simpler to just ignore the
events it generates and continue sending our own ones.
Closes#11274.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65906 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The workaround for the unexpected events order introduced in r49588 should
only apply to the situation when the user selects an item in the tree, not
when it's done programmatically as this results in unexpected focus changes
(see #11274).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65905 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The generic wxTreeCtrl version only sends this event when the mouse is right
clicked on a valid item so do the same in wxMSW version too for consistency.
This is also consistent with wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK event and
avoids strange problems with unexpected wxEVT_COMMAND_TREE_ITEM_MENU events
generated on right double click.
Finally, replace the checks for item validity in the event handler in the
sample with asserts which should loudly complain if it happens to be invalid.
Closes#11226.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65903 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use helper GetWeek{Start,End}() functions instead of repeating tests for
wxCAL_MONDAY_FIRST over and over again.
Also replace some occurrences of GetWindowStyle() with shorter and more clear
HasFlag().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65902 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
When the date was constrained to a range in wxGenericCalendarCtrl, the display
of the month in the month combobox could get out of sync with its real value.
Ensure that the correct month is always displayed and also simplify the code
by removing the apparently unnecessarily complex logic in ChangeYear() and
ChangeMonth() functions.
Closes#11060.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65901 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
After removing wxDIB::m_hasAlpha in the previous commit, this method became
completely trivial so put it inline in the header.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65900 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This field can't be set reliably as we don't know if LoadImage() Windows
function loaded an 0RGB or an RGB bitmap so remove it completely to avoid the
risk of using it wrongly.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65899 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxDIB::m_hasAlpha can't be trusted when the DIB was loaded from a file so
don't rely on it in wxDIB::ConvertToImage(). Instead, suppose that 32 bpp
bitmaps do have alpha channel and only get rid of it at the end of conversion
if it turns out that all alpha values were 0.
Closes#10133.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65898 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't choose the verb explicitly and let ShellExecuteEx() choose the default
one. In the vast majority of cases this will do the same thing but if some
file type doesn't have an "open" verb the new version will still open it
correctly using its default verb while the old version failed.
See #10707.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65897 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add an optional wxExecuteEnv parameter to wxExecute() which allows to specify
the initial working directory and custom environment for the child process.
Closes#12163.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65896 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Even when the controller was hidden, space was still allocated for it by
wxBookCtrl. Fix this by only reserving extra space when the controller is
shown.
Closes#12609.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65894 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The raw flags were previously unused in wxGTK but hardware key code is an
important information which may be useful to the application, so pass it in
the flags (this is rather symmetric with passing lParam in it under MSW as
lParam contains the scan code, among other things).
Also document the meaning of raw key code and flags in all the major ports.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65893 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
If "-o" option is given, generate the output header file in the same directory
as the .cpp file and not in the current directory.
Closes#4054.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65892 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxNotebook was unusable with so many pages under all platforms and completely
unusable under Mac. Replace it with wxChoicebook which allows to select any
page quickly instead of having to do it sequentially (or not being able to do
it at all under Mac).
Another possibility could be to use wxTreebook and organize the pages in
categories, similarly to how it is done in the widgets sample.
Closes#3699.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65891 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Several new pages were added in random positions, rearrange them to be in
alphabetical order.
Also remove wxToolBar from "The Rest" page as it is shown in one of the other
pages now.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65890 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
No real changes but refactor wxSizerXmlHandler to make it easier to derive
from it by adding virtual IsSizerNode() and DoCreateSizer() methods. To add
support for a custom sizer class you only need to override them in
wxSizerXmlHandler subclass now.
Also document wxSizerXmlHandler which was not documented at all previously.
Closes#11845.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65889 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This simple helper function doesn't use any wxXmlResourceHandler data as it's
just a trivial wrapper for wxXmlNode::GetAttribute().
Making it static allows, in particular, to call it from const member functions
of wxXmlResourceHandler-derived classes (making it "const" itself would
achieve this too, of course, but it just doesn't need to be non-static).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65888 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
appicon.xpm was removed so use another icon in the controls demo in the sample
instead, it doesn't matter which one we use anyhow.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65886 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Let the image list deduce its size from the first bitmap in it. This is better
than the old behaviour of using the standard icon size as it allows to omit
the size from the image lists provided they contain the bitmaps of the same
size.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65884 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The return value of ShowModal() is the affirmative id and not wxID_OK, of
course.
See ##11413 (specifically comment 5).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65883 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Call OnXXX() from wxThread::Kill() and Delete() respectively to allow the
thread being terminated perform some cleanup.
Closes#9046.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65882 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add wx/persist headers to the list of files used by "make dist" and remove the
message catalogs which shouldn't be part of the source distribution.
See #12567.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65879 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Instead of hardcoding the list of wxBase headers path, build it automatically
from the list of their base names which is generated by bakefile and so is
always up to date.
See #12567.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65877 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Explicitly enable the use of GNOME printing and media control to ensure that
RPMs are always created with these features enabled.
See #12567.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65876 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We don't distinguish debug and release builds under Unix any more in 2.9 and
don't use "release" and "debug" suffixes in full wx-config names. Remove these
suffixes from the wx-config links created by RPM post-installation step.
See #12567.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65875 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
As closing the output stream makes it unusable, it is destroyed as well and so
GetOutputStream() returns NULL after calling CloseOutput().
Closes#12605.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65874 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
expanded. The attached patch fixes this by expanding all ancestors of the
item before expanding the item itself. Closes#12585: wxDataviewCtrl::Expand() needs to expand all ancestors
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65873 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775