tooltips.set_tip(optimize432, utf8(_("Resize images with optimized sizes for 3/2 aspect ratio rather than 4/3 (typical aspect ratio of pictures from non digital cameras are 3/2 when pictures from digital cameras are 4/3)")), nil)
vb.add(Gtk::HBox.new(false, 3).pack_start(Gtk::Label.new(utf8(_("Number of thumbnails per row: "))), false, false, 0).
pack_start(nperrowradios = Gtk::HBox.new, false, false, 0))
+ vb.add(Gtk::HBox.new(false, 3).pack_start(Gtk::Label.new(utf8(_("'Made with' markup on pages bottom: "))), false, false, 0).
+ pack_start(madewithentry = Gtk::Entry.new, true, true, 0))
+ tooltips.set_tip(madewithentry, utf8(_("Optional HTML markup to use on pages bottom for a small 'made with' label; %booh is replaced by the website of booh;
+for example: made with <a href=\"%booh\">booh</a>!")), nil)
src_nb_calculated_for = ''
src_nb_thread = nil
else
nperrowradios.add(nperrow_group = rb = Gtk::RadioButton.new(n.to_s))
end
+ tooltips.set_tip(rb, utf8(_("Set the number of thumbnails per row of the 'thumbnails' pages (if chosen theme uses a row arrangement)")), nil)
if $default_N == n
rb.active = true
end
sizes = theme_sizes.find_all { |e| e[:widget].active? }.collect { |e| e[:value] }.join(',')
nperrow = nperrows.find { |e| e[:widget].active? }[:value]
opt432 = optimize432.active?
+ madewith = madewithentry.text
if src_nb_thread
Thread.kill(src_nb_thread)
gtk_thread_abandon #- needed because we're about to destroy widgets in dialog, for which they may be some pending gtk calls
if ok
call_backend("booh-backend --source '#{srcdir}' --destination '#{destdir}' --config-skel '#{configskel}' --for-gui " +
"--verbose-level #{$verbose_level} --theme #{theme} --sizes #{sizes} --thumbnails-per-row #{nperrow} " +
- "#{opt432 ? '--optimize-for-32' : ''} #{additional_booh_options}",
+ "#{opt432 ? '--optimize-for-32' : ''} --made-with '#{madewith}' #{additional_booh_options}",
utf8(_("Please wait while scanning source directory...")),
'full scan',
{ :closure_after => proc { open_file_user(configskel) } })
if limit_sizes
limit_sizes = limit_sizes.split(/,/)
end
+ madewith = $xmldoc.root.attributes['made-with']
tooltips = Gtk::Tooltips.new
frame1 = Gtk::Frame.new(utf8(_("Locations"))).add(tbl = Gtk::Table.new(0, 0, false))
1, 2, 0, 1, Gtk::FILL, Gtk::SHRINK, 2, 2)
tbl.attach(Gtk::Label.new(utf8(_("Directory where the web-album is created: "))),
0, 1, 2, 3, Gtk::SHRINK, Gtk::SHRINK, 2, 2)
- tbl.attach(Gtk::Alignment.new(0, 0.5, 0, 0).add(Gtk::Label.new.set_markup('<i>' + dest + '</i>')),
+ tbl.attach(Gtk::Alignment.new(0, 0.5, 0, 0).add(Gtk::Label.new.set_markup('<i>' + dest + '</i>').set_selectable(true)),
1, 2, 2, 3, Gtk::FILL, Gtk::SHRINK, 2, 2)
tbl.attach(Gtk::Label.new(utf8(_("Filename where this album's properties are stored: "))),
0, 1, 3, 4, Gtk::SHRINK, Gtk::SHRINK, 2, 2)
- tbl.attach(Gtk::Alignment.new(0, 0.5, 0, 0).add(Gtk::Label.new.set_markup('<i>' + $orig_filename + '</i>')),
+ tbl.attach(Gtk::Alignment.new(0, 0.5, 0, 0).add(Gtk::Label.new.set_markup('<i>' + $orig_filename + '</i>').set_selectable(true)),
1, 2, 3, 4, Gtk::FILL, Gtk::SHRINK, 2, 2)
frame2 = Gtk::Frame.new(utf8(_("Configuration"))).add(vb = Gtk::VBox.new)
vb.add(Gtk::HBox.new(false, 3).pack_start(Gtk::Label.new(utf8(_("Theme: "))), false, false, 0).
- pack_start(theme_button = Gtk::Button.new(theme), false, false, 0))
+ pack_start(theme_button = Gtk::Button.new(theme), false, false, 0))
vb.add(Gtk::HBox.new(false, 3).pack_start(Gtk::Label.new(utf8(_("Sizes of images to generate: "))), false, false, 0).
pack_start(sizes = Gtk::HBox.new, false, false, 0))
vb.add(optimize432 = Gtk::CheckButton.new(utf8(_("Optimize for 3/2 aspect ratio"))).set_active(opt432))
tooltips.set_tip(optimize432, utf8(_("Resize images with optimized sizes for 3/2 aspect ratio rather than 4/3 (typical aspect ratio of pictures from non digital cameras are 3/2 when pictures from digital cameras are 4/3)")), nil)
vb.add(Gtk::HBox.new(false, 3).pack_start(Gtk::Label.new(utf8(_("Number of thumbnails per row: "))), false, false, 0).
pack_start(nperrowradios = Gtk::HBox.new, false, false, 0))
+ vb.add(Gtk::HBox.new(false, 3).pack_start(Gtk::Label.new(utf8(_("'Made with' markup on pages bottom: "))), false, false, 0).
+ pack_start(madewithentry = Gtk::Entry.new, true, true, 0))
+ if madewith
+ madewithentry.text = madewith
+ end
+ tooltips.set_tip(madewithentry, utf8(_("Optional HTML markup to use on pages bottom for a small 'made with' label; %booh is replaced by the website of booh;
+for example: made with <a href=\"%booh\">booh</a>!")), nil)
theme_sizes = []
nperrows = []
else
nperrowradios.add(nperrow_group = rb = Gtk::RadioButton.new(n.to_s))
end
+ tooltips.set_tip(rb, utf8(_("Set the number of thumbnails per row of the 'thumbnails' pages (if chosen theme uses a row arrangement)")), nil)
nperrowradios.add(Gtk::Label.new(' '))
if nperrow && n.to_s == nperrow || !nperrow && $default_N == n
rb.active = true
save_limit_sizes = theme_sizes.find_all { |e| e[:widget].active? }.collect { |e| e[:value] }
save_opt432 = optimize432.active?
save_nperrow = nperrows.find { |e| e[:widget].active? }[:value]
+ save_madewith = madewithentry.text
dialog.destroy
- if ok && (save_theme != theme || save_limit_sizes != limit_sizes || save_opt432 != opt432 || save_nperrow != nperrow)
+ if ok && (save_theme != theme || save_limit_sizes != limit_sizes || save_opt432 != opt432 || save_nperrow != nperrow || save_madewith != madewith)
mark_document_as_dirty
save_current_file
call_backend("booh-backend --use-config '#{$filename}' --for-gui --verbose-level #{$verbose_level} " +
"--thumbnails-per-row #{save_nperrow} --theme #{save_theme} --sizes #{save_limit_sizes.join(',')} " +
- "#{save_opt432 ? '--optimize-for-32' : ''} #{additional_booh_options}",
+ "#{save_opt432 ? '--optimize-for-32' : ''} --made-with '#{save_madewith}' #{additional_booh_options}",
utf8(_("Please wait while scanning source directory...")),
'full scan',
{ :closure_after => proc {