From 05315c3da6d3761ba95f1ae96b852768dd651c25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 9 Jan 2022 17:51:00 +0100 Subject: New upstream version 40.7 --- NEWS | 9 +++++++++ README.md | 2 +- build-aux/snap/snapcraft.yaml | 15 +++++++++------ data/org.gnome.SimpleScan.gschema.xml | 6 +++--- data/simple-scan.appdata.xml.in | 10 ++++++++++ meson.build | 2 +- src/app-window.vala | 1 + src/scanner.vala | 19 +++++++++++++++++-- 8 files changed, 51 insertions(+), 13 deletions(-) diff --git a/NEWS b/NEWS index 4589a94..d51b4dc 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,12 @@ +Overview of changes in simple-scan 40.7 +~~~~~~~~~~~~~~ +Released: 2021-12-23 + + * Fix replacing underscore with space in scanner names. + * Delete autosave records after creating new document. + * Add the device name to the label if there are several identical models. + * Fix autosave of Page Side property. + Overview of changes in simple-scan 40.6 ~~~~~~~~~~~~~~ Released: 2021-10-27 diff --git a/README.md b/README.md index 0b6751a..75b5b57 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Install the dependencies For Ubuntu/Debian: ``` -$ sudo apt install -y meson valac gcc gettext itstool gobject-introspection libfribidi-dev libgirepository1.0-dev libgtk-3-dev libgusb-dev libcolord-dev libpackagekit-glib2-dev libwebp-dev libsane-dev git ca-certificates +$ sudo apt install -y meson valac gcc gettext itstool libfribidi-dev libgirepository1.0-dev libgtk-3-dev libgusb-dev libcolord-dev libpackagekit-glib2-dev libwebp-dev libsane-dev git ca-certificates ``` diff --git a/build-aux/snap/snapcraft.yaml b/build-aux/snap/snapcraft.yaml index d9c071b..a20c5b8 100644 --- a/build-aux/snap/snapcraft.yaml +++ b/build-aux/snap/snapcraft.yaml @@ -6,7 +6,7 @@ description: | grade: stable # must be 'stable' to release into candidate/stable channels confinement: strict -base: core18 +base: core20 slots: # for GtkApplication registration @@ -28,18 +28,20 @@ apps: - io-ports-control - raw-usb command: usr/bin/simple-scan - extensions: [gnome-3-28] + extensions: [ gnome-3-38 ] desktop: usr/share/applications/simple-scan.desktop environment: GSETTINGS_SCHEMA_DIR: $SNAP/share/glib-2.0/schemas parts: libsane: - source: https://salsa.debian.org/debian/sane-backends.git + source: https://gitlab.com/sane-project/backends.git source-type: git - source-tag: upstream/1.0.27 + source-tag: release-1.0.33 plugin: autotools - configflags: [--prefix=/snap/simple-scan/current/usr, --with-api-spec=no] + autotools-configure-parameters: + - --prefix=/snap/simple-scan/current/usr + - --with-api-spec=no organize: snap/simple-scan/current/usr: usr build-packages: @@ -82,9 +84,10 @@ parts: - libgtk-3-dev - libgdk-pixbuf2.0-dev - libgusb-dev + - libgirepository1.0-dev - libpackagekit-glib2-dev - libsane-dev - - python-scour + - libwebp-dev - valac - zlib1g-dev libs: diff --git a/data/org.gnome.SimpleScan.gschema.xml b/data/org.gnome.SimpleScan.gschema.xml index 35e0f6f..290add1 100644 --- a/data/org.gnome.SimpleScan.gschema.xml +++ b/data/org.gnome.SimpleScan.gschema.xml @@ -1,8 +1,8 @@ - - - + + + diff --git a/data/simple-scan.appdata.xml.in b/data/simple-scan.appdata.xml.in index e3b3b06..f5cec0f 100644 --- a/data/simple-scan.appdata.xml.in +++ b/data/simple-scan.appdata.xml.in @@ -25,6 +25,16 @@ https://www.gnome.org/friends/ The GNOME Project + + +
    +
  • Fix replacing underscore with space in scanner names.
  • +
  • Delete autosave records after creating new document.
  • +
  • Add the device name to the label if there are several identical models.
  • +
  • Fix autosave of Page Side property.
  • +
+
+
    diff --git a/meson.build b/meson.build index ed0de6c..50b519a 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project ('simple-scan', ['vala', 'c'], - version: '40.6', + version: '40.7', license: 'GPLv3+', default_options: [ 'warning_level=1', diff --git a/src/app-window.vala b/src/app-window.vala index c1d4ea3..e163047 100644 --- a/src/app-window.vala +++ b/src/app-window.vala @@ -802,6 +802,7 @@ public class AppWindow : Hdy.ApplicationWindow stop_scan (); clear_document (); + autosave_manager.cleanup (); }); } diff --git a/src/scanner.vala b/src/scanner.vala index d968aec..809ba6c 100644 --- a/src/scanner.vala +++ b/src/scanner.vala @@ -354,6 +354,16 @@ public class Scanner : Object return; } + /* Determine the number of each model to additionally display the name if the model names are the same. */ + var seen = new HashTable (str_hash, str_equal); + for (var i = 0; device_list[i] != null; i++) + { + if (seen.contains(device_list[i].model)) + seen.set(device_list[i].model, seen.get(device_list[i].model) + 1); + else + seen.set(device_list[i].model, 1); + } + var devices = new List (); for (var i = 0; device_list[i] != null; i++) { @@ -373,9 +383,14 @@ public class Scanner : Object scan_device.label = device_list[i].model; else scan_device.label = "%s %s".printf (vendor, device_list[i].model); - + /* Replace underscores in name */ - scan_device.label.replace ("_", " "); + scan_device.label = scan_device.label.replace ("_", " "); + + /* Additionally add the device name to the label if there are several identical models. */ + if (seen.get(device_list[i].model) > 1) + scan_device.label = "%s on %s".printf (scan_device.label, device_list[i].name); + devices.append (scan_device); } -- cgit v1.2.3