|
KiCad PCB EDA Suite
|
The advanced git window's Stashes page: the list beside the selected stash's detail, with the actions that save, apply, pop and drop a stash. More...
#include <panel_git_stashes.h>
Public Member Functions | |
| PANEL_GIT_STASHES (wxWindow *aParent, GIT_ADVANCED_DIALOG *aDialog, EDA_BASE_FRAME *aFrame) | |
| void | Populate () |
| Fill the list from the repository's stashes. The repository is read on a worker. | |
Protected Attributes | |
| wxSplitterWindow * | m_stashesSplitter |
| wxPanel * | m_stashListPanel |
| wxListCtrl * | m_stashesList |
| wxStaticText * | m_stashCount |
| wxPanel * | m_stashDetail |
| wxStaticText * | m_stashWhen |
| wxStaticText * | m_stashBranch |
| wxStaticText * | m_stashCommit |
| wxTextCtrl * | m_stashMessage |
| wxListCtrl * | m_stashFiles |
| wxButton * | m_applyStashButton |
| wxButton * | m_popStashButton |
| wxButton * | m_dropStashButton |
| wxButton * | m_stashSaveButton |
Private Member Functions | |
| void | showStashDetail (const wxString &aId) |
| Fill the detail pane with the stash aId names, or hide it when the id is empty or gone. | |
| void | fillStashDetail (const KIGIT_STASH_DETAIL &aDetail) |
| void | hideStashDetail () |
| wxString | stashIdForRow (long aRow) const |
| The stash shown on aRow, by its commit, or empty when the row is gone. | |
| void | restoreSelectedStash (bool aRemoveAfterApply) |
| void | onStashApply () |
| void | onStashPop () |
| void | onStashDrop () |
| void | onStashSave () |
| void | checkStashChanges () |
| After saving the editors, read the changes before asking for a stash description. | |
Private Attributes | |
| GIT_ADVANCED_DIALOG * | m_dialog |
| EDA_BASE_FRAME * | m_frame |
| std::vector< wxString > | m_stashIds |
| The stash commit behind each row, since a row's index is only valid for the listing it came from. | |
| 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_stashSashPos = 0 |
| Where the user left the sash between the list and its detail pane. | |
| bool | m_fillingStashes = false |
| True while the list is being refilled, when its selection events are its own. | |
The advanced git window's Stashes page: the list beside the selected stash's detail, with the actions that save, apply, pop and drop a stash.
Definition at line 37 of file panel_git_stashes.h.
| PANEL_GIT_STASHES::PANEL_GIT_STASHES | ( | wxWindow * | aParent, |
| GIT_ADVANCED_DIALOG * | aDialog, | ||
| EDA_BASE_FRAME * | aFrame ) |
Definition at line 63 of file panel_git_stashes.cpp.
References _, hideStashDetail(), PANEL_GIT_STASHES_BASE::m_applyStashButton, m_dialog, PANEL_GIT_STASHES_BASE::m_dropStashButton, m_fillingStashes, m_frame, PANEL_GIT_STASHES_BASE::m_popStashButton, PANEL_GIT_STASHES_BASE::m_stashDetail, PANEL_GIT_STASHES_BASE::m_stashesList, PANEL_GIT_STASHES_BASE::m_stashesSplitter, PANEL_GIT_STASHES_BASE::m_stashFiles, m_stashSashPos, PANEL_GIT_STASHES_BASE::m_stashSaveButton, KIGIT::MarkDestructive(), onStashApply(), onStashDrop(), onStashPop(), onStashSave(), PANEL_GIT_STASHES_BASE::PANEL_GIT_STASHES_BASE(), ShowGitCommitDiff(), showStashDetail(), and stashIdForRow().
|
private |
After saving the editors, read the changes before asking for a stash description.
Definition at line 395 of file panel_git_stashes.cpp.
References _, KIPLATFORM::UI::IsDarkTheme(), m_actionQuery, m_dialog, m_frame, message, and ProjectSafeToRewrite().
Referenced by onStashSave().
|
private |
Definition at line 222 of file panel_git_stashes.cpp.
References _, KIGIT_STASH_DETAIL::baseHash, KIGIT_STASH_DETAIL::branch, KIGIT_STASH_DETAIL::files, KIGIT_STASH_DETAIL::found, hideStashDetail(), PANEL_GIT_STASHES_BASE::m_stashBranch, PANEL_GIT_STASHES_BASE::m_stashCommit, PANEL_GIT_STASHES_BASE::m_stashDetail, PANEL_GIT_STASHES_BASE::m_stashesSplitter, PANEL_GIT_STASHES_BASE::m_stashFiles, PANEL_GIT_STASHES_BASE::m_stashListPanel, PANEL_GIT_STASHES_BASE::m_stashMessage, m_stashSashPos, PANEL_GIT_STASHES_BASE::m_stashWhen, KIGIT_STASH_DETAIL::message, KIGIT::RelativeDate(), and KIGIT_STASH_DETAIL::when.
|
private |
Definition at line 247 of file panel_git_stashes.cpp.
References m_detailQuery, PANEL_GIT_STASHES_BASE::m_stashDetail, PANEL_GIT_STASHES_BASE::m_stashesSplitter, m_stashSashPos, and KIGIT::UnsplitKeepingSash().
Referenced by fillStashDetail(), PANEL_GIT_STASHES(), Populate(), and showStashDetail().
|
private |
Definition at line 307 of file panel_git_stashes.cpp.
References restoreSelectedStash().
Referenced by PANEL_GIT_STASHES().
|
private |
Definition at line 319 of file panel_git_stashes.cpp.
References _, index, IsOK(), m_dialog, PANEL_GIT_STASHES_BASE::m_stashesList, KIGIT_COMMON::StashDrop(), and stashIdForRow().
Referenced by PANEL_GIT_STASHES().
|
private |
Definition at line 313 of file panel_git_stashes.cpp.
References restoreSelectedStash().
Referenced by PANEL_GIT_STASHES().
|
private |
Definition at line 349 of file panel_git_stashes.cpp.
References checkStashChanges(), DisplayErrorMessage(), KIGIT::EnsureGitIdentity(), KIGIT::PROJECT_GIT_UTILS::LfsRefusal(), m_actionQuery, m_dialog, m_frame, and KIGIT::ReadGitIdentity().
Referenced by PANEL_GIT_STASHES().
| void PANEL_GIT_STASHES::Populate | ( | ) |
Fill the list from the repository's stashes. The repository is read on a worker.
Definition at line 134 of file panel_git_stashes.cpp.
References _, hideStashDetail(), m_detailQuery, m_dialog, m_fillingStashes, m_frame, m_listQuery, PANEL_GIT_STASHES_BASE::m_stashCount, PANEL_GIT_STASHES_BASE::m_stashesList, showStashDetail(), and stashIdForRow().
|
private |
Definition at line 263 of file panel_git_stashes.cpp.
References _, index, IsOK(), m_dialog, PANEL_GIT_STASHES_BASE::m_stashesList, KIGIT_COMMON::StashApply(), stashIdForRow(), and KIGIT_COMMON::StashPop().
Referenced by onStashApply(), and onStashPop().
|
private |
Fill the detail pane with the stash aId names, or hide it when the id is empty or gone.
Definition at line 193 of file panel_git_stashes.cpp.
References hideStashDetail(), m_detailQuery, m_dialog, and m_frame.
Referenced by PANEL_GIT_STASHES(), and Populate().
|
private |
The stash shown on aRow, by its commit, or empty when the row is gone.
Definition at line 254 of file panel_git_stashes.cpp.
References m_stashIds.
Referenced by onStashDrop(), PANEL_GIT_STASHES(), Populate(), and restoreSelectedStash().
|
private |
Reads needed before an action's confirmation, separate from list refreshes.
Definition at line 75 of file panel_git_stashes.h.
Referenced by checkStashChanges(), and onStashSave().
|
protectedinherited |
Definition at line 49 of file panel_git_stashes_base.h.
Referenced by PANEL_GIT_STASHES::PANEL_GIT_STASHES(), and PANEL_GIT_STASHES_BASE().
|
private |
Definition at line 72 of file panel_git_stashes.h.
Referenced by hideStashDetail(), Populate(), and showStashDetail().
|
private |
Definition at line 63 of file panel_git_stashes.h.
Referenced by checkStashChanges(), onStashDrop(), onStashSave(), PANEL_GIT_STASHES(), Populate(), restoreSelectedStash(), and showStashDetail().
|
protectedinherited |
Definition at line 51 of file panel_git_stashes_base.h.
Referenced by PANEL_GIT_STASHES::PANEL_GIT_STASHES(), and PANEL_GIT_STASHES_BASE().
|
private |
True while the list is being refilled, when its selection events are its own.
Definition at line 81 of file panel_git_stashes.h.
Referenced by PANEL_GIT_STASHES(), and Populate().
|
private |
Definition at line 64 of file panel_git_stashes.h.
Referenced by checkStashChanges(), onStashSave(), PANEL_GIT_STASHES(), Populate(), and showStashDetail().
|
private |
List and detail reads share the session lock without waiting on the UI thread.
Definition at line 71 of file panel_git_stashes.h.
Referenced by Populate().
|
protectedinherited |
Definition at line 50 of file panel_git_stashes_base.h.
Referenced by PANEL_GIT_STASHES::PANEL_GIT_STASHES(), and PANEL_GIT_STASHES_BASE().
|
protectedinherited |
Definition at line 45 of file panel_git_stashes_base.h.
Referenced by PANEL_GIT_STASHES::fillStashDetail(), and PANEL_GIT_STASHES_BASE().
|
protectedinherited |
Definition at line 46 of file panel_git_stashes_base.h.
Referenced by PANEL_GIT_STASHES::fillStashDetail(), and PANEL_GIT_STASHES_BASE().
|
protectedinherited |
Definition at line 42 of file panel_git_stashes_base.h.
Referenced by PANEL_GIT_STASHES_BASE(), and PANEL_GIT_STASHES::Populate().
|
protectedinherited |
Definition at line 43 of file panel_git_stashes_base.h.
Referenced by PANEL_GIT_STASHES::fillStashDetail(), PANEL_GIT_STASHES::hideStashDetail(), PANEL_GIT_STASHES::PANEL_GIT_STASHES(), and PANEL_GIT_STASHES_BASE().
|
protectedinherited |
Definition at line 41 of file panel_git_stashes_base.h.
Referenced by PANEL_GIT_STASHES::onStashDrop(), PANEL_GIT_STASHES::PANEL_GIT_STASHES(), PANEL_GIT_STASHES_BASE(), PANEL_GIT_STASHES::Populate(), and PANEL_GIT_STASHES::restoreSelectedStash().
|
protectedinherited |
Definition at line 39 of file panel_git_stashes_base.h.
Referenced by PANEL_GIT_STASHES::fillStashDetail(), PANEL_GIT_STASHES::hideStashDetail(), PANEL_GIT_STASHES::PANEL_GIT_STASHES(), and PANEL_GIT_STASHES_BASE().
|
protectedinherited |
Definition at line 48 of file panel_git_stashes_base.h.
Referenced by PANEL_GIT_STASHES::fillStashDetail(), PANEL_GIT_STASHES::PANEL_GIT_STASHES(), and PANEL_GIT_STASHES_BASE().
|
private |
The stash commit behind each row, since a row's index is only valid for the listing it came from.
Definition at line 68 of file panel_git_stashes.h.
Referenced by stashIdForRow().
|
protectedinherited |
Definition at line 40 of file panel_git_stashes_base.h.
Referenced by PANEL_GIT_STASHES::fillStashDetail(), and PANEL_GIT_STASHES_BASE().
|
protectedinherited |
Definition at line 47 of file panel_git_stashes_base.h.
Referenced by PANEL_GIT_STASHES::fillStashDetail(), and PANEL_GIT_STASHES_BASE().
|
private |
Where the user left the sash between the list and its detail pane.
Definition at line 78 of file panel_git_stashes.h.
Referenced by fillStashDetail(), hideStashDetail(), and PANEL_GIT_STASHES().
|
protectedinherited |
Definition at line 52 of file panel_git_stashes_base.h.
Referenced by PANEL_GIT_STASHES::PANEL_GIT_STASHES(), and PANEL_GIT_STASHES_BASE().
|
protectedinherited |
Definition at line 44 of file panel_git_stashes_base.h.
Referenced by PANEL_GIT_STASHES::fillStashDetail(), and PANEL_GIT_STASHES_BASE().