Commit Graph

59801 Commits

Author SHA1 Message Date
Vadim Zeitlin
3f84cb17ca Add wxActivityIndicator control.
This is a simple animated control indicating some program activity.

Provide native GTK+ (for > 2.20) and OS X implementations as well as a generic
one used under MSW.

Update the sample and the documentation.
2015-03-20 00:08:37 +01:00
Vadim Zeitlin
00748bbaef Add wxWindow::FromDIP() for simpler high DPI support.
This method allows to scale a pixel value by a DPI-dependent factor to the
value used by the underlying toolkit only if necessary, i.e. when not using
GTK+ 3 or OS X which already do this internally.
2015-03-20 00:08:37 +01:00
Vadim Zeitlin
bc492a9e6e Make wxWindow::GetContentScaleFactor() useful for non-OSX platforms.
Return the ration of the current DPI to the standard one to allow using this
function to scale pixel values for the current screen resolution.
2015-03-20 00:08:37 +01:00
Vadim Zeitlin
6448fa074a Allow choosing the widget variant in the widgets sample.
Add a menu for selecting wxWindowVariant to use for the widget.
2015-03-20 00:08:37 +01:00
Vadim Zeitlin
3c033d0c13 No changes, just convert another file to Unix EOLs.
One bakefile used DOS EOLs (and hard TABs) for some reason, convert it.
2015-03-20 00:05:25 +01:00
Vadim Zeitlin
f1cc587a99 Mark MSVS *.props files as using CR LF as well.
For consistency with *.vcxproj and *.sln.
2015-03-19 21:46:05 +01:00
Vadim Zeitlin
3ee12b2ca9 Convert all XPM files to Unix EOLs.
Just as the normal sources (*.h, *.cpp), these files should be using LF and
not CR LF.
2015-03-19 21:46:05 +01:00
Vadim Zeitlin
6ed1d71bd1 Convert a few files from DOS to Unix EOLs.
There is no reason for using CR LF for these files, convert them to LF.
2015-03-19 21:45:38 +01:00
Vadim Zeitlin
3c59f46b64 Convert even more CRLF files to use LF in the git repository.
Somehow more files appear as modified now, after fixing "all" of them in the
previous commit. Convert these files as well. Will there be more in the next
clone?
2015-03-19 21:15:11 +01:00
Vadim Zeitlin
4c72988c82 Convert really all CRLF files to use LF in the git repository.
This completes the changes of c3e5751c36.
2015-03-19 21:09:08 +01:00
Vadim Zeitlin
05a0f97caf Bracket MacNewFile() with __WXMAC__ checks in the docview sample.
This fixes compilation in C++11 mode: "override" results in an error on
non-Mac platforms because this method doesn't exist there and so can't be
overridden.

Closes #16903.
2015-03-19 16:42:17 +01:00
Vadim Zeitlin
0e2d9e539c Fix wxGenericListCtrl autosizing after deleting all its items.
Set bNeedsUpdate flag for all columns even when the control is already empty,
this ensures that things will work if more items are added to it later.

See #10326.
2015-03-19 16:38:36 +01:00
Vadim Zeitlin
c3e5751c36 Convert all CRLF files to use LF to fix git confusion.
Having CRLF files in the repository with eol=crlf breaks just about
everything, e.g. any rebase/merge involving these files would fail.
Try to fix this by making sure the files use LF in the repository and CRLF is
only used in the working copy.
2015-03-19 15:10:48 +01:00
Vadim Zeitlin
44e3c50839 Compilation fix for wxGTK3 after PangoFontFace fix.
Bracket the changes of 54e653d044 with a glib
version check: g_type_ensure() is only available in 2.34+.

See #16820.
2015-03-19 14:49:00 +01:00
Vadim Zeitlin
29ac7ed687 Update clean_patch script to work with git diffs.
They use a prefix by default and so filtering out e.g. autoconf_inc.m4 didn't
work any more, we need to filter out a/autoconf_inc.m4 instead.
2015-03-19 13:32:40 +01:00
Artur Wieczorek
fad1ec7ce8 Determine whether a new element is added to the list in wxPGArrayEditorDialog when its editing is started.
New element can be added to the list not only by clicking "New item" button but also by clicking under the last element of the list and we need to determine its index in both cases because it is used later on in wxPGArrayEditorDialog::OnEndLabelEdit event handler.

Closes #16905.
2015-03-18 19:04:29 +01:00
Vadim Zeitlin
e46d9da243 Minor updates to text/EOL git attributes.
Use slashes, not backslashes, in the paths.

Use "auto" for all text files under docs/msw as all of them could be opened in
Notepad.

Also use Unix EOLs for configure.in (and not just for configure).
2015-03-18 00:00:18 +01:00
Vadim Zeitlin
4f846f72de Don't attempt using <type_traits> with g++ 4.9.2 in C++98 mode.
g++ 4.9.2 added support of __has_include() but, unlike clang, refuses to
compile the <type_traits> header that is detected as existing now in C++98
mode, so the build was broken with it when not using configure (i.e. under
MSW).

