Commit Graph

33030 Commits

Author SHA1 Message Date
Vadim Zeitlin
67b128e186 Refactor wxMSW: move some code from wxMenu to wxMenuItem.
This will allow reusing it for other wxMenuItem bitmap-related operations.

See #9388.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76190 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-23 15:18:31 +00:00
Vadim Zeitlin
c3b5dc5e8f Fix toolbar repainting after deleting a tool in wxMSW.
The toolbar was in an inconsistent state when recalculating the sizes of the
separators used as placeholders for the controls and stretch spacers as the
tool was already deleted from the native toolbar but still present in wx
internal toolbar data and this resulted in discrepancies between the indices
in the native and wx toolbars.

Fix this by specially marking the already deleted but not yet removed tool and
ignoring it during the recalculations.

This makes the old, and only partially successful, attempt to work around this
bug in DoDeleteTool() unnecessary and so the code is actually simplified by
this change.

Closes #16095.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76189 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-23 00:57:18 +00:00
Vadim Zeitlin
de22d0def4 Fix wxFileSystemWatcher::RemoveAll() to actually work.
We need to call DoRemove() on all watcher objects to really remove them, just
removing our record of them was not enough and e.g. resulted in errors if we
tried to re-add a previously watched path again.

Closes #15531.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76187 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-23 00:57:09 +00:00
Vadim Zeitlin
5b43c1858d Fix handling deletion of watched directory in MSW wxFileSystemWatcher.
Don't log an incomprehensible error when the watched directory itself is
deleted, but generate wxFSW_EVENT_DELETE for it. This is consistent with the
behaviour under Unix and generally more useful.

Closes #13294.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76186 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-23 00:57:03 +00:00
Vadim Zeitlin
305e766f0f Small refactoring in wxFileSystemWatcher MSW implementation.
Make wxIOCPService::GetStatus() smarter about its return value, it makes sense
to encapsulate the convention used to indicate the thread exit condition
inside wxIOCPService class itself instead of sharing it between it
wxIOCPThread itself.

It will also make it easier to detect more detailed error conditions in this
code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76185 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-23 00:57:00 +00:00
Vadim Zeitlin
cc125e64b3 Handle normalization of directory names correctly in wxFileHistory.
Don't use relative path for the directories, which can also be managed by
wxFileHistory, because they don't have any and the old code resulted in
showing an empty string for them.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76179 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-22 22:03:34 +00:00
Vadim Zeitlin
33ad33d447 Add wxOVERRIDE and use it in common and wxOSX code.
Make overriding virtual methods more explicit and enable additional checks
provided by C++11 compilers when "override" is used.

Closes #16100.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76173 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-20 13:26:28 +00:00
Vadim Zeitlin
34e4f66d6a Compilation fix in wchar_t build after r76171.
Don't concatenate narrow wxLongLongFmtSpec with wide strings, just don't use
wxT() at all.

Closes #14685.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76172 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-20 13:26:01 +00:00
Vadim Zeitlin
8c4b1dcbd0 Add wxInt64 support to wxText{Input,Output}Stream.
Add explicit Read64[S]() and Write64() methods.

Closes #14685.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76171 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-19 22:57:44 +00:00
Vadim Zeitlin
399371921f Add font colour support to wxFontPickerCtrl.
Currently this is only really implemented under Windows, just as the colour
support in wxFontDialog, but make the API available under all platforms for
consistency.

Closes #11614.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76160 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-18 17:23:13 +00:00
Vadim Zeitlin
9e7dbef726 Use helper GetPickerWidget() function in wxFontPickerCtrl.
No real changes, just use a helper function instead of an ugly M_PICKER macro.

See #11614.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76159 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-18 17:23:06 +00:00
Vadim Zeitlin
09eebae182 Add margin to the right of the message in wxGenericProgressDialog.
For some reason the border was used only on the left side but not on the right
one, resulting in the ugly looking label flush to the right dialog border if
it was long enough.

Closes #16094.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76156 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-18 14:21:51 +00:00
Julian Smart
b4d02eafa3 Improved calculation of spanning column widths.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76154 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-18 09:14:42 +00:00
Vadim Zeitlin
a489001977 Disable the use of new style wxDirDialog under Vista.
IFileDialog-based dialog has a bug making it return a wrong path sometimes
under Vista, disable its use there to avoid it.

Closes #16005.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76152 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-16 13:05:47 +00:00
Paul Cornett
5e6dd2fcb4 build fixes for wxUniversal
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76150 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-15 19:34:31 +00:00
Paul Cornett
d2e4b3520b for GTK+ 3.6 and later, invalidate cached best size when GTK's style cache is updated, see #16088
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76149 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-15 18:44:02 +00:00
Vadim Zeitlin
f9b4d6b18c Fix showing of 32bpp bitmaps without alpha in wxMSW wxStaticBitmap.
The native control doesn't make a secret copy of the image in this case (0RGB
bitmap, i.e. 32bpp ARGB bitmap with all alpha values set to 0) and just shows
the bitmap we assigned to it directly, so we must not delete it in this case,
otherwise nothing is shown at all.

Closes #16084.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76148 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-14 19:22:31 +00:00
Vadim Zeitlin
6b296279ba Also free internal handlers when wxMSW wxStaticBitmap is destroyed.
r76142 fixed the resource leak when wxStaticBitmap image was replaced by
another one but the leak still happened at the end, when the wxStaticBitmap
was destroyed.

Fix it there as well in the same way.

Closes #16068.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76147 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-14 19:22:26 +00:00
Vadim Zeitlin
c8a35a6f17 Fix recently introduced compilation error in wxUSE_PALETTE==0 build.
Add missing "#if wxUSE_PALETTE" tests.

Closes #16083.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76146 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-14 19:22:16 +00:00
Vadim Zeitlin
371928415a Add support for loading old V1 bitmap files to wxBMPHandler.
Such files are apparently still seen in the wild, even though this format has
been superseded since Windows 3.0 (!).

Closes #3433.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76144 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-14 01:36:54 +00:00
Stefan Csomor
ffeba70599 adding 10.5 compatibility again
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76143 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-13 17:09:00 +00:00
Vadim Zeitlin
8fa2694395 Fix resource leak in wxMSW wxStaticBitmap when using RGBA icons.
Release the old handle if it wasn't freed by STM_SETIMAGE itself.

Closes #16068.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76142 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-13 16:20:08 +00:00
Vadim Zeitlin
c2ac6643cc Avoid unused variable warning in wxUSE_VALIDATORS==0 build.
Closes #16076.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76140 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-13 16:17:15 +00:00
Vadim Zeitlin
1e832755cf Use wxScopedXXX<> instead of explicit memory management in wxBMPHandler.
Make the code simpler and ensure there are no memory leaks in it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76136 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-12 23:04:32 +00:00
Vadim Zeitlin
01f0a544c9 No changes, just use properly const variable in wxBMPHandler code.
Initialize "data" pointer consistently with "alpha".

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76135 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-12 23:04:29 +00:00
Vadim Zeitlin
64deeb94b9 Add support for saving 32bpp icons too.
Save in 32bpp format if alpha channel is present in the image being saved in
ICO format.

See #15918.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76134 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-12 23:04:24 +00:00
Vadim Zeitlin
818e5f3a48 Allow saving 24 bpp ICO file in wxImage.
Create ICO files with 24bpp if the image being saved contains more than 256
colours.

Also use smaller values (4 bpp or monochrome) if the image uses fewer colours.

See #15918.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76133 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-12 23:04:19 +00:00
Vadim Zeitlin
7e64a29edb Add support for saving 256*256 ICOs in PNG format.
Allow saving icons larger than 127*127 pixels (up to 256*256 which is the
maximal size supported by the ICO format) and save large icons with the item
data in PNG format, as it is normally done for these sizes.

See #15918.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76132 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-12 23:04:14 +00:00
Vadim Zeitlin
184b9b49d3 Add support for loading icons in PNG format to wxImage.
ICO files can contain data in PNG, as well as BMP, format in recent (i.e. from
this millennium) versions of Windows, so check for this case in wxICOHandler
and load such data using wxPNGHandler.

See #15918.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76131 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-12 23:04:09 +00:00
Vadim Zeitlin
6c83e5cf8f Handle verbosity correctly in wxICOHandler loading code.
Pass on the "verbose" argument to LoadDib() function instead of always being
verbose in it.

Also remove the unused IsBmp variable.

See #15918.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76130 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-12 23:04:05 +00:00
Vadim Zeitlin
10c3830624 Allow loading icons of width 256 from ICO files.
Account for the tweak of ICO file format which uses 0 if the width is 256.

See #15918.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76129 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-12 23:04:00 +00:00
Vadim Zeitlin
d8090867aa Fix possible memory leak in wxICOHandler loading code.
Use wxScopedArray<> instead of a raw pointer to ensure that the memory is
always freed, even in case of error return.

See #15918.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76128 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-12 23:03:55 +00:00
Vadim Zeitlin
d6ace87b61 Upgrade included Scintilla to version 3.3.9.
Closes #15742.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76121 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-12 13:23:54 +00:00
Vadim Zeitlin
b356d1d3c7 Add wxFont::GetBaseFont().
This can be used to "undo" the result of Bold() ,Underlined() or Italic()
methods and returns an unadorned version of the font.

Closes #11815.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76120 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-11 20:48:20 +00:00
Vadim Zeitlin
61e323ad37 Add wxEnhMetaFile::Detach().
Allow getting the handle from this class, this is useful if it needs to be
passed to some other library, for example.

Closes #15706.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76117 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-11 16:04:22 +00:00
Vadim Zeitlin
9a61ced717 Correct wxThread::SetPriority() under Unix to hopefully work.
The old implementation was completely broken, the new should hopefully work if
pthread_setschedparam() behaviour really corresponds to its documentation.

Mapping of our priorities in 0..100 range to pthread 1..99 range remains ugly
but this seems to be unavoidable, unfortunately.

Closes #14985.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76116 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-11 16:04:17 +00:00
Vadim Zeitlin
f4edf48ec8 Fix accelerators in appended submenu items in wxGTK.
They were not previously taken into account because we didn't call
gtk_widget_add_accelerator() on the right GtkAccelGroup.

Closes #16050.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76115 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-11 16:04:12 +00:00
Vadim Zeitlin
f51dc81c85 Add wxDynamicLibrary::GetModuleFromAddress().
Use dladdr() under Unix, if available, to provide the same functionality as we
get from GetModuleHandleEx() under MSW and export it in a new public function.

Closes #15248.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76114 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-11 16:04:06 +00:00
Julian Smart
cd3fc53163 Added on-demand image loading option to wxRTC.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76110 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-10 11:08:42 +00:00
Vadim Zeitlin
3772880ce6 Fix size calculation for multi-column vertical toolbars in wxMSW.
The width was calculated incorrectly in this case as we simply multiplied the
width of the widest column by their number in this case, but actually each of
them has its own width which needs to be calculated separately.

See #13579.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76109 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-09 20:58:24 +00:00
Vadim Zeitlin
f8a7323cbb Fix background painting of multi-row toolbars in wxMSW.
The item rectangle used wrong vertical coordinates which didn't matter (much?)
for the single row toolbars but was completely wrong for toolbars with more
than one row.

Don't always anchor the rectangle at the window top to avoid this.

See #13579.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76108 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-09 20:58:20 +00:00
Vadim Zeitlin
8f4bd3dfd6 Disable stretchable spaces in multi-row toolbars in wxMSW.
Stretchable separators simply don't work correctly when the space they are
supposed to stretch onto is distributed across several different toolbar rows
or columns, so just disable them for multi-row (or column, for vertical
toolbars) case.

See #13579.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76107 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-09 20:58:15 +00:00
Vadim Zeitlin
2b5574c6ea Make Move{Before,After}InTabOrder() work at any time in wxGTK.
These functions only worked if called at the beginning, before showing the
parent window containing the children whose TAB order was being adjusted,
because it didn't refresh the GTK+ TAB order on the correct window: we need to
do it for the parent of the window being moved, not this window itself.

Closes #16032.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76101 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-09 14:05:02 +00:00
Vadim Zeitlin
b1c33b0c21 Fix handling of controls in vertical toolbars in wxMSW.
Not adding the controls to vertical toolbar is not enough, we also need to
hide them to prevent them from being shown as independent floating windows.
And we also need to add separators instead of the controls themselves to keep
the indices the same as in the horizontal case.

Closes #11821.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76099 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-08 14:34:00 +00:00
Vadim Zeitlin
59bdee5558 Fix handling of Esc while an auto-complete drop down is open in wxMSW.
Just close the drop down instead of closing the dialog the text control using
this auto-complete drop down is in, as this was completely unexpected and
counter-intuitive.

Closes #13945.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76097 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-08 13:39:58 +00:00
Paul Cornett
daf5667de5 fix memory leak in SetFont with GTK3
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76095 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-07 18:43:56 +00:00
Vadim Zeitlin
687aedf1ca Skip mouse button release events in wxGenericTreeCtrl.
Not doing this prevented the default handling from taking place resulting in
internal confusion in GtkNotebook when wxTreeCtrl was placed inside it: the
code there set the button being held by user in its mouse press event handler
and reset it in its mouse release event handler which was never called because
we didn't skip the event, resulting in ignoring the next mouse press in the
notebook.

Closes #16055.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76094 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-07 13:17:21 +00:00
Vadim Zeitlin
74f21995ca Make stretchable spacers work in vertical toolbars too in wxMSW.
Replace the old implementation of stretchable spacers based on changing the
size of the separators used as spacers as the toolbar size itself changed with
a new one, simply replacing the old separator with the new one of the correct
size, as it also works for the vertical toolbars, unlike the old approach.

Closes #13673.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76092 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-07 01:19:13 +00:00
Vadim Zeitlin
050fabe3b9 Add wxFD_NO_FOLLOW style for wxFileDialog.
This style tells the dialog to return the paths of the link being selected
without dereferencing it.

Currently only implemented under wxMSW as the links are not dereferenced by
default in wxGTK anyhow. But we may want to change this and implement it there
too for consistency in the future.

Closes #15429.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76085 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-05 16:29:46 +00:00
Vadim Zeitlin
211b166182 Another compilation fix for wxUniv/MSW build.
This should have been part of r76077, see #16039.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76084 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-05 16:29:40 +00:00
Vadim Zeitlin
d14f35fd94 Fix initializing bitmaps from DIB in wxMSW code.
Don't call wxDIB::CreatePalette() on an invalid (because its handle had been
detached from it) DIB object.

Also add some comments to explain this code a bit better.

Closes #16045.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76082 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-04 23:57:56 +00:00
Vadim Zeitlin
32bf537043 Fix bug in vertical toolbar size calculation in wxMSW.
Correct the changes of the r76035 to avoid using separators when calculating
the fitting width of the vertical toolbars as this doesn't always work
correctly.

Closes #3788.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76080 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-04 14:20:28 +00:00
Vadim Zeitlin
e2fe8927cc Don't accept data in unsupported format in wxMSW dnd code.
We wrongly pretended to accept the data in formats which we didn't actually
accept and showed misleading cursors to the user.

Fix this by partially reverting some of the changes of r72668 (see #14697).

Closes #16042.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76078 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-04 14:07:48 +00:00
Vadim Zeitlin
a46fbf1bcd Compilation fix for wxUniv/MSW in wxTLW code dealing with menus.
The code used by WM_INITMENUPOPUP and WM_EXITMENULOOP handlers shouldn't be
used in wxUniv build as it's not used there anyhow and doesn't even compile.

Closes #16039.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76077 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-04 14:07:43 +00:00
Paul Cornett
e702fd5043 fix for wxMiniFrame titlebar appearing blank
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76063 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 21:55:26 +00:00
Paul Cornett
9ba16f907a for GTK3, draw odd-width lines as a sharp, n-pixel wide line, rather than a fuzzy n+1-pixel wide line
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76062 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 18:58:16 +00:00
Vadim Zeitlin
f740cc3881 Refactor YieldFor() to avoid code duplication among the ports.
Don't repeat the same code in all the ports, move it to the common base class
and add a new virtual DoYieldFor() for the really port-specific code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76061 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 18:58:00 +00:00
Vadim Zeitlin
632c106cd5 Don't dispatch pending events from selective YieldFor().
Pending events list can contain events from all kinds and dispatching them
from YieldFor() called to dispatch the events of some particular kind only
(e.g. to redraw the window) is unexpected and wrong, e.g. it breaks some uses
of wxProgressDialog, see #15799.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76060 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 18:27:51 +00:00
Vadim Zeitlin
2eb5e8189e Fix off by 1 error in buffer size in wxOSX wxDropTarget code.
The size of the buffer used for the data currently needs to include an extra
byte for the trailing NUL. This is wrong, as it means that GetDataSize() and
GetDataHere() behaviour is not consistent, but at least avoid overrunning the
buffer for now.

Also use wxCharBuffer instead of raw char array to make the code safer (both
because it releases the memory automatically and because it also adds an extra
byte for the trailing NUL automatically as well, making such bugs impossible).

See #15914.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76056 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 15:51:53 +00:00
Vadim Zeitlin
1d1ccf9e99 Implement support for wxGA_VERTICAL style in wxOSX.
Rotate the native control to make it look correct in vertical orientation.

Closes #15682.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76055 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 15:51:48 +00:00
Vadim Zeitlin
6c336e4d9f Fix harmless signed/unsigned comparison warning in wxOSX wxJoystick.
A better fix would probably be to make wxJoystick::GetNumberAxes() return an
unsigned value.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76054 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 15:51:42 +00:00
Vadim Zeitlin
4e89786483 Remove redundant comparison of unsigned value with 0.
This is always true and so is unnecessary.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76053 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 15:51:38 +00:00
Vadim Zeitlin
b520eeab16 Don't crash in wxOSX wxDataViewChoiceRenderer if selection was cancelled.
Check for the index validity and ignore the value of -1 as it is passed if the
selection in the popup was cancelled.

Closes #16017.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76051 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 15:51:28 +00:00
Vadim Zeitlin
4c152f466f Fix setting the label for already existing menu items with bitmaps in wxMSW.
Do update the label at Windows level if we don't use MF_OWNERDRAW style,
checking for IsOwnerDrawn() is wrong because the flag it tests may be set even
if the item is not really owner drawn from Windows point of view.

This is a mess and setting the bitmap for the existing items is still broken,
but at least setting the label works now.

See #9388.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76044 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 13:34:14 +00:00
Vadim Zeitlin
279bf9e545 Fix loading of top to bottom BMP files in wxMSW wxBitmap.
The native LoadImage() function used by wxBMPFileHandler only supports the
standard bottom to top BMPs, fall back to our own implementation in wxImage
wxBMPHandler if it fails to also support the top to bottom ones.

Closes #13650.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76043 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 13:34:09 +00:00
Stefan Csomor
a0e915acb1 using a lazy translation hash map for conversion between user friendly names and postscript names, so that we get only one warning per font family. The only way to completely get rid of this would be to pre-populate the map during startup which would mean to completely iterate through all installed fonts, so it's a compromise. see #15999
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76036 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-01 16:48:58 +00:00
Vadim Zeitlin
b2b49c32ec Fix calculating the size of vertical toolbar in wxMSW.
Use the width of the largest toolbar item as the toolbar width, not the width
of the first one. The implicit assumption that all items had the same width
was wrong and resulted in items wider than the first one being truncated.

Closes #3788.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76035 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-28 23:40:22 +00:00
Vadim Zeitlin
ae4b084e77 Allow passing NULL buffer to wx{,F}File::{Read,Write} when count==0.
If the count of bytes to read or write is 0, the buffer pointer value
shouldn't matter as it's not used at all anyhow, so relax the assert and allow
it to be NULL in this case.

Closes #16018.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76030 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-27 15:46:36 +00:00
Vadim Zeitlin
d5216a4afc Fix Intel compiler warnings about hiding member variables.
Rename method parameters to avoid conflicts with member variables names.

Closes #15971.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76029 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-27 15:46:32 +00:00
Václav Slavík
c7972da951 Be more permissive when validating format string arguments.
Previously, the code would assert if the caller passed too many
arguments to wxPrintf() or other printf-like functions. But that can
happen legitimately in translations: in some languages such as Hebrew,
using "1" (i.e. "%d") in the singular feels unnatural and it's better to
use the word "one" and left the variadic argument unused.

Relax the check not to assert in this case. This is consistent with the
standard library and other implementations. Notice that gettext's msgfmt
doesn't complain about this case either in the specific case of singular
forms.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76027 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-27 15:24:21 +00:00
Julian Smart
9adba53251 Paragraph and image layout fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76025 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-27 15:15:18 +00:00
Julian Smart
f631f732af Corrections to attribute manipulation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76022 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-27 10:03:53 +00:00
Paul Cornett
70ef1e192d Index: src/generic/graphicc.cpp
===================================================================
--- src/generic/graphicc.cpp	(revision 76007)
+++ src/generic/graphicc.cpp	(working copy)
@@ -1569,12 +1569,13 @@
             {
                 const wxUint32 argb = *src++;
 
-                *alpha++ = (argb & 0xff000000) >> 24;
+                const unsigned char a = argb >> 24;
+                *alpha++ = a;
 
                 // Copy the RGB data undoing the pre-multiplication.
-                *dst++ = Unpremultiply(*alpha, (argb & 0x00ff0000) >> 16);
-                *dst++ = Unpremultiply(*alpha, (argb & 0x0000ff00) >>  8);
-                *dst++ = Unpremultiply(*alpha, (argb & 0x000000ff));
+                *dst++ = Unpremultiply(a, argb >> 16);
+                *dst++ = Unpremultiply(a, argb >>  8);
+                *dst++ = Unpremultiply(a, argb);
             }
 
             src = rowStart + stride;


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76015 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-25 17:38:34 +00:00
Vadim Zeitlin
b1273c0d8a Fix wxGenericTreeCtrl::ScrollTo() for all ports, not just wxOSX.
When scrolling down, make the item being scrolled into view completely visible
instead of just showing its top part.

The fix was already used for wxOSX but not for the other ports for some
reason, do use it everywhere as this code is generic and behaves in the same
way in all ports.

Also fix the wrong comments about scrolling direction.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76014 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-25 17:26:57 +00:00
Vadim Zeitlin
a2d22f8b93 Fix font size when using wxGraphicsContext with wxPrinterDC in wxMSW.
Use pixel size which is scaled correctly by GDI+ itself instead of the size in
points which is currently not scaled correctly by wx.

Closes #3566.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76012 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-25 17:26:48 +00:00
Vadim Zeitlin
779af88f43 Fix loading of bitmap with non-pre-multiplied alpha in wxMSW.
Detect when the bitmap file doesn't have pre-multiplied alpha and pre-multiply
it ourselves when loading it in this case.

Closes #12762.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76007 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-24 20:55:00 +00:00
Vadim Zeitlin
f88fbcc2b3 Add helper Set32bppHDIB() method to wxMSW wxBitmapRefData.
No real changes, just add a helper to allow replacing the HBITMAP stored in
wxBitmapRefData without changing anything else, this is going to be used in
another place soon.

See #12762.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76006 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-24 20:54:54 +00:00
Stefan Csomor
bd45a79a99 using old code for carbon only, new code for cocoa, fixing doubly apply flip of y axis
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75999 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-24 08:17:15 +00:00
Stefan Csomor
c8b105a5f5 add fix for 32 bit builds, also when wx is drawing CGContextRef is always flipped
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75998 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-24 08:10:26 +00:00
Paul Cornett
5c32565ef1 add support for wxDD_DIR_MUST_EXIST, closes #16002
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-24 06:44:49 +00:00
Paul Cornett
42f0d1c020 native GTK3 implementation for DrawSash()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75996 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-24 01:00:24 +00:00
Stefan Csomor
64503e36f9 new DrawIcon implementation, turned off by default
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75995 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-23 19:14:49 +00:00
Stefan Csomor
d692ea1c0e adding NSImage support to wxIcon on OSX, as IconRefs are on their way out, and performance under 10.9 is suffering
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75994 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-23 19:11:31 +00:00
Stefan Csomor
21aa2122f4 make sure a frozen control calls a native 'thaw' on the tlw during destruction, otherwise tlws might end up unresponsive, see #16011
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75993 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-23 19:02:58 +00:00
Vadim Zeitlin
332952a18c Always initialize values returned from wxGDDC::GetChar{Width,Height}().
Don't return garbage in case of error.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75990 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 22:40:03 +00:00
Vadim Zeitlin
25a03f93a5 Improve parameter validation in wxStream code.
Replace wxASSERT_MSG()s with wxCHECK_MSG()s to ensure that we don't crash even
if we are passed a NULL pointer, saying "Warning: Null pointer is about to be
used" and crashing just isn't very useful in the grand scheme of things.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75989 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 22:40:00 +00:00
Vadim Zeitlin
663bbf892b Remove confusing delete from wxIdRangeManager dtor.
The singleton dtor shouldn't delete the global singleton object, if this were
ever really possible, it would result in an infinite recursion. And even
though it was not (because ms_instance was reset to NULL before destroying the
object pointed by it), this delete was still confusing and unnecessary, so
remove it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75988 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 22:39:56 +00:00
Vadim Zeitlin
b905bae91c Fix harmless warnings about unused global variables.
Don't define variables that we never use to fix clang warnings about them.

See #15915.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75986 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 22:39:48 +00:00
Vadim Zeitlin
a2a846e473 Allow customizing bitmap handling in wxSVGFileDC.
Provide a built-in alternative for using external files for the bitmaps in
SVG: allow embedding them inside the SVG itself using "data:" URI.

And also allow to define custom handlers to make the behaviour even more
flexible.

Closes #15968.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75981 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 17:26:27 +00:00
Vadim Zeitlin
c59b815f2c Fix several rounding problems with float values in wxPropertyGrid.
Loss of precision when converting floating point numbers to text and back
could result in several problems, notably comparing a valid value with the
minimum could fail after a round trip through wxSpinCtrl.

Fix this by using a specialization of NumericValidation() handling floating
point values specially and correctly.

Closes #15625.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75980 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 14:54:54 +00:00
Vadim Zeitlin
4ec4dcd3f5 Use symbolic attributes names in wxPropertyGrid code.
No real changes, just use constants instead of hardcoding their values.

See #15625.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75979 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 14:54:49 +00:00
Vadim Zeitlin
d183babc8d Allow retrieving wxPG_FLOAT_PRECISION and not just setting it.
It was possible to call SetAttribute() to change this attribute value but not
to get it back. Override DoGetAttribute() to also allow the latter.

See #15625.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75978 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 14:54:44 +00:00
Vadim Zeitlin
876859fcb7 Expose ScintillaWX DoDragEnter() and DoDragLeave() methods.
These methods are needed to allow implementing alternative wxDropTargets, in
addition to the already public DoDragOver().

Closes #16010.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75977 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 14:54:39 +00:00
Vadim Zeitlin
b1a92006b9 Fix memory leak when not finishing iteration started by wxFindFirstFile().
Memory allocated by wxFindFirstFile() was only freed when no more files could
be found by wxFindNextFile(), resulting in a memory leak if the iteration was
never finished.

Closes #4631.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75975 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 14:54:24 +00:00
Vadim Zeitlin
1911811fe6 Fix wxOSX compilation error after r75956.
wxScopedArray::get() needs to be explicitly called to access the array
contents as a pointer.

Closes #16015.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75974 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 14:14:32 +00:00
Stefan Csomor
633b5c691b make sure a frozen control calls a native 'thaw' on the tlw during destruction, otherwise tlws might end up unresponsive, see #16011
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75966 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 19:05:22 +00:00
Vadim Zeitlin
5ac26f43bd Fix memory leak in wxRibbonToolBar in case of error.
Use wxScopedPtr to ensure the tool is not leaked, even if we fail to insert
it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75959 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 00:51:58 +00:00
Vadim Zeitlin
5e204ab52e Fix uninitialized variable use in wxPropertyGrid code.
wxPGProperty::GetItemAtY() uses its input/output "nextItem" parameter, so it
must be initialized before calling it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75958 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 00:51:55 +00:00
Vadim Zeitlin
461e38f17c Ensure we don't read invalid memory in wxOSX wxDisplay code.
Replace wxASSERT() with wxCHECK_MSG() to ensure that we don't read beyond the
end of the array even if we are given an invalid index.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75957 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 00:51:52 +00:00
Vadim Zeitlin
563f41c686 Fix memory leak on error return in wxOSX wxDisplay code.
Use wxScopedArray to ensure that memory is freed, even if wxCHECK_MSG()
condition fails.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75956 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 00:51:49 +00:00
Vadim Zeitlin
3dd1d4d915 Fix memory leak in case of error in wxOSX graphics code.
Delete the pointer before returning from the function if we don't pass its
ownership to CGDataProviderCreateWithData().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75955 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 00:51:46 +00:00
Vadim Zeitlin
a4cc201e76 Fix memory leak on error return from wxMsgCatalogFile::FillHash().
Use wxScopedPtr to make memory management simpler and to ensure that all
pointers allocated in this function are deleted: this wasn't the case when we
returned false earlier due to the MO file being invalid.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75954 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 00:51:43 +00:00
Vadim Zeitlin
f5033eec65 No real changes, just use smart pointers in GIF decoding code.
Use wxScopedArray to make the code much shorter and guarantee that it doesn't
leak memory.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75953 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 00:51:41 +00:00
Vadim Zeitlin
76d296d67d Fix socket leak in Accept() in case of error.o
We leaked a socket descriptor if creating the accepted socket object failed.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75952 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 00:51:38 +00:00
Vadim Zeitlin
bebfa839da Fix fall back to default resolution in wxOSX printing code.
The code was written to use the default resolution if getting it from the
printer failed but only handled failure of PMPrinterGetOutputResolution() and
not of PMSessionGetCurrentPrinter() itself.

Use default resolution if obtaining it failed for any reason (alternative
could be to return error if obtaining it failed for any return...).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75951 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 00:51:34 +00:00
Vadim Zeitlin
356da1750d Correct wxDataViewColumn::AppendXXXColumn() return value in case of failure.
Don't return invalid column pointer if it was freed because actually appending
it to the control failed.

Fixes corresponding Coverity warnings.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75950 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 00:51:30 +00:00
Vadim Zeitlin
e518e31acd Fix crash when using wxThreadSpecificInfo from global object ctor.
When not using compiler TLS support (which is the default now), TLS variable
itself needs to be initialized and user-defined code in the global objects
ctor could be called before this happened, resulting in using uninitialized
CRITICAL_SECTION under Windows and a crash.

Fix this by wrapping global wxThreadSpecificInfo itself in an accessor
function ensuring that it is always initialized before use.

Notice that this required adding wxTLS_TYPE_REF() as wxTLS_TYPE() itself can't
be used for the function return value (__thread or similar can only be used on
the variables).

Closes #16009.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75949 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-20 15:13:36 +00:00
Vadim Zeitlin
d08b801d2c Use correct column type when adding columns to wxDataViewListCtrl.
Using base class methods such as AppendBitmapColumn() resulted in
wxDataViewListCtrl::AppendColumn() being called but this function always
assumed the column was of "string" variant type -- which was, of course, false
for bitmap columns and so resulted in heap corruption (thanks to the
wonderfully type unsafe code using wxVariant) and a crash.

Get the correct type to use from the column itself now to fix this.

Closes #16008.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75947 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-20 13:06:33 +00:00
Vadim Zeitlin
5178d10df7 Don't show hidden MDI frames when maximizing them in wxMSW.
This is inconsistent with the other ports and rather unexpected.

Closes #2508.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75945 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-20 00:32:58 +00:00
Vadim Zeitlin
0b4804594c Don't show the MDI children implicitly by default in wxMSW any more.
We kept doing it for compatibility with pre-2.5.3 versions but this was a long
time ago and we don't need this any longer.

See #2508.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75944 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-20 00:32:54 +00:00
Vadim Zeitlin
41d5ebc86f Fix wxCmdLineParser::Found(name) for options with values.
Calling Found() without providing the second "value" argument started
generating an assert since introduction of the negated options as it reused
FoundSwitch() which can only be used for switches, i.e. options without
values.

Fix this to revert a regression since 2.8 and also add unit tests for the
different Found() overloads.

Closes #15986, #16001.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75943 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-20 00:32:47 +00:00
Vadim Zeitlin
3d20f8e534 Reduce code duplication in wxCmdLineParser implementation.
No real changes, just extract the code for finding options from their names
into a separate function instead of repeating it 4 (and 5, after the next
commit changes) times.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75942 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-20 00:32:44 +00:00
Vadim Zeitlin
ac7e40cde2 Don't use invalid pointer in file dialog hook procedure in wxMSW.
We can receive WM_NOTIFY for other than CDN_XXX messages if we have a native
control as our immediate child (which can happen with "extra" controls) and
the LPARAM is not a pointer to OFNOTIFY at all in this case, so don't try to
use it as such.

This fixes a crash when adding a "bare" extra control, see #16003.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75941 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-20 00:32:39 +00:00
Vadim Zeitlin
81b62354dc Fix wxTextCtrl contents corruption with long strings in wxMSW.
wxMSW automatically extended wxTextCtrl length limit beyond the tiny standard
32KB when it was exceeded, but part of the text being appended into the
control was lost when doing it.

Fix this by retrying insertion after extending the limit.

Closes #15980.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75940 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-20 00:32:34 +00:00
Stefan Csomor
43f960c9e1 misplaced the orderOut: , see #15998, #15902
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75934 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-19 20:24:04 +00:00
Vadim Zeitlin
f74fcabb0f Set model pointer in wxDataViewEvents generated under wxOSX.
Add missing SetModel() calls.

Closes #16004.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75933 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-19 14:52:18 +00:00
Vadim Zeitlin
b6be374d72 Move DSS_HIDEPREFIX fallback definition to the central header.
Do it only once now that it's used in 3 different places (it recently started
to be used in src/msw/anybutton.cpp as well) instead of defining it thrice.

