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:
@@ -112,6 +112,7 @@ public:
|
|||||||
virtual void AttachedToWindow();
|
virtual void AttachedToWindow();
|
||||||
virtual void SetEnabled(bool enabled);
|
virtual void SetEnabled(bool enabled);
|
||||||
virtual void Draw(BRect updateRect);
|
virtual void Draw(BRect updateRect);
|
||||||
|
virtual void MessageReceived(BMessage* message);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void _UpdateTextViewColors();
|
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
|
void
|
||||||
HeaderTextControl::_UpdateTextViewColors()
|
HeaderTextControl::_UpdateTextViewColors()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user