Commit Graph

55801 Commits

Author SHA1 Message Date
Robin Dunn
0a898d4ca0 Enable the wxMediaCtrl backend for wxOSX-cocoa in the build and fix some bugs that were causing it to not send the EVT_MEDIA_LOADED events and to not have a valid best size set. Closes #13065
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72282 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-02 20:25:16 +00:00
Robin Dunn
440ddb750f Have wxDCImpl::GetHandle return NULL by default instead of being pure virtual.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72281 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-02 20:25:06 +00:00
Paul Cornett
38ae64e696 remove unused OSX includes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72280 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-02 16:37:09 +00:00
Paul Cornett
0c4438d26e Fix wxGCDC::Clear() for Cairo, and possibly MSW.
Maximum positive coordinate Cairo can handle is 2^23 - 1.
Also convert coordinates to logical so it works right with modified origin or scale.
See #14529


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72279 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-02 16:25:14 +00:00
Robin Dunn
487f662754 Add ctors for wxFileSystemWatcherEvent
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72271 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-02 05:38:39 +00:00
Vadim Zeitlin
3d167787c0 No changes, just fix typos in comments in wxOSX files.
Closes #14549, #14552.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72270 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-01 22:05:48 +00:00
Vadim Zeitlin
7740f1c7c9 Uncomment and improve wxFileName::CreateTempFileName() documentation.
Most of CreateTempFileName() documentation was commented out in r57994 for
some reason, uncomment it back and also improve it.

Closes #14545.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72269 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-31 16:49:42 +00:00
Vadim Zeitlin
6d93e28adf Fix comparisons of char and wchar_t with wxUniChar[Ref].
Comparisons didn't work correctly in the other direction as they were not
reversed as needed. Fix this by adding wxDEFINE_COMPARISON_REV() macro which
defines comparisons in terms of the reverse operations and use it for both
wxUniChar and wxUniCharRef.

Closes #14547.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72268 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-31 16:49:36 +00:00
Vadim Zeitlin
d50905f761 Fix wxKeyEvent::m_uniChar for EVT_CHAR for native controls in wxGTK.
It was mistakenly set to the same value as in EVT_KEY_DOWN event but, just as
m_keyCode, it may be different for EVT_CHAR.

Use gdk_keyval_to_unicode() to set it correctly instead of inheriting
EVT_KEY_DOWN value.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72267 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-31 11:29:00 +00:00
Vadim Zeitlin
7c8bfa876a Add an option to use wxTextCtrl as input window in keyboard sample.
Keyboard handling is subtly different in wxGTK for native controls and generic
wxWindows so add a way to test both of them in the sample.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72266 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-31 11:09:00 +00:00
Vadim Zeitlin
f239af65af Allow setting LCID used by wxAutomationObject.
Default user-locale-dependent LCID may be inappropriate for some situations,
notably Microsoft Excel uses localized formula names for non-English LCIDs.
So add a way to change the LCID to use at wxAutomationObject level while
preserving the old behaviour by default.

Closes #14540.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72265 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-31 10:31:55 +00:00
Vadim Zeitlin
3d2846fc06 Use compatibility_iterator instead of "Node*" in wxWinCE toolbar code.
This allows the code to compile in all build configurations.

Closes #14541.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72264 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-31 10:31:48 +00:00
Vadim Zeitlin
d9a631c389 No changes, just fix some typos in wxDFB comments.
Closes #14538.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72263 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-31 10:31:42 +00:00
Vadim Zeitlin
5bdcb1f324 Use (newly) added wxStaticCastVariantData() to fix wxNO_RTTI build.
Don't define wxDynamicCastVariantData if RTTI is disabled and don't use it in
wxConvertVariantToOle() code as we don't really need it there anyhow.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72262 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-30 19:16:30 +00:00
Vadim Zeitlin
7c70331e28 Add expand/collapse button to wxRibbonBar.
This allows the user to toggle the ribbon bar visibility.

Closes #14530.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72261 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-30 17:53:36 +00:00
Vadim Zeitlin
73ed2b2b12 Fix the size of the buffer passed to wxTmemcpy() in wxTextDataObject.
This corrects fatal bug introduced in r72259: we must not multiply the string
length by sizeof(wxChar) as wxTmemcpy() does this internally.

See #14444.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72260 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-30 11:39:08 +00:00
Vadim Zeitlin
229f00eb69 Translate wxTextDataObject to/from native EOL format.
The text data should use CR LF EOLs under Windows but the data inside the
program typically has only LF EOLs, so translate between them automatically in
wxTextDataObject.

Closes #14444.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72259 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-29 22:08:50 +00:00
Vadim Zeitlin
46a0544e6f No real changes, just use accessors in wxTextDataObject.
Use {Set,Get}Text() instead of using m_text directly in wxTextDataObject as
these virtual methods overridable and should be called in case the class
doesn't actually use m_text for its storage at all.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72258 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-29 22:08:46 +00:00
Vadim Zeitlin
9a9c20be62 Support wxID_HELP_{INDEX,SEARCH} and wxID_MDI_WINDOW_XXX in XRC.
Add missing wxStandardID enum elements to AddStdXRCID_Records().

