KiCad PCB EDA Suite
Loading...
Searching...
No Matches
GIT_COMMIT_PANE Class Reference

Docked panel for committing: the branch to commit to, a summary and description, the commit options, the changed files with a checkbox each, the commit and Get Changes buttons, and a gear holding the commit settings and the advanced Git window. More...

#include <git_commit_pane.h>

Inheritance diagram for GIT_COMMIT_PANE:
GIT_COMMIT_PANE_BASE GIT_TRANSFER_WATCHER

Classes

struct  COMMIT_REQUEST
 
struct  MERGE_PREPARATION
 
struct  STATUS
 

Public Member Functions

 GIT_COMMIT_PANE (EDA_BASE_FRAME *aParent)
 
 GIT_COMMIT_PANE (wxWindow *aParent, EDA_BASE_FRAME *aFrame)
 The same panel inside another window, such as the advanced window's Changes page.
 
 ~GIT_COMMIT_PANE () override
 
void OnGitTransfersChanged () override
 Follow a transfer on this pane's repository beginning or ending in any window.
 
bool Layout () override
 Lay out the pane, then re-wrap the status line when the width its column got has changed.
 
void SetFileSelectedHandler (std::function< void(const wxString &)> aHandler)
 Called with the path of the file the user selects in the list, or empty when none is.
 
wxString GetCommitMessage () const
 The message as typed. A second form on the same project shows the same text.
 
void SetCommitMessage (const wxString &aMessage)
 
void SetMessageChangedHandler (std::function< void()> aHandler)
 Called when the user edits the message, so another form can follow along.
 
void RefreshFileList ()
 Read the project's git status and repopulate the list.
 
void ShowTransferProgress (const wxString &aText)
 Show a line of transfer progress. Called from the UI thread by a KIGIT_STATUS_REPORTER.
 
void ReloadAdvancedWindow ()
 Reload the advanced window when it is open, for a preferences change it also shows.
 
void ShowHistory ()
 Open the advanced window on its History page.
 
void Pull ()
 Get changes from the remote, as the Get Changes button does.
 
void Push ()
 Push the local commits, as the Push button does.
 
void BeginAmend (const wxString &aExpectedCommit=wxEmptyString)
 Prepare the amend form. A history entry supplies its hash and starts with no files selected.
 
void SetBusyChangedHandler (std::function< void(bool)> aHandler)
 Called when a transfer starts and when it ends, so an owning window can follow along.
 
int GetMinDockWidth () const
 The width the panel needs so its widest row fits, for the dock that holds it.
 

Protected Attributes

wxBoxSizer * m_branchRow
 
wxStaticText * m_branchName
 
wxChoice * m_recentMessages
 
STD_BITMAP_BUTTON * m_settingsButton
 
wxTextCtrl * m_summary
 
wxStaticText * m_summaryCount
 
wxTextCtrl * m_description
 
wxStaticBoxSizer * m_optionsSizer
 
wxCheckBox * m_amendCheckbox
 
wxCheckBox * m_signOffCheckbox
 
wxCheckBox * m_newBranchCheckbox
 
wxTextCtrl * m_newBranchName
 
wxBoxSizer * m_changesRow
 
wxStaticText * m_changesLabel
 
wxButton * m_showDiffButton
 
wxStaticText * m_emptyLabel
 
wxBoxSizer * m_trustRow
 
wxTextCtrl * m_trustCommand
 
wxButton * m_copyTrustCommand
 
wxButton * m_undoCommitButton
 
FILE_CHECKLIST_CTRL * m_checklist
 
SPLIT_BUTTON * m_commitButton
 
wxButton * m_pullButton
 

Private Member Functions

void onCommit (wxCommandEvent &aEvent)
 The split button's main half. It commits, or pushes when that is all there is to do.
 
void onCommitAndPush (wxCommandEvent &aEvent)
 
void onPull (wxCommandEvent &aEvent)
 
void abandonOperation (std::shared_ptr< KIGIT_COMMON > aCommon)
 Drop an in-progress merge or rebase and return the project to its last commit.
 
void finishAbandonOperation (std::shared_ptr< KIGIT_COMMON > aCommon, const std::vector< wxString > &aOutside)
 
void onAmendToggled (wxCommandEvent &aEvent)
 
void onUndoCommit (wxCommandEvent &aEvent)
 Take back the last commit while no remote has it, keeping its changes staged and its message.
 
void onNewBranchToggled (wxCommandEvent &aEvent)
 
void onRecentMessage (wxCommandEvent &aEvent)
 
void onShowDiff (wxCommandEvent &aEvent)
 
void onFileActivated (wxDataViewEvent &aEvent)
 
void onChecklistContextMenu (wxDataViewEvent &aEvent)
 
void discardFile (std::shared_ptr< KIGIT_COMMON > aCommon, const wxString &aPath)
 
void confirmDiscardFile (std::shared_ptr< KIGIT_COMMON > aCommon, const wxString &aPath, bool aTracked, bool aConflicted, wxString aRoot)
 
void doCommit (bool aAndPush)
 Commit the checked files (or amend the last commit when the amend box is ticked), then push when aAndPush is set.
 
void saveForCommit (std::shared_ptr< KIGIT_COMMON > aCommon, std::shared_ptr< COMMIT_REQUEST > aRequest)
 
void finishCommit (std::shared_ptr< KIGIT_COMMON > aCommon, const COMMIT_REQUEST &aRequest)
 
void onChecklistChanged (wxDataViewEvent &aEvent)
 
void onMessageChanged (wxCommandEvent &aEvent)
 
void onIdle (wxIdleEvent &aEvent)
 
void applyTheme ()
 Set the icons and colours that follow the light or dark theme.
 
void onThemeChanged (wxSysColourChangedEvent &aEvent)
 
void onSettings (wxCommandEvent &aEvent)
 The gear's menu: the advanced window and the author.
 
void setAuthor ()
 
void setStatusText (const wxString &aText)
 Set the status line text and wrap it to the width of the label's column.
 
bool layoutAndWrapStatus ()
 Lay out the controls, then rewrap the status line to its column's new width.
 
void updateDockMinHeight ()
 Give the AUI pane the controls' minimum height, so a dock never squeezes them.
 
void showTrustCommand (const wxString &aCommand)
 Show a command to copy under the status line, or hide the row when aCommand is empty.
 
bool transferCanStart ()
 False, with a message, while a transfer is running or a merge waits to be finished.
 
void layoutWide ()
 Put the file list beside the commit controls instead of above them, for a wide host, with a heading over the message and a summary of the working tree under it.
 
void updateSummary ()
 Refresh the staged count in the changes heading, and the summary box where the wide layout has one.
 
void applyStatus (const STATUS &aStatus)
 Apply a completed repository snapshot on the UI thread.
 
void populateBranches (const STATUS &aStatus)
 Fill the branch dropdown from the completed snapshot.
 
