Commit Graph

299 Commits

Author SHA1 Message Date
Vadim Zeitlin
5488a1438f Globally replace vadim@wxwindows.org with vadim@wxwidgets.org
The old email address is invalid since many years and shouldn't be used
any longer.

No real changes.
2019-04-22 14:12:05 +02:00
Vadim Zeitlin
5d770e5cbe Use "m_" prefix for wxExecuteData members
No real changes, just rename the members to use the standard prefix
which is more consistent with the rest of wxWidgets and also allows to
avoid both the hacks with "foo_" names for the arguments of some
functions that were used to avoid the conflicts with member "foo" and
at least one remaining shadowing warning for "exitcode".
2019-04-22 14:09:28 +02:00
Vadim Zeitlin
b0c025e9fd Build fix for wxUSE_CONSOLE_EVENTLOOP==0 under Unix
Don't declare GetEventLoopSourcesManager() in Unix wxAppTraits if
console event loops are not used.

See https://github.com/wxWidgets/wxWidgets/pull/953
2018-10-10 19:07:28 +02:00
Vadim Zeitlin
e9ecc6728f Always include X11 headers from the private X11 display header
Commit 28ab24cd55 excluded too much in
wxUSE_DISPLAY==0 case, we still need X11 headers when not using
wxUSE_DISPLAY.
2018-10-10 14:14:48 +02:00
Vadim Zeitlin
28ab24cd55 Add missing wxUSE_DISPLAY check to X11 display header
Don't define functions dealing with video modes etc when
wxUSE_DISPLAY==0.
2018-10-09 15:28:28 +02:00
Vadim Zeitlin
e0ba727dec Extract X11 functions used by wxGTK in a separate header
This makes src/unix/displayx11.cpp almost readable as it's not littered
by "#ifndef __WXGTK20__" checks everywhere any more -- instead this file
is just not compiled as part of wxGTK2 at all any longer (it is still
included in wxGTK1 as well as wxX11 itself and wxMotif).

wxGTK code also can just include the new wx/unix/private/displayx11.h
instead of having to declare all the X11 functions it uses manually.

There should be no changes in behaviour, this is just a clean up.
2018-10-04 17:07:11 +02:00
Vadim Zeitlin
90dd87ee65 Fix wxGTK1 build after wxFont API changes
Implement the new {Get,Set}{FractionalPointSize,NumericWeight} methods.

Also change wxLoadQueryFont() to use wxNativeFontInfo methods as a side
effect, to reduce code duplication and reuse the existing support for
numeric weights and fractional point sizes in wxNativeFontInfo.
2018-09-17 15:24:42 +02:00
Vadim Zeitlin
3ffa651a34 Move wxAdv library contents into wxCore
This basically removes the "adv" library, even though it's still
preserved for compatibility with user make/project files referring to
it.

It is done because the distinction between "adv" and "core" was never
really clear (e.g. why wxTreeCtrl was in core but wxTreeListCtrl in
adv?) and it prevented some core classes from using adv ones.
2018-08-27 21:13:04 +02:00
Vadim Zeitlin
b97ea90f4f Add default value for MakeConfigFileName() 2nd argument
Make it possible to call wxStandardPaths::MakeConfigFileName() without
explicitly specifying the convention to use, to make it conform to the
documentation (previously this only worked when calling the
wxStandardPathsBase version of the method).

Closes #18106.
2018-03-17 17:17:05 +01:00
Vadim Zeitlin
04209e3a3e Remove GetStandardCmdLineOptions() from wxGTK
Unfortunately there is no reasonable way to implement this function for all
glibc versions as the information we need is stored in the private
_GOptionGroup struct whose layout has already changed once (in 2.44) and could
change again, so we can't rely on it.

We really need a g_option_group_get_entries() in glib itself, but the request
to add it at http://bugzilla.gnome.org/show_bug.cgi?id=431021 hasn't been
touched since 10 years, so it seems unlikely to happen.

