[gnome-icon-theme/one-canvas] when called with an icon name, always render.



commit 09ed79d51377790434d4737184937d91715b7635
Author: Jakub Steiner <jimmac gmail com>
Date:   Tue Apr 21 14:33:07 2009 +0200

    when called with an icon name, always render.
---
 16x16/devices/camera-photo.png |  Bin 577 -> 898 bytes
 22x22/devices/camera-photo.png |  Bin 963 -> 1395 bytes
 24x24/devices/camera-photo.png |  Bin 982 -> 1475 bytes
 32x32/devices/camera-photo.png |  Bin 1647 -> 2034 bytes
 render-bitmaps.rb              |    8 ++++----
 5 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/16x16/devices/camera-photo.png b/16x16/devices/camera-photo.png
index 997c2f9..13eaf2e 100644
Binary files a/16x16/devices/camera-photo.png and b/16x16/devices/camera-photo.png differ
diff --git a/22x22/devices/camera-photo.png b/22x22/devices/camera-photo.png
index aa60e28..0a8d55b 100644
Binary files a/22x22/devices/camera-photo.png and b/22x22/devices/camera-photo.png differ
diff --git a/24x24/devices/camera-photo.png b/24x24/devices/camera-photo.png
index 8fd7ec5..ba3a31e 100644
Binary files a/24x24/devices/camera-photo.png and b/24x24/devices/camera-photo.png differ
diff --git a/32x32/devices/camera-photo.png b/32x32/devices/camera-photo.png
index 5af8262..6205136 100644
Binary files a/32x32/devices/camera-photo.png and b/32x32/devices/camera-photo.png differ
diff --git a/render-bitmaps.rb b/render-bitmaps.rb
index 543d7bb..afa7e75 100755
--- a/render-bitmaps.rb
+++ b/render-bitmaps.rb
@@ -6,7 +6,7 @@ include REXML
 INKSCAPE = '/usr/bin/inkscape'
 SRC = "./src"
 
-def renderit(file)
+def renderit(file,explicit)
   svg = Document.new(File.new("#{SRC}/#{file}", 'r'))
   #puts "DEBUG: #{file}"
   svg.root.each_element("//g[contains(@inkscape:label,'baseplate')]") do |icon|
@@ -19,7 +19,7 @@ def renderit(file)
         out = "#{dir}/#{icon_name.gsub(/$/,'.png')}"
         cmd = "#{INKSCAPE} -i #{box.attributes['id']} -e #{out} #{SRC}/#{file} > /dev/null 2>&1"
         File.makedirs(dir) unless File.exists?(dir)
-        if File.exists?(out)
+        if (!explicit && File.exists?(out))
           print "-" #skip if PNG exists
         else
           system(cmd)
@@ -34,13 +34,13 @@ end
 if (ARGV[0].nil?) #render all SVGs
   puts "Rendering from SVGs in #{SRC}"
   Dir.foreach(SRC) do |file|
-    renderit(file) if file.match(/svg$/)
+    renderit(file, false) if file.match(/svg$/)
   end
   puts "\nrendered all SVGs"
 else #only render the SVG passed
   file = "#{ARGV[0]}.svg"
   if (File.exists?("#{SRC}/#{file}"))
-    renderit(file)
+    renderit(file,true)
     puts "\nrendered #{file}"
   else
     puts "[E] No such file (#{file})"



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]