when opening an album, display amount of images, videos and sub-albums in statusbar
authorgc <gc>
Sun, 12 Jun 2005 17:09:52 +0000 (17:09 +0000)
committergc <gc>
Sun, 12 Jun 2005 17:09:52 +0000 (17:09 +0000)
bin/booh

index 4e11c28d641529fb77e8b84af615ad9a0682dff2..ac1af7362a44c04af3ab3ce28dc7bb765ddb3088 100755 (executable)
--- a/bin/booh
+++ b/bin/booh
@@ -1585,18 +1585,22 @@ def change_dir
             add_subalbum.call($xmldir, 0)
         end
     end
+    total = { 'image' => 0, 'video' => 0, 'dir' => 0 }
     $xmldir.elements.each { |element|
         if (element.name == 'image' || element.name == 'video') && !element.attributes['deleted']
             #- element (image or video) of this album
             dest_img = build_full_dest_filename(element.attributes['filename']).sub(/\.[^\.]+$/, '') + "-#{$default_size['thumbnails']}.jpg"
             msg 3, "dest_img: #{dest_img}"
             add_thumbnail($autotable, element.attributes['filename'], element.name, dest_img, from_utf8(element.attributes['caption']))
+            total[element.name] += 1
         end
         if element.name == 'dir' && !element.attributes['deleted']
             #- sub-album image/caption
             add_subalbum.call(element, subalbums_counter += 1)
+            total[element.name] += 1
         end
     }
+    $statusbar.push(0, utf8(_("%s: %s images and %s videos, %s sub-albums") % [ File.basename($xmldir.attributes['path']), total['image'], total['video'], total['dir'] ]))
     $subalbums_vb.add($subalbums)
     $subalbums_vb.show_all