gconf2 in fehlermeldung verpackt und programm ohne parameter aufrufbar gemacht

git-svn-id: https://svn.neo-layout.org@2275 b9310e46-f624-0410-8ea1-cfbb3a30dc96
This commit is contained in:
martin_r 2010-04-02 13:10:09 +00:00
parent 99b07611b8
commit 782d640d08

View file

@ -9,11 +9,19 @@ rescue LoadError
raise
end
begin
require 'gconf2'
rescue LoadError
$stderr << "########################################################\n"
$stderr << "# In order to run this programm you need ruby-gconf2! #\n"
$stderr << "########################################################\n"
raise
end
require 'yaml'
require 'pp'
require 'optparse'
require 'ostruct'
require 'gconf2'
TRAYCOMMANDVERSION = [0,1]
@ -39,6 +47,7 @@ optpars = OptionParser.new { |opts|
begin
optpars.parse!
$options.configfile ||= "layoutswitch.yaml"
rescue => e
puts e
puts optpars