Commit Graph

32607 Commits

Author SHA1 Message Date
Vadim Zeitlin
32dc4cc8db Avoid crashes when deleting owned top level windows.
Don't delay the TLW destruction if it has a parent and its parent is already
being deleted: we can't delay the inevitable in this case and only succeed in
making the program crash if we try.

Closes #15743.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75447 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 00:01:33 +00:00
Vadim Zeitlin
9955f6fd86 Prevent wxGrid rows/columns from becoming too small on double click.
The minimal size wasn't respected when auto-sizing rows/columns in
Set{Row,Col}Size() which was called in response to double clicking the
separator line, which resulted in clearly wrong behaviour as the user was
prevented from resizing the row/column to a smaller size by dragging them but
not by double clicking, so fix this to respect the minimal size as well.

Closes #15627.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75446 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 00:01:28 +00:00
Vadim Zeitlin
c3d1d22f66 Fix harmless MSVC warning.
Avoid "converting value to bool" warning introduced by r75310.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75445 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 00:01:25 +00:00
Vadim Zeitlin
c0984e8382 Update the generated file after gen_iface.py change.
Regenerate the file to use the symbolic constants instead of the raw values.

See #15783.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75444 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-28 22:20:30 +00:00
Vadim Zeitlin
3d5f3bcac7 Use symbolic constants names in the generated wxSTC files.
Update the script generating stc.cpp to put the symbolic constants names and
not their raw numeric values into the generated code. This makes it much
easier to read and understand.

Closes #15783.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75443 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-28 22:20:25 +00:00
Vadim Zeitlin
11d0e0f943 Make raw pixel access work even with DDBs under MSW.
This is inefficient, because we need to copy pixels to and from them, but
better than silently doing nothing.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75438 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-28 15:11:34 +00:00
Vadim Zeitlin
d75c0a8cc7 Add wxNumberEntryDialog default ctor and Create().
Allow creating wxNumberEntryDialog in 2 steps, as most of the other classes.

Closes #15769.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-21 22:26:38 +00:00
Stefan Csomor
b0a5f5ac18 - one single method for sending char events from a NSString
- adding insertText override for multiline fields as char events went missing after r74945

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75405 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-21 14:59:50 +00:00
Vadim Zeitlin
b69da09293 Add wxPasswordEntryDialog default ctor and Create().
Allow creating wxPasswordEntryDialog in 2 steps, as most of the other classes.

Closes #15770.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75404 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-21 12:23:59 +00:00
Stefan Csomor
947a8734ac reverting r74098, applying John's version, see #15008, #15765, #13841 will be backported if no regressions are discovered
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75401 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-20 16:03:13 +00:00
Vadim Zeitlin
0cf0dfae6b Don't crash in wxAuiToolBar::GetToolBarFits().
The code could crash if m_overflowVisible was true but m_overflowSizerItem was
NULL. Ideally this shouldn't happen in the first place, but it did, so at
least fix the crash for now -- and hopefully this code will be refactored to
make it more clear later.

Closes #15747.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75400 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-18 16:18:57 +00:00
Vadim Zeitlin
fba8b37345 Add wxHtmlWindow::SetDefaultHTMLCursor().
This allows to change the cursors used by any HTML windows, before creating
them.

Closes #15324.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75398 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-18 16:00:43 +00:00
Vadim Zeitlin
19df537ca1 Treat empty variants as null ones in wxMSW OLE code.
Simply ignoring VT_EMPTY variants doesn't make any sense and can result in
completely unexpected results, so don't do it.

Closes #15757.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75396 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-18 16:00:33 +00:00
Vadim Zeitlin
8f305123db Add default ctor and Create() to wxContextHelpButton.
Allow two step creation of wxContextHelpButton.

Closes #14848.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75394 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-18 16:00:21 +00:00
Václav Slavík
e8c5400118 wxTextFile: don't loose data with CRCRLF line endings.
Previously, when reading files with completely nonstandard - but
occurring in the wild thanks to broken Notepad - files with CRCRLF, all
content would be replaced with empty lines.

Fix the code to do what many editors do with such files: treat this as
data line followed by an empty one. This is not ideal, but it is better
than discarding data - and arguably, silently cleaning up the endings
wouldn't be great either (and would add extra complications for what is
an obscure and broken case).

