public this repo is viewable by everyone
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/Caged/gitnub.git
Merge branch 'georgboe/master' into uitabbify
Caged (author)
25 days ago
commit  31d87daed47be3336a133aea4a52b0fd3ed2bfc4
tree    e26c7badd893553ae60b6f91243a251e0804a8cf
parent  87c0a61921d76f4e5076798b398bc69bf9e0d990 parent  8371aa6417af86ce08b556b585aa2ef4630d2af8
...
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
36
...
124
125
126
127
128
129
130
131
132
133
134
135
136
...
140
141
142
143
144
145
146
147
148
149
0
@@ -29,6 +29,8 @@ class CommitsController < OSX::NSObject
0
     @branch = :master
0
     @icon_queue = NSOperationQueue.alloc.init
0
     @icon_url_map = {}
0
+  @standard_url = gravatar_url('standardimage')
0
+  @icon_queue.addOperation(ImageLoadOperation.alloc.initWithURL_delegate(@standard_url, self))
0
     @icons = Hash.new do |hash, email|
0
       url = gravatar_url(email)
0
       @icon_url_map[url] = email
0
@@ -122,6 +124,13 @@ class CommitsController < OSX::NSObject
0
   end
0
   
0
   def imageLoadForURL_didFinishLoading(url, image)
0
+
0
+  if url.absoluteString.isEqualToString(@standard_url.absoluteString)
0
+    @standardimage = image
0
+    return
0
+  end
0
+  
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 +140,10 @@ class CommitsController < OSX::NSObject
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.