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

static bool bBitmapLoaded = false;


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;
    }
    // Set icon(s) to the application/dialog
    wxIconBundle app_icons;
    {
        wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("16-git"));
        wxIcon icn;
        icn.CopyFromBitmap(iconBmp);
        app_icons.AddIcon( icn );
    }
    {
        wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("16-git@2x"));
        wxIcon icn;
        icn.CopyFromBitmap(iconBmp);
        app_icons.AddIcon( icn );
    }
    SetIcons( app_icons );

    
    wxBoxSizer* mainSizer = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(mainSizer);
    
    m_treebook230 = new wxTreebook(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-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 current repository 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 letf 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 letf 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_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, 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, WXC_FROM_DIP(5));
    
    m_checkBoxTrackTree = new wxCheckBox(m_panel236, wxID_ANY, _("Colour modified items in the workspace view"), wxDefaultPosition, wxDLG_UNIT(m_panel236, wxSize(-1,-1)), 0);
    m_checkBoxTrackTree->SetValue(false);
    m_checkBoxTrackTree->SetToolTip(_("Colour modified items in the workspace view tree"));
    
    boxSizer766->Add(m_checkBoxTrackTree, 0, wxALL, 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();
    
    
    #if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(m_treebook230)){
        wxPersistenceManager::Get().RegisterAndRestore(m_treebook230);
    } else {
        wxPersistenceManager::Get().Restore(m_treebook230);
    }
    #endif
    m_treebook230->ExpandNode( 0, true );
    m_treebook230->ExpandNode( 1, true );
    m_treebook230->ExpandNode( 2, true );
    
    SetName(wxT("GitSettingsDlgBase"));
    SetSize(-1,-1);
    if (GetSizer()) {
         GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
    // Connect events
    m_staticText254->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(GitSettingsDlgBase::OnLocalRepoUI), NULL, this);
    m_textCtrlLocalName->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(GitSettingsDlgBase::OnLocalRepoUI), NULL, this);
    m_staticText258->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(GitSettingsDlgBase::OnLocalRepoUI), NULL, this);
    m_textCtrlLocalEmail->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(GitSettingsDlgBase::OnLocalRepoUI), NULL, this);
    m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GitSettingsDlgBase::OnOK), NULL, this);
    
}

GitSettingsDlgBase::~GitSettingsDlgBase()
{
    m_staticText254->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(GitSettingsDlgBase::OnLocalRepoUI), NULL, this);
    m_textCtrlLocalName->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(GitSettingsDlgBase::OnLocalRepoUI), NULL, this);
    m_staticText258->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(GitSettingsDlgBase::OnLocalRepoUI), NULL, this);
    m_textCtrlLocalEmail->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(GitSettingsDlgBase::OnLocalRepoUI), NULL, this);
    m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GitSettingsDlgBase::OnOK), NULL, this);
    
}

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;
    }
    // Set icon(s) to the application/dialog
    wxIconBundle app_icons;
    {
        wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("16-git"));
        wxIcon icn;
        icn.CopyFromBitmap(iconBmp);
        app_icons.AddIcon( icn );
    }
    {
        wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("16-git@2x"));
        wxIcon icn;
        icn.CopyFromBitmap(iconBmp);
        app_icons.AddIcon( icn );
    }
    SetIcons( app_icons );

    
    wxBoxSizer* bSizer4 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(bSizer4);
    
    m_splitterMain = new wxSplitterWindow(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), wxSP_LIVE_UPDATE|wxSP_3DSASH);
    m_splitterMain->SetSashGravity(1);
    m_splitterMain->SetMinimumPaneSize(150);
    
    bSizer4->Add(m_splitterMain, 1, wxALL|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 wxSplitterWindow(m_panel3, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panel3, wxSize(-1, -1)), wxSP_LIVE_UPDATE|wxSP_3DSASH);
    m_splitterInner->SetSashGravity(0);
    m_splitterInner->SetMinimumPaneSize(100);
    
    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);
    
    wxArrayString m_listBoxArr;
    m_listBox = new wxCheckListBox(m_panel1, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panel1, wxSize(-1,-1)), m_listBoxArr, wxLB_SINGLE);
    
    bSizer11->Add(m_listBox, 1, wxALL|wxEXPAND, WXC_FROM_DIP(5));
    
    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)), 0);
    // 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, wxALL|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_auibar = new wxAuiToolBar(m_panel4, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panel4, wxSize(-1,-1)), wxAUI_TB_PLAIN_BACKGROUND|wxAUI_TB_DEFAULT_STYLE|wxAUI_TB_HORZ_TEXT);
    m_auibar->SetToolBitmapSize(wxSize(16,16));
    
    bSizer13->Add(m_auibar, 0, wxEXPAND, WXC_FROM_DIP(5));
    
    m_auibar->AddTool(ID_TOGGLE_CHECKALL, _("Toggle Files"), wxXmlResource::Get()->LoadBitmap(wxT("16-ok")), wxNullBitmap, wxITEM_NORMAL, _("Toggle Check All"), _("Toggle Check All"), NULL);
    
    m_auibar->AddTool(ID_GIT_COMMIT_HISTORY, _("History"), wxXmlResource::Get()->LoadBitmap(wxT("16-history")), wxNullBitmap, wxITEM_NORMAL, _("Show Commit History"), _("Show Commit History"), NULL);
    
    m_auibar->AddStretchSpacer(1);
    
    m_auibar->AddTool(wxID_CLEAR, _("Clear History"), wxXmlResource::Get()->LoadBitmap(wxT("16-clear")), wxNullBitmap, wxITEM_NORMAL, _("Clear History"), _("Clear History"), NULL);
    m_auibar->Realize();
    
    m_stcCommitMessage = new wxStyledTextCtrl(m_panel4, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panel4, wxSize(-1,-1)), wxBORDER_THEME);
    m_stcCommitMessage->SetToolTip(_("Type your commit message here"));
    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, wxALL|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(-1,-1);
    if (GetSizer()) {
         GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
    // Connect events
    m_listBox->Connect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(GitCommitDlgBase::OnChangeFile), NULL, this);
    this->Connect(ID_TOGGLE_CHECKALL, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(GitCommitDlgBase::OnToggleCheckAll), NULL, this);
    this->Connect(ID_GIT_COMMIT_HISTORY, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(GitCommitDlgBase::OnCommitHistory), NULL, this);
    this->Connect(ID_GIT_COMMIT_HISTORY, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(GitCommitDlgBase::OnCommitHistoryUI), NULL, this);
    this->Connect(wxID_CLEAR, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(GitCommitDlgBase::OnClearGitCommitHistory), NULL, this);
    this->Connect(wxID_CLEAR, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(GitCommitDlgBase::OnClearGitCommitHistoryUI), NULL, this);
    m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GitCommitDlgBase::OnCommitOK), NULL, this);
    
}

