Screenshot: Ignore delay on Print Screen

The delay variable is only considered when you push the
"New screenshot" button as suggested by diver.

Fixes #11447
This commit is contained in:
John Scipione
2016-03-31 15:55:25 -07:00
parent 63fd7a2041
commit ea810bf683
2 changed files with 11 additions and 7 deletions
+9 -6
View File
@@ -140,7 +140,7 @@ ScreenshotWindow::ScreenshotWindow(const Utility& utility, bool silent,
// Check if fUtility contains valid data
if (fUtility.wholeScreen == NULL) {
_NewScreenshot(silent, clipboard);
_NewScreenshot(silent, clipboard, true);
return;
}
@@ -391,15 +391,18 @@ ScreenshotWindow::Quit()
void
ScreenshotWindow::_NewScreenshot(bool silent, bool clipboard)
ScreenshotWindow::_NewScreenshot(bool silent, bool clipboard, bool ignoreDelay)
{
BMessage message(B_ARGV_RECEIVED);
int32 argc = 3;
BString delay;
delay << fDelay / 1000000;
message.AddString("argv", "screenshot");
message.AddString("argv", "--delay");
message.AddString("argv", delay);
if (!ignoreDelay) {
BString delay;
delay << fDelay / 1000000;
message.AddString("argv", "--delay");
message.AddString("argv", delay);
}
if (silent || clipboard) {
if (silent) {
+2 -1
View File
@@ -40,7 +40,8 @@ public:
private:
void _NewScreenshot(bool silent = false,
bool clipboard = false);
bool clipboard = false,
bool ignoreDelay = false);
void _UpdatePreviewPanel();
void _DisallowChar(BTextView* textView);
void _SetupOutputPathMenu(const BMessage& settings);