forked from qt-creator/qt-creator
Git: Add shortcut to "manage remotes" to branch view
Change-Id: I36d9196a41869176f8ad602f1ba406402fc5b77c Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
committed by
André Hartmann
parent
754fd66a0b
commit
017f4d7c4d
@@ -180,6 +180,9 @@ void BranchView::slotCustomContextMenu(const QPoint &point)
|
||||
contextMenu.addAction(tr("Fetch"), this, [this, &remote]() {
|
||||
GitPlugin::client()->fetch(m_repository, *remote);
|
||||
});
|
||||
contextMenu.addSeparator();
|
||||
contextMenu.addAction(tr("Manage Remotes..."), GitPlugin::instance(),
|
||||
&GitPlugin::manageRemotes);
|
||||
}
|
||||
if (hasActions) {
|
||||
if (!currentSelected && (isLocal || isTag))
|
||||
|
@@ -573,7 +573,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
remoteRepositoryMenu->addSeparator(context);
|
||||
|
||||
createRepositoryAction(remoteRepositoryMenu, tr("Manage Remotes..."), "Git.RemoteList",
|
||||
context, false, std::bind(&GitPlugin::remoteList, this));
|
||||
context, false, std::bind(&GitPlugin::manageRemotes, this));
|
||||
|
||||
/* \"Remote Repository" menu */
|
||||
|
||||
@@ -1314,7 +1314,7 @@ void GitPlugin::branchList()
|
||||
NavigationWidget::activateSubWidget(Constants::GIT_BRANCH_VIEW_ID, Side::Right);
|
||||
}
|
||||
|
||||
void GitPlugin::remoteList()
|
||||
void GitPlugin::manageRemotes()
|
||||
{
|
||||
showNonModalDialog(currentState().topLevel(), m_remoteDialog);
|
||||
}
|
||||
|
@@ -92,6 +92,7 @@ public:
|
||||
|
||||
QObject *remoteCommand(const QStringList &options, const QString &workingDirectory,
|
||||
const QStringList &args) override;
|
||||
void manageRemotes();
|
||||
|
||||
protected:
|
||||
void updateActions(VcsBase::VcsBasePlugin::ActionState) override;
|
||||
@@ -135,7 +136,6 @@ private:
|
||||
void stashSnapshot();
|
||||
void stashPop();
|
||||
void branchList();
|
||||
void remoteList();
|
||||
void stashList();
|
||||
void fetch();
|
||||
void pull();
|
||||
|
Reference in New Issue
Block a user