This also fixes MinGW build.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75930 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-18 23:36:34 +00:00
Vadim Zeitlin
0181aaf822 Compilation fix for wxUSE_IMAGE==0 wxMSW build.
Declare the variable used in any case outside of wxUSE_IMAGE-only block.

See #2609.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75923 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-18 15:13:04 +00:00
Vadim Zeitlin
f1aac9d707 Don't delete child controls when deleting wxStaticBoxSizer.
This is an incompatible change compared to 2.8 which can make the existing
code crash and it also goes against the usual rule that the windows are never
owned by sizers, only other windows.

Closes #15698.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75921 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-18 15:08:49 +00:00
Vadim Zeitlin
0206eb6161 Add support for fixed spacers and labels to wxAuiToolBar XRC handler.
Allow specifying "width" and "proportion" attributes for the "space" elements
and add "label" element support.

Closes #15964.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75920 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-18 15:05:52 +00:00
Stefan Csomor
d64c74160b fixing nested modal sessions, part 2, see #15902
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75918 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-18 10:09:33 +00:00
Vadim Zeitlin
b577f3d731 Add missing bounding box calculations in wxMSW wxDC code.
Update the bounding box when drawing bitmaps (in one of several possible ways)
and gradients.

Closes #2132.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75909 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-17 23:53:38 +00:00
Vadim Zeitlin
fd743aad4b Improve disabled buttons appearance in wxMSW when not using themes.
Owner drawn buttons were not drawn in the same way as normal ones when they
were disabled, use Win32 DrawState() to do it now to achieve the correct
appearance.

