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) switch (what)
{ {
case STR_ROOM_NAME:
{
fNameTextView->SetText(str);
break;
}
case STR_ROOM_SUBJECT: case STR_ROOM_SUBJECT:
{ {
fSubjectTextView->SetText(str); fSubjectTextView->SetText(str);

View File

@ -20,7 +20,7 @@ const uint32 kAccSelected = 'JWas';
JoinWindow::JoinWindow(BMessenger* messenger, AccountInstances accounts) 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), fTarget(messenger),
fAccounts(accounts), fAccounts(accounts),
fSelectedAcc(0) fSelectedAcc(0)
@ -109,7 +109,10 @@ JoinWindow::_CreateAccountMenu()
menu->SetRadioMode(true); menu->SetRadioMode(true);
menu->SetLabelFromMarked(true); menu->SetLabelFromMarked(true);
menu->ItemAt(fSelectedAcc)->SetMarked(true); menu->ItemAt(fSelectedAcc)->SetMarked(true);
if (fAccounts.CountItems() == 0)
menu->SetEnabled(false);
return menu; return menu;
} }