public
Fork of Caged/gitnub
Description: A Gitk-like application written in RubyCocoa that looks like it belongs on a Mac. See the wiki for downloads and screenshots.
Homepage: http://alternateidea.com
Clone URL: git://github.com/dustin/gitnub.git
Search Repo:
Don't change image into standard gravatar
georgboe (author)
Mon Apr 14 11:30:26 -0700 2008
commit  e66ae1df7649d8c340daa0dfea91b193115694ed
tree    dbabb4fe4aa1422bcb918b97dec0e11f2d7fa22d
parent  7942044256859e81e12ad8ebfd0ea310916ff5a9
...
29
30
31
 
32
33
34
...
122
123
124
 
125
126
127
...
131
132
133
 
 
 
 
134
135
136
...
29
30
31
32
33
34
35
...
123
124
125
126
127
128
129
...
133
134
135
136
137
138
139
140
141
142
0
@@ -29,6 +29,7 @@
0
     @branch = :master
0
     @icon_queue = NSOperationQueue.alloc.init
0
     @icon_url_map = {}
0
+ @standardimage = NSImage.alloc.initWithContentsOfURL(NSURL.URLWithString('http://www.gravatar.com/avatar.php?gravatar_id=60c7cd44e236c918cb682e2asdfs7f4f&size=36')).TIFFRepresentation
0
     @icons = Hash.new do |hash, email|
0
       url = gravatar_url(email)
0
       @icon_url_map[url] = email
0
@@ -122,6 +123,7 @@
0
   end
0
   
0
   def imageLoadForURL_didFinishLoading(url, image)
0
+ return if checkImage(image)
0
     email = @icon_url_map[url]
0
     @icons[email] = image
0
     @commits_table.rowsInRect(@commits_table.enclosingScrollView.documentVisibleRect).to_range.each do |i|
0
@@ -131,6 +133,10 @@
0
     end
0
   end
0
   
0
+ def checkImage(image)
0
+ image.TIFFRepresentation.isEqualToData(@standardimage)
0
+ end
0
+
0
   def imageLoadForURL_didFailWithError(url, error)
0
     STDERR.puts "Async image load failed for URL: #{url}\n#{error}"
0
   end

Comments

    No one has commented yet.