Closes #11746.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75908 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-17 23:53:25 +00:00
Vadim Zeitlin
99d3a4f4d2 Speed up wxHtmlHelpWindow startup time by freezing font choices.
Appending the names of all fonts could take a significant amount of time if
there were a lot of them, freeze the controls while doing it to speed it up.

Closes #15978.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75907 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-17 23:53:20 +00:00
Vadim Zeitlin
8e828674c4 Set wxHtmlHelpFrame title format before creating it.
This ensures that it's always set before it can be used, fixing assert
introduced in r75748.

Closes #15977.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75906 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-17 23:53:15 +00:00
Vadim Zeitlin
aef402209d Allow waiting for thread termination even without wxTheApp in wxMSW.
Attempts to wait for thread termination after wxTheApp was destroyed resulted
in an error in wxMSW since 2.9.something whereas it used to work in 2.8 and
also generally makes sense to be allowed. So do make this work again by
falling back to the simple non-interruptible wait for thread if we don't have
the application object any more.

Closes #13391.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75904 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-17 23:53:06 +00:00
Vadim Zeitlin
0a5ea360d5 Fix handling of wxTEXT_ATTR_EFFECT_SMALL_CAPITALS in wxRichTextFontPage.
Due to a typo when copy-and-pasting code wrong control was being updated.

It would be better to have a function updating the given control from the
given flag, of course, but for now just fix the bug.

Closes #15990.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75903 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-17 23:53:01 +00:00
Vadim Zeitlin
592c0aa6a8 Fix fallback format index in wxPropertyGetter wxUIntProperty code.
Don't crash by accessing an out of bands array element if the format string
index had been set to an invalid value, just use the default (decimal) format
in this case.

Closes #15984.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75902 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-17 23:52:56 +00:00
Vadim Zeitlin
78be29a447 Use symbolic constants in wxPropertyGrid wxUIntProperty code.
No real changes, just use symbolic constants instead of hard coded magical
constants. The code is still difficult to understand but slightly better than
before.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75901 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-17 23:52:53 +00:00
Stefan Csomor
dba39486b1 fixing nested modal sessions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75899 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-17 19:13:04 +00:00
Paul Cornett
95dfcdd678 avoid potential NULL pointer dereference, closes #15993
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75898 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-17 16:25:22 +00:00
Paul Cornett
15c92b16a3 fix ordering of function parameters, closes #15985
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75897 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-17 16:25:08 +00:00
Julian Smart
29a83101bc Fixed floating object layout when there is only a short text string in the paragraph
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75895 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-17 14:54:09 +00:00
Julian Smart
ba7e065a34 Removed rounding that didn't work for negative numbers; added ability to hide "move object" controls
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75893 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-16 20:05:19 +00:00
Julian Smart
4d331cea32 Compile fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75892 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-16 11:41:20 +00:00
Paul Cornett
320a5da559 mimic wxMSW wxSetCursorEvent propagation behavior, closes #15801
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75888 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-15 18:14:48 +00:00
Julian Smart
8762e50748 Sizing fix in wxRichTextImage::LoadImageCache
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75887 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-15 18:11:44 +00:00
Václav Slavík
c76d1ea417 OS X: fix startup sequence when restoring session on >=10.7.
Make sure that OnInit() is called before MacReopenApp(). This is
normally the case, but it is possible for it to be called as the first
thing.  This can happen when OS X restores running apps when starting a
new user session. Apps that were hidden (dock only) when the previous
session terminated are only restored in a limited, resources-saving way
- the event loop is running, but didn't call anything in the app
delegate yet.  When the user clicks the icon,
applicationShouldHandleReopen: is called, but we didn't call OnInit()
yet. In this case, we shouldn't call MacReopenApp(), but should proceed
with normal initialization.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75885 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-15 16:59:18 +00:00
Julian Smart
2124c5688b Optimized wxRTC insertion and deletion when floating objects are present.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75884 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-15 16:19:43 +00:00
Paul Cornett
f2e9e3b4b7 avoid setting negative window size, see #15976
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75883 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-13 16:47:17 +00:00
Paul Cornett
d35ca1d7aa avoid forcing a paint on a window with zero size, see #15976
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75882 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-13 16:46:57 +00:00
Julian Smart
f95ee1bade Added ability to disable images in wxRTC for performance or image corruption reasons
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75881 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-13 12:32:46 +00:00
Julian Smart
5e989e67fc Corrected wxTextBoxAttr::IsDefault() implementation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75879 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-13 12:00:52 +00:00
Julian Smart
d2e7ba812c Border drawing corrections
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75878 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-13 11:57:40 +00:00
Julian Smart
46944bebe4 Fixed a bug that prevented floating objects from being updated correctly
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75876 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-13 11:46:59 +00:00
Paul Cornett
0eb8b9579a finish setting size before sending wxMoveEvent
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75867 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-10 17:32:42 +00:00
Paul Cornett
ec3872a8e1 remove stuff that is already done by gtk_window_set_transient_for()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75866 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-10 17:25:32 +00:00
Paul Cornett
14029856dc generate wxMoveEvent from wxPopupWindow::DoSetSize()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75865 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-10 17:11:54 +00:00
Paul Cornett
8f97969383 add missing GTK3 implementations of GTKGetWindow()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75864 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-09 19:53:17 +00:00
Paul Cornett
1b131bf7e5 emit signal by id instead of name
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75863 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-09 18:36:15 +00:00
Paul Cornett
6fb06f465b get non-default wxTextCtrl cursors working with GTK3
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75862 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-09 18:15:03 +00:00
Paul Cornett
c51c65633b Use "state-flags-changed" signal with GTK3, deprecated "state-changed" is ignored.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75861 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-09 16:49:35 +00:00
Vadim Zeitlin
6e7ebad658 Fix wxToolBar size in wxMSW when not using icons.
There were several problems when the toolbar style was toggled to not show
icons, fix them by adding missing checks for wxTB_NOICONS style.