void populateRecentMessages (const std::vector< wxString > &aMessages)
 Fill the Recent messages dropdown from the completed snapshot.
 
void updateDescriptionHint ()
 Where the platform has no hint for a multi line box, a label lies over the description box while it is empty.
 
void setDescription (const wxString &aText)
 
void showDisabledState ()
 Clear the list and disable every control while version control is off.
 
void setBusy (bool aBusy, const wxString &aStatus)
 Enable or disable the controls while a network operation runs, showing a status.
 
GIT_TRANSFER_BUSY & transfers () const
 The transfers on the repository this pane shows.
 
bool othersBusy () const
 The transfers on it that other windows started, leaving out this pane's own.
 
wxString othersStatus () const
 
bool othersCanCancel () const
 
void runActionQuery (std::shared_ptr< KIGIT_COMMON > aCommon, std::function< void(KIGIT_COMMON &)> aWork, std::function< void()> aDone, const wxString &aStatus)
 Read an action's prerequisites off the UI thread, then resume only in the same project.
 
bool deferForSecret (const std::shared_ptr< KIGIT_COMMON > &aCommon, const wxString &aStatus, std::function< void()> aStart)
 Read the keyring before a transfer, holding the pane busy as aStatus, then call aStart unless cancelled or the session changed.
 
void abandonKeyringWait ()
 
bool dropKeyringWait ()
 Forget a keyring wait without touching the busy state. True when one was pending.
 
void submitPush (std::shared_ptr< KIGIT_COMMON > aCommon, bool aRetriedAfterTrust=false)
 
void startPush (std::shared_ptr< KIGIT_COMMON > aCommon, const wxString &aBranch, const wxString &aHead, bool aRetriedAfterTrust)
 
void onPushDone (std::shared_ptr< KIGIT_COMMON > aCommon, int aResult, const wxString &aError, const wxString &aDetails, bool aAuthFailure, const std::optional< KIGIT::HOST_KEY_FAILURE > &aHostKey, bool aRetriedAfterTrust, bool aCancelled)
 
void submitPull (std::shared_ptr< KIGIT_COMMON > aCommon, bool aThenPush, bool aRetriedAfterTrust=false)
 aThenPush pushes after a successful pull, which belongs only to the rejected-push recovery flow.
 
void startPull (std::shared_ptr< KIGIT_COMMON > aCommon, bool aThenPush, bool aRetriedAfterTrust)
 
void resolvePullConflicts (std::shared_ptr< KIGIT_COMMON > aCommon, bool aThenPush)
 Resolve a conflicted pull file by file, using the visual merge tool for design files, then create the merge commit.
 
void finishPullConflictPreparation (std::shared_ptr< KIGIT_COMMON > aCommon, bool aThenPush, std::shared_ptr< MERGE_PREPARATION > aPreparation)
 
void onPullDone (std::shared_ptr< KIGIT_COMMON > aCommon, int aResult, const wxString &aError, const wxString &aDetails, bool aAuthFailure, const std::optional< KIGIT::HOST_KEY_FAILURE > &aHostKey, bool aRetriedAfterTrust, bool aThenPush, bool aCancelled)
 
void updateMessageVisibility (bool aHasChanges)
 Show the message field whenever a commit is possible, including a message-only amend.
 
void updateCommitButton ()
 Set what the commit buttons say, and whether they are enabled, for the current state.
 
void updateSummaryCount ()
 Show how many of the summary's 72 columns are left, once that is 10 or fewer.
 
wxString operationNoun () const
 The noun for the operation in progress, for messages.
 
wxString abandonLabel () const
 The label the network button carries while an operation is in progress.
 
void syncListener ()
 Register a refresh listener with the project's current git session, re-registering if the session changed since last time (it is recreated when a project is loaded).
 

Private Attributes

EDA_BASE_FRAME * m_frame
 
int m_minDockWidth = 0
 The widest row's minimum width, measured before anything is hidden.
 
bool m_inAdvancedWindow = false
 True on the advanced window's Changes page, false in the docked panel.
 
bool m_hasUnpushedCommits
 
size_t m_unpushedCount = 0
 Commits waiting to be pushed, or 0 when the branch has no upstream to count them against.
 
bool m_hasRemote
 
bool m_hasRepo = false
 Whether the last completed status snapshot had a repository.
 
bool m_headDetached
 True when HEAD is a commit rather than a branch, so nothing can be committed or pushed.
 
size_t m_upstreamAhead
 Commits the upstream has that this project does not, which Get Changes brings in.
 
bool m_operationInProgress
 True while a merge or rebase is in progress. The network button then reads Abandon.
 
GitOperation m_operation
 Which operation, so the button and the explanation can name it.
 
bool m_editorsDirty
 True when an open editor held unsaved changes at the last refresh.
 
bool m_canAmend = false
 Whether the current branch allows an amend. A refresh must not change an active amend into a commit.
 
std::pair< wxString, wxString > m_amendHead
 The branch and commit chosen when amend started. Keep them fixed while editing.
 
std::pair< wxString, wxString > m_undoHead
 The branch and commit the last refresh showed, so Undo takes back only the commit the user saw.
 
wxStaticText * m_descriptionHint = nullptr
 The description box's hint, a label laid over it while it is empty.
 
wxHyperlinkCtrl * m_historyLink = nullptr
 Opens the History page from the docked panel. Never shown inside the advanced window.
 
std::vector< wxString > m_recentMessageTexts
 The full messages behind the Recent messages dropdown, in its order after the caption.
 
wxMenuItem * m_commitAndPushItem = nullptr
 The arrow menu's entry, relabelled with the main button.
 
bool m_commitButtonPushes = false
 True while the main button reads Push, with nothing left to commit.
 
KIGIT_TRANSFER m_transfer
 The push or pull this panel submitted last.
 
int m_credentialPrompts = 0
 Keyring reads and credential prompts the current request has shown, reset when it ends.
 
bool m_keyringWait = false
 A push or pull waits on the keyring. The count fences off an answer from a cancelled wait.
 
unsigned m_keyringRequest = 0
 
wxString m_transferStatus
 The status m_transfer began with, shown again once other windows' transfers end before it.
 
GIT_TRANSFER_BUSY::HOLD m_ownHold
 m_transfer's hold on the repository, so every other pane on it follows and can cancel it
 
UTIL::LINK m_transferLink
 Follows the transfers other windows run on this pane's repository.
 
bool m_showingOthers = false
 The busy state shows another window's transfer, which this pane releases when the last one ends.
 
std::function< void(bool)> m_busyChangedHandler
 Told when a transfer starts and ends. Empty unless an owning window asked.
 
wxString m_statusText
 Unwrapped status text, kept so it can be re-wrapped on resize.
 
int m_statusWrapWidth = -1
 The width the status text was last wrapped to, so a layout re-wraps it only when that changes.
 
