Balló György pushed to branch main at Arch Linux / Packaging / Packages / 
letterpress


Commits:
17dc9efa by Balló György at 2024-10-21T19:07:18+02:00
upgpkg: 2.1-5: Clear all temporary files on close

- - - - -


3 changed files:

- .SRCINFO
- PKGBUILD
- letterpress-clear-tmpfiles.patch


Changes:

=====================================
.SRCINFO
=====================================
@@ -1,7 +1,7 @@
 pkgbase = letterpress
        pkgdesc = Convert your images into a picture made up of ASCII 
characters, using jp2a
        pkgver = 2.1
-       pkgrel = 4
+       pkgrel = 5
        url = https://apps.gnome.org/Letterpress/
        arch = any
        license = GPL-3.0-or-later
@@ -28,7 +28,7 @@ pkgbase = letterpress
        b2sums = 
85b95ddf80a445a8fd13856086da45e7702d171a780deb62512b27ef03ed56acd30ddf43cd27c67a935961b11cab2fe8a68607d3d6519802cfa4edaaedc6710d
        b2sums = 
001ea58a749bc573f69f6a6de235572a07092d99f414f9e66f2a8180ad1df523988536d5b21589e3d6f2c8869fa0cfd08fea8b203abb8043bcbc9d143975cd0f
        b2sums = 
4030ec1653f77719e00f28435a615a431fd139833db2a706af165866ac0ecc8f5edeb6c0ac66f931a53d50ae57578e1b97fcb7af423dedbb67b5a034fccabd4c
-       b2sums = 
34fa190763103045fc052ad921b99374fdd53bf1768eddd664efcf22fb55c3dea7f5bf80eb4afcd46a0ab6db10ed9c2ad8d3bc65b439b036d7f6c9595908125c
+       b2sums = 
b03061acf2d5db795864b9a77d3c50f27dc6a69b95fa3125b88fb51cd9458aca2fd58260c596c307313fc5811814010ef520b8b27b1a95dc63976ac135ed777b
        b2sums = 
1ce45e3b5b837fbae2267799483b876a739c67fabfdc6b3e2d8c5043b5c6d78a9b742b0c6bfe807f5e5f15303f7ee7fcca50c5edf925815b948c64ec57a6b28b
 
 pkgname = letterpress


=====================================
PKGBUILD
=====================================
@@ -2,7 +2,7 @@
 
 pkgname=letterpress
 pkgver=2.1
-pkgrel=4
+pkgrel=5
 pkgdesc='Convert your images into a picture made up of ASCII characters, using 
jp2a'
 arch=(any)
 url='https://apps.gnome.org/Letterpress/'
@@ -37,7 +37,7 @@ b2sums=(
   
85b95ddf80a445a8fd13856086da45e7702d171a780deb62512b27ef03ed56acd30ddf43cd27c67a935961b11cab2fe8a68607d3d6519802cfa4edaaedc6710d
   
001ea58a749bc573f69f6a6de235572a07092d99f414f9e66f2a8180ad1df523988536d5b21589e3d6f2c8869fa0cfd08fea8b203abb8043bcbc9d143975cd0f
   
4030ec1653f77719e00f28435a615a431fd139833db2a706af165866ac0ecc8f5edeb6c0ac66f931a53d50ae57578e1b97fcb7af423dedbb67b5a034fccabd4c
-  
34fa190763103045fc052ad921b99374fdd53bf1768eddd664efcf22fb55c3dea7f5bf80eb4afcd46a0ab6db10ed9c2ad8d3bc65b439b036d7f6c9595908125c
+  
b03061acf2d5db795864b9a77d3c50f27dc6a69b95fa3125b88fb51cd9458aca2fd58260c596c307313fc5811814010ef520b8b27b1a95dc63976ac135ed777b
   
1ce45e3b5b837fbae2267799483b876a739c67fabfdc6b3e2d8c5043b5c6d78a9b742b0c6bfe807f5e5f15303f7ee7fcca50c5edf925815b948c64ec57a6b28b
 )
 


=====================================
letterpress-clear-tmpfiles.patch
=====================================
@@ -1,16 +1,17 @@
-From b74bad958056fa7e32c86b72e5f8abcd1aa40409 Mon Sep 17 00:00:00 2001
+From e0d0ffe59920f42cd3e4f902569f368997968930 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <[email protected]>
 Date: Mon, 21 Oct 2024 17:06:18 +0200
 Subject: [PATCH] Clear temporary files on close
 
 Without this, all temporary files remain on the system for each opened images.
 ---
- src/main.py   | 20 +++++++++++++++++++-
- src/window.py |  4 +++-
- 2 files changed, 22 insertions(+), 2 deletions(-)
+ src/main.py    | 22 +++++++++++++++++++++-
+ src/pasting.py |  4 ++--
+ src/window.py  |  4 +++-
+ 3 files changed, 26 insertions(+), 4 deletions(-)
 
 diff --git a/src/main.py b/src/main.py
-index 55eef07..a5e6abd 100644
+index 55eef07..26bd3f0 100644
 --- a/src/main.py
 +++ b/src/main.py
 @@ -74,6 +74,8 @@ class LetterpressApplication(Adw.Application):
@@ -22,7 +23,7 @@ index 55eef07..a5e6abd 100644
  
      def do_activate(self):
          """Called when the application is activated.
-@@ -92,9 +94,25 @@ class LetterpressApplication(Adw.Application):
+@@ -92,9 +94,27 @@ class LetterpressApplication(Adw.Application):
          if self.file != None:
              win.check_is_image(Gio.File.new_for_path(self.file))
  
@@ -34,13 +35,15 @@ index 55eef07..a5e6abd 100644
 +
 +        Gtk.Application.do_shutdown(self)
 +
-+    def __paste_image_cb(self, file):
++    def __paste_image_cb(self, file, temporary):
 +        if self.pasted_tmpfile:
 +            self.pasted_tmpfile.delete()
 +
-+        self.pasted_tmpfile = file;
++        if temporary:
++            self.pasted_tmpfile = file;
++
 +        win = self.get_active_window()
-+        win.check_is_image(self.pasted_tmpfile)
++        win.check_is_image(file)
 +
      def __paste_image(self, *args):
          win = self.get_active_window()
@@ -49,6 +52,28 @@ index 55eef07..a5e6abd 100644
  
      def __change_output_width(self, down=False):
          win = self.get_active_window()
+diff --git a/src/pasting.py b/src/pasting.py
+index 36c9122..3079c51 100644
+--- a/src/pasting.py
++++ b/src/pasting.py
+@@ -33,7 +33,7 @@ class Paster:
+     def __on_file_pasted(self, clipboard, result):
+         try:
+             paste_as_file = clipboard.read_value_finish(result)
+-            self.callback(paste_as_file)
++            self.callback(paste_as_file, False)
+ 
+         except:
+             clipboard.read_texture_async(None, self.__on_texture_pasted)
+@@ -42,7 +42,7 @@ class Paster:
+         try:
+             paste_as_texture = clipboard.read_texture_finish(result)
+             file = texture_to_file.to_file(paste_as_texture)
+-            self.callback(file)
++            self.callback(file, True)
+ 
+         except:
+             toast = Adw.Toast.new(_("No image found in clipboard"))
 diff --git a/src/window.py b/src/window.py
 index d2183a6..4717919 100644
 --- a/src/window.py



View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/letterpress/-/commit/17dc9efaafaf0309c357c1b21ad8fdea34274575

-- 
View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/letterpress/-/commit/17dc9efaafaf0309c357c1b21ad8fdea34274575
You're receiving this email because of your account on gitlab.archlinux.org.


Reply via email to