Closes #13578.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75846 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-08 14:12:20 +00:00
Julian Smart
30d591010b Return true from GetRangeSize or partial extents will be incorrectly filled in
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75842 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-08 11:55:08 +00:00
Vadim Zeitlin
6d7a5d3969 Don't show "deleted stale lock file" message by default.
The user typically can't do anything about this error anyhow, so don't show it
by default. Still do show it when running in the verbose mode as this might
add diagnosing the problem when something goes unexpectedly wrong.

Closes #15944.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75839 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-08 00:46:54 +00:00
Vadim Zeitlin
92c74c3513 Don't use try/catch if exceptions support is disabled.
Closes #15954.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75837 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-08 00:43:00 +00:00
Vadim Zeitlin
10597ecd04 Don't log error from wxMSW wxWakeUpIdle().
This is not necessary as there is nothing that can be done about this error
anyhow and the function still "works" even if it occurs (it doesn't wake up
anything but it is not necessary to do it if the message queue is already
full) and, worse, results in a crash due to stack overflow.

Closes #15951.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75835 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-07 15:02:36 +00:00
Paul Cornett
2dfa6e6aa8 Don't update position variables from window dragging code.
Let "configure-event" handler do it so it can also generate proper move events.
closes #15904


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75826 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-06 17:27:25 +00:00
Paul Cornett
9d0d2b7e98 Fix wxSetCursorEvent handling
For compatibility with wxMSW, send event up the parent chain.
Properly handle setting the cursor for a wxSetCursorEvent, and don't overwrite the window cursor.
see #15801


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75821 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-06 08:54:17 +00:00
Paul Cornett
0dfeb74e78 Different fix for cursor inheritance and busy cursor/global cursor.
Previous work was not compatible with GTK < 2.18 and did not properly handle some cases
see #15801


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75807 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-06 04:43:46 +00:00
Vadim Zeitlin
5e6d30aa0b Add support for sorting by more than one column to generic wxDataViewCtrl.
Maintain a list of columns used for sorting instead of a single sort column
index and allow to add/remove columns to/from it interactively by right
clicking them if AllowMultiColumnSort() was used.

See https://github.com/wxWidgets/wxWidgets/pull/3

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75806 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-05 22:12:53 +00:00
Václav Slavík
8dd971e45b Rewrite wxTextFile's newlines parsing to fix multiple bugs.
Remove the complicated parsing state machine that contained bugs with
unexpected inputs and was very hard to modify correctly.  Replace it
with much simpler code that looks ahead, instead of deducing line
endings from past characters.

The new code never looses lines with data and calls AddLine() on the
first newline character it encounters, peeking ahead to determine the
line ending type.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75799 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-05 18:28:57 +00:00
Vadim Zeitlin
c866934853 Compilation fix for PCH-less build.
This should fix compilation without PCH after r75785.

See #2609.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75794 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-05 01:04:27 +00:00
Julian Smart
9733b78862 Return true from OnCellClicked if the event was processed, otherwise further processing will use default behaviour which may negate the effect of the event handler.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75793 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-04 19:10:22 +00:00
Julian Smart
179d117a35 Added the ability to restore the last selected page in a wxRTC formatting dialog.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75791 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-04 18:57:20 +00:00
Vadim Zeitlin
9d05d9a009 Allow using wxRearrangeList::Check() to change state programmatically.
Previous this resulted in an assert and broken behaviour as it didn't update
the internally stored state. Do update it now and remove the assert as it
isn't possible to distinguish between user code calling Check() and wxGTK
doing it itself from wxCheckListBox implementation.

Closes #15940.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75786 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-04 15:59:52 +00:00
Vadim Zeitlin
8942262811 Fix transparency in toolbar buttons when not using comctl32.dll v6.
Old versions of comctl32.dll don't support alpha in the toolbar image list, so
use the masks only for them.

Closes #2609.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75785 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-04 15:59:47 +00:00
Dimitri Schoolwerth
6d34b1b760 Added support for wxEVT_COMBOBOX_DROPDOWN and wxEVT_COMBOBOX_CLOSEUP events to wxOSX/Cocoa.
See #15762.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75783 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-04 09:32:16 +00:00
Stefan Csomor
9f93667c52 merging in Václav's fix for getting CPU usage down in ShowModal
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75779 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-03 20:31:55 +00:00
Stefan Csomor
7df52b73bd passing correct timeout values, patch from Václav
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75777 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-03 17:40:43 +00:00
Jouk Jansen
b09a481c2e synchronizing the definition of wxLoadQueryNearestFont
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75776 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-03 14:06:40 +00:00
Paul Cornett
95695c0a9f don't avoid no-window widgets in GTKUpdateCursor()
it doesn't work for things like multi-line text control where m_widget is a no-window GtkScrolledWindow

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75761 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-01 21:01:09 +00:00
Paul Cornett
adeb914098 fix running with GTK < 2.18 when built with later GTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75760 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-01 20:05:43 +00:00
Paul Cornett
fd049a5465 restore non-default cursors in native widgets when unsetting wxCursor
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75759 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-01 18:26:21 +00:00
Vadim Zeitlin
7baf1ce2fd Don't show windows with "hidden" XRC attribute at all.
This is better than showing them initially and then hiding them if only
because it avoids the unexpected wxEVT_SHOW events being generated.

Closes #15919.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-01 18:18:52 +00:00
Vadim Zeitlin
36e3a58992 Recompute the tooltip width when changing its text in wxMSW.
This avoids unnecessarily wrapping the tooltips if they are set to a longer
string than their initial value later.

Closes #4685.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75756 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-01 18:18:47 +00:00
Paul Cornett
7b1f4ba70a don't override non-default cursors in native controls when no wxCursor is set, a regression introduced by r75690
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75755 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-01 17:08:25 +00:00
Tim Kosse
98bf1dae9b Add Kabyle language, as rare language it uses a three-letter code as per ISO 639-2.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75752 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-01 10:39:25 +00:00
Vadim Zeitlin
a23b9cd8ce Use automatic resource management in wxMSW wxDC::DrawRotatedText().
No real changes, just simplify the code by using RAII classes.

