diff options
author | McCabe Maxsted | 2009-09-11 00:33:33 -0700 |
---|---|---|
committer | McCabe Maxsted | 2009-09-11 00:33:33 -0700 |
commit | efa0d701845542e9ef555260fe6d2ad0beeb0760 (patch) | |
tree | 4527fe04a062d3353e4d1a77c547d1c2b1d475e9 /linden/indra/newview | |
parent | Fixed missing 'm' for draw distance slider (diff) | |
download | meta-impy-efa0d701845542e9ef555260fe6d2ad0beeb0760.zip meta-impy-efa0d701845542e9ef555260fe6d2ad0beeb0760.tar.gz meta-impy-efa0d701845542e9ef555260fe6d2ad0beeb0760.tar.bz2 meta-impy-efa0d701845542e9ef555260fe6d2ad0beeb0760.tar.xz |
Backported clickable object names from 1.23
Diffstat (limited to 'linden/indra/newview')
-rw-r--r-- | linden/indra/newview/CMakeLists.txt | 3 | ||||
-rw-r--r-- | linden/indra/newview/app_settings/settings.xml | 19 | ||||
-rw-r--r-- | linden/indra/newview/llfloaterabout.cpp | 4 | ||||
-rw-r--r-- | linden/indra/newview/llfloaterchat.cpp | 18 | ||||
-rw-r--r-- | linden/indra/newview/llfloaterobjectiminfo.cpp | 204 | ||||
-rw-r--r-- | linden/indra/newview/llfloaterobjectiminfo.h | 45 | ||||
-rw-r--r-- | linden/indra/newview/llgroupnotify.cpp | 4 | ||||
-rw-r--r-- | linden/indra/newview/llimpanel.cpp | 4 | ||||
-rw-r--r-- | linden/indra/newview/llstylemap.cpp | 37 | ||||
-rw-r--r-- | linden/indra/newview/llstylemap.h | 3 | ||||
-rw-r--r-- | linden/indra/newview/llviewermessage.cpp | 50 | ||||
-rw-r--r-- | linden/indra/newview/skins/default/colors_base.xml | 4 | ||||
-rw-r--r-- | linden/indra/newview/skins/default/xui/en-us/floater_object_im_info.xml | 54 | ||||
-rw-r--r-- | linden/indra/newview/skins/silver/colors_base.xml | 2 |
14 files changed, 426 insertions, 25 deletions
diff --git a/linden/indra/newview/CMakeLists.txt b/linden/indra/newview/CMakeLists.txt index 2f2bdd1..6f54a41 100644 --- a/linden/indra/newview/CMakeLists.txt +++ b/linden/indra/newview/CMakeLists.txt | |||
@@ -168,6 +168,7 @@ set(viewer_SOURCE_FILES | |||
168 | llfloatermute.cpp | 168 | llfloatermute.cpp |
169 | llfloaternamedesc.cpp | 169 | llfloaternamedesc.cpp |
170 | llfloaternewim.cpp | 170 | llfloaternewim.cpp |
171 | llfloaterobjectiminfo.cpp | ||
171 | llfloateropenobject.cpp | 172 | llfloateropenobject.cpp |
172 | llfloaterparcel.cpp | 173 | llfloaterparcel.cpp |
173 | llfloaterpermissionsmgr.cpp | 174 | llfloaterpermissionsmgr.cpp |
@@ -566,6 +567,7 @@ set(viewer_HEADER_FILES | |||
566 | llfloatermute.h | 567 | llfloatermute.h |
567 | llfloaternamedesc.h | 568 | llfloaternamedesc.h |
568 | llfloaternewim.h | 569 | llfloaternewim.h |
570 | llfloaterobjectiminfo.h | ||
569 | llfloateropenobject.h | 571 | llfloateropenobject.h |
570 | llfloaterparcel.h | 572 | llfloaterparcel.h |
571 | llfloaterpermissionsmgr.h | 573 | llfloaterpermissionsmgr.h |
@@ -1086,6 +1088,7 @@ set(viewer_XUI_FILES | |||
1086 | skins/default/xui/en-us/floater_name_description.xml | 1088 | skins/default/xui/en-us/floater_name_description.xml |
1087 | skins/default/xui/en-us/floater_new_im.xml | 1089 | skins/default/xui/en-us/floater_new_im.xml |
1088 | skins/default/xui/en-us/floater_new_outfit_dialog.xml | 1090 | skins/default/xui/en-us/floater_new_outfit_dialog.xml |
1091 | skins/default/xui/en-us/floater_object_im_info.xml | ||
1089 | skins/default/xui/en-us/floater_openobject.xml | 1092 | skins/default/xui/en-us/floater_openobject.xml |
1090 | skins/default/xui/en-us/floater_pay_object.xml | 1093 | skins/default/xui/en-us/floater_pay_object.xml |
1091 | skins/default/xui/en-us/floater_pay.xml | 1094 | skins/default/xui/en-us/floater_pay.xml |
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index 39b482b..f8a5d71 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml | |||
@@ -3117,7 +3117,24 @@ | |||
3117 | <integer>0</integer> | 3117 | <integer>0</integer> |
3118 | </array> | 3118 | </array> |
3119 | </map> | 3119 | </map> |
3120 | <key>FloaterOpenObjectRect</key> | 3120 | |
3121 | <key>FloaterObjectIMInfo</key> | ||
3122 | <map> | ||
3123 | <key>Comment</key> | ||
3124 | <string>Rectangle for floater object im info windows</string> | ||
3125 | <key>Persist</key> | ||
3126 | <integer>1</integer> | ||
3127 | <key>Type</key> | ||
3128 | <string>Rect</string> | ||
3129 | <key>Value</key> | ||
3130 | <array> | ||
3131 | <integer>0</integer> | ||
3132 | <integer>300</integer> | ||
3133 | <integer>300</integer> | ||
3134 | <integer>0</integer> | ||
3135 | </array> | ||
3136 | </map> | ||
3137 | <key>FloaterOpenObjectRect</key> | ||
3121 | <map> | 3138 | <map> |
3122 | <key>Comment</key> | 3139 | <key>Comment</key> |
3123 | <string>Rectangle for Open Object window</string> | 3140 | <string>Rectangle for Open Object window</string> |
diff --git a/linden/indra/newview/llfloaterabout.cpp b/linden/indra/newview/llfloaterabout.cpp index 37e9c54..0954a70 100644 --- a/linden/indra/newview/llfloaterabout.cpp +++ b/linden/indra/newview/llfloaterabout.cpp | |||
@@ -119,7 +119,7 @@ LLFloaterAbout::LLFloaterAbout() | |||
119 | __DATE__, __TIME__); | 119 | __DATE__, __TIME__); |
120 | 120 | ||
121 | support_widget->appendColoredText(version, FALSE, FALSE, gColors.getColor("TextFgReadOnlyColor")); | 121 | support_widget->appendColoredText(version, FALSE, FALSE, gColors.getColor("TextFgReadOnlyColor")); |
122 | support_widget->appendStyledText(LLTrans::getString("ReleaseNotes"), FALSE, FALSE, &viewer_link_style); | 122 | support_widget->appendStyledText(LLTrans::getString("ReleaseNotes"), false, false, viewer_link_style); |
123 | 123 | ||
124 | std::string support; | 124 | std::string support; |
125 | support.append("\n\n"); | 125 | support.append("\n\n"); |
@@ -155,7 +155,7 @@ LLFloaterAbout::LLFloaterAbout() | |||
155 | support.append("\n"); | 155 | support.append("\n"); |
156 | 156 | ||
157 | support_widget->appendColoredText(support, FALSE, FALSE, gColors.getColor("TextFgReadOnlyColor")); | 157 | support_widget->appendColoredText(support, FALSE, FALSE, gColors.getColor("TextFgReadOnlyColor")); |
158 | support_widget->appendStyledText(LLTrans::getString("ReleaseNotes"), FALSE, FALSE, &server_link_style); | 158 | support_widget->appendStyledText(LLTrans::getString("ReleaseNotes"), false, false, server_link_style); |
159 | 159 | ||
160 | support = "\n\n"; | 160 | support = "\n\n"; |
161 | } | 161 | } |
diff --git a/linden/indra/newview/llfloaterchat.cpp b/linden/indra/newview/llfloaterchat.cpp index f624ec3..d0713bc 100644 --- a/linden/indra/newview/llfloaterchat.cpp +++ b/linden/indra/newview/llfloaterchat.cpp | |||
@@ -189,7 +189,7 @@ void LLFloaterChat::updateConsoleVisibility() | |||
189 | || (getHost() && getHost()->isMinimized() )); // are we hosted in a minimized floater? | 189 | || (getHost() && getHost()->isMinimized() )); // are we hosted in a minimized floater? |
190 | } | 190 | } |
191 | 191 | ||
192 | void add_timestamped_line(LLViewerTextEditor* edit, const LLChat &chat, const LLColor4& color) | 192 | void add_timestamped_line(LLViewerTextEditor* edit, LLChat chat, const LLColor4& color) |
193 | { | 193 | { |
194 | std::string line = chat.mText; | 194 | std::string line = chat.mText; |
195 | bool prepend_newline = true; | 195 | bool prepend_newline = true; |
@@ -199,16 +199,22 @@ void add_timestamped_line(LLViewerTextEditor* edit, const LLChat &chat, const LL | |||
199 | prepend_newline = false; | 199 | prepend_newline = false; |
200 | } | 200 | } |
201 | 201 | ||
202 | // If the msg is not from an agent (not yourself though), | 202 | // If the msg is from an agent (not yourself though), |
203 | // extract out the sender name and replace it with the hotlinked name. | 203 | // extract out the sender name and replace it with the hotlinked name. |
204 | if (chat.mSourceType == CHAT_SOURCE_AGENT && | 204 | if (chat.mSourceType == CHAT_SOURCE_AGENT && |
205 | chat.mFromID != LLUUID::null && | 205 | chat.mFromID != LLUUID::null) |
206 | (line.length() > chat.mFromName.length() && line.find(chat.mFromName,0) == 0)) | 206 | { |
207 | chat.mURL = llformat("secondlife:///app/agent/%s/about",chat.mFromID.asString().c_str()); | ||
208 | } | ||
209 | |||
210 | // If the chat line has an associated url, link it up to the name. | ||
211 | if (!chat.mURL.empty() | ||
212 | && (line.length() > chat.mFromName.length() && line.find(chat.mFromName,0) == 0)) | ||
207 | { | 213 | { |
208 | std::string start_line = line.substr(0, chat.mFromName.length() + 1); | 214 | std::string start_line = line.substr(0, chat.mFromName.length() + 1); |
209 | line = line.substr(chat.mFromName.length() + 1); | 215 | line = line.substr(chat.mFromName.length() + 1); |
210 | const LLStyleSP &sourceStyle = LLStyleMap::instance().lookup(chat.mFromID); | 216 | const LLStyleSP &sourceStyle = LLStyleMap::instance().lookup(chat.mFromID,chat.mURL); |
211 | edit->appendStyledText(start_line, false, prepend_newline, &sourceStyle); | 217 | edit->appendStyledText(start_line, false, prepend_newline, sourceStyle); |
212 | prepend_newline = false; | 218 | prepend_newline = false; |
213 | } | 219 | } |
214 | edit->appendColoredText(line, false, prepend_newline, color); | 220 | edit->appendColoredText(line, false, prepend_newline, color); |
diff --git a/linden/indra/newview/llfloaterobjectiminfo.cpp b/linden/indra/newview/llfloaterobjectiminfo.cpp new file mode 100644 index 0000000..6cbc4e2 --- /dev/null +++ b/linden/indra/newview/llfloaterobjectiminfo.cpp | |||
@@ -0,0 +1,204 @@ | |||
1 | /** | ||
2 | * @file llfloaterobjectiminfo.cpp | ||
3 | * @brief A floater with information about an object that sent an IM. | ||
4 | * | ||
5 | * $LicenseInfo:firstyear=2007&license=viewergpl$ | ||
6 | * | ||
7 | * Copyright (c) 2007-2008, Linden Research, Inc. | ||
8 | * | ||
9 | * Second Life Viewer Source Code | ||
10 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
11 | * to you under the terms of the GNU General Public License, version 2.0 | ||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 | ||
16 | * | ||
17 | * There are special exceptions to the terms and conditions of the GPL as | ||
18 | * it is applied to this Source Code. View the full text of the exception | ||
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
21 | * | ||
22 | * By copying, modifying or distributing this software, you acknowledge | ||
23 | * that you have read and understood your obligations described above, | ||
24 | * and agree to abide by those obligations. | ||
25 | * | ||
26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
28 | * COMPLETENESS OR PERFORMANCE. | ||
29 | * $/LicenseInfo$ | ||
30 | */ | ||
31 | |||
32 | #include "llviewerprecompiledheaders.h" | ||
33 | |||
34 | #include "llfloaterobjectiminfo.h" | ||
35 | |||
36 | #include "llagentdata.h" | ||
37 | #include "llcachename.h" | ||
38 | #include "llcommandhandler.h" | ||
39 | #include "llfloater.h" | ||
40 | #include "llfloateravatarinfo.h" | ||
41 | #include "llfloatergroupinfo.h" | ||
42 | #include "llfloatermute.h" | ||
43 | #include "llmutelist.h" | ||
44 | #include "llsdutil.h" | ||
45 | #include "lluictrlfactory.h" | ||
46 | #include "llurldispatcher.h" | ||
47 | #include "llviewercontrol.h" | ||
48 | |||
49 | //////////////////////////////////////////////////////////////////////////// | ||
50 | // LLFloaterObjectIMInfo | ||
51 | class LLFloaterObjectIMInfo : public LLFloater, public LLFloaterSingleton<LLFloaterObjectIMInfo> | ||
52 | { | ||
53 | public: | ||
54 | LLFloaterObjectIMInfo(const LLSD& sd); | ||
55 | virtual ~LLFloaterObjectIMInfo() { }; | ||
56 | |||
57 | BOOL postBuild(void); | ||
58 | |||
59 | void update(const LLUUID& id, const std::string& name, const std::string& slurl, const LLUUID& owner, bool owner_is_group); | ||
60 | |||
61 | // UI Handlers | ||
62 | static void onClickMap(void* data); | ||
63 | static void onClickOwner(void* data); | ||
64 | static void onClickMute(void* data); | ||
65 | |||
66 | static void nameCallback(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group, void* data); | ||
67 | |||
68 | private: | ||
69 | LLUUID mObjectID; | ||
70 | std::string mObjectName; | ||
71 | std::string mSlurl; | ||
72 | LLUUID mOwnerID; | ||
73 | std::string mOwnerName; | ||
74 | bool mOwnerIsGroup; | ||
75 | }; | ||
76 | |||
77 | LLFloaterObjectIMInfo::LLFloaterObjectIMInfo(const LLSD& seed) | ||
78 | : mObjectID(), mObjectName(), mSlurl(), mOwnerID(), mOwnerName(), mOwnerIsGroup(false) | ||
79 | { | ||
80 | LLUICtrlFactory::getInstance()->buildFloater(this, "floater_object_im_info.xml"); | ||
81 | |||
82 | if (getRect().mLeft == 0 | ||
83 | && getRect().mBottom == 0) | ||
84 | { | ||
85 | center(); | ||
86 | } | ||
87 | } | ||
88 | |||
89 | BOOL LLFloaterObjectIMInfo::postBuild(void) | ||
90 | { | ||
91 | childSetAction("Mute",onClickMute,this); | ||
92 | childSetActionTextbox("OwnerName",onClickOwner, this); | ||
93 | childSetActionTextbox("Slurl",onClickMap, this); | ||
94 | |||
95 | return true; | ||
96 | } | ||
97 | |||
98 | void LLFloaterObjectIMInfo::update(const LLUUID& object_id, const std::string& name, const std::string& slurl, const LLUUID& owner_id, bool owner_is_group) | ||
99 | { | ||
100 | // When talking to an old region we won't have a slurl. | ||
101 | // The object id isn't really the object id either but we don't use it so who cares. | ||
102 | bool have_slurl = !slurl.empty(); | ||
103 | childSetVisible("Unknown_Slurl",!have_slurl); | ||
104 | childSetVisible("Slurl",have_slurl); | ||
105 | |||
106 | childSetText("ObjectName",name); | ||
107 | childSetText("Slurl",slurl); | ||
108 | childSetText("OwnerName",std::string("")); | ||
109 | |||
110 | bool my_object = (owner_id == gAgentID); | ||
111 | childSetEnabled("Mute",!my_object); | ||
112 | |||
113 | mObjectID = object_id; | ||
114 | mObjectName = name; | ||
115 | mSlurl = slurl; | ||
116 | mOwnerID = owner_id; | ||
117 | mOwnerIsGroup = owner_is_group; | ||
118 | |||
119 | if (gCacheName) gCacheName->get(owner_id,owner_is_group,nameCallback,this); | ||
120 | } | ||
121 | |||
122 | //static | ||
123 | void LLFloaterObjectIMInfo::onClickMap(void* data) | ||
124 | { | ||
125 | LLFloaterObjectIMInfo* self = (LLFloaterObjectIMInfo*)data; | ||
126 | |||
127 | std::ostringstream link; | ||
128 | link << "secondlife://" << self->mSlurl; | ||
129 | LLURLDispatcher::dispatch(link.str(),false); | ||
130 | } | ||
131 | |||
132 | //static | ||
133 | void LLFloaterObjectIMInfo::onClickOwner(void* data) | ||
134 | { | ||
135 | LLFloaterObjectIMInfo* self = (LLFloaterObjectIMInfo*)data; | ||
136 | if (self->mOwnerIsGroup) | ||
137 | { | ||
138 | LLFloaterGroupInfo::showFromUUID(self->mOwnerID); | ||
139 | } | ||
140 | else | ||
141 | { | ||
142 | LLFloaterAvatarInfo::showFromObject(self->mOwnerID); | ||
143 | } | ||
144 | } | ||
145 | |||
146 | //static | ||
147 | void LLFloaterObjectIMInfo::onClickMute(void* data) | ||
148 | { | ||
149 | LLFloaterObjectIMInfo* self = (LLFloaterObjectIMInfo*)data; | ||
150 | |||
151 | LLMute::EType mute_type = (self->mOwnerIsGroup) ? LLMute::GROUP : LLMute::AGENT; | ||
152 | LLMute mute(self->mOwnerID, self->mOwnerName, mute_type); | ||
153 | LLMuteList::getInstance()->add(mute); | ||
154 | LLFloaterMute::showInstance(); | ||
155 | self->close(); | ||
156 | } | ||
157 | |||
158 | //static | ||
159 | void LLFloaterObjectIMInfo::nameCallback(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group, void* data) | ||
160 | { | ||
161 | LLFloaterObjectIMInfo* self = (LLFloaterObjectIMInfo*)data; | ||
162 | self->mOwnerName = first; | ||
163 | if (!last.empty()) | ||
164 | { | ||
165 | self->mOwnerName += " " + last; | ||
166 | } | ||
167 | |||
168 | self->childSetText("OwnerName",self->mOwnerName); | ||
169 | } | ||
170 | |||
171 | //////////////////////////////////////////////////////////////////////////// | ||
172 | // LLObjectIMInfo | ||
173 | void LLObjectIMInfo::show(const LLUUID &object_id, const std::string &name, const std::string &location, const LLUUID &owner_id, bool owner_is_group) | ||
174 | { | ||
175 | LLFloaterObjectIMInfo* im_info_floater = LLFloaterObjectIMInfo::showInstance(); | ||
176 | im_info_floater->update(object_id,name,location,owner_id,owner_is_group); | ||
177 | } | ||
178 | |||
179 | //////////////////////////////////////////////////////////////////////////// | ||
180 | // LLObjectIMInfoHandler | ||
181 | class LLObjectIMInfoHandler : public LLCommandHandler | ||
182 | { | ||
183 | public: | ||
184 | LLObjectIMInfoHandler() : LLCommandHandler("objectim", false) { } | ||
185 | |||
186 | bool handle(const LLSD& tokens, const LLSD& query_map); | ||
187 | }; | ||
188 | |||
189 | // Creating the object registers with the dispatcher. | ||
190 | LLObjectIMInfoHandler gObjectIMHandler; | ||
191 | |||
192 | // ex. secondlife:///app/objectim/9426adfc-9c17-8765-5f09-fdf19957d003?owner=a112d245-9095-4e9c-ace4-ffa31717f934&groupowned=true&slurl=ahern/123/123/123&name=Object | ||
193 | bool LLObjectIMInfoHandler::handle(const LLSD &tokens, const LLSD &query_map) | ||
194 | { | ||
195 | LLUUID task_id = tokens[0].asUUID(); | ||
196 | std::string name = query_map["name"].asString(); | ||
197 | std::string slurl = query_map["slurl"].asString(); | ||
198 | LLUUID owner = query_map["owner"].asUUID(); | ||
199 | bool group_owned = query_map.has("groupowned"); | ||
200 | |||
201 | LLObjectIMInfo::show(task_id,name,slurl,owner,group_owned); | ||
202 | |||
203 | return true; | ||
204 | } | ||
diff --git a/linden/indra/newview/llfloaterobjectiminfo.h b/linden/indra/newview/llfloaterobjectiminfo.h new file mode 100644 index 0000000..0564c3e --- /dev/null +++ b/linden/indra/newview/llfloaterobjectiminfo.h | |||
@@ -0,0 +1,45 @@ | |||
1 | /** | ||
2 | * @file llfloaterobjectiminfo.h | ||
3 | * @brief Shows a dialog with information about an object. | ||
4 | * | ||
5 | * $LicenseInfo:firstyear=2006&license=viewergpl$ | ||
6 | * | ||
7 | * Copyright (c) 2006-2008, Linden Research, Inc. | ||
8 | * | ||
9 | * Second Life Viewer Source Code | ||
10 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
11 | * to you under the terms of the GNU General Public License, version 2.0 | ||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 | ||
16 | * | ||
17 | * There are special exceptions to the terms and conditions of the GPL as | ||
18 | * it is applied to this Source Code. View the full text of the exception | ||
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
21 | * | ||
22 | * By copying, modifying or distributing this software, you acknowledge | ||
23 | * that you have read and understood your obligations described above, | ||
24 | * and agree to abide by those obligations. | ||
25 | * | ||
26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
28 | * COMPLETENESS OR PERFORMANCE. | ||
29 | * $/LicenseInfo$ | ||
30 | */ | ||
31 | |||
32 | #ifndef LL_LLFLOATEROBJECTIMINFO_H | ||
33 | #define LL_LLFLOATEROBJECTIMINFO_H | ||
34 | |||
35 | namespace LLObjectIMInfo | ||
36 | { | ||
37 | // Show an LLFloaterObjectIMInfo for this object. | ||
38 | static void show(const LLUUID& object_id, | ||
39 | const std::string& name, | ||
40 | const std::string& location, | ||
41 | const LLUUID& owner_id, | ||
42 | bool owner_is_group); | ||
43 | }; | ||
44 | |||
45 | #endif // LL_LLFLOATERURLDISPLAY_H | ||
diff --git a/linden/indra/newview/llgroupnotify.cpp b/linden/indra/newview/llgroupnotify.cpp index 37897eb..2f8e838 100644 --- a/linden/indra/newview/llgroupnotify.cpp +++ b/linden/indra/newview/llgroupnotify.cpp | |||
@@ -220,8 +220,8 @@ LLGroupNotifyBox::LLGroupNotifyBox(const std::string& subject, | |||
220 | static const LLStyleSP headerstyle(new LLStyle(true,LLColor4::black,"SansSerifBig")); | 220 | static const LLStyleSP headerstyle(new LLStyle(true,LLColor4::black,"SansSerifBig")); |
221 | static const LLStyleSP datestyle(new LLStyle(true,LLColor4::black,"serif")); | 221 | static const LLStyleSP datestyle(new LLStyle(true,LLColor4::black,"serif")); |
222 | 222 | ||
223 | text->appendStyledText(subject,false,false,&headerstyle); | 223 | text->appendStyledText(subject,false,false,headerstyle); |
224 | text->appendStyledText(time_buf,false,false,&datestyle); | 224 | text->appendStyledText(time_buf,false,false,datestyle); |
225 | // Sadly, our LLTextEditor can't handle both styled and unstyled text | 225 | // Sadly, our LLTextEditor can't handle both styled and unstyled text |
226 | // at the same time. Hence this space must be styled. JC | 226 | // at the same time. Hence this space must be styled. JC |
227 | text->appendColoredText(std::string(" "),false,false,LLColor4::grey4); | 227 | text->appendColoredText(std::string(" "),false,false,LLColor4::grey4); |
diff --git a/linden/indra/newview/llimpanel.cpp b/linden/indra/newview/llimpanel.cpp index f30ae8c..16b0388 100644 --- a/linden/indra/newview/llimpanel.cpp +++ b/linden/indra/newview/llimpanel.cpp | |||
@@ -1543,8 +1543,8 @@ void LLFloaterIMPanel::addHistoryLine(const std::string &utf8msg, const LLColor4 | |||
1543 | else | 1543 | else |
1544 | { | 1544 | { |
1545 | // Convert the name to a hotlink and add to message. | 1545 | // Convert the name to a hotlink and add to message. |
1546 | const LLStyleSP &source_style = LLStyleMap::instance().lookup(source); | 1546 | const LLStyleSP &source_style = LLStyleMap::instance().lookupAgent(source); |
1547 | mHistoryEditor->appendStyledText(name,false,prepend_newline,&source_style); | 1547 | mHistoryEditor->appendStyledText(name,false,prepend_newline,source_style); |
1548 | } | 1548 | } |
1549 | prepend_newline = false; | 1549 | prepend_newline = false; |
1550 | } | 1550 | } |
diff --git a/linden/indra/newview/llstylemap.cpp b/linden/indra/newview/llstylemap.cpp index 6a3415f..e3bd3cd 100644 --- a/linden/indra/newview/llstylemap.cpp +++ b/linden/indra/newview/llstylemap.cpp | |||
@@ -47,13 +47,13 @@ LLStyleMap::~LLStyleMap() | |||
47 | 47 | ||
48 | LLStyleMap &LLStyleMap::instance() | 48 | LLStyleMap &LLStyleMap::instance() |
49 | { | 49 | { |
50 | static LLStyleMap mStyleMap; | 50 | static LLStyleMap style_map; |
51 | return mStyleMap; | 51 | return style_map; |
52 | } | 52 | } |
53 | 53 | ||
54 | // This is similar to the [] accessor except that if the entry doesn't already exist, | 54 | // This is similar to the [] accessor except that if the entry doesn't already exist, |
55 | // then this will create the entry. | 55 | // then this will create the entry. |
56 | const LLStyleSP &LLStyleMap::lookup(const LLUUID &source) | 56 | const LLStyleSP &LLStyleMap::lookupAgent(const LLUUID &source) |
57 | { | 57 | { |
58 | // Find this style in the map or add it if not. This map holds links to residents' profiles. | 58 | // Find this style in the map or add it if not. This map holds links to residents' profiles. |
59 | if (find(source) == end()) | 59 | if (find(source) == end()) |
@@ -77,6 +77,37 @@ const LLStyleSP &LLStyleMap::lookup(const LLUUID &source) | |||
77 | return (*this)[source]; | 77 | return (*this)[source]; |
78 | } | 78 | } |
79 | 79 | ||
80 | // This is similar to lookupAgent for any generic URL encoded style. | ||
81 | const LLStyleSP &LLStyleMap::lookup(const LLUUID& id, const std::string& link) | ||
82 | { | ||
83 | // Find this style in the map or add it if not. | ||
84 | iterator iter = find(id); | ||
85 | if (iter == end()) | ||
86 | { | ||
87 | LLStyleSP style(new LLStyle); | ||
88 | style->setVisible(true); | ||
89 | style->setFontName(LLStringUtil::null); | ||
90 | if (id != LLUUID::null && !link.empty()) | ||
91 | { | ||
92 | style->setColor(gSavedSettings.getColor4("HTMLLinkColor")); | ||
93 | style->setLinkHREF(link); | ||
94 | } | ||
95 | else | ||
96 | style->setColor(LLColor4::white); | ||
97 | (*this)[id] = style; | ||
98 | } | ||
99 | else | ||
100 | { | ||
101 | LLStyleSP style = (*iter).second; | ||
102 | if ( style->getLinkHREF() != link ) | ||
103 | { | ||
104 | style->setLinkHREF(link); | ||
105 | } | ||
106 | } | ||
107 | |||
108 | return (*this)[id]; | ||
109 | } | ||
110 | |||
80 | void LLStyleMap::update() | 111 | void LLStyleMap::update() |
81 | { | 112 | { |
82 | for (style_map_t::iterator iter = begin(); iter != end(); ++iter) | 113 | for (style_map_t::iterator iter = begin(); iter != end(); ++iter) |
diff --git a/linden/indra/newview/llstylemap.h b/linden/indra/newview/llstylemap.h index a38d253..f1eada9 100644 --- a/linden/indra/newview/llstylemap.h +++ b/linden/indra/newview/llstylemap.h | |||
@@ -47,7 +47,8 @@ public: | |||
47 | LLStyleMap(); | 47 | LLStyleMap(); |
48 | ~LLStyleMap(); | 48 | ~LLStyleMap(); |
49 | // Just like the [] accessor but it will add the entry in if it doesn't exist. | 49 | // Just like the [] accessor but it will add the entry in if it doesn't exist. |
50 | const LLStyleSP &lookup(const LLUUID &source); | 50 | const LLStyleSP &lookupAgent(const LLUUID &source); |
51 | const LLStyleSP &lookup(const LLUUID &source, const std::string& link); | ||
51 | static LLStyleMap &instance(); | 52 | static LLStyleMap &instance(); |
52 | 53 | ||
53 | // Forces refresh of the entries, call when something changes (e.g. link color). | 54 | // Forces refresh of the entries, call when something changes (e.g. link color). |
diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp index 3fb8e9a..26dd86c 100644 --- a/linden/indra/newview/llviewermessage.cpp +++ b/linden/indra/newview/llviewermessage.cpp | |||
@@ -1802,15 +1802,51 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) | |||
1802 | break; | 1802 | break; |
1803 | 1803 | ||
1804 | case IM_FROM_TASK: | 1804 | case IM_FROM_TASK: |
1805 | if (is_busy && !is_owned_by_me) | ||
1806 | { | 1805 | { |
1807 | return; | 1806 | if (is_busy && !is_owned_by_me) |
1807 | { | ||
1808 | return; | ||
1809 | } | ||
1810 | chat.mText = name + separator_string + message.substr(message_offset); | ||
1811 | chat.mFromName = name; | ||
1812 | |||
1813 | // Build a link to open the object IM info window. | ||
1814 | std::string location = ll_safe_string((char*)binary_bucket,binary_bucket_size); | ||
1815 | |||
1816 | LLSD query_string; | ||
1817 | query_string["owner"] = from_id; | ||
1818 | query_string["slurl"] = location.c_str(); | ||
1819 | query_string["name"] = name; | ||
1820 | if (from_group) | ||
1821 | { | ||
1822 | query_string["groupowned"] = "true"; | ||
1823 | } | ||
1824 | |||
1825 | if (session_id.notNull()) | ||
1826 | { | ||
1827 | chat.mFromID = session_id; | ||
1828 | } | ||
1829 | else | ||
1830 | { | ||
1831 | // This message originated on a region without the updated code for task id and slurl information. | ||
1832 | // We just need a unique ID for this object that isn't the owner ID. | ||
1833 | // If it is the owner ID it will overwrite the style that contains the link to that owner's profile. | ||
1834 | // This isn't ideal - it will make 1 style for all objects owned by the the same person/group. | ||
1835 | // This works because the only thing we can really do in this case is show the owner name and link to their profile. | ||
1836 | chat.mFromID = from_id ^ gAgent.getSessionID(); | ||
1837 | } | ||
1838 | |||
1839 | std::ostringstream link; | ||
1840 | link << "secondlife:///app/objectim/" << session_id | ||
1841 | << LLURI::mapToQueryString(query_string); | ||
1842 | |||
1843 | chat.mURL = link.str(); | ||
1844 | |||
1845 | // Note: lie to LLFloaterChat::addChat(), pretending that this is NOT an IM, because | ||
1846 | // IMs from objcts don't open IM sessions. | ||
1847 | chat.mSourceType = CHAT_SOURCE_OBJECT; | ||
1848 | LLFloaterChat::addChat(chat, FALSE, FALSE); | ||
1808 | } | 1849 | } |
1809 | chat.mText = name + separator_string + message.substr(message_offset); | ||
1810 | // Note: lie to LLFloaterChat::addChat(), pretending that this is NOT an IM, because | ||
1811 | // IMs from objcts don't open IM sessions. | ||
1812 | chat.mSourceType = CHAT_SOURCE_OBJECT; | ||
1813 | LLFloaterChat::addChat(chat, FALSE, FALSE); | ||
1814 | break; | 1850 | break; |
1815 | case IM_FROM_TASK_AS_ALERT: | 1851 | case IM_FROM_TASK_AS_ALERT: |
1816 | if (is_busy && !is_owned_by_me) | 1852 | if (is_busy && !is_owned_by_me) |
diff --git a/linden/indra/newview/skins/default/colors_base.xml b/linden/indra/newview/skins/default/colors_base.xml index 42cb0ac..d0f1049 100644 --- a/linden/indra/newview/skins/default/colors_base.xml +++ b/linden/indra/newview/skins/default/colors_base.xml | |||
@@ -69,7 +69,9 @@ | |||
69 | <TextEmbeddedItemColor value="0, 0, 128, 255" /> <!-- Text of items embedded in notecards --> | 69 | <TextEmbeddedItemColor value="0, 0, 128, 255" /> <!-- Text of items embedded in notecards --> |
70 | <TextDefaultColor value="0, 20, 0, 255"/> <!-- Non-keyword text in the script editor --> | 70 | <TextDefaultColor value="0, 20, 0, 255"/> <!-- Non-keyword text in the script editor --> |
71 | <ScriptBgReadOnlyColor value="100, 100, 100, 255" /> <!-- Not used --> | 71 | <ScriptBgReadOnlyColor value="100, 100, 100, 255" /> <!-- Not used --> |
72 | 72 | <TextLinkColor value="144, 165, 208, 255"/> | |
73 | <TextLinkHoverColor value="255, 255, 255, 255"/> | ||
74 | |||
73 | <!-- LISTBOXES --> | 75 | <!-- LISTBOXES --> |
74 | <ScrollBgReadOnlyColor value="200, 209, 204, 255" /> <!-- Background of read only lists --> | 76 | <ScrollBgReadOnlyColor value="200, 209, 204, 255" /> <!-- Background of read only lists --> |
75 | <ScrollBgWriteableColor value="200, 209, 204, 255" /> <!-- Background of editable lists, e.g. groups--> | 77 | <ScrollBgWriteableColor value="200, 209, 204, 255" /> <!-- Background of editable lists, e.g. groups--> |
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_object_im_info.xml b/linden/indra/newview/skins/default/xui/en-us/floater_object_im_info.xml new file mode 100644 index 0000000..615b7d1 --- /dev/null +++ b/linden/indra/newview/skins/default/xui/en-us/floater_object_im_info.xml | |||
@@ -0,0 +1,54 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | ||
2 | <floater bottom="0" can_close="true" can_drag_on_left="false" can_minimize="true" | ||
3 | can_resize="false" can_tear_off="true" enabled="true" height="140" left="0" | ||
4 | mouse_opaque="true" name="object im info" width="300" | ||
5 | rect_control="FloaterObjectIMInfo" short_title="Object Info" title="Object Information" > | ||
6 | |||
7 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
8 | bottom="-35" drop_shadow_visible="true" follows="left|top" | ||
9 | font="SansSerif" h_pad="0" halign="left" height="10" left="10" | ||
10 | mouse_opaque="true" name="LabelItemNameTitle" v_pad="0" width="78"> | ||
11 | Object: | ||
12 | </text> | ||
13 | <text bevel_style="none" border_style="line" border_visible="false" | ||
14 | border_thickness="0" bottom_delta="-10" enabled="true" follows="left|top" | ||
15 | font="SansSerif" height="20" is_unicode="false" left="70" | ||
16 | max_length="254" mouse_opaque="false" name="ObjectName" | ||
17 | width="200" /> | ||
18 | |||
19 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
20 | bottom="-60" drop_shadow_visible="true" follows="left|top" | ||
21 | font="SansSerif" h_pad="0" halign="left" height="10" left="10" | ||
22 | mouse_opaque="true" name="LabelSlurlTitle" v_pad="0" width="78"> | ||
23 | Location: | ||
24 | </text> | ||
25 | <text bevel_style="none" border_style="line" border_visible="false" | ||
26 | border_thickness="0" bottom_delta="-10" enabled="true" follows="left|top" | ||
27 | font="SansSerif" height="20" is_unicode="false" left="70" hover="true" | ||
28 | max_length="254" mouse_opaque="true" name="Slurl" font-style="UNDERLINE" | ||
29 | width="200" hover_cursor="UI_CURSOR_HAND" text_color="TextLinkColor" hover_color="TextLinkHoverColor"/> | ||
30 | |||
31 | <!-- A new viewer talking to an old sim will not have a slurl available and will show this. --> | ||
32 | <text bevel_style="none" border_style="line" border_visible="false" | ||
33 | border_thickness="0" bottom_delta="0" enabled="true" follows="left|top" | ||
34 | font="SansSerif" height="20" is_unicode="false" left_delta="0" hover="false" | ||
35 | max_length="254" mouse_opaque="false" name="Unknown_Slurl" width="200"> | ||
36 | (Location Info Not Available) | ||
37 | </text> | ||
38 | |||
39 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
40 | bottom="-85" drop_shadow_visible="true" follows="left|top" | ||
41 | font="SansSerif" h_pad="0" halign="left" height="10" left="10" | ||
42 | mouse_opaque="true" name="LabelOwnerNameTitle" v_pad="0" width="78"> | ||
43 | Owner: | ||
44 | </text> | ||
45 | <text bevel_style="none" border_style="line" border_visible="false" | ||
46 | border_thickness="0" bottom_delta="-10" enabled="true" follows="left|top" | ||
47 | font="SansSerif" height="20" is_unicode="false" left="70" hover="true" | ||
48 | max_length="254" mouse_opaque="true" name="OwnerName" font-style="UNDERLINE" | ||
49 | width="200" hover_cursor="UI_CURSOR_HAND" text_color="TextLinkColor" hover_color="TextLinkHoverColor"/> | ||
50 | |||
51 | <button bottom_delta="-30" font="SansSerif" halign="center" height="20" label="Mute Owner" | ||
52 | label_selected="Mute Owner" left="70" mouse_opaque="true" name="Mute" | ||
53 | width="160" /> | ||
54 | </floater> | ||
diff --git a/linden/indra/newview/skins/silver/colors_base.xml b/linden/indra/newview/skins/silver/colors_base.xml index a69f43f..abe61bf 100644 --- a/linden/indra/newview/skins/silver/colors_base.xml +++ b/linden/indra/newview/skins/silver/colors_base.xml | |||
@@ -69,6 +69,8 @@ | |||
69 | <TextEmbeddedItemColor value="0, 0, 128, 255" /> <!-- Text of items embedded in notecards --> | 69 | <TextEmbeddedItemColor value="0, 0, 128, 255" /> <!-- Text of items embedded in notecards --> |
70 | <TextDefaultColor value="0, 20, 0, 255"/> <!-- Non-keyword text in the script editor --> | 70 | <TextDefaultColor value="0, 20, 0, 255"/> <!-- Non-keyword text in the script editor --> |
71 | <ScriptBgReadOnlyColor value="180, 180, 180, 255" /> <!-- Not used --> | 71 | <ScriptBgReadOnlyColor value="180, 180, 180, 255" /> <!-- Not used --> |
72 | <TextLinkColor value="0, 20, 255, 255"/> | ||
73 | <TextLinkHoverColor value="0, 50, 255, 255"/> | ||
72 | 74 | ||
73 | <!-- LISTBOXES --> | 75 | <!-- LISTBOXES --> |
74 | <ScrollBgReadOnlyColor value="255, 255, 255, 140" /> <!-- Background of read only lists --> | 76 | <ScrollBgReadOnlyColor value="255, 255, 255, 140" /> <!-- Background of read only lists --> |