have default size available everywhere
authorgc <gc>
Sat, 16 Apr 2005 22:18:14 +0000 (22:18 +0000)
committergc <gc>
Sat, 16 Apr 2005 22:18:14 +0000 (22:18 +0000)
bin/booh-gui
lib/booh/booh-lib.rb

index fa31c74306d9ba7b4ac1e2ef80b2a5586987871d..7cd8a5000b9baa139725c79cb5ff995921174768 100755 (executable)
@@ -1071,7 +1071,6 @@ def open_file(filename)
 
     $filename = filename
     select_theme(theme)
-    $default_size = $images_size.detect { |sizeobj| sizeobj['default'] }
     $default_size['thumbnails'] =~ /(.*)x(.*)/
     $default_thumbnails = { :x => $1.to_i, :y => $2.to_i }
     $albums_thumbnail_size =~ /(.*)x(.*)/
index 4c9ca7b3f617d31bb65ebc304bc8b382823ccc42..c6893b87599b8a42876dd319d4aedb3f74930d7e 100644 (file)
@@ -86,6 +86,7 @@ module Booh
             die _("Theme was not found (tried %s directory).") % themedir
         end
         require "#{themedir}/parameters.rb"
+        $default_size = $images_size.detect { |sizeobj| sizeobj['default'] }
     end
 
     def entry2type(entry)
@@ -274,7 +275,9 @@ module Booh
                     end
 
                 end
-                sys("#{$convert} #{convert_options}-size #{dest['size']} -resize #{dest['size']} #{dest_dir}/screenshot.jpg000000.jpg '#{dest['filename']}'")
+                if !File.exists?(dest['filename'])
+                    sys("#{$convert} #{convert_options}-size #{dest['size']} -resize #{dest['size']} #{dest_dir}/screenshot.jpg000000.jpg '#{dest['filename']}'")
+                end
             end
             return true
         end