]> git.saurik.com Git - wxWidgets.git/commit
Allow creating wxSingleInstanceChecker with default name.
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 16 Sep 2009 12:38:00 +0000 (12:38 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 16 Sep 2009 12:38:00 +0000 (12:38 +0000)
commit956b3d92ef079324cd880ddcc321291195130d5f
tree53cef632c46994e440cc7f3f216028ab482e8e01
parent3c3ead1d1513a5eb79091a604f4e42b45d1bdf5d
Allow creating wxSingleInstanceChecker with default name.

This makes it easier to use in common cases: there is no need to come up with
a unique name for the checker any more as sufficiently unique combination of
wxApp::GetAppName() and wxGetUserId() is used if no name was explicitly given.

This is done by calling the new CreateDefault() on demand from
IsAnotherRunning() instead of simply creating the checker with the default
name in the default ctor for compatibility (you had to call Create() after
using the default ctor before and it can only be called once) and because
wxTheApp might not exist yet when wxSingleInstanceChecker is created.

Closes #11166.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61945 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
include/wx/snglinst.h
interface/wx/snglinst.h
src/msw/snglinst.cpp
src/os2/snglinst.cpp
src/unix/snglinst.cpp