Fix this by, first, testing for C++11 compilers separately (which seems like a
good idea anyhow as it will allow using these headers with other compilers)
and, second, not trusting g++ __has_include() for C++11 headers in C++98 mode.
2015-03-17 23:55:46 +01:00
Vadim Zeitlin
088b3be208 Extend the example with custom controls in wxFileDialog in the sample.
Test using wxTextCtrl in the sample too to demonstrate that currently we need
to get the text contents from the event handler, retrieving it once the dialog
closes doesn't work, at least under MSW.
2015-03-17 23:55:46 +01:00
Bryan Petty
dd4c208148 Update release scripts and docs to reflect .gitattributes use.
It is no longer required to use svn-find-native-eols.pl now that
.gitattributes are in place to ensure correct EOLs in various files.

Closes #15584
2015-03-17 13:47:43 -06:00
Bryan Petty
164d5dbb37 Sync EOL normalization settings.
This reflects additions to .gitattributes in last commit.

See #15584
2015-03-17 13:47:20 -06:00
Bryan Petty
988bc7c718 Migration of svn:eol-style settings to .gitattributes.
See #15584
2015-03-17 13:46:46 -06:00
Vadim Zeitlin
645853b2dc Correct the description of WXK_RETURN handling in wxTextCtrl.
This key is not used for navigating between the controls (like WXK_TAB) any
longer, but only for activating the default button.
2015-03-17 13:52:28 +01:00
Artur Wieczorek
35379a9633 Set layout direction of wxComboBox edit control only if it exists.
Doesn't update layout direction of edit control if wxComboBox is in read-only
mode because editor control doesn't exist in this case.
2015-03-13 19:31:32 +01:00
Vadim Zeitlin
6b84e6e1b9 Slightly improve out of memory handling in wxMemoryBuffer.
Reset not only m_data but also m_size and m_len to 0 if we run out of memory.

Closes #4500.
2015-03-13 16:58:37 +01:00
Vadim Zeitlin
5a44f8ea70 Don't use wxLog from wxWakeUpMainThread() in wxMSW.
This can result in infinite recursion as wxLog calls wxWakeUpIdle() which
calls wxWakeUpMainThread() again if PostThreadMessage() fails.

See #16841.
2015-03-12 16:36:48 +01:00
Scott Talbert
54e653d044 Ensure the PangoFontFace type is loaded.
This works around problems with using wxFontDialog from wxPython.

Closes #16820.
2015-03-12 14:02:48 +01:00
Steve Browne
7f0963dcf7 Implement wxWindow::Disable() for non-native controls in wxOSX.
Previously disabling generic window simply didn't do anything.

Fix this by explicitly refusing to generate mouse/keyboard events for it.

Closes #13155.
2015-03-12 13:37:17 +01:00
Richard Broker
009abf22b7 Also avoid inheriting std{out,err} pipes in wxMSW wxExecute().
Fix possible deadlock in the child which would happen if it continued to
produce output after the parent, that used wxExecute() with IO redirection to
launch it, exits.

Do this by preventing the child from inheriting the read ends of the standard
output and error pipes, just as it was already done for the write end of the
standard input pipe.

Closes #16898.
2015-03-12 13:29:09 +01:00
Richard Broker
a934346614 Use SetHandleInformation() to make handle non-inheritable in wxMSW.
Simplify the code in wxExecute() by using SetHandleInformation() to make the
handle non-inheritable instead of duplicating it to achieve the same goal (the
old code worked under Windows 9x too, unlike the new one, but we don't care
about them any more).

See #16898.
2015-03-12 13:29:01 +01:00
Steve Browne
96a8240e87 Fix toggling of radio tools in wxOSX wxToolBar.
Always call NSButton::setState(), even when using native toolbar.

Closes #16662.
2015-03-12 13:08:39 +01:00
Vadim Zeitlin
b8f6cb417c Fix PCH-less build after the last commit.
Add missing wx/log.h inclusion.
2015-03-11 23:53:59 +01:00
Kinaou Hervé
de7e315557 Correct implement wxLIST_AUTOSIZE_XXX in the generic wxListCtrl.
Use both the contents and the header width when wxLIST_AUTOSIZE_USEHEADER is
given instead of just the latter.

Also make both wxLIST_AUTOSIZE_USEHEADER and the previously implemented
wxLIST_AUTOSIZE work efficiently for the virtual list controls by reusing
wxMaxWidthCalculatorBase already used in the generic wxDataViewCtrl.

Closes #10326.
2015-03-11 22:03:14 +01:00
Vadim Zeitlin
fa1c3ecfa6 Factor out wxMaxWidthCalculatorBase from wxDataViewCtrl code.
This will allow reusing it elsewhere, notably in the generic wxListCtrl.

See #10326.
2015-03-11 22:03:14 +01:00
Jouk
1682000241 Add addremovectrl.cpp to OpenVMS makefile 2015-03-11 15:47:54 +01:00
Vadim Zeitlin
fe33cfc83f Add wxProcess::Activate() and implement it for MSW.
When launching child processes it can be convenient to be able to switch to
them later, provide a method in wxProcess to do it.

