|
KiCad PCB EDA Suite
|
The advanced git window's Branches page: a searchable list beside the selected branch's detail, with the actions that create, delete and force push a branch. More...
#include <panel_git_branches.h>
Public Member Functions | |
| PANEL_GIT_BRANCHES (wxWindow *aParent, GIT_ADVANCED_DIALOG *aDialog, EDA_BASE_FRAME *aFrame) | |
| ~PANEL_GIT_BRANCHES () override | |
| void | Populate () |
| Fill the list from the repository's branches. The repository is read on a worker. | |
| void | StopTransfer () |
| Ask a force push still running to stop. It finishes on its own. | |
Protected Attributes | |
| wxSearchCtrl * | m_branchSearch |
| wxSplitterWindow * | m_branchesSplitter |
| wxPanel * | m_branchListPanel |
| wxListCtrl * | m_branchesList |
| wxStaticText * | m_branchCount |
| wxPanel * | m_branchDetail |
| wxStaticText * | m_branchTitle |
| wxStaticText * | m_branchCommit |
| wxStaticText * | m_branchAuthor |
| wxTextCtrl * | m_branchMessage |
| wxStaticText * | m_branchSync |
| wxButton * | m_newBranchButton |
| wxButton * | m_deleteBranchButton |
| wxButton * | m_forcePushButton |
Private Member Functions | |
| void | reloadBranches () |
| Refill the list after the search text changed. | |
| void | showBranchDetail (const wxString &aBranch) |
| Fill the detail pane with aBranch, or hide it when the name is empty or gone. | |
| void | fillBranchDetail (const KIGIT_BRANCH_DETAIL &aDetail) |
| void | hideBranchDetail () |
| void | onNewBranch () |
| void | onDeleteBranch () |
| void | onForcePush () |
| Force push the current branch, after an explicit confirmation. | |
| void | startForcePush (std::shared_ptr< KIGIT_COMMON > aCommon, const wxString &aExpectedBranch, const wxString &aExpectedHeadOid) |
Private Attributes | |
| GIT_ADVANCED_DIALOG * | m_dialog |
| EDA_BASE_FRAME * | m_frame |
| std::vector< bool > | m_branchIsRemote |
| Whether each listed row is a remote-tracking branch. | |
| KIGIT_TRANSFER | m_push |
| The force push this page started. | |
| KIGIT_QUERY | m_listQuery |
| List and detail reads share the session lock without waiting on the UI thread. | |
| KIGIT_QUERY | m_detailQuery |
| KIGIT_QUERY | m_actionQuery |
| Reads needed before an action's confirmation, separate from list refreshes. | |
| int | m_branchSashPos = 0 |
| Where the user left the sash between the list and its detail pane. | |
| bool | m_fillingBranches = false |
| True while the list is being refilled, when its selection events are its own. | |
The advanced git window's Branches page: a searchable list beside the selected branch's detail, with the actions that create, delete and force push a branch.
Definition at line 37 of file panel_git_branches.h.
| PANEL_GIT_BRANCHES::PANEL_GIT_BRANCHES | ( | wxWindow * | aParent, |
| GIT_ADVANCED_DIALOG * | aDialog, | ||
| EDA_BASE_FRAME * | aFrame ) |
Definition at line 39 of file panel_git_branches.cpp.
References _, DisplayInfoMessage(), hideBranchDetail(), PANEL_GIT_BRANCHES_BASE::m_branchDetail, PANEL_GIT_BRANCHES_BASE::m_branchesList, PANEL_GIT_BRANCHES_BASE::m_branchesSplitter, m_branchIsRemote, m_branchSashPos, PANEL_GIT_BRANCHES_BASE::m_branchSearch, PANEL_GIT_BRANCHES_BASE::m_deleteBranchButton, m_dialog, m_fillingBranches, PANEL_GIT_BRANCHES_BASE::m_forcePushButton, m_frame, PANEL_GIT_BRANCHES_BASE::m_newBranchButton, KIGIT::MarkDestructive(), onDeleteBranch(), onForcePush(), onNewBranch(), PANEL_GIT_BRANCHES_BASE::PANEL_GIT_BRANCHES_BASE(), reloadBranches(), and showBranchDetail().
|
override |
Definition at line 119 of file panel_git_branches.cpp.
References StopTransfer().
|
private |
Definition at line 232 of file panel_git_branches.cpp.
References _, KIGIT_AHEAD_BEHIND::ahead, KIGIT_BRANCH_DETAIL::author, KIGIT_AHEAD_BEHIND::behind, KIGIT_BRANCH_DETAIL::divergence, KIGIT_BRANCH_DETAIL::email, KIGIT_BRANCH_DETAIL::found, hideBranchDetail(), PANEL_GIT_BRANCHES_BASE::m_branchAuthor, PANEL_GIT_BRANCHES_BASE::m_branchCommit, PANEL_GIT_BRANCHES_BASE::m_branchDetail, PANEL_GIT_BRANCHES_BASE::m_branchesSplitter, PANEL_GIT_BRANCHES_BASE::m_branchListPanel, PANEL_GIT_BRANCHES_BASE::m_branchMessage, m_branchSashPos, PANEL_GIT_BRANCHES_BASE::m_branchSync, PANEL_GIT_BRANCHES_BASE::m_branchTitle, KIGIT_BRANCH_DETAIL::message, KIGIT_BRANCH_DETAIL::name, KIGIT::RelativeDate(), KIGIT_BRANCH_DETAIL::tipHash, KIGIT_BRANCH_DETAIL::upstream, and KIGIT_BRANCH_DETAIL::when.
|
private |
Definition at line 276 of file panel_git_branches.cpp.
References PANEL_GIT_BRANCHES_BASE::m_branchDetail, PANEL_GIT_BRANCHES_BASE::m_branchesSplitter, m_branchSashPos, m_detailQuery, and KIGIT::UnsplitKeepingSash().
Referenced by fillBranchDetail(), PANEL_GIT_BRANCHES(), Populate(), and showBranchDetail().
|
private |
Definition at line 317 of file panel_git_branches.cpp.
References _, DisplayInfoMessage(), m_actionQuery, PANEL_GIT_BRANCHES_BASE::m_branchesList, m_dialog, m_frame, name, and KIGIT::SelectedText().
Referenced by PANEL_GIT_BRANCHES().
|
private |
Force push the current branch, after an explicit confirmation.
Definition at line 405 of file panel_git_branches.cpp.
References _, DisplayInfoMessage(), KIGIT_COMMON::GetCurrentBranchName(), KIGIT_COMMON::GetHeadCommitId(), KIGIT_COMMON::GetRemoteNameOrDefault(), KIGIT_COMMON::HasPushAndPullRemote(), KIGIT_COMMON::IsHeadDetached(), m_actionQuery, m_dialog, m_frame, m_push, KIGIT::ShowBusyMessage(), and startForcePush().
Referenced by PANEL_GIT_BRANCHES().
|
private |
Definition at line 283 of file panel_git_branches.cpp.
References _, KIGIT::BranchNameError(), KIGIT_COMMON::CreateBranch(), DisplayErrorMessage(), PANEL_GIT_BRANCHES_BASE::m_branchesList, m_dialog, name, and KIGIT::SelectedText().
Referenced by PANEL_GIT_BRANCHES().
| void PANEL_GIT_BRANCHES::Populate | ( | ) |
Fill the list from the repository's branches. The repository is read on a worker.
Definition at line 131 of file panel_git_branches.cpp.
References _, hideBranchDetail(), PANEL_GIT_BRANCHES_BASE::m_branchCount, PANEL_GIT_BRANCHES_BASE::m_branchesList, m_detailQuery, m_dialog, m_fillingBranches, m_frame, m_listQuery, and showBranchDetail().
Referenced by reloadBranches().
|
private |
Refill the list after the search text changed.
Definition at line 201 of file panel_git_branches.cpp.
References Populate().
Referenced by PANEL_GIT_BRANCHES().
|
private |
Fill the detail pane with aBranch, or hide it when the name is empty or gone.
Definition at line 207 of file panel_git_branches.cpp.
References hideBranchDetail(), m_detailQuery, m_dialog, and m_frame.
Referenced by PANEL_GIT_BRANCHES(), and Populate().
|
private |
Definition at line 475 of file panel_git_branches.cpp.
References _, KIGIT::CallOnUi(), Error, m_dialog, m_push, result, and Success.
Referenced by onForcePush().
| void PANEL_GIT_BRANCHES::StopTransfer | ( | ) |
Ask a force push still running to stop. It finishes on its own.
Definition at line 125 of file panel_git_branches.cpp.
References m_push.
Referenced by ~PANEL_GIT_BRANCHES().
|
private |
Reads needed before an action's confirmation, separate from list refreshes.
Definition at line 81 of file panel_git_branches.h.
Referenced by onDeleteBranch(), and onForcePush().
|
protectedinherited |
Definition at line 48 of file panel_git_branches_base.h.
Referenced by PANEL_GIT_BRANCHES::fillBranchDetail(), and PANEL_GIT_BRANCHES_BASE().
|
protectedinherited |
Definition at line 47 of file panel_git_branches_base.h.
Referenced by PANEL_GIT_BRANCHES::fillBranchDetail(), and PANEL_GIT_BRANCHES_BASE().
|
protectedinherited |
Definition at line 44 of file panel_git_branches_base.h.
Referenced by PANEL_GIT_BRANCHES_BASE(), and PANEL_GIT_BRANCHES::Populate().
|
protectedinherited |
Definition at line 45 of file panel_git_branches_base.h.
Referenced by PANEL_GIT_BRANCHES::fillBranchDetail(), PANEL_GIT_BRANCHES::hideBranchDetail(), PANEL_GIT_BRANCHES::PANEL_GIT_BRANCHES(), and PANEL_GIT_BRANCHES_BASE().
|
protectedinherited |
Definition at line 43 of file panel_git_branches_base.h.
Referenced by PANEL_GIT_BRANCHES::onDeleteBranch(), PANEL_GIT_BRANCHES::onNewBranch(), PANEL_GIT_BRANCHES::PANEL_GIT_BRANCHES(), PANEL_GIT_BRANCHES_BASE(), and PANEL_GIT_BRANCHES::Populate().
|
protectedinherited |
Definition at line 41 of file panel_git_branches_base.h.
Referenced by PANEL_GIT_BRANCHES::fillBranchDetail(), PANEL_GIT_BRANCHES::hideBranchDetail(), PANEL_GIT_BRANCHES::PANEL_GIT_BRANCHES(), and PANEL_GIT_BRANCHES_BASE().
|
private |
Whether each listed row is a remote-tracking branch.
Those are shown but cannot be switched to, so the row has to say which it is.
Definition at line 71 of file panel_git_branches.h.
Referenced by PANEL_GIT_BRANCHES().
|
protectedinherited |
Definition at line 42 of file panel_git_branches_base.h.
Referenced by PANEL_GIT_BRANCHES::fillBranchDetail(), and PANEL_GIT_BRANCHES_BASE().
|
protectedinherited |
Definition at line 49 of file panel_git_branches_base.h.
Referenced by PANEL_GIT_BRANCHES::fillBranchDetail(), and PANEL_GIT_BRANCHES_BASE().
|
private |
Where the user left the sash between the list and its detail pane.
Definition at line 84 of file panel_git_branches.h.
Referenced by fillBranchDetail(), hideBranchDetail(), and PANEL_GIT_BRANCHES().
|
protectedinherited |
Definition at line 40 of file panel_git_branches_base.h.
Referenced by PANEL_GIT_BRANCHES::PANEL_GIT_BRANCHES(), and PANEL_GIT_BRANCHES_BASE().
|
protectedinherited |
Definition at line 50 of file panel_git_branches_base.h.
Referenced by PANEL_GIT_BRANCHES::fillBranchDetail(), and PANEL_GIT_BRANCHES_BASE().
|
protectedinherited |
Definition at line 46 of file panel_git_branches_base.h.
Referenced by PANEL_GIT_BRANCHES::fillBranchDetail(), and PANEL_GIT_BRANCHES_BASE().
|
protectedinherited |
Definition at line 52 of file panel_git_branches_base.h.
Referenced by PANEL_GIT_BRANCHES::PANEL_GIT_BRANCHES(), and PANEL_GIT_BRANCHES_BASE().
|
private |
Definition at line 78 of file panel_git_branches.h.
Referenced by hideBranchDetail(), Populate(), and showBranchDetail().
|
private |
Definition at line 66 of file panel_git_branches.h.
Referenced by onDeleteBranch(), onForcePush(), onNewBranch(), PANEL_GIT_BRANCHES(), Populate(), showBranchDetail(), and startForcePush().
|
private |
True while the list is being refilled, when its selection events are its own.
Definition at line 87 of file panel_git_branches.h.
Referenced by PANEL_GIT_BRANCHES(), and Populate().
|
protectedinherited |
Definition at line 53 of file panel_git_branches_base.h.
Referenced by PANEL_GIT_BRANCHES::PANEL_GIT_BRANCHES(), and PANEL_GIT_BRANCHES_BASE().
|
private |
Definition at line 67 of file panel_git_branches.h.
Referenced by onDeleteBranch(), onForcePush(), PANEL_GIT_BRANCHES(), Populate(), and showBranchDetail().
|
private |
List and detail reads share the session lock without waiting on the UI thread.
Definition at line 77 of file panel_git_branches.h.
Referenced by Populate().
|
protectedinherited |
Definition at line 51 of file panel_git_branches_base.h.
Referenced by PANEL_GIT_BRANCHES::PANEL_GIT_BRANCHES(), and PANEL_GIT_BRANCHES_BASE().
|
private |
The force push this page started.
Definition at line 74 of file panel_git_branches.h.
Referenced by onForcePush(), startForcePush(), and StopTransfer().