Exemplo n.º 1
0
GitSettingsDlg::GitSettingsDlg(wxWindow* parent, const wxString& localRepoPath)
    : GitSettingsDlgBase(parent)
    , m_localRepoPath(localRepoPath)
{
    GitEntry data;
    data.Load();

    m_pathGIT->SetPath(data.GetGITExecutablePath());
    m_pathGITK->SetPath(data.GetGITKExecutablePath());
    m_checkBoxLog->SetValue(data.GetFlags() & GitEntry::Git_Verbose_Log);
    m_checkBoxTerminal->SetValue(data.GetFlags() & GitEntry::Git_Show_Terminal);
    m_checkBoxTrackTree->SetValue(data.GetFlags() & GitEntry::Git_Colour_Tree_View);

    GitEntry::GitProperties props = GitEntry::ReadGitProperties(m_localRepoPath);

    m_textCtrlGlobalEmail->ChangeValue(props.global_email);
    m_textCtrlGlobalName->ChangeValue(props.global_username);
    m_textCtrlLocalEmail->ChangeValue(props.local_email);
    m_textCtrlLocalName->ChangeValue(props.local_username);
    
    SetName("GitSettingsDlg");
    WindowAttrManager::Load(this);
}