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 an early screenshot
Homepage: http://alternateidea.com
Clone URL: git://github.com/evilchelu/gitnub.git
Search Repo:
commit  53b383ee6d164ddfb958afed42b73914abf43b14
tree    c4486be7ca1e7573eb1dbe41296edb4cf47529cf
parent  f74a0f3667f2499129d4aff3b43ae9cddbc9de43
gitnub / ApplicationController.rb
100644 35 lines (28 sloc) 0.746 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#
# ApplicationController.rb
# GitNub
#
# Created by Justin Palmer on 3/1/08.
# Copyright (c) 2008 Active Reload, LLC. All rights reserved.
#
 
require 'rubygems'
require 'osx/cocoa'
require 'grit'
 
include OSX
OSX.ns_import 'ImageTextCell'
 
class ApplicationController < OSX::NSObject
  ib_outlet :commits_table, :commits_controller, :window
  
  def applicationDidFinishLaunching(sender)
    @window.makeKeyAndOrderFront(self)
  end
  
  def applicationShouldTerminateAfterLastWindowClosed(notification)
    return true
  end
  
  def awakeFromNib
    @window.delegate = self
    column = @commits_table.tableColumns[0]
    cell = ImageTextCell.alloc.init
    column.dataCell = cell
    cell.dataDelegate = @commits_controller
  end
end