Ticket #3817: Screenshot-stringsV2.diff

File Screenshot-stringsV2.diff, 8.0 KB (added by humdinger, 15 years ago)

Additionally renames every *Cursor to *Mouse.

  • src/apps/screenshot/ScreenshotWindow.cpp

     
    4949enum {
    5050    kScreenshotType,
    5151    kIncludeBorder,
    52     kShowCursor,
     52    kShowMouse,
    5353    kBackToSave,
    5454    kTakeScreenshot,
    5555    kImageOutputFormat,
     
    7878
    7979
    8080ScreenshotWindow::ScreenshotWindow(bigtime_t delay, bool includeBorder,
    81     bool includeCursor, bool grabActiveWindow, bool showConfigWindow,
     81    bool includeMouse, bool grabActiveWindow, bool showConfigWindow,
    8282    bool saveScreenshotSilent)
    8383    : BWindow(BRect(0, 0, 200.0, 100.0), "Take Screenshot", B_TITLED_WINDOW,
    8484        B_NOT_ZOOMABLE | B_NOT_RESIZABLE | B_QUIT_ON_WINDOW_CLOSE |
     
    8989    fLastSelectedPath(NULL),
    9090    fDelay(delay),
    9191    fIncludeBorder(includeBorder),
    92     fIncludeCursor(includeCursor),
     92    fIncludeMouse(includeMouse),
    9393    fGrabActiveWindow(grabActiveWindow),
    9494    fShowConfigWindow(showConfigWindow)
    9595{
     
    129129                fIncludeBorder = (fWindowBorder->Value() == B_CONTROL_ON);
    130130        }   break;
    131131
    132         case kShowCursor: {
    133             fIncludeCursor = (fShowCursor->Value() == B_CONTROL_ON);
     132        case kShowMouse: {
     133            fIncludeMouse = (fShowMouse->Value() == B_CONTROL_ON);
    134134        }   break;
    135135
    136136        case kBackToSave: {
     
    166166                BMessenger target(this);
    167167                fOutputPathPanel = new BFilePanel(B_OPEN_PANEL, &target,
    168168                    NULL, B_DIRECTORY_NODE, false, NULL, new DirectoryRefFilter());
    169                 fOutputPathPanel->Window()->SetTitle("Choose directory");
     169                fOutputPathPanel->Window()->SetTitle("Choose folder");
    170170                fOutputPathPanel->SetButtonLabel(B_DEFAULT_BUTTON, "Select");
    171171            }
    172172            fOutputPathPanel->Show();
     
    243243
    244244    fActiveWindow = new BRadioButton("Take active window",
    245245         new BMessage(kScreenshotType));
    246     fWholeDesktop = new BRadioButton("Take whole Desktop",
     246    fWholeDesktop = new BRadioButton("Take whole screen",
    247247         new BMessage(kScreenshotType));
    248248    fWholeDesktop->SetValue(B_CONTROL_ON);
    249249
     
    261261        new BMessage(kIncludeBorder));
    262262    fWindowBorder->SetEnabled(false);
    263263
    264     fShowCursor = new BCheckBox("Include cursor in screenshot",
    265         new BMessage(kShowCursor));
    266     fShowCursor->SetValue(fIncludeCursor);
     264    fShowMouse = new BCheckBox("Include mouse pointer in screenshot",
     265        new BMessage(kShowMouse));
     266    fShowMouse->SetValue(fIncludeMouse);
    267267
    268268    BBox* divider = new BBox(B_FANCY_BORDER, NULL);
    269269    divider->SetExplicitMaxSize(BSize(B_SIZE_UNLIMITED, 1));
     
    289289        .AddStrut(10.0)
    290290        .AddGroup(B_HORIZONTAL)
    291291            .AddStrut(15.0)
    292             .Add(fShowCursor)
     292            .Add(fShowMouse)
    293293            .End()
    294294        .AddStrut(5.0)
    295295        .AddGroup(B_HORIZONTAL, 5.0)
     
    428428    BPath path;
    429429    find_directory(B_USER_DIRECTORY, &path);
    430430
    431     BString label("Home directory");
     431    BString label("Home folder");
    432432    _AddItemToPathMenu(path.Path(), label, 0, (path.Path() == lastSelectedPath));
    433433
    434434    path.Append("Desktop");
     
    438438    find_directory(B_BEOS_ETC_DIRECTORY, &path);
    439439    path.Append("artwork");
    440440
    441     label.SetTo("Artwork directory");
     441    label.SetTo("Artwork folder");
    442442    _AddItemToPathMenu(path.Path(), label, 2, (path.Path() == lastSelectedPath));
    443443
    444444    int32 i = 0;
     
    459459    }
    460460
    461461    fOutputPathMenu->AddItem(new BSeparatorItem());
    462     fOutputPathMenu->AddItem(new BMenuItem("Choose directory...",
     462    fOutputPathMenu->AddItem(new BMenuItem("Choose folder...",
    463463        new BMessage(kChooseLocation)));
    464464}
    465465
     
    626626    delete fScreenshot;
    627627    if (_GetActiveWindowFrame(&frame) == B_OK) {
    628628        fScreenshot = new BBitmap(frame.OffsetToCopy(B_ORIGIN), B_RGBA32);
    629         BScreen(this).ReadBitmap(fScreenshot, fIncludeCursor, &frame);
     629        BScreen(this).ReadBitmap(fScreenshot, fIncludeMouse, &frame);
    630630    } else {
    631         BScreen(this).GetBitmap(&fScreenshot, fIncludeCursor);
     631        BScreen(this).GetBitmap(&fScreenshot, fIncludeMouse);
    632632    }
    633633}
    634634
     
    731731
    732732    BPath homePath;
    733733    if (find_directory(B_USER_DIRECTORY, &homePath) != B_OK) {
    734         fprintf(stderr, "failed to find user home directory\n");
     734        fprintf(stderr, "failed to find user home folder\n");
    735735        return;
    736736    }
    737737
  • src/apps/screenshot/ScreenshotWindow.h

     
    2222public:
    2323                            ScreenshotWindow(bigtime_t delay = 0,
    2424                                bool includeBorder = false,
    25                                 bool includeCursor = false,
     25                                bool includeMouse = false,
    2626                                bool grabActiveWindow = false,
    2727                                bool showConfigWindow = false,
    2828                                bool saveScreenshotSilent = false);
     
    6262            BRadioButton*   fWholeDesktop;
    6363            BTextControl*   fDelayControl;
    6464            BCheckBox*      fWindowBorder;
    65             BCheckBox*      fShowCursor;
     65            BCheckBox*      fShowMouse;
    6666            BButton*        fBackToSave;
    6767            BButton*        fTakeScreenshot;
    6868            BTextControl*   fNameControl;
     
    7575            bigtime_t       fDelay;
    7676
    7777            bool            fIncludeBorder;
    78             bool            fIncludeCursor;
     78            bool            fIncludeMouse;
    7979            bool            fGrabActiveWindow;
    8080            bool            fShowConfigWindow;
    8181
  • src/apps/screenshot/Screenshot.cpp

     
    4545    bool includeBorder = false;
    4646    message->FindBool("border", &includeBorder);
    4747
    48     bool includeCursor = false;
    49     message->FindBool("border", &includeCursor);
     48    bool includeMouse = false;
     49    message->FindBool("border", &includeMouse);
    5050
    5151    bool grabActiveWindow = false;
    5252    message->FindBool("window", &grabActiveWindow);
     
    5757    bool showConfigureWindow = false;
    5858    message->FindBool("configure", &showConfigureWindow);
    5959
    60     new ScreenshotWindow(delay * 1000000, includeBorder, includeCursor,
     60    new ScreenshotWindow(delay * 1000000, includeBorder, includeMouse,
    6161        grabActiveWindow, showConfigureWindow, saveScreenshotSilent);
    6262
    6363    fRefsReceived = true;
     
    7070    bigtime_t delay = 0;
    7171
    7272    bool includeBorder = false;
    73     bool includeCursor = false;
     73    bool includeMouse = false;
    7474    bool grabActiveWindow = false;
    7575    bool showConfigureWindow = false;
    7676    bool saveScreenshotSilent = false;
     
    8080            _ShowHelp();
    8181        else if (strcmp(argv[i], "-b") == 0 || strcmp(argv[i], "--border") == 0)
    8282            includeBorder = true;
    83         else if (strcmp(argv[i], "-c") == 0 || strcmp(argv[i], "--cursor") == 0)
    84             includeCursor = true;
     83        else if (strcmp(argv[i], "-m") == 0 || strcmp(argv[i], "--mouse") == 0)
     84            includeMouse = true;
    8585        else if (strcmp(argv[i], "-w") == 0 || strcmp(argv[i], "--window") == 0)
    8686            grabActiveWindow = true;
    8787        else if (strcmp(argv[i], "-s") == 0 || strcmp(argv[i], "--silent") == 0)
     
    9999        }
    100100    }
    101101    fArgvReceived = true;
    102     new ScreenshotWindow(delay, includeBorder, includeCursor, grabActiveWindow,
     102    new ScreenshotWindow(delay, includeBorder, includeMouse, grabActiveWindow,
    103103        showConfigureWindow, saveScreenshotSilent);
    104104}
    105105
     
    107107void
    108108Screenshot::_ShowHelp() const
    109109{
    110     printf("Screenshot [OPTION]... Creates a Bitmap of the current screen\n\n");
     110    printf("Screenshot [OPTION]... Creates a bitmap of the current screen\n\n");
    111111    printf("OPTION\n");
    112112    printf("  -o, --options         Show options window first\n");
    113     printf("  -c, --cursor          Have the cursor inside the screenshot\n");
     113    printf("  -m, --mouse           Have the mouse pointer in the screenshot\n");
    114114    printf("  -b, --border          Include the window border with the screenshot\n");
    115115    printf("  -w, --window          Use active window instead of the entire screen\n");
    116116    printf("  -d, --delay=seconds   Take screenshot after specified delay [in seconds]\n");
    117     printf("  -s, --silent          Saves the screenshot without the application window\n");
    118     printf("                        overwrites --options, saves to home directory as png\n");
     117    printf("  -s, --silent          Saves the screenshot without showing the app window\n");
     118    printf("                        overrides --options, saves to home folder as png\n");
    119119    printf("\n");
    120120    printf("Note: OPTION -b, --border takes only effect when used with -w, --window\n");
    121121