See http://stackoverflow.com/questions/6998506/text-file-with-0d-0d-0a-line-breaks

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75387 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-16 18:54:42 +00:00
Václav Slavík
15fe4acb3e Support keyboard navigation with Tab in generic wxDataViewCtrl.
Move keyboard focus between columns with Tab and Shift-Tab. Works
similarly to left and right arrows, but wraps around to go to the next
or previous line and doesn't collapse tree nodes.

If focus reaches the last or first cell, the key event is skipped,
allowing normal Tab handling for moving to another control.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75386 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-16 16:36:05 +00:00
Jouk Jansen
132a0aaacd Update OpenVMS compile support
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75385 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-16 11:12:41 +00:00
Paul Cornett
4451faa095 just put GtkBorder variable on the stack
fixes missing runtime version check


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75382 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-15 02:04:41 +00:00
Paul Cornett
286727db5b fix missing/incorrect GTK runtime version checks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75381 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-15 01:29:56 +00:00
Julian Smart
6adf2efa20 Ensure a small spanned column doesn't shrink its columns too much by checking for min column sizes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75379 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-14 15:32:58 +00:00
Julian Smart
2b77f9b88c Fix for occasionally missing cells in tables
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75374 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-11 12:05:57 +00:00
Julian Smart
87ba46f05e Added scrollbar hysteresis detection to stop infinite looping when vertical scrollbar presence or absence affects the content height.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75373 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-10 15:24:35 +00:00
Stefan Csomor
79ec1e6c30 trying 10.5 / 10.6 fix for #15688
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75364 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-09 21:09:34 +00:00
Julian Smart
2d8b8e1725 Fixed overlapping text and floating objects by simplifying the available rectangle calculation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75362 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-08 10:30:28 +00:00
Julian Smart
548eb1850c Clicking on a floating (non-container) object no longer sets the caret position.
Double-clicking on a floating (non-container) object selects it instead of selecting a word.
Selection refresh now takes floating objects into account.
The last line of a paragraph now takes floating objects into account.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75360 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-07 15:50:38 +00:00
Julian Smart
69b8b92a42 Fix layout of content within a floating object by using Move and not SetPosition; prevent creeping of floating objects on layout.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75354 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-05 19:56:24 +00:00
Stefan Csomor
a9c26905e8 support 10.5 SDK build
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75352 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-05 09:13:00 +00:00
Václav Slavík
04121a371a wxOSX Retina fixes: wxImageList::GetSize().
wxImageList returns size of its bitmap as pixel size, i.e.  twice the
displayed screen on HiDPI screens.  Unfortunately,
wxImageList::GetSize() is used heavily in (generic) GUI drawing code,
e.g.  to properly size wxListCtrl's icon columns.  As wxImageList is
used primarily by controls, it seems reasonable to adjust for scaling
here, rather than requiring all users of the class to do it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75351 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-04 14:33:10 +00:00
Václav Slavík
b5e7f21065 wxOSX Retina fixes: size wxStaticBitmap and wxBitmapButton properly.
The size is expressed in logical coordinates and needs to use bitmap's
scaled size, otherwise it would appear twice as large in both
dimensions.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75350 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-04 14:33:07 +00:00
Václav Slavík
4156e1a5c9 Auto grow the last wxDataViewCtrl column on all platforms.
The GTK+ implementation always did this and it doesn't make much sense
to let the space be wasted, so do as GTK+ does: expand the last column
to cover the remaining unused space in the OS X and generic
implementations too.  Don't do anything if the space is insufficient.
Respect the last column's minimal width.

See #13904.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75347 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-04 13:23:34 +00:00
Václav Slavík
88774498d7 Fix fixed-width progress columns in generic wxDataViewCtrl.
Both native wxDVC implementations grow the progress column, the generic
one didn't.  This change fixes it and _seems_ not to break other things.
As a consequence, progress columns no longer have a 40px minimal width,
but that should be OK.

Fixes #15745.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75345 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-04 12:36:24 +00:00
Julian Smart
bdfd48b69e Applied patch #15744: wxRichTextCtrl: HitTest can't find top-level floats (dghart)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75343 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-03 18:41:09 +00:00
Vadim Zeitlin
0eae308634 Fix crash when Destroy()-ing a TLW with a non-TLW parent.
Generalize the code in wxTopLevelWindowBase dtor checking for the children of
the TLW being destroyed pending for deletion themselves to work when the child
TLW is an indirect child, i.e. was created with a child window of this TLW as
parent and not this TLW itself.

