<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>INSTALL.txt</filename>
    </added>
    <added>
      <filename>plugins/redcar/tasks/docs.rake</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,6 +1,8 @@
-Redcar
-    by Daniel Lucraft
-    http://RedcarEditor.com/
+= Redcar
+
+by Daniel Lucraft
+
+http://RedcarEditor.com/
 
 == DESCRIPTION:
   
@@ -13,52 +15,11 @@ snippets, macros and is highly extensible.
 * Extensive snippets.
 * Ruby plugins.
 
-== INSTALL:
-
-For now, installation is still pretty long-winded. It's a bit easier if you live within Ubuntu's packages.
-
-=== Installing on Ubuntu 8.04 - 9.04
-
-1. First you will need to install Ruby-GNOME2, the build tools and some other necessary libraries. On Ubuntu/Debian you may simply do:
-
-  $ sudo apt-get install ruby ruby1.8-dev rubygems1.8 libhttp-access2-ruby1.8 rubygems1.8 ruby-gnome2 build-essential libonig2 libonig-dev libgtk2.0-dev libglib2.0-dev libgee0 libgee-dev libgtksourceview2.0-dev libxul-dev xvfb libdbus-ruby
-
-If you are not using Debian/Ubuntu, or have installed Ruby yourself from source, then you should make sure that you have these libraries installed:
-  1. Ruby, Rubygems, Glib, Gtk, GtkSourceView 2 with development headers
-  2. Ruby-GNOME2 http://ruby-gnome2.sourceforge.jp/
-  3. Oniguruma (any version will probably work, tested with 5.9.0) http://www.geocities.jp/kosako3/oniguruma/
-  4. Libgee http://live.gnome.org/Libgee
-  5. Ruby DBus git://github.com/sdague/ruby-dbus.git
-  6. GtkSourceView 2.0
-
-2. Install the required Ruby gems:
-
-  $ sudo gem install oniguruma activesupport rspec cucumber hoe open4 zerenity
+== INSTALLATION
 
-3. Download Redcar:
+See INSTALL.txt
 
-  $ wget http://redcareditor.com/releases/redcar-latest.tar.gz
-
-4. Unzip the source:
-
-  $ tar xzvf redcar-latest.tar.gz
-
-5. Build Redcar
-
-  $ cd redcar/
-  $ rake build
-
-6. Now try running Redcar
-  $ cd REDCAR_PATH
-  $ ./bin/redcar
- 
-The first time Redcar runs it will spend time loading the Textmate Bundles. 
-This only happens once.
-
-NB. Ubuntu 9.10 users should start Redcar with the --multiple-instance flag, as
-there appears to be a bug in the Jaunty ruby dbus package.
-
-== Running Features
+== FEATURES
 
 rake features
 rake features:[plugin_name]</diff>
      <filename>README.txt</filename>
    </modified>
    <modified>
      <diff>@@ -44,6 +44,12 @@ def execute(command)
   $?.to_i == 0 ? true : false
 end
 
+def plugin_names
+  Dir[&quot;plugins/*&quot;].map do |fn|
+    name = fn.split(&quot;/&quot;).last
+  end
+end
+
 Dir[File.join(File.dirname(__FILE__), *%w[plugins *])].each do |plugin_dir|
   rakefiles = [File.join(plugin_dir, &quot;Rakefile&quot;)] + 
     Dir[File.join(plugin_dir, &quot;tasks&quot;, &quot;*.rake&quot;)]
@@ -54,13 +60,6 @@ Dir[File.join(File.dirname(__FILE__), *%w[plugins *])].each do |plugin_dir|
   end
 end
 
-desc &quot;Build core documentation (requires mislav-hanna gem)&quot;
-task :coredoc do
-  FileUtils.rm_rf &quot;doc&quot;
-  files = Dir[&quot;plugins/core/lib/core/*&quot;].select{|f| File.file? f}
-  sh &quot;rdoc -o doc --inline-source --format=html -T hanna #{files.join(&quot; &quot;)} README.txt&quot;
-end
-
 task :clear_cache do
   sh &quot;rm cache/*/*.dump&quot;
 end</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -18,7 +18,6 @@ load 'core/gui.rb'
 load 'core/speedbar.rb'
 load 'core/shell_command.rb'
 load 'core/pane.rb'
-load 'core/standard_menus.rb'
 load 'core/template.rb'
 load 'core/command_history.rb'
 load 'core/dialog.rb'</diff>
      <filename>plugins/core/lib/core.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,6 @@
 
-# This is the Redcar API documentation for plugin authors and developers.
+# This is the Redcar API documentation for Redcar developers and plugin 
+# authors.
 # For documentation regarding the day to day use of Redcar as an editor
 # please refer to http://www.redcaride.com/doc/user_guide/index.html.
 module Redcar
@@ -8,10 +9,14 @@ module Redcar
   module App
     include FreeBASE::DataBusHelper
 
-    def self.[]=(name, val)
-      bus(&quot;/redcar/appdata/#{name}&quot;).data = val
+    # Set key-value pair to be stored in the databus. This
+    # is persistent across application instances.
+    def self.[]=(key, val)
+      bus(&quot;/redcar/appdata/#{key}&quot;).data = val
     end
     
+    # Retrieve a value associated with this key. This
+    # may have been set in a previous instance of the application.
     def self.[](name)
       if slot = bus(&quot;/redcar/appdata/#{name}&quot;, true)
         slot.data</diff>
      <filename>plugins/core/lib/core/app.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,6 @@
 
 module Redcar
+  # A simple DBus listener thread that watches for method calls across DBus.
   class DBus
     def self.start_listener
       Thread.new do</diff>
      <filename>plugins/core/lib/core/dbus.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,8 @@
 
 module Redcar
+  # This class is responsible for interpreting key press events
+  # and dispatching the appropriate Redcar::Commands. It should 
+  # be split up into Keymap and Dispatcher classes.
   class Keymap
     include FreeBASE::DataBusHelper
 
@@ -17,12 +20,15 @@ module Redcar
       end
     end
 
+    # Normalizes a Redcar style keymap string like &quot;Ctrl+G&quot;.
     def self.normalize(redcar_key)
       bits = redcar_key.split(&quot;+&quot;)
       bits = bits[0..-2].sort &lt;&lt; bits.last
       bits.join(&quot;+&quot;)
     end
 
+    # Given a Gdk::EventKey returns a Redcar style keymap
+    # like &quot;Ctrl+G&quot;
     def self.clean_gdk_eventkey(gdk_eventkey)
       kv = gdk_eventkey.keyval
       ks = gdk_eventkey.state - Gdk::Window::MOD2_MASK
@@ -46,8 +52,9 @@ module Redcar
       end
     end
 
-    # Process a Gdk::EventKey (which is created on a keypress)
-    def self.process(gdk_eventkey) #:nodoc:
+    # Process a Gdk::EventKey (which is created on a keypress). This is the
+    # entry point for Command dispatch from Window.
+    def self.process(gdk_eventkey)
       if key = clean_gdk_eventkey(gdk_eventkey)
         execute_key(key, gdk_eventkey)
       else
@@ -73,9 +80,6 @@ module Redcar
 
     # Use to execute a key. key_name should be a string like &quot;Ctrl+G&quot;.
     def self.execute_key(key_name, gdk_eventkey)
-#       if key_name == &quot;Return&quot; # FIXME!
-#         return false
-#       end
       if coms = bus(&quot;/redcar/keymaps/#{normalize(key_name)}&quot;).data
         App.log.debug &quot;[Keymap] #{coms.length} candidate commands&quot;
         coms = coms.select do |com| </diff>
      <filename>plugins/core/lib/core/keymap.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,8 @@
 
 module Redcar
+  # A Redcar Window contains a menu bar, a collection of Panes and a status bar.
+  # At the moment, there may only be one Window open in an instance of the Redcar
+  # application. This should change, hopefully soon.
   class Window &lt; Gtk::Window
     include FreeBASE::DataBusHelper
 
@@ -51,14 +54,6 @@ module Redcar
       end
     end
 
-    def pane_for_tab_class(tab_class)
-      panes.reverse.sort_by do |pane|
-        num_same_class = pane.tabs.select {|t| t.is_a? tab_class}.length
-        num = pane.tabs.length
-        num_same_class*100 - (num - num_same_class)
-      end.last
-    end
-
     # Equivalent to calling Pane#new_tab on the currently
     # focussed Pane.
     def new_tab(tab_class, *args)
@@ -70,6 +65,7 @@ module Redcar
       panes.map {|pane| pane.tabs }.flatten
     end
 
+    # Returns an array of all open tabs that are instances of klass.
     def collect_tabs(klass)
       tabs.select {|t| t.is_a? klass}
     end
@@ -184,6 +180,14 @@ module Redcar
       end
     end
     
+    def pane_for_tab_class(tab_class)
+      panes.reverse.sort_by do |pane|
+        num_same_class = pane.tabs.select {|t| t.is_a? tab_class}.length
+        num = pane.tabs.length
+        num_same_class*100 - (num - num_same_class)
+      end.last
+    end
+    
     def collect_tabs_from_dual(dual)
       [dual.child1, dual.child2].map do |child|
         if child.class == Gtk::Notebook</diff>
      <filename>plugins/core/lib/core/window.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>f8424666bfe97c87c331eceb772f44be3f32c194</id>
    </parent>
  </parents>
  <author>
    <name>Daniel Lucraft</name>
    <email>dan@fluentradical.com</email>
  </author>
  <url>http://github.com/danlucraft/redcar/commit/111304762d6fd0d4f960a5bda024beec490b2c94</url>
  <id>111304762d6fd0d4f960a5bda024beec490b2c94</id>
  <committed-date>2009-04-04T13:51:35-07:00</committed-date>
  <authored-date>2009-04-04T13:51:35-07:00</authored-date>
  <message>Bits of documentation here and there + rake doc tasks</message>
  <tree>7685019593a23b529017970cef1e8dda235a4a50</tree>
  <committer>
    <name>Daniel Lucraft</name>
    <email>dan@fluentradical.com</email>
  </committer>
</commit>
