aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMcCabe Maxsted2010-09-14 20:50:06 -0700
committerMcCabe Maxsted2010-09-14 20:50:06 -0700
commit7fc35bef118a1cc8c1220c9f77f2af5d74f5ba83 (patch)
treece8d8fa6aff07f7aa2fa734846914fa518df69c4
parentAdded checkboxes to the group list for receiving group notices, joining group... (diff)
downloadmeta-impy-7fc35bef118a1cc8c1220c9f77f2af5d74f5ba83.zip
meta-impy-7fc35bef118a1cc8c1220c9f77f2af5d74f5ba83.tar.gz
meta-impy-7fc35bef118a1cc8c1220c9f77f2af5d74f5ba83.tar.bz2
meta-impy-7fc35bef118a1cc8c1220c9f77f2af5d74f5ba83.tar.xz
Ugly hack for ugly (but needed) ui: make the 'none' group sort to the top of the list
-rw-r--r--linden/indra/newview/llfloatergroups.cpp48
1 files changed, 34 insertions, 14 deletions
diff --git a/linden/indra/newview/llfloatergroups.cpp b/linden/indra/newview/llfloatergroups.cpp
index 4ddacfd..daf1709 100644
--- a/linden/indra/newview/llfloatergroups.cpp
+++ b/linden/indra/newview/llfloatergroups.cpp
@@ -541,21 +541,41 @@ void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id, const s
541 } 541 }
542 542
543 // add "none" to list at top 543 // add "none" to list at top
544 std::string style = "NORMAL";
545 if (highlight_id.isNull())
544 { 546 {
545 std::string style = "NORMAL"; 547 style = "BOLD";
546 if (highlight_id.isNull())
547 {
548 style = "BOLD";
549 }
550 LLSD element;
551 element["id"] = LLUUID::null;
552 element["columns"][0]["column"] = "name";
553 element["columns"][0]["value"] = none_text;
554 element["columns"][0]["font"] = "SANSSERIF";
555 element["columns"][0]["font-style"] = style;
556
557 group_list->addElement(element, ADD_TOP);
558 } 548 }
549 LLSD element;
550 element["id"] = LLUUID::null;
551 element["columns"][0]["column"] = "name";
552 //UGLY hack to make sure "none" is always on top -- MC
553 element["columns"][0]["value"] = " (" + none_text + ")";
554 element["columns"][0]["font"] = "SANSSERIF";
555 element["columns"][0]["font-style"] = style;
556
557 if (!group_picker)
558 {
559 LLSD& receive_notices_column = element["columns"][1];
560 receive_notices_column["column"] = "receive_notices";
561 receive_notices_column["type"] = "checkbox";
562 receive_notices_column["value"] = FALSE;
563 receive_notices_column["enabled"] = FALSE;
564
565 LLSD& join_group_chat_column = element["columns"][2];
566 join_group_chat_column["column"] = "join_group_chat";
567 join_group_chat_column["type"] = "checkbox";
568 join_group_chat_column["value"] = FALSE;
569 join_group_chat_column["enabled"] = FALSE;
570
571 LLSD& list_in_profile_column = element["columns"][3];
572 list_in_profile_column["column"] = "list_in_profile";
573 list_in_profile_column["type"] = "checkbox";
574 list_in_profile_column["value"] = FALSE;
575 list_in_profile_column["enabled"] = FALSE;
576 }
577
578 group_list->addElement(element, ADD_TOP);
559 579
560 group_list->selectByValue(highlight_id); 580 group_list->selectByValue(highlight_id);
561} 581}
@@ -565,7 +585,7 @@ void LLPanelGroups::applyChangesToGroups()
565 LLScrollListCtrl* group_list = getChild<LLScrollListCtrl>("group list"); 585 LLScrollListCtrl* group_list = getChild<LLScrollListCtrl>("group list");
566 if (group_list) 586 if (group_list)
567 { 587 {
568 // just in case we want to allow selecting multiple groups ever 588 // just in case we want to allow selecting multiple groups ever -- MC
569 std::vector<LLScrollListItem*> selected = group_list->getAllSelected(); 589 std::vector<LLScrollListItem*> selected = group_list->getAllSelected();
570 for (std::vector<LLScrollListItem*>::iterator itr = selected.begin(); itr != selected.end(); ++itr) 590 for (std::vector<LLScrollListItem*>::iterator itr = selected.begin(); itr != selected.end(); ++itr)
571 { 591 {