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());
	}
}
Пример #2
0
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);
}
Пример #3
0
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());
	}
}