diff options
| author | Jörg Frings-Fürst <debian@jff.email> | 2022-01-09 17:51:04 +0100 | 
|---|---|---|
| committer | Jörg Frings-Fürst <debian@jff.email> | 2022-01-09 17:51:04 +0100 | 
| commit | ba45285a909eba797547ecb9b2b405d30266ad59 (patch) | |
| tree | 7e5a555a3f296c30ce811c2fc0b980f38c695cf6 | |
| parent | 630a965ad9727d36b8078d74f96b5ffa00c242d8 (diff) | |
| parent | 05315c3da6d3761ba95f1ae96b852768dd651c25 (diff) | |
Update upstream source from tag 'upstream/40.7'
Update to upstream version '40.7'
with Debian dir 039d723b4651a4494baf2d79aa055285570c9c44
| -rw-r--r-- | NEWS | 9 | ||||
| -rw-r--r-- | README.md | 2 | ||||
| -rw-r--r-- | build-aux/snap/snapcraft.yaml | 15 | ||||
| -rw-r--r-- | data/org.gnome.SimpleScan.gschema.xml | 6 | ||||
| -rw-r--r-- | data/simple-scan.appdata.xml.in | 10 | ||||
| -rw-r--r-- | meson.build | 2 | ||||
| -rw-r--r-- | src/app-window.vala | 1 | ||||
| -rw-r--r-- | src/scanner.vala | 19 | 
8 files changed, 51 insertions, 13 deletions
| @@ -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 @@ -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 @@  <schemalist>    <enum id="org.gnome.SimpleScan.PageSide"> -    <value value="1" nick="front"/> -    <value value="2" nick="back"/> -    <value value="3" nick="both"/> +    <value value="0" nick="front"/> +    <value value="1" nick="back"/> +    <value value="2" nick="both"/>    </enum>    <schema id="org.gnome.SimpleScan" path="/org/gnome/simple-scan/" gettext-domain="simple-scan"> 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 @@    <url type="donation">https://www.gnome.org/friends/</url>    <developer_name>The GNOME Project</developer_name>    <releases> +    <release date="2021-12-27" version="40.7"> +      <description> +        <ul> +          <li>Fix replacing underscore with space in scanner names.</li> +          <li>Delete autosave records after creating new document.</li> +          <li>Add the device name to the label if there are several identical models.</li> +          <li>Fix autosave of Page Side property.</li> +        </ul> +      </description> +    </release>      <release date="2021-10-27" version="40.6">        <description>          <ul> 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<string, int> (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<ScanDevice> ();          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);          } | 
