Skip to content

Commit

Permalink
set APP_ROOT in bin/vimmate so that .glade files are found - must mov…
Browse files Browse the repository at this point in the history
…e somewhere else
  • Loading branch information
niklas committed Jun 1, 2009
1 parent 2ee1849 commit 56c4b52
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions bin/vimmate
Expand Up @@ -38,7 +38,10 @@ end


# We fork to give back the shell to the user, like Vim # We fork to give back the shell to the user, like Vim
fork do fork do
require File.join( File.dirname(__FILE__), '../config/environment' ) # TODO set this in activewindow.. but how?
APP_ROOT = File.expand_path( File.join( File.dirname(__FILE__), '..' ) )
PROGRAM_NAME = 'vim_mate'
require File.join( APP_ROOT, 'config/environment' )
Thread.abort_on_exception = true Thread.abort_on_exception = true


class VimMateApp < ActiveWindow::Application class VimMateApp < ActiveWindow::Application
Expand Down Expand Up @@ -81,7 +84,6 @@ fork do
end end
end end


PROGRAM_NAME = 'vim_mate'
app = VimMateApp.new(:title => 'VimMate', :main_window => 'VimMate', :excludes => excludes) app = VimMateApp.new(:title => 'VimMate', :main_window => 'VimMate', :excludes => excludes)
app.start app.start


Expand Down
2 changes: 1 addition & 1 deletion lib/active_window/application.rb
Expand Up @@ -115,7 +115,7 @@ def find_glade
end end


def views_directory def views_directory
File.expand_path File.join(File.dirname($0), '..', 'views') File.join(APP_ROOT, 'views')
end end


def define_widget_readers def define_widget_readers
Expand Down

0 comments on commit 56c4b52

Please sign in to comment.