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
Click here to lend your support to: gitnub and make a donation at www.pledgie.com !
Merge branch 'cached-icons' of git://github.com/benstiglitz/gitnub into 
benstiglitz/cached-icons
Caged (author)
2 months ago
commit  41487b0d312fba88728433a2c4ebd44457c05e74
tree    5b204dc06d7aec434e6c87c0d41a8393507334bb
parent  f8aee2be664552af5ba1a2ec8f4a73d7166efc5e parent  210a3f374d94d5bc36e15cbe227f3132dbdbabb1
...
21
22
23
24
 
 
 
 
25
26
27
...
101
102
103
104
105
106
107
108
109
 
110
111
112
...
21
22
23
 
24
25
26
27
28
29
30
...
104
105
106
 
 
 
 
 
 
107
108
109
110
0
@@ -21,7 +21,10 @@ class CommitsController < OSX::NSObject
0
     @current_commit_offset = 0
0
     @offset = 50
0
     @active_commit = nil
0
- @icons = {}
0
+ @icons = Hash.new do |hash, email|
0
+ gravatar = NSURL.URLWithString("http://www.gravatar.com/avatar.php?gravatar_id=#{MD5.hexdigest(email)}&size=36")
0
+ hash[email] = NSImage.alloc.initWithContentsOfURL(gravatar)
0
+ end
0
     
0
     if(fetch_git_repository)
0
       setup_commit_detail_view
0
@@ -101,12 +104,7 @@ class CommitsController < OSX::NSObject
0
   end
0
   
0
   def iconForCell_data(icon, data)
0
- #request = NSURLRequest.requestWithURL(NSURL.URLWithString("http://www.gravatar.com/avatar.php?gravatar_id=#{MD5.hexdigest(data.committer.email)}&size=36"))
0
- #connection = NSURLConnection.alloc.initWithRequest_delegate(request, self)
0
- @image_data = NSMutableData.data
0
- gravatar = NSURL.URLWithString("http://www.gravatar.com/avatar.php?gravatar_id=#{MD5.hexdigest(data.committer.email)}&size=36")
0
- NSImage.alloc.initWithContentsOfURL(gravatar)
0
- #@icons[MD5.hexdigest(data.committer.email)] = NSImage.alloc.initWithData(@image_data)
0
+ @icons[data.committer.email]
0
   end
0
   
0
   def dataElementForCell(cell)

Comments

    No one has commented yet.