SvnCommitDialog::SvnCommitDialog(wxWindow* parent, const wxArrayString &paths, const wxString &url, Subversion2 *plugin, const wxString &repoPath) : SvnCommitDialogBaseClass(parent) , m_plugin(plugin) , m_url(url) , m_repoPath(repoPath) , m_process(NULL) { m_stcDiff->SetReadOnly(true); wxString title = GetTitle(); title << wxT(" - ") << url; SetTitle(title); for (size_t i=0; i<paths.GetCount(); i++) { int index = m_checkListFiles->Append(paths.Item(i)); m_checkListFiles->Check((unsigned int)index); } wxArrayString lastMessages, previews; m_plugin->GetCommitMessagesCache().GetMessages(lastMessages, previews); for(size_t i=0; i<previews.GetCount(); i++) { m_choiceMessages->Append(previews.Item(i), new CommitMessageStringData(lastMessages.Item(i))); } if ( !paths.IsEmpty() ) { m_checkListFiles->Select(0); DoShowDiff(0); } WindowAttrManager::Load(this, wxT("SvnCommitDialog"), m_plugin->GetManager()->GetConfigTool()); int sashPos = m_plugin->GetSettings().GetCommitDlgSashPos(); if ( sashPos != wxNOT_FOUND ) { m_splitterH->SetSashPosition(sashPos); } int sashHPos = m_plugin->GetSettings().GetCommitDlgHSashPos(); if ( sashHPos != wxNOT_FOUND ) { m_splitterV->SetSashPosition(sashHPos); } LexerConfPtr diffLexer = EditorConfigST::Get()->GetLexer("Diff"); if ( diffLexer ) { m_stcDiff->SetLexer(wxSTC_LEX_DIFF); diffLexer->Apply( m_stcDiff ); } LexerConfPtr textLexer = EditorConfigST::Get()->GetLexer("text"); if ( textLexer ) { textLexer->Apply( m_stcMessage ); } }
SvnCommitDialog::SvnCommitDialog( wxWindow* parent, const wxArrayString& paths, const wxString& url, Subversion2* plugin, const wxString& repoPath) : SvnCommitDialogBaseClass(parent) , m_plugin(plugin) , m_url(url) , m_repoPath(repoPath) , m_process(NULL) { Bind(wxEVT_ASYNC_PROCESS_OUTPUT, &SvnCommitDialog::OnProcessOutput, this); Bind(wxEVT_ASYNC_PROCESS_TERMINATED, &SvnCommitDialog::OnProcessTerminatd, this); m_stcDiff->SetReadOnly(true); wxString title = GetTitle(); title << wxT(" - ") << url; SetTitle(title); for(size_t i = 0; i < paths.GetCount(); i++) { int index = m_checkListFiles->Append(paths.Item(i)); m_checkListFiles->Check((unsigned int)index); } if(!paths.IsEmpty()) { m_checkListFiles->Select(0); DoShowDiff(0); } SetName("SvnCommitDialog"); WindowAttrManager::Load(this); int sashPos = m_plugin->GetSettings().GetCommitDlgSashPos(); if(sashPos != wxNOT_FOUND) { m_splitterH->SetSashPosition(sashPos); } int sashHPos = m_plugin->GetSettings().GetCommitDlgHSashPos(); if(sashHPos != wxNOT_FOUND) { m_splitterV->SetSashPosition(sashHPos); } LexerConf::Ptr_t diffLexer = EditorConfigST::Get()->GetLexer("Diff"); if(diffLexer) { m_stcDiff->SetLexer(wxSTC_LEX_DIFF); diffLexer->Apply(m_stcDiff); } LexerConf::Ptr_t textLexer = EditorConfigST::Get()->GetLexer("text"); if(textLexer) { textLexer->Apply(m_stcMessage); } }
void SvnCommitDialog::OnFileSelected(wxCommandEvent& event) { DoShowDiff( event.GetSelection() ); }