예제 #1
0
void CBtDld_General::OnChoosefolder()
{
	CString str = "";
	GetDlgItemText (IDC_SAVEIN, str);

	if ((GetFileAttributes (str) & FILE_ATTRIBUTE_DIRECTORY) == 0)
	{
		char sz [MY_MAX_PATH];
		fsGetPath (str, sz);
		str = sz;
	}

	if (str.GetLength () > 3 &&
			(str [str.GetLength () - 1] == '\\' || str [str.GetLength () - 1] == '/'))
	{
		str.GetBuffer (0) [str.GetLength () - 1] = 0;
		str.ReleaseBuffer ();
	}
	
	CFolderBrowser *fb = CFolderBrowser::Create (LS (L_CHOOSEOUTFOLDER), str, NULL, this);
	if (fb == NULL)
		return;

	for (size_t i = 0; i < m_pvDlds->size (); i++)
		m_pvDlds->at (i)->pMgr->MoveToFolder (fb->GetPath ());

	ReadSavedIn ();
}
void CDownloaderProperties_NewDownloadPage::OnSetgrpsfldr() 
{
	CFolderBrowser *fb = CFolderBrowser::Create (LS (L_CHOOSEOUTFOLDER), 
		_DldsGrps.FindGroup (GRP_OTHER_ID)->strOutFolder, NULL, this);
	if (fb == NULL)
		return;

	CString str = fb->GetPath ();
	if (str.Right (1) != '\\')
		str += '\\';

	if (MessageBox (LS (L_ALLGRPSFLDRSWBCHANGEDTOTHISFLDR), NULL, MB_YESNO) == IDNO)
		return;

	for (size_t i = 0; i < _DldsGrps.GetTotalCount (); i++) {
		_DldsGrps.GetGroup (i)->strOutFolder = str;
		_DldsGrps.GetGroup (i)->setDirty();
		
	}

	
	
	
	
}
예제 #3
0
BOOL fsOpNetIntegrationMgr::IsNetscapePluginInstalled(BOOL bQueryPluginDirIfUnknown)
{
	if (m_strNetPath == "")
	{
		Initialize ();
		if (m_strNetPath.GetLength ())
			return IsNetscapePluginInstalled (bQueryPluginDirIfUnknown);

		if (bQueryPluginDirIfUnknown == FALSE)
			return FALSE;

		if (MessageBox (NULL, LS (L_CANTFINDNETSCAPEDIR), vmsFdmAppMgr::getAppName (), MB_ICONEXCLAMATION|MB_YESNO) == IDNO)
			return FALSE;

		CFolderBrowser *fb = CFolderBrowser::Create (LS (L_CHOOSEOUTFOLDER), NULL, NULL, NULL);
		if (fb == NULL)
			return FALSE;

		m_strNetPath = fb->GetPath ();
		if (m_strNetPath [m_strNetPath.GetLength () - 1] != '\\' || m_strNetPath [m_strNetPath.GetLength () - 1] != '/')
			m_strNetPath += '\\';
		if (strnicmp (LPCSTR (m_strNetPath)  + m_strNetPath.GetLength () - 8, "Plugins\\", 8))
			m_strNetPath += "Plugins\\";
	}

	CString str = m_strNetPath;
	str += "npfdm.dll";
	if (GetFileAttributes (str) == DWORD (-1))
		return FALSE;
	else
		return TRUE;
}
예제 #4
0
void CDownloads_Groups::OnSetGroupsRootFolder() 
{
	CFolderBrowser *fb = CFolderBrowser::Create (LS (L_SELECTGRPSROOTFLDR), 
		_DldsGrps.GetGroupsRootOutFolder (), NULL, this);
	if (fb == NULL)
		return;
	_DldsGrps.SetGroupsRootOutFolder (fb->GetPath ());
}
예제 #5
0
파일: GroupDlg.cpp 프로젝트: naroya/fdm
void CGroupDlg::OnChoosefolder() 
{
	CString str = "";
	GetDlgItemText (IDC_GRPFOLDER, str);

	if (str.GetLength () > 3 && (str [str.GetLength () - 1] == '\\' || str [str.GetLength () - 1] == '/'))
		str.GetBuffer (0) [str.GetLength () - 1] = 0;

	CFolderBrowser *fb = CFolderBrowser::Create (LS (L_CHOOSEGRPFLDR), str, NULL, this);
	if (fb == NULL)
		return;

	SetDlgItemText (IDC_GRPFOLDER, fb->GetPath ());	
	m_bPathChanged = TRUE;
}
예제 #6
0
void CDlg_UnpackSettings::OnBrowse() 
{
	CString str = "";
	GetDlgItemText (IDC_DSTFOLDER, str);

	if (str.GetLength () > 3 && (str [str.GetLength () - 1] == '\\' || str [str.GetLength () - 1] == '/'))
		str.GetBuffer (0) [str.GetLength () - 1] = 0;

	CFolderBrowser *fb = CFolderBrowser::Create (LS (L_CHOOSEOUTFOLDER), str, NULL, this);
	if (fb == NULL)
		return;

	SetDlgItemText (IDC_DSTFOLDER, fb->GetPath ());
	GetDlgItem (IDC_DSTFOLDER)->SetFocus ();	
}
void CDlg_Options_General_Misc_Advanced::OnBrowse() 
{
	CString str;
	GetDlgItemText (IDC_FOLDER, str);
	
	if (str.GetLength () > 3 && (str [str.GetLength () - 1] == '\\' || str [str.GetLength () - 1] == '/'))
		str.GetBuffer (0) [str.GetLength () - 1] = 0;
	
	CFolderBrowser *fb = CFolderBrowser::Create (LS (L_CHOOSEOUTFOLDER), str, NULL, this);
	if (fb == NULL)
		return;
	
	SetDlgItemText (IDC_FOLDER, fb->GetPath ());
	GetDlgItem (IDC_FOLDER)->SetFocus ();	
}
void CCreateDownloadFromTorrentFileDlg::OnChoosefolder() 
{
	CString str = "";
	GetDlgItemText (IDC_OUTFOLDER, str);

	if (str.GetLength () > 3 && (str [str.GetLength () - 1] == '\\' || str [str.GetLength () - 1] == '/'))
		str.GetBuffer (0) [str.GetLength () - 1] = 0;

	CFolderBrowser *fb = CFolderBrowser::Create (LS (L_CHOOSEOUTFOLDER), str, NULL, this);
	if (fb == NULL)
		return;

	SetDlgItemText (IDC_OUTFOLDER, fb->GetPath ());
	GetDlgItem (IDC_OUTFOLDER)->SetFocus ();	
}