Commit Graph

59801 Commits

Author SHA1 Message Date
Stefan Csomor
606838b515 removing overridden ProcessIdle, reverting that part of r75289
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78362 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-10 09:13:50 +00:00
Vadim Zeitlin
510ae4e0b4 Send deactivation events to MDI children frame in wxMSW too.
For some reason, the code only forwarded activation events to the current MDI
child, but not the deactivation ones. And even though this was literally
always the case (the check for the event being the activation one is there
since r9), it is clearly wrong as the focus restoring code in wxTopLevelWindow
in wxMSW doesn't work if the focus hadn't been previously saved.

This fix hopefully completes the changes started by r78340 and r78341 and
ensures that the focus is always properly restored to the last focused window
inside an MDI child.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78361 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-09 03:30:13 +00:00
Vadim Zeitlin
a6d74d8176 No changes, just fix a slightly misleading comment in wxMSW focus code.
DefWindowProc() never preserves the focused window actually, whether we use
WM_NEXTDLGCTL (which is only handled by DefDlgProc() anyhow) or not.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78360 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-09 03:30:10 +00:00
Vadim Zeitlin
b6f741c6b1 Make specifying minimal size for "unknown" XRC controls work.
At least since the changes of r44456 (see #8378), minimal size specified in
the XRC for unknown controls didn't have any effect as it was set on
wxUnknownControlContainer itself and was overridden by the subsequent call to
SetSizerAndFit() which reset the minimal size to the best size of the control
contained in it, meaning that it was impossible to make this contained control
bigger by specifying min size greater than its best size in the XRC.

Fix this by honouring both the min size of the container and of the control
contained in it (and do the same thing for the max size for good measure).
To avoid not totally obvious interaction of overriding GetMinSize() and
DoGetBestClientSize() with sizer code, also position the child control
manually instead of using a sizer for it, it's an overkill for such a simple
case anyhow.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78359 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-09 03:30:06 +00:00
Vadim Zeitlin
6fad9cf2d9 Make generic wxDataViewCtrl initially usable from keyboard.
This control doesn't react to the keyboard at all if it doesn't have a current
row and as it doesn't have it initially, it means that there is no way to do
anything with the control without clicking it with the mouse first.

Fix this by giving it a current row, if possible, whenever it gains focus.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78358 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-09 03:30:02 +00:00
Vadim Zeitlin
5c9d7e139d Always invalidate wxStaticText best size after changing its label.
wxST_NO_AUTORESIZE style only affects whether the control is actually resized
when its text changes, but its best size should always change, so that if the
window containing it is explicitly relaid out the size does change.

Moreover, in wxMSW and wxOSX the best size was never invalidated at all when
the label was ellipsized, so it was never updated for them, preventing, for
example, comparing the best size with the current one to check if the text is
effectively ellipsized (and so needs to be shown in a tooltip, for example).

Fix this by calling InvalidateBestSize() unconditionally, this should make
these ports behave in the same was as wxGTK already did.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78357 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-09 03:29:58 +00:00
Vadim Zeitlin
ee5ab1fffa Fix wxBitmap conversion to wxImage in 64-bit wxOSX builds.
Don't assume that sizeof(long) == 4, this is just wrong.

Closes #16770.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78355 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-06 20:20:19 +00:00
Mariano Reingart
772d42cad1 Added new ctor for wxBitmap using wxCursor for wxQT (similar to wxGTK)
This is the implementation that should had been included in r78348

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78353 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-06 07:12:17 +00:00
Tim Kosse
984238305b On wxMac, modal event loops avoid deleting pending events. Hide the text control after editing a label in the generic tree control so it does not remain visible e.g. if the tree control is used in a dialog.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78349 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-05 12:48:45 +00:00
Mariano Reingart
6022671ee5 Added new ctor for wxBitmap using wxCursor for wxQT (similar to wxGTK)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78348 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-04 03:51:57 +00:00
Mariano Reingart
2e21cc2607 Added missing ctor for wxBitmap using wxIcon for wxQT (taken from wxOSX)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78347 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-04 02:49:44 +00:00
Vadim Zeitlin
308e20a74e Fix wxFileDialog::GetFilterIndex() when opening files in wxOSX.
Update m_filterIndex in the "opening" case, just as we already did in the
"saving" one (see #13158 and r67550).

Closes #16764.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78346 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-03 20:45:37 +00:00
Artur Wieczorek
56edecab94 Optimize wxPGChoices::Add methods.
Remove unnecessary variables, limit the scope of variables and implement some sanity checks.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78344 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-03 15:20:19 +00:00
Artur Wieczorek
d04c8569ca Optimize wxPGChoices::Set method.
There is no need to check if referenced array with values is 
valid since "reference cannot be bound to dereferenced null pointer in well-defined C++ code".
Moreover, conditional call of Add() methods(one with explicit parameter and one with default one) is not necessary.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78343 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-03 15:10:02 +00:00
Vadim Zeitlin
febb9c2ee2 Fix the size of the "new" bitmap in the toolbar sample.
It was broken by the changes of r78238 and was too small for the height in the
header, resulting in an immediate crash on toolbar sample startup.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78342 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-03 13:33:45 +00:00
Vadim Zeitlin
f3833aa067 Don't change MDI children order after showing a file dialog in wxMSW.
Don't use the generic focus saving/restoring code for wxMDIParentFrame in
wxMSW as it already saves and restores the active MDI child on its own and we
should let it do it, as our code could change the active child when restoring
focus if it hadn't been saved correctly previously.

The fact that it is isn't saved is another bug, but even if it is fixed, we
should let MSW MDI implementation handle activation as we can't do it any
better -- but can do worse, as the bug described in #16635 shows.

Closes #16635.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78341 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-03 01:07:53 +00:00
Vadim Zeitlin
8509ce2358 Fix saving focus for MDI child frames in wxMSW.
Use wxWindow::IsDescendant() instead of wxGetTopLevelParent() to determine
whether the focused window is inside the TLW, as the former works correctly
for any window, including wxMDIChildFrames, while the latter would return
wxMDIParentFrame for them (as MDI children are not considered to be TLWs) and
so saving the focus would always fail and the focus was always restored to the
first child of wxMDIChildFrame after switching from it to another child frame
and back, as could be seen by applying the simple patch:

---------------------------------- >8 --------------------------------------
diff --git a/samples/docview/view.cpp b/samples/docview/view.cpp
index 9f20032..8386522 100644
--- a/samples/docview/view.cpp
+++ b/samples/docview/view.cpp
@@ -160,8 +160,9 @@ bool TextEditView::OnCreate(wxDocument *doc, long flags)
     wxFrame* frame = wxGetApp().CreateChildFrame(this, false);
     wxASSERT(frame == GetFrame());
     m_text = new wxTextCtrl(frame, wxID_ANY, "",
-                            wxDefaultPosition, wxDefaultSize,
+                            wxPoint(5, 5), wxDefaultSize,
                             wxTE_MULTILINE);
+    new wxButton(frame, wxID_ANY, "Button", wxPoint(5, 100));
     frame->Show();

     return true;
---------------------------------- >8 --------------------------------------

Notice that the bug usually stayed hidden because it didn't happen if
wxMDIChildFrame contained a wxPanel (which also stores the last focus) inside
it or if the focus switched away from the entire application instead of just
going to another child and back, as in this case the last focus was stored in
wxMDIParentFrame, for which the old code did work.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78340 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-03 01:07:50 +00:00
Vadim Zeitlin
a2915312c2 Add include/wx/richtext/richtexttabspage.h to the MSBuild project.
This seems like an occidental omission.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78339 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-03 01:07:47 +00:00
Vadim Zeitlin
503d4e7f06 Remove files not being compiled from richtext MSBuild project.
Several sources in this project are actually not compiled at all, but are
included from other files, so they don't appear in the master sources list.

Update the project accordingly, for consistency with the earlier versions of
MSVC.

If these files should appear in it, they need to be added to RICHTEXT_HDR
variable.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78338 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-03 01:07:43 +00:00
Vadim Zeitlin
e498f96af8 Add appprogress.{h,cpp} to the files list.
The wxMSW header was absent from both the bakefile and master file list, and
the latter also lacked the other wxAppProgressIndicator-related files.

Also regenerate the project file to contain the MSW header.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78337 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-03 01:07:39 +00:00
Vadim Zeitlin
59780f98cc No changes, just sort files alphabetically in the bakefiles files list.
Keep MSW_SRC files list sorted, appprogress.cpp was added in a wrong place.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78336 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-03 01:07:35 +00:00
Vadim Zeitlin
25b5d670c2 German translations update from Wolfgang Stöggl .
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78334 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-02 23:49:32 +00:00
Artur Wieczorek
e622cc3f18 Delete wxDC object when exiting from wxPropertyGrid::OnPaint
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78333 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-02 16:15:52 +00:00
Vadim Zeitlin
5662e86b61 Improve widgets sample UI consistency.
Ensure that the various attributes (colours, font, border, ...) are preserved
when a widget is recreated or the current page is changed. This is more
convenient and also avoids discrepancies between the state of the menu items
and the actual state of the widget.

Closes #16576.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78332 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-02 14:26:53 +00:00
Artur Wieczorek
55da8a0f86 Pass outside wxPG a modified clone of wxEVT_TEXT event instead of hacking current event object.
Using a clone of event (with PG id) instead of replacing id in the currently processed event coming from wxPGTextCtrlEditor seems to be less intrusive and safer action.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78328 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-28 20:06:35 +00:00
Vadim Zeitlin
957f3c5b50 Fix reading of not NUL-terminated strings using wxRegKey.
Even though this is typically the case, some strings in Windows registry are
not NUL-terminated, deal with them correctly by using the explicit length.

Closes #16719.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78327 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-27 14:24:58 +00:00
Vadim Zeitlin
7dd75c8844 Revert "Add support for reading multi string values to wxRegKey."
Reverts r78136 (see #15727) because the multi-string values in Windows
registry are actually not "name=value" pairs at all but just NUL-separated
strings and the API provided for reading them was inappropriate.

Also see #16719.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78326 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-27 14:24:52 +00:00
Vadim Zeitlin
8d12e07453 Fix flickering when resizing a frame with status bar in wxMSW.
The flicker was only visible under Windows XP or when using a class theme
and was due to mis-positioning the status bar initially in PositionStatusBar().
Fix this by adjusting its position by the toolbar offset before calling its
SetSize().

Closes #16705.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78325 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-27 14:24:46 +00:00
Vadim Zeitlin
9bd2b4be51 Make disabling submenus work in wxMSW.
As submenu items don't have a valid ID, we need to address them by their
position when calling EnableMenuItem() -- and for simplicity do it for all the
items.

Closes #16747.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78324 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-27 14:24:40 +00:00
Artur Wieczorek
1b0d09e5be Do not actually reconnect PG event handlers when attempting to reconnect them to the same window.
When in wxPropertyGridManager::ReconnectEventHandlers() new window ID is the same as old window ID then there is no need to do anything with handlers. An assertion warning is displayed in this case to notify about this unusual (and maybe unintended) situation.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78321 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-27 11:30:45 +00:00
Vadim Zeitlin
6ecf4dcbfa Fix removing tools from wxToolBar in wxOSX.
Release the tool instead of retaining it (typo?) and also remove it from the
toolbar view.

See #16663.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78320 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-25 01:32:19 +00:00
Vadim Zeitlin
26216bccba Don't overflow the message queue in wxEventLoop::WakeUp() in wxOSX.
First, don't add any events at all to it unless it's empty. Second, post new
events with low priority instead of high one, we really don't care about them
getting processed, other, real, events should take priority.

Closes #14256.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78319 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-25 01:32:15 +00:00
Vadim Zeitlin
20c130a578 Blind fix for wxTextDataObject trailing NUL under OS X.
Use the length provided to SetData() instead of assuming it is NUL-terminated.

Closes #9522.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78318 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-25 01:32:10 +00:00
Vadim Zeitlin
25412dd286 Generate wxEVT_DATAVIEW_ITEM_ACTIVATED on Enter in wxOSX wxDVC.
Allow activating wxDataViewCtrl items from keyboard under OS X.

Closes #16272.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78317 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-25 01:32:05 +00:00
Vadim Zeitlin
e8374a47fe Allow setting hints for multi-line wxTextCtrl when supported.
Don't prevent people from using hints in wxMSW and wxGTK2, where they work
with multiline text controls too, even though they do not work with wxGTK3 nor
wxOSX.

Closes #14456.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78316 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-25 01:32:00 +00:00
Vadim Zeitlin
73a38319d8 Add support for strikeout fonts to wxMSW wxTextCtrl.
Map them to CFE_STRIKEOUT in the native rich text control.

See #16591.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78315 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-25 01:31:54 +00:00
Vadim Zeitlin
5d982d4438 Fix handling of fast clicks in wxRibbonBar under MSW.
Second click can result in a double click event instead of the usual simple
click if it happens quickly enough after the first one, so handle double
clicks in the same way as simple clicks instead of ignoring them.

Closes #16551.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78314 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-25 01:31:48 +00:00
Mariano Reingart
e2a0a4de4c Match the wxQT wxColour with public interface
Now the type of the value returned by Red, Green, Blue and Alpha methods are consistent with wxGTK and wxMSW.
This could fix ticket #16713 (symbols exported)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78313 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-24 20:02:57 +00:00
Mariano Reingart
9f009d128f Fix SIGSEGV due bad pointer in wxMessageDialog (wxQT)
m_qtWindow should be used instead of m_qtMessageBox (removed). If not, PostCreation() cannot call wxMessageDialog::GetHandle() as it is virtual (and it is called from the ctor), so it fails to set the base window pointer, raising a SIGSEGV in wxWindow::DoSetSize (for more info, see architecture in docs)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78312 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-24 19:19:27 +00:00
Vadim Zeitlin
c2ecbadd3b Fix some typos in the comments and messages in the samples.
Closes #16738.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78311 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-24 13:57:19 +00:00
Vadim Zeitlin
5b414a2795 Update dialog editors list in the manual.
Remove wxDesigner which is not offered any more and add wxCrafter.

Also use more neutral "form designer" term to avoid giving the impression that
these tools can only be used for the dialogs.

Closes #16744.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78310 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-24 13:57:14 +00:00
Vadim Zeitlin
443443db98 Add brief documentation for wxLog::Flush().
See #16744.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78309 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-24 13:57:10 +00:00
Vadim Zeitlin
a193a6786d Escape space after "e.g." or "i.e." in the manual.
This fixes formatting of the Doxygen-generated docs (maybe we should just
switch to the civilized spelling of "eg" and "ie" instead?).

See #16744.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78308 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-24 13:57:05 +00:00
Vadim Zeitlin
c0cbddbe66 Correct minor typo in wxMimeTypesManager documentation.
See #16744.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78307 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-24 13:56:59 +00:00
Vadim Zeitlin
141ed8034b Correct typo in wxStopWatch example in the documentation.
See #16744.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78306 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-24 13:56:54 +00:00
Vadim Zeitlin
12936eaba6 Czech translations update from Zbyněk Schwarz.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78305 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-24 13:56:50 +00:00
Vadim Zeitlin
ac9b3a4c37 Use Cmd-click, not Apply-click, to select items in wxVListBox.
Using Apple key here under Mac was unexpected, we should use Cmd which
corresponds to Ctrl used under the other platforms and which is already mapped
to it by wxKeyboardState::ControlDown().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78303 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-23 09:50:04 +00:00
Vadim Zeitlin
3db29244e5 Don't try setting width before column is added to wxOSX wxDVC.
This is not going to work anyhow and the width will be really set later, when
InsertColumn() is called.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78297 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-22 01:31:26 +00:00
Vadim Zeitlin
fb5c63beb7 Don't warn if model cell value is empty in wxOSX wxDVC.
This follows similar change to wxGTK a few commits ago and makes wxOSX
consistent with the generic version.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78296 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-22 01:31:22 +00:00
Vadim Zeitlin
0401ed9f35 Refactor type checks in wxOSX wxDVC implementation.
Check the type in one place only, before calling MacRender() instead of doing
it in each and every implementation of it.

Also replace wxFAIL_MSG() with wxLogDebug() as the former resulted in a crash
due to assert reentrancy, as usual when asserting inside a wxEVT_PAINT handler
which is constantly called all the time, and so wasn't particularly useful.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78295 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-22 01:31:19 +00:00