20 Commits

Author SHA1 Message Date
Saleem Edah-Tally
5f5cec01c0 Update inline comments. v2 2025-07-15 20:36:38 +02:00
Saleem Edah-Tally
518371e5c1 Add missing space in translation. 2025-07-15 19:27:58 +02:00
Saleem Edah-Tally
81cf250862 Improve identification of stdout messages.
Add a prefix '[InsaneWorker]' for this class for cerr logging.
2025-07-15 19:25:34 +02:00
Saleem Edah-Tally
4f64fdc7d5 Reparent the Stamps dialog to the calling widget. 2025-07-14 13:31:06 +02:00
Saleem Edah-Tally
b1f4f2d15f Use wxAboutBox dialog. 2025-07-14 13:31:01 +02:00
Saleem Edah-Tally
0e517799c8 Cancel scanning if window closure is requested.
The job is cancelled but the window remains open and functional.
At least, the application survives; a crash would happen without this patch.
2025-07-13 22:36:09 +02:00
Saleem Edah-Tally
2b9290e4d8 Report if a scan job has started. 2025-07-13 22:35:09 +02:00
Saleem Edah-Tally
24f58fa13d Allow using multiple instances of the application window.
All instances share the same config file.
Each instance can independently
 - work on a device
 - define its own stamps.
They can work simultaneously.
2025-07-13 21:26:00 +02:00
Saleem Edah-Tally
c10aac922d Veto window closure during scanner discovery in the background. 2025-07-13 20:24:50 +02:00
Saleem Edah-Tally
0f286efe4c Prefer two-step construction of UI classes for consistency. 2025-07-13 17:44:46 +02:00
Saleem Edah-Tally
7d3c61c91d Use the saved config values or application values.
ConfigEditorPopup

On creating the popup, config values were always read and used. Do this if the
application does not provide its own variables. The values are still committed
to the config file in the usual way (on control destruction). The application
may restore them to its own variables during setup.
2025-07-13 16:13:56 +02:00
Saleem Edah-Tally
059b16f08a Process command line and configuration file in the application class. 2025-07-13 14:36:02 +02:00
Saleem Edah-Tally
4b23b1f3de Allow cancelling a scan session.
- perform scanning in a thread
 - change the label of the scan button
 - trigger cancel with the same button and with the ESC key
 - process all GUI updates in asynchronous mode.

Do not use a top window as parent of popups:
 - If a top window goes away in an application with multiple instances of
 XInsaneWidget, any call to a scanner widget leads to a crash.

Minor changes.
2025-07-12 23:03:32 +02:00
Saleem Edah-Tally
3350f86ddf Null pointer check. 2025-07-09 23:08:33 +02:00
Saleem Edah-Tally
a2045aa1f6 Add a 'Stamp' widget.
Place one or multiple stamps on scanned pages in defined locations.

A stamp is understood here as
 - a transparent text in a transparent frame with no borders
 - an opaque text on an opaque background with no borders.

Stamp parameters:
 - text
 - font
 - foreground colour
 - background colour
 - angle of rotation
 - transparency.

Locations:
 - centre
 - cardinal directions
 - inter-cardinal directions.
2025-07-09 21:12:02 +02:00
Saleem Edah-Tally
c2c792dd3d Add a keyboard shortcut to quit the application. v1 2025-07-09 20:29:02 +02:00
Saleem Edah-Tally
1bdffe7c79 Remove stray file. 2025-07-06 21:26:38 +02:00
Saleem Edah-Tally
a488308bf6 Remove alien file. 2025-07-04 22:42:37 +02:00
Saleem Edah-Tally
554b3606cd Don't close the child item.
A v4l device may become unusable after the first capture (its child source
item may have been faked by libinsane if it had none).

Real scanners sustain both situations so far, i.e., whether the child source
is explicitly closed or not.
2025-07-01 17:48:21 +02:00
Saleem Edah-Tally
ef6f25ef27 Initial commit. 2025-06-28 17:40:42 +02:00