mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-23 13:14:59 +00:00
feature<FolderDialog>: remove View.FolderBrowser and use windows shell32 API to select folders
This commit is contained in:
parent
0419cf96fc
commit
6061f5a074
8 changed files with 169 additions and 213 deletions
|
@ -342,9 +342,10 @@ namespace SourceGit.Views.Widgets {
|
|||
var saveToPatch = new MenuItem();
|
||||
saveToPatch.Header = App.Text("CommitCM.SaveAsPatch");
|
||||
saveToPatch.Click += (o, e) => {
|
||||
FolderBrowser.Open(null, "Save patch to ...", saveTo => {
|
||||
new Commands.FormatPatch(repo.Path, commit.SHA, saveTo).Exec();
|
||||
});
|
||||
var dialog = new Controls.FolderDialog("SaveFileTo");
|
||||
if (dialog.ShowDialog() == true) {
|
||||
new Commands.FormatPatch(repo.Path, commit.SHA, dialog.SelectedPath).Exec();
|
||||
}
|
||||
};
|
||||
menu.Items.Add(saveToPatch);
|
||||
menu.Items.Add(new Separator());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue