summaryrefslogtreecommitdiff
path: root/src/app-window.vala
diff options
context:
space:
mode:
Diffstat (limited to 'src/app-window.vala')
-rw-r--r--src/app-window.vala15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/app-window.vala b/src/app-window.vala
index 6f2d353..0e25f8d 100644
--- a/src/app-window.vala
+++ b/src/app-window.vala
@@ -550,8 +550,7 @@ public class AppWindow : Gtk.ApplicationWindow
if (file_type_combo.get_active_iter (out i))
file_type_store.get (i, 1, out extension, -1);
- var path = save_dialog.get_filename ();
- var filename = Path.get_basename (path);
+ var filename = save_dialog.get_current_name ();
/* Replace extension */
var extension_index = filename.last_index_of_char ('.');
@@ -578,14 +577,11 @@ public class AppWindow : Gtk.ApplicationWindow
if (file_type_combo.get_active_iter (out i))
file_type_store.get (i, 1, out extension, -1);
- var path = save_dialog.get_filename ();
- var filename = Path.get_basename (path);
+ var uri = save_dialog.get_uri ();
- var extension_index = filename.last_index_of_char ('.');
+ var extension_index = uri.last_index_of_char ('.');
if (extension_index < 0)
- path += extension;
-
- var uri = File.new_for_path (path).get_uri ();
+ uri += extension;
/* Check the file(s) don't already exist */
var files = new List<File> ();
@@ -923,14 +919,13 @@ public class AppWindow : Gtk.ApplicationWindow
{
options.scan_mode = ScanMode.GRAY;
options.dpi = preferences_dialog.get_text_dpi ();
- options.depth = 2;
}
else
{
options.scan_mode = ScanMode.COLOR;
options.dpi = preferences_dialog.get_photo_dpi ();
- options.depth = 8;
}
+ options.depth = 8;
preferences_dialog.get_paper_size (out options.paper_width, out options.paper_height);
options.brightness = brightness;
options.contrast = contrast;