GitCommitDlgBase::~GitCommitDlgBase()
{
    m_listBox->Disconnect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(GitCommitDlgBase::OnChangeFile), NULL, this);
    this->Disconnect(ID_TOGGLE_CHECKALL, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(GitCommitDlgBase::OnToggleCheckAll), NULL, this);
    this->Disconnect(ID_GIT_COMMIT_HISTORY, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(GitCommitDlgBase::OnCommitHistory), NULL, this);
    this->Disconnect(ID_GIT_COMMIT_HISTORY, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(GitCommitDlgBase::OnCommitHistoryUI), NULL, this);
    this->Disconnect(wxID_CLEAR, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(GitCommitDlgBase::OnClearGitCommitHistory), NULL, this);
    this->Disconnect(wxID_CLEAR, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(GitCommitDlgBase::OnClearGitCommitHistoryUI), NULL, this);
    m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GitCommitDlgBase::OnCommitOK), NULL, 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;
    }
    // Set icon(s) to the application/dialog
    wxIconBundle app_icons;
    {
        wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("16-git"));
        wxIcon icn;
        icn.CopyFromBitmap(iconBmp);
        app_icons.AddIcon( icn );
    }
    {
        wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("16-git@2x"));
        wxIcon icn;
        icn.CopyFromBitmap(iconBmp);
        app_icons.AddIcon( icn );
    }
    SetIcons( app_icons );

    
    wxBoxSizer* bSizer17 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(bSizer17);
    
    m_splitter174 = new wxSplitterWindow(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxSP_LIVE_UPDATE|wxSP_3DSASH);
    m_splitter174->SetSashGravity(0.7);
    m_splitter174->SetMinimumPaneSize(150);
    
    bSizer17->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);
    
    wxBoxSizer* boxSizer449 = new wxBoxSizer(wxVERTICAL);
    
    boxSizer205->Add(boxSizer449, 0, wxEXPAND, WXC_FROM_DIP(5));
    
    wxBoxSizer* boxSizer343 = new wxBoxSizer(wxHORIZONTAL);
    
    boxSizer449->Add(boxSizer343, 0, wxEXPAND, WXC_FROM_DIP(5));
    
    m_searchCtrlFilter = new wxSearchCtrl(m_splitterPage178, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_splitterPage178, 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);
    
    boxSizer343->Add(m_searchCtrlFilter, 1, wxLEFT|wxRIGHT|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(2));
    
    m_buttonPrevious = new wxButton(m_splitterPage178, wxID_BACKWARD, _("Previous"), wxDefaultPosition, wxDLG_UNIT(m_splitterPage178, wxSize(-1,-1)), 0);
    m_buttonPrevious->SetToolTip(_("Show previous 100 commits"));
    
    boxSizer343->Add(m_buttonPrevious, 0, wxALL, WXC_FROM_DIP(2));
    
    m_buttonNext = new wxButton(m_splitterPage178, wxID_FORWARD, _("Next"), wxDefaultPosition, wxDLG_UNIT(m_splitterPage178, wxSize(-1,-1)), 0);
    m_buttonNext->SetToolTip(_("Fetch the next 100 commits"));
    
    boxSizer343->Add(m_buttonNext, 0, wxALL|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(2));
    
    wxBoxSizer* boxSizer451 = new wxBoxSizer(wxHORIZONTAL);
    
    boxSizer449->Add(boxSizer451, 0, wxEXPAND, WXC_FROM_DIP(5));
    
    m_checkBoxIgnoreCase = new wxCheckBox(m_splitterPage178, wxID_ANY, _("Ignore case"), wxDefaultPosition, wxDLG_UNIT(m_splitterPage178, wxSize(-1,-1)), 0);
    m_checkBoxIgnoreCase->SetValue(false);
    m_checkBoxIgnoreCase->SetToolTip(_("--regexp-ignore-case Display commits that match the pattern without regard to case"));
    
    boxSizer451->Add(m_checkBoxIgnoreCase, 0, wxALL|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
    
    m_staticText414 = new wxStaticText(m_splitterPage178, wxID_ANY, _("    Extra arguments:"), wxDefaultPosition, wxDLG_UNIT(m_splitterPage178, wxSize(-1,-1)), 0);
    
    boxSizer451->Add(m_staticText414, 0, wxALL|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
    
    wxArrayString m_comboExtraArgsArr;
    m_comboExtraArgsArr.Add(wxT("--since="));
    m_comboExtraArgsArr.Add(wxT("--before="));
    m_comboExtraArgsArr.Add(wxT("--author="));
    m_comboExtraArgsArr.Add(wxT("--committer="));
    m_comboExtraArgsArr.Add(wxT("-S"));
    m_comboExtraArgs = new wxComboBox(m_splitterPage178, XRCID("m_comboExtraArgs"), wxT(""), wxDefaultPosition, wxDLG_UNIT(m_splitterPage178, wxSize(-1,-1)), m_comboExtraArgsArr, wxTE_PROCESS_ENTER);
    m_comboExtraArgs->SetToolTip(_("Optional extra arguments that you wish passed to git log.\nAn example might be: --since=\"2 weeks ago\"\nNote that this is _not_ sanity-checked, it's added just as it is."));
    #if wxVERSION_NUMBER >= 3000
    m_comboExtraArgs->SetHint(wxT(""));
    #endif
    
    boxSizer451->Add(m_comboExtraArgs, 1, wxALL, WXC_FROM_DIP(5));
    
    m_dvListCtrlCommitList = new wxDataViewListCtrl(m_splitterPage178, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_splitterPage178, wxSize(-1,-1)), wxDV_VERT_RULES|wxDV_ROW_LINES|wxDV_SINGLE);
    
    boxSizer205->Add(m_dvListCtrlCommitList, 1, wxALL|wxEXPAND, WXC_FROM_DIP(2));
    
    m_dvListCtrlCommitList->AppendTextColumn(_("Commit"), wxDATAVIEW_CELL_INERT, WXC_FROM_DIP(150), wxALIGN_LEFT);
    m_dvListCtrlCommitList->AppendTextColumn(_("Author"), wxDATAVIEW_CELL_INERT, WXC_FROM_DIP(100), wxALIGN_LEFT);
    m_dvListCtrlCommitList->AppendTextColumn(_("Date"), wxDATAVIEW_CELL_INERT, WXC_FROM_DIP(100), wxALIGN_LEFT);
    m_dvListCtrlCommitList->AppendTextColumn(_("Subject"), wxDATAVIEW_CELL_INERT, WXC_FROM_DIP(600), wxALIGN_LEFT);
    m_splitterPage182 = new wxPanel(m_splitter174, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_splitter174, wxSize(-1,-1)), wxTAB_TRAVERSAL);
    m_splitter174->SplitHorizontally(m_splitterPage178, m_splitterPage182, 0);
    
    wxBoxSizer* boxSizer184 = new wxBoxSizer(wxVERTICAL);
    m_splitterPage182->SetSizer(boxSizer184);
    
    m_splitter186 = new wxSplitterWindow(m_splitterPage182, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_splitterPage182, wxSize(-1,-1)), wxSP_LIVE_UPDATE|wxSP_3DSASH);
    m_splitter186->SetSashGravity(1);
    m_splitter186->SetMinimumPaneSize(100);
    
    boxSizer184->Add(m_splitter186, 1, wxEXPAND, WXC_FROM_DIP(2));
    
    m_splitterPage190 = new wxPanel(m_splitter186, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_splitter186, wxSize(-1,-1)), wxTAB_TRAVERSAL);
    
    wxBoxSizer* bSizer18 = new wxBoxSizer(wxHORIZONTAL);
    m_splitterPage190->SetSizer(bSizer18);
    
    m_splitter196 = new wxSplitterWindow(m_splitterPage190, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_splitterPage190, wxSize(-1,-1)), wxSP_LIVE_UPDATE|wxSP_3DSASH);
    m_splitter196->SetSashGravity(0);
    m_splitter196->SetMinimumPaneSize(100);
    
    bSizer18->Add(m_splitter196, 1, wxEXPAND, WXC_FROM_DIP(2));
    
    m_splitterPage200 = new wxPanel(m_splitter196, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_splitter196, 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_splitter196, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_splitter196, wxSize(-1,-1)), wxTAB_TRAVERSAL);
    m_splitter196->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_splitterPage194 = new wxPanel(m_splitter186, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_splitter186, wxSize(-1,-1)), wxTAB_TRAVERSAL);
    m_splitter186->SplitHorizontally(m_splitterPage190, m_splitterPage194, 100);
    
    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,200)), 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_stcCommitMessage->SetMinSize(wxSize(-1,200));
    
    SetName(wxT("GitCommitListDlgBase"));
    SetSize(-1,-1);
    if (GetSizer()) {
         GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
    // Connect events
    this->Connect(wxEVT_CLOSE_WINDOW, wxCloseEventHandler(GitCommitListDlgBase::OnClose), NULL, this);
    m_searchCtrlFilter->Connect(wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler(GitCommitListDlgBase::OnSearchCommitList), NULL, this);
    m_searchCtrlFilter->Connect(wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN, wxCommandEventHandler(GitCommitListDlgBase::OnSearchCommitList), NULL, this);
    m_buttonPrevious->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GitCommitListDlgBase::OnPrevious), NULL, this);
    m_buttonPrevious->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(GitCommitListDlgBase::OnPreviousUI), NULL, this);
    m_buttonNext->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GitCommitListDlgBase::OnNext), NULL, this);
    m_buttonNext->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(GitCommitListDlgBase::OnNextUpdateUI), NULL, this);
    m_comboExtraArgs->Connect(wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler(GitCommitListDlgBase::OnExtraArgsTextEnter), NULL, this);
    m_dvListCtrlCommitList->Connect(wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler(GitCommitListDlgBase::OnSelectionChanged), NULL, this);
    m_dvListCtrlCommitList->Connect(wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU, wxDataViewEventHandler(GitCommitListDlgBase::OnContextMenu), NULL, this);
    m_fileListBox->Connect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(GitCommitListDlgBase::OnChangeFile), NULL, this);
    
}

GitCommitListDlgBase::~GitCommitListDlgBase()
{
    this->Disconnect(wxEVT_CLOSE_WINDOW, wxCloseEventHandler(GitCommitListDlgBase::OnClose), NULL, this);
    m_searchCtrlFilter->Disconnect(wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler(GitCommitListDlgBase::OnSearchCommitList), NULL, this);
    m_searchCtrlFilter->Disconnect(wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN, wxCommandEventHandler(GitCommitListDlgBase::OnSearchCommitList), NULL, this);
    m_buttonPrevious->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GitCommitListDlgBase::OnPrevious), NULL, this);
    m_buttonPrevious->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(GitCommitListDlgBase::OnPreviousUI), NULL, this);
    m_buttonNext->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GitCommitListDlgBase::OnNext), NULL, this);
    m_buttonNext->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(GitCommitListDlgBase::OnNextUpdateUI), NULL, this);
    m_comboExtraArgs->Disconnect(wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler(GitCommitListDlgBase::OnExtraArgsTextEnter), NULL, this);
    m_dvListCtrlCommitList->Disconnect(wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler(GitCommitListDlgBase::OnSelectionChanged), NULL, this);
    m_dvListCtrlCommitList->Disconnect(wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU, wxDataViewEventHandler(GitCommitListDlgBase::OnContextMenu), NULL, this);
    m_fileListBox->Disconnect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(GitCommitListDlgBase::OnChangeFile), NULL, this);
    
}

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;
    }
    // Set icon(s) to the application/dialog
    wxIconBundle app_icons;
    {
        wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("16-git"));
        wxIcon icn;
        icn.CopyFromBitmap(iconBmp);
        app_icons.AddIcon( icn );
    }
    {
        wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("16-git@2x"));
        wxIcon icn;
        icn.CopyFromBitmap(iconBmp);
        app_icons.AddIcon( icn );
    }
    SetIcons( app_icons );

    
    wxBoxSizer* bSizer17 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(bSizer17);
    
    m_splitter = new wxSplitterWindow(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxSP_LIVE_UPDATE|wxSP_NO_XP_THEME|wxSP_3DSASH);
    m_splitter->SetSashGravity(0.5);
    m_splitter->SetMinimumPaneSize(10);
    
    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, 0);
    
    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, 0);
    
    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));
    
    m_sdbSizer1 = new wxStdDialogButtonSizer();
    
    bSizer17->Add(m_sdbSizer1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5));
    
    m_button145 = new wxButton(this, wxID_OK, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), 0);
    m_button145->SetDefault();
    m_sdbSizer1->AddButton(m_button145);
    m_sdbSizer1->Realize();
    
    SetName(wxT("GitDiffDlgBase"));
    SetSize(879,600);
    if (GetSizer()) {
         GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
    // Connect events
    m_fileListBox->Connect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(GitDiffDlgBase::OnChangeFile), NULL, this);
    
}

GitDiffDlgBase::~GitDiffDlgBase()
{
    m_fileListBox->Disconnect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(GitDiffDlgBase::OnChangeFile), NULL, 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;
    }
    // Set icon(s) to the application/dialog
    wxIconBundle app_icons;
    {
        wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("16-git"));
        wxIcon icn;
        icn.CopyFromBitmap(iconBmp);
        app_icons.AddIcon( icn );
    }
    {
        wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("16-git@2x"));
        wxIcon icn;
        icn.CopyFromBitmap(iconBmp);
        app_icons.AddIcon( icn );
    }
    SetIcons( app_icons );

    
    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(-1,-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(500,-1);
    if (GetSizer()) {
         GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
    // Connect events
    m_buttonOk->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(gitCloneDlgBaseClass::OnOKUI), NULL, this);
    
}

gitCloneDlgBaseClass::~gitCloneDlgBaseClass()
{
    m_buttonOk->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(gitCloneDlgBaseClass::OnOKUI), NULL, this);
    
}

GitFileDiffDlgBase::GitFileDiffDlgBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
    : wxDialog(parent, id, title, pos, size, style)
{
    if ( !bBitmapLoaded ) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxCrafterpca4kKInitBitmapResources();
        bBitmapLoaded = true;
    }
    // Set icon(s) to the application/dialog
    wxIconBundle app_icons;
    {
        wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("16-git"));
        wxIcon icn;
        icn.CopyFromBitmap(iconBmp);
        app_icons.AddIcon( icn );
    }
    {
        wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("16-git@2x"));
        wxIcon icn;
        icn.CopyFromBitmap(iconBmp);
        app_icons.AddIcon( icn );
    }
    SetIcons( app_icons );

    
    wxBoxSizer* boxSizer124 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer124);
    
    m_editor = new GitCommitEditor(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 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(500,300);
    if (GetSizer()) {
         GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
    // Connect events
    m_button308->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GitFileDiffDlgBase::OnCloseDialog), NULL, this);
    m_button310->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GitFileDiffDlgBase::OnSaveAsPatch), NULL, this);
    
}

