* Changed a few strings in Screenshot's interface and related function names.

Closes ticket #3817.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30392 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Joachim Seemer 2009-04-25 06:05:36 +00:00
parent 852e061a74
commit aeaeba65e9
3 changed files with 31 additions and 31 deletions

View File

@ -45,8 +45,8 @@ Screenshot::RefsReceived(BMessage* message)
bool includeBorder = false; bool includeBorder = false;
message->FindBool("border", &includeBorder); message->FindBool("border", &includeBorder);
bool includeCursor = false; bool includeMouse = false;
message->FindBool("border", &includeCursor); message->FindBool("border", &includeMouse);
bool grabActiveWindow = false; bool grabActiveWindow = false;
message->FindBool("window", &grabActiveWindow); message->FindBool("window", &grabActiveWindow);
@ -57,7 +57,7 @@ Screenshot::RefsReceived(BMessage* message)
bool showConfigureWindow = false; bool showConfigureWindow = false;
message->FindBool("configure", &showConfigureWindow); message->FindBool("configure", &showConfigureWindow);
new ScreenshotWindow(delay * 1000000, includeBorder, includeCursor, new ScreenshotWindow(delay * 1000000, includeBorder, includeMouse,
grabActiveWindow, showConfigureWindow, saveScreenshotSilent); grabActiveWindow, showConfigureWindow, saveScreenshotSilent);
fRefsReceived = true; fRefsReceived = true;
@ -70,7 +70,7 @@ Screenshot::ArgvReceived(int32 argc, char** argv)
bigtime_t delay = 0; bigtime_t delay = 0;
bool includeBorder = false; bool includeBorder = false;
bool includeCursor = false; bool includeMouse = false;
bool grabActiveWindow = false; bool grabActiveWindow = false;
bool showConfigureWindow = false; bool showConfigureWindow = false;
bool saveScreenshotSilent = false; bool saveScreenshotSilent = false;
@ -80,8 +80,8 @@ Screenshot::ArgvReceived(int32 argc, char** argv)
_ShowHelp(); _ShowHelp();
else if (strcmp(argv[i], "-b") == 0 || strcmp(argv[i], "--border") == 0) else if (strcmp(argv[i], "-b") == 0 || strcmp(argv[i], "--border") == 0)
includeBorder = true; includeBorder = true;
else if (strcmp(argv[i], "-c") == 0 || strcmp(argv[i], "--cursor") == 0) else if (strcmp(argv[i], "-m") == 0 || strcmp(argv[i], "--mouse") == 0)
includeCursor = true; includeMouse = true;
else if (strcmp(argv[i], "-w") == 0 || strcmp(argv[i], "--window") == 0) else if (strcmp(argv[i], "-w") == 0 || strcmp(argv[i], "--window") == 0)
grabActiveWindow = true; grabActiveWindow = true;
else if (strcmp(argv[i], "-s") == 0 || strcmp(argv[i], "--silent") == 0) else if (strcmp(argv[i], "-s") == 0 || strcmp(argv[i], "--silent") == 0)
@ -99,7 +99,7 @@ Screenshot::ArgvReceived(int32 argc, char** argv)
} }
} }
fArgvReceived = true; fArgvReceived = true;
new ScreenshotWindow(delay, includeBorder, includeCursor, grabActiveWindow, new ScreenshotWindow(delay, includeBorder, includeMouse, grabActiveWindow,
showConfigureWindow, saveScreenshotSilent); showConfigureWindow, saveScreenshotSilent);
} }
@ -107,15 +107,15 @@ Screenshot::ArgvReceived(int32 argc, char** argv)
void void
Screenshot::_ShowHelp() const Screenshot::_ShowHelp() const
{ {
printf("Screenshot [OPTION]... Creates a Bitmap of the current screen\n\n"); printf("Screenshot [OPTION]... Creates a bitmap of the current screen\n\n");
printf("OPTION\n"); printf("OPTION\n");
printf(" -o, --options Show options window first\n"); printf(" -o, --options Show options window first\n");
printf(" -c, --cursor Have the cursor inside the screenshot\n"); printf(" -m, --mouse Have the mouse pointer in the screenshot\n");
printf(" -b, --border Include the window border with the screenshot\n"); printf(" -b, --border Include the window border with the screenshot\n");
printf(" -w, --window Use active window instead of the entire screen\n"); printf(" -w, --window Use active window instead of the entire screen\n");
printf(" -d, --delay=seconds Take screenshot after specified delay [in seconds]\n"); printf(" -d, --delay=seconds Take screenshot after specified delay [in seconds]\n");
printf(" -s, --silent Saves the screenshot without the application window\n"); printf(" -s, --silent Saves the screenshot without showing the app window\n");
printf(" overwrites --options, saves to home directory as png\n"); printf(" overrides --options, saves to home folder as png\n");
printf("\n"); printf("\n");
printf("Note: OPTION -b, --border takes only effect when used with -w, --window\n"); printf("Note: OPTION -b, --border takes only effect when used with -w, --window\n");

View File

@ -50,7 +50,7 @@
enum { enum {
kScreenshotType, kScreenshotType,
kIncludeBorder, kIncludeBorder,
kShowCursor, kShowMouse,
kBackToSave, kBackToSave,
kTakeScreenshot, kTakeScreenshot,
kImageOutputFormat, kImageOutputFormat,
@ -79,7 +79,7 @@ public:
ScreenshotWindow::ScreenshotWindow(bigtime_t delay, bool includeBorder, ScreenshotWindow::ScreenshotWindow(bigtime_t delay, bool includeBorder,
bool includeCursor, bool grabActiveWindow, bool showConfigWindow, bool includeMouse, bool grabActiveWindow, bool showConfigWindow,
bool saveScreenshotSilent) bool saveScreenshotSilent)
: BWindow(BRect(0, 0, 200.0, 100.0), "Take Screenshot", B_TITLED_WINDOW, : BWindow(BRect(0, 0, 200.0, 100.0), "Take Screenshot", B_TITLED_WINDOW,
B_NOT_ZOOMABLE | B_NOT_RESIZABLE | B_QUIT_ON_WINDOW_CLOSE | B_NOT_ZOOMABLE | B_NOT_RESIZABLE | B_QUIT_ON_WINDOW_CLOSE |
@ -90,7 +90,7 @@ ScreenshotWindow::ScreenshotWindow(bigtime_t delay, bool includeBorder,
fLastSelectedPath(NULL), fLastSelectedPath(NULL),
fDelay(delay), fDelay(delay),
fIncludeBorder(includeBorder), fIncludeBorder(includeBorder),
fIncludeCursor(includeCursor), fIncludeMouse(includeMouse),
fGrabActiveWindow(grabActiveWindow), fGrabActiveWindow(grabActiveWindow),
fShowConfigWindow(showConfigWindow) fShowConfigWindow(showConfigWindow)
{ {
@ -130,8 +130,8 @@ ScreenshotWindow::MessageReceived(BMessage* message)
fIncludeBorder = (fWindowBorder->Value() == B_CONTROL_ON); fIncludeBorder = (fWindowBorder->Value() == B_CONTROL_ON);
} break; } break;
case kShowCursor: { case kShowMouse: {
fIncludeCursor = (fShowCursor->Value() == B_CONTROL_ON); fIncludeMouse = (fShowMouse->Value() == B_CONTROL_ON);
} break; } break;
case kBackToSave: { case kBackToSave: {
@ -167,7 +167,7 @@ ScreenshotWindow::MessageReceived(BMessage* message)
BMessenger target(this); BMessenger target(this);
fOutputPathPanel = new BFilePanel(B_OPEN_PANEL, &target, fOutputPathPanel = new BFilePanel(B_OPEN_PANEL, &target,
NULL, B_DIRECTORY_NODE, false, NULL, new DirectoryRefFilter()); NULL, B_DIRECTORY_NODE, false, NULL, new DirectoryRefFilter());
fOutputPathPanel->Window()->SetTitle("Choose directory"); fOutputPathPanel->Window()->SetTitle("Choose folder");
fOutputPathPanel->SetButtonLabel(B_DEFAULT_BUTTON, "Select"); fOutputPathPanel->SetButtonLabel(B_DEFAULT_BUTTON, "Select");
} }
fOutputPathPanel->Show(); fOutputPathPanel->Show();
@ -245,7 +245,7 @@ ScreenshotWindow::_SetupFirstLayoutItem(BCardLayout* layout)
fActiveWindow = new BRadioButton("Take active window", fActiveWindow = new BRadioButton("Take active window",
new BMessage(kScreenshotType)); new BMessage(kScreenshotType));
fWholeDesktop = new BRadioButton("Take whole Desktop", fWholeDesktop = new BRadioButton("Take whole screen",
new BMessage(kScreenshotType)); new BMessage(kScreenshotType));
fWholeDesktop->SetValue(B_CONTROL_ON); fWholeDesktop->SetValue(B_CONTROL_ON);
@ -263,9 +263,9 @@ ScreenshotWindow::_SetupFirstLayoutItem(BCardLayout* layout)
new BMessage(kIncludeBorder)); new BMessage(kIncludeBorder));
fWindowBorder->SetEnabled(false); fWindowBorder->SetEnabled(false);
fShowCursor = new BCheckBox("Include cursor in screenshot", fShowMouse = new BCheckBox("Include mouse pointer in screenshot",
new BMessage(kShowCursor)); new BMessage(kShowMouse));
fShowCursor->SetValue(fIncludeCursor); fShowMouse->SetValue(fIncludeMouse);
BBox* divider = new BBox(B_FANCY_BORDER, NULL); BBox* divider = new BBox(B_FANCY_BORDER, NULL);
divider->SetExplicitMaxSize(BSize(B_SIZE_UNLIMITED, 1)); divider->SetExplicitMaxSize(BSize(B_SIZE_UNLIMITED, 1));
@ -291,7 +291,7 @@ ScreenshotWindow::_SetupFirstLayoutItem(BCardLayout* layout)
.AddStrut(10.0) .AddStrut(10.0)
.AddGroup(B_HORIZONTAL) .AddGroup(B_HORIZONTAL)
.AddStrut(15.0) .AddStrut(15.0)
.Add(fShowCursor) .Add(fShowMouse)
.End() .End()
.AddStrut(5.0) .AddStrut(5.0)
.AddGroup(B_HORIZONTAL, 5.0) .AddGroup(B_HORIZONTAL, 5.0)
@ -430,7 +430,7 @@ ScreenshotWindow::_SetupOutputPathMenu(BMenu* outputPathMenu,
BPath path; BPath path;
find_directory(B_USER_DIRECTORY, &path); find_directory(B_USER_DIRECTORY, &path);
BString label("Home directory"); BString label("Home folder");
_AddItemToPathMenu(path.Path(), label, 0, (path.Path() == lastSelectedPath)); _AddItemToPathMenu(path.Path(), label, 0, (path.Path() == lastSelectedPath));
path.Append("Desktop"); path.Append("Desktop");
@ -440,7 +440,7 @@ ScreenshotWindow::_SetupOutputPathMenu(BMenu* outputPathMenu,
find_directory(B_BEOS_ETC_DIRECTORY, &path); find_directory(B_BEOS_ETC_DIRECTORY, &path);
path.Append("artwork"); path.Append("artwork");
label.SetTo("Artwork directory"); label.SetTo("Artwork folder");
_AddItemToPathMenu(path.Path(), label, 2, (path.Path() == lastSelectedPath)); _AddItemToPathMenu(path.Path(), label, 2, (path.Path() == lastSelectedPath));
int32 i = 0; int32 i = 0;
@ -461,7 +461,7 @@ ScreenshotWindow::_SetupOutputPathMenu(BMenu* outputPathMenu,
} }
fOutputPathMenu->AddItem(new BSeparatorItem()); fOutputPathMenu->AddItem(new BSeparatorItem());
fOutputPathMenu->AddItem(new BMenuItem("Choose directory...", fOutputPathMenu->AddItem(new BMenuItem("Choose folder...",
new BMessage(kChooseLocation))); new BMessage(kChooseLocation)));
} }
@ -628,9 +628,9 @@ ScreenshotWindow::_TakeScreenshot()
delete fScreenshot; delete fScreenshot;
if (_GetActiveWindowFrame(&frame) == B_OK) { if (_GetActiveWindowFrame(&frame) == B_OK) {
fScreenshot = new BBitmap(frame.OffsetToCopy(B_ORIGIN), B_RGBA32); fScreenshot = new BBitmap(frame.OffsetToCopy(B_ORIGIN), B_RGBA32);
BScreen(this).ReadBitmap(fScreenshot, fIncludeCursor, &frame); BScreen(this).ReadBitmap(fScreenshot, fIncludeMouse, &frame);
} else { } else {
BScreen(this).GetBitmap(&fScreenshot, fIncludeCursor); BScreen(this).GetBitmap(&fScreenshot, fIncludeMouse);
} }
} }
@ -752,7 +752,7 @@ ScreenshotWindow::_SaveScreenshotSilent() const
BPath homePath; BPath homePath;
if (find_directory(B_USER_DIRECTORY, &homePath) != B_OK) { if (find_directory(B_USER_DIRECTORY, &homePath) != B_OK) {
fprintf(stderr, "failed to find user home directory\n"); fprintf(stderr, "failed to find user home folder\n");
return; return;
} }

View File

@ -22,7 +22,7 @@ class ScreenshotWindow : public BWindow {
public: public:
ScreenshotWindow(bigtime_t delay = 0, ScreenshotWindow(bigtime_t delay = 0,
bool includeBorder = false, bool includeBorder = false,
bool includeCursor = false, bool includeMouse = false,
bool grabActiveWindow = false, bool grabActiveWindow = false,
bool showConfigWindow = false, bool showConfigWindow = false,
bool saveScreenshotSilent = false); bool saveScreenshotSilent = false);
@ -62,7 +62,7 @@ private:
BRadioButton* fWholeDesktop; BRadioButton* fWholeDesktop;
BTextControl* fDelayControl; BTextControl* fDelayControl;
BCheckBox* fWindowBorder; BCheckBox* fWindowBorder;
BCheckBox* fShowCursor; BCheckBox* fShowMouse;
BButton* fBackToSave; BButton* fBackToSave;
BButton* fTakeScreenshot; BButton* fTakeScreenshot;
BTextControl* fNameControl; BTextControl* fNameControl;
@ -75,7 +75,7 @@ private:
bigtime_t fDelay; bigtime_t fDelay;
bool fIncludeBorder; bool fIncludeBorder;
bool fIncludeCursor; bool fIncludeMouse;
bool fGrabActiveWindow; bool fGrabActiveWindow;
bool fShowConfigWindow; bool fShowConfigWindow;