summaryrefslogtreecommitdiff
path: root/src/app-window.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2020-05-02 22:36:44 +0200
committerJörg Frings-Fürst <debian@jff.email>2020-05-02 22:36:44 +0200
commit89097b6232460cf699547ea9a9c47df827725ac9 (patch)
treed5ed83f3efc0b3a344d67b7c600055b96f666a94 /src/app-window.vala
parentf865dc6e8e5234e37c0f58bbdaa185a837e714ca (diff)
parentf28a81d5dc42ca1cf29a33d4cf6a376e5638eb67 (diff)
Update upstream source from tag 'upstream/3.36.2'
Update to upstream version '3.36.2' with Debian dir 2fdcfd39be13360595afebaf00ff1e14efb817c6
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;