[Xfce4-commits] <eatmonkey:aria2-xml-rpc> Load eatmonkey-logo.png safely

Mike Massonnet noreply at xfce.org
Sun Jan 24 23:26:03 CET 2010


Updating branch refs/heads/aria2-xml-rpc
         to ef188cd8d4f40410fa0de46abff5207af45d45b2 (commit)
       from 6170a27942201da1d9775e1e6c5d6f944f181b13 (commit)

commit ef188cd8d4f40410fa0de46abff5207af45d45b2
Author: Mike Massonnet <mmassonnet at xfce.org>
Date:   Sun Jan 24 18:05:47 2010 +0100

    Load eatmonkey-logo.png safely
    
    Try two different prefixes to load eatmonkey-logo.png otherwise just use
    nil value, instead of returning a backtrace.

 src/eatmanager.rb |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/src/eatmanager.rb b/src/eatmanager.rb
index 333e257..94469f3 100644
--- a/src/eatmanager.rb
+++ b/src/eatmanager.rb
@@ -156,7 +156,15 @@ class Eat::Manager
 	end
 
 	def show_about_dialog()
-		logo = Gdk::Pixbuf.new("/usr/share/pixmaps/eatmonkey-logo.png")
+		logo = nil
+		begin
+			logo = Gdk::Pixbuf.new("/usr/share/pixmaps/eatmonkey-logo.png")
+		rescue
+		begin
+			logo = Gdk::Pixbuf.new("/usr/local/share/pixmaps/eatmonkey-logo.png")
+		rescue
+		end
+		end
 		AboutDialog.show(@window,
 				"program-name" => "Eatmonkey",
 				"version" => "0.1.0",



More information about the Xfce4-commits mailing list