Ticket #5862: Screenshot-delay-wim.patch

File Screenshot-delay-wim.patch, 1.2 KB (added by Wim, 15 years ago)

This patch makes sure that the the command line "--delay" switch is not ignored.

  • src/apps/screenshot/ScreenshotWindow.cpp

     
    127127    settings.FindInt64("delay", &fDelay);
    128128    settings.FindString("outputFilename", &fOutputFilename);
    129129
     130    _TakeScreenshot(0);
    130131    _InitWindow(settings);
    131132    CenterOnScreen();
    132133    Show();
     
    144145    fScreenshot(NULL),
    145146    fOutputPathPanel(NULL),
    146147    fLastSelectedPath(NULL),
    147     fDelay(delay),
     148    fDelay(0),
    148149    fTabHeight(0),
    149150    fIncludeBorder(includeBorder),
    150151    fIncludeMouse(includeMouse),
     
    156157    fImageFileType(imageFileType)
    157158{
    158159    if (fSaveScreenshotSilent) {
    159         _TakeScreenshot(fDelay);
     160        _TakeScreenshot(delay);
    160161        _SaveScreenshot();
    161162        be_app_messenger.SendMessage(B_QUIT_REQUESTED);
    162163    } else {
     164        if (!fShowConfigWindow)
     165            _TakeScreenshot(delay);
     166       
    163167        BMessage settings = _ReadSettings();
    164168        _InitWindow(settings);
    165169        CenterOnScreen();
     
    332336    _SetupSecondLayoutItem(layout, settings);
    333337
    334338    if (!fShowConfigWindow) {
    335         _TakeScreenshot(0);
    336339        _UpdatePreviewPanel();
    337340        layout->SetVisibleItem(1L);
    338341        fSaveScreenshot->MakeDefault(true);