Also add blank lines to make the code in this function align with the enum
declaration to make side-by-side comparison easier.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72257 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-29 22:08:42 +00:00
Vadim Zeitlin
a05cbc20e3 Fix bug in wxNumberFormatter::ToString() for negative numbers.
Don't include the possible leading sign in the span of digits to be grouped as
this gave nonsensical strings such as "-,123" when adding thousands separators
to "123".

Closes #14526.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72256 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-29 22:08:37 +00:00
Vadim Zeitlin
42a4299bb3 Remove workaround for slow scrolling in wxStyledTextCtrl.
We don't need to drop mouse wheel events coming too fast after the previous
commit as now scrolling in wxStyledTextCtrl works quickly enough.

Closes #9057.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72255 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-29 22:08:31 +00:00
Vadim Zeitlin
14941a1af7 Remove unnecessary Update() in wxStyledTextCtrl scrolling code.
Calling Update() every time ScrollText() dramatically slowed down scrolling
and doesn't seem to be necessary, so remove it.

See #9057.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72254 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-29 22:08:24 +00:00
Vadim Zeitlin
c4f49d69cf Make keyboard sample output less confusing.
Warn if key presses occur when the input window doesn't have focus as the
usual key events are not generated then which could be understood as a bug in
the sample instead of the correct result.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72253 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-29 22:08:21 +00:00
Vadim Zeitlin
1043456035 Generate clipboard events for wxComboBox in wxGTK too.
These events were only generated for wxTextCtrl but should be sent for
non-readonly wxComboBox too, so refactor the code to allow its reuse from
wxComboBox.

Also add EVT_TEXT_PASTE handlers for both controls to the widgets sample for
testing.

Closes #14520.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72252 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-29 22:08:15 +00:00
Vadim Zeitlin
756ead6f83 Revert HasModifiers() change in behaviour, add HasAnyModifiers().
In 2.8 wxKeyEvent::HasModifiers() returned false if (only) Shift was pressed
as it tested for Control and Alt only but when it was moved to wxKeyboardState
in r55745 it started checking for all modifiers as this made more sense now
that it was used by wxMouseEvent. However it broke existing code using it,
including in wxWidgets itself (in wxTreeCtrl), so revert it now and add
HasAnyModifiers() that does check for all modifiers, including Shift.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72251 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-29 22:08:09 +00:00
Vadim Zeitlin
c589dc030d Add a wxGTK-specific function to set wxNotificationMessage icon name.
It's trivial to use a stock icon with the given name in wxGTK with libnotify,
so provide a way to do it. However this is not as simple as that in other
implementations (notably Windows), so make it private to this port for now.

In the future we should try to support arbitrary wxIcons as well as extend
wxIconLocation to support FreeDesktop stock icon names.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72250 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-29 22:07:06 +00:00
Václav Slavík
e0ea79b805 Fix installed wx-config broken by r72205.
In an attempt to fix DESTDIR support on platforms without symbolic
links, this commit completely broke the wx-config symlink created by
"make install" everywhere (unless you were insane enough to use
"--prefix=/", that is): $(libdir) is absolute path and so using
../$(libdir) has no chance of working.

Fixed by using `basename $(libdir)`. This is still unsatisfactory,
because it assumes that $(libdir) and $(bindir) are at the same level in
the filesystem -- which, while usually true, is by no means guaranteed.
But at least this works most of the time.

See #14517.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72249 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-29 08:52:52 +00:00
Robin Dunn
2e66ffc737 Add GetHandle for wxGnomePrinterDCImpl
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72246 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-28 21:52:37 +00:00
Robin Dunn
8e72f2cd18 wxDC::GetHandle support for wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72226 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-28 19:31:18 +00:00
Robin Dunn
6d4b1e2759 wxDC::GetHandle support for wxMSW
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72225 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-28 19:31:09 +00:00
Robin Dunn
9eefb5c14a Adding wxDC::GetHandle for wxOSX-cocoa and wxOSX-carbon
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72224 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-28 19:31:03 +00:00
Vadim Zeitlin
5ed53483fe Move new wxGTK wxNotificationMessage files to adv from core.
The new files were erroneously added to the wrong place, move them where they
belong.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72220 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-27 19:36:59 +00:00
Vadim Zeitlin
c61797b6d6 Fix compilation of new wxNotificationMessage for wxGTK without libnotify.
Add the wxUSE_LIBNOTIFY check forgotten by the previous commit.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72219 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-27 16:03:35 +00:00
Vadim Zeitlin
afbf46a317 Implement wxNotificationMessage using libnotify in wxGTK.
Use libnotify -- if detected by configure -- to provide native notifications
in wxGTK. Our API maps to libnotify one in rather straightforward way, we
might consider extending it to cover more of libnotify functionality
(categories, user-defined icons and, especially, actions) later.

Also update the dialogs sample to show another kind of notification and the
documentation to clarify the behaviour of various methods.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72218 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-27 15:36:54 +00:00
Vadim Zeitlin
5a92b56137 Add a private wrapper for GError to wxGTK.
This class simply calls g_error_free() automatically.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72217 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-27 15:36:45 +00:00
Vadim Zeitlin
b9b55ad516 Add all extra GTK libraries to GUI_TK_LIBRARY in configure.
Some libraries (e.g. Pango) were added to GUI_TK_LIBRARY already while others
(e.g. Hildon) had their own EXTRALIBS_HILDON variables that were then added to
EXTRALIBS_GUI separately. Finally, some others were simply broken because
neither EXTRALIBS_GNOMEVFS nor EXTRALIBS_GTKPRINT were set anywhere.

Standardize on using GUI_TK_LIBRARY for everything.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72216 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-27 15:36:40 +00:00
Vadim Zeitlin
f5406730ff wxOSX/Carbon compilation fix after the changes of r72207.
Don't use position for keyboard events in Carbon code neither.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72213 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-25 22:21:45 +00:00
Václav Slavík
9765f67156 wxMSW: Use TBSTYLE_AUTOSIZE for toolbar buttons with horizontal text.
Without this style, all buttons share the same width and look ugly when
their labels differ even a little in their lengths. With
TBSTYLE_AUTOSIZE, toolbar buttons use the size of their image plus
label's width and look better, even though their sizes differ.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72212 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-25 16:31:58 +00:00
Vadim Zeitlin
04dc0a11d5 Another wxOSX compilation fix after the changes of r72207.
Don't use position for keyboard events in wxWebKitCtrl code neither.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72211 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-24 23:13:30 +00:00
Vadim Zeitlin
b6a49c2b75 Add wxWebView::GetNativeBackend() method.
This allows to use platform-specific methods in user code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72210 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-24 21:59:21 +00:00
Vadim Zeitlin
723aa01a83 Build fix for wxOSX after removing position in MacCreateKeyEvent().
This fixes compilation after the changes of r72207.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72209 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-24 21:44:32 +00:00
Stefan Csomor
33418f48c4 I don't think this is still necessary, see #13625
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72208 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-24 21:43:15 +00:00
Vadim Zeitlin
2f7baaeccf Don't eagerly set wxKeyEvent position fields.
This results in a noticeable delay when using wxGTK via a remote X11
connection for every key event as a round trip to server is needed to get the
mouse pointer position every time a key is pressed or released.

Only provide the position on demand. And explain that it's actually not very
useful as it's simply the same as the current mouse position.

Closes #14361.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72207 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-24 20:45:52 +00:00
Vadim Zeitlin
7ce6da52a1 Extract OS X non-GUI event loop in a separate header.
This will allow its reuse from non-wxOSX ports, e.g. wxGTK under OS X.

Closes #14519.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72206 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-24 20:45:43 +00:00
Vadim Zeitlin
b0067d881b Use relative path for wx-config symlink in "make install".
This fixes "make DESTDIR=..." Broken by r71050 but still allows "make
DESTDIR=... install" to work even under MinGW where "ln -s" is mapped to "cp"
and so doesn't work with non-existing first argument.

Closes #14517.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72205 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-24 20:45:36 +00:00
Vadim Zeitlin
6619c4af1b Add wxDir::Close().
This is trivial to have and can sometimes be useful and also is symmetric to
Open().

Closes #14493.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72204 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-24 20:45:30 +00:00
Vadim Zeitlin
1f7c17f405 Set up scrollbars correctly for wxWebView in wxGTK.
This allows Scroll{Lines,Pages}() methods inherited from wxWindow to work with
it.

Add a test of using them to the sample.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72203 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-24 20:45:25 +00:00
Vadim Zeitlin
992ea4068c Refactor: extract GtkScrolledWindow creation from wxWindow::Create().
No real changes, just make it possible to reuse the scrolled window and
scrollbars creation code from derived classes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72202 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-24 20:45:21 +00:00
Vadim Zeitlin
0eb47013cf Allow passing the URL to open to webview sample on command line.
This makes it simpler to test the sample with other pages and especially local
HTML files.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72201 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-24 20:45:14 +00:00
Vadim Zeitlin
a977376af3 No real changes, just avoid overloaded virtual wxWebView::SetPage().
Instead, have two public non-virtual SetPage() methods forwarding to a private
DoSetPage(), as usual.

This avoids the need for "using wxWebView::SetPage" which is needed to avoid
warnings about hiding the other base class virtual when implementing one of
them and which was forgotten in wxMSW version resulting in warnings when using
g++ to compile it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72200 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-24 20:45:10 +00:00