<commit_before>#
#  ApplicationController.rb
#  GitNub
#
#  Created by <NAME> on 3/1/08.
#  Copyright (c) 2008 Active Reload, LLC. All rights reserved.
#
$VERBOSE = nil
require 'rubygems'
require 'osx/cocoa'
require 'mime-types/lib/mime/types'
require 'grit/lib/grit'
require 'InfoWindowController'

OSX.ns_import 'ImageTextCell'
include OSX

REPOSITORY_LOCATION = ENV['PWD'].nil? ? '' : ENV['PWD']

class ApplicationController < OSX::NSObject 
  ib_outlet :commits_table
  ib_outlet :commits_controller 
  ib_outlet :window
  ib_outlet :main_canvas
  ib_outlet :main_view
  ib_outlet :info_button
  
  def applicationDidFinishLaunching(sender)
    @window.makeKeyAndOrderFront(self)
  end
  
  def applicationShouldTerminateAfterLastWindowClosed(notification)
    return true
  end
  
  def awakeFromNib    
    begin
      @repo = Grit::Repo.new(REPOSITORY_LOCATION)
    rescue Grit::InvalidGitRepositoryError
      return false
    end
    
    @window.delegate = self
    column = @commits_table.tableColumns[0]
    cell = ImageTextCell.alloc.init
    column.dataCell = cell
    cell.dataDelegate = @commits_controller
    
    @main_view.setFrameSize(@main_canvas.frame.size)
    @main_canvas.addSubview(@main_view)
  end
  
  ib_action :show_info_panel
  def show_info_panel(sender)
    if @info_controller.nil? 
      @info_controller = InfoWindowController.alloc.init_with_repository(@repo)
    end
    @info_controller.showWindow(self)
  end
end<commit_msg>Removed need for Core Animation by using proper background style on labels in textured area<commit_after>#
#  ApplicationController.rb
#  GitNub
#
#  Created by <NAME> on 3/1/08.
#  Copyright (c) 2008 Active Reload, LLC. All rights reserved.
#
$VERBOSE = nil
require 'rubygems'
require 'osx/cocoa'
require 'mime-types/lib/mime/types'
require 'grit/lib/grit'
require 'InfoWindowController'

OSX.ns_import 'ImageTextCell'
include OSX

REPOSITORY_LOCATION = ENV['PWD'].nil? ? '' : ENV['PWD']

class ApplicationController < OSX::NSObject 
  ib_outlet :commits_table
  ib_outlet :commits_controller 
  ib_outlet :window
  ib_outlet :main_canvas
  ib_outlet :main_view
  ib_outlet :info_button
  ib_outlet :branch_field
  
  def applicationDidFinishLaunching(sender)
    @window.makeKeyAndOrderFront(self)
  end
  
  def applicationShouldTerminateAfterLastWindowClosed(notification)
    return true
  end
  
  def awakeFromNib    
    begin
      @repo = Grit::Repo.new(REPOSITORY_LOCATION)
    rescue Grit::InvalidGitRepositoryError
      return false
    end
    
    @window.delegate = self
    column = @commits_table.tableColumns[0]
    cell = ImageTextCell.alloc.init
    column.dataCell = cell
    cell.dataDelegate = @commits_controller
    
    @main_view.setFrameSize(@main_canvas.frame.size)
    @main_canvas.addSubview(@main_view)
    
    @branch_field.cell.setBackgroundStyle(NSBackgroundStyleRaised)
  end
  
  ib_action :show_info_panel
  def show_info_panel(sender)
    if @info_controller.nil? 
      @info_controller = InfoWindowController.alloc.init_with_repository(@repo)
    end
    @info_controller.showWindow(self)
  end
end
{'fraction_non_alphanumeric': 0.08494208494208494, 'fraction_numerical': 0.005791505791505791, 'mean_word_length': 4.121911037891269, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2097541', 'n_tokens_mistral': 1080, 'n_tokens_neox': 1051, 'n_words': 206}