Save image to clipboard if --nonotify is used
AcceptedPublic

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

Details

Reviewers
davidre
ngraham
Group Reviewers
Spectacle
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.Wed, Sep 4, 8:59 PM
Restricted Application added a project: Spectacle. · View Herald TranscriptWed, Sep 4, 8:59 PM
Restricted Application added a subscriber: Spectacle. · View Herald Transcript
aprcela requested review of this revision.Wed, Sep 4, 8:59 PM
ngraham accepted this revision.Wed, Sep 4, 9:44 PM
ngraham added a subscriber: ngraham.

@davidre, does this look good?

This revision is now accepted and ready to land.Wed, Sep 4, 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.Thu, Sep 5, 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