See 99367a1530 (commitcomment-25789514)
2017-11-22 22:02:36 +01:00
Paul Cornett
65cc4c1624 Avoid ifdef-ed override specification
Instead, add the base class functions so the derived class always
overrides. If/when wxX11 and wxMotif are removed there won't be an
ifdef that no one ever notices isn't needed anymore.
2017-11-12 09:33:37 -08:00
Scott Furry
3653b753d3 Fix clang -Winconsistent-missing-override in wxGLApp
Use "override" for wxGLApp::GetXVisualInfo(), but only for wxGTK2 where
it really overrides it, unlike in wxX11.

Closes #17995.
2017-11-12 17:02:43 +01:00
Vadim Zeitlin
0975228809 Fix build problem with "override" on wxApp::GetXVisualInfo()
This method doesn't override any virtual method in the base class, so
wxOVERRIDE can't be used here.

In fact, this method doesn't seem to be used at all, but keep it for
compatibility and in case we want to use it later, as wxGTK does.
2017-04-26 14:42:38 +02:00
Vadim Zeitlin
5cf9fcbb1a Add wxStandardPaths::ConfigFileConv enum for clarity and safety
Use an enum instead of type-unsafe "int" for the second parameter of the
recently added wxStandardPaths::MakeConfigFileName().

This also avoids unnatural dependency of wxStandardPaths on
wxCONFIG_USE_SUBDIR constant defined in a higher level wxFileConfig class.

No real changes, but just make things a bit more robust and hopefully more
clear.
2017-03-09 17:53:14 +01:00
Martin Koegler
8d5d00db9d Implement MakeConfigFileName 2017-03-08 22:29:55 +01:00
Maarten Bent
87308746be Resolve -Wsuggest-override warnings. 2017-02-24 23:37:44 +01:00
ARATA Mizuki
8cfc74491a Replace wxEXPLICIT with the 'explicit' keyword
See #17655.
2016-09-14 18:45:12 +09:00
Paul Cornett
0bf38e11a3 Cleanup of ad84d9f (r77846)
Remove the unnecessary 'CodePair' struct from a header, make the huge
keySymTab array const, and don't compile it for platforms that don't
use it, it's only used by wxX11
2016-09-07 22:02:05 -07:00
Vadim Zeitlin
4dfde501df Add support for returning item location to wxGTK wxMimeTypesManager.
This is a squash merge of gtk_mimetype branch from
https://github.com/Hanmac/wxWidgets.git with some extra minor cleanup.

Closes https://github.com/wxWidgets/wxWidgets/pull/293
2016-06-07 14:29:52 +02:00
Vadim Zeitlin
4a0938d2b7 Allow "moving" wxX11Display objects
This is not a real move-ctor but std::auto_ptr<>-like "stealing" ctor. It
still allows to pass Display ownership to another function which is all that
is needed for our purposes.
2016-05-23 03:00:49 +02:00
Vadim Zeitlin
e82c619402 Only define wxUSE_XTEST in Unix-specific headers
This symbol is not needed and doesn't make sense in wxMSW.
2016-05-23 03:00:48 +02:00
Troels Knakkergaard
cda7209101 Add wxFileType::GetExpandedCommand()
This new method allows to get the command expanded with the given file name
for commands other than "Open" and "Print".

Closes #17367.
2016-03-05 03:09:59 +01:00
Tobias Taschner
c17202c696 Remove extra handling of wxAppTraits::GetStandardPaths() on OS X.
Since the removal of carbon in 5ba67c67e4 there is no longer any special handling required.
2016-03-04 15:34:51 +01:00
Dimitri Schoolwerth
1e78bf639e Add micro version to toolkit version functions
Support micro versions in wxAppTraits::GetToolkitVersion and
wxPlatformInfo functions related to toolkit versions.
2016-02-29 10:05:43 +01:00
Manuel Martin
bdc95f5766 Improve wxGLCanvas to be more type safe and better support modern OpenGL
Add wxGLAttribsBase, wxGLAttributes and wxGLContextAttrs replacing the old
untyped "int attributes[]".

