From: Eran I. <no...@so...> - 2014-01-11 17:31:26
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "codelite". The branch, master has been updated via 458fd9ab1b803da992c8042f0a1bcac075c560ff (commit) from 845aa45ee594c4a27ed847fabfe452e6bd650add (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://sourceforge.net/p/codelite/codelitegit/ci/458fd9ab1b803da992c8042f0a1bcac075c560ff commit 458fd9ab1b803da992c8042f0a1bcac075c560ff Author: Eran <era...@gm...> Date: Sat Jan 11 19:31:10 2014 +0200 Git: Use wxStyledTextCtrl for the different git commit/list dialogs diff --git a/git/gitCommitDlg.cpp b/git/gitCommitDlg.cpp index 7bd2308..af5a5d3 100644 --- a/git/gitCommitDlg.cpp +++ b/git/gitCommitDlg.cpp @@ -3,6 +3,8 @@ #include "windowattrmanager.h" #include <wx/tokenzr.h> #include "gitentry.h" +#include "lexer_configuration.h" +#include "editor_config.h" GitCommitDlg::GitCommitDlg(wxWindow* parent, const wxString& repoDir) @@ -18,6 +20,8 @@ GitCommitDlg::GitCommitDlg(wxWindow* parent, const wxString& repoDir) m_splitterMain->SetSashPosition(data.GetGitCommitDlgVSashPos()); WindowAttrManager::Load(this, wxT("GitCommitDlg"), NULL); + LexerConfPtr lex = EditorConfigST::Get()->GetLexer("text"); + lex->Apply(m_stcCommitMessage); } /*******************************************************************************/ @@ -46,10 +50,13 @@ void GitCommitDlg::AppendDiff(const wxString& diff) if(line.StartsWith(wxT("diff"))) { line.Replace(wxT("diff --git a/"), wxT("")); currentFile = line.Left(line.Find(wxT(" "))); + } else if(line.StartsWith(wxT("Binary"))) { m_diffMap[currentFile] = wxT("Binary diff"); + } else { m_diffMap[currentFile].Append(line+wxT("\n")); + } ++index; } @@ -65,14 +72,8 @@ void GitCommitDlg::AppendDiff(const wxString& diff) m_listBox->Select(0); m_editor->SetReadOnly(true); } - - wxFont font(10, wxFONTFAMILY_TELETYPE, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL); - wxTextAttr atr = m_commitMessage->GetDefaultStyle(); - atr.SetFont(font); - m_commitMessage->SetDefaultStyle(atr); - m_commitMessage->SetFont(font); - } + /*******************************************************************************/ wxArrayString GitCommitDlg::GetSelectedFiles() { @@ -86,7 +87,7 @@ wxArrayString GitCommitDlg::GetSelectedFiles() /*******************************************************************************/ wxString GitCommitDlg::GetCommitMessage() { - wxString msg = m_commitMessage->GetValue(); + wxString msg = m_stcCommitMessage->GetText(); msg.Replace(wxT("\""),wxT("\\\"")); return msg; } @@ -102,7 +103,7 @@ void GitCommitDlg::OnChangeFile(wxCommandEvent& e) void GitCommitDlg::OnCommitOK(wxCommandEvent& event) { - if ( m_commitMessage->GetValue().IsEmpty() ) { + if ( m_stcCommitMessage->GetText().IsEmpty() ) { ::wxMessageBox(_("Git requires a commit message"), "codelite", wxICON_WARNING|wxOK|wxCENTER); return; } diff --git a/git/gitCommitListDlg.cpp b/git/gitCommitListDlg.cpp index 7a94e64..6b53874 100644 --- a/git/gitCommitListDlg.cpp +++ b/git/gitCommitListDlg.cpp @@ -31,7 +31,10 @@ GitCommitListDlg::GitCommitListDlg(wxWindow* parent, const wxString& workingDir, if ( lex ) { lex->Apply( m_stcDiff, true ); } - + + LexerConfPtr textLex = EditorConfigST::Get()->GetLexer("text"); + textLex->Apply( m_stcCommitMessage, true ); + clConfig conf("git.conf"); GitEntry data; conf.ReadItem(&data); @@ -87,13 +90,10 @@ void GitCommitListDlg::OnChangeFile(wxCommandEvent& e) void GitCommitListDlg::OnProcessTerminated(wxCommandEvent &event) { ProcessEventData* ped = (ProcessEventData*)event.GetClientData(); - delete ped; - - if ( m_process ) - delete m_process; - m_process = NULL; + wxDELETE(ped); + wxDELETE(m_process); - m_commitMessage->Clear(); + m_stcCommitMessage->ClearAll(); m_fileListBox->Clear(); m_diffMap.clear(); m_commandOutput.Replace(wxT("\r"), wxT("")); @@ -103,15 +103,19 @@ void GitCommitListDlg::OnProcessTerminated(wxCommandEvent &event) unsigned index = 0; wxString currentFile; while(index < diffList.GetCount()) { + wxString line = diffList[index]; if(line.StartsWith(wxT("diff"))) { line.Replace(wxT("diff --git a/"), wxT("")); currentFile = line.Left(line.Find(wxT(" "))); foundFirstDiff = true; + } else if(line.StartsWith(wxT("Binary"))) { m_diffMap[currentFile] = wxT("Binary diff"); + } else if(!foundFirstDiff) { - m_commitMessage->AppendText(line+wxT("\n")); + m_stcCommitMessage->AppendText(line+wxT("\n")); + } else { m_diffMap[currentFile].Append(line+wxT("\n")); } @@ -121,7 +125,7 @@ void GitCommitListDlg::OnProcessTerminated(wxCommandEvent &event) m_fileListBox->Append((*it).first); } m_stcDiff->SetReadOnly(false); - m_stcDiff->SetText(wxT("")); + m_stcDiff->ClearAll(); if(m_diffMap.size() != 0) { std::map<wxString,wxString>::iterator it=m_diffMap.begin(); diff --git a/git/gitui.cpp b/git/gitui.cpp index 64f7f90..90b0d96 100644 --- a/git/gitui.cpp +++ b/git/gitui.cpp @@ -132,18 +132,17 @@ GitSettingsDlgBase::GitSettingsDlgBase(wxWindow* parent, wxWindowID id, const wx boxSizer766->Add(m_checkBoxTrackTree, 0, wxALL, 5); - wxBoxSizer* bSizer3 = new wxBoxSizer(wxHORIZONTAL); + m_stdBtnSizer284 = new wxStdDialogButtonSizer(); - mainSizer->Add(bSizer3, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5); + mainSizer->Add(m_stdBtnSizer284, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5); - m_buttonOk = new wxButton(this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize(-1, -1), 0); - m_buttonOk->SetDefault(); + m_button286 = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0); + m_button286->SetDefault(); + m_stdBtnSizer284->AddButton(m_button286); - bSizer3->Add(m_buttonOk, 0, wxALL, 5); - - m_buttonCancel = new wxButton(this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize(-1, -1), 0); - - bSizer3->Add(m_buttonCancel, 0, wxALL, 5); + m_button288 = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0); + m_stdBtnSizer284->AddButton(m_button288); + m_stdBtnSizer284->Realize(); m_treebook230->ExpandNode( 0, true ); m_treebook230->ExpandNode( 1, true ); @@ -159,7 +158,6 @@ GitSettingsDlgBase::GitSettingsDlgBase(wxWindow* parent, wxWindowID id, const wx m_textCtrlLocalName->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(GitSettingsDlgBase::OnLocalRepoUI), NULL, this); m_staticText258->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(GitSettingsDlgBase::OnLocalRepoUI), NULL, this); m_textCtrlLocalEmail->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(GitSettingsDlgBase::OnLocalRepoUI), NULL, this); - m_buttonOk->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GitSettingsDlgBase::OnOK), NULL, this); } @@ -169,7 +167,6 @@ GitSettingsDlgBase::~GitSettingsDlgBase() m_textCtrlLocalName->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(GitSettingsDlgBase::OnLocalRepoUI), NULL, this); m_staticText258->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(GitSettingsDlgBase::OnLocalRepoUI), NULL, this); m_textCtrlLocalEmail->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(GitSettingsDlgBase::OnLocalRepoUI), NULL, this); - m_buttonOk->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GitSettingsDlgBase::OnOK), NULL, this); } @@ -240,24 +237,55 @@ GitCommitDlgBase::GitCommitDlgBase(wxWindow* parent, wxWindowID id, const wxStri bSizer13->Add(m_staticText8, 0, wxALL|wxALIGN_LEFT, 5); - m_commitMessage = new wxTextCtrl(m_panel4, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1, -1), wxTE_WORDWRAP|wxTE_RICH2|wxTE_MULTILINE); - wxFont m_commitMessageFont(10, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxT("Sans")); - m_commitMessage->SetFont(m_commitMessageFont); + m_stcCommitMessage = new wxStyledTextCtrl(m_panel4, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxBORDER_THEME); + // Configure the fold margin + m_stcCommitMessage->SetMarginType (4, wxSTC_MARGIN_SYMBOL); + m_stcCommitMessage->SetMarginMask (4, wxSTC_MASK_FOLDERS); + m_stcCommitMessage->SetMarginSensitive(4, true); + m_stcCommitMessage->SetMarginWidth (4, 0); - bSizer13->Add(m_commitMessage, 1, wxALL|wxEXPAND, 5); + // Configure the tracker margin + m_stcCommitMessage->SetMarginWidth(1, 0); - wxBoxSizer* bSizer5 = new wxBoxSizer(wxHORIZONTAL); + // Configure the symbol margin + m_stcCommitMessage->SetMarginType (2, wxSTC_MARGIN_SYMBOL); + m_stcCommitMessage->SetMarginMask (2, ~(wxSTC_MASK_FOLDERS)); + m_stcCommitMessage->SetMarginWidth(2, 0); + m_stcCommitMessage->SetMarginSensitive(2, true); - bSizer4->Add(bSizer5, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5); + // Configure the line numbers margin + m_stcCommitMessage->SetMarginType(0, wxSTC_MARGIN_NUMBER); + m_stcCommitMessage->SetMarginWidth(0,0); - m_button5 = new wxButton(this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize(-1, -1), 0); - m_button5->SetDefault(); + // Configure the line symbol margin + m_stcCommitMessage->SetMarginType(3, wxSTC_MARGIN_FORE); + m_stcCommitMessage->SetMarginMask(3, 0); + m_stcCommitMessage->SetMarginWidth(3,0); + // Select the lexer + m_stcCommitMessage->SetLexer(wxSTC_LEX_NULL); + // Set default font / styles + m_stcCommitMessage->StyleClearAll(); + m_stcCommitMessage->SetWrapMode(0); + m_stcCommitMessage->SetIndentationGuides(0); + m_stcCommitMessage->SetKeyWords(0, wxT("")); + m_stcCommitMessage->SetKeyWords(1, wxT("")); + m_stcCommitMessage->SetKeyWords(2, wxT("")); + m_stcCommitMessage->SetKeyWords(3, wxT("")); + m_stcCommitMessage->SetKeyWords(4, wxT("")); - bSizer5->Add(m_button5, 0, wxALL, 5); + bSizer13->Add(m_stcCommitMessage, 1, wxALL|wxEXPAND, 5); - m_button6 = new wxButton(this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize(-1, -1), 0); + m_stdBtnSizer278 = new wxStdDialogButtonSizer(); - bSizer5->Add(m_button6, 0, wxALL, 5); + bSizer4->Add(m_stdBtnSizer278, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5); + + m_buttonOK = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0); + m_buttonOK->SetDefault(); + m_stdBtnSizer278->AddButton(m_buttonOK); + + m_buttonCancel = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0); + m_stdBtnSizer278->AddButton(m_buttonCancel); + m_stdBtnSizer278->Realize(); SetSizeHints(-1,-1); if ( GetSizer() ) { @@ -266,14 +294,14 @@ GitCommitDlgBase::GitCommitDlgBase(wxWindow* parent, wxWindowID id, const wxStri Centre(wxBOTH); // Connect events m_listBox->Connect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(GitCommitDlgBase::OnChangeFile), NULL, this); - m_button5->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GitCommitDlgBase::OnCommitOK), NULL, this); + m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GitCommitDlgBase::OnCommitOK), NULL, this); } GitCommitDlgBase::~GitCommitDlgBase() { m_listBox->Disconnect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(GitCommitDlgBase::OnChangeFile), NULL, this); - m_button5->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GitCommitDlgBase::OnCommitOK), NULL, this); + m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GitCommitDlgBase::OnCommitOK), NULL, this); } @@ -307,7 +335,7 @@ GitCommitListDlgBase::GitCommitListDlgBase(wxWindow* parent, wxWindowID id, cons m_dvListCtrlCommitList = new wxDataViewListCtrl(m_splitterPage178, wxID_ANY, wxDefaultPosition, wxSize(500,-1), wxDV_ROW_LINES|wxDV_SINGLE); - boxSizer205->Add(m_dvListCtrlCommitList, 1, wxALL|wxEXPAND, 5); + boxSizer205->Add(m_dvListCtrlCommitList, 1, wxALL|wxEXPAND, 2); m_dvListCtrlCommitList->AppendTextColumn(_("Commit"), wxDATAVIEW_CELL_INERT, 150, wxALIGN_LEFT); m_dvListCtrlCommitList->AppendTextColumn(_("Author"), wxDATAVIEW_CELL_INERT, 100, wxALIGN_LEFT); @@ -348,7 +376,7 @@ GitCommitListDlgBase::GitCommitListDlgBase(wxWindow* parent, wxWindowID id, cons wxArrayString m_fileListBoxArr; m_fileListBox = new wxListBox(m_splitterPage200, wxID_ANY, wxDefaultPosition, wxSize(-1, -1), m_fileListBoxArr, 0); - boxSizer208->Add(m_fileListBox, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5); + boxSizer208->Add(m_fileListBox, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 2); m_splitterPage204 = new wxPanel(m_splitter196, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL); m_splitter196->SplitVertically(m_splitterPage200, m_splitterPage204, 0); @@ -360,7 +388,7 @@ GitCommitListDlgBase::GitCommitListDlgBase(wxWindow* parent, wxWindowID id, cons boxSizer215->Add(m_staticText217, 0, wxALL, 5); - m_stcDiff = new wxStyledTextCtrl(m_splitterPage204, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), 0); + m_stcDiff = new wxStyledTextCtrl(m_splitterPage204, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxBORDER_THEME); // Configure the fold margin m_stcDiff->SetMarginType (4, wxSTC_MARGIN_SYMBOL); m_stcDiff->SetMarginMask (4, wxSTC_MASK_FOLDERS); @@ -396,7 +424,7 @@ GitCommitListDlgBase::GitCommitListDlgBase(wxWindow* parent, wxWindowID id, cons m_stcDiff->SetKeyWords(3, wxT("")); m_stcDiff->SetKeyWords(4, wxT("")); - boxSizer215->Add(m_stcDiff, 1, wxALL|wxEXPAND, 5); + boxSizer215->Add(m_stcDiff, 1, wxALL|wxEXPAND, 2); m_splitterPage194 = new wxPanel(m_splitter186, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL); m_splitter186->SplitHorizontally(m_splitterPage190, m_splitterPage194, 100); @@ -408,18 +436,52 @@ GitCommitListDlgBase::GitCommitListDlgBase(wxWindow* parent, wxWindowID id, cons boxSizer218->Add(m_staticText220, 0, wxALL, 5); - m_commitMessage = new wxTextCtrl(m_splitterPage194, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), wxTE_RICH2|wxTE_MULTILINE); + m_stcCommitMessage = new wxStyledTextCtrl(m_splitterPage194, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxBORDER_THEME); + // Configure the fold margin + m_stcCommitMessage->SetMarginType (4, wxSTC_MARGIN_SYMBOL); + m_stcCommitMessage->SetMarginMask (4, wxSTC_MASK_FOLDERS); + m_stcCommitMessage->SetMarginSensitive(4, true); + m_stcCommitMessage->SetMarginWidth (4, 0); - boxSizer218->Add(m_commitMessage, 1, wxALL|wxEXPAND, 5); + // Configure the tracker margin + m_stcCommitMessage->SetMarginWidth(1, 0); - wxBoxSizer* boxSizer224 = new wxBoxSizer(wxHORIZONTAL); + // Configure the symbol margin + m_stcCommitMessage->SetMarginType (2, wxSTC_MARGIN_SYMBOL); + m_stcCommitMessage->SetMarginMask (2, ~(wxSTC_MASK_FOLDERS)); + m_stcCommitMessage->SetMarginWidth(2, 0); + m_stcCommitMessage->SetMarginSensitive(2, true); - bSizer17->Add(boxSizer224, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5); + // Configure the line numbers margin + m_stcCommitMessage->SetMarginType(0, wxSTC_MARGIN_NUMBER); + m_stcCommitMessage->SetMarginWidth(0,0); - m_button226 = new wxButton(this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize(-1,-1), 0); - m_button226->SetDefault(); + // Configure the line symbol margin + m_stcCommitMessage->SetMarginType(3, wxSTC_MARGIN_FORE); + m_stcCommitMessage->SetMarginMask(3, 0); + m_stcCommitMessage->SetMarginWidth(3,0); + // Select the lexer + m_stcCommitMessage->SetLexer(wxSTC_LEX_NULL); + // Set default font / styles + m_stcCommitMessage->StyleClearAll(); + m_stcCommitMessage->SetWrapMode(0); + m_stcCommitMessage->SetIndentationGuides(0); + m_stcCommitMessage->SetKeyWords(0, wxT("")); + m_stcCommitMessage->SetKeyWords(1, wxT("")); + m_stcCommitMessage->SetKeyWords(2, wxT("")); + m_stcCommitMessage->SetKeyWords(3, wxT("")); + m_stcCommitMessage->SetKeyWords(4, wxT("")); + + boxSizer218->Add(m_stcCommitMessage, 1, wxALL|wxEXPAND, 2); + + m_stdBtnSizer290 = new wxStdDialogButtonSizer(); - boxSizer224->Add(m_button226, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5); + bSizer17->Add(m_stdBtnSizer290, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5); + + m_button292 = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxSize(-1, -1), 0); + m_button292->SetDefault(); + m_stdBtnSizer290->AddButton(m_button292); + m_stdBtnSizer290->Realize(); SetSizeHints(-1,-1); if ( GetSizer() ) { @@ -431,7 +493,7 @@ GitCommitListDlgBase::GitCommitListDlgBase(wxWindow* parent, wxWindowID id, cons m_dvListCtrlCommitList->Connect(wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler(GitCommitListDlgBase::OnSelectionChanged), NULL, this); m_dvListCtrlCommitList->Connect(wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU, wxDataViewEventHandler(GitCommitListDlgBase::OnContextMenu), NULL, this); m_fileListBox->Connect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(GitCommitListDlgBase::OnChangeFile), NULL, this); - m_button226->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GitCommitListDlgBase::OnOK), NULL, this); + m_button292->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GitCommitListDlgBase::OnOK), NULL, this); } @@ -441,7 +503,7 @@ GitCommitListDlgBase::~GitCommitListDlgBase() m_dvListCtrlCommitList->Disconnect(wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler(GitCommitListDlgBase::OnSelectionChanged), NULL, this); m_dvListCtrlCommitList->Disconnect(wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU, wxDataViewEventHandler(GitCommitListDlgBase::OnContextMenu), NULL, this); m_fileListBox->Disconnect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(GitCommitListDlgBase::OnChangeFile), NULL, this); - m_button226->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GitCommitListDlgBase::OnOK), NULL, this); + m_button292->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GitCommitListDlgBase::OnOK), NULL, this); } @@ -516,6 +578,256 @@ GitDiffDlgBase::~GitDiffDlgBase() } +gitCloneDlgBaseClass::gitCloneDlgBaseClass(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) + : wxDialog(parent, id, title, pos, size, style) +{ + if ( !bBitmapLoaded ) { + // We need to initialise the default bitmap handler + wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler); + wxCrafterpca4kKInitBitmapResources(); + bBitmapLoaded = true; + } + + wxBoxSizer* boxSizer17 = new wxBoxSizer(wxVERTICAL); + this->SetSizer(boxSizer17); + + wxFlexGridSizer* flexGridSizer21 = new wxFlexGridSizer(0, 2, 0, 0); + flexGridSizer21->SetFlexibleDirection( wxBOTH ); + flexGridSizer21->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + flexGridSizer21->AddGrowableCol(1); + + boxSizer17->Add(flexGridSizer21, 1, wxALL|wxEXPAND, 5); + + m_staticText22 = new wxStaticText(this, wxID_ANY, _("Clone URL:"), wxDefaultPosition, wxSize(-1,-1), 0); + + flexGridSizer21->Add(m_staticText22, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); + + m_textCtrlURL = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0); + m_textCtrlURL->SetToolTip(_("git URL to clone")); + + flexGridSizer21->Add(m_textCtrlURL, 0, wxALL|wxEXPAND, 5); + + m_staticText24 = new wxStaticText(this, wxID_ANY, _("Target Directory:"), wxDefaultPosition, wxSize(-1,-1), 0); + + flexGridSizer21->Add(m_staticText24, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); + + m_dirPickerTargetDir = new wxDirPickerCtrl(this, wxID_ANY, wxEmptyString, wxT("Select a folder"), wxDefaultPosition, wxSize(-1,-1), wxDIRP_DEFAULT_STYLE|wxDIRP_DIR_MUST_EXIST); + m_dirPickerTargetDir->SetToolTip(_("Clone the sources into this target directory")); + + flexGridSizer21->Add(m_dirPickerTargetDir, 0, wxALL|wxEXPAND, 5); + + flexGridSizer21->Add(0, 0, 0, wxALL, 5); + + m_checkBoxUseLogin = new wxCheckBox(this, wxID_ANY, _("Use login credentials:"), wxDefaultPosition, wxSize(-1,-1), 0); + m_checkBoxUseLogin->SetValue(false); + + flexGridSizer21->Add(m_checkBoxUseLogin, 0, wxALL|wxALIGN_LEFT, 5); + + m_staticText28 = new wxStaticText(this, wxID_ANY, _("Username:"), wxDefaultPosition, wxSize(-1,-1), 0); + + flexGridSizer21->Add(m_staticText28, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); + + m_textCtrlUsername = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), 0); + + flexGridSizer21->Add(m_textCtrlUsername, 0, wxALL|wxEXPAND, 5); + + m_staticText30 = new wxStaticText(this, wxID_ANY, _("Password:"), wxDefaultPosition, wxSize(-1,-1), 0); + + flexGridSizer21->Add(m_staticText30, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); + + m_textCtrlPassword = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(-1,-1), wxTE_PASSWORD); + + flexGridSizer21->Add(m_textCtrlPassword, 0, wxALL|wxEXPAND, 5); + + wxBoxSizer* boxSizer18 = new wxBoxSizer(wxHORIZONTAL); + + boxSizer17->Add(boxSizer18, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5); + + m_buttonOK = new wxButton(this, wxID_OK, _("&OK"), wxDefaultPosition, wxSize(-1,-1), 0); + m_buttonOK->SetDefault(); + + boxSizer18->Add(m_buttonOK, 0, wxALL, 5); + + m_button20 = new wxButton(this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxSize(-1,-1), 0); + + boxSizer18->Add(m_button20, 0, wxALL, 5); + + SetSizeHints(500,-1); + if ( GetSizer() ) { + GetSizer()->Fit(this); + } + Centre(wxBOTH); + // Connect events + m_staticText28->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(gitCloneDlgBaseClass::OnUseCredentialsUI), NULL, this); + m_textCtrlUsername->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(gitCloneDlgBaseClass::OnUseCredentialsUI), NULL, this); + m_staticText30->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(gitCloneDlgBaseClass::OnUseCredentialsUI), NULL, this); + m_textCtrlPassword->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(gitCloneDlgBaseClass::OnUseCredentialsUI), NULL, this); + m_buttonOK->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(gitCloneDlgBaseClass::OnOKUI), NULL, this); + +} + +gitCloneDlgBaseClass::~gitCloneDlgBaseClass() +{ + m_staticText28->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(gitCloneDlgBaseClass::OnUseCredentialsUI), NULL, this); + m_textCtrlUsername->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(gitCloneDlgBaseClass::OnUseCredentialsUI), NULL, this); + m_staticText30->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(gitCloneDlgBaseClass::OnUseCredentialsUI), NULL, this); + m_textCtrlPassword->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(gitCloneDlgBaseClass::OnUseCredentialsUI), NULL, this); + m_buttonOK->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(gitCloneDlgBaseClass::OnOKUI), NULL, this); + +} + +GitFileDiffDlgBase::GitFileDiffDlgBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) + : wxDialog(parent, id, title, pos, size, style) +{ + if ( !bBitmapLoaded ) { ... 4707 lines suppressed ... hooks/post-receive -- codelite |