From 7306e9e4d5af80508cd66f5d5f07d5faea2698fb Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Sun, 24 Jun 2012 15:05:58 +0200 Subject: [PATCH] Add an explanatory message to the key request dialog. --- src/servers/keystore/KeyRequestWindow.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/servers/keystore/KeyRequestWindow.cpp b/src/servers/keystore/KeyRequestWindow.cpp index 4ebaf2b14e..d2f5c7e07b 100644 --- a/src/servers/keystore/KeyRequestWindow.cpp +++ b/src/servers/keystore/KeyRequestWindow.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -99,6 +100,21 @@ public: new BMessage(kMessageUnlock)); buttons->GroupLayout()->AddView(fUnlockButton); + BTextView* message = new(std::nothrow) BTextView("message"); + message->SetText("An application wants to access the keyring below, " + "but it is locked with a passphrase. Please enter the passphrase " + "to unlock the keyring.\n" + "If you unlock the keyring, it stays unlocked until the system is " + "shut down or the keyring is manually locked again.\n" + "If you cancel this dialog the keyring will remain locked."); + message->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); + rgb_color textColor = ui_color(B_PANEL_TEXT_COLOR); + message->SetFontAndColor(be_plain_font, B_FONT_ALL, &textColor); + message->MakeEditable(false); + message->MakeSelectable(false); + message->SetWordWrap(true); + + rootLayout->AddView(message); rootLayout->AddView(controls); rootLayout->AddView(buttons); }