Don't use global object for creating OpenGL > 3.0 contexts.

Closes #16909.
2016-02-23 00:32:54 +01:00
Hartwig
74a1ec3ead Addition of missing overrides to apptrait.h 2015-11-22 09:28:33 +01:00
Tobias Taschner
a0fb808087 Add wxStandardPaths::GetUserDir() to get Desktop, Download etc
All major supported platforms have well defined per-user directories to store
Downloads, Music, Pictures, Videos and the Desktop files. The new method
wxStandardPaths::GetUserDir() allows for a unified way to access these on MSW,
OS X and Unix (if XDG user dirs specification is implemented for the latter).

See https://github.com/wxWidgets/wxWidgets/pull/89
2015-10-04 01:05:23 +02:00
Paul Cornett
27a8d28029 more use of wxOVERRIDE 2015-09-06 17:20:42 -07:00
Dimitri Schoolwerth
8f8d58d193 Use wx-prefixed macros throughout the repository.
Change {DECLARE,IMPLEMENT}_*CLASS and {DECLARE,BEGIN,END}_EVENT_TABLE
occurrences to use the wx-prefixed version of the macros.
2015-04-23 22:00:35 +04:00
Vadim Zeitlin
ad84d9f97d make wxKeyEvent could get unicode key under x11, add a x11 keysym--unicode char map tab
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77846 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:43:37 +00:00
Vadim Zeitlin
df13791078 Merge wxQT branch into the trunk.
This merges in the latest sources from GSoC 2014 wxQt project with just a few
minor corrections, mostly undoing wrong changes to common files in that branch
(results of a previous bad merge?) and getting rid of whitespace-only changes.
Also remove debug logging from wxGrid.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77455 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-24 01:50:11 +00:00
Vadim Zeitlin
a4606fbb44 Refactor Unix OpenGL code to avoid using static attributes array.
Put the context attributes in wxGLCanvasX11 itself instead.

See #16402.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77073 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-15 12:14:11 +00:00
Vadim Zeitlin
fb99672f62 Hopefully finish removing the old wxCocoa port.
Get rid of the rest of __WXCOCOA__ tests in the sources.

Drop configure option for using it.

Also remove the documentation for this port.

This should have also been part of r76735.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76815 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-03 22:03:21 +00:00
Vadim Zeitlin
2594929d9f Move include/wx/unix/execute.h to include/wx/unix/private.
This header is private and is not supposed to be used from the outside the
library.

See #16325.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76683 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-11 14:55:08 +00:00
Paul Cornett
c1d1a5ad5e build fix for wxUSE_THREADS==0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76309 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-11 04:48:12 +00:00
Paul Cornett
8b4ae731d3 use wxOVERRIDE
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76220 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-30 00:02:23 +00:00
Vadim Zeitlin
f740cc3881 Refactor YieldFor() to avoid code duplication among the ports.
Don't repeat the same code in all the ports, move it to the common base class
and add a new virtual DoYieldFor() for the really port-specific code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76061 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 18:58:00 +00:00
Jouk Jansen
49ea9ebb64 correction on commit 75776
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75782 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-04 07:37:31 +00:00
Jouk Jansen
b09a481c2e synchronizing the definition of wxLoadQueryNearestFont
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75776 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-03 14:06:40 +00:00
Vadim Zeitlin
e91e1e3d5c Use wxGetTranslation() instead of _() in the public headers.
This allows the code in them to compile even when WXINTL_NO_GETTEXT_MACRO is
defined.

Closes #15443.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74812 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-15 00:15:02 +00:00
Vadim Zeitlin
3f66f6a5b3 Remove all lines containing cvs/svn "$Id$" keyword.
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.

If nothing else, this will make an eventual transition to Git simpler.