GitFileDiffDlgBase::~GitFileDiffDlgBase()
{
    m_button308->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GitFileDiffDlgBase::OnCloseDialog), NULL, this);
    m_button310->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GitFileDiffDlgBase::OnSaveAsPatch), NULL, this);
    
}

GitImages::GitImages()
    : wxImageList(16, 16, true)
    , m_imagesWidth(16)
    , m_imagesHeight(16)
{
    if ( !bBitmapLoaded ) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxCrafterpca4kKInitBitmapResources();
        bBitmapLoaded = true;
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitCommitLocal"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitCommitLocal"), bmp));
        }
    }
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitCommitLocal@2x"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitCommitLocal@2x"), bmp));
        }
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitArrowUp"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitArrowUp"), bmp));
        }
    }
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitArrowUp@2x"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitArrowUp@2x"), bmp));
        }
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitSwitchLocalBranch"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitSwitchLocalBranch"), bmp));
        }
    }
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitSwitchLocalBranch@2x"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitSwitchLocalBranch@2x"), bmp));
        }
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitSwitchRemoteBranch"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitSwitchRemoteBranch"), bmp));
        }
    }
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitSwitchRemoteBranch@2x"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitSwitchRemoteBranch@2x"), bmp));
        }
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitNewBranch"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitNewBranch"), bmp));
        }
    }
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitNewBranch@2x"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitNewBranch@2x"), bmp));
        }
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitDiffs"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitDiffs"), bmp));
        }
    }
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitDiffs@2x"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitDiffs@2x"), bmp));
        }
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitCommitedFiles"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitCommitedFiles"), bmp));
        }
    }
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitCommitedFiles@2x"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitCommitedFiles@2x"), bmp));
        }
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitBlame"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitBlame"), bmp));
        }
    }
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitBlame@2x"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitBlame@2x"), bmp));
        }
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitApply"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitApply"), bmp));
        }
    }
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitApply@2x"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitApply@2x"), bmp));
        }
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitModifiedFiles"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitModifiedFiles"), bmp));
        }
    }
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitModifiedFiles@2x"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitModifiedFiles@2x"), bmp));
        }
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitPull"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitPull"), bmp));
        }
    }
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitPull@2x"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitPull@2x"), bmp));
        }
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitPush"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitPush"), bmp));
        }
    }
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitPush@2x"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitPush@2x"), bmp));
        }
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitReset"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitReset"), bmp));
        }
    }
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitReset@2x"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitReset@2x"), bmp));
        }
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitResetRepo"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitResetRepo"), bmp));
        }
    }
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitResetRepo@2x"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitResetRepo@2x"), bmp));
        }
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitTrash"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitTrash"), bmp));
        }
    }
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitTrash@2x"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitTrash@2x"), bmp));
        }
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitRefresh"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitRefresh"), bmp));
        }
    }
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitRefresh@2x"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitRefresh@2x"), bmp));
        }
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitStart"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitStart"), bmp));
        }
    }
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitStart@2x"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitStart@2x"), bmp));
        }
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitFileAdd"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitFileAdd"), bmp));
        }
    }
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitFileAdd@2x"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitFileAdd@2x"), bmp));
        }
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitClone"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitClone"), bmp));
        }
    }
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitClone@2x"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitClone@2x"), bmp));
        }
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("git"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("git"), bmp));
        }
    }
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("git@2x"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("git@2x"), bmp));
        }
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitPath"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitPath"), bmp));
        }
    }
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitPath@2x"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitPath@2x"), bmp));
        }
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitSettings"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitSettings"), bmp));
        }
    }
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitSettings@2x"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitSettings@2x"), bmp));
        }
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitRebase"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitRebase"), bmp));
        }
    }
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitRebase@2x"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitRebase@2x"), bmp));
        }
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("msysgit"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("msysgit"), bmp));
        }
    }
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("msysgit@2x"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("msysgit@2x"), bmp));
        }
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitStash"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitStash"), bmp));
        }
    }
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitStash@2x"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitStash@2x"), bmp));
        }
    }
    
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitStashPop"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitStashPop"), bmp));
        }
    }
    {
        wxBitmap bmp;
        wxIcon icn;
        bmp = wxXmlResource::Get()->LoadBitmap(wxT("gitStashPop@2x"));
        if(bmp.IsOk()) {
            if((m_imagesWidth == bmp.GetWidth()) && (m_imagesHeight == bmp.GetHeight())){
                icn.CopyFromBitmap(bmp);
                this->Add(icn);
            }
            m_bitmaps.insert(std::make_pair(wxT("gitStashPop@2x"), bmp));
        }
    }
    
}

GitImages::~GitImages()
{
}

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;
    }
    // Set icon(s) to the application/dialog
    wxIconBundle app_icons;
    {
        wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("16-git"));
        wxIcon icn;
        icn.CopyFromBitmap(iconBmp);
        app_icons.AddIcon( icn );
    }
    {
        wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("16-git@2x"));
        wxIcon icn;
        icn.CopyFromBitmap(iconBmp);
        app_icons.AddIcon( icn );
    }
    SetIcons( app_icons );

    
    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(-1,-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(-1,-1);
    if (GetSizer()) {
         GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
}

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_gauge = new wxGauge(this, wxID_ANY, 100, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,7)), wxGA_SMOOTH|wxGA_HORIZONTAL);
    m_gauge->Hide();
    m_gauge->SetValue(10);
    
    boxSizer36->Add(m_gauge, 0, wxEXPAND, WXC_FROM_DIP(2));
    
    m_auibar = new wxAuiToolBar(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxAUI_TB_PLAIN_BACKGROUND|wxAUI_TB_DEFAULT_STYLE);
    m_auibar->SetToolBitmapSize(wxSize(16,16));
    
    boxSizer36->Add(m_auibar, 0, wxLEFT|wxRIGHT|wxEXPAND, WXC_FROM_DIP(0));
    
    m_splitter = new wxSplitterWindow(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxSP_LIVE_UPDATE|wxSP_3DSASH);
    m_splitter->SetSashGravity(0);
    m_splitter->SetMinimumPaneSize(10);
    
    boxSizer36->Add(m_splitter, 1, wxEXPAND, WXC_FROM_DIP(5));
    
    m_splitterPageTreeView = new wxPanel(m_splitter, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_splitter, wxSize(-1,-1)), wxTAB_TRAVERSAL);
    
    wxBoxSizer* boxSizer94 = new wxBoxSizer(wxVERTICAL);
    m_splitterPageTreeView->SetSizer(boxSizer94);
    
    m_dvFiles = new wxDataViewCtrl(m_splitterPageTreeView, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_splitterPageTreeView, wxSize(-1,-1)), wxDV_NO_HEADER|wxDV_ROW_LINES|wxDV_MULTIPLE|wxBORDER_THEME);
    
    m_dvFilesModel = new DataViewFilesModel;
    m_dvFilesModel->SetColCount( 1 );
    m_dvFiles->AssociateModel(m_dvFilesModel.get() );
    
    boxSizer94->Add(m_dvFiles, 1, wxALL|wxEXPAND, WXC_FROM_DIP(2));
    
    m_dvFiles->AppendIconTextColumn(_("File View"), m_dvFiles->GetColumnCount(), wxDATAVIEW_CELL_INERT, WXC_FROM_DIP(400), wxALIGN_LEFT);
    m_splitterPage96 = new wxPanel(m_splitter, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_splitter, wxSize(-1,-1)), wxTAB_TRAVERSAL);
    m_splitter->SplitVertically(m_splitterPageTreeView, m_splitterPage96, 250);
    
    wxBoxSizer* boxSizer92 = new wxBoxSizer(wxVERTICAL);
    m_splitterPage96->SetSizer(boxSizer92);
    
    m_stcLog = new wxStyledTextCtrl(m_splitterPage96, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_splitterPage96, wxSize(-1,-1)), wxBORDER_THEME);
    // Configure the fold margin
    m_stcLog->SetMarginType     (4, wxSTC_MARGIN_SYMBOL);
    m_stcLog->SetMarginMask     (4, wxSTC_MASK_FOLDERS);
    m_stcLog->SetMarginSensitive(4, true);
    m_stcLog->SetMarginWidth    (4, 0);
    
    // Configure the tracker margin
    m_stcLog->SetMarginWidth(1, 0);
    
    // Configure the symbol margin
    m_stcLog->SetMarginType (2, wxSTC_MARGIN_SYMBOL);
    m_stcLog->SetMarginMask (2, ~(wxSTC_MASK_FOLDERS));
    m_stcLog->SetMarginWidth(2, 0);
    m_stcLog->SetMarginSensitive(2, true);
    
    // Configure the line numbers margin
    m_stcLog->SetMarginType(0, wxSTC_MARGIN_NUMBER);
    m_stcLog->SetMarginWidth(0,0);
    
    // Configure the line symbol margin
    m_stcLog->SetMarginType(3, wxSTC_MARGIN_FORE);
    m_stcLog->SetMarginMask(3, 0);
    m_stcLog->SetMarginWidth(3,0);
    // Select the lexer
    m_stcLog->SetLexer(wxSTC_LEX_NULL);
    // Set default font / styles
    m_stcLog->StyleClearAll();
    m_stcLog->SetWrapMode(0);
    m_stcLog->SetIndentationGuides(0);
    m_stcLog->SetEOLMode(2);
    m_stcLog->SetKeyWords(0, wxT(""));
    m_stcLog->SetKeyWords(1, wxT(""));
    m_stcLog->SetKeyWords(2, wxT(""));
    m_stcLog->SetKeyWords(3, wxT(""));
    m_stcLog->SetKeyWords(4, wxT(""));
    
    boxSizer92->Add(m_stcLog, 1, wxALL|wxEXPAND, WXC_FROM_DIP(2));
    
    SetName(wxT("GitConsoleBase"));
    SetSize(500,300);
    if (GetSizer()) {
         GetSizer()->Fit(this);
    }
    // Connect events
    m_dvFiles->Connect(wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU, wxDataViewEventHandler(GitConsoleBase::OnContextMenu), NULL, this);
    m_dvFiles->Connect(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler(GitConsoleBase::OnFileActivated), NULL, this);
    m_stcLog->Connect(wxEVT_STC_CHANGE, wxStyledTextEventHandler(GitConsoleBase::OnStclogStcChange), NULL, this);
    
}

GitConsoleBase::~GitConsoleBase()
{
    m_dvFiles->Disconnect(wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU, wxDataViewEventHandler(GitConsoleBase::OnContextMenu), NULL, this);
    m_dvFiles->Disconnect(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler(GitConsoleBase::OnFileActivated), NULL, this);
    m_stcLog->Disconnect(wxEVT_STC_CHANGE, wxStyledTextEventHandler(GitConsoleBase::OnStclogStcChange), NULL, 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;
    }
    // Set icon(s) to the application/dialog
    wxIconBundle app_icons;
    {
        wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("16-git"));
        wxIcon icn;
        icn.CopyFromBitmap(iconBmp);
        app_icons.AddIcon( icn );
    }
    {
        wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("16-git@2x"));
        wxIcon icn;
        icn.CopyFromBitmap(iconBmp);
        app_icons.AddIcon( icn );
    }
    SetIcons( app_icons );

    
    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(wxT("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(wxT("-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(-1,-1)), 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(-1,-1);
    if (GetSizer()) {
         GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
    // Connect events
    this->Connect(XRCID("m_tbBack"), wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(GitBlameDlgBase::OnPreviousBlame), NULL, this);
    this->Connect(XRCID("m_tbBack"), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(GitBlameDlgBase::OnBackUpdateUI), NULL, this);
    this->Connect(XRCID("m_tbForward"), wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(GitBlameDlgBase::OnNextBlame), NULL, this);
    this->Connect(XRCID("m_tbForward"), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(GitBlameDlgBase::OnForwardUpdateUI), NULL, this);
    m_choiceHistory->Connect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(GitBlameDlgBase::OnHistoryItemSelected), NULL, this);
    m_comboExtraArgs->Connect(wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler(GitBlameDlgBase::OnExtraArgsTextEnter), NULL, this);
    this->Connect(XRCID("m_toolbarItemRefresh"), wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(GitBlameDlgBase::OnRefreshBlame), NULL, this);
    this->Connect(XRCID("m_toolbarItemSettings"), wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(GitBlameDlgBase::OnSettings), NULL, this);
    m_stcBlame->Connect(wxEVT_LEFT_DCLICK, wxMouseEventHandler(GitBlameDlgBase::OnStcblameLeftDclick), NULL, this);
    m_stcBlame->Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler(GitBlameDlgBase::OnSelectionChanged), NULL, this);
    m_fileListBox->Connect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(GitBlameDlgBase::OnChangeFile), NULL, this);
    m_button308->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GitBlameDlgBase::OnCloseDialog), NULL, this);
    
}

GitBlameDlgBase::~GitBlameDlgBase()
{
    this->Disconnect(XRCID("m_tbBack"), wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(GitBlameDlgBase::OnPreviousBlame), NULL, this);
    this->Disconnect(XRCID("m_tbBack"), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(GitBlameDlgBase::OnBackUpdateUI), NULL, this);
    this->Disconnect(XRCID("m_tbForward"), wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(GitBlameDlgBase::OnNextBlame), NULL, this);
    this->Disconnect(XRCID("m_tbForward"), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(GitBlameDlgBase::OnForwardUpdateUI), NULL, this);
    m_choiceHistory->Disconnect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(GitBlameDlgBase::OnHistoryItemSelected), NULL, this);
    m_comboExtraArgs->Disconnect(wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler(GitBlameDlgBase::OnExtraArgsTextEnter), NULL, this);
    this->Disconnect(XRCID("m_toolbarItemRefresh"), wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(GitBlameDlgBase::OnRefreshBlame), NULL, this);
    this->Disconnect(XRCID("m_toolbarItemSettings"), wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(GitBlameDlgBase::OnSettings), NULL, this);
    m_stcBlame->Disconnect(wxEVT_LEFT_DCLICK, wxMouseEventHandler(GitBlameDlgBase::OnStcblameLeftDclick), NULL, this);
    m_stcBlame->Disconnect(wxEVT_LEFT_DOWN, wxMouseEventHandler(GitBlameDlgBase::OnSelectionChanged), NULL, this);
    m_fileListBox->Disconnect(wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler(GitBlameDlgBase::OnChangeFile), NULL, this);
    m_button308->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GitBlameDlgBase::OnCloseDialog), NULL, 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(-1,-1);
    if (GetSizer()) {
         GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
}

GitBlameSettingsDlgBase::~GitBlameSettingsDlgBase()
{
}