Currently this is only implemented in wxMSW but could almost certainly be done
for wxOSX too (it can be done using Apple Script, so presumably there is a way
to do it programmatically as well) and could be also made to work at least
under some Unix systems by emulating what wmctrl does (or just launching it?).
2015-03-10 20:31:24 +01:00
Jouk
d161a74f67 Update OpenVMS setup-file 2015-03-10 12:51:06 +01:00
Vadim Zeitlin
bcacb4467e Make wxLogGui::Flush() exception safe.
Don't suspend the logs forever if showing the log dialog throws an exception
(this is unlikely but may happen when running unattended GUI tests or using
the dialog hooks throwing exceptions for any other purpose).
2015-03-09 19:41:50 +01:00
Vadim Zeitlin
7048b7ec4a No changes, just remove an unused variable from the widgets sample.
Thanks clang for the warning.
2015-03-08 16:28:22 +01:00
Vadim Zeitlin
a4f536547b Define __WXGTK220__ in configure and improve checks for GTK+ version.
Use AC_CACHE_CHECK() to avoid recompiling the test program(s) every time
configure runs and also simplify the checks. This required renaming
ac_wxgtkXXX to wx_cv_gtkXXX (cached variables must have "cv" in them).

Also make the checks more logical, by simply setting wx_cv_gtkXXX if
wx_cv_gtkYYY is set with XXX < YYY.

Finally, and the real reason for these changes, add test for __WXGTK220__
which will be used by the upcoming commits to check whether GtkSpinner is
available.
2015-03-08 16:28:22 +01:00
Vadim Zeitlin
90920ca83c Remove mentions of __WXGTK26__ which is never used any longer.
We require GTK+ 2.6 since r72001, so it doesn't make sense to check whether we
have it -- and in fact we didn't check for it anywhere any more.
2015-03-08 16:28:22 +01:00
Vadim Zeitlin
7653edb34d Avoid blank alpha and graphics screens in the drawing sample.
It was confusing to not see anything when selecting one of the screens using
wxGraphicsRenderer if a renderer hadn't been selected from the menu before.

Switch to using wxGC automatically now if one of these screens selected and
there was no previously selected renderer.
2015-03-08 16:28:22 +01:00
Václav Slavík
6b8b3ee379 Only use NSCriticalAlertStyle for serious questions
Don't use NSCriticalAlertStyle for wxICON_WARNING unconditionally, this
was a violation of the OS X guidelines. According to the hig HIG,
NSCriticalAlertStyle (aka caution icon) is only appropriate in rare
cases and only if the user is performing a task that might result in the
inadvertent and unexpected destruction of data.

It therefore doesn't make sense to use it for information warnings, but
only for _questions_, and so NSCriticalAlertStyle is only used if a
combination of wxICON_WARNING with either wxYES_NO or wxCANCEL is used.
2015-03-07 16:15:51 +01:00
Václav Slavík
94fc40b7ea Make semantic wxICON_XXX styles the canonical ones
Make wxICON_WARNING and wxICON_ERROR the primary constants for their
purpose and define their visual Windows-based synonyms wxICON_HAND and
wxICON_EXCLAMATION in terms of the semantic ones, instead of the other
way around.
2015-03-07 16:15:51 +01:00
Vadim Zeitlin
1b61975fba Avoid refreshing not currently visible items in generic wxListCtrl.
This is useless at best and resulted in GTK+ warnings because we ended up
(somehow -- is there another bug lurking here?) with negative items height in
this case.

Closes #16862.
2015-03-02 14:36:13 +01:00
Vadim Zeitlin
b7388f36f2 Change wxFD_MULTIPLE value to avoid conflict with wxDIALOG_NO_PARENT.
This avoids GTK+ warnings about creating a dialog without parent when a
wxFileDialog with wxFD_MULTIPLE style is created.

Closes #16863.
2015-03-02 14:32:53 +01:00
Vadim Zeitlin
3bec79d71c Fix harmless warning about implicit double to char conversion.
Round the double value before passing it to wxColour::Set() instead of relying
on the implicit conversion which is dangerous and correctly flagged as such by
g++.
2015-03-01 02:05:28 +01:00
Artur Wieczorek
2f239930eb Avoid consecutive calls of wxVariant::GetType() in the multiple-branch conditional statements.
This is a minor optimization since wxVariant::GetType() is not a simple inline getter method.
2015-02-28 16:37:07 +01:00
Bryan Petty
3fb1827c93 Merge pull request #19 from lanurmi/spelling-fix-occurrrrrrrr
Fix spelling of occur* in random files.
2015-02-27 12:06:28 -07:00
Artur Wieczorek
5068dddb17 Remove obsolete comments regarding wxPGEditor::CreateControls.
Constants which are mentioned in the comment are not used since r76882.
2015-02-26 19:29:05 +01:00