* [gentoo-commits] proj/dotnet:master commit in: dev-util/monodevelop/files/, /
@ 2016-01-22 9:37 Heather Cynede
0 siblings, 0 replies; only message in thread
From: Heather Cynede @ 2016-01-22 9:37 UTC (permalink / raw
To: gentoo-commits
commit: cbe7b897dd9f9969df6a9ecec12654f3b8214c00
Author: ArsenShnurkov <Arsen.Shnurkov <AT> gmail <DOT> com>
AuthorDate: Fri Jan 22 08:51:19 2016 +0000
Commit: Heather Cynede <cynede <AT> gentoo <DOT> org>
CommitDate: Fri Jan 22 08:57:37 2016 +0000
URL: https://gitweb.gentoo.org/proj/dotnet.git/commit/?id=cbe7b897
.gitattributs added
.gitattributes | 2 +
dev-util/monodevelop/files/local-nuget-icons.patch | 54 +++++++++++-----------
2 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..c2bc284
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,2 @@
+# Denote all files that are truly binary and should not be modified.
+*.patch binary
diff --git a/dev-util/monodevelop/files/local-nuget-icons.patch b/dev-util/monodevelop/files/local-nuget-icons.patch
index 793bf8b..561e50f 100644
--- a/dev-util/monodevelop/files/local-nuget-icons.patch
+++ b/dev-util/monodevelop/files/local-nuget-icons.patch
@@ -1,33 +1,31 @@
--- a/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/ImageLoader.cs
+++ b/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/ImageLoader.cs
@@ -91,8 +91,7 @@ namespace MonoDevelop.PackageManagement
- ImageLoadedEventArgs LoadImage (Uri uri, object state)
- {
- try {
-- var httpClient = new HttpClient (uri);
-- Stream stream = httpClient.GetResponse ().GetResponseStream ();
-+ Stream stream = GetResponseStream (uri);
- Image image = Image.FromStream (stream);
-
- return new ImageLoadedEventArgs (image, uri, state);
+ ImageLoadedEventArgs LoadImage (Uri uri, object state)
+ {
+ try {
+- var httpClient = new HttpClient (uri);
+- Stream stream = httpClient.GetResponse ().GetResponseStream ();
++ Stream stream = GetResponseStream (uri);
+ Image image = Image.FromStream (stream);
+
+ return new ImageLoadedEventArgs (image, uri, state);
@@ -101,6 +100,17 @@ namespace MonoDevelop.PackageManagement
- }
- }
-
-+ static Stream GetResponseStream (Uri uri)
-+ {
-+ if (uri.IsFile) {
-+ var request = WebRequest.Create (uri);
-+ return request.GetResponse ().GetResponseStream ();
-+ }
-+
-+ var httpClient = new HttpClient (uri);
-+ return httpClient.GetResponse ().GetResponseStream ();
-+ }
-+
- void OnLoaded (ITask<ImageLoadedEventArgs> task, Uri uri, object state)
- {
- if (task.IsFaulted) {
---
-2.6.0
+ }
+ }
+
++ static Stream GetResponseStream (Uri uri)
++ {
++ if (uri.IsFile) {
++ var request = WebRequest.Create (uri);
++ return request.GetResponse ().GetResponseStream ();
++ }
++
++ var httpClient = new HttpClient (uri);
++ return httpClient.GetResponse ().GetResponseStream ();
++ }
++
+ void OnLoaded (ITask<ImageLoadedEventArgs> task, Uri uri, object state)
+ {
+ if (task.IsFaulted) {
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-01-22 9:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-22 9:37 [gentoo-commits] proj/dotnet:master commit in: dev-util/monodevelop/files/, / Heather Cynede
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox