Remove unnecessary checks for OS X 10.4 and gcc 4.0 in configure.
As 10.4 is not supported any more, don't check for it. Also don't impose the
use of gcc 4.0 for compiling wxOSX/Carbon as this compiler doesn't exist any
more under OS X 10.7 but wxOSX/Carbon can be compiled using gcc 4.2 if 10.6
SDK is selected, so this change allows to build wxOSX/Carbon under 10.7.
Temporarily disable the failing wxRichTextCtrl case.
Disable CaretPosition() unit test as it is broken now. This is only temporary
to allow tests to pass in 2.9.4, will be reenabled (and hopefully fixed) later.
Clearing a rectangle of size 32000 was not always enough to clear the entire
DC, so use INT_MAX instead -- this is the best we can do with the current
approach.
Keep client data in sync when deleting items from wxOSX wxComboBox.
Correspondence between item indices and their client data was broken if any
items were deleted or the combobox was cleared entirely. Fix this by updating
the client data array whenever this happens.
Add extra border below the buttons in the generic log dialog.
This fixes the problem with the dialog appearance in wxOSX/Cocoa where the
bottom of the buttons was truncated otherwise and arguably makes the dialog
look slightly better in the other ports too.
Fix wxDataViewChoiceRenderer behaviour in wxOSX/Cocoa.
Changing the value of a "choice" cell in wxDataViewCtrl didn't work correctly
in wxOSX/Cocoa because wxDataViewChoiceRenderer used the base class version of
OSXOnCellChanged() which passed the integer index we received from NSOutlineView
to the model instead of the expected string.
Fix this by overriding OSXOnCellChanged() in wxDataViewChoiceRenderer itself
and using its argument as an integer index of the selection because this is
what it is, at least under OS X 10.7.
Previously the combobox was immediately dismissed when the mouse was used.
Fix this by copying the code from wxGridCellChoiceEditor to this class. This
is obviously not ideal and both classes should be refactored to avoid this in
the future but for now this at least fixes the user-visible problem.
Show gstreamer errors in wxGStreamerMediaBackend to the user.
If the media file fails to play, we really need to show to the user the
corresponding gstreamer error, otherwise there is no way to understand what
the problem is.
Collect the errors in gst_error_callback() and show them from the main thread
if we get a gstreamer error.
Use wxFileSystem::FileNameToURL() in wxGStreamerMediaBackend.
Converting files to URIs is not as simple as just prepending "file://" to
them, notably we need to escape characters that are special in URIs such as
"#" and "%", so use FileNameToURL() which already does do it correctly.
It was broken since the addition of the call to wxApp::OnInit() to
wxMediaPlayerApp::OnInit() -- as the base class parses the command line
itself, we need to use OnInitCmdLine() and OnCmdLineParsed() instead of doing
it manually if we call it.
Also don't load the play list saved in wxConfig if any command line parameters
were given as otherwise the saved files would be used first (this seems to
have been always broken...).
Use COMPILER_VERSION and ARCH_SUFFIX in libraries names in Windows makefiles.
For the official builds (only), include the compiler version and the
architecture suffix, unless it's the default x86, into the DLL names, to allow
their concurrent installations for multiple compiler versions and architectures.
No real changes, just rename DIR_SUFFIX_CPU to ARCH_SUFFIX in bakefiles.
This will be soon used in the libraries names and not only in the directory
paths so rename the variable to make things more clear (or at least less
confusing).
Vadim Zeitlin [Sat, 30 Jun 2012 23:41:15 +0000 (23:41 +0000)]
Added internal wxHatchStyle enum.
It's annoying that the same code for hatched pens and brushes can't be reused
without relying on deprecated wxXXX_HATCH constants, so add new,
non-deprecated, wxHatchStyle enum that can be used in such code.
Vadim Zeitlin [Sat, 30 Jun 2012 16:33:40 +0000 (16:33 +0000)]
Force wide char environment version initialization in wxGetEnvMap().
When using MSVC CRT, the wide character version of the environment is not
always initialized when using main() (and not _wmain()) as entry point, so
force initializing it before using _tenviron.
Vadim Zeitlin [Sat, 30 Jun 2012 16:33:32 +0000 (16:33 +0000)]
Use wxString::t_str(), not fn_str(), with Windows API functions.
fn_str() is supposed to be used with the CRT functions taking file names only,
not Windows API functions that always take LPCTSTR with all compilers/CRT
versions.
Vadim Zeitlin [Sat, 30 Jun 2012 16:33:28 +0000 (16:33 +0000)]
Define wxEntry() with WinMain-compatible signature for all Windows ports.
Make wxEntry(HINSTANCE, ...) available in wxGTK under Windows too.
Refactor the headers to allow this and extract Windows-specific wxEntry()
declarations in wx/msw/init.h from wx/msw/app.h for consistency with the
normal wxEntry(int, char**) declared in wx/init.h.
Vadim Zeitlin [Sat, 30 Jun 2012 16:33:10 +0000 (16:33 +0000)]
Create wxStaticBoxSizer elements as children of wxStaticBox in XRC.
As we now recommend creating the controls shown inside wxStaticBox as its
children, and not siblings, follow our own recommendation by doing just this
in XRC handler of wxStaticBoxSizer.
Also add a test of using a tooltip with a wxStaticBoxSizer element to the XRC
demo showing that tooltips do work now for them, unlike before.
Vadim Zeitlin [Sat, 30 Jun 2012 16:33:07 +0000 (16:33 +0000)]
Don't hard code horizontal border for wxStaticBox in wxGTK.
Compute the border width from the average character width instead of hard
coding it to 5 pixels. Probably doesn't make much difference in practice, but
seems to make more sense.
Vadim Zeitlin [Sat, 30 Jun 2012 16:33:04 +0000 (16:33 +0000)]
Fix vertical offset for wxGTK wxStaticBox without label.
Don't use different size for the vertical border in wxStaticBox just because
it doesn't have any label, this just doesn't seem necessary and results in
different appearance for the static box with and without label.
Vadim Zeitlin [Fri, 29 Jun 2012 23:55:54 +0000 (23:55 +0000)]
Fix generation of wxEVT_CHAR in wxMSW wxComboBox.
wxEVT_CHAR shouldn't be generated at all if wxEVT_KEY_DOWN was handled but it
still was for wxComboBox because the code in its MSW implementation directly
called HandleKeyDown() and HandleChar() methods, bypassing the logic dealing
with m_lastKeyDownProcessed at wxWindow level.
Fix this by calling MSWHandleMessage() instead to ensure that WM_CHAR after a
handled WM_KEYDOWN are ignored as they ought to.
Vadim Zeitlin [Thu, 21 Jun 2012 13:19:30 +0000 (13:19 +0000)]
Don't call gtk_window_set_geometry_hints() if there are no hints to set.
Calling gtk_window_set_geometry_hints() with the hints mask of 0 doesn't work
correctly and sets the window size to the smallest possible. Avoid this by
simply not calling this function at all if there is nothing to do.
Vadim Zeitlin [Wed, 20 Jun 2012 17:54:49 +0000 (17:54 +0000)]
No real changes, just simplify wxGDIPlusContext::GetTextExtent() a bit.
Don't call Font::GetSize() and FontFamily::GetEmHeight() thrice, just do it
once and store the results. This makes the code both simpler and shorter and
marginally more efficient.
Vadim Zeitlin [Sun, 17 Jun 2012 21:35:10 +0000 (21:35 +0000)]
Disable creation of wxDIB from wxBitmap in non-wxMSW ports.
wxDIB can now be used with wxGTK under Windows, i.e. when not using wxMSW
version of wxBitmap but it can't be created from wxBitmap then as it doesn't
have a corresponding HBITMAP.
Simply disable this functionality when not using wxMSW.
Vadim Zeitlin [Sun, 17 Jun 2012 21:35:06 +0000 (21:35 +0000)]
Move wxBell() from base to core library.
This allows to get rid of ugly preprocessor checks due to the fact that this
function could be defined in one or the other library depending on the port
used and also fix a problem with it being defined differently in the base
library depending on which GUI port (Carbon or Cocoa) was used under OS X.
It also fixes the problem with wxBell() in wxGTK under Windows.
Vadim Zeitlin [Fri, 15 Jun 2012 23:23:23 +0000 (23:23 +0000)]
Remove unnecessary base class OnPaint() call from wxGenericColourDialog.
Events should be skipped instead of calling the base class event handler
directly, but in this case even this is not needed as wxGenericColourDialog
takes care of processing the event completely.