Skip to content
Commit 84a9d976 authored by Noah Davis's avatar Noah Davis 🌵
Browse files

Use export action flags instead of several functions and signals

This allows us to specify export actions and figure out which kinds of
actions have been done simultaneously without having separate functions
and signals for all the various combinations of save, save as, copy
image and copy path.

SpectacleCore: Instead of storing which actions to use in boolean member
variables, use a function to calculate which automatic export options
can be done. This makes it so we don't need to update the variables
every time we want to use them.

CaptureWindow, SelectionEditor, SpectacleCore: Don't export directly
from CaptureWindows. Instead, pass export actions to the
SpectacleCore::grabDone() signal via SelectionEditor::acceptSelection().
Necessary for preventing double saves when clicking the Save button in
rectangle capture windows.

In order to cherry-pick this to 23.04, we'll need to cherry-pick some of
the previous code clean-up and bug fix commits on master:

- 35f3eefc
- 0bf9cd34
- 6711242f
- 3a9f5351
- a95993c2
- ed981b99
- 28f63cee
- 21112702
- 553eb2cf
- 0fda35cb
- 00187754
- abf04455

CCBUG: 422874 (needs new translatable strings to fully fix)
parent 333b8e7d
Loading
Loading
Loading
Pipeline #374629 passed with stage
in 59 seconds
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment