diff options
author | Matt Ward <matt.ward@microsoft.com> | 2019-08-20 15:03:33 +0300 |
---|---|---|
committer | Matt Ward <matt.ward@microsoft.com> | 2019-08-20 15:03:33 +0300 |
commit | 0e0531214446692f94185a6ad3fbf4553f70ccf5 (patch) | |
tree | df224b0f7599a0a66dbb39f52ed4a32d29b29bb3 /main/src/addins/MonoDevelop.PackageManagement | |
parent | d576a3d58c7482e287545ff85b9a69b792d714d4 (diff) |
[NuGet] Do not install package when enter pressed in search text box
No longer installing the selected package in the Manage NuGet Packages
dialog when the enter key is pressed. This has caused a bit of
confusion and can cause a package to be installed when the user is
trying to run the search. Note that the search is a search as you type
so pressing the enter key has no affect.
Fixes VSTS #968790 - Hitting return in a search field installs a package
Diffstat (limited to 'main/src/addins/MonoDevelop.PackageManagement')
-rw-r--r-- | main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Gui/ManagePackagesDialog.cs | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Gui/ManagePackagesDialog.cs b/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Gui/ManagePackagesDialog.cs index e0d9bd6689..967351c86e 100644 --- a/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Gui/ManagePackagesDialog.cs +++ b/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Gui/ManagePackagesDialog.cs @@ -101,7 +101,6 @@ namespace MonoDevelop.PackageManagement this.packageSourceComboBox.SelectionChanged += PackageSourceChanged; this.addPackagesButton.Clicked += AddPackagesButtonClicked; this.packageSearchEntry.Changed += PackageSearchEntryChanged; - this.packageSearchEntry.Activated += PackageSearchEntryActivated; this.packageVersionComboBox.SelectionChanged += PackageVersionChanged; imageLoader.Loaded += ImageLoaded; @@ -841,45 +840,6 @@ namespace MonoDevelop.PackageManagement PackageCellViewPackageChecked (null, null); } - void ManagePackage (ManagePackagesSearchResultViewModel packageViewModel) - { - try { - if (packageViewModel != null) { - if (viewModel.IsConsolidatePageSelected) { - List<IPackageAction> packageActions = viewModel.CreateConsolidatePackageActions ( - new ManagePackagesSearchResultViewModel [] { packageViewModel } - ); - RunPackageActions (packageActions); - } else { - var projects = SelectProjects (packageViewModel).ToList (); - if (!projects.Any ()) - return; - - List<IPackageAction> packageActions = viewModel.CreatePackageActions ( - new ManagePackagesSearchResultViewModel [] { packageViewModel }, - projects); - RunPackageActions (packageActions); - } - } - } catch (Exception ex) { - LoggingService.LogInternalError ("ManagePackage failed.", ex); - ShowErrorMessage (ex.Message); - } - } - - void PackageSearchEntryActivated (object sender, EventArgs e) - { - if (loadingMessageVisible) - return; - - if (PackagesCheckedCount > 0) { - AddPackagesButtonClicked (sender, e); - } else { - ManagePackagesSearchResultViewModel selectedPackageViewModel = GetSelectedPackageViewModel (); - ManagePackage (selectedPackageViewModel); - } - } - void PackagesListViewScrollValueChanged (object sender, EventArgs e) { if (viewModel.IsLoadingNextPage) { |