Closes #14487.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-26 16:02:46 +00:00
Vadim Zeitlin
ccf8bf20ca Fix new wxExecute() code compilation with wxUSE_CONSOLE_EVENTLOOP==0.
Nothing is going to work without the console apps/base traits support for the
event loop but at least make it compile.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74531 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-15 15:14:53 +00:00
Vadim Zeitlin
45c103404c Avoid including pipe stream headers when streams are disabled.
Fixes compilation with wxUSE_STREAMS==0.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74529 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-15 15:14:46 +00:00
Vadim Zeitlin
1f0edb5af0 Don't use wxCriticalSection in wxWakeUpPipeMT if wxUSE_THREADS==0.
In fact, don't define wxWakeUpPipeMT class at all when not using threads.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74513 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-14 11:34:27 +00:00
Vadim Zeitlin
38aae140ac Forbid creation of wxStandardPaths object directly.
This happens to work under MSW and Unix where there is only one
wxStandardPaths class for both the console and the GUI applications but
doesn't return the correct result under OS X where the Core Foundation
version, returned by wxStandardPaths::Get(), has to be used for the GUI
programs. And historically this confused a lot of people, so just ensure that
they can't accidentally create an object of the wrong type any more.

Closes #13537.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74428 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-06 23:14:21 +00:00
Vadim Zeitlin
821d856a61 Rewrite wxExecute() implementation under Unix.
This commit changes wxExecute() to handle SIGCHLD to be notified about the
child process termination instead of detecting when the file descriptor
corresponding to the other end of a pipe opened in the parent process was
closed in the child as this was not reliable and could (and did) result in not
detecting the termination of the child processes that closed all their file
descriptors before exiting.

This commit also removes a lot of platform-specific code duplicating the
generic event loop sources support and reuses it for wxExecute() purposes too.

Final big change is that wxEndProcessData was merged into wxExecuteData and we
don't have two similar but quite different classes any more but just one,
which is used both to pass the information from wxExecute() to wxAppTraits
methods and to store this information until the child termination.

Closes #10258.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74350 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:32:16 +00:00
Vadim Zeitlin
d5ab427f23 Make Unix wxAppConsole signal handling more flexible.
Instead of hardcoding the call to WakeUpIdle() in the signal handler itself,
just wake up the event loop when we catch a signal. This will still result in
WakeUpIdle() being called, before the next event loop iteration, but it will
also allow us to do other things on wakeup from signal as it will be done in
the upcoming wxExecute() changes to support wxEXEC_NOEVENTS in console
applications.

See #10258.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74347 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:31:03 +00:00
Vadim Zeitlin
39bc0168c3 Change wxWakeUpPipe to be a wxEventLoopSourceHandler.
No real changes but use wxEventLoopSource::AddSourceForFD() instead of
wxFDIODispatcher::RegisterFD() for this pipe because this is the preferred way
and because it will allow reusing this class for wxExecute() purposes later.

See #10258.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74346 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:30:39 +00:00
Vadim Zeitlin
cd794127ff Include <fcntl.h> from a header using fcntl().
No real changes, just make the header self-containing instead of relying on
the file including it to include <fcntl.h> itself.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74344 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:29:53 +00:00
Vadim Zeitlin
71e9885be0 Make wxEventLoop::AddSourceForFD() static.
Any event sources should be registered with all the event loops, including the
ones that will be started in the future, and not only the current (and
potentially not even existing yet) one. So make AddSourceForFD() method static.

To still allow it to do different things in console and GUI applications, as
it must, virtualize it via the new wxEventLoopSourcesManager class which has
different implementations in the two cases, returned via wxAppTraits as usual.

Notice that this required moving the implementation of this method from
src/osx/core/evtloop_cf.cpp to src/osx/core/utilsexc_cf.cpp as the former file
is base-only and didn't have access to wxGUIAppTraits.

See #10258.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74341 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:28:42 +00:00