if $config['mproc']
options += "--mproc #{$config['mproc'].to_i} "
end
+ if $config['emptycomments']
+ options += "--empty-comments "
+ end
return options
end
1, 2, 1, 2, Gtk::FILL, Gtk::SHRINK, 2, 2)
tbl.attach(nogestures_check = Gtk::CheckButton.new(utf8(_("Disable mouse gestures"))),
0, 2, 2, 3, Gtk::FILL, Gtk::SHRINK, 2, 2)
+ tbl.attach(emptycomments_check = Gtk::CheckButton.new(utf8(_("Use empty comments for new albums"))),
+ 0, 2, 3, 4, Gtk::FILL, Gtk::SHRINK, 2, 2)
+ tooltips.set_tip(emptycomments_check, utf8(_("Normally, filenames are used as comments for new albums. Check this if you prefer empty comments.")), nil)
smp_check.signal_connect('toggled') {
if smp_check.active?
smp_hbox.sensitive = true
smp_spin.value = $config['mproc'].to_i
end
nogestures_check.active = $config['nogestures']
+ emptycomments_check.active = $config['emptycomments']
notebook.append_page(tbl = Gtk::Table.new(0, 0, false), Gtk::Label.new(utf8(_("Advanced"))))
tbl.attach(Gtk::Label.new.set_markup(utf8(_("Options to pass to <i>convert</i> when\nperforming 'enhance contrast': "))),
$config.delete('mproc')
end
$config['nogestures'] = nogestures_check.active?
+ $config['emptycomments'] = emptycomments_check.active?
$config['convert-enhance'] = enhance_entry.text
end
[ '--force', '-f', GetoptLong::NO_ARGUMENT, _("Force generation of album even if the GUI marked some directories as already generated") ],
[ '--sizes', '-S', GetoptLong::REQUIRED_ARGUMENT, _("Specify the list of images sizes to use instead of all specified in the theme (this is a comma-separated list)") ],
+ [ '--empty-comments','-e', GetoptLong::NO_ARGUMENT, _("Prefer empty comments over filename when creating new albums") ],
[ '--mproc', '-m', GetoptLong::REQUIRED_ARGUMENT, _("Specify the number of processors for multi-processors machines") ],
when '--sizes'
$limit_sizes = arg
+ when '--empty-comments'
+ $empty_comments = true
+
when '--force'
$force = true
else
type = entry2type(file)
if type && !xmldir.elements["#{type}[@filename='#{utf8(file)}']"]
- xmldir.add_element type, { "filename" => utf8(file), "caption" => utf8(file.sub(/\.[^\.]+$/, '')[0..17]) }
+ xmldir.add_element type, { "filename" => utf8(file), "caption" => $empty_comments ? '' : utf8(file.sub(/\.[^\.]+$/, '')[0..17]) }
end
end
end