diff --git a/application/views/AccountsMenu.cpp b/application/views/AccountsMenu.cpp index 9d90bda..387f2d8 100644 --- a/application/views/AccountsMenu.cpp +++ b/application/views/AccountsMenu.cpp @@ -54,9 +54,14 @@ AccountsMenu::_PopulateMenu() Server* server = ((TheApp*)be_app)->GetMainWindow()->GetServer(); AccountInstances accounts = server->GetActiveAccounts(); - for (int i = 0; i < accounts.CountItems(); i++) - AddItem(new BMenuItem(accounts.KeyAt(i).String(), - new BMessage(fAccountMessage))); + for (int i = 0; i < accounts.CountItems(); i++) { + BString label = accounts.KeyAt(i).String(); + if (label.CountChars() > 15) { + label.RemoveChars(16, label.CountChars() - 16); + label << B_UTF8_ELLIPSIS; + } + AddItem(new BMenuItem(label.String(), new BMessage(fAccountMessage))); + } if (CountItems() > 0) ItemAt(0)->SetMarked(true); diff --git a/application/windows/RosterEditWindow.cpp b/application/windows/RosterEditWindow.cpp index edc8723..fccd862 100644 --- a/application/windows/RosterEditWindow.cpp +++ b/application/windows/RosterEditWindow.cpp @@ -46,7 +46,8 @@ RosterEditWindow* RosterEditWindow::fInstance = NULL; RosterEditWindow::RosterEditWindow(Server* server) : - BWindow(BRect(0, 0, 300, 400), B_TRANSLATE("Roster"), B_FLOATING_WINDOW, 0), + BWindow(BRect(0, 0, 300, 400), B_TRANSLATE("Roster"), B_FLOATING_WINDOW, + B_AUTO_UPDATE_SIZE_LIMITS), fServer(server), fEditingWindow(NULL) { @@ -61,6 +62,7 @@ RosterEditWindow::RosterEditWindow(Server* server) fRosterView->GetFontHeight(&fontHeight); int16 buttonHeight = int16(fontHeight.ascent + fontHeight.descent + 12); BSize charButtonSize(buttonHeight, buttonHeight); + BButton* fAddButton = new BButton("+", new BMessage(kAddMember)); BButton* fRemoveButton = new BButton("-", new BMessage(kRemoveMember)); fAddButton->SetExplicitSize(charButtonSize); diff --git a/application/windows/RosterWindow.cpp b/application/windows/RosterWindow.cpp index 71152ab..9b40a81 100644 --- a/application/windows/RosterWindow.cpp +++ b/application/windows/RosterWindow.cpp @@ -35,7 +35,8 @@ const uint32 kSelNoAccount = 'RWNA'; RosterWindow::RosterWindow(const char* title, BMessage* selectMsg, BMessenger* messenger, Server* server, bigtime_t instance) : - BWindow(BRect(0, 0, 300, 400), title, B_FLOATING_WINDOW, 0), + BWindow(BRect(0, 0, 300, 400), title, B_FLOATING_WINDOW, + B_AUTO_UPDATE_SIZE_LIMITS), fTarget(messenger), fMessage(selectMsg), fServer(server)