KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_git_branches.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation, either version 3 of the License, or (at your
9 * option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef PANEL_GIT_BRANCHES_H
21#define PANEL_GIT_BRANCHES_H
22
23#include <vector>
24
28
29class EDA_BASE_FRAME;
32
33
39{
40public:
41 PANEL_GIT_BRANCHES( wxWindow* aParent, GIT_ADVANCED_DIALOG* aDialog, EDA_BASE_FRAME* aFrame );
42 ~PANEL_GIT_BRANCHES() override;
43
45 void Populate();
46
48 void StopTransfer();
49
50private:
52 void reloadBranches();
53
55 void showBranchDetail( const wxString& aBranch );
56 void fillBranchDetail( const KIGIT_BRANCH_DETAIL& aDetail );
57 void hideBranchDetail();
58
59 void onNewBranch();
60 void onDeleteBranch();
61
64 void onForcePush( bool aRetriedAfterTrust = false );
65 void startForcePush( std::shared_ptr<KIGIT_COMMON> aCommon, const wxString& aExpectedBranch,
66 const wxString& aExpectedHeadOid, const wxString& aRemoteName, const wxString& aPushUrl,
67 bool aRetriedAfterTrust );
68
71
74 std::vector<bool> m_branchIsRemote;
75
78
81
84
88
91
94
96 bool m_fillingBranches = false;
97};
98
99#endif // PANEL_GIT_BRANCHES_H
The base frame for deriving all KiCad main window classes.
The advanced Git window: a non-modal dialog with a top bar naming the repository and branch and a sid...
One transfer's hold on its repository, released when reset, begun again or destroyed.
Read repository state without blocking the UI.
PANEL_GIT_BRANCHES_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)
void StopTransfer()
Ask a force push still running to stop. It finishes on its own.
PANEL_GIT_BRANCHES(wxWindow *aParent, GIT_ADVANCED_DIALOG *aDialog, EDA_BASE_FRAME *aFrame)
void fillBranchDetail(const KIGIT_BRANCH_DETAIL &aDetail)
int m_branchSashPos
Where the user left the sash between the list and its detail pane.
KIGIT_QUERY m_listQuery
List and detail reads share the session lock without waiting on the UI thread.
void onForcePush(bool aRetriedAfterTrust=false)
Force push the current branch, after an explicit confirmation.
void showBranchDetail(const wxString &aBranch)
Fill the detail pane with aBranch, or hide it when the name is empty or gone.
int m_credentialPrompts
Keyring reads and credential prompts the current force push has shown, reset when it ends.
GIT_ADVANCED_DIALOG * m_dialog
void reloadBranches()
Refill the list after the search text changed.
void Populate()
Fill the list from the repository's branches. The repository is read on a worker.
EDA_BASE_FRAME * m_frame
GIT_TRANSFER_BUSY::HOLD m_pushBusy
The force push's hold on its repository while it runs.
std::vector< bool > m_branchIsRemote
Whether each listed row is a remote-tracking branch.
void startForcePush(std::shared_ptr< KIGIT_COMMON > aCommon, const wxString &aExpectedBranch, const wxString &aExpectedHeadOid, const wxString &aRemoteName, const wxString &aPushUrl, bool aRetriedAfterTrust)
KIGIT_TRANSFER m_push
The force push this page started.
KIGIT_QUERY m_actionQuery
Reads needed before an action's confirmation, separate from list refreshes.
bool m_fillingBranches
True while the list is being refilled, when its selection events are its own.