int m_dockMinHeight = -1
 The controls' minimum height from the last layout, applied to the AUI pane at idle time.
 
wxWindow * m_dockParent = nullptr
 
bool m_dockUpdatePending = false
 
bool m_listenerAttached = false
 True once this panel has attached its refresh listener to a session at least once.
 
std::weak_ptr< KIGIT_COMMON > m_listenerSession
 The git session this panel registered a refresh listener with, weak so it does not keep the session alive.
 
std::set< wxString > m_shownPaths
 Paths shown in the list at the last refresh, so a refresh can tell which files the user deliberately unticked from files that are simply new, and preserve those unticks.
 
EDITOR_SNAPSHOT m_docsBeforePull
 On-disk identity of the open documents, taken before a pull so only the ones the merge rewrote are reloaded afterwards.
 
std::function< void()> m_messageChangedHandler
 Told when the message is edited. Empty unless an owning window asked.
 
wxString m_currentBranch
 The branch a commit will land on, empty when detached or before the first commit.
 
std::function< void(const wxString &)> m_fileSelectedHandler
 
wxStaticText * m_summaryFiles = nullptr
 
wxStaticText * m_summaryAdded = nullptr
 
wxStaticText * m_summaryRemoved = nullptr
 
std::pair< int, int > m_lineStats
 Lines the working tree adds and removes against HEAD, read at the last refresh.
 
KIGIT_QUERY m_refresh
 Coalesce refreshes while a repository read is running, and discard stale results.
 
KIGIT_QUERY m_actionQuery
 
bool m_actionPending = false
 

Detailed Description

Docked panel for committing: the branch to commit to, a summary and description, the commit options, the changed files with a checkbox each, the commit and Get Changes buttons, and a gear holding the commit settings and the advanced Git window.

Definition at line 51 of file git_commit_pane.h.

Constructor & Destructor Documentation

◆ GIT_COMMIT_PANE() [1/2]

GIT_COMMIT_PANE::GIT_COMMIT_PANE ( EDA_BASE_FRAME * aParent)

Definition at line 198 of file git_commit_pane.cpp.

References GIT_COMMIT_PANE().

Referenced by GIT_COMMIT_PANE().

◆ GIT_COMMIT_PANE() [2/2]

GIT_COMMIT_PANE::GIT_COMMIT_PANE ( wxWindow * aParent,
EDA_BASE_FRAME * aFrame )

The same panel inside another window, such as the advanced window's Changes page.

The gear's entry for opening that window is left out there.

Definition at line 204 of file git_commit_pane.cpp.

References _, applyTheme(), doCommit(), KIPLATFORM::UI::EllipsizeChoiceBox(), KIUI::FollowSystemLinkColour(), GIT_COMMIT_PANE_BASE::GIT_COMMIT_PANE_BASE(), layoutWide(), GIT_COMMIT_PANE_BASE::m_amendCheckbox, GIT_COMMIT_PANE_BASE::m_checklist, m_commitAndPushItem, GIT_COMMIT_PANE_BASE::m_commitButton, m_commitButtonPushes, GIT_COMMIT_PANE_BASE::m_copyTrustCommand, GIT_COMMIT_PANE_BASE::m_description, m_descriptionHint, m_editorsDirty, m_fileSelectedHandler, m_frame, m_hasRemote, m_hasUnpushedCommits, m_headDetached, m_historyLink, m_inAdvancedWindow, m_messageChangedHandler, m_minDockWidth, GIT_COMMIT_PANE_BASE::m_newBranchCheckbox, GIT_COMMIT_PANE_BASE::m_newBranchName, m_operation, m_operationInProgress, GIT_COMMIT_PANE_BASE::m_pullButton, GIT_COMMIT_PANE_BASE::m_recentMessages, GIT_COMMIT_PANE_BASE::m_settingsButton, GIT_COMMIT_PANE_BASE::m_showDiffButton, GIT_COMMIT_PANE_BASE::m_summary, GIT_COMMIT_PANE_BASE::m_summaryCount, GIT_COMMIT_PANE_BASE::m_trustCommand, GIT_COMMIT_PANE_BASE::m_undoCommitButton, m_upstreamAhead, None, onAmendToggled(), onChecklistChanged(), onChecklistContextMenu(), onCommit(), onCommitAndPush(), onFileActivated(), OnGitTransfersChanged(), onIdle(), onMessageChanged(), onNewBranchToggled(), onPull(), onRecentMessage(), onSettings(), onShowDiff(), onThemeChanged(), onUndoCommit(), RefreshFileList(), SaveClipboard(), ShowHistory(), updateCommitButton(), updateDescriptionHint(), and updateSummaryCount().

◆ ~GIT_COMMIT_PANE()

GIT_COMMIT_PANE::~GIT_COMMIT_PANE ( )
override

Member Function Documentation

◆ abandonKeyringWait()

void GIT_COMMIT_PANE::abandonKeyringWait ( )
private

Definition at line 2483 of file git_commit_pane.cpp.

References _, dropKeyringWait(), m_actionPending, and setBusy().

Referenced by deferForSecret(), and onPull().

◆ abandonLabel()

wxString GIT_COMMIT_PANE::abandonLabel ( ) const
private

The label the network button carries while an operation is in progress.

Definition at line 1002 of file git_commit_pane.cpp.

References _, CherryPick, m_operation, Merge, Rebase, and Revert.

Referenced by updateCommitButton().

◆ abandonOperation()

void GIT_COMMIT_PANE::abandonOperation ( std::shared_ptr< KIGIT_COMMON > aCommon)
private

Drop an in-progress merge or rebase and return the project to its last commit.

Definition at line 1708 of file git_commit_pane.cpp.

References _, ChangedTrackedFilesOutsideProject(), finishAbandonOperation(), m_frame, and runActionQuery().

Referenced by onPull().

◆ applyStatus()

◆ applyTheme()

◆ BeginAmend()

◆ confirmDiscardFile()

void GIT_COMMIT_PANE::confirmDiscardFile ( std::shared_ptr< KIGIT_COMMON > aCommon,
const wxString & aPath,
bool aTracked,
bool aConflicted,
wxString aRoot )
private

◆ deferForSecret()

bool GIT_COMMIT_PANE::deferForSecret ( const std::shared_ptr< KIGIT_COMMON > & aCommon,
const wxString & aStatus,
std::function< void()> aStart )
private

Read the keyring before a transfer, holding the pane busy as aStatus, then call aStart unless cancelled or the session changed.

False when nothing needs reading

Definition at line 2426 of file git_commit_pane.cpp.

References abandonKeyringWait(), KIGIT_COMMON::DeferForSecret(), m_actionPending, m_keyringRequest, m_keyringWait, m_ownHold, m_transfer, and setBusy().

Referenced by startPull(), and startPush().

◆ discardFile()

