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 23e2f4d..9599089 100644
--- a/linden/indra/newview/llfloatergroups.cpp
+++ b/linden/indra/newview/llfloatergroups.cpp
@@ -61,7 +61,7 @@
61std::map<const LLUUID, LLFloaterGroupPicker*> LLFloaterGroupPicker::sInstances; 61std::map<const LLUUID, LLFloaterGroupPicker*> LLFloaterGroupPicker::sInstances;
62 62
63// helper functions 63// helper functions
64void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id, U64 powers_mask = GP_ALL_POWERS); 64void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id, const std::string& none_text, U64 powers_mask = GP_ALL_POWERS);
65 65
66///---------------------------------------------------------------------------- 66///----------------------------------------------------------------------------
67/// Class LLFloaterGroupPicker 67/// Class LLFloaterGroupPicker
@@ -116,7 +116,8 @@ void LLFloaterGroupPicker::setPowersMask(U64 powers_mask)
116 116
117BOOL LLFloaterGroupPicker::postBuild() 117BOOL LLFloaterGroupPicker::postBuild()
118{ 118{
119 init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID(), mPowersMask); 119 const std::string none_text = getString("none");
120 init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID(), none_text, mPowersMask);
120 121
121 childSetAction("OK", onBtnOK, this); 122 childSetAction("OK", onBtnOK, this);
122 123
@@ -200,7 +201,8 @@ void LLPanelGroups::reset()
200 childSetTextArg("groupcount", "[COUNT]", llformat("%d",gAgent.mGroups.count())); 201 childSetTextArg("groupcount", "[COUNT]", llformat("%d",gAgent.mGroups.count()));
201 childSetTextArg("groupcount", "[MAX]", llformat("%d",MAX_AGENT_GROUPS)); 202 childSetTextArg("groupcount", "[MAX]", llformat("%d",MAX_AGENT_GROUPS));
202 203
203 init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID()); 204 const std::string none_text = getString("none");
205 init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID(), none_text);
204 enableButtons(); 206 enableButtons();
205} 207}
206 208
@@ -211,7 +213,8 @@ BOOL LLPanelGroups::postBuild()
211 childSetTextArg("groupcount", "[COUNT]", llformat("%d",gAgent.mGroups.count())); 213 childSetTextArg("groupcount", "[COUNT]", llformat("%d",gAgent.mGroups.count()));
212 childSetTextArg("groupcount", "[MAX]", llformat("%d",MAX_AGENT_GROUPS)); 214 childSetTextArg("groupcount", "[MAX]", llformat("%d",MAX_AGENT_GROUPS));
213 215
214 init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID()); 216 const std::string none_text = getString("none");
217 init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID(), none_text);
215 218
216 childSetAction("Activate", onBtnActivate, this); 219 childSetAction("Activate", onBtnActivate, this);
217 220
@@ -457,7 +460,7 @@ void LLPanelGroups::onGroupList(LLUICtrl* ctrl, void* userdata)
457 if(self) self->enableButtons(); 460 if(self) self->enableButtons();
458} 461}
459 462
460void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id, U64 powers_mask) 463void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id, const std::string& none_text, U64 powers_mask)
461{ 464{
462 S32 count = gAgent.mGroups.count(); 465 S32 count = gAgent.mGroups.count();
463 LLUUID id; 466 LLUUID id;
@@ -499,7 +502,7 @@ void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id, U64 pow
499 LLSD element; 502 LLSD element;
500 element["id"] = LLUUID::null; 503 element["id"] = LLUUID::null;
501 element["columns"][0]["column"] = "name"; 504 element["columns"][0]["column"] = "name";
502 element["columns"][0]["value"] = "none"; // *TODO: Translate 505 element["columns"][0]["value"] = none_text;
503 element["columns"][0]["font"] = "SANSSERIF"; 506 element["columns"][0]["font"] = "SANSSERIF";
504 element["columns"][0]["font-style"] = style; 507 element["columns"][0]["font-style"] = style;
505 508