simple-scan-team team mailing list archive
-
simple-scan-team team
-
Mailing list archive
-
Message #00503
[Merge] lp:~kroq-gar78/simple-scan/fix-765780 into lp:simple-scan
kroq-gar78 has proposed merging lp:~kroq-gar78/simple-scan/fix-765780 into lp:simple-scan.
Requested reviews:
kroq-gar78 (kroq-gar78)
Robert Ancell (robert-ancell)
For more details, see:
https://code.launchpad.net/~kroq-gar78/simple-scan/fix-765780/+merge/101661
Add the page number to the first file in a multi-file scan, and start counting from one for multi-file scans.
--
https://code.launchpad.net/~kroq-gar78/simple-scan/fix-765780/+merge/101661
Your team Simple Scan Development Team is subscribed to branch lp:simple-scan.
=== modified file 'src/book.vala'
--- src/book.vala 2012-03-17 01:40:08 +0000
+++ src/book.vala 2012-04-11 23:06:22 +0000
@@ -85,8 +85,10 @@
private File make_indexed_file (string uri, int i)
{
- if (i == 0)
- return File.new_for_uri (uri);
+ if (get_n_pages() == 1)
+ {
+ return File.new_for_uri (file.get_uri ())
+ }
/* Insert index before extension */
var basename = Path.get_basename (uri);
@@ -98,7 +100,7 @@
prefix = uri.slice (0, uri.length - suffix.length);
}
- return File.new_for_uri ("%s-%d%s".printf (prefix, i, suffix));
+ return File.new_for_uri ("%s-%d%s".printf (prefix, i+1, suffix));
}
private void save_multi_file (string type, File file) throws Error
Follow ups