Exemple #1
0
BOOL CTreePropSheet::SetPageIcon(CPropertyPage *pPage, CImageList &Images, int nImage)
{
	HICON	hIcon = Images.ExtractIcon(nImage);
	if (!hIcon)
		return FALSE;

	return SetPageIcon(pPage, hIcon);
}
Exemple #2
0
BOOL CTreePropSheet::SetPageIcon(CPropertyPage *pPage, UINT unIconId)
{
	HICON	hIcon = AfxGetApp()->LoadIcon(unIconId);
	if (!hIcon)
		return FALSE;

	return SetPageIcon(pPage, hIcon);
}
void CSettings::AddPropPages()
{
	m_pMainPage = new CSetMainPage();
	m_pOverlayPage = new CSetOverlayPage();
	m_pOverlaysPage = new CSetOverlayIcons();
	m_pOverlayHandlersPage = new CSetOverlayHandlers();
	m_pProxyPage = new CSetProxyPage();
	m_pProgsDiffPage = new CSettingsProgsDiff();
	m_pProgsMergePage = new CSettingsProgsMerge();
	m_pProgsAlternativeEditor = new CSettingsProgsAlternativeEditor();
	m_pLookAndFeelPage = new CSetLookAndFeelPage();

	m_pExtMenu	= new CSetExtMenu();

	m_pDialogsPage = new CSetDialogs();
	m_pColorsPage = new CSettingsColors();
    m_pColorsPage2 = new CSettingsColors2();
    m_pColorsPage3 = new CSettingsColors3();
	m_pSavedPage = new CSetSavedDataPage();
	m_pHooksPage = new CSetHooks();
	m_pBugTraqPage = new CSetBugTraq();
	m_pTBlamePage = new CSettingsTBlame();
	m_pGitConfig = new CSettingGitConfig();
	m_pGitRemote = new CSettingGitRemote(m_CmdPath.GetWinPath());
	m_pBugtraqConfig = new CSettingsBugtraqConfig(m_CmdPath.GetWinPath());
	m_pAdvanced = new CSettingsAdvanced();

	SetPageIcon(m_pExtMenu,m_pExtMenu->GetIconID());

	SetPageIcon(m_pMainPage, m_pMainPage->GetIconID());
	SetPageIcon(m_pOverlayPage, m_pOverlayPage->GetIconID());
	SetPageIcon(m_pOverlaysPage, m_pOverlaysPage->GetIconID());
	SetPageIcon(m_pOverlayHandlersPage, m_pOverlayHandlersPage->GetIconID());
	SetPageIcon(m_pProxyPage, m_pProxyPage->GetIconID());
	SetPageIcon(m_pProgsDiffPage, m_pProgsDiffPage->GetIconID());
	SetPageIcon(m_pProgsMergePage, m_pProgsMergePage->GetIconID());
	SetPageIcon(m_pProgsAlternativeEditor, m_pProgsAlternativeEditor->GetIconID());
	SetPageIcon(m_pLookAndFeelPage, m_pLookAndFeelPage->GetIconID());
	SetPageIcon(m_pDialogsPage, m_pDialogsPage->GetIconID());
	SetPageIcon(m_pColorsPage, m_pColorsPage->GetIconID());
    SetPageIcon(m_pColorsPage2, m_pColorsPage2->GetIconID());
    SetPageIcon(m_pColorsPage3, m_pColorsPage3->GetIconID());

	SetPageIcon(m_pSavedPage, m_pSavedPage->GetIconID());
	SetPageIcon(m_pHooksPage, m_pHooksPage->GetIconID());

	SetPageIcon(m_pGitConfig, m_pGitConfig->GetIconID());
	SetPageIcon(m_pGitRemote, m_pGitRemote->GetIconID());
	SetPageIcon(m_pBugTraqPage, m_pBugTraqPage->GetIconID());
	SetPageIcon(m_pBugtraqConfig, m_pBugtraqConfig->GetIconID());
	SetPageIcon(m_pTBlamePage, m_pTBlamePage->GetIconID());
	SetPageIcon(m_pAdvanced, m_pAdvanced->GetIconID());

	AddPage(m_pMainPage);
	AddPage(m_pOverlayPage);
	AddPage(m_pOverlaysPage);
	AddPage(m_pOverlayHandlersPage);
	AddPage(m_pProxyPage);
	AddPage(m_pProgsDiffPage);
	AddPage(m_pProgsMergePage);
	AddPage(m_pLookAndFeelPage);
	AddPage(m_pExtMenu);
	AddPage(m_pDialogsPage);
	AddPage(m_pColorsPage);
	AddPage(m_pColorsPage2);
	AddPage(m_pColorsPage3);
	AddPage(m_pProgsAlternativeEditor);
	AddPage(m_pSavedPage);

	AddPage(m_pGitConfig);

	if (g_GitAdminDir.HasAdminDir(this->m_CmdPath.GetWinPath()) || g_GitAdminDir.IsBareRepo(this->m_CmdPath.GetWinPath()))
	{
		AddPage(m_pGitRemote);
	}
	AddPage(m_pHooksPage);
	AddPage(m_pBugTraqPage);
	if (g_GitAdminDir.HasAdminDir(this->m_CmdPath.GetWinPath()))
	{
		AddPage(m_pBugtraqConfig);
	}
	AddPage(m_pTBlamePage);
	AddPage(m_pAdvanced);
}
Exemple #4
0
void CSettings::AddPropPages()
{
	m_pMainPage = new CSetMainPage();
	m_pOverlayPage = new CSetOverlayPage();
	m_pOverlaysPage = new CSetOverlayIcons();
	m_pOverlayHandlersPage = new CSetOverlayHandlers();
	m_pProxyPage = new CSetProxyPage();
	m_pSMTPPage = new CSettingSMTP();
	m_pProgsDiffPage = new CSettingsProgsDiff();
	m_pProgsMergePage = new CSettingsProgsMerge();
	m_pProgsAlternativeEditor = new CSettingsProgsAlternativeEditor();
	m_pLookAndFeelPage = new CSetLookAndFeelPage();

	m_pExtMenu	= new CSetExtMenu();

	m_pDialogsPage = new CSetDialogs();
	m_pDialogsPage2 = new CSetDialogs2();
	m_pDialogsPage3 = new CSetDialogs3();
	m_pColorsPage = new CSettingsColors();
	m_pColorsPage2 = new CSettingsColors2();
	m_pColorsPage3 = new CSettingsColors3();
	m_pSavedPage = new CSetSavedDataPage();
	m_pHooksPage = new CSetHooks();
	m_pBugTraqPage = new CSetBugTraq();
	m_pTBlamePage = new CSettingsTBlame();
	m_pGitConfig = new CSettingGitConfig();
	m_pGitRemote = new CSettingGitRemote();
	m_pGitCredential = new CSettingGitCredential();
	m_pBugtraqConfig = new CSettingsBugtraqConfig();
	m_pUDiffPage = new CSettingsUDiff();
	m_pAdvanced = new CSettingsAdvanced();

	SetPageIcon(m_pExtMenu,m_pExtMenu->GetIconID());

	SetPageIcon(m_pMainPage, m_pMainPage->GetIconID());
	SetPageIcon(m_pOverlayPage, m_pOverlayPage->GetIconID());
	SetPageIcon(m_pOverlaysPage, m_pOverlaysPage->GetIconID());
	SetPageIcon(m_pOverlayHandlersPage, m_pOverlayHandlersPage->GetIconID());
	SetPageIcon(m_pProxyPage, m_pProxyPage->GetIconID());
	SetPageIcon(m_pSMTPPage, m_pSMTPPage->GetIconID());
	SetPageIcon(m_pProgsDiffPage, m_pProgsDiffPage->GetIconID());
	SetPageIcon(m_pProgsMergePage, m_pProgsMergePage->GetIconID());
	SetPageIcon(m_pProgsAlternativeEditor, m_pProgsAlternativeEditor->GetIconID());
	SetPageIcon(m_pLookAndFeelPage, m_pLookAndFeelPage->GetIconID());
	SetPageIcon(m_pDialogsPage, m_pDialogsPage->GetIconID());
	SetPageIcon(m_pDialogsPage2, m_pDialogsPage2->GetIconID());
	SetPageIcon(m_pDialogsPage3, m_pDialogsPage3->GetIconID());
	SetPageIcon(m_pColorsPage, m_pColorsPage->GetIconID());
	SetPageIcon(m_pColorsPage2, m_pColorsPage2->GetIconID());
	SetPageIcon(m_pColorsPage3, m_pColorsPage3->GetIconID());

	SetPageIcon(m_pSavedPage, m_pSavedPage->GetIconID());
	SetPageIcon(m_pHooksPage, m_pHooksPage->GetIconID());

	SetPageIcon(m_pGitConfig, m_pGitConfig->GetIconID());
	SetPageIcon(m_pGitRemote, m_pGitRemote->GetIconID());
	SetPageIcon(m_pGitCredential, m_pGitCredential->GetIconID());
	SetPageIcon(m_pBugTraqPage, m_pBugTraqPage->GetIconID());
	SetPageIcon(m_pBugtraqConfig, m_pBugtraqConfig->GetIconID());
	SetPageIcon(m_pTBlamePage, m_pTBlamePage->GetIconID());
	SetPageIcon(m_pUDiffPage, m_pUDiffPage->GetIconID());
	SetPageIcon(m_pAdvanced, m_pAdvanced->GetIconID());

	AddPage(m_pMainPage);
	AddPage(m_pGitConfig);
	AddPage(m_pHooksPage);
	AddPage(m_pOverlayPage);
	AddPage(m_pOverlaysPage);
	AddPage(m_pOverlayHandlersPage);
	AddPage(m_pProxyPage);
	AddPage(m_pSMTPPage);
	AddPage(m_pProgsDiffPage);
	AddPage(m_pProgsMergePage);
	AddPage(m_pLookAndFeelPage);
	AddPage(m_pExtMenu);
	AddPage(m_pDialogsPage);
	AddPage(m_pDialogsPage2);
	AddPage(m_pDialogsPage3);
	AddPage(m_pColorsPage);
	AddPage(m_pColorsPage2);
	AddPage(m_pColorsPage3);
	AddPage(m_pProgsAlternativeEditor);
	AddPage(m_pSavedPage);

	CString repo = g_Git.m_CurrentDir;
	bool hasLocalRepo = GitAdminDir::IsWorkingTreeOrBareRepo(repo);
	if (hasLocalRepo)
	{
		AddPage(m_pGitRemote);
	}
	AddPage(m_pGitCredential);
	AddPage(m_pBugTraqPage);
	if (hasLocalRepo)
	{
		AddPage(m_pBugtraqConfig);
	}
	AddPage(m_pTBlamePage);
	AddPage(m_pUDiffPage);
	AddPage(m_pAdvanced);
}