projects
/
booh
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6d2d7d8
)
protect against disappeared videos
author
gc
<gc>
Thu, 5 May 2005 21:35:17 +0000
(21:35 +0000)
committer
gc
<gc>
Thu, 5 May 2005 21:35:17 +0000
(21:35 +0000)
bin/booh-gui
patch
|
blob
|
history
lib/booh/booh-lib.rb
patch
|
blob
|
history
diff --git
a/bin/booh-gui
b/bin/booh-gui
index 823d8faf8d01aba8ddd012be4c34266ce015f19c..81b531a5c62fbb2f2b0bd20753e2358c5b7f82d6 100755
(executable)
--- a/
bin/booh-gui
+++ b/
bin/booh-gui
@@
-448,7
+448,7
@@
def add_thumbnail(autotable, filename, type, thumbnail_img, caption)
tooltips = Gtk::Tooltips.new
tipname = File.basename(thumbnail_img).gsub(/-\d+x\d+\.jpg/, '')
tooltips = Gtk::Tooltips.new
tipname = File.basename(thumbnail_img).gsub(/-\d+x\d+\.jpg/, '')
- tooltips.set_tip(evtbox, utf8(type == 'video' ? (_("%s (video - %s KB)") % [tipname, commify(
File.
size(from_utf8("#{$current_path}/#{filename}"))/1024)]) : tipname), nil)
+ tooltips.set_tip(evtbox, utf8(type == 'video' ? (_("%s (video - %s KB)") % [tipname, commify(
file_
size(from_utf8("#{$current_path}/#{filename}"))/1024)]) : tipname), nil)
frame2, textview = create_editzone($autotable_sw, 1)
textview.buffer.text = utf8(caption)
frame2, textview = create_editzone($autotable_sw, 1)
textview.buffer.text = utf8(caption)
diff --git
a/lib/booh/booh-lib.rb
b/lib/booh/booh-lib.rb
index b79a1d3b7147230ef03a59bbc96c71d305f7ea62..e2dc096d6f4de140726a520d48463055369b23a8 100644
(file)
--- a/
lib/booh/booh-lib.rb
+++ b/
lib/booh/booh-lib.rb
@@
-329,4
+329,12
@@
module Booh
type = find_subalbum_info_type(xmldir)
return from_utf8(xmldir.attributes["#{type}-captionfile"]), xmldir.attributes["#{type}-caption"]
end
type = find_subalbum_info_type(xmldir)
return from_utf8(xmldir.attributes["#{type}-captionfile"]), xmldir.attributes["#{type}-caption"]
end
+
+ def file_size(path)
+ begin
+ return File.size(path)
+ rescue
+ return -1
+ end
+ end
end
end