void GIT_COMMIT_PANE::discardFile ( std::shared_ptr< KIGIT_COMMON > aCommon,
const wxString & aPath )
private

◆ doCommit()

◆ dropKeyringWait()

bool GIT_COMMIT_PANE::dropKeyringWait ( )
private

Forget a keyring wait without touching the busy state. True when one was pending.

Definition at line 2472 of file git_commit_pane.cpp.

References m_keyringRequest, and m_keyringWait.

Referenced by abandonKeyringWait(), showDisabledState(), and syncListener().

◆ finishAbandonOperation()

void GIT_COMMIT_PANE::finishAbandonOperation ( std::shared_ptr< KIGIT_COMMON > aCommon,
const std::vector< wxString > & aOutside )
private

◆ finishCommit()

◆ finishPullConflictPreparation()

◆ GetCommitMessage()

wxString GIT_COMMIT_PANE::GetCommitMessage ( ) const

The message as typed. A second form on the same project shows the same text.

Definition at line 1195 of file git_commit_pane.cpp.

References KIGIT::ComposeCommitMessage(), GIT_COMMIT_PANE_BASE::m_description, and GIT_COMMIT_PANE_BASE::m_summary.

Referenced by BeginAmend(), and onUndoCommit().

◆ GetMinDockWidth()

int GIT_COMMIT_PANE::GetMinDockWidth ( ) const
inline

The width the panel needs so its widest row fits, for the dock that holds it.

Definition at line 104 of file git_commit_pane.h.

References m_minDockWidth.

◆ Layout()

bool GIT_COMMIT_PANE::Layout ( )
override

Lay out the pane, then re-wrap the status line when the width its column got has changed.

Definition at line 767 of file git_commit_pane.cpp.

References layoutAndWrapStatus(), m_dockMinHeight, m_dockParent, and m_dockUpdatePending.

Referenced by applyStatus(), BeginAmend(), layoutWide(), onAmendToggled(), setStatusText(), showDisabledState(), updateCommitButton(), updateSummary(), and updateSummaryCount().

◆ layoutAndWrapStatus()

bool GIT_COMMIT_PANE::layoutAndWrapStatus ( )
private

Lay out the controls, then rewrap the status line to its column's new width.

Definition at line 790 of file git_commit_pane.cpp.

References GIT_COMMIT_PANE_BASE::m_emptyLabel, m_statusText, m_statusWrapWidth, and KIUI::WrapText().

Referenced by Layout().

◆ layoutWide()

void GIT_COMMIT_PANE::layoutWide ( )
private

◆ onAmendToggled()

void GIT_COMMIT_PANE::onAmendToggled ( wxCommandEvent & aEvent)
private

◆ onChecklistChanged()

void GIT_COMMIT_PANE::onChecklistChanged ( wxDataViewEvent & aEvent)
private

Definition at line 1319 of file git_commit_pane.cpp.

References updateCommitButton(), and updateSummary().

Referenced by GIT_COMMIT_PANE().

◆ onChecklistContextMenu()

◆ onCommit()

void GIT_COMMIT_PANE::onCommit ( wxCommandEvent & aEvent)
private

The split button's main half. It commits, or pushes when that is all there is to do.

Definition at line 1564 of file git_commit_pane.cpp.

References doCommit(), and m_commitButtonPushes.

Referenced by GIT_COMMIT_PANE().

◆ onCommitAndPush()

void GIT_COMMIT_PANE::onCommitAndPush ( wxCommandEvent & aEvent)
private

Definition at line 1570 of file git_commit_pane.cpp.

References doCommit().

Referenced by GIT_COMMIT_PANE().

◆ onFileActivated()

void GIT_COMMIT_PANE::onFileActivated ( wxDataViewEvent & aEvent)
private

Definition at line 1555 of file git_commit_pane.cpp.

References GIT_COMMIT_PANE_BASE::m_checklist, m_frame, path, and ShowGitFileDiff().

Referenced by GIT_COMMIT_PANE().

◆ OnGitTransfersChanged()

void GIT_COMMIT_PANE::OnGitTransfersChanged ( )
overridevirtual

Follow a transfer on this pane's repository beginning or ending in any window.

Implements GIT_TRANSFER_WATCHER.

Definition at line 2348 of file git_commit_pane.cpp.

References m_actionPending, m_frame, GIT_COMMIT_PANE_BASE::m_pullButton, m_showingOthers, m_transfer, m_transferStatus, othersBusy(), othersCanCancel(), othersStatus(), and setBusy().

Referenced by GIT_COMMIT_PANE(), and syncListener().

◆ onIdle()

void GIT_COMMIT_PANE::onIdle ( wxIdleEvent & aEvent)
private

◆ onMessageChanged()

void GIT_COMMIT_PANE::onMessageChanged ( wxCommandEvent & aEvent)
private

◆ onNewBranchToggled()

void GIT_COMMIT_PANE::onNewBranchToggled ( wxCommandEvent & aEvent)
private

◆ onPull()

◆ onPullDone()

◆ onPushDone()

◆ onRecentMessage()

void GIT_COMMIT_PANE::onRecentMessage ( wxCommandEvent & aEvent)
private

◆ onSettings()

void GIT_COMMIT_PANE::onSettings ( wxCommandEvent & aEvent)
private

The gear's menu: the advanced window and the author.

Definition at line 919 of file git_commit_pane.cpp.

References _, m_frame, m_inAdvancedWindow, setAuthor(), and GIT_ADVANCED_DIALOG::ShowForFrame().

Referenced by GIT_COMMIT_PANE().

◆ onShowDiff()

void GIT_COMMIT_PANE::onShowDiff ( wxCommandEvent & aEvent)
private

Definition at line 1225 of file git_commit_pane.cpp.

References GIT_COMMIT_PANE_BASE::m_checklist, m_frame, path, and ShowGitFileDiff().

Referenced by GIT_COMMIT_PANE().

◆ onThemeChanged()

void GIT_COMMIT_PANE::onThemeChanged ( wxSysColourChangedEvent & aEvent)
private

Definition at line 880 of file git_commit_pane.cpp.

References applyTheme(), and RefreshFileList().

Referenced by GIT_COMMIT_PANE().

◆ onUndoCommit()

◆ operationNoun()

wxString GIT_COMMIT_PANE::operationNoun ( ) const
private

The noun for the operation in progress, for messages.

Definition at line 989 of file git_commit_pane.cpp.

References _, CherryPick, m_operation, Merge, Rebase, and Revert.

Referenced by applyStatus(), finishAbandonOperation(), and transferCanStart().

◆ othersBusy()

bool GIT_COMMIT_PANE::othersBusy ( ) const
private

The transfers on it that other windows started, leaving out this pane's own.

Definition at line 2330 of file git_commit_pane.cpp.

References GIT_TRANSFER_BUSY::IsBusy(), m_ownHold, and transfers().

Referenced by doCommit(), OnGitTransfersChanged(), onPull(), onUndoCommit(), runActionQuery(), setBusy(), transferCanStart(), and updateCommitButton().

◆ othersCanCancel()

bool GIT_COMMIT_PANE::othersCanCancel ( ) const
private

Definition at line 2342 of file git_commit_pane.cpp.

References GIT_TRANSFER_BUSY::CanCancel(), m_ownHold, and transfers().

Referenced by OnGitTransfersChanged(), onPull(), and setBusy().

◆ othersStatus()

wxString GIT_COMMIT_PANE::othersStatus ( ) const
private

Definition at line 2336 of file git_commit_pane.cpp.

References m_ownHold, GIT_TRANSFER_BUSY::Status(), and transfers().

Referenced by OnGitTransfersChanged(), and setBusy().

◆ populateBranches()

void GIT_COMMIT_PANE::populateBranches ( const STATUS & aStatus)
private

◆ populateRecentMessages()

void GIT_COMMIT_PANE::populateRecentMessages ( const std::vector< wxString > & aMessages)
private

Fill the Recent messages dropdown from the completed snapshot.

Definition at line 1261 of file git_commit_pane.cpp.

References _, GIT_COMMIT_PANE_BASE::m_recentMessages, m_recentMessageTexts, and message.

Referenced by applyStatus().

◆ Pull()

void GIT_COMMIT_PANE::Pull ( )

Get changes from the remote, as the Get Changes button does.

The advanced window's Pull button lands here, so one place owns the merge and its conflict handling.

Definition at line 1662 of file git_commit_pane.cpp.

References _, DisplayInfoMessage(), m_credentialPrompts, m_frame, m_hasRemote, submitPull(), syncListener(), and transferCanStart().

Referenced by onPull().

◆ Push()

void GIT_COMMIT_PANE::Push ( )

Push the local commits, as the Push button does.

The advanced window's Push button lands here too.

Definition at line 1682 of file git_commit_pane.cpp.

References _, DisplayInfoMessage(), m_credentialPrompts, m_frame, m_hasRemote, m_hasUnpushedCommits, submitPush(), syncListener(), and transferCanStart().

◆ RefreshFileList()

◆ ReloadAdvancedWindow()

void GIT_COMMIT_PANE::ReloadAdvancedWindow ( )

Reload the advanced window when it is open, for a preferences change it also shows.

Definition at line 694 of file git_commit_pane.cpp.

References GIT_ADVANCED_DIALOG::Active().

◆ resolvePullConflicts()

void GIT_COMMIT_PANE::resolvePullConflicts ( std::shared_ptr< KIGIT_COMMON > aCommon,
bool aThenPush )
private

Resolve a conflicted pull file by file, using the visual merge tool for design files, then create the merge commit.

Cancelling leaves the repository exactly as it was.

Definition at line 2711 of file git_commit_pane.cpp.

References _, finishPullConflictPreparation(), KIGIT_COMMON::GetMergeConflicts(), KIGIT_COMMON::IsPullRebaseConfigured(), KIGIT::ReadGitIdentity(), and runActionQuery().

Referenced by onPullDone().

◆ runActionQuery()

void GIT_COMMIT_PANE::runActionQuery ( std::shared_ptr< KIGIT_COMMON > aCommon,
std::function< void(KIGIT_COMMON &)> aWork,
std::function< void()> aDone,
const wxString & aStatus )
private

Read an action's prerequisites off the UI thread, then resume only in the same project.

Definition at line 2277 of file git_commit_pane.cpp.

References m_actionPending, m_actionQuery, m_frame, m_transfer, othersBusy(), Pgm(), setBusy(), and KIGIT::ShowBusyMessage().

Referenced by abandonOperation(), BeginAmend(), discardFile(), doCommit(), onPushDone(), resolvePullConflicts(), setAuthor(), submitPull(), and submitPush().

◆ saveForCommit()

void GIT_COMMIT_PANE::saveForCommit ( std::shared_ptr< KIGIT_COMMON > aCommon,
std::shared_ptr< COMMIT_REQUEST > aRequest )
private

◆ setAuthor()

void GIT_COMMIT_PANE::setAuthor ( )
private

Definition at line 949 of file git_commit_pane.cpp.

References _, KIGIT::EditGitIdentity(), m_frame, KIGIT::ReadGitIdentity(), and runActionQuery().

Referenced by onSettings().

◆ setBusy()

◆ SetBusyChangedHandler()

void GIT_COMMIT_PANE::SetBusyChangedHandler ( std::function< void(bool)> aHandler)
inline

Called when a transfer starts and when it ends, so an owning window can follow along.

Definition at line 101 of file git_commit_pane.h.

References m_busyChangedHandler.

Referenced by GIT_ADVANCED_DIALOG::CloseForPane().

◆ SetCommitMessage()

void GIT_COMMIT_PANE::SetCommitMessage ( const wxString & aMessage)

◆ setDescription()

void GIT_COMMIT_PANE::setDescription ( const wxString & aText)
private

◆ SetFileSelectedHandler()

void GIT_COMMIT_PANE::SetFileSelectedHandler ( std::function< void(const wxString &)> aHandler)

Called with the path of the file the user selects in the list, or empty when none is.

Definition at line 416 of file git_commit_pane.cpp.

References m_fileSelectedHandler.

◆ SetMessageChangedHandler()

void GIT_COMMIT_PANE::SetMessageChangedHandler ( std::function< void()> aHandler)
inline

Called when the user edits the message, so another form can follow along.

Definition at line 75 of file git_commit_pane.h.

References m_messageChangedHandler.

Referenced by GIT_ADVANCED_DIALOG::CloseForPane().

◆ setStatusText()

void GIT_COMMIT_PANE::setStatusText ( const wxString & aText)
private

Set the status line text and wrap it to the width of the label's column.

Definition at line 759 of file git_commit_pane.cpp.

References Layout(), m_statusText, and m_statusWrapWidth.

Referenced by applyStatus(), setBusy(), showDisabledState(), and updateCommitButton().

◆ showDisabledState()

◆ ShowHistory()

void GIT_COMMIT_PANE::ShowHistory ( )

Open the advanced window on its History page.

Definition at line 701 of file git_commit_pane.cpp.

References HISTORY, m_frame, and GIT_ADVANCED_DIALOG::ShowForFrame().

Referenced by GIT_COMMIT_PANE().

◆ ShowTransferProgress()

void GIT_COMMIT_PANE::ShowTransferProgress ( const wxString & aText)

Show a line of transfer progress. Called from the UI thread by a KIGIT_STATUS_REPORTER.

Definition at line 2371 of file git_commit_pane.cpp.

References m_frame.

◆ showTrustCommand()

void GIT_COMMIT_PANE::showTrustCommand ( const wxString & aCommand)
private

Show a command to copy under the status line, or hide the row when aCommand is empty.

