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:
parent
042b214313
commit
c3cd5321d5
@ -16,7 +16,7 @@ BinCommand screen_blanker :
|
|||||||
# needed for some old/broken screen saver add-ons that do not
|
# needed for some old/broken screen saver add-ons that do not
|
||||||
# link against libscreensaver.so
|
# link against libscreensaver.so
|
||||||
|
|
||||||
: be game libscreensaver.so $(TARGET_LIBSUPC++)
|
: be game $(HAIKU_LOCALE_LIBS) libscreensaver.so $(TARGET_LIBSUPC++)
|
||||||
: screen_blanker.rdef
|
: screen_blanker.rdef
|
||||||
;
|
;
|
||||||
|
|
||||||
@ -27,3 +27,9 @@ SEARCH on [ FGristFiles
|
|||||||
Package haiku-screensaverkit-cvs :
|
Package haiku-screensaverkit-cvs :
|
||||||
screen_blanker :
|
screen_blanker :
|
||||||
boot home config bin ;
|
boot home config bin ;
|
||||||
|
|
||||||
|
DoCatalogs screen_blanker :
|
||||||
|
x-vnd.Haiku.screenblanker
|
||||||
|
:
|
||||||
|
PasswordWindow.cpp
|
||||||
|
;
|
||||||
|
@ -14,13 +14,19 @@
|
|||||||
#include <Application.h>
|
#include <Application.h>
|
||||||
#include <Box.h>
|
#include <Box.h>
|
||||||
#include <Button.h>
|
#include <Button.h>
|
||||||
|
#include <Catalog.h>
|
||||||
#include <Screen.h>
|
#include <Screen.h>
|
||||||
|
|
||||||
#include <WindowPrivate.h>
|
#include <WindowPrivate.h>
|
||||||
|
|
||||||
|
|
||||||
|
#undef B_TRANSLATE_CONTEXT
|
||||||
|
#define B_TRANSLATE_CONTEXT "Screensaver password dialog"
|
||||||
|
|
||||||
|
|
||||||
PasswordWindow::PasswordWindow()
|
PasswordWindow::PasswordWindow()
|
||||||
: BWindow(BRect(100, 100, 400, 230), "Enter password",
|
:
|
||||||
|
BWindow(BRect(100, 100, 400, 230), "Enter password",
|
||||||
B_NO_BORDER_WINDOW_LOOK, kPasswordWindowFeel
|
B_NO_BORDER_WINDOW_LOOK, kPasswordWindowFeel
|
||||||
/* TODO: B_MODAL_APP_WINDOW_FEEL should also behave correctly */,
|
/* TODO: B_MODAL_APP_WINDOW_FEEL should also behave correctly */,
|
||||||
B_NOT_MOVABLE | B_NOT_CLOSABLE | B_NOT_ZOOMABLE | B_NOT_MINIMIZABLE
|
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);
|
BBox *customBox = new BBox(bounds, "customBox", B_FOLLOW_NONE);
|
||||||
topView->AddChild(customBox);
|
topView->AddChild(customBox);
|
||||||
customBox->SetLabel("Unlock screen saver");
|
customBox->SetLabel(B_TRANSLATE("Unlock screen saver"));
|
||||||
|
|
||||||
bounds.top += 10.0;
|
bounds.top += 10.0;
|
||||||
fPassword = new BTextControl(bounds, "password", "Enter password:",
|
fPassword = new BTextControl(bounds, "password",
|
||||||
"VeryLongPasswordPossible", B_FOLLOW_NONE);
|
B_TRANSLATE("Enter password:"), "VeryLongPasswordPossible",
|
||||||
|
B_FOLLOW_NONE);
|
||||||
customBox->AddChild(fPassword);
|
customBox->AddChild(fPassword);
|
||||||
fPassword->MakeFocus(true);
|
fPassword->MakeFocus(true);
|
||||||
fPassword->ResizeToPreferred();
|
fPassword->ResizeToPreferred();
|
||||||
fPassword->TextView()->HideTyping(true);
|
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);
|
new BMessage(kMsgUnlock), B_FOLLOW_NONE);
|
||||||
customBox->AddChild(button);
|
customBox->AddChild(button);
|
||||||
button->MakeDefault(true);
|
button->MakeDefault(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user