[Gtk::Stock::OK, Gtk::Dialog::RESPONSE_OK],
[Gtk::Stock::CANCEL, Gtk::Dialog::RESPONSE_CANCEL])
- dialog.vbox.add(tbl = Gtk::Table.new(0, 0, false))
+ dialog.vbox.add(notebook = Gtk::Notebook.new)
+ notebook.append_page(tbl = Gtk::Table.new(0, 0, false), Gtk::Label.new(utf8(_("Options"))))
tbl.attach(smp_check = Gtk::CheckButton.new(utf8(_("Use symmetric multi-processing"))),
0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 2, 2)
tbl.attach(smp_hbox = Gtk::HBox.new.add(smp_spin = Gtk::SpinButton.new(2, 16, 1)).add(Gtk::Label.new(utf8(_("processors")))).set_sensitive(false),
smp_spin.value = $config['mproc'].to_i
end
+ 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': "))),
+ 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 2, 2)
+ tbl.attach(enhance_entry = Gtk::Entry.new.set_text($config['convert-enhance'] || $convert_enhance).set_size_request(250, -1),
+ 1, 2, 0, 1, Gtk::FILL, Gtk::SHRINK, 2, 2)
+
dialog.vbox.show_all
dialog.run { |response|
if response == Gtk::Dialog::RESPONSE_OK
else
$config.delete('mproc')
end
+
+ $config['convert-enhance'] = enhance_entry.text
end
}
dialog.destroy
$verbose_level = 2
$CURRENT_CHARSET = `locale charmap`.chomp
$convert = 'convert -interlace line +profile "*"'
+ $convert_enhance = '-contrast -enhance -normalize'
def utf8(string)
return Iconv::iconv("UTF-8", $CURRENT_CHARSET, string).to_s
end
convert_options += "-rotate #{rotate} "
if felem.attributes["#{attributes_prefix}enhance"]
- convert_options += "-contrast -enhance -normalize "
+ convert_options += ($config['convert-enhance'] || $convert_enhance) + " "
end
end
for dest in dests
convert_options += "-rotate #{rotate} "
end
if felem.attributes["#{attributes_prefix}enhance"]
- convert_options += "-contrast -enhance -normalize "
+ convert_options += ($config['convert-enhance'] || $convert_enhance) + " "
end
end
for dest in dests