Definition at line 752 of file git_commit_pane.cpp.

References GIT_COMMIT_PANE_BASE::m_trustCommand, and GIT_COMMIT_PANE_BASE::m_trustRow.

Referenced by applyStatus(), and showDisabledState().

◆ startPull()

void GIT_COMMIT_PANE::startPull ( std::shared_ptr< KIGIT_COMMON > aCommon,
bool aThenPush,
bool aRetriedAfterTrust )
private

◆ startPush()

void GIT_COMMIT_PANE::startPush ( std::shared_ptr< KIGIT_COMMON > aCommon,
const wxString & aBranch,
const wxString & aHead,
bool aRetriedAfterTrust )
private

◆ submitPull()

void GIT_COMMIT_PANE::submitPull ( std::shared_ptr< KIGIT_COMMON > aCommon,
bool aThenPush,
bool aRetriedAfterTrust = false )
private

aThenPush pushes after a successful pull, which belongs only to the rejected-push recovery flow.

A plain Get Changes leaves local commits unpublished.

Definition at line 3075 of file git_commit_pane.cpp.

References _, CHECK, KIGIT::EnsureGitIdentity(), m_frame, ProjectSafeToRewrite(), KIGIT::ReadGitIdentity(), ReadGitWorktreeStatus(), result, runActionQuery(), setBusy(), and startPull().

Referenced by onPullDone(), onPushDone(), and Pull().

◆ submitPush()

void GIT_COMMIT_PANE::submitPush ( std::shared_ptr< KIGIT_COMMON > aCommon,
bool aRetriedAfterTrust = false )
private

◆ syncListener()

void GIT_COMMIT_PANE::syncListener ( )
private

Register a refresh listener with the project's current git session, re-registering if the session changed since last time (it is recreated when a project is loaded).

Definition at line 441 of file git_commit_pane.cpp.

References GIT_ADVANCED_DIALOG::CloseActive(), dropKeyringWait(), m_actionPending, m_actionQuery, GIT_COMMIT_PANE_BASE::m_amendCheckbox, m_amendHead, m_frame, m_hasRepo, m_listenerAttached, m_listenerSession, m_refresh, m_shownPaths, m_transferLink, m_undoHead, OnGitTransfersChanged(), RefreshFileList(), setBusy(), and updateCommitButton().

Referenced by doCommit(), onPull(), onUndoCommit(), Pull(), Push(), and RefreshFileList().

◆ transferCanStart()

bool GIT_COMMIT_PANE::transferCanStart ( )
private

False, with a message, while a transfer is running or a merge waits to be finished.

Definition at line 1633 of file git_commit_pane.cpp.

References _, DisplayInfoMessage(), m_actionPending, m_headDetached, m_operationInProgress, m_transfer, operationNoun(), othersBusy(), and KIGIT::ShowBusyMessage().

Referenced by Pull(), and Push().

◆ transfers()

GIT_TRANSFER_BUSY & GIT_COMMIT_PANE::transfers ( ) const
private

The transfers on the repository this pane shows.

Definition at line 2323 of file git_commit_pane.cpp.

References m_frame.

Referenced by onPull(), othersBusy(), othersCanCancel(), and othersStatus().

◆ updateCommitButton()

◆ updateDescriptionHint()

void GIT_COMMIT_PANE::updateDescriptionHint ( )
private

Where the platform has no hint for a multi line box, a label lies over the description box while it is empty.

Definition at line 1298 of file git_commit_pane.cpp.

References GIT_COMMIT_PANE_BASE::m_description, and m_descriptionHint.

Referenced by applyStatus(), GIT_COMMIT_PANE(), onIdle(), and setDescription().

◆ updateDockMinHeight()

void GIT_COMMIT_PANE::updateDockMinHeight ( )
private

Give the AUI pane the controls' minimum height, so a dock never squeezes them.

Definition at line 818 of file git_commit_pane.cpp.

References m_dockMinHeight.

Referenced by onIdle().

◆ updateMessageVisibility()

◆ updateSummary()

void GIT_COMMIT_PANE::updateSummary ( )
private

Refresh the staged count in the changes heading, and the summary box where the wide layout has one.

Definition at line 1326 of file git_commit_pane.cpp.

References _, Layout(), GIT_COMMIT_PANE_BASE::m_changesLabel, GIT_COMMIT_PANE_BASE::m_checklist, m_lineStats, GIT_COMMIT_PANE_BASE::m_showDiffButton, m_shownPaths, m_summaryAdded, m_summaryFiles, and m_summaryRemoved.

Referenced by applyStatus(), and onChecklistChanged().

◆ updateSummaryCount()

void GIT_COMMIT_PANE::updateSummaryCount ( )
private

Show how many of the summary's 72 columns are left, once that is 10 or fewer.

Definition at line 1168 of file git_commit_pane.cpp.

References Layout(), left, GIT_COMMIT_PANE_BASE::m_summary, and GIT_COMMIT_PANE_BASE::m_summaryCount.

Referenced by GIT_COMMIT_PANE(), onMessageChanged(), SetCommitMessage(), and updateMessageVisibility().

Member Data Documentation

◆ m_actionPending

◆ m_actionQuery

KIGIT_QUERY GIT_COMMIT_PANE::m_actionQuery
private

◆ m_amendCheckbox

◆ m_amendHead

std::pair<wxString, wxString> GIT_COMMIT_PANE::m_amendHead
private

The branch and commit chosen when amend started. Keep them fixed while editing.

Definition at line 293 of file git_commit_pane.h.

Referenced by BeginAmend(), doCommit(), finishCommit(), onAmendToggled(), onUndoCommit(), showDisabledState(), and syncListener().

◆ m_branchName

wxStaticText* GIT_COMMIT_PANE_BASE::m_branchName
protectedinherited

◆ m_branchRow

wxBoxSizer* GIT_COMMIT_PANE_BASE::m_branchRow
protectedinherited

◆ m_busyChangedHandler

std::function<void( bool )> GIT_COMMIT_PANE::m_busyChangedHandler
private

Told when a transfer starts and ends. Empty unless an owning window asked.

Definition at line 338 of file git_commit_pane.h.

Referenced by setBusy(), and SetBusyChangedHandler().

◆ m_canAmend

bool GIT_COMMIT_PANE::m_canAmend = false
private

Whether the current branch allows an amend. A refresh must not change an active amend into a commit.

Definition at line 290 of file git_commit_pane.h.

Referenced by applyStatus(), BeginAmend(), setBusy(), showDisabledState(), updateCommitButton(), and updateMessageVisibility().

◆ m_changesLabel

wxStaticText* GIT_COMMIT_PANE_BASE::m_changesLabel
protectedinherited

Definition at line 59 of file git_commit_pane_base.h.

Referenced by GIT_COMMIT_PANE_BASE(), and GIT_COMMIT_PANE::updateSummary().

◆ m_changesRow