Closes #15743.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75342 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-03 14:53:56 +00:00
Václav Slavík
065deffd86 Implement wxTextEntry::SetHint() natively for GTK+3.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75335 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-02 17:46:27 +00:00
Václav Slavík
59efb1cf1c Don't use native cue banners in wxTextEntry::SetHint() on XP.
The code apparently expected EM_SETCUEBANNER to return false on
pre-Vista systems (where the cue banners don't work).  This isn't the
case in practice, so check for Vista explicitly and use the generic
implementation on XP.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75334 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-02 17:46:23 +00:00
Vadim Zeitlin
fe731cbdee Use correct cell alignment in generic wxDataViewCtrl mouse handling code.
Don't fall back to wxALIGN_CENTRE, even if the renderer doesn't specify its
own alignment we still have to take the column alignment in consideration, so
use GetEffectiveAlignment() (which had to be made public for this).

This notably fixes (again) hit testing for wxDataViewToggleRenderer in the
generic version.

Closes #15731.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75329 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-02 16:30:25 +00:00
Vadim Zeitlin
65daec7eaa Check if colour really changed in wxGenericListCtrl::SetBackgroundColour().
Call the base class version to update the colour stored in the base class and
also to avoid changing the colour of the main window unnecessarily if the
colour didn't really change.

This is also consistent with the code in SetForegroundColour() just below.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75328 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-02 12:58:23 +00:00
Vadim Zeitlin
4968945556 Don't change header window foreground colour in wxGenericListCtrl.
As calling wxGenericListCtrl::SetBackgroundColour() doesn't change the header
window background, don't change its foreground in SetForegroundColour()
neither.

Closes #15741.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75327 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-02 12:58:17 +00:00
Julian Smart
b815c1b44d Fixed #15717: wxRichTextStyleOrganiserDialog returns wxID_OK when closed with Escape key (ikamakj)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75322 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-02 10:38:04 +00:00
Julian Smart
ac60e751a4 Apply fix for #15734: wxRichTextCtrl: A floating wxRichTextTable's cells aren't drawn (dghart)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75320 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-02 09:06:00 +00:00
Stefan Csomor
1975bb6865 support for localized help menus
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75319 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-01 20:10:58 +00:00
Julian Smart
9596db7c4b Partial fix for #15714: Caret jumping problem in wxRichTextCtrl text selection
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75317 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-28 16:50:49 +00:00
Julian Smart
dbd7b25f42 Fix for #15716: wxRichTextCompositeObject::Dump() should also dump the object itself?
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75315 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-28 16:29:44 +00:00
Julian Smart
e8cb6aa322 Fix for #15718: wxSymbolPickerDialog crashes on ampersand character
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75313 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-28 16:24:07 +00:00
Julian Smart
31e52f61d0 Fix for #15715: NULL check required in wxRichTextBuffer::SetStyleSheetAndNotify()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75311 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-28 16:23:11 +00:00
Vadim Zeitlin
97f58c1603 Fix wxCommandProcessor::IsDirty() for unsaved unmodified case.
IsDirty() still returned true even after undoing all the commands which was
wrong, as there was nothing to save in this case.

Closes #15722.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75310 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-28 13:47:00 +00:00
Vadim Zeitlin
c749d9e638 Fix unwanted focus events when deleting a wxTreeCtrl item in wxMSW.
Disable setting focus in response to TVN_SELCHANGING when deleting an item in
a single selection control too -- this was already done in multi selection
case but not in this one, for some reason.

Also refactor the code to avoid duplicating TreeView_DeleteItem() calls.

Closes #15721.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75308 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-28 12:43:17 +00:00
Václav Slavík
892ee04344 Fix OS X startup to not hang if the application doesn't get focus.
If the application launches while the parent process doesn't have an active
window, [NSApp run] won't terminate immediately, as was assumed here. Instead,
it blocks until some input arrives, e.g. clicking the Dock icon.

Work around this by adding a dummy event to the queue.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75302 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-27 15:34:19 +00:00
Vadim Zeitlin
be61f84af5 Yet another fix after wxMenu::Remove() refactoring.
wxMenu::Remove() was still broken in wxMSW after r75250, even with the fix in
r75290, as wxMSW code relied on the item still being present in
wxMenu::m_items.

Delay removing it from there until after DoRemove() call to fix this.

See #3424.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75297 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-26 14:50:55 +00:00
Stefan Csomor
23f92cc755 fixing shadowed var
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75295 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-26 14:18:43 +00:00