aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloatergroups.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llfloatergroups.cpp')
-rw-r--r--linden/indra/newview/llfloatergroups.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/linden/indra/newview/llfloatergroups.cpp b/linden/indra/newview/llfloatergroups.cpp
index 478d39e..874249b 100644
--- a/linden/indra/newview/llfloatergroups.cpp
+++ b/linden/indra/newview/llfloatergroups.cpp
@@ -62,7 +62,7 @@
62std::map<const LLUUID, LLFloaterGroupPicker*> LLFloaterGroupPicker::sInstances; 62std::map<const LLUUID, LLFloaterGroupPicker*> LLFloaterGroupPicker::sInstances;
63 63
64// helper functions 64// helper functions
65void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id, U64 powers_mask = GP_ALL_POWERS); 65void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id, const std::string& none_text, U64 powers_mask = GP_ALL_POWERS);
66 66
67///---------------------------------------------------------------------------- 67///----------------------------------------------------------------------------
68/// Class LLFloaterGroupPicker 68/// Class LLFloaterGroupPicker
@@ -117,7 +117,8 @@ void LLFloaterGroupPicker::setPowersMask(U64 powers_mask)
117 117
118BOOL LLFloaterGroupPicker::postBuild() 118BOOL LLFloaterGroupPicker::postBuild()
119{ 119{
120 init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID(), mPowersMask); 120 const std::string none_text = getString("none");
121 init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID(), none_text, mPowersMask);
121 122
122 childSetAction("OK", onBtnOK, this); 123 childSetAction("OK", onBtnOK, this);
123 124
@@ -201,7 +202,8 @@ void LLPanelGroups::reset()
201 childSetTextArg("groupcount", "[COUNT]", llformat("%d",gAgent.mGroups.count())); 202 childSetTextArg("groupcount", "[COUNT]", llformat("%d",gAgent.mGroups.count()));
202 childSetTextArg("groupcount", "[MAX]", llformat("%d",MAX_AGENT_GROUPS)); 203 childSetTextArg("groupcount", "[MAX]", llformat("%d",MAX_AGENT_GROUPS));
203 204
204 init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID()); 205 const std::string none_text = getString("none");
206 init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID(), none_text);
205 enableButtons(); 207 enableButtons();
206} 208}
207 209
@@ -212,7 +214,8 @@ BOOL LLPanelGroups::postBuild()
212 childSetTextArg("groupcount", "[COUNT]", llformat("%d",gAgent.mGroups.count())); 214 childSetTextArg("groupcount", "[COUNT]", llformat("%d",gAgent.mGroups.count()));
213 childSetTextArg("groupcount", "[MAX]", llformat("%d",MAX_AGENT_GROUPS)); 215 childSetTextArg("groupcount", "[MAX]", llformat("%d",MAX_AGENT_GROUPS));
214 216
215 init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID()); 217 const std::string none_text = getString("none");
218 init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID(), none_text);
216 219
217 childSetAction("Activate", onBtnActivate, this); 220 childSetAction("Activate", onBtnActivate, this);
218 221
@@ -460,7 +463,7 @@ void LLPanelGroups::onGroupList(LLUICtrl* ctrl, void* userdata)
460 if(self) self->enableButtons(); 463 if(self) self->enableButtons();
461} 464}
462 465
463void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id, U64 powers_mask) 466void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id, const std::string& none_text, U64 powers_mask)
464{ 467{
465 S32 count = gAgent.mGroups.count(); 468 S32 count = gAgent.mGroups.count();
466 LLUUID id; 469 LLUUID id;
@@ -502,7 +505,7 @@ void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id, U64 pow
502 LLSD element; 505 LLSD element;
503 element["id"] = LLUUID::null; 506 element["id"] = LLUUID::null;
504 element["columns"][0]["column"] = "name"; 507 element["columns"][0]["column"] = "name";
505 element["columns"][0]["value"] = "none"; // *TODO: Translate 508 element["columns"][0]["value"] = none_text;
506 element["columns"][0]["font"] = "SANSSERIF"; 509 element["columns"][0]["font"] = "SANSSERIF";
507 element["columns"][0]["font-style"] = style; 510 element["columns"][0]["font-style"] = style;
508 511