33#include <wx/bmpbuttn.h>
35#include <wx/checkbox.h>
60 git_config_entry* name_c =
nullptr;
61 git_config_entry* email_c =
nullptr;
63 git_config*
config =
nullptr;
65 if( git_config_open_default( &
config ) != 0 )
68 return std::make_pair(
name, email );
73 if( git_config_get_entry( &name_c,
config,
"user.name" ) != 0 )
76 return std::make_pair(
name, email );
81 if( git_config_get_entry( &email_c,
config,
"user.email" ) != 0 )
84 return std::make_pair(
name, email );
93 email = email_c->value;
95 return std::make_pair(
name, email );
127 m_author->SetValue( defaultAuthor.first );
133 m_author->SetValue( defaultAuthor.first );
143 wxCommandEvent event;
static wxString GetLastGitError()
libgit2's last message, without credentials from any URL it quotes, so it is safe to show or trace.
wxStaticText * m_authorLabel
wxStaticText * m_authorEmailLabel
wxSpinCtrl * m_updateInterval
wxStaticText * m_avatarsNote
wxStaticText * m_avatarsLabel
wxCheckBox * m_cbShowAvatars
PANEL_GIT_REPOS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
wxTextCtrl * m_authorEmail
void onEnableGitClick(wxCommandEvent &event) override
PANEL_GIT_REPOS(wxWindow *parent)
~PANEL_GIT_REPOS() override
void onDefaultClick(wxCommandEvent &event) override
void ResetPanel() override
Reset the contents of this panel.
bool TransferDataToWindow() override
bool TransferDataFromWindow() override
virtual COMMON_SETTINGS * GetCommonSettings() const
const wxChar *const traceGit
Flag to enable Git debugging output.
std::unique_ptr< git_config, decltype([](git_config *aConfig) { git_config_free(aConfig); })> GitConfigPtr
A unique pointer for git_config objects with automatic cleanup.
std::unique_ptr< git_config_entry, decltype([](git_config_entry *aEntry) { git_config_entry_free(aEntry); })> GitConfigEntryPtr
A unique pointer for git_config_entry objects with automatic cleanup.
static std::pair< wxString, wxString > getDefaultAuthorAndEmail()
PGM_BASE & Pgm()
The global program "get" accessor.
bool showContributorAvatars
wxLogTrace helper definitions.