[Xfce4-commits] <archive:master> Fix icon names.

Nick Schermer noreply at xfce.org
Sat Nov 12 16:44:01 CET 2011


Updating branch refs/heads/master
         to 1e3fbfafe237b71068f66b5ffe24a1fcd5d4f00d (commit)
       from 0adc42eedeb1f709a098ce11f33359a4327fedc9 (commit)

commit 1e3fbfafe237b71068f66b5ffe24a1fcd5d4f00d
Author: Nick Schermer <nick at xfce.org>
Date:   Sat Nov 12 16:43:45 2011 +0100

    Fix icon names.

 fancyindex/models/archive.rb |   10 +++++-----
 fancyindex/views/index.haml  |    4 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/fancyindex/models/archive.rb b/fancyindex/models/archive.rb
index 6b87d13..5ff85db 100644
--- a/fancyindex/models/archive.rb
+++ b/fancyindex/models/archive.rb
@@ -41,15 +41,15 @@ module Fancyindex
           File.join(self.archive.href, self.name)
         end
 
-        def icon
+        def iconname
           if self.is_dir
-            "folder.png"
+            "folder"
           elsif self.name =~ /\.(bz2|gz|rpm|pkg|run)$/
-            "archive.png"
+            "archive"
           elsif self.name =~ /\.(md5|sha1)/
-            "cert.png"
+            "cert"
           else
-            "default.png"
+            "default"
           end
         end
 
diff --git a/fancyindex/views/index.haml b/fancyindex/views/index.haml
index bade56c..b7dc6e1 100644
--- a/fancyindex/views/index.haml
+++ b/fancyindex/views/index.haml
@@ -46,7 +46,7 @@
         - if @archive.parent
           %tr
             %td
-              %img{:src => 'http://archive2.xfce.org/public/up.png', :alt => 'up.png'}
+              %img{:src => '/up.png', :alt => 'up.png'}
             %td
               %a{:href => @archive.parent } Parent Directory
             %td
@@ -55,7 +55,7 @@
         - for item in @archive.list_items
           %tr
             %td
-              %img{:src => "http://archive2.xfce.org/public/#{item.icon}", :alt => item.icon}
+              %img{:src => "/#{item.iconname}.png", :alt => item.iconname}
             %td{:nowrap => 'nowarp'}
               %a{:href => item.href } #{item.name}
             %td #{item.mtime}


More information about the Xfce4-commits mailing list