//////////////////////////////////////////////////////////////////////
// This file was auto-generated by codelite's wxCrafter Plugin
// wxCrafter project file: gitui.wxcp
// Do not modify this file by hand!
//////////////////////////////////////////////////////////////////////

#include "gitui.h"

// Declare the bitmap loading function
extern void wxCrafterpca4kKInitBitmapResources();

namespace
{
// return the wxBORDER_SIMPLE that matches the current application theme
wxBorder get_border_simple_theme_aware_bit()
{
#if wxVERSION_NUMBER >= 3300 && defined(__WXMSW__)
    return wxSystemSettings::GetAppearance().IsDark() ? wxBORDER_SIMPLE : wxBORDER_STATIC;
#else
    return wxBORDER_DEFAULT;
#endif
} // DoGetBorderSimpleBit
bool bBitmapLoaded = false;
} // namespace

GitSettingsDlgBase::GitSettingsDlgBase(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* mainSizer = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(mainSizer);

    m_treebook230 = new wxTreebook(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(300, -1)), wxBK_DEFAULT);
    m_treebook230->SetName(wxT("m_treebook230"));

    mainSizer->Add(m_treebook230, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_panel232 = new wxPanel(m_treebook230, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_treebook230, wxSize(-1, -1)),
                             wxTAB_TRAVERSAL);
    m_treebook230->AddPage(m_panel232, _("Tools"), true, wxNOT_FOUND);

    wxBoxSizer* boxSizer240 = new wxBoxSizer(wxVERTICAL);
    m_panel232->SetSizer(boxSizer240);

    wxFlexGridSizer* fgSizer11 = new wxFlexGridSizer(0, 2, 0, 0);
    fgSizer11->SetFlexibleDirection(wxBOTH);
    fgSizer11->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
    fgSizer11->AddGrowableCol(1);

    boxSizer240->Add(fgSizer11, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText42 = new wxStaticText(m_panel232, wxID_ANY, _("Git executable:"), wxDefaultPosition,
                                      wxDLG_UNIT(m_panel232, wxSize(-1, -1)), 0);

    fgSizer11->Add(m_staticText42, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_pathGIT = new wxFilePickerCtrl(m_panel232, wxID_ANY, wxEmptyString, _("Select a file"), wxT("*"),
                                     wxDefaultPosition, wxDLG_UNIT(m_panel232, wxSize(-1, -1)),
                                     wxFLP_DEFAULT_STYLE | wxFLP_USE_TEXTCTRL | wxFLP_SMALL);

    fgSizer11->Add(m_pathGIT, 0, wxALL | wxEXPAND | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_staticText54 = new wxStaticText(m_panel232, wxID_ANY, _("Gitk executable:"), wxDefaultPosition,
                                      wxDLG_UNIT(m_panel232, wxSize(-1, -1)), 0);

    fgSizer11->Add(m_staticText54, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_pathGITK = new wxFilePickerCtrl(m_panel232, wxID_ANY, wxEmptyString, _("Select a file"), wxT("*"),
                                      wxDefaultPosition, wxDLG_UNIT(m_panel232, wxSize(-1, -1)),
                                      wxFLP_DEFAULT_STYLE | wxFLP_USE_TEXTCTRL | wxFLP_SMALL);

    fgSizer11->Add(m_pathGITK, 0, wxALL | wxEXPAND | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_staticText355 = new wxStaticText(m_panel232, wxID_ANY, _("Git Shell command:"), wxDefaultPosition,
                                       wxDLG_UNIT(m_panel232, wxSize(-1, -1)), 0);

    fgSizer11->Add(m_staticText355, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_textCtrlGitShell =
        new wxTextCtrl(m_panel232, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panel232, wxSize(-1, -1)), 0);
#if wxVERSION_NUMBER >= 3000
    m_textCtrlGitShell->SetHint(wxT(""));
#endif

    fgSizer11->Add(m_textCtrlGitShell, 0, wxALL | wxEXPAND | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_panel234 = new wxPanel(m_treebook230, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_treebook230, wxSize(-1, -1)),
                             wxTAB_TRAVERSAL);
    m_treebook230->AddPage(m_panel234, _("Configuration"), false, wxNOT_FOUND);

    wxBoxSizer* boxSizer242 = new wxBoxSizer(wxVERTICAL);
    m_panel234->SetSizer(boxSizer242);

    wxFlexGridSizer* flexGridSizer244 = new wxFlexGridSizer(0, 2, 0, 0);
    flexGridSizer244->SetFlexibleDirection(wxBOTH);
    flexGridSizer244->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
    flexGridSizer244->AddGrowableCol(1);

    boxSizer242->Add(flexGridSizer244, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText246 = new wxStaticText(m_panel234, wxID_ANY, _("Global user name:"), wxDefaultPosition,
                                       wxDLG_UNIT(m_panel234, wxSize(-1, -1)), 0);

    flexGridSizer244->Add(m_staticText246, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_textCtrlGlobalName =
        new wxTextCtrl(m_panel234, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panel234, wxSize(-1, -1)), 0);
    m_textCtrlGlobalName->SetToolTip(_("Set the global user name (this name will tell git who you are)"));
#if wxVERSION_NUMBER >= 3000
    m_textCtrlGlobalName->SetHint(wxT(""));
#endif

    flexGridSizer244->Add(m_textCtrlGlobalName, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText250 = new wxStaticText(m_panel234, wxID_ANY, _("Global email:"), wxDefaultPosition,
                                       wxDLG_UNIT(m_panel234, wxSize(-1, -1)), 0);

    flexGridSizer244->Add(m_staticText250, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_textCtrlGlobalEmail =
        new wxTextCtrl(m_panel234, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panel234, wxSize(-1, -1)), 0);
    m_textCtrlGlobalEmail->SetToolTip(_("Set the global email"));
#if wxVERSION_NUMBER >= 3000
    m_textCtrlGlobalEmail->SetHint(wxT(""));
#endif

    flexGridSizer244->Add(m_textCtrlGlobalEmail, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText254 = new wxStaticText(m_panel234, wxID_ANY, _("Local repository user name:"), wxDefaultPosition,
                                       wxDLG_UNIT(m_panel234, wxSize(-1, -1)), 0);

    flexGridSizer244->Add(m_staticText254, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_textCtrlLocalName =
        new wxTextCtrl(m_panel234, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panel234, wxSize(-1, -1)), 0);
    m_textCtrlLocalName->SetToolTip(_("Set the current repository user name (this name will tell git who you are).\nIf "
                                      "this field left empty, the global one is used"));
#if wxVERSION_NUMBER >= 3000
    m_textCtrlLocalName->SetHint(wxT(""));
#endif

    flexGridSizer244->Add(m_textCtrlLocalName, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText258 = new wxStaticText(m_panel234, wxID_ANY, _("Local repository email:"), wxDefaultPosition,
                                       wxDLG_UNIT(m_panel234, wxSize(-1, -1)), 0);

    flexGridSizer244->Add(m_staticText258, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_textCtrlLocalEmail =
        new wxTextCtrl(m_panel234, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panel234, wxSize(-1, -1)), 0);
    m_textCtrlLocalEmail->SetToolTip(
        _("Set the current repository email\nIf this field left empty, the global one is used"));
#if wxVERSION_NUMBER >= 3000
    m_textCtrlLocalEmail->SetHint(wxT(""));
#endif

    flexGridSizer244->Add(m_textCtrlLocalEmail, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText2585 = new wxStaticText(m_panel234, wxID_ANY, _("Optional - Full path to project's git repo:"),
                                        wxDefaultPosition, wxDLG_UNIT(m_panel234, wxSize(-1, -1)), 0);

    flexGridSizer244->Add(m_staticText2585, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_dirPickerGitRepoPath = new wxDirPickerCtrl(m_panel234, wxID_ANY, wxEmptyString, _("Select a folder"),
                                                 wxDefaultPosition, wxDLG_UNIT(m_panel234, wxSize(-1, -1)),
                                                 wxDIRP_SMALL | wxDIRP_DEFAULT_STYLE | wxDIRP_USE_TEXTCTRL);

    flexGridSizer244->Add(m_dirPickerGitRepoPath, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_panel236 = new wxPanel(m_treebook230, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_treebook230, wxSize(-1, -1)),
                             wxTAB_TRAVERSAL);
    m_treebook230->AddPage(m_panel236, _("Misc"), false, wxNOT_FOUND);

    wxBoxSizer* boxSizer766 = new wxBoxSizer(wxVERTICAL);
    m_panel236->SetSizer(boxSizer766);

    m_checkBoxTerminal = new wxCheckBox(m_panel236, wxID_ANY, _("Show Terminal"), wxDefaultPosition,
                                        wxDLG_UNIT(m_panel236, wxSize(-1, -1)), 0);
    m_checkBoxTerminal->SetValue(false);
    m_checkBoxTerminal->SetToolTip(
        _("Mainly useful for Windows when the password\nprompt is not accessible via the UI"));

    boxSizer766->Add(m_checkBoxTerminal, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_checkBoxLog = new wxCheckBox(m_panel236, wxID_ANY, _("Verbose Logging"), wxDefaultPosition,
                                   wxDLG_UNIT(m_panel236, wxSize(-1, -1)), 0);
    m_checkBoxLog->SetValue(false);
    m_checkBoxLog->SetToolTip(_("Tick this option to enable a verbose logging of git"));

    boxSizer766->Add(m_checkBoxLog, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_checkBoxShowBlameInStatusBar = new wxCheckBox(m_panel236, wxID_ANY, _("Show commit info in the status bar"),
                                                    wxDefaultPosition, wxDLG_UNIT(m_panel236, wxSize(-1, -1)), 0);
    m_checkBoxShowBlameInStatusBar->SetValue(true);

    boxSizer766->Add(m_checkBoxShowBlameInStatusBar, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_stdBtnSizer284 = new wxStdDialogButtonSizer();

    mainSizer->Add(m_stdBtnSizer284, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(10));

    m_buttonOK = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_buttonOK->SetDefault();
    m_stdBtnSizer284->AddButton(m_buttonOK);

    m_buttonCancel = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_stdBtnSizer284->AddButton(m_buttonCancel);
    m_stdBtnSizer284->Realize();

    m_treebook230->ExpandNode(0, true);
    m_treebook230->ExpandNode(1, true);
    m_treebook230->ExpandNode(2, true);

    SetName(wxT("GitSettingsDlgBase"));
    SetSize(wxDLG_UNIT(this, wxSize(-1, -1)));
    if(GetSizer()) {
        GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
    // Connect events
    m_staticText254->Bind(wxEVT_UPDATE_UI, &GitSettingsDlgBase::OnLocalRepoUI, this);
    m_textCtrlLocalName->Bind(wxEVT_UPDATE_UI, &GitSettingsDlgBase::OnLocalRepoUI, this);
    m_staticText258->Bind(wxEVT_UPDATE_UI, &GitSettingsDlgBase::OnLocalRepoUI, this);
    m_textCtrlLocalEmail->Bind(wxEVT_UPDATE_UI, &GitSettingsDlgBase::OnLocalRepoUI, this);
    m_buttonOK->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &GitSettingsDlgBase::OnOK, this);
}

GitSettingsDlgBase::~GitSettingsDlgBase()
{
    m_staticText254->Unbind(wxEVT_UPDATE_UI, &GitSettingsDlgBase::OnLocalRepoUI, this);
    m_textCtrlLocalName->Unbind(wxEVT_UPDATE_UI, &GitSettingsDlgBase::OnLocalRepoUI, this);
    m_staticText258->Unbind(wxEVT_UPDATE_UI, &GitSettingsDlgBase::OnLocalRepoUI, this);
    m_textCtrlLocalEmail->Unbind(wxEVT_UPDATE_UI, &GitSettingsDlgBase::OnLocalRepoUI, this);
    m_buttonOK->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &GitSettingsDlgBase::OnOK, this);
}

GitCommitDlgBase::GitCommitDlgBase(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* bSizer4 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(bSizer4);

    m_splitterMain = new clThemedSplitterWindow(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(600, 400)),
                                                wxSP_LIVE_UPDATE | wxSP_NO_XP_THEME | wxSP_3DSASH);
    m_splitterMain->SetSashGravity(0.5);
    m_splitterMain->SetMinimumPaneSize(150);

    bSizer4->Add(m_splitterMain, 1, wxEXPAND, WXC_FROM_DIP(5));

    m_panel3 = new wxPanel(m_splitterMain, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_splitterMain, wxSize(-1, -1)),
                           wxTAB_TRAVERSAL);

    wxBoxSizer* bSizer12 = new wxBoxSizer(wxVERTICAL);
    m_panel3->SetSizer(bSizer12);

    m_splitterInner =
        new clThemedSplitterWindow(m_panel3, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panel3, wxSize(-1, -1)),
                                   wxSP_LIVE_UPDATE | wxSP_NO_XP_THEME | wxSP_3DSASH);
    m_splitterInner->SetSashGravity(0.5);
    m_splitterInner->SetMinimumPaneSize(0);

    bSizer12->Add(m_splitterInner, 1, wxEXPAND, WXC_FROM_DIP(5));

    m_panel1 = new wxPanel(m_splitterInner, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_splitterInner, wxSize(-1, -1)),
                           wxTAB_TRAVERSAL);

    wxBoxSizer* bSizer11 = new wxBoxSizer(wxVERTICAL);
    m_panel1->SetSizer(bSizer11);

    m_dvListCtrlFiles = new clThemedOrderedListCtrl(
        m_panel1, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panel1, wxSize(-1, -1)),
        wxDV_NO_HEADER | wxDV_ROW_LINES | wxDV_SINGLE | wxTRANSPARENT_WINDOW | get_border_simple_theme_aware_bit());

    bSizer11->Add(m_dvListCtrlFiles, 1, wxEXPAND, WXC_FROM_DIP(5));

    m_dvListCtrlFiles->AppendTextColumn(_("Files"), wxDATAVIEW_CELL_INERT, WXC_FROM_DIP(-2), wxALIGN_LEFT,
                                        wxDATAVIEW_COL_RESIZABLE);
    m_panel2 = new wxPanel(m_splitterInner, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_splitterInner, wxSize(-1, -1)),
                           wxTAB_TRAVERSAL);
    m_splitterInner->SplitVertically(m_panel1, m_panel2, 0);

    wxBoxSizer* bSizer9 = new wxBoxSizer(wxVERTICAL);
    m_panel2->SetSizer(bSizer9);

    m_stcDiff = new wxStyledTextCtrl(m_panel2, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panel2, wxSize(-1, -1)),
                                     wxTRANSPARENT_WINDOW | get_border_simple_theme_aware_bit());
    // Configure the fold margin
    m_stcDiff->SetMarginType(4, wxSTC_MARGIN_SYMBOL);
    m_stcDiff->SetMarginMask(4, wxSTC_MASK_FOLDERS);
    m_stcDiff->SetMarginSensitive(4, true);
    m_stcDiff->SetMarginWidth(4, 0);

    // Configure the tracker margin
    m_stcDiff->SetMarginWidth(1, 0);

    // Configure the symbol margin
    m_stcDiff->SetMarginType(2, wxSTC_MARGIN_SYMBOL);
    m_stcDiff->SetMarginMask(2, ~(wxSTC_MASK_FOLDERS));
    m_stcDiff->SetMarginWidth(2, 0);
    m_stcDiff->SetMarginSensitive(2, true);

    // Configure the line numbers margin
    m_stcDiff->SetMarginType(0, wxSTC_MARGIN_NUMBER);
    m_stcDiff->SetMarginWidth(0, 0);

    // Configure the line symbol margin
    m_stcDiff->SetMarginType(3, wxSTC_MARGIN_FORE);
    m_stcDiff->SetMarginMask(3, 0);
    m_stcDiff->SetMarginWidth(3, 0);
    // Select the lexer
    m_stcDiff->SetLexer(wxSTC_LEX_NULL);
    // Set default font / styles
    m_stcDiff->StyleClearAll();
    m_stcDiff->SetWrapMode(0);
    m_stcDiff->SetIndentationGuides(0);
    m_stcDiff->SetKeyWords(0, wxT(""));
    m_stcDiff->SetKeyWords(1, wxT(""));
    m_stcDiff->SetKeyWords(2, wxT(""));
    m_stcDiff->SetKeyWords(3, wxT(""));
    m_stcDiff->SetKeyWords(4, wxT(""));

    bSizer9->Add(m_stcDiff, 1, wxEXPAND, WXC_FROM_DIP(5));

    m_panel4 = new wxPanel(m_splitterMain, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_splitterMain, wxSize(-1, -1)),
                           wxTAB_TRAVERSAL);
    m_splitterMain->SplitHorizontally(m_panel3, m_panel4, 0);

    wxBoxSizer* bSizer13 = new wxBoxSizer(wxVERTICAL);
    m_panel4->SetSizer(bSizer13);

    m_toolbar = new clToolBar(m_panel4, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panel4, wxSize(-1, -1)), wxTB_FLAT);
    m_toolbar->SetToolBitmapSize(wxSize(16, 16));

    bSizer13->Add(m_toolbar, 0, wxEXPAND, WXC_FROM_DIP(5));

    m_stcCommitMessage = new clThemedSTC(m_panel4, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panel4, wxSize(-1, -1)),
                                         wxTRANSPARENT_WINDOW | wxBORDER_NONE | get_border_simple_theme_aware_bit());
    m_stcCommitMessage->SetFocus();
    // 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);

    // Configure the tracker margin
    m_stcCommitMessage->SetMarginWidth(1, 0);

    // 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);

    // Configure the line numbers margin
    m_stcCommitMessage->SetMarginType(0, wxSTC_MARGIN_NUMBER);
    m_stcCommitMessage->SetMarginWidth(0, 0);

    // 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(1);
    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(""));

    bSizer13->Add(m_stcCommitMessage, 1, wxEXPAND, WXC_FROM_DIP(5));

    m_checkBoxAmend = new wxCheckBox(m_panel4, wxID_ANY, _("Amend the previous commit"), wxDefaultPosition,
                                     wxDLG_UNIT(m_panel4, wxSize(-1, -1)), 0);
    m_checkBoxAmend->SetValue(false);
    m_checkBoxAmend->SetToolTip(
        _("The 'git commit --amend' command is a convenient way to fix up the most recent commit. It lets you combine "
          "staged changes with the previous commit instead of committing it as an entirely new snapshot. It can also "
          "be used to simply edit the previous commit message without changing its snapshot"));

    bSizer13->Add(m_checkBoxAmend, 0, wxALL, WXC_FROM_DIP(5));

    wxBoxSizer* boxSizer372 = new wxBoxSizer(wxHORIZONTAL);

    bSizer4->Add(boxSizer372, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5));

    m_buttonOK = new wxButton(this, wxID_OK, _("&OK"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_buttonOK->SetDefault();

    boxSizer372->Add(m_buttonOK, 0, wxALL, WXC_FROM_DIP(5));

    m_buttonCancel =
        new wxButton(this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    boxSizer372->Add(m_buttonCancel, 0, wxALL, WXC_FROM_DIP(5));

    SetName(wxT("GitCommitDlgBase"));
    SetSize(wxDLG_UNIT(this, wxSize(-1, -1)));
    if(GetSizer()) {
        GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
    // Connect events
    m_dvListCtrlFiles->Bind(wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, &GitCommitDlgBase::OnChangeFile, this);
    m_checkBoxAmend->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &GitCommitDlgBase::OnAmendClicked, this);
    m_buttonOK->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &GitCommitDlgBase::OnCommitOK, this);
}

GitCommitDlgBase::~GitCommitDlgBase()
{
    m_dvListCtrlFiles->Unbind(wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, &GitCommitDlgBase::OnChangeFile, this);
    m_checkBoxAmend->Unbind(wxEVT_COMMAND_CHECKBOX_CLICKED, &GitCommitDlgBase::OnAmendClicked, this);
    m_buttonOK->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &GitCommitDlgBase::OnCommitOK, this);
}

GitCommitListDlgBase::GitCommitListDlgBase(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* bSizer17 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(bSizer17);

    m_panel806 = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), wxTAB_TRAVERSAL);

    bSizer17->Add(m_panel806, 1, wxEXPAND, WXC_FROM_DIP(5));

    wxBoxSizer* boxSizer808 = new wxBoxSizer(wxVERTICAL);
    m_panel806->SetSizer(boxSizer808);

    m_splitter174 = new clThemedSplitterWindow(m_panel806, wxID_ANY, wxDefaultPosition,
                                               wxDLG_UNIT(m_panel806, wxSize(-1, -1)), wxSP_LIVE_UPDATE | wxSP_3DSASH);
    m_splitter174->SetSashGravity(0.3);
    m_splitter174->SetMinimumPaneSize(150);

    boxSizer808->Add(m_splitter174, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_splitterPage178 = new wxPanel(m_splitter174, wxID_ANY, wxDefaultPosition,
                                    wxDLG_UNIT(m_splitter174, wxSize(-1, -1)), wxTAB_TRAVERSAL);

    wxBoxSizer* boxSizer205 = new wxBoxSizer(wxVERTICAL);
    m_splitterPage178->SetSizer(boxSizer205);

    m_splitter777 = new clThemedSplitterWindow(m_splitterPage178, wxID_ANY, wxDefaultPosition,
                                               wxDLG_UNIT(m_splitterPage178, wxSize(-1, -1)), wxSP_LIVE_UPDATE);
    m_splitter777->SetSashGravity(0.5);
    m_splitter777->SetMinimumPaneSize(10);

    boxSizer205->Add(m_splitter777, 1, wxEXPAND, WXC_FROM_DIP(5));

    m_splitterPage781 = new wxPanel(m_splitter777, wxID_ANY, wxDefaultPosition,
                                    wxDLG_UNIT(m_splitter777, wxSize(-1, -1)), wxTAB_TRAVERSAL);

    wxBoxSizer* boxSizer787 = new wxBoxSizer(wxVERTICAL);
    m_splitterPage781->SetSizer(boxSizer787);

    wxFlexGridSizer* flexGridSizer800 = new wxFlexGridSizer(0, 3, 0, 0);
    flexGridSizer800->SetFlexibleDirection(wxBOTH);
    flexGridSizer800->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
    flexGridSizer800->AddGrowableCol(0);

    boxSizer787->Add(flexGridSizer800, 0, wxEXPAND, WXC_FROM_DIP(5));

    m_searchCtrlFilter = new wxSearchCtrl(m_splitterPage781, wxID_ANY, wxT(""), wxDefaultPosition,
                                          wxDLG_UNIT(m_splitterPage781, wxSize(-1, -1)), wxTE_PROCESS_ENTER);
    m_searchCtrlFilter->SetToolTip(
        _("Search for specific text in commits.\nThis uses --grep, and so searches only the text of the commit "
          "message. To search by author etc, use the 'Extra arguments' box."));
    m_searchCtrlFilter->SetFocus();
    m_searchCtrlFilter->ShowSearchButton(true);
    m_searchCtrlFilter->ShowCancelButton(false);

    flexGridSizer800->Add(m_searchCtrlFilter, 1, wxALL | wxEXPAND | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_buttonPrevious = new wxButton(m_splitterPage781, wxID_BACKWARD, _("Previous"), wxDefaultPosition,
                                    wxDLG_UNIT(m_splitterPage781, wxSize(-1, -1)), 0);
    m_buttonPrevious->SetToolTip(_("Show previous 100 commits"));

    flexGridSizer800->Add(m_buttonPrevious, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_buttonNext = new wxButton(m_splitterPage781, wxID_FORWARD, _("Next"), wxDefaultPosition,
                                wxDLG_UNIT(m_splitterPage781, wxSize(-1, -1)), 0);
    m_buttonNext->SetToolTip(_("Fetch the next 100 commits"));

    flexGridSizer800->Add(m_buttonNext, 0, wxALL | wxEXPAND | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    wxArrayString m_comboExtraArgsArr;
    m_comboExtraArgsArr.Add(_("--since="));
    m_comboExtraArgsArr.Add(_("--before="));
    m_comboExtraArgsArr.Add(_("--author="));
    m_comboExtraArgsArr.Add(_("--committer="));
    m_comboExtraArgsArr.Add(_("-S"));
    m_comboExtraArgs = new wxComboBox(m_splitterPage781, wxID_ANY, wxT(""), wxDefaultPosition,
                                      wxDLG_UNIT(m_splitterPage781, wxSize(-1, -1)), m_comboExtraArgsArr, 0);
    m_comboExtraArgs->SetToolTip(
        _("Optional extra arguments that you wish passed to git log.\n\nAn example might be:\n--since=\"2 weeks "
          "ago\"\n\nNote that this is _not_ sanity-checked, it's added just as it is"));
#if wxVERSION_NUMBER >= 3000
    m_comboExtraArgs->SetHint(wxT(""));
#endif

    flexGridSizer800->Add(m_comboExtraArgs, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_checkBoxIgnoreCase = new wxCheckBox(m_splitterPage781, wxID_ANY, _("Ignore case"), wxDefaultPosition,
                                          wxDLG_UNIT(m_splitterPage781, wxSize(-1, -1)), 0);
    m_checkBoxIgnoreCase->SetValue(false);
    m_checkBoxIgnoreCase->SetToolTip(
        _("--regexp-ignore-case Display commits that match the pattern without regard to case"));

    flexGridSizer800->Add(m_checkBoxIgnoreCase, 0, wxALL | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_dvListCtrlCommitList = new clThemedListCtrl(
        m_splitterPage781, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_splitterPage781, wxSize(-1, -1)),
        wxDV_ROW_LINES | wxDV_SINGLE | wxTRANSPARENT_WINDOW | get_border_simple_theme_aware_bit());

    boxSizer787->Add(m_dvListCtrlCommitList, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_dvListCtrlCommitList->AppendTextColumn(_("Commit"), wxDATAVIEW_CELL_INERT, WXC_FROM_DIP(-2), wxALIGN_LEFT,
                                             wxDATAVIEW_COL_RESIZABLE);
    m_dvListCtrlCommitList->AppendTextColumn(_("Author"), wxDATAVIEW_CELL_INERT, WXC_FROM_DIP(-2), wxALIGN_LEFT,
                                             wxDATAVIEW_COL_RESIZABLE);
    m_dvListCtrlCommitList->AppendTextColumn(_("Date"), wxDATAVIEW_CELL_INERT, WXC_FROM_DIP(-2), wxALIGN_LEFT,
                                             wxDATAVIEW_COL_RESIZABLE);
    m_dvListCtrlCommitList->AppendTextColumn(_("Subject"), wxDATAVIEW_CELL_INERT, WXC_FROM_DIP(-2), wxALIGN_LEFT,
                                             wxDATAVIEW_COL_RESIZABLE);
    m_splitterPage785 = new wxPanel(m_splitter777, wxID_ANY, wxDefaultPosition,
                                    wxDLG_UNIT(m_splitter777, wxSize(-1, -1)), wxTAB_TRAVERSAL);
    m_splitter777->SplitHorizontally(m_splitterPage781, m_splitterPage785, 0);

    wxBoxSizer* boxSizer789 = new wxBoxSizer(wxVERTICAL);
    m_splitterPage785->SetSizer(boxSizer789);

    m_splitter791 = new clThemedSplitterWindow(m_splitterPage785, wxID_ANY, wxDefaultPosition,
                                               wxDLG_UNIT(m_splitterPage785, wxSize(-1, -1)), wxSP_LIVE_UPDATE);
    m_splitter791->SetSashGravity(0.5);
    m_splitter791->SetMinimumPaneSize(10);

    boxSizer789->Add(m_splitter791, 1, wxEXPAND, WXC_FROM_DIP(5));

    m_splitterPage795 = new wxPanel(m_splitter791, wxID_ANY, wxDefaultPosition,
                                    wxDLG_UNIT(m_splitter791, wxSize(-1, -1)), wxTAB_TRAVERSAL);

    wxBoxSizer* boxSizer208 = new wxBoxSizer(wxVERTICAL);
    m_splitterPage795->SetSizer(boxSizer208);

    m_staticText210 = new wxStaticText(m_splitterPage795, wxID_ANY, _("Modified files:"), wxDefaultPosition,
                                       wxDLG_UNIT(m_splitterPage795, wxSize(-1, -1)), 0);

    boxSizer208->Add(m_staticText210, 0, wxALL, WXC_FROM_DIP(5));

    wxArrayString m_fileListBoxArr;
    m_fileListBox =
        new wxListBox(m_splitterPage795, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_splitterPage795, wxSize(-1, -1)),
                      m_fileListBoxArr, wxTRANSPARENT_WINDOW | get_border_simple_theme_aware_bit());

    boxSizer208->Add(m_fileListBox, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_splitterPage799 = new wxPanel(m_splitter791, wxID_ANY, wxDefaultPosition,
                                    wxDLG_UNIT(m_splitter791, wxSize(-1, -1)), wxTAB_TRAVERSAL);
    m_splitter791->SplitHorizontally(m_splitterPage795, m_splitterPage799, 0);

    wxBoxSizer* boxSizer218 = new wxBoxSizer(wxVERTICAL);
    m_splitterPage799->SetSizer(boxSizer218);

    m_staticText220 = new wxStaticText(m_splitterPage799, wxID_ANY, _("Commit message:"), wxDefaultPosition,
                                       wxDLG_UNIT(m_splitterPage799, wxSize(-1, -1)), 0);

    boxSizer218->Add(m_staticText220, 0, wxALL, WXC_FROM_DIP(5));

    m_stcCommitMessage =
        new clThemedSTC(m_splitterPage799, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_splitterPage799, wxSize(-1, -1)),
                        wxTRANSPARENT_WINDOW | get_border_simple_theme_aware_bit());
    // 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);

    // Configure the tracker margin
    m_stcCommitMessage->SetMarginWidth(1, 0);

    // 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);

    // Configure the line numbers margin
    m_stcCommitMessage->SetMarginType(0, wxSTC_MARGIN_NUMBER);
    m_stcCommitMessage->SetMarginWidth(0, 0);

    // 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(1);
    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, WXC_FROM_DIP(5));

    m_splitterPage182 = new wxPanel(m_splitter174, wxID_ANY, wxDefaultPosition,
                                    wxDLG_UNIT(m_splitter174, wxSize(-1, -1)), wxTAB_TRAVERSAL);
    m_splitter174->SplitVertically(m_splitterPage178, m_splitterPage182, 0);

    wxBoxSizer* boxSizer184 = new wxBoxSizer(wxVERTICAL);
    m_splitterPage182->SetSizer(boxSizer184);

    m_staticText217 = new wxStaticText(m_splitterPage182, wxID_ANY, _("Diff:"), wxDefaultPosition,
                                       wxDLG_UNIT(m_splitterPage182, wxSize(-1, -1)), 0);

    boxSizer184->Add(m_staticText217, 0, wxALL, WXC_FROM_DIP(5));

    m_stcDiff = new wxStyledTextCtrl(m_splitterPage182, wxID_ANY, wxDefaultPosition,
                                     wxDLG_UNIT(m_splitterPage182, wxSize(-1, -1)),
                                     wxTRANSPARENT_WINDOW | get_border_simple_theme_aware_bit());
    // Configure the fold margin
    m_stcDiff->SetMarginType(4, wxSTC_MARGIN_SYMBOL);
    m_stcDiff->SetMarginMask(4, wxSTC_MASK_FOLDERS);
    m_stcDiff->SetMarginSensitive(4, true);
    m_stcDiff->SetMarginWidth(4, 0);

    // Configure the tracker margin
    m_stcDiff->SetMarginWidth(1, 0);

    // Configure the symbol margin
    m_stcDiff->SetMarginType(2, wxSTC_MARGIN_SYMBOL);
    m_stcDiff->SetMarginMask(2, ~(wxSTC_MASK_FOLDERS));
    m_stcDiff->SetMarginWidth(2, 0);
    m_stcDiff->SetMarginSensitive(2, true);

    // Configure the line numbers margin
    m_stcDiff->SetMarginType(0, wxSTC_MARGIN_NUMBER);
    m_stcDiff->SetMarginWidth(0, 0);

    // Configure the line symbol margin
    m_stcDiff->SetMarginType(3, wxSTC_MARGIN_FORE);
    m_stcDiff->SetMarginMask(3, 0);
    m_stcDiff->SetMarginWidth(3, 0);
    // Select the lexer
    m_stcDiff->SetLexer(wxSTC_LEX_DIFF);
    // Set default font / styles
    m_stcDiff->StyleClearAll();
    m_stcDiff->SetWrapMode(0);
    m_stcDiff->SetIndentationGuides(0);
    m_stcDiff->SetKeyWords(0, wxT(""));
    m_stcDiff->SetKeyWords(1, wxT(""));
    m_stcDiff->SetKeyWords(2, wxT(""));
    m_stcDiff->SetKeyWords(3, wxT(""));
    m_stcDiff->SetKeyWords(4, wxT(""));

    boxSizer184->Add(m_stcDiff, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    wxBoxSizer* boxSizer769 = new wxBoxSizer(wxVERTICAL);

    boxSizer808->Add(boxSizer769, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_buttonClose =
        new wxButton(m_panel806, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDLG_UNIT(m_panel806, wxSize(-1, -1)), 0);

    boxSizer769->Add(m_buttonClose, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5));

    SetName(wxT("GitCommitListDlgBase"));
    SetSize(wxDLG_UNIT(this, wxSize(-1, -1)));
    if(GetSizer()) {
        GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
    // Connect events
    this->Bind(wxEVT_CLOSE_WINDOW, &GitCommitListDlgBase::OnClose, this);
    m_searchCtrlFilter->Bind(wxEVT_COMMAND_TEXT_ENTER, &GitCommitListDlgBase::OnSearchCommitList, this);
    m_searchCtrlFilter->Bind(wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN, &GitCommitListDlgBase::OnSearchCommitList, this);
    m_buttonPrevious->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &GitCommitListDlgBase::OnPrevious, this);
    m_buttonPrevious->Bind(wxEVT_UPDATE_UI, &GitCommitListDlgBase::OnPreviousUI, this);
    m_buttonNext->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &GitCommitListDlgBase::OnNext, this);
    m_buttonNext->Bind(wxEVT_UPDATE_UI, &GitCommitListDlgBase::OnNextUpdateUI, this);
    m_dvListCtrlCommitList->Bind(wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, &GitCommitListDlgBase::OnSelectionChanged,
                                 this);
    m_dvListCtrlCommitList->Bind(wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU, &GitCommitListDlgBase::OnContextMenu, this);
    m_fileListBox->Bind(wxEVT_COMMAND_LISTBOX_SELECTED, &GitCommitListDlgBase::OnChangeFile, this);
    m_buttonClose->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &GitCommitListDlgBase::OnBtnClose, this);
}

GitCommitListDlgBase::~GitCommitListDlgBase()
{
    this->Unbind(wxEVT_CLOSE_WINDOW, &GitCommitListDlgBase::OnClose, this);
    m_searchCtrlFilter->Unbind(wxEVT_COMMAND_TEXT_ENTER, &GitCommitListDlgBase::OnSearchCommitList, this);
    m_searchCtrlFilter->Unbind(wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN, &GitCommitListDlgBase::OnSearchCommitList, this);
    m_buttonPrevious->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &GitCommitListDlgBase::OnPrevious, this);
    m_buttonPrevious->Unbind(wxEVT_UPDATE_UI, &GitCommitListDlgBase::OnPreviousUI, this);
    m_buttonNext->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &GitCommitListDlgBase::OnNext, this);
    m_buttonNext->Unbind(wxEVT_UPDATE_UI, &GitCommitListDlgBase::OnNextUpdateUI, this);
    m_dvListCtrlCommitList->Unbind(wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, &GitCommitListDlgBase::OnSelectionChanged,
                                   this);
    m_dvListCtrlCommitList->Unbind(wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU, &GitCommitListDlgBase::OnContextMenu,
                                   this);
    m_fileListBox->Unbind(wxEVT_COMMAND_LISTBOX_SELECTED, &GitCommitListDlgBase::OnChangeFile, this);
    m_buttonClose->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &GitCommitListDlgBase::OnBtnClose, this);
}

