mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-06 19:44:58 +00:00
Added workspaces shortcuts (#1328)
- added Alt+Space for opening Workspaces context menu (which can then be navigated normally with arrows) - added Alt+1 through Alt+9 for switching to corresponding workspace
This commit is contained in:
parent
506dbc218c
commit
01945f231e
5 changed files with 63 additions and 3 deletions
|
@ -463,6 +463,14 @@ namespace SourceGit.ViewModels
|
|||
return menu;
|
||||
}
|
||||
|
||||
public void SwitchWorkspace(int idx)
|
||||
{
|
||||
var pref = Preferences.Instance;
|
||||
if (idx >= pref.Workspaces.Count || pref.Workspaces[idx].IsActive) return;
|
||||
|
||||
SwitchWorkspace(pref.Workspaces[idx]);
|
||||
}
|
||||
|
||||
private string GetRepositoryGitDir(string repo)
|
||||
{
|
||||
var fullpath = Path.Combine(repo, ".git");
|
||||
|
@ -493,7 +501,7 @@ namespace SourceGit.ViewModels
|
|||
|
||||
return new Commands.QueryGitDir(repo).Result();
|
||||
}
|
||||
|
||||
|
||||
private void SwitchWorkspace(Workspace to)
|
||||
{
|
||||
foreach (var one in Pages)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue