20#ifndef GIT_ADVANCED_DIALOG_H
21#define GIT_ADVANCED_DIALOG_H
42class wxSplitterWindow;
74 void ShowAmend(
const wxString& aCommitHash );
96 bool aRewritesWorkingTree =
false );
101 bool aRewritesWorkingTree =
false );
138 void startFetch( std::shared_ptr<KIGIT_COMMON> aCommon );
DIALOG_GIT_ADVANCED_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Advanced Git"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
The base frame for deriving all KiCad main window classes.
EDA_BASE_FRAME * m_parent
GIT_ADVANCED_DIALOG(EDA_BASE_FRAME *aParent, GIT_COMMIT_PANE *aPane)
static void ShowHistoryForFile(EDA_BASE_FRAME *aParent, GIT_COMMIT_PANE *aPane, const wxString &aPath)
Open the window on its History page, narrowed to the commits that changed aPath.
PANEL_GIT_BRANCHES * m_branchesPage
void RefuseOverUncommittedWork(std::function< void(const GIT_WORKTREE_STATUS &)> aReady)
Check the working tree and LFS on a worker, then continue on the UI thread only when nothing is uncom...
void ShowTransferProgress(const wxString &aText)
Show a line of transfer progress on the hosted commit panel's status line.
void showWorkingDiff(const wxString &aPath)
Show the working copy of aPath against its committed version, or hide that area.
GIT_FILE_DIFF_AREA * m_workingDiff
void SwitchToBranch(const wxString &aBranch)
Switch the working tree to the named branch, after confirming, then refresh.
static void CloseForPane(GIT_COMMIT_PANE *aPane)
Close the live window if the given pane opened it, for when that pane goes away.
PANEL_GIT_REPOSITORY * m_repositoryPage
PANEL_GIT_HISTORY * m_historyPage
PANEL_GIT_REMOTES * m_remotesPage
EDITOR_SNAPSHOT m_docsBeforeChange
On-disk identity of the open documents, taken by ConfirmWorkingTreeChange() so only the documents an ...
bool ConfirmWorkingTreeChange()
After the asynchronous LFS check, save the open editors and snapshot their documents before an action...
static void CloseActive()
Close the live window, for when the project it was filled from goes away.
wxSplitterWindow * m_changesSplitter
KIGIT_QUERY m_reloadQuery
Reads the top bar and history branch choices without holding up the UI.
std::weak_ptr< KIGIT_COMMON > m_listenerSession
static GIT_ADVANCED_DIALOG * Active()
The live window, or null when none is open.
void RunGitAction(const std::function< bool(KIGIT_COMMON &)> &aFn, const wxString &aError, bool aRewritesWorkingTree=false)
Run a repository write under the action lock, then refresh every surface on success.
void startFetch(std::shared_ptr< KIGIT_COMMON > aCommon)
PANEL_GIT_STASHES * m_stashesPage
void syncListener()
Attach once to the project's session.
static void ShowForFrame(EDA_BASE_FRAME *aParent, GIT_COMMIT_PANE *aPane)
Raise the one window for this session, creating it on first use.
KIGIT_QUERY m_actionQuery
Preflight reads for actions that may replace the working tree.
bool SessionStillCurrent()
True while the frame's git session is still the one this window's lists were filled from.
void onFetch()
Fetch from the remote on a worker, then refresh every surface.
void SetPaneTransferBusy(bool aBusy, const wxString &aStatus=wxEmptyString)
Put the hosted commit panel into, or out of, its transfer state, for a transfer this window or one of...
~GIT_ADVANCED_DIALOG() override
wxWindow * buildChangesPage(wxWindow *aBook)
The Changes page: the docked panel's commit controls with the selected file's diff below.
GIT_COMMIT_PANE * m_changesPane
int m_changesSashPos
Where the user left the sash between the Changes page's list and its diff area.
void optOutOfTextPersistence(wxWindow *aWindow)
Keep every text box in aWindow out of the dialog's saved control state.
void RunGitAction(const std::function< bool(KIGIT_COMMON &, wxString &aDetail)> &aFn, const wxString &aError, bool aRewritesWorkingTree=false)
As above, for an action with a message of its own: what it writes to aDetail is shown in place of lib...
void ShowAmend(const wxString &aCommitHash)
Open the Changes page to amend the selected history commit.
KIGIT_TRANSFER m_fetch
The fetch the top bar started.
PANEL_GIT_TAGS * m_tagsPage
void populateTopBar()
Fill the top bar's repository name and branch list.
Docked panel for committing: the branch to commit to, a summary and description, the commit options,...
Shows what changed in one file: the old and new drawing side by side for a schematic or board,...
The project's git session.
Read repository state without blocking the UI.
The advanced git window's Branches page: a searchable list beside the selected branch's detail,...
The advanced git window's History page: filters above a list of commits beside the selected commit's ...
The advanced git window's Remotes page: the list beside the selected remote's detail,...
Show the repository's author and open the shared identity editor.
The advanced git window's Stashes page: the list beside the selected stash's detail,...
What the open editors and the project settings looked like on disk before an operation that may rewri...
Repository state used before an operation that requires a clean working tree.