Commit Graph

58238 Commits

Author SHA1 Message Date
Paul Cornett
0236c59057 update for GTK3
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76153 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-16 16:39:20 +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
9be89b48db Install wx/preferences.h and wx/testing.h in "make install".
These headers were accidentally forgotten in files.bkl, add them there and
rebake.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76139 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-13 16:15:28 +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
2c64172825 Reset the system last error value before checking it in wxLog test.
Explicitly set the last error indicator to 0 before checking that
wxLogSysError() logs it correctly as it wasn't always set to 0 otherwise.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76123 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-12 22:20:50 +00:00
Vadim Zeitlin
54da844960 Update the version string in manually managed VC11 project files.
Use "31", not "30".

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76122 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-12 16:02:43 +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
8b5d2687db Remove unnecessarily overridden methods from wxToggleButtonBase.
These methods already do exactly the same thing in the base wxAnyButton class,
there is no need to override them again.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76119 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-11 20:48:16 +00:00
Vadim Zeitlin
a6bf247ee6 No changes, just fix typos in my own name ("Zeitlin").
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76118 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-11 20:48:13 +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
Vadim Zeitlin
acd8a61bd8 Do run TextStreamTestCase::TestULongLong() test case.
We ran TestLongLong test case twice because of an accidental typo.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76111 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-10 19:05:25 +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
f2fbc84dcb Document Insert() and Prepend() overloads taking wxMenu.
Document these methods in addition to AppendSubMenu().

Closes #16052.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76091 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-07 01:19:07 +00:00
Vadim Zeitlin
9151248ee0 Update the URL of the web site images used in the test.
The old images don't exist any more after web site redesign.

Also, the new favicon can't be loaded from an unseekable stream because it
contains multiple icons, so point to the old favicon instead.

Closes #16049.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76089 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-06 13:53:14 +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