GitDiffDlgBase::GitDiffDlgBase(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* bSizer17 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(bSizer17);

    m_splitter = new wxSplitterWindow(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(800, 600)),
                                      wxSP_LIVE_UPDATE | wxSP_3DSASH);
    m_splitter->SetSashGravity(0);
    m_splitter->SetMinimumPaneSize(100);

    bSizer17->Add(m_splitter, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_splitterPageFiles =
        new wxPanel(m_splitter, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_splitter, wxSize(-1, -1)), wxTAB_TRAVERSAL);

    wxBoxSizer* boxSizer62 = new wxBoxSizer(wxVERTICAL);
    m_splitterPageFiles->SetSizer(boxSizer62);

    m_staticText68 = new wxStaticText(m_splitterPageFiles, wxID_ANY, _("Modified files:"), wxDefaultPosition,
                                      wxDLG_UNIT(m_splitterPageFiles, wxSize(-1, -1)), 0);

    boxSizer62->Add(m_staticText68, 0, wxALL, WXC_FROM_DIP(5));

    wxArrayString m_fileListBoxArr;
    m_fileListBox =
        new wxListBox(m_splitterPageFiles, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_splitterPageFiles, wxSize(-1, -1)),
                      m_fileListBoxArr, wxTRANSPARENT_WINDOW | get_border_simple_theme_aware_bit());

    boxSizer62->Add(m_fileListBox, 1, wxLEFT | wxRIGHT | wxBOTTOM | wxEXPAND, WXC_FROM_DIP(5));

    m_splitterPageDiff =
        new wxPanel(m_splitter, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_splitter, wxSize(-1, -1)), wxTAB_TRAVERSAL);
    m_splitter->SplitVertically(m_splitterPageFiles, m_splitterPageDiff, 100);

    wxBoxSizer* boxSizer64 = new wxBoxSizer(wxVERTICAL);
    m_splitterPageDiff->SetSizer(boxSizer64);

    m_staticText66 = new wxStaticText(m_splitterPageDiff, wxID_ANY, _("Diff:"), wxDefaultPosition,
                                      wxDLG_UNIT(m_splitterPageDiff, wxSize(-1, -1)), 0);

    boxSizer64->Add(m_staticText66, 0, wxALL, WXC_FROM_DIP(5));

    m_editor = new GitCommitEditor(m_splitterPageDiff);
    boxSizer64->Add(m_editor, 1, wxLEFT | wxRIGHT | wxBOTTOM | wxEXPAND, WXC_FROM_DIP(5));

    wxBoxSizer* boxSizer650 = new wxBoxSizer(wxHORIZONTAL);

    bSizer17->Add(boxSizer650, 0, wxLEFT | wxRIGHT | wxBOTTOM | wxEXPAND, WXC_FROM_DIP(5));

    wxArrayString m_radioBoxStagedArr;
    m_radioBoxStagedArr.Add(_("Unstaged"));
    m_radioBoxStagedArr.Add(_("Staged"));
    m_radioBoxStagedArr.Add(_("Both"));
    m_radioBoxStaged = new wxRadioBox(this, wxID_ANY, _("Show changes that are:"), wxDefaultPosition,
                                      wxDLG_UNIT(this, wxSize(-1, -1)), m_radioBoxStagedArr, 1, wxRA_SPECIFY_COLS);
    m_radioBoxStaged->SetSelection(2);

    boxSizer650->Add(m_radioBoxStaged, 1, wxALL, WXC_FROM_DIP(5));

    m_checkIgnoreSpace = new wxCheckBox(this, wxID_ANY, _("Ignore if whitespace-only"), wxDefaultPosition,
                                        wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_checkIgnoreSpace->SetValue(false);
    m_checkIgnoreSpace->SetToolTip(_("Suppress any lines where the change is only to whitespace. This makes it easier "
                                     "to see the interesting parts of the diff."));

    boxSizer650->Add(m_checkIgnoreSpace, 0, wxALL | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    boxSizer650->Add(0, 0, 0, wxLEFT, WXC_FROM_DIP(10));

    m_buttonDiffDlg =
        new wxButton(this, wxID_ANY, _("Choose commits"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_buttonDiffDlg->SetToolTip(_(
        "This dialog normally shows only the current difference from HEAD. Click to choose any two commits to diff."));

    boxSizer650->Add(m_buttonDiffDlg, 0, wxALL | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    boxSizer650->Add(0, 0, 1, wxALL, WXC_FROM_DIP(5));

    m_button773 = new wxButton(this, wxID_OK, _("Close"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    boxSizer650->Add(m_button773, 0, wxALL | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    SetName(wxT("GitDiffDlgBase"));
    SetSize(wxDLG_UNIT(this, wxSize(-1, -1)));
    if(GetSizer()) {
        GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
    // Connect events
    m_fileListBox->Bind(wxEVT_COMMAND_LISTBOX_SELECTED, &GitDiffDlgBase::OnChangeFile, this);
    m_radioBoxStaged->Bind(wxEVT_COMMAND_RADIOBOX_SELECTED, &GitDiffDlgBase::OnOptionsChanged, this);
    m_checkIgnoreSpace->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &GitDiffDlgBase::OnOptionsChanged, this);
    m_buttonDiffDlg->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &GitDiffDlgBase::OnChoseCommits, this);
}

GitDiffDlgBase::~GitDiffDlgBase()
{
    m_fileListBox->Unbind(wxEVT_COMMAND_LISTBOX_SELECTED, &GitDiffDlgBase::OnChangeFile, this);
    m_radioBoxStaged->Unbind(wxEVT_COMMAND_RADIOBOX_SELECTED, &GitDiffDlgBase::OnOptionsChanged, this);
    m_checkIgnoreSpace->Unbind(wxEVT_COMMAND_CHECKBOX_CLICKED, &GitDiffDlgBase::OnOptionsChanged, this);
    m_buttonDiffDlg->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &GitDiffDlgBase::OnChoseCommits, this);
}

GitDiffChooseCommitishDlgBase::GitDiffChooseCommitishDlgBase(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* boxSizer420 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer420);

    m_staticText59825 = new wxStaticText(this, wxID_ANY, _("Choose two commits to diff"), wxDefaultPosition,
                                         wxDLG_UNIT(this, wxSize(-1, -1)), wxALIGN_CENTRE);

    boxSizer420->Add(m_staticText59825, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText598 = new wxStaticText(
        this, wxID_ANY,
        _("Either select a branch, tag or commit hash, or enter your own commit-ish.\nOptionally you can then specify "
          "the 'n'th parent of each commit,\nand/or use the triple-dot notation for commits where this makes sense."),
        wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    boxSizer420->Add(m_staticText598, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    wxBoxSizer* boxSizer620 = new wxBoxSizer(wxHORIZONTAL);

    boxSizer420->Add(boxSizer620, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    wxStaticBoxSizer* staticBoxSizer635 = new wxStaticBoxSizer(new wxStaticBox(this, wxID_ANY, _("First")), wxVERTICAL);

    boxSizer620->Add(staticBoxSizer635, 1, wxRIGHT | wxEXPAND, WXC_FROM_DIP(5));

    wxFlexGridSizer* flexGridSizer60413 = new wxFlexGridSizer(0, 2, 0, 0);
    flexGridSizer60413->SetFlexibleDirection(wxBOTH);
    flexGridSizer60413->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
    flexGridSizer60413->AddGrowableCol(1);

    staticBoxSizer635->Add(flexGridSizer60413, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_radioBranch1 =
        new wxRadioButton(this, wxID_ANY, _("Branch"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), wxRB_GROUP);
    m_radioBranch1->SetValue(0);

    flexGridSizer60413->Add(m_radioBranch1, 0, wxALL, WXC_FROM_DIP(5));

    wxArrayString m_choiceBranch1Arr;
    m_choiceBranch1 =
        new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), m_choiceBranch1Arr, 0);

    flexGridSizer60413->Add(m_choiceBranch1, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_radioTag1 = new wxRadioButton(this, wxID_ANY, _("Tag"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_radioTag1->SetValue(0);

    flexGridSizer60413->Add(m_radioTag1, 0, wxALL, WXC_FROM_DIP(5));

    wxArrayString m_choiceTag1Arr;
    m_choiceTag1 =
        new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), m_choiceTag1Arr, 0);

    flexGridSizer60413->Add(m_choiceTag1, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_radioCommit1 =
        new wxRadioButton(this, wxID_ANY, _("Commit"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_radioCommit1->SetValue(1);

    flexGridSizer60413->Add(m_radioCommit1, 0, wxALL, WXC_FROM_DIP(5));

    wxArrayString m_choiceCommit1Arr;
    m_choiceCommit1 =
        new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), m_choiceCommit1Arr, 0);
    m_choiceCommit1->SetToolTip(_("Here you can choose one of the last 1000 commits to diff against.\nThey will "
                                  "normally be from the currently checked-out branch. However if you select a "
                                  "different branch above, that branch's commits will be shown instead."));

    flexGridSizer60413->Add(m_choiceCommit1, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_radioUserEntered1 = new wxRadioButton(this, wxID_ANY, _("Enter commit-ish"), wxDefaultPosition,
                                            wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_radioUserEntered1->SetValue(1);

    flexGridSizer60413->Add(m_radioUserEntered1, 0, wxALL, WXC_FROM_DIP(5));

    wxArrayString m_comboCommitish1Arr;
    m_comboCommitish1 = new wxComboBox(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)),
                                       m_comboCommitish1Arr, 0);
    m_comboCommitish1->SetToolTip(_("You can enter any valid commit-ish here. It will not be sanity-checked..."));
#if wxVERSION_NUMBER >= 3000
    m_comboCommitish1->SetHint(wxT(""));
#endif

    flexGridSizer60413->Add(m_comboCommitish1, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    wxStaticBoxSizer* staticBoxSizer636 =
        new wxStaticBoxSizer(new wxStaticBox(this, wxID_ANY, _("Second")), wxVERTICAL);

    boxSizer620->Add(staticBoxSizer636, 1, wxLEFT | wxEXPAND, WXC_FROM_DIP(5));

    wxFlexGridSizer* flexGridSizer604 = new wxFlexGridSizer(0, 2, 0, 0);
    flexGridSizer604->SetFlexibleDirection(wxBOTH);
    flexGridSizer604->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
    flexGridSizer604->AddGrowableCol(1);

    staticBoxSizer636->Add(flexGridSizer604, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_radioBranch2 =
        new wxRadioButton(this, wxID_ANY, _("Branch"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), wxRB_GROUP);
    m_radioBranch2->SetValue(0);

    flexGridSizer604->Add(m_radioBranch2, 0, wxALL, WXC_FROM_DIP(5));

    wxArrayString m_choiceBranch2Arr;
    m_choiceBranch2 =
        new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), m_choiceBranch2Arr, 0);

    flexGridSizer604->Add(m_choiceBranch2, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_radioTag2 = new wxRadioButton(this, wxID_ANY, _("Tag"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_radioTag2->SetValue(0);

    flexGridSizer604->Add(m_radioTag2, 0, wxALL, WXC_FROM_DIP(5));

    wxArrayString m_choiceTag2Arr;
    m_choiceTag2 =
        new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), m_choiceTag2Arr, 0);

    flexGridSizer604->Add(m_choiceTag2, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_radioCommit2 =
        new wxRadioButton(this, wxID_ANY, _("Commit"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_radioCommit2->SetValue(1);

    flexGridSizer604->Add(m_radioCommit2, 0, wxALL, WXC_FROM_DIP(5));

    wxArrayString m_choiceCommit2Arr;
    m_choiceCommit2 =
        new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), m_choiceCommit2Arr, 0);
    m_choiceCommit2->SetToolTip(_("Here you can choose one of the last 1000 commits to diff against.\nThey will "
                                  "normally be from the currently checked-out branch. However if you select a "
                                  "different branch above, that branch's commits will be shown instead."));

    flexGridSizer604->Add(m_choiceCommit2, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_radioUserEntered2 = new wxRadioButton(this, wxID_ANY, _("Enter commit-ish"), wxDefaultPosition,
                                            wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_radioUserEntered2->SetValue(1);

    flexGridSizer604->Add(m_radioUserEntered2, 0, wxALL, WXC_FROM_DIP(5));

    wxArrayString m_comboCommitish2Arr;
    m_comboCommitish2 = new wxComboBox(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)),
                                       m_comboCommitish2Arr, 0);
    m_comboCommitish2->SetToolTip(_("You can enter any valid commit-ish here. It will not be sanity-checked..."));
#if wxVERSION_NUMBER >= 3000
    m_comboCommitish2->SetHint(wxT(""));
#endif

    flexGridSizer604->Add(m_comboCommitish2, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_checkTripleDot = new wxCheckBox(this, wxID_ANY, _("Use '...'"), wxDefaultPosition,
                                      wxDLG_UNIT(this, wxSize(-1, -1)), wxALIGN_RIGHT);
    m_checkTripleDot->SetValue(false);
    m_checkTripleDot->SetToolTip(
        _("Check this to use the 'triple-dot' notation. The resulting diff will show the changes between the "
          "merge-base and the second commit-ish. So if the first commit-ish is 'master' and the second the branch "
          "'foo', it will show the changes in foo since it split from master.\nNote that this will not make sense for "
          "all commit-ishes."));

    boxSizer420->Add(m_checkTripleDot, 0, wxALIGN_CENTER, WXC_FROM_DIP(0));

    wxBoxSizer* boxSizer434 = new wxBoxSizer(wxHORIZONTAL);

    boxSizer420->Add(boxSizer434, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    wxFlexGridSizer* flexGridSizer61410 = new wxFlexGridSizer(0, 3, 0, 0);
    flexGridSizer61410->SetFlexibleDirection(wxBOTH);
    flexGridSizer61410->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
    flexGridSizer61410->AddGrowableCol(0);

    boxSizer434->Add(flexGridSizer61410, 1, wxALL, WXC_FROM_DIP(5));

    m_textFirst =
        new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), wxTE_READONLY);
    m_textFirst->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INACTIVECAPTION));
#if wxVERSION_NUMBER >= 3000
    m_textFirst->SetHint(wxT(""));
#endif

    flexGridSizer61410->Add(m_textFirst, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText598211 =
        new wxStaticText(this, wxID_ANY, _("~"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    flexGridSizer61410->Add(m_staticText598211, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_spinCtrl1 =
        new wxSpinCtrl(this, wxID_ANY, wxT("0"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), wxSP_ARROW_KEYS);
    m_spinCtrl1->SetToolTip(
        _("If you enter a non-zero value here, the diff will use that parent of the commit instead of the commit "
          "itself.\nSo if the commit is HEAD, entering 5 will use HEAD~5, the fifth parent."));
    m_spinCtrl1->SetRange(0, 999);
    m_spinCtrl1->SetValue(0);

    flexGridSizer61410->Add(m_spinCtrl1, 0, wxRIGHT | wxTOP | wxBOTTOM, WXC_FROM_DIP(5));

    wxFlexGridSizer* flexGridSizer614 = new wxFlexGridSizer(0, 3, 0, 0);
    flexGridSizer614->SetFlexibleDirection(wxBOTH);
    flexGridSizer614->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
    flexGridSizer614->AddGrowableCol(0);

    boxSizer434->Add(flexGridSizer614, 1, wxALL, WXC_FROM_DIP(5));

    m_textSecond =
        new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), wxTE_READONLY);
    m_textSecond->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INACTIVECAPTION));
#if wxVERSION_NUMBER >= 3000
    m_textSecond->SetHint(wxT(""));
#endif

    flexGridSizer614->Add(m_textSecond, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText59821124 =
        new wxStaticText(this, wxID_ANY, _("~"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    flexGridSizer614->Add(m_staticText59821124, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_spinCtrl2 =
        new wxSpinCtrl(this, wxID_ANY, wxT("0"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), wxSP_ARROW_KEYS);
    m_spinCtrl2->SetToolTip(
        _("If you enter a non-zero value here, the diff will use that parent of the commit instead of the commit "
          "itself.\nSo if the commit is HEAD, entering 5 will use HEAD~5, the fifth parent."));
    m_spinCtrl2->SetRange(0, 999);
    m_spinCtrl2->SetValue(0);

    flexGridSizer614->Add(m_spinCtrl2, 0, wxRIGHT | wxTOP | wxBOTTOM, WXC_FROM_DIP(5));

    boxSizer420->Add(0, 0, 1, 0, WXC_FROM_DIP(0));

    m_stdBtnSizer429 = new wxStdDialogButtonSizer();

    boxSizer420->Add(m_stdBtnSizer429, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(10));

    m_button431 = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_stdBtnSizer429->AddButton(m_button431);

    m_button433 = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_stdBtnSizer429->AddButton(m_button433);
    m_stdBtnSizer429->Realize();

    SetName(wxT("GitDiffChooseCommitishDlgBase"));
    SetSize(wxDLG_UNIT(this, wxSize(-1, -1)));
    if(GetSizer()) {
        GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
    // Connect events
    m_radioBranch1->Bind(wxEVT_COMMAND_RADIOBUTTON_SELECTED, &GitDiffChooseCommitishDlgBase::OnRadioBranch1Selected,
                         this);
    m_choiceBranch1->Bind(wxEVT_UPDATE_UI, &GitDiffChooseCommitishDlgBase::OnUpdateUIBranch1, this);
    m_choiceBranch1->Bind(wxEVT_COMMAND_CHOICE_SELECTED, &GitDiffChooseCommitishDlgBase::OnBranch1Changed, this);
    m_radioTag1->Bind(wxEVT_COMMAND_RADIOBUTTON_SELECTED, &GitDiffChooseCommitishDlgBase::OnRadioTag1Selected, this);
    m_choiceTag1->Bind(wxEVT_UPDATE_UI, &GitDiffChooseCommitishDlgBase::OnUpdateUITags1, this);
    m_radioCommit1->Bind(wxEVT_COMMAND_RADIOBUTTON_SELECTED, &GitDiffChooseCommitishDlgBase::OnRadioCommit1Selected,
                         this);
    m_choiceCommit1->Bind(wxEVT_UPDATE_UI, &GitDiffChooseCommitishDlgBase::OnUpdateUICommit1, this);
    m_radioUserEntered1->Bind(wxEVT_COMMAND_RADIOBUTTON_SELECTED, &GitDiffChooseCommitishDlgBase::OnRadioUser1Selected,
                              this);
    m_comboCommitish1->Bind(wxEVT_UPDATE_UI, &GitDiffChooseCommitishDlgBase::OnUpdateUICommitish1, this);
    m_radioBranch2->Bind(wxEVT_COMMAND_RADIOBUTTON_SELECTED, &GitDiffChooseCommitishDlgBase::OnRadioBranch2Selected,
                         this);
    m_choiceBranch2->Bind(wxEVT_UPDATE_UI, &GitDiffChooseCommitishDlgBase::OnUpdateUIBranch2, this);
    m_radioTag2->Bind(wxEVT_COMMAND_RADIOBUTTON_SELECTED, &GitDiffChooseCommitishDlgBase::OnRadioTag2Selected, this);
    m_choiceTag2->Bind(wxEVT_UPDATE_UI, &GitDiffChooseCommitishDlgBase::OnUpdateUITags2, this);
    m_radioCommit2->Bind(wxEVT_COMMAND_RADIOBUTTON_SELECTED, &GitDiffChooseCommitishDlgBase::OnRadioCommit2Selected,
                         this);
    m_choiceCommit2->Bind(wxEVT_UPDATE_UI, &GitDiffChooseCommitishDlgBase::OnUpdateUICommit2, this);
    m_radioUserEntered2->Bind(wxEVT_COMMAND_RADIOBUTTON_SELECTED, &GitDiffChooseCommitishDlgBase::OnRadioUser2Selected,
                              this);
    m_comboCommitish2->Bind(wxEVT_UPDATE_UI, &GitDiffChooseCommitishDlgBase::OnUpdateUICommitish2, this);
    m_textFirst->Bind(wxEVT_UPDATE_UI, &GitDiffChooseCommitishDlgBase::OnTextFirstUI, this);
    m_textSecond->Bind(wxEVT_UPDATE_UI, &GitDiffChooseCommitishDlgBase::OnTextSecondUI, this);
}

GitDiffChooseCommitishDlgBase::~GitDiffChooseCommitishDlgBase()
{
    m_radioBranch1->Unbind(wxEVT_COMMAND_RADIOBUTTON_SELECTED, &GitDiffChooseCommitishDlgBase::OnRadioBranch1Selected,
                           this);
    m_choiceBranch1->Unbind(wxEVT_UPDATE_UI, &GitDiffChooseCommitishDlgBase::OnUpdateUIBranch1, this);
    m_choiceBranch1->Unbind(wxEVT_COMMAND_CHOICE_SELECTED, &GitDiffChooseCommitishDlgBase::OnBranch1Changed, this);
    m_radioTag1->Unbind(wxEVT_COMMAND_RADIOBUTTON_SELECTED, &GitDiffChooseCommitishDlgBase::OnRadioTag1Selected, this);
    m_choiceTag1->Unbind(wxEVT_UPDATE_UI, &GitDiffChooseCommitishDlgBase::OnUpdateUITags1, this);
    m_radioCommit1->Unbind(wxEVT_COMMAND_RADIOBUTTON_SELECTED, &GitDiffChooseCommitishDlgBase::OnRadioCommit1Selected,
                           this);
    m_choiceCommit1->Unbind(wxEVT_UPDATE_UI, &GitDiffChooseCommitishDlgBase::OnUpdateUICommit1, this);
    m_radioUserEntered1->Unbind(wxEVT_COMMAND_RADIOBUTTON_SELECTED,
                                &GitDiffChooseCommitishDlgBase::OnRadioUser1Selected, this);
    m_comboCommitish1->Unbind(wxEVT_UPDATE_UI, &GitDiffChooseCommitishDlgBase::OnUpdateUICommitish1, this);
    m_radioBranch2->Unbind(wxEVT_COMMAND_RADIOBUTTON_SELECTED, &GitDiffChooseCommitishDlgBase::OnRadioBranch2Selected,
                           this);
    m_choiceBranch2->Unbind(wxEVT_UPDATE_UI, &GitDiffChooseCommitishDlgBase::OnUpdateUIBranch2, this);
    m_radioTag2->Unbind(wxEVT_COMMAND_RADIOBUTTON_SELECTED, &GitDiffChooseCommitishDlgBase::OnRadioTag2Selected, this);
    m_choiceTag2->Unbind(wxEVT_UPDATE_UI, &GitDiffChooseCommitishDlgBase::OnUpdateUITags2, this);
    m_radioCommit2->Unbind(wxEVT_COMMAND_RADIOBUTTON_SELECTED, &GitDiffChooseCommitishDlgBase::OnRadioCommit2Selected,
                           this);
    m_choiceCommit2->Unbind(wxEVT_UPDATE_UI, &GitDiffChooseCommitishDlgBase::OnUpdateUICommit2, this);
    m_radioUserEntered2->Unbind(wxEVT_COMMAND_RADIOBUTTON_SELECTED,
                                &GitDiffChooseCommitishDlgBase::OnRadioUser2Selected, this);
    m_comboCommitish2->Unbind(wxEVT_UPDATE_UI, &GitDiffChooseCommitishDlgBase::OnUpdateUICommitish2, this);
    m_textFirst->Unbind(wxEVT_UPDATE_UI, &GitDiffChooseCommitishDlgBase::OnTextFirstUI, this);
    m_textSecond->Unbind(wxEVT_UPDATE_UI, &GitDiffChooseCommitishDlgBase::OnTextSecondUI, this);
}

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, WXC_FROM_DIP(5));

    m_staticText22 =
        new wxStaticText(this, wxID_ANY, _("Clone URL:"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    flexGridSizer21->Add(m_staticText22, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_textCtrlURL = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(400, -1)), 0);
    m_textCtrlURL->SetToolTip(_("git URL to clone"));
#if wxVERSION_NUMBER >= 3000
    m_textCtrlURL->SetHint(wxT(""));
#endif

    flexGridSizer21->Add(m_textCtrlURL, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText24 = new wxStaticText(this, wxID_ANY, _("Target Directory:"), wxDefaultPosition,
                                      wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    flexGridSizer21->Add(m_staticText24, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_dirPickerTargetDir = new wxDirPickerCtrl(this, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition,
                                               wxDLG_UNIT(this, wxSize(-1, -1)),
                                               wxDIRP_DEFAULT_STYLE | wxDIRP_USE_TEXTCTRL | wxDIRP_DIR_MUST_EXIST);
    m_dirPickerTargetDir->SetToolTip(_("Clone the sources into this target directory"));

    flexGridSizer21->Add(m_dirPickerTargetDir, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    flexGridSizer21->Add(0, 0, 0, wxALL, WXC_FROM_DIP(5));

    m_stdBtnSizer294 = new wxStdDialogButtonSizer();

    boxSizer17->Add(m_stdBtnSizer294, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5));

    m_buttonOk = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_buttonOk->SetDefault();
    m_stdBtnSizer294->AddButton(m_buttonOk);

    m_buttonCancel = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_stdBtnSizer294->AddButton(m_buttonCancel);
    m_stdBtnSizer294->Realize();

    SetName(wxT("gitCloneDlgBaseClass"));
    SetSize(wxDLG_UNIT(this, wxSize(-1, -1)));
    if(GetSizer()) {
        GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
    // Connect events
    m_buttonOk->Bind(wxEVT_UPDATE_UI, &gitCloneDlgBaseClass::OnOKUI, this);
}

gitCloneDlgBaseClass::~gitCloneDlgBaseClass()
{
    m_buttonOk->Unbind(wxEVT_UPDATE_UI, &gitCloneDlgBaseClass::OnOKUI, 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) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxCrafterpca4kKInitBitmapResources();
        bBitmapLoaded = true;
    }

    wxBoxSizer* boxSizer124 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer124);

    m_editor = new GitCommitEditor(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(500, 300)), 0);
    // Configure the fold margin
    m_editor->SetMarginType(4, wxSTC_MARGIN_SYMBOL);
    m_editor->SetMarginMask(4, wxSTC_MASK_FOLDERS);
    m_editor->SetMarginSensitive(4, true);
    m_editor->SetMarginWidth(4, 0);

    // Configure the tracker margin
    m_editor->SetMarginWidth(1, 0);

    // Configure the symbol margin
    m_editor->SetMarginType(2, wxSTC_MARGIN_SYMBOL);
    m_editor->SetMarginMask(2, ~(wxSTC_MASK_FOLDERS));
    m_editor->SetMarginWidth(2, 0);
    m_editor->SetMarginSensitive(2, true);

    // Configure the line numbers margin
    m_editor->SetMarginType(0, wxSTC_MARGIN_NUMBER);
    m_editor->SetMarginWidth(0, 0);

    // Configure the line symbol margin
    m_editor->SetMarginType(3, wxSTC_MARGIN_FORE);
    m_editor->SetMarginMask(3, 0);
    m_editor->SetMarginWidth(3, 0);
    // Select the lexer
    m_editor->SetLexer(wxSTC_LEX_DIFF);
    // Set default font / styles
    m_editor->StyleClearAll();
    m_editor->SetWrapMode(0);
    m_editor->SetIndentationGuides(0);
    m_editor->SetKeyWords(0, wxT(""));
    m_editor->SetKeyWords(1, wxT(""));
    m_editor->SetKeyWords(2, wxT(""));
    m_editor->SetKeyWords(3, wxT(""));
    m_editor->SetKeyWords(4, wxT(""));

    boxSizer124->Add(m_editor, 1, wxLEFT | wxRIGHT | wxBOTTOM | wxEXPAND, WXC_FROM_DIP(5));

    m_stdBtnSizer306 = new wxStdDialogButtonSizer();

    boxSizer124->Add(m_stdBtnSizer306, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5));

    m_button308 = new wxButton(this, wxID_CLOSE, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_button308->SetDefault();
    m_stdBtnSizer306->AddButton(m_button308);

    m_button310 = new wxButton(this, wxID_SAVE, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_stdBtnSizer306->AddButton(m_button310);
    m_stdBtnSizer306->Realize();

    SetName(wxT("GitFileDiffDlgBase"));
    SetSize(wxDLG_UNIT(this, wxSize(-1, -1)));
    if(GetSizer()) {
        GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
    // Connect events
    m_button308->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &GitFileDiffDlgBase::OnCloseDialog, this);
    m_button310->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &GitFileDiffDlgBase::OnSaveAsPatch, this);
}

GitFileDiffDlgBase::~GitFileDiffDlgBase()
{
    m_button308->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &GitFileDiffDlgBase::OnCloseDialog, this);
    m_button310->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &GitFileDiffDlgBase::OnSaveAsPatch, this);
}

GitApplyPatchDlgBase::GitApplyPatchDlgBase(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* boxSizer154 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer154);

    wxFlexGridSizer* flexGridSizer162 = new wxFlexGridSizer(0, 2, 0, 0);
    flexGridSizer162->SetFlexibleDirection(wxBOTH);
    flexGridSizer162->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
    flexGridSizer162->AddGrowableCol(1);

    boxSizer154->Add(flexGridSizer162, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText164 = new wxStaticText(this, wxID_ANY, _("Select patch file"), wxDefaultPosition,
                                       wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    flexGridSizer162->Add(m_staticText164, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_filePickerPatchFile =
        new wxFilePickerCtrl(this, wxID_ANY, wxEmptyString, _("Select a file"),
                             wxT("Patch files (*.diff;*.patch)|*.diff;*.patch|All Files (*)|*"), wxDefaultPosition,
                             wxDLG_UNIT(this, wxSize(300, -1)), wxFLP_DEFAULT_STYLE | wxFLP_USE_TEXTCTRL);
    m_filePickerPatchFile->SetToolTip(_("Patch file to apply"));
    m_filePickerPatchFile->SetFocus();

    flexGridSizer162->Add(m_filePickerPatchFile, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText168 = new wxStaticText(this, wxID_ANY, _("git apply additional flags to use:"), wxDefaultPosition,
                                       wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    flexGridSizer162->Add(m_staticText168, 0, wxALL | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_textCtrlExtraFlags =
        new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_textCtrlExtraFlags->SetToolTip(_("By default, codelite uses the command 'git apply --whitespace=nowarn "
                                       "--ignore-whitespace' for applying patch files.\nSet here an extra flags to use "
                                       "with this command, e.g.:\n\n--reverse\n\nSee the git manual for more options"));
#if wxVERSION_NUMBER >= 3000
    m_textCtrlExtraFlags->SetHint(wxT(""));
#endif

    flexGridSizer162->Add(m_textCtrlExtraFlags, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_stdBtnSizer300 = new wxStdDialogButtonSizer();

    boxSizer154->Add(m_stdBtnSizer300, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5));

    m_buttonCancel = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_stdBtnSizer300->AddButton(m_buttonCancel);

    m_buttonOK = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_buttonOK->SetDefault();
    m_stdBtnSizer300->AddButton(m_buttonOK);
    m_stdBtnSizer300->Realize();

    SetName(wxT("GitApplyPatchDlgBase"));
    SetSize(wxDLG_UNIT(this, wxSize(-1, -1)));
    if(GetSizer()) {
        GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
}

GitApplyPatchDlgBase::~GitApplyPatchDlgBase() {}

GitConsoleBase::GitConsoleBase(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style)
    : wxPanel(parent, id, pos, size, style)
{
    if(!bBitmapLoaded) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxCrafterpca4kKInitBitmapResources();
        bBitmapLoaded = true;
    }

    wxBoxSizer* boxSizer36 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer36);

    m_toolbar = new clToolBar(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), wxTB_NODIVIDER);
    m_toolbar->SetToolBitmapSize(wxSize(16, 16));

    boxSizer36->Add(m_toolbar, 0, wxEXPAND, WXC_FROM_DIP(5));

    wxBoxSizer* boxSizer711 = new wxBoxSizer(wxVERTICAL);

    boxSizer36->Add(boxSizer711, 1, wxEXPAND, WXC_FROM_DIP(2));

    m_splitter733 = new clThemedSplitterWindow(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)),
                                               wxSP_LIVE_UPDATE | wxSP_NO_XP_THEME | wxSP_3DSASH);
    m_splitter733->SetSashGravity(0.5);
    m_splitter733->SetMinimumPaneSize(10);

    boxSizer711->Add(m_splitter733, 1, wxEXPAND, WXC_FROM_DIP(5));

    m_splitterPage737 = new wxPanel(m_splitter733, wxID_ANY, wxDefaultPosition,
                                    wxDLG_UNIT(m_splitter733, wxSize(-1, -1)), wxTAB_TRAVERSAL);

    wxBoxSizer* boxSizer715 = new wxBoxSizer(wxHORIZONTAL);
    m_splitterPage737->SetSizer(boxSizer715);

    m_notebookChanges = new clGenericNotebook(m_splitterPage737, wxID_ANY, wxDefaultPosition,
                                              wxDLG_UNIT(m_splitterPage737, wxSize(-1, -1)), kNotebook_BottomTabs);
    m_notebookChanges->SetName(wxT("m_notebookChanges"));

    boxSizer715->Add(m_notebookChanges, 1, wxEXPAND, WXC_FROM_DIP(2));

    m_panel674 = new wxPanel(m_notebookChanges, wxID_ANY, wxDefaultPosition,
                             wxDLG_UNIT(m_notebookChanges, wxSize(-1, -1)), wxTAB_TRAVERSAL);
    m_notebookChanges->AddPage(m_panel674, _("Changes"), true);

    wxBoxSizer* boxSizer678 = new wxBoxSizer(wxVERTICAL);
    m_panel674->SetSizer(boxSizer678);

    m_dvListCtrl = new clThemedOrderedListCtrl(
        m_panel674, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panel674, wxSize(-1, -1)),
        wxDV_NO_HEADER | wxDV_ROW_LINES | wxDV_MULTIPLE | wxTRANSPARENT_WINDOW | get_border_simple_theme_aware_bit());

    boxSizer678->Add(m_dvListCtrl, 1, wxEXPAND, WXC_FROM_DIP(2));

    m_dvListCtrl->AppendTextColumn(_("?"), wxDATAVIEW_CELL_INERT, WXC_FROM_DIP(-2), wxALIGN_CENTER,
                                   wxDATAVIEW_COL_RESIZABLE);
    m_dvListCtrl->AppendIconTextColumn(_("Path"), wxDATAVIEW_CELL_INERT, WXC_FROM_DIP(-2), wxALIGN_LEFT,
                                       wxDATAVIEW_COL_RESIZABLE);
    m_panelUnversioned = new wxPanel(m_notebookChanges, wxID_ANY, wxDefaultPosition,
                                     wxDLG_UNIT(m_notebookChanges, wxSize(-1, -1)), wxTAB_TRAVERSAL);
    m_notebookChanges->AddPage(m_panelUnversioned, _("Untracked"), false);

    wxBoxSizer* boxSizer680 = new wxBoxSizer(wxVERTICAL);
    m_panelUnversioned->SetSizer(boxSizer680);

    m_dvListCtrlUnversioned = new clThemedOrderedListCtrl(m_panelUnversioned, wxID_ANY, wxDefaultPosition,
                                                          wxDLG_UNIT(m_panelUnversioned, wxSize(-1, -1)),
                                                          wxDV_NO_HEADER | wxDV_ROW_LINES | wxDV_MULTIPLE);

    boxSizer680->Add(m_dvListCtrlUnversioned, 1, wxEXPAND, WXC_FROM_DIP(2));

    m_dvListCtrlUnversioned->AppendTextColumn(_("Path"), wxDATAVIEW_CELL_INERT, WXC_FROM_DIP(-2), wxALIGN_LEFT,
                                              wxDATAVIEW_COL_RESIZABLE);
    m_splitterPage741 = new wxPanel(m_splitter733, wxID_ANY, wxDefaultPosition,
                                    wxDLG_UNIT(m_splitter733, wxSize(-1, -1)), wxTAB_TRAVERSAL);
    m_splitter733->SplitVertically(m_splitterPage737, m_splitterPage741, 0);

    wxBoxSizer* boxSizer743 = new wxBoxSizer(wxVERTICAL);
    m_splitterPage741->SetSizer(boxSizer743);

    m_notebookLog = new clGenericNotebook(m_splitterPage741, wxID_ANY, wxDefaultPosition,
                                          wxDLG_UNIT(m_splitterPage741, wxSize(-1, -1)), kNotebook_HideTabBar);
    m_notebookLog->SetName(wxT("m_notebookLog"));

    boxSizer743->Add(m_notebookLog, 1, wxEXPAND, WXC_FROM_DIP(5));

    m_panel_log = new wxPanel(m_notebookLog, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebookLog, wxSize(-1, -1)),
                              wxTAB_TRAVERSAL);
    m_notebookLog->AddPage(m_panel_log, _("Output"), false);

    wxBoxSizer* boxSizer729 = new wxBoxSizer(wxVERTICAL);
    m_panel_log->SetSizer(boxSizer729);

    m_dvListCtrlLog = new clTerminalViewCtrl(
        m_panel_log, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panel_log, wxSize(-1, -1)),
        wxDV_NO_HEADER | wxDV_SINGLE | wxTRANSPARENT_WINDOW | get_border_simple_theme_aware_bit());

    boxSizer729->Add(m_dvListCtrlLog, 1, wxEXPAND, WXC_FROM_DIP(5));

    m_gauge = new wxGauge(this, wxID_ANY, 100, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), wxGA_HORIZONTAL);
    m_gauge->SetValue(10);

    boxSizer36->Add(m_gauge, 0, wxEXPAND, WXC_FROM_DIP(5));

    SetName(wxT("GitConsoleBase"));
    SetSize(wxDLG_UNIT(this, wxSize(500, 300)));
    if(GetSizer()) {
        GetSizer()->Fit(this);
    }
    // Connect events
    m_dvListCtrl->Bind(wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU, &GitConsoleBase::OnContextMenu, this);
    m_dvListCtrl->Bind(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, &GitConsoleBase::OnFileActivated, this);
    m_dvListCtrl->Bind(wxEVT_UPDATE_UI, &GitConsoleBase::OnUpdateUI, this);
    m_dvListCtrlUnversioned->Bind(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, &GitConsoleBase::OnUnversionedFileActivated,
                                  this);
    m_dvListCtrlUnversioned->Bind(wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU,
                                  &GitConsoleBase::OnUnversionedFileContextMenu, this);
}

GitConsoleBase::~GitConsoleBase()
{
    m_dvListCtrl->Unbind(wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU, &GitConsoleBase::OnContextMenu, this);
    m_dvListCtrl->Unbind(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, &GitConsoleBase::OnFileActivated, this);
    m_dvListCtrl->Unbind(wxEVT_UPDATE_UI, &GitConsoleBase::OnUpdateUI, this);
    m_dvListCtrlUnversioned->Unbind(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, &GitConsoleBase::OnUnversionedFileActivated,
                                    this);
    m_dvListCtrlUnversioned->Unbind(wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU,
                                    &GitConsoleBase::OnUnversionedFileContextMenu, this);
}

GitBlameDlgBase::GitBlameDlgBase(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* boxSizer374 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer374);

    m_auibar436 = new wxAuiToolBar(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)),
                                   wxAUI_TB_PLAIN_BACKGROUND | wxAUI_TB_DEFAULT_STYLE);
    m_auibar436->SetToolBitmapSize(wxSize(16, 16));

    boxSizer374->Add(m_auibar436, 0, wxEXPAND, WXC_FROM_DIP(5));

    m_auibar436->AddTool(XRCID("m_tbBack"), _("Previous"), wxXmlResource::Get()->LoadBitmap(wxT("24-back")),
                         wxNullBitmap, wxITEM_NORMAL, _("Go backwards to earlier commit's blame"),
                         _("Show earlier commit's blame"), NULL);

    m_auibar436->AddTool(XRCID("m_tbForward"), _("Next"), wxXmlResource::Get()->LoadBitmap(wxT("24-forward")),
                         wxNullBitmap, wxITEM_NORMAL, _("Go forward to more-recent commit's blame"),
                         _("Show next-seen commit's blame"), NULL);

    wxArrayString m_choiceHistoryArr;
    m_choiceHistoryArr.Add(_("abcd4444 (HEAD)"));
    m_choiceHistory = new wxChoice(m_auibar436, XRCID("m_choiceHistory"), wxDefaultPosition,
                                   wxDLG_UNIT(m_auibar436, wxSize(-1, -1)), m_choiceHistoryArr, 0);
    m_choiceHistory->SetToolTip(_("Previously-visited commits. Note that these are listed in the order that you "
                                  "visited them, not commit-date order."));
    m_auibar436->AddControl(m_choiceHistory);

    m_staticText414 = new wxStaticText(m_auibar436, wxID_ANY, _("    Extra arguments:"), wxDefaultPosition,
                                       wxDLG_UNIT(m_auibar436, wxSize(-1, -1)), 0);
    m_auibar436->AddControl(m_staticText414);

    wxArrayString m_comboExtraArgsArr;
    m_comboExtraArgsArr.Add(_("-L 123,130 foo bar"));
    m_comboExtraArgs = new wxComboBox(m_auibar436, XRCID("m_comboExtraArgs"), wxT(""), wxDefaultPosition,
                                      wxDLG_UNIT(m_auibar436, wxSize(-1, -1)), m_comboExtraArgsArr, wxTE_PROCESS_ENTER);
    m_comboExtraArgs->SetToolTip(_("Optional extra arguments that you wish passed to git blame.\nAn example might be: "
                                   "-L 100,130\nNote that this is _not_ sanity-checked, it's added just as it is."));
#if wxVERSION_NUMBER >= 3000
    m_comboExtraArgs->SetHint(wxT(""));
#endif
    m_auibar436->AddControl(m_comboExtraArgs);

    m_auibar436->AddTool(XRCID("m_toolbarItemRefresh"), _("Refresh"),
                         wxXmlResource::Get()->LoadBitmap(wxT("24-debugger_restart")), wxNullBitmap, wxITEM_NORMAL,
                         _("Redo the current commit's blame"), _("Redo the current commit's blame"), NULL);

    m_auibar436->AddStretchSpacer(1);

    m_auibar436->AddTool(XRCID("m_toolbarItemSettings"), _("Settings"), wxXmlResource::Get()->LoadBitmap(wxT("24-cog")),
                         wxNullBitmap, wxITEM_NORMAL, _("Settings"), wxT(""), NULL);
    m_auibar436->Realize();

    m_splitterMain = new wxSplitterWindow(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(800, 600)),
                                          wxSP_LIVE_UPDATE | wxSP_3DSASH);
    m_splitterMain->SetSashGravity(0.3);
    m_splitterMain->SetMinimumPaneSize(100);

    boxSizer374->Add(m_splitterMain, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_splitterPageTop = new wxPanel(m_splitterMain, wxID_ANY, wxDefaultPosition,
                                    wxDLG_UNIT(m_splitterMain, wxSize(-1, -1)), wxTAB_TRAVERSAL);

    wxBoxSizer* boxSizer205 = new wxBoxSizer(wxVERTICAL);
    m_splitterPageTop->SetSizer(boxSizer205);

    m_stcBlame = new wxStyledTextCtrl(m_splitterPageTop, wxID_ANY, wxDefaultPosition,
                                      wxDLG_UNIT(m_splitterPageTop, wxSize(-1, -1)), 0);
    // Configure the fold margin
    m_stcBlame->SetMarginType(4, wxSTC_MARGIN_SYMBOL);
    m_stcBlame->SetMarginMask(4, wxSTC_MASK_FOLDERS);
    m_stcBlame->SetMarginSensitive(4, true);
    m_stcBlame->SetMarginWidth(4, 0);

    // Configure the tracker margin
    m_stcBlame->SetMarginWidth(1, 0);

    // Configure the symbol margin
    m_stcBlame->SetMarginType(2, wxSTC_MARGIN_SYMBOL);
    m_stcBlame->SetMarginMask(2, ~(wxSTC_MASK_FOLDERS));
    m_stcBlame->SetMarginWidth(2, 0);
    m_stcBlame->SetMarginSensitive(2, true);

    // Configure the line numbers margin
    m_stcBlame->SetMarginType(0, wxSTC_MARGIN_NUMBER);
    m_stcBlame->SetMarginWidth(0, 0);

    // Configure the line symbol margin
    m_stcBlame->SetMarginType(3, wxSTC_MARGIN_FORE);
    m_stcBlame->SetMarginMask(3, 0);
    m_stcBlame->SetMarginWidth(3, 0);
    // Select the lexer
    m_stcBlame->SetLexer(wxSTC_LEX_NULL);
    // Set default font / styles
    m_stcBlame->StyleClearAll();
    m_stcBlame->SetWrapMode(0);
    m_stcBlame->SetIndentationGuides(0);
    m_stcBlame->SetKeyWords(0, wxT(""));
    m_stcBlame->SetKeyWords(1, wxT(""));
    m_stcBlame->SetKeyWords(2, wxT(""));
    m_stcBlame->SetKeyWords(3, wxT(""));
    m_stcBlame->SetKeyWords(4, wxT(""));

    boxSizer205->Add(m_stcBlame, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_splitterPageBottom = new wxPanel(m_splitterMain, wxID_ANY, wxDefaultPosition,
                                       wxDLG_UNIT(m_splitterMain, wxSize(-1, -1)), wxTAB_TRAVERSAL);
    m_splitterMain->SplitHorizontally(m_splitterPageTop, m_splitterPageBottom, 0);

    wxBoxSizer* boxSizer184 = new wxBoxSizer(wxVERTICAL);
    m_splitterPageBottom->SetSizer(boxSizer184);

    m_splitterH =
        new wxSplitterWindow(m_splitterPageBottom, wxID_ANY, wxDefaultPosition,
                             wxDLG_UNIT(m_splitterPageBottom, wxSize(-1, -1)), wxSP_LIVE_UPDATE | wxSP_3DSASH);
    m_splitterH->SetSashGravity(0.5);
    m_splitterH->SetMinimumPaneSize(10);

    boxSizer184->Add(m_splitterH, 1, wxEXPAND, WXC_FROM_DIP(2));

    m_splitterPage194 =
        new wxPanel(m_splitterH, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_splitterH, wxSize(-1, -1)), wxTAB_TRAVERSAL);

    wxBoxSizer* boxSizer218 = new wxBoxSizer(wxVERTICAL);
    m_splitterPage194->SetSizer(boxSizer218);

    m_staticText220 = new wxStaticText(m_splitterPage194, wxID_ANY, _("Commit message:"), wxDefaultPosition,
                                       wxDLG_UNIT(m_splitterPage194, wxSize(-1, -1)), 0);

    boxSizer218->Add(m_staticText220, 0, wxALL, WXC_FROM_DIP(5));

    m_stcCommitMessage = new wxStyledTextCtrl(m_splitterPage194, wxID_ANY, wxDefaultPosition,
                                              wxDLG_UNIT(m_splitterPage194, 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);

    // Configure the tracker margin
    m_stcCommitMessage->SetMarginWidth(1, 0);

    // 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);

    // Configure the line numbers margin
    m_stcCommitMessage->SetMarginType(0, wxSTC_MARGIN_NUMBER);
    m_stcCommitMessage->SetMarginWidth(0, 0);

    // 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, WXC_FROM_DIP(2));

    m_splitterPage190 =
        new wxPanel(m_splitterH, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_splitterH, wxSize(-1, -1)), wxTAB_TRAVERSAL);
    m_splitterH->SplitHorizontally(m_splitterPage194, m_splitterPage190, 0);

    wxBoxSizer* bSizer18 = new wxBoxSizer(wxHORIZONTAL);
    m_splitterPage190->SetSizer(bSizer18);

    m_splitterV = new wxSplitterWindow(m_splitterPage190, wxID_ANY, wxDefaultPosition,
                                       wxDLG_UNIT(m_splitterPage190, wxSize(-1, -1)), wxSP_LIVE_UPDATE | wxSP_3DSASH);
    m_splitterV->SetSashGravity(0);
    m_splitterV->SetMinimumPaneSize(100);

    bSizer18->Add(m_splitterV, 1, wxEXPAND, WXC_FROM_DIP(2));

    m_splitterPage200 =
        new wxPanel(m_splitterV, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_splitterV, wxSize(-1, -1)), wxTAB_TRAVERSAL);

    wxBoxSizer* boxSizer208 = new wxBoxSizer(wxVERTICAL);
    m_splitterPage200->SetSizer(boxSizer208);

    m_staticText210 = new wxStaticText(m_splitterPage200, wxID_ANY, _("Modified files:"), wxDefaultPosition,
                                       wxDLG_UNIT(m_splitterPage200, wxSize(-1, -1)), 0);

    boxSizer208->Add(m_staticText210, 0, wxALL, WXC_FROM_DIP(5));

    wxArrayString m_fileListBoxArr;
    m_fileListBox = new wxListBox(m_splitterPage200, wxID_ANY, wxDefaultPosition,
                                  wxDLG_UNIT(m_splitterPage200, wxSize(-1, -1)), m_fileListBoxArr, 0);

    boxSizer208->Add(m_fileListBox, 1, wxALL | wxEXPAND, WXC_FROM_DIP(2));

    m_splitterPage204 =
        new wxPanel(m_splitterV, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_splitterV, wxSize(-1, -1)), wxTAB_TRAVERSAL);
    m_splitterV->SplitVertically(m_splitterPage200, m_splitterPage204, 0);

    wxBoxSizer* boxSizer215 = new wxBoxSizer(wxVERTICAL);
    m_splitterPage204->SetSizer(boxSizer215);

    m_staticText217 = new wxStaticText(m_splitterPage204, wxID_ANY, _("Diff:"), wxDefaultPosition,
                                       wxDLG_UNIT(m_splitterPage204, wxSize(-1, -1)), 0);

    boxSizer215->Add(m_staticText217, 0, wxALL, WXC_FROM_DIP(5));

    m_stcDiff = new wxStyledTextCtrl(m_splitterPage204, wxID_ANY, wxDefaultPosition,
                                     wxDLG_UNIT(m_splitterPage204, wxSize(-1, -1)), wxBORDER_THEME);
    // Configure the fold margin
    m_stcDiff->SetMarginType(4, wxSTC_MARGIN_SYMBOL);
    m_stcDiff->SetMarginMask(4, wxSTC_MASK_FOLDERS);
    m_stcDiff->SetMarginSensitive(4, true);
    m_stcDiff->SetMarginWidth(4, 0);

    // Configure the tracker margin
    m_stcDiff->SetMarginWidth(1, 0);

    // Configure the symbol margin
    m_stcDiff->SetMarginType(2, wxSTC_MARGIN_SYMBOL);
    m_stcDiff->SetMarginMask(2, ~(wxSTC_MASK_FOLDERS));
    m_stcDiff->SetMarginWidth(2, 0);
    m_stcDiff->SetMarginSensitive(2, true);

    // Configure the line numbers margin
    m_stcDiff->SetMarginType(0, wxSTC_MARGIN_NUMBER);
    m_stcDiff->SetMarginWidth(0, 0);

    // Configure the line symbol margin
    m_stcDiff->SetMarginType(3, wxSTC_MARGIN_FORE);
    m_stcDiff->SetMarginMask(3, 0);
    m_stcDiff->SetMarginWidth(3, 0);
    // Select the lexer
    m_stcDiff->SetLexer(wxSTC_LEX_DIFF);
    // Set default font / styles
    m_stcDiff->StyleClearAll();
    m_stcDiff->SetWrapMode(0);
    m_stcDiff->SetIndentationGuides(0);
    m_stcDiff->SetKeyWords(0, wxT(""));
    m_stcDiff->SetKeyWords(1, wxT(""));
    m_stcDiff->SetKeyWords(2, wxT(""));
    m_stcDiff->SetKeyWords(3, wxT(""));
    m_stcDiff->SetKeyWords(4, wxT(""));

    boxSizer215->Add(m_stcDiff, 1, wxALL | wxEXPAND, WXC_FROM_DIP(2));

    m_stdBtnSizer306 = new wxStdDialogButtonSizer();

    boxSizer374->Add(m_stdBtnSizer306, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5));

    m_button308 = new wxButton(this, wxID_CLOSE, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_button308->SetDefault();
    m_stdBtnSizer306->AddButton(m_button308);
    m_stdBtnSizer306->Realize();

    SetName(wxT("GitBlameDlgBase"));
    SetSize(wxDLG_UNIT(this, wxSize(-1, -1)));
    if(GetSizer()) {
        GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
    // Connect events
    this->Bind(wxEVT_COMMAND_TOOL_CLICKED, &GitBlameDlgBase::OnPreviousBlame, this, XRCID("m_tbBack"));
    this->Bind(wxEVT_UPDATE_UI, &GitBlameDlgBase::OnBackUpdateUI, this, XRCID("m_tbBack"));
    this->Bind(wxEVT_COMMAND_TOOL_CLICKED, &GitBlameDlgBase::OnNextBlame, this, XRCID("m_tbForward"));
    this->Bind(wxEVT_UPDATE_UI, &GitBlameDlgBase::OnForwardUpdateUI, this, XRCID("m_tbForward"));
    m_choiceHistory->Bind(wxEVT_COMMAND_CHOICE_SELECTED, &GitBlameDlgBase::OnHistoryItemSelected, this);
    m_comboExtraArgs->Bind(wxEVT_COMMAND_TEXT_ENTER, &GitBlameDlgBase::OnExtraArgsTextEnter, this);
    this->Bind(wxEVT_COMMAND_TOOL_CLICKED, &GitBlameDlgBase::OnRefreshBlame, this, XRCID("m_toolbarItemRefresh"));
    this->Bind(wxEVT_COMMAND_TOOL_CLICKED, &GitBlameDlgBase::OnSettings, this, XRCID("m_toolbarItemSettings"));
    m_stcBlame->Bind(wxEVT_LEFT_DCLICK, &GitBlameDlgBase::OnStcblameLeftDclick, this);
    m_stcBlame->Bind(wxEVT_LEFT_DOWN, &GitBlameDlgBase::OnSelectionChanged, this);
    m_fileListBox->Bind(wxEVT_COMMAND_LISTBOX_SELECTED, &GitBlameDlgBase::OnChangeFile, this);
    m_button308->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &GitBlameDlgBase::OnCloseDialog, this);
}

GitBlameDlgBase::~GitBlameDlgBase()
{
    this->Unbind(wxEVT_COMMAND_TOOL_CLICKED, &GitBlameDlgBase::OnPreviousBlame, this, XRCID("m_tbBack"));
    this->Unbind(wxEVT_UPDATE_UI, &GitBlameDlgBase::OnBackUpdateUI, this, XRCID("m_tbBack"));
    this->Unbind(wxEVT_COMMAND_TOOL_CLICKED, &GitBlameDlgBase::OnNextBlame, this, XRCID("m_tbForward"));
    this->Unbind(wxEVT_UPDATE_UI, &GitBlameDlgBase::OnForwardUpdateUI, this, XRCID("m_tbForward"));
    m_choiceHistory->Unbind(wxEVT_COMMAND_CHOICE_SELECTED, &GitBlameDlgBase::OnHistoryItemSelected, this);
    m_comboExtraArgs->Unbind(wxEVT_COMMAND_TEXT_ENTER, &GitBlameDlgBase::OnExtraArgsTextEnter, this);
    this->Unbind(wxEVT_COMMAND_TOOL_CLICKED, &GitBlameDlgBase::OnRefreshBlame, this, XRCID("m_toolbarItemRefresh"));
    this->Unbind(wxEVT_COMMAND_TOOL_CLICKED, &GitBlameDlgBase::OnSettings, this, XRCID("m_toolbarItemSettings"));
    m_stcBlame->Unbind(wxEVT_LEFT_DCLICK, &GitBlameDlgBase::OnStcblameLeftDclick, this);
    m_stcBlame->Unbind(wxEVT_LEFT_DOWN, &GitBlameDlgBase::OnSelectionChanged, this);
    m_fileListBox->Unbind(wxEVT_COMMAND_LISTBOX_SELECTED, &GitBlameDlgBase::OnChangeFile, this);
    m_button308->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &GitBlameDlgBase::OnCloseDialog, this);
}

GitBlameSettingsDlgBase::GitBlameSettingsDlgBase(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* boxSizer420 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer420);

    wxBoxSizer* boxSizer434 = new wxBoxSizer(wxVERTICAL);

    boxSizer420->Add(boxSizer434, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_checkParentCommit = new wxCheckBox(this, wxID_ANY, _("Double-clicking a line shows blame for the parent commit"),
                                         wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_checkParentCommit->SetValue(true);
    m_checkParentCommit->SetToolTip(_("A double-click on a code line refreshes blame, rebasing it either to the commit "
                                      "clicked or to its parent commit.\nMost of the time you will want to see what "
                                      "the code looked like earlier, so will want the parent commit."));

    boxSizer434->Add(m_checkParentCommit, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_checkShowLogControls = new wxCheckBox(this, wxID_ANY, _("Show the log and diff for the selected commit"),
                                            wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_checkShowLogControls->SetValue(true);
    m_checkShowLogControls->SetToolTip(_("When a blame line is selected, the commit log message and diff are shown at "
                                         "the bottom of the dialog. Uncheck this box to hide those fields."));

    boxSizer434->Add(m_checkShowLogControls, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_stdBtnSizer429 = new wxStdDialogButtonSizer();

    boxSizer420->Add(m_stdBtnSizer429, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(10));

    m_button431 = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_stdBtnSizer429->AddButton(m_button431);

    m_button433 = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_stdBtnSizer429->AddButton(m_button433);
    m_stdBtnSizer429->Realize();

    SetName(wxT("GitBlameSettingsDlgBase"));
    SetSize(wxDLG_UNIT(this, wxSize(-1, -1)));
    if(GetSizer()) {
        GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
}

GitBlameSettingsDlgBase::~GitBlameSettingsDlgBase() {}

GitResetDlgBase::GitResetDlgBase(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* bSizer4 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(bSizer4);

    m_panel759 = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), wxTAB_TRAVERSAL);

    bSizer4->Add(m_panel759, 1, wxEXPAND, WXC_FROM_DIP(5));

    wxBoxSizer* boxSizer761 = new wxBoxSizer(wxVERTICAL);
    m_panel759->SetSizer(boxSizer761);

    m_staticText585 = new wxStaticText(m_panel759, wxID_ANY, _("These are the file(s) you have chosen to Reset"),
                                       wxDefaultPosition, wxDLG_UNIT(m_panel759, wxSize(-1, -1)), 0);

    boxSizer761->Add(m_staticText585, 0, wxALL | wxALIGN_CENTER, WXC_FROM_DIP(5));

    wxGridSizer* gridSizer563 = new wxGridSizer(0, 2, 0, 0);

    boxSizer761->Add(gridSizer563, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    wxBoxSizer* boxSizer565 = new wxBoxSizer(wxVERTICAL);

    gridSizer563->Add(boxSizer565, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText581 = new wxStaticText(m_panel759, wxID_ANY, _("Altered files"), wxDefaultPosition,
                                       wxDLG_UNIT(m_panel759, wxSize(-1, -1)), 0);

    boxSizer565->Add(m_staticText581, 0, wxALL, WXC_FROM_DIP(5));

    m_clToolbarAltered =
        new clToolBar(m_panel759, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panel759, wxSize(-1, -1)), wxTB_FLAT);
    m_clToolbarAltered->SetToolBitmapSize(wxSize(16, 16));

    boxSizer565->Add(m_clToolbarAltered, 0, wxEXPAND, WXC_FROM_DIP(5));

    wxArrayString m_checkListBoxChangedArr;
    m_checkListBoxChanged = new wxCheckListBox(
        m_panel759, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panel759, wxSize(-1, -1)), m_checkListBoxChangedArr,
        wxLB_SINGLE | wxTRANSPARENT_WINDOW | get_border_simple_theme_aware_bit());
    m_checkListBoxChanged->SetToolTip(_("These are the files that are altered. Select which you want to reset."));

    boxSizer565->Add(m_checkListBoxChanged, 1, wxEXPAND, WXC_FROM_DIP(5));

    wxBoxSizer* boxSizer5651 = new wxBoxSizer(wxVERTICAL);

    gridSizer563->Add(boxSizer5651, 1, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText5815 = new wxStaticText(m_panel759, wxID_ANY, _("Added files"), wxDefaultPosition,
                                        wxDLG_UNIT(m_panel759, wxSize(-1, -1)), 0);

    boxSizer5651->Add(m_staticText5815, 0, wxALL, WXC_FROM_DIP(5));

    m_clToolbarAdded =
        new clToolBar(m_panel759, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panel759, wxSize(-1, -1)), wxTB_FLAT);
    m_clToolbarAdded->SetToolBitmapSize(wxSize(16, 16));

    boxSizer5651->Add(m_clToolbarAdded, 0, wxEXPAND, WXC_FROM_DIP(5));

    wxArrayString m_checkListBoxNewArr;
    m_checkListBoxNew = new wxCheckListBox(m_panel759, wxID_ANY, wxDefaultPosition,
                                           wxDLG_UNIT(m_panel759, wxSize(-1, -1)), m_checkListBoxNewArr,
                                           wxLB_SINGLE | wxTRANSPARENT_WINDOW | get_border_simple_theme_aware_bit());
    m_checkListBoxNew->SetToolTip(_("These are the files that have been added. Select which you want to remove."));

    boxSizer5651->Add(m_checkListBoxNew, 1, wxEXPAND, WXC_FROM_DIP(5));

    m_stdBtnSizer751 = new wxStdDialogButtonSizer();

    boxSizer761->Add(m_stdBtnSizer751, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(10));

    m_button753 =
        new wxButton(m_panel759, wxID_OK, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panel759, wxSize(-1, -1)), 0);
    m_button753->SetDefault();
    m_stdBtnSizer751->AddButton(m_button753);

    m_button755 =
        new wxButton(m_panel759, wxID_CANCEL, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panel759, wxSize(-1, -1)), 0);
    m_stdBtnSizer751->AddButton(m_button755);
    m_stdBtnSizer751->Realize();

    SetName(wxT("GitResetDlgBase"));
    SetSize(wxDLG_UNIT(this, wxSize(-1, -1)));
    if(GetSizer()) {
        GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
}

GitResetDlgBase::~GitResetDlgBase() {}

GitUserEmailDialogBase::GitUserEmailDialogBase(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* boxSizer686 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer686);

    m_staticText704 = new wxStaticText(this, wxID_ANY, _("Please tell me who you are:"), wxDefaultPosition,
                                       wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    boxSizer686->Add(m_staticText704, 0, wxALL, WXC_FROM_DIP(5));

    wxFlexGridSizer* flexGridSizer694 = new wxFlexGridSizer(0, 2, 0, 0);
    flexGridSizer694->SetFlexibleDirection(wxBOTH);
    flexGridSizer694->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
    flexGridSizer694->AddGrowableCol(1);

    boxSizer686->Add(flexGridSizer694, 1, wxALL | wxEXPAND | wxALIGN_TOP, WXC_FROM_DIP(5));

    m_staticText696 =
        new wxStaticText(this, wxID_ANY, _("Username:"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    flexGridSizer694->Add(m_staticText696, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_textCtrlName = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(300, -1)), 0);
#if wxVERSION_NUMBER >= 3000
    m_textCtrlName->SetHint(wxT(""));
#endif

    flexGridSizer694->Add(m_textCtrlName, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_staticText700 =
        new wxStaticText(this, wxID_ANY, _("Email:"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);

    flexGridSizer694->Add(m_staticText700, 0, wxALL | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));

    m_textCtrlEmail = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
#if wxVERSION_NUMBER >= 3000
    m_textCtrlEmail->SetHint(wxT(""));
#endif

    flexGridSizer694->Add(m_textCtrlEmail, 0, wxALL | wxEXPAND, WXC_FROM_DIP(5));

    m_stdBtnSizer688 = new wxStdDialogButtonSizer();

    boxSizer686->Add(m_stdBtnSizer688, 0, wxALL | wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5));

    m_button690 = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_button690->SetDefault();
    m_stdBtnSizer688->AddButton(m_button690);

    m_button692 = new wxButton(this, wxID_CANCEL, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_stdBtnSizer688->AddButton(m_button692);
    m_stdBtnSizer688->Realize();

    SetName(wxT("GitUserEmailDialogBase"));
    SetSize(wxDLG_UNIT(this, wxSize(-1, -1)));
    if(GetSizer()) {
        GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
    // Connect events
    m_button690->Bind(wxEVT_UPDATE_UI, &GitUserEmailDialogBase::OnOKUI, this);
}

GitUserEmailDialogBase::~GitUserEmailDialogBase()
{
    m_button690->Unbind(wxEVT_UPDATE_UI, &GitUserEmailDialogBase::OnOKUI, this);
}
