Localization of Screensaver unlock window. Ticket #7232

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41023 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jonas Sundström 2011-03-18 22:45:59 +00:00
parent 042b214313
commit c3cd5321d5
2 changed files with 21 additions and 7 deletions

View File

@ -16,7 +16,7 @@ BinCommand screen_blanker :
# needed for some old/broken screen saver add-ons that do not
# link against libscreensaver.so
: be game libscreensaver.so $(TARGET_LIBSUPC++)
: be game $(HAIKU_LOCALE_LIBS) libscreensaver.so $(TARGET_LIBSUPC++)
: screen_blanker.rdef
;
@ -27,3 +27,9 @@ SEARCH on [ FGristFiles
Package haiku-screensaverkit-cvs :
screen_blanker :
boot home config bin ;
DoCatalogs screen_blanker :
x-vnd.Haiku.screenblanker
:
PasswordWindow.cpp
;

View File

@ -14,13 +14,19 @@
#include <Application.h>
#include <Box.h>
#include <Button.h>
#include <Catalog.h>
#include <Screen.h>
#include <WindowPrivate.h>
#undef B_TRANSLATE_CONTEXT
#define B_TRANSLATE_CONTEXT "Screensaver password dialog"
PasswordWindow::PasswordWindow()
: BWindow(BRect(100, 100, 400, 230), "Enter password",
:
BWindow(BRect(100, 100, 400, 230), "Enter password",
B_NO_BORDER_WINDOW_LOOK, kPasswordWindowFeel
/* TODO: B_MODAL_APP_WINDOW_FEEL should also behave correctly */,
B_NOT_MOVABLE | B_NOT_CLOSABLE | B_NOT_ZOOMABLE | B_NOT_MINIMIZABLE
@ -35,18 +41,20 @@ PasswordWindow::PasswordWindow()
BBox *customBox = new BBox(bounds, "customBox", B_FOLLOW_NONE);
topView->AddChild(customBox);
customBox->SetLabel("Unlock screen saver");
customBox->SetLabel(B_TRANSLATE("Unlock screen saver"));
bounds.top += 10.0;
fPassword = new BTextControl(bounds, "password", "Enter password:",
"VeryLongPasswordPossible", B_FOLLOW_NONE);
fPassword = new BTextControl(bounds, "password",
B_TRANSLATE("Enter password:"), "VeryLongPasswordPossible",
B_FOLLOW_NONE);
customBox->AddChild(fPassword);
fPassword->MakeFocus(true);
fPassword->ResizeToPreferred();
fPassword->TextView()->HideTyping(true);
fPassword->SetDivider(be_plain_font->StringWidth("Enter password:") + 5.0);
fPassword->SetDivider(be_plain_font->StringWidth(
B_TRANSLATE_NOCOLLECT("Enter password:")) + 5.0);
BButton* button = new BButton(BRect(), "unlock", "Unlock",
BButton* button = new BButton(BRect(), "unlock", B_TRANSLATE("Unlock"),
new BMessage(kMsgUnlock), B_FOLLOW_NONE);
customBox->AddChild(button);
button->MakeDefault(true);