aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden
diff options
context:
space:
mode:
Diffstat (limited to 'linden')
-rw-r--r--linden/indra/newview/llfloatergroupinvite.cpp20
-rw-r--r--linden/indra/newview/llfloatergroupinvite.h6
2 files changed, 25 insertions, 1 deletions
diff --git a/linden/indra/newview/llfloatergroupinvite.cpp b/linden/indra/newview/llfloatergroupinvite.cpp
index 643abf7..1644050 100644
--- a/linden/indra/newview/llfloatergroupinvite.cpp
+++ b/linden/indra/newview/llfloatergroupinvite.cpp
@@ -34,7 +34,7 @@
34#include "llfloatergroupinvite.h" 34#include "llfloatergroupinvite.h"
35#include "llpanelgroupinvite.h" 35#include "llpanelgroupinvite.h"
36 36
37const char FLOATER_TITLE[] = "Group Invitation"; 37const char FLOATER_TITLE[] = "Invite to ";
38const LLRect FGI_RECT(0, 380, 210, 0); 38const LLRect FGI_RECT(0, 380, 210, 0);
39 39
40class LLFloaterGroupInvite::impl 40class LLFloaterGroupInvite::impl
@@ -132,6 +132,11 @@ void LLFloaterGroupInvite::showForGroup(const LLUUID& group_id, std::vector<LLUU
132 group_id); 132 group_id);
133 133
134 impl::sInstances[group_id] = fgi; 134 impl::sInstances[group_id] = fgi;
135
136 // Look up the group name.
137 // The callback will insert it into the title.
138 const BOOL is_group = TRUE;
139 gCacheName->get(group_id, is_group, callbackLoadGroupName, NULL);
135 140
136 fgi->mImpl->mInvitePanelp->clear(); 141 fgi->mImpl->mInvitePanelp->clear();
137 } 142 }
@@ -145,3 +150,16 @@ void LLFloaterGroupInvite::showForGroup(const LLUUID& group_id, std::vector<LLUU
145 fgi->open(); /*Flawfinder: ignore*/ 150 fgi->open(); /*Flawfinder: ignore*/
146 fgi->mImpl->mInvitePanelp->update(); 151 fgi->mImpl->mInvitePanelp->update();
147} 152}
153
154void LLFloaterGroupInvite::callbackLoadGroupName(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group, void* data)
155{
156 LLFloaterGroupInvite *fgi = get_if_there(impl::sInstances, id, (LLFloaterGroupInvite*)NULL);
157
158 if (fgi)
159 {
160 // Build a new title including the group name.
161 std::ostringstream title;
162 title << FLOATER_TITLE << first;
163 fgi->setTitle(title.str());
164 }
165}
diff --git a/linden/indra/newview/llfloatergroupinvite.h b/linden/indra/newview/llfloatergroupinvite.h
index 621b5dd..96b9161 100644
--- a/linden/indra/newview/llfloatergroupinvite.h
+++ b/linden/indra/newview/llfloatergroupinvite.h
@@ -52,6 +52,12 @@ protected:
52 52
53 class impl; 53 class impl;
54 impl* mImpl; 54 impl* mImpl;
55private:
56 static void callbackLoadGroupName(const LLUUID& id,
57 const std::string& first,
58 const std::string& last,
59 BOOL is_group,
60 void* data);
55}; 61};
56 62
57#endif 63#endif