Commit Graph

50 Commits

Author SHA1 Message Date
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
44f4afd2da Fix, or at least make less common, deadlock in the thread sample.
Don't always deadlock when "Stop the last spawned thread" menu command is
selected. There is still a problem with a race condition which could result in
a crash when dereferencing an invalid pointer, but at least this doesn't
happen all the time, unlike the current bug.

Of course, the real solution would be to properly rewrite the sample to show
how thread deletion should be handled correctly...

See #14891.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73568 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-02-24 13:48:57 +00:00
Vadim Zeitlin
90e95e6117 Rename WXTHREAD_XXX_PRIORITY yo wxPRIORITY_XXX.
This will allow to reuse the same constants for the process priorities in an
upcoming commit.

See #14931.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73405 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-01-20 02:10:07 +00:00
Dimitri Schoolwerth
2d143b6689 Removed ellipsis from "About..." occurrences.
MS and Apple guidelines mention ellipses should generally be used when a command needs additional information from the user before the operation can execute. This is not the case for showing an about dialog so the ellipses have been removed.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70412 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-20 16:51:09 +00:00
Vadim Zeitlin
ee19ab6d80 Use correct format specifier for thread id in the sample.
Thread id is an (unsigned) long, not just unsigned, so use "%lx" to print it
instead of "%x" to avoid asserts in formatting code.

Closes #13404.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-17 10:35:29 +00:00
Václav Slavík
c1b293bb8d Move wxThreadEvent into wxBase.
For this, it cannot derive from wxCommandEvent. Extracted the bits
from wxCommandEvent useful for passing data between threads into
wxEventBasicPayloadMixin helper class shared by both.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68076 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-06-28 17:24:37 +00:00
Vadim Zeitlin
526954c596 Globally use "wxWindows licence" consistently.
Use "wxWindows licence" and not "wxWidgets licence" (the latter doesn't
exist) and consistently spell "licence" using British spelling.

See #12165.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64940 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-13 13:29:13 +00:00
Vadim Zeitlin
3cb332c155 Remove unnecessary mondrian.{ico,xpm} files from samples directory.
Standardize on using sample.rc and sample icon in all the samples, it was
confusing that some of them used it and other didn't, without any apparent
logic.

