diff options
Diffstat (limited to 'src/simple-scan.vala')
-rw-r--r-- | src/simple-scan.vala | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/simple-scan.vala b/src/simple-scan.vala index 1176053..14e70ea 100644 --- a/src/simple-scan.vala +++ b/src/simple-scan.vala @@ -350,7 +350,7 @@ public class SimpleScan : Gtk.Application return path; } - private void email_cb (UserInterface ui, string profile) + private void email_cb (UserInterface ui, string profile, int quality) { var saved = false; var command_line = "xdg-email"; @@ -366,7 +366,7 @@ public class SimpleScan : Gtk.Application ui.show_progress_dialog (); try { - book.save ("pdf", file); + book.save ("pdf", quality, file); } catch (Error e) { @@ -391,7 +391,7 @@ public class SimpleScan : Gtk.Application var file = File.new_for_path (path); try { - book.get_page (i).save ("jpeg", file); + book.get_page (i).save ("jpeg", quality, file); } catch (Error e) { @@ -466,7 +466,7 @@ public class SimpleScan : Gtk.Application var line_number = 0; var xref_offset = 0; var xref_line = -1; - var xref_regex = new Regex ("^\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d 0000 n$"); + var xref_regex = new Regex ("^\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d 0000 n$", RegexCompileFlags.RAW); MatchInfo xref_match; var line = new StringBuilder (); while (offset < data.length) @@ -519,15 +519,15 @@ public class SimpleScan : Gtk.Application public static int main (string[] args) { Intl.setlocale (LocaleCategory.ALL, ""); - Intl.bindtextdomain (Config.GETTEXT_PACKAGE, Config.LOCALE_DIR); - Intl.bind_textdomain_codeset (Config.GETTEXT_PACKAGE, "UTF-8"); - Intl.textdomain (Config.GETTEXT_PACKAGE); + Intl.bindtextdomain (GETTEXT_PACKAGE, LOCALE_DIR); + Intl.bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + Intl.textdomain (GETTEXT_PACKAGE); Gtk.init (ref args); var c = new OptionContext (/* Arguments and description for --help text */ _("[DEVICE...] - Scanning utility")); - c.add_main_entries (options, Config.GETTEXT_PACKAGE); + c.add_main_entries (options, GETTEXT_PACKAGE); c.add_group (Gtk.get_option_group (true)); try { @@ -544,7 +544,7 @@ public class SimpleScan : Gtk.Application if (show_version) { /* Note, not translated so can be easily parsed */ - stderr.printf ("simple-scan %s\n", Config.VERSION); + stderr.printf ("simple-scan %s\n", VERSION); return Posix.EXIT_SUCCESS; } if (fix_pdf_filename != null) @@ -579,7 +579,7 @@ public class SimpleScan : Gtk.Application log_file = FileStream.open (path, "w"); Log.set_default_handler (log_cb); - debug ("Starting Simple Scan %s, PID=%i", Config.VERSION, Posix.getpid ()); + debug ("Starting Simple Scan %s, PID=%i", VERSION, Posix.getpid ()); var app = new SimpleScan (device); return app.run (); |