wxBoxSizer* GIT_COMMIT_PANE_BASE::m_changesRow
protectedinherited

◆ m_checklist

◆ m_commitAndPushItem

wxMenuItem* GIT_COMMIT_PANE::m_commitAndPushItem = nullptr
private

The arrow menu's entry, relabelled with the main button.

Definition at line 308 of file git_commit_pane.h.

Referenced by GIT_COMMIT_PANE(), and updateCommitButton().

◆ m_commitButton

SPLIT_BUTTON* GIT_COMMIT_PANE_BASE::m_commitButton
protectedinherited

◆ m_commitButtonPushes

bool GIT_COMMIT_PANE::m_commitButtonPushes = false
private

True while the main button reads Push, with nothing left to commit.

Definition at line 311 of file git_commit_pane.h.

Referenced by GIT_COMMIT_PANE(), onCommit(), and updateCommitButton().

◆ m_copyTrustCommand

wxButton* GIT_COMMIT_PANE_BASE::m_copyTrustCommand
protectedinherited

◆ m_credentialPrompts

int GIT_COMMIT_PANE::m_credentialPrompts = 0
private

Keyring reads and credential prompts the current request has shown, reset when it ends.

Definition at line 318 of file git_commit_pane.h.

Referenced by doCommit(), finishCommit(), onPullDone(), onPushDone(), Pull(), and Push().

◆ m_currentBranch

wxString GIT_COMMIT_PANE::m_currentBranch
private

The branch a commit will land on, empty when detached or before the first commit.

Definition at line 371 of file git_commit_pane.h.

Referenced by doCommit(), and populateBranches().

◆ m_description

◆ m_descriptionHint

wxStaticText* GIT_COMMIT_PANE::m_descriptionHint = nullptr
private

The description box's hint, a label laid over it while it is empty.

Definition at line 299 of file git_commit_pane.h.

Referenced by applyTheme(), GIT_COMMIT_PANE(), and updateDescriptionHint().

◆ m_dockMinHeight

int GIT_COMMIT_PANE::m_dockMinHeight = -1
private

The controls' minimum height from the last layout, applied to the AUI pane at idle time.

Definition at line 347 of file git_commit_pane.h.

Referenced by Layout(), and updateDockMinHeight().

◆ m_dockParent

wxWindow* GIT_COMMIT_PANE::m_dockParent = nullptr
private

Definition at line 348 of file git_commit_pane.h.

Referenced by Layout().

◆ m_dockUpdatePending

bool GIT_COMMIT_PANE::m_dockUpdatePending = false
private

Definition at line 349 of file git_commit_pane.h.

Referenced by Layout(), and onIdle().

◆ m_docsBeforePull

EDITOR_SNAPSHOT GIT_COMMIT_PANE::m_docsBeforePull
private

On-disk identity of the open documents, taken before a pull so only the ones the merge rewrote are reloaded afterwards.

Definition at line 365 of file git_commit_pane.h.

Referenced by finishPullConflictPreparation(), and startPull().

◆ m_editorsDirty

bool GIT_COMMIT_PANE::m_editorsDirty
private

True when an open editor held unsaved changes at the last refresh.

Definition at line 287 of file git_commit_pane.h.

Referenced by applyStatus(), GIT_COMMIT_PANE(), onIdle(), showDisabledState(), updateCommitButton(), and updateMessageVisibility().

◆ m_emptyLabel

◆ m_fileSelectedHandler

std::function<void( const wxString& )> GIT_COMMIT_PANE::m_fileSelectedHandler
private

Definition at line 373 of file git_commit_pane.h.

Referenced by GIT_COMMIT_PANE(), and SetFileSelectedHandler().

◆ m_frame

◆ m_hasRemote

bool GIT_COMMIT_PANE::m_hasRemote
private

◆ m_hasRepo

bool GIT_COMMIT_PANE::m_hasRepo = false
private

Whether the last completed status snapshot had a repository.

Definition at line 272 of file git_commit_pane.h.

Referenced by applyStatus(), doCommit(), onIdle(), showDisabledState(), syncListener(), and updateCommitButton().

◆ m_hasUnpushedCommits

bool GIT_COMMIT_PANE::m_hasUnpushedCommits
private

◆ m_headDetached

bool GIT_COMMIT_PANE::m_headDetached
private

True when HEAD is a commit rather than a branch, so nothing can be committed or pushed.

Definition at line 275 of file git_commit_pane.h.

Referenced by applyStatus(), GIT_COMMIT_PANE(), populateBranches(), setBusy(), showDisabledState(), transferCanStart(), and updateCommitButton().

◆ m_historyLink

wxHyperlinkCtrl* GIT_COMMIT_PANE::m_historyLink = nullptr
private

Opens the History page from the docked panel. Never shown inside the advanced window.

Definition at line 302 of file git_commit_pane.h.

Referenced by applyStatus(), GIT_COMMIT_PANE(), and showDisabledState().

◆ m_inAdvancedWindow

bool GIT_COMMIT_PANE::m_inAdvancedWindow = false
private

True on the advanced window's Changes page, false in the docked panel.

Definition at line 262 of file git_commit_pane.h.

Referenced by applyStatus(), GIT_COMMIT_PANE(), onChecklistContextMenu(), and onSettings().

◆ m_keyringRequest

unsigned GIT_COMMIT_PANE::m_keyringRequest = 0
private

Definition at line 322 of file git_commit_pane.h.

Referenced by deferForSecret(), and dropKeyringWait().

◆ m_keyringWait

bool GIT_COMMIT_PANE::m_keyringWait = false
private

A push or pull waits on the keyring. The count fences off an answer from a cancelled wait.

Definition at line 321 of file git_commit_pane.h.

Referenced by deferForSecret(), and dropKeyringWait().

◆ m_lineStats

std::pair<int, int> GIT_COMMIT_PANE::m_lineStats
private

Lines the working tree adds and removes against HEAD, read at the last refresh.

Definition at line 381 of file git_commit_pane.h.

Referenced by applyStatus(), and updateSummary().

◆ m_listenerAttached

bool GIT_COMMIT_PANE::m_listenerAttached = false
private

True once this panel has attached its refresh listener to a session at least once.

A first attachment is not a project change, so it must not close the Advanced window.

Definition at line 353 of file git_commit_pane.h.

Referenced by syncListener().

◆ m_listenerSession

std::weak_ptr<KIGIT_COMMON> GIT_COMMIT_PANE::m_listenerSession
private

The git session this panel registered a refresh listener with, weak so it does not keep the session alive.

Used to unregister on destruction.

Definition at line 357 of file git_commit_pane.h.

Referenced by syncListener(), and ~GIT_COMMIT_PANE().

◆ m_messageChangedHandler

std::function<void()> GIT_COMMIT_PANE::m_messageChangedHandler
private

Told when the message is edited. Empty unless an owning window asked.

