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:
@@ -140,7 +140,7 @@ ScreenshotWindow::ScreenshotWindow(const Utility& utility, bool silent,
|
|||||||
|
|
||||||
// Check if fUtility contains valid data
|
// Check if fUtility contains valid data
|
||||||
if (fUtility.wholeScreen == NULL) {
|
if (fUtility.wholeScreen == NULL) {
|
||||||
_NewScreenshot(silent, clipboard);
|
_NewScreenshot(silent, clipboard, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -391,15 +391,18 @@ ScreenshotWindow::Quit()
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ScreenshotWindow::_NewScreenshot(bool silent, bool clipboard)
|
ScreenshotWindow::_NewScreenshot(bool silent, bool clipboard, bool ignoreDelay)
|
||||||
{
|
{
|
||||||
BMessage message(B_ARGV_RECEIVED);
|
BMessage message(B_ARGV_RECEIVED);
|
||||||
int32 argc = 3;
|
int32 argc = 3;
|
||||||
BString delay;
|
|
||||||
delay << fDelay / 1000000;
|
|
||||||
message.AddString("argv", "screenshot");
|
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 || clipboard) {
|
||||||
if (silent) {
|
if (silent) {
|
||||||
|
|||||||
@@ -40,7 +40,8 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
void _NewScreenshot(bool silent = false,
|
void _NewScreenshot(bool silent = false,
|
||||||
bool clipboard = false);
|
bool clipboard = false,
|
||||||
|
bool ignoreDelay = false);
|
||||||
void _UpdatePreviewPanel();
|
void _UpdatePreviewPanel();
|
||||||
void _DisallowChar(BTextView* textView);
|
void _DisallowChar(BTextView* textView);
|
||||||
void _SetupOutputPathMenu(const BMessage& settings);
|
void _SetupOutputPathMenu(const BMessage& settings);
|
||||||
|
|||||||
Reference in New Issue
Block a user