Mail: Implement select all hook for subject
This allows the Cmd+A key shortcut to select all text on the subject control. You could already Select All from the View menu but this is more convinient. Fixes #12361
This commit is contained in:
parent
b32f138231
commit
d4e348b08e
@ -112,6 +112,7 @@ public:
|
||||
virtual void AttachedToWindow();
|
||||
virtual void SetEnabled(bool enabled);
|
||||
virtual void Draw(BRect updateRect);
|
||||
virtual void MessageReceived(BMessage* message);
|
||||
|
||||
private:
|
||||
void _UpdateTextViewColors();
|
||||
@ -223,6 +224,25 @@ HeaderTextControl::Draw(BRect updateRect)
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
HeaderTextControl::MessageReceived(BMessage* message)
|
||||
{
|
||||
switch (message->what) {
|
||||
case M_SELECT:
|
||||
{
|
||||
BTextView* textView = TextView();
|
||||
if (textView != NULL)
|
||||
textView->SelectAll();
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
BTextControl::MessageReceived(message);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
HeaderTextControl::_UpdateTextViewColors()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user