fantasdic r408 - in trunk: . lib lib/fantasdic lib/fantasdic/ui
- From: mblondel svn gnome org
- To: svn-commits-list gnome org
- Subject: fantasdic r408 - in trunk: . lib lib/fantasdic lib/fantasdic/ui
- Date: Wed, 1 Apr 2009 11:49:04 +0000 (UTC)
Author: mblondel
Date: Wed Apr 1 11:49:04 2009
New Revision: 408
URL: http://svn.gnome.org/viewvc/fantasdic?rev=408&view=rev
Log:
* lib/fantasdic/ui.rb:
* lib/fantasdic/gettext.rb:
* lib/fantasdic/ui/browser.rb:
* lib/fantasdic.rb: When an optional dependency is missing, be more
explicit regarding the benefits of installing the dependency.
Suggested by Robert Siemer.
Modified:
trunk/ChangeLog
trunk/lib/fantasdic.rb
trunk/lib/fantasdic/gettext.rb
trunk/lib/fantasdic/ui.rb
trunk/lib/fantasdic/ui/browser.rb
Modified: trunk/lib/fantasdic.rb
==============================================================================
--- trunk/lib/fantasdic.rb (original)
+++ trunk/lib/fantasdic.rb Wed Apr 1 11:49:04 2009
@@ -78,16 +78,22 @@
HAVE_CONSOLE = true
end
- def self.missing_dependency(txt)
+ def self.missing_dependency(lib, msg=nil)
@missing_deps ||= []
- @missing_deps << txt
+ @missing_deps << [lib, msg]
end
def self.display_missing_dependencies
if @missing_deps
$stderr.puts "-" * 60
$stderr.puts "The following optional dependencies were not found."
- @missing_deps.map(&$stderr.method(:puts))
+ @missing_deps.each do |lib, msg|
+ if msg
+ $stderr.puts("%s (%s)" % [lib, msg])
+ else
+ $stderr.puts(lib)
+ end
+ end
$stderr.puts "-" * 60
end
end
Modified: trunk/lib/fantasdic/gettext.rb
==============================================================================
--- trunk/lib/fantasdic/gettext.rb (original)
+++ trunk/lib/fantasdic/gettext.rb Wed Apr 1 11:49:04 2009
@@ -18,7 +18,8 @@
begin
require 'gettext'
rescue LoadError
- Fantasdic.missing_dependency('Ruby/Gettext')
+ Fantasdic.missing_dependency('Ruby/Gettext',
+ 'Internationalization support')
module GetText
module_function
Modified: trunk/lib/fantasdic/ui.rb
==============================================================================
--- trunk/lib/fantasdic/ui.rb (original)
+++ trunk/lib/fantasdic/ui.rb Wed Apr 1 11:49:04 2009
@@ -20,7 +20,7 @@
require 'gnome2'
rescue LoadError
require 'gtk2'
- Fantasdic.missing_dependency('Ruby/GNOME2')
+ Fantasdic.missing_dependency('Ruby/GNOME2', 'Better integration in GNOME')
end
module Fantasdic
Modified: trunk/lib/fantasdic/ui/browser.rb
==============================================================================
--- trunk/lib/fantasdic/ui/browser.rb (original)
+++ trunk/lib/fantasdic/ui/browser.rb Wed Apr 1 11:49:04 2009
@@ -21,7 +21,8 @@
begin
require "gconf2"
rescue LoadError
- Fantasdic.missing_dependency('Ruby/Gconf2')
+ Fantasdic.missing_dependency('Ruby/Gconf2',
+ 'GNOME preferences access')
end
end
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]