Update ConversationView name when notified, resize JoinWindow

This commit is contained in:
Jaidyn Ann 2021-06-13 01:25:28 -05:00
parent 7c9d1d9eaa
commit 1124e3cf2b
2 changed files with 10 additions and 2 deletions

View File

@ -230,6 +230,11 @@ ConversationView::ObserveString(int32 what, BString str)
{
switch (what)
{
case STR_ROOM_NAME:
{
fNameTextView->SetText(str);
break;
}
case STR_ROOM_SUBJECT:
{
fSubjectTextView->SetText(str);

View File

@ -20,7 +20,7 @@ const uint32 kAccSelected = 'JWas';
JoinWindow::JoinWindow(BMessenger* messenger, AccountInstances accounts)
:
BWindow(BRect(0, 0, 300, 100), "Join a room", B_FLOATING_WINDOW, 0),
BWindow(BRect(0, 0, 400, 100), "Join a room", B_FLOATING_WINDOW, 0),
fTarget(messenger),
fAccounts(accounts),
fSelectedAcc(0)
@ -110,6 +110,9 @@ JoinWindow::_CreateAccountMenu()
menu->SetLabelFromMarked(true);
menu->ItemAt(fSelectedAcc)->SetMarked(true);
if (fAccounts.CountItems() == 0)
menu->SetEnabled(false);
return menu;
}