Remove the now unnecessary icon files, including the dialogs sample icon which
seemed to be corrupted (this closes #11146).

Also replace multiple OS/2 resource files with a single one in the sample
directory. The OS/2 projects/makefiles would need to be updated to use them.

Remove dialogs sample icon.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64645 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-20 17:42:33 +00:00
Vadim Zeitlin
9a83f86094 Globally replace _T() with wxT().
Standardize on using a single macro across all wxWidgets sources and solve the name clash with Sun CC standard headers (see #10660).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61508 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-23 20:30:22 +00:00
Vadim Zeitlin
53ff8df7d5 Make wxLog::EnableLogging() and wxLogNull thread-specific.
Disabling logging in a single thread (even the main one) shouldn't disable
logs from the background threads which should disable their logging themselves
as/if needed.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61423 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-13 13:21:52 +00:00
Vadim Zeitlin
acad886cb4 Add support for thread-specific log targets.
A worker thread can now have its own log target which will be used directly
by the log functions instead of buffering log output in the main thread; the
GUI thread in the thread sample shows how it works.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61422 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-13 11:09:26 +00:00
Vadim Zeitlin
232addd1cd Made wxLogXXX() functions thread-safe.
They can now be called from any thread and will buffer the messages until the
current log target is flushed from the main thread. This makes earlier code to
do the same thing specifically for wxLogWindow unnecessary and also allows to
use wxLogMessage() in the thread sample instead of using manual logging there.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61416 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-12 17:02:30 +00:00
Francesco Montorsi
9425b04cfd fix a couple of drawing defects
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59060 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-20 16:38:48 +00:00
Francesco Montorsi
c1b8f155dc show wxMutexGuiEnter/Leave by drawing into a bitmap from a secondary thread; show the result while it's being created by a MyImageDialog dialog; small cleanup
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59059 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-20 16:07:50 +00:00
Francesco Montorsi
8bf30d0f8b remove MyExecThread: wxExecute can't be called from secondary threads since a long time; give the user the possibility to change the command to run from the main thread and provide sensible defaults for wxMSW and non-wxMSW platforms
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59058 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-20 13:51:00 +00:00
Francesco Montorsi
ff8151c16e minor cleaning: use %p instead of 0x%lx; clear in the menu name which is the thread which is stopped/paused/resumed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59056 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-20 12:45:04 +00:00
Francesco Montorsi
3186fa9107 no real change; just reorder the sample putting all declarations together and all implementations together; move frame construction code in MyFrame ctor; add some comment about TEST_YIELD_RACE_CONDITIONsymbol
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59052 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-20 11:56:43 +00:00
Francesco Montorsi
74d60f66ee add a wxEventType argument to wxThreadEvent for coherency with other event classes; rewrite its Clone() function
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58661 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-04 19:44:55 +00:00
Francesco Montorsi
d48b06bd90 check in the 'selective yield' patch (see ticket #10320):
- implements YieldFor() with event filtering for wxMSW and wxGTK,
  adds TODO markers in other ports;
- replaces wxYield() in GTK's clipboard code with a wxTheApp->YieldFor() call, thus fixing possible reentrancies 
(and modifies clipboard sample to test synchronous IsSupported calls)
- replaces wxYieldIfNeeded() calls in wxProgressDialog with wxTheApp->YieldFor() calls, so that it processes only 
UI/user-input events, thus fixing the race condition visible in the "thread" sample
- documents the new functions


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58654 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-04 17:42:28 +00:00
Francesco Montorsi
d1935bf638 replace wxPostEvent with wxQueueEvent and update the thread sample description (the sample doesn't shows usage of wxMutexGuiEnter/Leave)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57449 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-20 21:29:20 +00:00
Vadim Zeitlin
abbcf16d06 set a global flag on shut down instead calling Delete() on all threads sequentially which could take an eternity if there were many of them
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54021 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-07 16:54:29 +00:00
Vadim Zeitlin
3a105cbc3c do what we advise, not what we say is unsupported: don't log directly from worker threads to wxTextCtrl but do it from the idle handler of the main thread
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54020 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-07 16:39:08 +00:00
Vadim Zeitlin
cd431efcdf fix MSVC /Wp64 warnings
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53804 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-05-28 23:58:15 +00:00
Vadim Zeitlin
45e6e6f8ab call OnInit() from all samples to allow using standard command line options with all of them (patch 1623971)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44354 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-02-04 00:34:18 +00:00
Paul Cornett
b143cf708b 64-bit warning fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41547 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-02 05:36:31 +00:00
Julian Smart
91b073576e Use standard ids
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34525 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-06-02 12:04:48 +00:00
Julian Smart
df31591376 Add sample icon
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32887 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-03-18 10:05:27 +00:00
Vadim Zeitlin
5ac52b5da0 don't run the thread if its creation failed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31643 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-01-29 20:49:14 +00:00
Włodzimierz Skiba
925e9792d3 Warning fixes found under hardest mode of OpenWatcom. Seems clean in Borland, MinGW and DMC.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29684 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-06 20:54:57 +00:00
Włodzimierz Skiba
8520f1374c Fixes for wxUSE_STATUSBAR.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28310 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-07-19 15:36:01 +00:00
Włodzimierz Skiba
bc2ec626ea -1->wxID_ANY, wxDefaultSize, TRUE->true and FALSE->false replacements.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27550 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-06-01 07:45:11 +00:00
Julian Smart
be5a51fb59 More name changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27429 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-25 11:20:37 +00:00
Mattia Barbon
e4f3eb42f2 Compilation fixes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-02-29 15:21:11 +00:00
Mattia Barbon
38d6b9572c Compilation fixes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24278 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-10-23 21:38:31 +00:00
Vadim Zeitlin
4e5bbd4022 terminate child threads in frame dtor, not in OnQuit() (otherwise they're left running if we just close the window)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23786 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-09-21 23:54:47 +00:00
Vadim Zeitlin
963ac8fbf5 fix problems with terminating while threads are running and more (patch 781922)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23782 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-09-21 20:36:07 +00:00
Vadim Zeitlin
0a3d26b81f (Open Watcom but not only) compilation warning fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22571 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-08-04 11:18:02 +00:00
Vadim Zeitlin
3ccae3ba9b added missing Skip() in OnIdle()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21325 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-06-23 19:43:27 +00:00
Julian Smart
2ab25aca26 Removed obsolete wxDate and wxTime classes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19738 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-03-23 20:14:19 +00:00
Ron Lee
12a3f2275c Deprecated wxSizer::Remove( wxWindow* ), s/Remove/Detach/ in most places.
Made wxSizer child list typesafe.  I've not added the wxList implicit
conversion kludge yet, let's see who complains first perhaps..

Deprecated wxSizer::{G,S}etOption in favour of {G,S}etProportion in line
with the parameter name change in the docs.

Added {G,S}etSpacer consistent with the accessors for windows/sizers.

Made all wxSizer index parameters size_t -- we support no sensible
interpretation for negative indexes in them.  Hopefully this will
cause no real problems, but code doing (eg. Remove( 0 )) will need
to change to use 0u to resolve the ambiguity with overloaded members.
This is probably a Good Thing though, ymmv.

s/FALSE/false/g ; s/TRUE/true/g ; s/wxASSERT/wxASSERT_MSG/g in sizer.{cpp,h}

Fixed (I hope) the brokenness in wxSizer::Show -- I have no code to test
this yet, so it's a blind change, but spacers should now be hidden correctly
instead of ignored, and it should be properly reversable over multiple
calls now too.

removed pointless private scoping around DECLARE_CLASS macros.

Replace 0's I added previously with NULL -- not like that will end the
email thread either..

Added Add( wxSizerItem * ) & co.  There are probably a couple of other
places we can usefully do something like this too.  Stopped short of
refactoring everything to raise some issues about sizer method recursion
on -dev.

Updated wxSizer docs some more, they are still incomplete but getting
better.

wrapped KeyCode in wxDEPRECATED, converted all (gtk build) instances
to GetKeyCode.  There may be a few left for other ports.

Fixed a couple of other random compile warnings along the way.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18616 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-01-07 10:22:07 +00:00
Mattia Barbon
ab1ca7b3dd More samples/Unicode fixes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18230 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-12-14 18:13:27 +00:00
Mattia Barbon
aec18ff785 Patch [ 584078 ] Misc samples fixes from Dimitri Schoolwerth
Addresses:
  printf-format warinigs
  indentation/style
  unused variable warnings
  used wxID_ABOUT for about menu entry
  removed references to "minimal sample" in other samples
  some other misc warinigs


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16339 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-08-01 19:12:24 +00:00
Vadim Zeitlin
ffc45b6793 corrections to exiting the program, now we should wait for all threads to finish but not crash nor freeze
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15992 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-07-01 14:55:39 +00:00
Vadim Zeitlin
d1148d2418 tried to fix a race condition in the sample, not sure if I really did it though
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15896 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-06-20 22:25:01 +00:00
Vadim Zeitlin
4fce73fcaf Unicode compilation problems in the samples (patch from Dimitri)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15479 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-05-10 12:26:30 +00:00
Vadim Zeitlin
cd5e929815 test wxExecute() in the sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15116 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-04-12 19:05:11 +00:00
Vadim Zeitlin
a4b5932472 added wxExecute tests and a few other misc additions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14818 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-03-27 17:15:13 +00:00
Mattia Barbon
4693b20c75 Unicode compilation fixes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11661 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2001-09-21 20:21:44 +00:00
Bryan Petty
f6bcfd974e merged 2.2 branch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@7748 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-07-15 19:51:35 +00:00
Ron Lee
c4f02b1fd8 renamed thread sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6714 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2000-03-14 19:35:40 +00:00