keystore_server: Use B_CLOSE_ON_ESCAPE in request dialogs.
Instead of doing it manually.
This commit is contained in:
parent
b92e2c086f
commit
515e648d7b
@ -144,7 +144,8 @@ AppAccessRequestWindow::AppAccessRequestWindow(const char* keyringName,
|
||||
:
|
||||
BWindow(BRect(50, 50, 100, 100), B_TRANSLATE("Application keyring access"),
|
||||
B_TITLED_WINDOW, B_NOT_RESIZABLE | B_ASYNCHRONOUS_CONTROLS
|
||||
| B_NOT_ZOOMABLE | B_NOT_MINIMIZABLE | B_AUTO_UPDATE_SIZE_LIMITS),
|
||||
| B_NOT_ZOOMABLE | B_NOT_MINIMIZABLE | B_AUTO_UPDATE_SIZE_LIMITS
|
||||
| B_CLOSE_ON_ESCAPE),
|
||||
fRequestView(NULL),
|
||||
fDoneSem(-1),
|
||||
fResult(kMessageDisallow)
|
||||
@ -175,20 +176,6 @@ AppAccessRequestWindow::~AppAccessRequestWindow()
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
AppAccessRequestWindow::DispatchMessage(BMessage* message, BHandler* handler)
|
||||
{
|
||||
int8 key;
|
||||
if (message->what == B_KEY_DOWN
|
||||
&& message->FindInt8("byte", 0, &key) == B_OK
|
||||
&& key == B_ESCAPE) {
|
||||
PostMessage(kMessageDisallow);
|
||||
}
|
||||
|
||||
BWindow::DispatchMessage(message, handler);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
AppAccessRequestWindow::MessageReceived(BMessage* message)
|
||||
{
|
||||
|
@ -23,8 +23,6 @@ public:
|
||||
bool appWasUpdated);
|
||||
virtual ~AppAccessRequestWindow();
|
||||
|
||||
virtual void DispatchMessage(BMessage* message,
|
||||
BHandler* handler);
|
||||
virtual void MessageReceived(BMessage* message);
|
||||
|
||||
status_t RequestAppAccess(bool& allowAlways);
|
||||
|
@ -154,7 +154,8 @@ KeyRequestWindow::KeyRequestWindow()
|
||||
:
|
||||
BWindow(BRect(50, 50, 100, 100), B_TRANSLATE("Unlock keyring"),
|
||||
B_TITLED_WINDOW, B_NOT_RESIZABLE | B_ASYNCHRONOUS_CONTROLS
|
||||
| B_NOT_ZOOMABLE | B_NOT_MINIMIZABLE | B_AUTO_UPDATE_SIZE_LIMITS),
|
||||
| B_NOT_ZOOMABLE | B_NOT_MINIMIZABLE | B_AUTO_UPDATE_SIZE_LIMITS
|
||||
| B_CLOSE_ON_ESCAPE),
|
||||
fRequestView(NULL),
|
||||
fDoneSem(-1),
|
||||
fResult(B_ERROR)
|
||||
@ -184,20 +185,6 @@ KeyRequestWindow::~KeyRequestWindow()
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
KeyRequestWindow::DispatchMessage(BMessage* message, BHandler* handler)
|
||||
{
|
||||
int8 key;
|
||||
if (message->what == B_KEY_DOWN
|
||||
&& message->FindInt8("byte", 0, &key) == B_OK
|
||||
&& key == B_ESCAPE) {
|
||||
PostMessage(kMessageCancel);
|
||||
}
|
||||
|
||||
BWindow::DispatchMessage(message, handler);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
KeyRequestWindow::MessageReceived(BMessage* message)
|
||||
{
|
||||
|
@ -18,8 +18,6 @@ public:
|
||||
KeyRequestWindow();
|
||||
virtual ~KeyRequestWindow();
|
||||
|
||||
virtual void DispatchMessage(BMessage* message,
|
||||
BHandler* handler);
|
||||
virtual void MessageReceived(BMessage* message);
|
||||
|
||||
status_t RequestKey(const BString& keyringName,
|
||||
|
Loading…
Reference in New Issue
Block a user