minor bug fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4151 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -228,11 +228,15 @@ public:
|
||||
{
|
||||
m_DupMan = dupman;
|
||||
}
|
||||
void Disconnect(void) { m_DupMan = NULL; }
|
||||
void OnTerminate(int WXUNUSED(pid), int WXUNUSED(status)) const
|
||||
{
|
||||
if(m_DupMan)
|
||||
{
|
||||
m_DupMan->m_DialProcess = NULL;
|
||||
m_DupMan->CheckStatus(TRUE);
|
||||
}
|
||||
}
|
||||
private:
|
||||
wxDialUpManagerImpl *m_DupMan;
|
||||
};
|
||||
@@ -240,7 +244,7 @@ private:
|
||||
|
||||
wxDialUpManagerImpl::wxDialUpManagerImpl()
|
||||
{
|
||||
m_IsOnline = -1; // unknown
|
||||
m_IsOnline = -2; // -1 or -2, unknown
|
||||
m_DialProcess = NULL;
|
||||
m_timer = NULL;
|
||||
m_CanUseIfconfig = -1; // unknown
|
||||
@@ -257,7 +261,11 @@ wxDialUpManagerImpl::wxDialUpManagerImpl()
|
||||
wxDialUpManagerImpl::~wxDialUpManagerImpl()
|
||||
{
|
||||
if(m_timer) delete m_timer;
|
||||
if(m_DialProcess) m_DialProcess->Detach();
|
||||
if(m_DialProcess)
|
||||
{
|
||||
m_DialProcess->Disconnect();
|
||||
m_DialProcess->Detach();
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
@@ -373,7 +381,7 @@ wxDialUpManagerImpl::CheckStatus(bool fromAsync) const
|
||||
( /* non-const */ (wxDialUpManagerImpl *)this)->CheckStatusInternal();
|
||||
|
||||
// now send the events as appropriate:
|
||||
if(m_IsOnline != oldIsOnline && oldIsOnline != -1)
|
||||
if(m_IsOnline != oldIsOnline && m_IsOnline != -1 && oldIsOnline != -2) // -2: first time!
|
||||
{
|
||||
wxDialUpEvent event(m_IsOnline, ! fromAsync);
|
||||
(void)wxTheApp->ProcessEvent(event);
|
||||
|
Reference in New Issue
Block a user