Definition at line 368 of file git_commit_pane.h.

Referenced by BeginAmend(), GIT_COMMIT_PANE(), onMessageChanged(), onUndoCommit(), and SetMessageChangedHandler().

◆ m_minDockWidth

int GIT_COMMIT_PANE::m_minDockWidth = 0
private

The widest row's minimum width, measured before anything is hidden.

Definition at line 259 of file git_commit_pane.h.

Referenced by GetMinDockWidth(), and GIT_COMMIT_PANE().

◆ m_newBranchCheckbox

◆ m_newBranchName

◆ m_operation

GitOperation GIT_COMMIT_PANE::m_operation
private

Which operation, so the button and the explanation can name it.

Definition at line 284 of file git_commit_pane.h.

Referenced by abandonLabel(), applyStatus(), GIT_COMMIT_PANE(), operationNoun(), and showDisabledState().

◆ m_operationInProgress

bool GIT_COMMIT_PANE::m_operationInProgress
private

True while a merge or rebase is in progress. The network button then reads Abandon.

Definition at line 281 of file git_commit_pane.h.

Referenced by applyStatus(), GIT_COMMIT_PANE(), onPull(), setBusy(), showDisabledState(), transferCanStart(), and updateCommitButton().

◆ m_optionsSizer

wxStaticBoxSizer* GIT_COMMIT_PANE_BASE::m_optionsSizer
protectedinherited

◆ m_ownHold

GIT_TRANSFER_BUSY::HOLD GIT_COMMIT_PANE::m_ownHold
private

m_transfer's hold on the repository, so every other pane on it follows and can cancel it

Definition at line 328 of file git_commit_pane.h.

Referenced by deferForSecret(), othersBusy(), othersCanCancel(), othersStatus(), setBusy(), startPull(), startPush(), and ~GIT_COMMIT_PANE().

◆ m_pullButton

◆ m_recentMessages

◆ m_recentMessageTexts

std::vector<wxString> GIT_COMMIT_PANE::m_recentMessageTexts
private

The full messages behind the Recent messages dropdown, in its order after the caption.

Definition at line 305 of file git_commit_pane.h.

Referenced by onRecentMessage(), populateRecentMessages(), and updateMessageVisibility().

◆ m_refresh

KIGIT_QUERY GIT_COMMIT_PANE::m_refresh
private

Coalesce refreshes while a repository read is running, and discard stale results.

Definition at line 384 of file git_commit_pane.h.

Referenced by onIdle(), RefreshFileList(), syncListener(), and ~GIT_COMMIT_PANE().

◆ m_settingsButton

◆ m_showDiffButton

wxButton* GIT_COMMIT_PANE_BASE::m_showDiffButton
protectedinherited

◆ m_showingOthers

bool GIT_COMMIT_PANE::m_showingOthers = false
private

The busy state shows another window's transfer, which this pane releases when the last one ends.

Definition at line 334 of file git_commit_pane.h.

Referenced by OnGitTransfersChanged(), and setBusy().

◆ m_shownPaths

std::set<wxString> GIT_COMMIT_PANE::m_shownPaths
private

Paths shown in the list at the last refresh, so a refresh can tell which files the user deliberately unticked from files that are simply new, and preserve those unticks.

Definition at line 361 of file git_commit_pane.h.

Referenced by applyStatus(), showDisabledState(), syncListener(), updateCommitButton(), and updateSummary().

◆ m_signOffCheckbox

wxCheckBox* GIT_COMMIT_PANE_BASE::m_signOffCheckbox
protectedinherited

◆ m_statusText

wxString GIT_COMMIT_PANE::m_statusText
private

Unwrapped status text, kept so it can be re-wrapped on resize.

Definition at line 341 of file git_commit_pane.h.

Referenced by layoutAndWrapStatus(), and setStatusText().

◆ m_statusWrapWidth

int GIT_COMMIT_PANE::m_statusWrapWidth = -1
private

The width the status text was last wrapped to, so a layout re-wraps it only when that changes.

Definition at line 344 of file git_commit_pane.h.

Referenced by layoutAndWrapStatus(), and setStatusText().

◆ m_summary

◆ m_summaryAdded

wxStaticText* GIT_COMMIT_PANE::m_summaryAdded = nullptr
private

Definition at line 377 of file git_commit_pane.h.

Referenced by applyTheme(), layoutWide(), and updateSummary().

◆ m_summaryCount

wxStaticText* GIT_COMMIT_PANE_BASE::m_summaryCount
protectedinherited

◆ m_summaryFiles

wxStaticText* GIT_COMMIT_PANE::m_summaryFiles = nullptr
private

Definition at line 376 of file git_commit_pane.h.

Referenced by layoutWide(), RefreshFileList(), and updateSummary().

◆ m_summaryRemoved

wxStaticText* GIT_COMMIT_PANE::m_summaryRemoved = nullptr
private

Definition at line 378 of file git_commit_pane.h.

Referenced by applyTheme(), layoutWide(), and updateSummary().

◆ m_transfer

◆ m_transferLink

UTIL::LINK GIT_COMMIT_PANE::m_transferLink
private

Follows the transfers other windows run on this pane's repository.

Definition at line 331 of file git_commit_pane.h.

Referenced by syncListener(), and ~GIT_COMMIT_PANE().

◆ m_transferStatus

wxString GIT_COMMIT_PANE::m_transferStatus
private

The status m_transfer began with, shown again once other windows' transfers end before it.

Definition at line 325 of file git_commit_pane.h.

Referenced by OnGitTransfersChanged(), startPull(), and startPush().

◆ m_trustCommand

wxTextCtrl* GIT_COMMIT_PANE_BASE::m_trustCommand
protectedinherited

◆ m_trustRow

wxBoxSizer* GIT_COMMIT_PANE_BASE::m_trustRow
protectedinherited

◆ m_undoCommitButton

◆ m_undoHead

std::pair<wxString, wxString> GIT_COMMIT_PANE::m_undoHead
private

The branch and commit the last refresh showed, so Undo takes back only the commit the user saw.

Definition at line 296 of file git_commit_pane.h.

Referenced by applyStatus(), onUndoCommit(), showDisabledState(), and syncListener().

◆ m_unpushedCount

size_t GIT_COMMIT_PANE::m_unpushedCount = 0
private

Commits waiting to be pushed, or 0 when the branch has no upstream to count them against.

Definition at line 267 of file git_commit_pane.h.

Referenced by applyStatus(), showDisabledState(), and updateCommitButton().

◆ m_upstreamAhead

size_t GIT_COMMIT_PANE::m_upstreamAhead
private

Commits the upstream has that this project does not, which Get Changes brings in.

Definition at line 278 of file git_commit_pane.h.

Referenced by applyStatus(), GIT_COMMIT_PANE(), showDisabledState(), and updateCommitButton().


The documentation for this class was generated from the following files: