From 782d640d0821ce5608632503347e60520a8d0f4b Mon Sep 17 00:00:00 2001 From: martin_r Date: Fri, 2 Apr 2010 13:10:09 +0000 Subject: gconf2 in fehlermeldung verpackt und programm ohne parameter aufrufbar gemacht git-svn-id: https://svn.neo-layout.org@2275 b9310e46-f624-0410-8ea1-cfbb3a30dc96 --- linux/traycommand/traycommand | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/linux/traycommand/traycommand b/linux/traycommand/traycommand index 6a4e9fe..7bd862a 100755 --- a/linux/traycommand/traycommand +++ b/linux/traycommand/traycommand @@ -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 -- cgit v1.2.3