Align Status in chat window
Clean the status when a message is received
This commit is contained in:
parent
3a8af7c9f9
commit
17fdd9b0ca
|
@ -51,6 +51,7 @@ ChatWindow::ChatWindow(ContactLinker* cl)
|
||||||
fSendView->MakeFocus(true);
|
fSendView->MakeFocus(true);
|
||||||
|
|
||||||
fStatus = new BStringView("status", "");
|
fStatus = new BStringView("status", "");
|
||||||
|
fStatus->SetExplicitAlignment(BAlignment(B_ALIGN_LEFT, B_ALIGN_MIDDLE));
|
||||||
|
|
||||||
SetLayout(new BGroupLayout(B_HORIZONTAL));
|
SetLayout(new BGroupLayout(B_HORIZONTAL));
|
||||||
|
|
||||||
|
@ -117,6 +118,8 @@ ChatWindow::ImMessage(BMessage* msg)
|
||||||
{
|
{
|
||||||
BString message = msg->FindString("body");
|
BString message = msg->FindString("body");
|
||||||
fReceiveView->AppendOtherMessage(message.String());
|
fReceiveView->AppendOtherMessage(message.String());
|
||||||
|
// Message received, clear status anyway
|
||||||
|
fStatus->SetText(" ");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case IM_CONTACT_STARTED_TYPING:
|
case IM_CONTACT_STARTED_TYPING:
|
||||||
|
@ -124,7 +127,7 @@ ChatWindow::ImMessage(BMessage* msg)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IM_CONTACT_STOPPED_TYPING:
|
case IM_CONTACT_STOPPED_TYPING:
|
||||||
fStatus->SetText("");
|
fStatus->SetText(" ");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
Ŝarĝante…
Reference in New Issue