Add --clipboard to gui subcommand (#1829)

* Add --clipboard to gui subcommand

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>

* Prevent duplicate notification

Signed-off-by: Haris Gušić <harisgusic.dev@gmail.com>
This commit is contained in:
Haris Gušić
2021-08-20 20:09:06 +02:00
committed by GitHub
parent 39afd66650
commit 584bcd7f6c
7 changed files with 34 additions and 10 deletions

View File

@@ -28,12 +28,15 @@ FlameshotDBusAdapter::FlameshotDBusAdapter(QObject* parent)
FlameshotDBusAdapter::~FlameshotDBusAdapter() {}
void FlameshotDBusAdapter::graphicCapture(QString path, int delay, uint id)
void FlameshotDBusAdapter::graphicCapture(QString path,
bool toClipboard,
int delay,
uint id)
{
CaptureRequest req(CaptureRequest::GRAPHICAL_MODE, delay, path);
// if (toClipboard) {
// req.addTask(CaptureRequest::CLIPBOARD_SAVE_TASK);
// }
if (toClipboard) {
req.addTask(CaptureRequest::CLIPBOARD_SAVE_TASK);
}
req.setStaticID(id);
Controller::getInstance()->requestCapture(req);
}