Skip to content

Add various fixes

scx requested to merge scx/ocrfeeder:master into master

This is related to submitting my flatpak package to the Flathub repository:

https://github.com/flathub/flathub/pull/825

https://github.com/scx/flathub/tree/org.gnome.OCRFeeder

https://github.com/scx/ocrfeeder-flatpak

1. Update desktop file

scx/ocrfeeder@23aa40c3

Flatpak equivalent:

https://github.com/scx/ocrfeeder-flatpak/blob/11ef7ed80b8999662a536cfc9dfd4f8cd76c5d94/OCRFeeder.yaml#L87-L89

https://github.com/scx/ocrfeeder-flatpak/blob/11ef7ed80b8999662a536cfc9dfd4f8cd76c5d94/ocrfeeder.desktop.in

Notes:

To check StartupWMClass, you can use xprop WM_CLASS.

2. Add AppData file

scx/ocrfeeder@dd57b0e0

Flatpak equivalent:

https://github.com/scx/ocrfeeder-flatpak/blob/11ef7ed80b8999662a536cfc9dfd4f8cd76c5d94/OCRFeeder.yaml#L90-L92

https://github.com/scx/ocrfeeder-flatpak/blob/11ef7ed80b8999662a536cfc9dfd4f8cd76c5d94/ocrfeeder.appdata.xml

Notes:

Based on: https://git.archlinux.org/svntogit/community.git/tree/trunk/ocrfeeder.appdata.xml?h=packages/ocrfeeder&id=c5b7b3b128a13859d5272734be70e4bbcdcc4f93

3. Rename files because of new Application ID

scx/ocrfeeder@db6735b1

Flatpak equivalent:

https://github.com/scx/ocrfeeder-flatpak/blob/11ef7ed80b8999662a536cfc9dfd4f8cd76c5d94/org.gnome.OCRFeeder.yaml#L6-L9

4. Update translations

scx/ocrfeeder@56d789d6

Flatpak equivalent:

None

Notes:

Reuse the translation for Comment field from desktop file, but without dot at the end.

5. Update window icon

scx/ocrfeeder@8d4a470c

Flatpak equivalent:

None

Notes:

Use the org.gnome.OCRFeeder icon from current theme for all windows.

The main advantage is that it can use a larger pixmap and there is no longer need to set an icon for each window.

6. Set automake strictness to foreign

scx/ocrfeeder@9bb1f3d4

Flatpak equivalent:

None

Notes:

Backported from Debian (Alberto Garcia)

Set automake strictness to foreign

This removes lots of warnings from dh-autoreconf.

https://pastebin.com/RWBHgGMQ

7. Add missing options to the ocrfeeder-cli manpage

scx/ocrfeeder@b2ed8e50

Flatpak equivalent:

None

Notes:

Backported from Debian (Alberto Garcia)

Add missing options to the ocrfeeder-cli manpage

https://bugzilla.gnome.org/show_bug.cgi?id=761590

https://bugs.debian.org/813496

https://pastebin.com/XT9vhCx7

8. Fix image preview

scx/ocrfeeder@d6896091

Flatpak equivalent:

https://github.com/scx/ocrfeeder-flatpak/blob/11ef7ed80b8999662a536cfc9dfd4f8cd76c5d94/OCRFeeder.yaml#L62-L64

https://github.com/scx/ocrfeeder-flatpak/blob/11ef7ed80b8999662a536cfc9dfd4f8cd76c5d94/ocrfeeder-0.8.1-update-box-image.patch

Notes:

Image preview after unpapering page without this patch: https://i.paste.pics/c956a07720e9d5f14dd9d877acb78d6e.png

9. Fix OCR engine list and set Tesseract as default engine

scx/ocrfeeder@43f6f009

Flatpak equivalent:

https://github.com/scx/ocrfeeder-flatpak/blob/11ef7ed80b8999662a536cfc9dfd4f8cd76c5d94/OCRFeeder.yaml#L65-L67

https://github.com/scx/ocrfeeder-flatpak/blob/11ef7ed80b8999662a536cfc9dfd4f8cd76c5d94/ocrfeeder-0.8.1-default-engine.patch

Notes:

Sorting engine list important here. Without this patch, OCRFeeder may display incorrect favorite engine in Preferences dialog window after removing the current default engine in OCR Engines dialog window. So this is actually a bugfix.

10. Set favorite engine as default engine for content area

scx/ocrfeeder@c3cc23ad

Flatpak equivalent:

https://github.com/scx/ocrfeeder-flatpak/blob/11ef7ed80b8999662a536cfc9dfd4f8cd76c5d94/OCRFeeder.yaml#L68-L72

https://github.com/scx/ocrfeeder-flatpak/blob/11ef7ed80b8999662a536cfc9dfd4f8cd76c5d94/ocrfeeder-0.8.1-default-engine-content-area.patch

Notes:

OCRFeeder should use favorite engine as the default engine for content area.

11. Set fixed width for both panes

scx/ocrfeeder@a9f63c0e

Flatpak equivalent:

https://github.com/scx/ocrfeeder-flatpak/blob/11ef7ed80b8999662a536cfc9dfd4f8cd76c5d94/OCRFeeder.yaml#L74-L79

https://github.com/scx/ocrfeeder-flatpak/blob/11ef7ed80b8999662a536cfc9dfd4f8cd76c5d94/ocrfeeder-0.8.1-layout-fixed-width.patch

Notes:

There is no reason to increase size of left pane when resizing window.

Left panel size without this patch: https://i.paste.pics/82d9a422fa9722916694bcbb913fe7c8.png

12. Increase window size

scx/ocrfeeder@efc3260c

Flatpak equivalent:

https://github.com/scx/ocrfeeder-flatpak/blob/11ef7ed80b8999662a536cfc9dfd4f8cd76c5d94/OCRFeeder.yaml#L80-L82

https://github.com/scx/ocrfeeder-flatpak/blob/11ef7ed80b8999662a536cfc9dfd4f8cd76c5d94/ocrfeeder-0.8.1-window-size.patch

Notes:

Default window size is just too small.

Default window size without this patch: https://i.paste.pics/c1714ea5cb857c50406b53b91a453232.png

13. Disable unpaper frame in sandbox mode

scx/ocrfeeder@7181042c

Flatpak equivalent:

https://github.com/scx/ocrfeeder-flatpak/blob/11ef7ed80b8999662a536cfc9dfd4f8cd76c5d94/OCRFeeder.yaml#L84-L86

https://github.com/scx/ocrfeeder-flatpak/blob/11ef7ed80b8999662a536cfc9dfd4f8cd76c5d94/ocrfeeder-0.8.1-disable-unpaper-frame.patch

Notes:

Disable unpaper frame in Preferences dialog window when running in sandbox mode. There is no reason to manually set the path to unpaper in sandboxed environment.

Use ./configure --enable-sandbox to enable this behavior.

Preferences dialog window without this patch: https://i.paste.pics/614f284d27c52814fe47f8aa7f664268.png

Edited by scx

Merge request reports