Fixed the R5 StyledEdit build -- removed B_BAD_DATA as it was defined in Errors.h, unbeknownst to me
Added Alt+W shortcuts to the Find and Replace windows in StyledEdit Fixed the Escape key shortcut hack git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18445 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
a68dd7c24a
commit
eef409055a
@ -54,7 +54,6 @@ extern float roundf(float value);
|
||||
#endif // HAIKU_TARGET_PLATFORM_HAIKU
|
||||
|
||||
#ifdef HAIKU_TARGET_PLATFORM_BEOS
|
||||
# define B_BAD_DATA (B_NOT_ALLOWED+1)
|
||||
# define B_REDO 'REDO'
|
||||
#endif
|
||||
|
||||
|
@ -23,6 +23,8 @@ FindWindow::FindWindow(BRect frame, BHandler *_handler, BString *searchString,
|
||||
B_NOT_RESIZABLE | B_ASYNCHRONOUS_CONTROLS,
|
||||
B_CURRENT_WORKSPACE)
|
||||
{
|
||||
AddShortcut('W',B_COMMAND_KEY,new BMessage(B_QUIT_REQUESTED));
|
||||
|
||||
fFindView = new BView(Bounds(), "FindView", B_FOLLOW_ALL, B_WILL_DRAW);
|
||||
fFindView->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
||||
AddChild(fFindView);
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include "Constants.h"
|
||||
#include "ReplaceWindow.h"
|
||||
|
||||
#include <Messenger.h>
|
||||
#include <Button.h>
|
||||
#include <CheckBox.h>
|
||||
#include <String.h>
|
||||
@ -24,6 +25,8 @@ ReplaceWindow::ReplaceWindow(BRect frame, BHandler *_handler, BString *searchStr
|
||||
B_NOT_RESIZABLE | B_ASYNCHRONOUS_CONTROLS,
|
||||
B_CURRENT_WORKSPACE)
|
||||
{
|
||||
AddShortcut('W',B_COMMAND_KEY,new BMessage(B_QUIT_REQUESTED));
|
||||
|
||||
fReplaceView = new BView(Bounds(), "ReplaceView", B_FOLLOW_ALL, B_WILL_DRAW);
|
||||
fReplaceView->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
||||
AddChild(fReplaceView);
|
||||
@ -133,6 +136,11 @@ ReplaceWindow::DispatchMessage(BMessage *message, BHandler *handler)
|
||||
if (key == B_ESCAPE) {
|
||||
message->MakeEmpty();
|
||||
message->what = B_QUIT_REQUESTED;
|
||||
|
||||
// This is a hack, but it actually does what is expected,
|
||||
// unlike the hack above. This kind of key filtering probably
|
||||
// ought to be handled by a BMessageFilter, though.
|
||||
BMessenger (this).SendMessage(B_QUIT_REQUESTED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user