Vadim Zeitlin [Wed, 23 Nov 2011 23:58:54 +0000 (23:58 +0000)]
Fix crash in wxTreeListCtrl::GetItemText() if text was never set.
Asking for the text of an item is not an error even if it was never set for
any column but the first one so just return an empty string in this case
instead of crashing.
Vadim Zeitlin [Tue, 22 Nov 2011 13:18:55 +0000 (13:18 +0000)]
Dismiss wxSplashScreen on any user input, not necessarily on splash itself.
Use wxEventFilter to remove the splash screen as soon as any user input is
detected anywhere in the application, not necessarily over the splash screen
itself.
This ensures that the splash screen disappears as soon as the user starts
working with the application instead of sticking around and covering the main
window.
Vadim Zeitlin [Tue, 22 Nov 2011 13:18:53 +0000 (13:18 +0000)]
Ensure that wxSplashScreen doesn't appear on taskbar nor in Alt-TAB list.
Having the splash screen in Alt-TAB window list under MSW was useless and ugly
(as it didn't even have the proper application icon) so use the appropriate
styles to avoid this.
Vadim Zeitlin [Tue, 22 Nov 2011 13:18:45 +0000 (13:18 +0000)]
Hack wxMSW wxNotebook to show the text controls correctly initially.
Add an Update() call to ensure that text controls in the initially selected
notebook page are shown correctly. It's almost certainly not the right fix for
the real bug that results in text controls not being shown when the notebook
comes up but it doesn't cost much and at least allows us to get correct
appearance for the themed notebooks.
Vadim Zeitlin [Fri, 18 Nov 2011 23:40:53 +0000 (23:40 +0000)]
Fix HasFocus() for composite controls.
Comparing the result of DoFindFocus() with the main window of composite
control doesn't work as it can return a child window so HasFocus() still
returned false for a composite control such as generic wxListCtrl even when it
did have focus.
Just use FindFocus() instead of DoFindFocus() to fix this.
Steve Lamerton [Thu, 17 Nov 2011 20:43:34 +0000 (20:43 +0000)]
Remove double buffering from wxWebViewIE as this is handled by the web browser control itself and actually makes flickering worse. Also remove an unnecessary background style.
Vadim Zeitlin [Tue, 15 Nov 2011 15:46:01 +0000 (15:46 +0000)]
Only update status bar fields after they were created in wxMSW.
Postpone updating statu bar panes after they were actually created.
Setting the status bar fields contents before setting the number of them
failed resulting in debug error messages and the text not appearing in the
status bar.
Vadim Zeitlin [Mon, 14 Nov 2011 13:35:52 +0000 (13:35 +0000)]
Replace wxT() with wxS() in image options definitions.
The optimal way of creating a literal strings consisting of only ASCII
characters is to use wxS() as this avoids the need for run-time conversion in
all builds while wxT() requires a conversion from wchar_t to UTF-8 in UTF-8
builds. So replace wxT() with wxS() in wxImage options definitions.
Also remove wxT() from the options documentation, it's just useless there.
Vadim Zeitlin [Mon, 14 Nov 2011 12:51:53 +0000 (12:51 +0000)]
Fall back on ::GetMessagePos() if ::GetCursorPos() fails under MSW.
In some rare but reproducible cases GetCursorPos() can fail and return without
filling in the provided point. Fall back to GetMessagePos() if this happens:
this is not ideal but clearly better than using uninitialized position or hard
coding something like (0, 0).
Vadim Zeitlin [Mon, 14 Nov 2011 12:51:47 +0000 (12:51 +0000)]
No changes, just add another case to a switch on wxMouseButton.
Fix warnings given when wx headers are compiled with g++ -Wswitch-enum option.
Also make the assert messages more precise and less verbose as there is no
need to include the function name in them, all relatively recent compilers
provide it via __FUNCTION__ and wxFAIL_MSG() already uses it.
Vadim Zeitlin [Fri, 11 Nov 2011 14:26:06 +0000 (14:26 +0000)]
Intercept some keys in wxMSW wxTextCtrl even if they're used as accelerators.
Bare (i.e. without any modifiers) Delete, Home and End keys are also required
by the text control itself so don't handle them as accelerators when wxTextCtrl
has focus.
Vadim Zeitlin [Thu, 10 Nov 2011 11:58:04 +0000 (11:58 +0000)]
Compilation fix for wxUSE_UNICODE=0 build after wxUSE_STL=1 fix.
The result of wxString::mb_str() can't be converted to wxScopedCharBuffer in
non-Unicode build but converting it to wxCharBuffer is always fine (though
slightly less efficient).
Vadim Zeitlin [Thu, 10 Nov 2011 00:30:04 +0000 (00:30 +0000)]
Remove all unwanted occurrences of -mt/-pthread in configure.
Remove all inappropriate compiler options and not just the first one as they
can occur multiple times because they may come from pkg-config output for
several different libraries.
Vadim Zeitlin [Tue, 8 Nov 2011 11:02:05 +0000 (11:02 +0000)]
Move GDK_META_MASK definition in the header in which it is also used.
The code using GDK_META_MASK was moved to wx/gtk/private/event.h from
gtk/window.cpp but the fallback definition of GDK_META_MASK for GTK+ < 2.10
remained in window.cpp.
Move it to the header as well now so that it can be compiled with GTK+ < 2.10
again.
Vadim Zeitlin [Tue, 8 Nov 2011 11:01:58 +0000 (11:01 +0000)]
Add missing stdio.h include to wxGTK assert dialog code.
As we use FILE for saving the assert message to a file, we must include
<stdio.h> (which is not included from any other header, at least not under
Solaris).
Václav Slavík [Tue, 8 Nov 2011 10:53:49 +0000 (10:53 +0000)]
Use Enter and Space for cell editing in generic wxDVC too.
If the normal Enter or Space processing (sending activate event or doing
activatable editing respectively) isn't handled by the control, use
these keys to trigger inline editing too, as F2 does.
This makes the Windows control more similar to OS X and GTK+ ones and
makes discovering editability easier.
Vadim Zeitlin [Sun, 6 Nov 2011 12:06:43 +0000 (12:06 +0000)]
Use current time, not the Epoch for time zone determination.
When deducing the time zone from struct tm tm_gmtoff field, query tm for the
current time and not the Epoch as the DST rules -- and hence the time zone
offset -- could have changed since 1970. This is notably the case for Ireland
which used a different time zone from 1968 to 1971.
Notice that GetTimeZone() still must return the time zone without taking DST
into account, so we explicitly compensate for DST if it's in effect.
Vadim Zeitlin [Sat, 5 Nov 2011 11:24:04 +0000 (11:24 +0000)]
Allow reusing the same wxWindowID more than 254 times.
Extend the id reference count storage to use an overflow hash map for the ids
used more than 254 times. This allows to use the same id an arbitrarily large
number of times.
Vadim Zeitlin [Sat, 5 Nov 2011 11:23:51 +0000 (11:23 +0000)]
Fix format string in wxLog::LogLastRepeatIfNeeded().
We used a format string without any format specifiers in it in a call to
wxString::Printf() which always had a parameter resulting in an assert failure
about a mismatch between the string and parameter count.
Fix this by using a separate Printf() call for this case.
Vadim Zeitlin [Sat, 5 Nov 2011 11:23:48 +0000 (11:23 +0000)]
Use correct direction in wxDataObject::IsSupported() in wxOSX dnd code.
Before calling wxDataObject::SetData() we must check whether the object
supports this format using IsSupported(Set) instead of just IsSupported()
which does the test in the "Get" direction.
Vadim Zeitlin [Sat, 5 Nov 2011 11:23:44 +0000 (11:23 +0000)]
Don't read beyond the end of input buffer when decoding UTF-16.
wxMBConvStrictUTF8::FromWChar() didn't update the input length correctly when
encountering a surrogate while decoding UTF-16 and could read beyond the end
of the input buffer in this case.
Fix this by simply adjusting the input length when a surrogate is read.
Vadim Zeitlin [Sat, 5 Nov 2011 10:28:48 +0000 (10:28 +0000)]
Rename lineAnchor in Scintilla code to avoid shadowing warning.
Local variable "lineAnchor" in Editor::SetRectangularRange() was shadowing the
member variable Editor::lineAnchor, resulting in warnings from some compilers
(AIX xlC, Sun CC).
Rename it to "lineAnchorRect", just as it was done in the latest Scintilla
sources, to avoid them.
Vadim Zeitlin [Fri, 4 Nov 2011 17:41:20 +0000 (17:41 +0000)]
Correct the misleading example of using id ranges in XRC documentation.
"range[end]" is the last id in the range, inclusive, not the first id after it
so any loops iterating over all ids in the range should cover it as well.
Vadim Zeitlin [Fri, 4 Nov 2011 17:40:49 +0000 (17:40 +0000)]
Simplify wxIdRange code by using new XRCID_Assign() function.
Only traverse the id hash once in XRCID_Assign() instead of using
RemoveXRCIDEntry() to delete the old entry (which usually doesn't exist so
this traversed the entire hash) followed by XRCID_Lookup() to create a new one.
Vadim Zeitlin [Fri, 4 Nov 2011 12:02:07 +0000 (12:02 +0000)]
Fix choice of tree item icon for the selected state in wxMSW.
The logic for selecting the item icon was broken when selected image was
specified as it was not taken into account as fallback for selected expanded
state so selected icon was used only for collapsed items.
Fix this by using the selected icon if it is specified and selected expanded
one is not.
Vadim Zeitlin [Wed, 2 Nov 2011 19:08:54 +0000 (19:08 +0000)]
Improvements to German translation.
- Changed phrasing of some texts
- Replaced words by more commonly used ones
- Translated untranslated words and sentences
- Used clear translation for vague expressions
- Used common translation for multiply used terms like "save"
Vadim Zeitlin [Wed, 2 Nov 2011 19:08:46 +0000 (19:08 +0000)]
Punctuation fixes in German translation.
- Fixed some menu entries which where using '$' instead of '&'
- Added missing punctuation marks to equal the original text
- Removed unneeded and double characters
Vadim Zeitlin [Mon, 31 Oct 2011 19:41:06 +0000 (19:41 +0000)]
Make wxTreeListEvent dynamically creatable.
This is unfortunately required by wxEvent::Clone() support unit test so
provide the default ctor in this class even though it doesn't make any sense
in normal use.