Also avoid unnecessary indentation by returning after checking for the special
cases.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75751 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-31 19:33:58 +00:00
Vadim Zeitlin
0a86fd0f4f Support multiline strings in wxDC::DrawRotatedText() in wxMSW.
The native API doesn't support this, so do it by splitting the string into
lines manually.

Closes #9686.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75750 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-31 19:33:53 +00:00
Paul Cornett
17a5323672 build fix for GTK3, see #15930
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75749 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-31 18:26:09 +00:00
Vadim Zeitlin
67cbb04051 Try to detect invalid wxHtmlWindow title format earlier.
Assert directly in wxHtmlWindow::SetRelatedFrame() instead of doing it much
later, hopefully people will read the comment at the assert point.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75748 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-31 16:06:43 +00:00
Vadim Zeitlin
448a4ac22a Reduce the number of realloc() calls in wxHtmlTableCell.
Don't call realloc() after adding each row, this is horribly inefficient, so
preallocate more memory to avoid this.

Closes #15931.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75746 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-30 19:40:40 +00:00
Vadim Zeitlin
d0d22874c8 Correctly detect cancelled drag-and-drop operations in wxGTK.
The status of the drop operation wasn't propagated back to the initiator of
drag and drop, so failing to drop data over a possibly accepting recipient
could result in wrong behaviour and even data loss.

Closes #15930.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75745 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-30 19:40:35 +00:00
Vadim Zeitlin
98da482d7a Deprecate wxTipProvider::PreprocessTip().
It is completely useless, and there is no reason to keep it.

Closes #15916.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75744 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-30 19:40:29 +00:00
Vadim Zeitlin
aeadb41900 Update copyright year in the library versions.
Update the version info dialog and the version info included in MSW DLLs.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75741 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-30 03:32:49 +00:00
Vadim Zeitlin
b02ba7c9ff Don't mark wxMSW applications as being DPI aware.
Because they are not, fully. While our standard controls do appear correctly
in any DPI, anything using bitmaps/icons (e.g. toolbars, AUI title bars, ...)
isn't usable at all without scaling at high DPI, so it's better to avoid
pretending that we're DPI aware at all rather than doing it without being it
for 100%.

This reverts the changes of r63990.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75740 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-29 22:29:54 +00:00
Vadim Zeitlin
67fe66530d Fix a bug which could result in two default buttons in wxMSW dialogs.
Exchange the order of setting/resetting the new/old button as the default one
when focus is lost/gained to avoid the possibility of having two simultaneously
default buttons at once.

Closes #9528.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75739 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-29 22:26:00 +00:00
Vadim Zeitlin
3ded9e191d Fix handling of wxSET, wxCLEAR and wxINVERT ROPs in wxMSW.
Avoid passing source HDC to MaskBlt() for these ROPs which only use the
destination HDC as they produce garbage instead of just ignoring the source in
if it's non-NULL.

Closes #2047.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75738 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-29 22:25:56 +00:00
Vadim Zeitlin
afb49a224b Fix wxClientDC::Clear() for scrolled windows in wxMSW.
Take the DC origin into account when clearing a window DC and not only a
memory one.

Closes #2048.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75737 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-29 22:25:51 +00:00
Vadim Zeitlin
41569662e3 Fix wxPrinterDC::DrawIcon() in wxMSW.
Make DrawIcon() work when printing: it previously didn't, as we used
::DrawIconEx() Windows function which wasn't supported when printing.
Work around this by using DrawBitmap() if necessary.

Closes #379.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75736 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-29 22:25:45 +00:00
Vadim Zeitlin
cc4658d1f4 Fix display of bitmaps with alpha in wxStaticBitmap under MSW.
Avoid double alpha pre-multiplication by converting the bitmap into a non
pre-multiplied format before passing it to STM_SETIMAGE.

Closes #2395.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75735 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-29 22:25:41 +00:00
Vadim Zeitlin
0a411fd5da Virtualize wxXmlNode methods used by wxAuiToolBarXmlHandler.
This fixes the DLL build of aui library as it can now be linked without
leaving any unresolved dependencies to the code in xml library (where
wxXmlNode is implemented).

Closes #15686.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75734 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-29 22:25:36 +00:00
Vadim Zeitlin
d94f3f5aba Fix bug with non-NUL-terminaed inputs in wxMBConvUTF8.
We read beyond the provided maximal length as we didn't update the remaining
length while parsing the remaining bytes of an UTF-8-encoded code point.

Fix this and add a test for it.

Closes #15901.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75733 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-29 22:25:14 +00:00
Vadim Zeitlin
5cfbf0dc4d Allow iterating over wxCmdLineParser arguments in order.
This allows the meaning of the options to depend on their order relatively to
the other options which wasn't possible before.

See http://review.bakefile.org/r/557/

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75723 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-28 13:04:55 +00:00
Vadim Zeitlin
f4c9767b49 Try rounding the values when resizing wxImage instead of truncating.
This would seem to make more sense and might also fix the test failures
resulting from tiny differences in arithmetic operations when compiled with
different compilers/under different architectures.

Regenerate the test files and commit (disabled) change to the unit test
allowing to do it again in the future.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75715 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-26 16:24:42 +00:00
Vadim Zeitlin
ca5f92da94 Don't keep dangling pointers in other wxRibbonButtonBar members neither.
This should have been part of r75710: after deleting the button, also reset
any stored pointers to it.

Closes #15909.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75714 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-26 14:08:23 +00:00
Vadim Zeitlin
7048cf7174 Don't leave dandling pointers in wxDataViewCtrl in wxOSX.
The previous m_ModelNotifier became invalid but wasn't always replaced with a
valid one, resulting in a crash due to the use of an invalid pointer.

Closes #15910.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75711 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-25 17:39:28 +00:00
Vadim Zeitlin
5f30588ebd Delete the button object in wxRibbonButtonBar::DeleteButton().
Unlike ClearButtons(), DeleteButton() didn't actually delete the button.

Fix this and document this behaviour.

Closes #15909.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75710 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-25 17:39:21 +00:00
Václav Slavík
2c260e8188 Fix improper NSGraphicsContext handling in wxOSXCreateBitmapContextFromNSImage.
Don't leave currentContext set to the temporary context indefinitely,
but restore the previous one when done. It's apparent from the code that
this is how it was meant to be done.

Not doing this can result in strange, insanely hard to debug errors in
completely unrelated places, because OS X (at least < 10.9) reuses a
pool of contexts. For example, this change fixes Quicklook crashes in
file open panel on 10.8.

For detailed explanation, see the lengthy discussion at
https://code.google.com/p/chromium/issues/detail?id=90140

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75709 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-25 17:38:56 +00:00