void CRemoteViewHeader::OnStateChange(CState* pState, enum t_statechange_notifications notification, const wxString&, const void*) { wxASSERT(notification == STATECHANGE_REMOTE_DIR); (void)notification; m_path = pState->GetRemotePath(); if (m_path.empty()) { m_pComboBox->SetValue(_T("")); Disable(); } else { const CServer* const pServer = pState->GetServer(); if (pServer && *pServer != m_lastServer) { m_pComboBox->Clear(); m_recentDirectories.clear(); m_lastServer = *pServer; } Enable(); #ifdef __WXGTK__ GetParent()->m_dirtyTabOrder = true; #endif AddRecentDirectory(m_path.GetPath()); } }
void CLocalViewHeader::OnStateChange(CState* pState, enum t_statechange_notifications notification, const wxString& data, const void* data2) { wxASSERT(notification == STATECHANGE_LOCAL_DIR); #ifdef __WXGTK__ m_autoCompletionText = _T(""); #endif wxString dir = pState->GetLocalDir().GetPath(); AddRecentDirectory(dir); }
void CRemoteViewHeader::OnStateChange(CState* pState, enum t_statechange_notifications notification, const wxString& data, const void* data2) { wxASSERT(notification == STATECHANGE_REMOTE_DIR); m_path = pState->GetRemotePath(); if (m_path.IsEmpty()) { m_pComboBox->SetValue(_T("")); m_pComboBox->Disable(); } else { const CServer* const pServer = pState->GetServer(); if (pServer && *pServer != m_lastServer) { m_pComboBox->Clear(); m_recentDirectories.clear(); m_lastServer = *pServer; } m_pComboBox->Enable(); AddRecentDirectory(m_path.GetPath()); } }