Skip to content
Commit 8e44d9d4 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)


(cherry picked from commit 84a9d976)
parent 5c332371
Pipeline #374643 passed with stage
in 56 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment