Save image to clipboard if --nonotify is used
ClosedPublic

Authored by aprcela on Sep 4 2019, 8:59 PM.

Details

Summary

BUG: 411263

Test Plan

run spectacle with --nonotify

Diff Detail

Repository
R166 Spectacle
Branch
B411263
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 16123
Build 16141: arc lint + arc unit
aprcela created this revision.Sep 4 2019, 8:59 PM
Restricted Application added a project: Spectacle. · View Herald TranscriptSep 4 2019, 8:59 PM
Restricted Application added a subscriber: Spectacle. · View Herald Transcript
aprcela requested review of this revision.Sep 4 2019, 8:59 PM
ngraham accepted this revision.Sep 4 2019, 9:44 PM
ngraham added a subscriber: ngraham.

@davidre, does this look good?

This revision is now accepted and ready to land.Sep 4 2019, 9:44 PM

This also applies the delay of 250 ms when saving the picture not only copying. To make this better we could move this either inside the if-else above or have another test if we copied to clipboard - can't get around a bit of duplication. However this piece of code is all over the place already and I don't like the design of forceNotify and quitting through the main window. So this if fine with me if we could avoid the extra wait when saving to a file.

aprcela updated this revision to Diff 65434.Sep 5 2019, 2:50 PM

Edit if and add else if

This also applies the delay of 250 ms when saving the picture not only copying. To make this better we could move this either inside the if-else above or have another test if we copied to clipboard - can't get around a bit of duplication. However this piece of code is all over the place already and I don't like the design of forceNotify and quitting through the main window. So this if fine with me if we could avoid the extra wait when saving to a file.

Changed it to skip if it's not -c -n.

Yeah, I've seen it around. It definitely is not the best solution.. but at least one bug less.

forceNotify is connected to SpectacleCore::doNotify and gets emitted only if notify is true. You mean we need to improve quit() ?
This -> https://cgit.kde.org/spectacle.git/tree/src/Gui/KSMainWindow.cpp#n393

@davidre, is this okay now?

davidre accepted this revision.Dec 6 2019, 7:58 AM
This revision was automatically updated to reflect the committed changes.