From 1124e3cf2b888d3c96ed19a764bb1ad375c54f4c Mon Sep 17 00:00:00 2001 From: Jaidyn Ann Date: Sun, 13 Jun 2021 01:25:28 -0500 Subject: [PATCH] Update ConversationView name when notified, resize JoinWindow --- application/views/ConversationView.cpp | 5 +++++ application/windows/JoinWindow.cpp | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/application/views/ConversationView.cpp b/application/views/ConversationView.cpp index 9e2ff4f..29e40b6 100644 --- a/application/views/ConversationView.cpp +++ b/application/views/ConversationView.cpp @@ -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); diff --git a/application/windows/JoinWindow.cpp b/application/windows/JoinWindow.cpp index dab3178..f738e11 100644 --- a/application/windows/JoinWindow.cpp +++ b/application/windows/JoinWindow.cpp @@ -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) @@ -109,7 +109,10 @@ JoinWindow::_CreateAccountMenu() menu->SetRadioMode(true); menu->SetLabelFromMarked(true); menu->ItemAt(fSelectedAcc)->SetMarked(true); - + + if (fAccounts.CountItems() == 0) + menu->SetEnabled(false); + return menu; }