Exemplo n.º 1
0
void SubversionView::OnLinkEditor(wxCommandEvent& event)
{
	SvnSettingsData ssd = m_plugin->GetSettings();
	if(event.IsChecked())
		ssd.SetFlags(ssd.GetFlags() | SvnLinkEditor);
	else
		ssd.SetFlags(ssd.GetFlags() & ~SvnLinkEditor);
	
	m_plugin->SetSettings(ssd);
	
	DoLinkEditor();
}
Exemplo n.º 2
0
void SvnPreferencesDialog::OnButtonOK(wxCommandEvent& event)
{
    event.Skip();

    SvnSettingsData ssd;
    ssd.SetExternalDiffViewer(m_textCtrlDiffViewer->GetValue());
    ssd.SetIgnoreFilePattern(m_textCtrlIgnorePattern->GetValue());
    ssd.SetSshClient(m_textCtrlSSHClient->GetValue());
    ssd.SetSshClientArgs(m_textCtrlSshClientArgs->GetValue());
    ssd.SetExecutable(m_textCtrlSvnExecutable->GetValue());
    ssd.SetRevisionMacroName(m_textCtrlMacroName->GetValue());

    // Link Editor flag is not set via this dialog
    // so read its current value before adding the other
    // flags
    size_t flags(0);
    if(m_plugin->GetSettings().GetFlags() & SvnLinkEditor) flags = SvnLinkEditor;

    if(m_checkBoxAddToSvn->IsChecked()) {
        flags |= SvnAddFileToSvn;
    }

    if(m_checkBoxRetag->IsChecked()) {
        flags |= SvnRetagWorkspace;
    }

    if(m_checkBoxUseExternalDiff->IsChecked()) {
        flags |= SvnUseExternalDiff;
    }

    if(m_checkBoxExposeRevisionMacro->IsChecked()) {
        flags |= SvnExposeRevisionMacro;
    }

    if(m_checkBoxRenameFile->IsChecked()) {
        flags |= SvnRenameFileInRepo;
    }

    if(m_checkBoxUsePosixLocale->IsChecked()) {
        flags |= SvnUsePosixLocale;
    }

    ssd.SetFlags(flags);
    m_plugin->SetSettings(ssd);
}