Skip to content

Commit 82a9248

Browse files
authored
Merge branch 'develop' into develop-linux
2 parents 92c08ef + e2a741d commit 82a9248

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+5313
-67
lines changed

indra/llui/llscrolllistcell.cpp

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ const LLSD LLScrollListCell::getAltValue() const
9898
LLScrollListIcon::LLScrollListIcon(const LLScrollListCell::Params& p)
9999
: LLScrollListCell(p),
100100
mIcon(LLUI::getUIImage(p.value().asString())),
101+
mIconSize(0),
101102
mColor(p.color),
102103
mAlignment(p.font_halign)
103104
{}
@@ -140,37 +141,56 @@ void LLScrollListIcon::setValue(const LLSD& value)
140141
}
141142
}
142143

143-
144144
void LLScrollListIcon::setColor(const LLColor4& color)
145145
{
146146
mColor = color;
147147
}
148148

149+
void LLScrollListIcon::setIconSize(S32 size)
150+
{
151+
mIconSize = size;
152+
}
153+
149154
S32 LLScrollListIcon::getWidth() const
150155
{
151156
// if no specified fix width, use width of icon
152-
if (LLScrollListCell::getWidth() == 0 && mIcon.notNull())
157+
if (LLScrollListCell::getWidth() != 0)
158+
{
159+
return LLScrollListCell::getWidth();
160+
}
161+
if (mIconSize != 0)
162+
{
163+
return mIconSize;
164+
}
165+
if (mIcon.notNull())
153166
{
154167
return mIcon->getWidth();
155168
}
156-
return LLScrollListCell::getWidth();
169+
return 0;
157170
}
158171

159172

160173
void LLScrollListIcon::draw(const LLColor4& color, const LLColor4& highlight_color)
161174
{
162175
if (mIcon)
163176
{
177+
S32 draw_width = mIcon->getWidth();
178+
S32 draw_height = mIcon->getHeight();
179+
if (mIconSize != 0)
180+
{
181+
draw_width = mIconSize;
182+
draw_height = mIconSize;
183+
} // else will draw full icon even if cell is smaller
164184
switch(mAlignment)
165185
{
166186
case LLFontGL::LEFT:
167-
mIcon->draw(0, 0, mColor);
187+
mIcon->draw(0, 0, draw_width, draw_height, mColor);
168188
break;
169189
case LLFontGL::RIGHT:
170-
mIcon->draw(getWidth() - mIcon->getWidth(), 0, mColor);
190+
mIcon->draw(getWidth() - draw_width, 0, draw_width, draw_height, mColor);
171191
break;
172192
case LLFontGL::HCENTER:
173-
mIcon->draw((getWidth() - mIcon->getWidth()) / 2, 0, mColor);
193+
mIcon->draw((getWidth() - draw_width) / 2, 0, draw_width, draw_height, mColor);
174194
break;
175195
default:
176196
break;

indra/llui/llscrolllistcell.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,13 @@ class LLScrollListIcon : public LLScrollListCell
197197
/*virtual*/ const LLSD getValue() const;
198198
/*virtual*/ void setColor(const LLColor4&);
199199
/*virtual*/ void setValue(const LLSD& value);
200+
void setIconSize(S32 size);
200201

201202
private:
202203
LLPointer<LLUIImage> mIcon;
203204
LLColor4 mColor;
204205
LLFontGL::HAlign mAlignment;
206+
S32 mIconSize;
205207
};
206208

207209

indra/newview/CMakeLists.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ set(viewer_SOURCE_FILES
219219
llfloatercreatelandmark.cpp
220220
llfloaterdeleteprefpreset.cpp
221221
llfloaterdestinations.cpp
222+
llfloaterdirectory.cpp
222223
llfloaterdisplayname.cpp
223224
llfloatereditenvironmentbase.cpp
224225
llfloatereditextdaycycle.cpp
@@ -440,11 +441,20 @@ set(viewer_SOURCE_FILES
440441
llpanelblockedlist.cpp
441442
llpanelclassified.cpp
442443
llpanelcontents.cpp
444+
llpaneldirbrowser.cpp
445+
llpaneldirclassified.cpp
446+
llpaneldirevents.cpp
447+
llpaneldirgroups.cpp
448+
llpaneldirland.cpp
449+
llpaneldirpeople.cpp
450+
llpaneldirplaces.cpp
451+
llpaneldirweb.cpp
443452
llpaneleditsky.cpp
444453
llpaneleditwater.cpp
445454
llpaneleditwearable.cpp
446455
llpanelemojicomplete.cpp
447456
llpanelenvironment.cpp
457+
llpaneleventinfo.cpp
448458
llpanelexperiencelisteditor.cpp
449459
llpanelexperiencelog.cpp
450460
llpanelexperiencepicker.cpp
@@ -893,6 +903,7 @@ set(viewer_HEADER_FILES
893903
llfloatercreatelandmark.h
894904
llfloaterdeleteprefpreset.h
895905
llfloaterdestinations.h
906+
llfloaterdirectory.h
896907
llfloaterdisplayname.h
897908
llfloatereditenvironmentbase.h
898909
llfloatereditextdaycycle.h
@@ -1106,11 +1117,20 @@ set(viewer_HEADER_FILES
11061117
llpanelblockedlist.h
11071118
llpanelclassified.h
11081119
llpanelcontents.h
1120+
llpaneldirbrowser.h
1121+
llpaneldirclassified.h
1122+
llpaneldirevents.h
1123+
llpaneldirgroups.h
1124+
llpaneldirland.h
1125+
llpaneldirpeople.h
1126+
llpaneldirplaces.h
1127+
llpaneldirweb.h
11091128
llpaneleditsky.h
11101129
llpaneleditwater.h
11111130
llpaneleditwearable.h
11121131
llpanelemojicomplete.h
11131132
llpanelenvironment.h
1133+
llpaneleventinfo.h
11141134
llpanelexperiencelisteditor.h
11151135
llpanelexperiencelog.h
11161136
llpanelexperiencepicker.h

indra/newview/app_settings/settings.xml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11140,6 +11140,45 @@
1114011140
<key>Value</key>
1114111141
<integer>0</integer>
1114211142
</map>
11143+
<key>ShowPGClassifieds</key>
11144+
<map>
11145+
<key>Comment</key>
11146+
<string>Display results of find classifieds that are flagged as general</string>
11147+
<key>Persist</key>
11148+
<integer>1</integer>
11149+
<key>HideFromEditor</key>
11150+
<integer>1</integer>
11151+
<key>Type</key>
11152+
<string>Boolean</string>
11153+
<key>Value</key>
11154+
<integer>1</integer>
11155+
</map>
11156+
<key>ShowMatureClassifieds</key>
11157+
<map>
11158+
<key>Comment</key>
11159+
<string>Display results of find classifieds that are flagged as moderate</string>
11160+
<key>Persist</key>
11161+
<integer>1</integer>
11162+
<key>HideFromEditor</key>
11163+
<integer>1</integer>
11164+
<key>Type</key>
11165+
<string>Boolean</string>
11166+
<key>Value</key>
11167+
<integer>0</integer>
11168+
</map>
11169+
<key>ShowAdultClassifieds</key>
11170+
<map>
11171+
<key>Comment</key>
11172+
<string>Display results of find classifieds that are flagged as adult</string>
11173+
<key>Persist</key>
11174+
<integer>1</integer>
11175+
<key>HideFromEditor</key>
11176+
<integer>1</integer>
11177+
<key>Type</key>
11178+
<string>Boolean</string>
11179+
<key>Value</key>
11180+
<integer>0</integer>
11181+
</map>
1114311182
<key>ShowPGSims</key>
1114411183
<map>
1114511184
<key>Comment</key>
@@ -11179,6 +11218,54 @@
1117911218
<key>Value</key>
1118011219
<integer>0</integer>
1118111220
</map>
11221+
<key>ShowPGEvents</key>
11222+
<map>
11223+
<key>Comment</key>
11224+
<string>Display results of find events that are flagged as general</string>
11225+
<key>Persist</key>
11226+
<integer>1</integer>
11227+
<key>HideFromEditor</key>
11228+
<integer>1</integer>
11229+
<key>Type</key>
11230+
<string>Boolean</string>
11231+
<key>Value</key>
11232+
<integer>1</integer>
11233+
</map>
11234+
<key>ShowMatureGroups</key>
11235+
<map>
11236+
<key>Comment</key>
11237+
<string>Include groups that are flagged as mature to Search results</string>
11238+
<key>Persist</key>
11239+
<integer>1</integer>
11240+
<key>HideFromEditor</key>
11241+
<integer>1</integer>
11242+
<key>Type</key>
11243+
<string>Boolean</string>
11244+
<key>Value</key>
11245+
<integer>0</integer>
11246+
</map>
11247+
<key>FindLandArea</key>
11248+
<map>
11249+
<key>Comment</key>
11250+
<string>Enables filtering of land search results by area</string>
11251+
<key>Persist</key>
11252+
<integer>1</integer>
11253+
<key>Type</key>
11254+
<string>Boolean</string>
11255+
<key>Value</key>
11256+
<integer>0</integer>
11257+
</map>
11258+
<key>FindLandPrice</key>
11259+
<map>
11260+
<key>Comment</key>
11261+
<string>Enables filtering of land search results by price</string>
11262+
<key>Persist</key>
11263+
<integer>1</integer>
11264+
<key>Type</key>
11265+
<string>Boolean</string>
11266+
<key>Value</key>
11267+
<integer>1</integer>
11268+
</map>
1118211269
<key>ShowNearClip</key>
1118311270
<map>
1118411271
<key>Comment</key>

indra/newview/lleventnotifier.cpp

Lines changed: 57 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,14 @@ bool LLEventNotifier::handleResponse(U32 eventId, const LLSD& notification, cons
166166
return true;
167167
}
168168

169+
bool LLEventNotifier::add(LLEventInfo event)
170+
{
171+
if (mEventInfoSignal(event))
172+
return false;
173+
174+
return add(event.mID, event.mUnixTime, event.mTimeStr, event.mName);
175+
}
176+
169177
bool LLEventNotifier::add(U32 eventId, F64 eventEpoch, const std::string& eventDateStr, const std::string &eventName)
170178
{
171179
LLEventNotification *new_enp = new LLEventNotification(eventId, eventEpoch, eventDateStr, eventName);
@@ -198,20 +206,9 @@ void LLEventNotifier::add(U32 eventId)
198206
//static
199207
void LLEventNotifier::processEventInfoReply(LLMessageSystem *msg, void **)
200208
{
201-
// extract the agent id
202-
LLUUID agent_id;
203-
U32 event_id;
204-
std::string event_name;
205-
std::string eventd_date;
206-
U32 event_time_utc;
207-
208-
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id );
209-
msg->getU32("EventData", "EventID", event_id);
210-
msg->getString("EventData", "Name", event_name);
211-
msg->getString("EventData", "Date", eventd_date);
212-
msg->getU32("EventData", "DateUTC", event_time_utc);
213-
214-
gEventNotifier.add(event_id, (F64)event_time_utc, eventd_date, event_name);
209+
LLEventInfo info;
210+
info.unpack(msg);
211+
gEventNotifier.add(info);
215212
}
216213

217214

@@ -296,6 +293,52 @@ void LLEventNotifier::serverPushRequest(U32 event_id, bool add)
296293
gAgent.sendReliableMessage();
297294
}
298295

296+
void LLEventInfo::unpack(LLMessageSystem* msg)
297+
{
298+
U32 event_id;
299+
msg->getU32("EventData", "EventID", event_id);
300+
mID = event_id;
301+
302+
msg->getString("EventData", "Name", mName);
303+
304+
msg->getString("EventData", "Category", mCategoryStr);
305+
306+
msg->getString("EventData", "Date", mTimeStr);
307+
308+
U32 duration;
309+
msg->getU32("EventData", "Duration", duration);
310+
mDuration = duration;
311+
312+
U32 date;
313+
msg->getU32("EventData", "DateUTC", date);
314+
mUnixTime = date;
315+
316+
msg->getString("EventData", "Desc", mDesc);
317+
318+
std::string buffer;
319+
msg->getString("EventData", "Creator", buffer);
320+
mRunByID = LLUUID(buffer);
321+
322+
U32 foo;
323+
msg->getU32("EventData", "Cover", foo);
324+
325+
mHasCover = foo ? true : false;
326+
if (mHasCover)
327+
{
328+
U32 cover;
329+
msg->getU32("EventData", "Amount", cover);
330+
mCover = cover;
331+
}
332+
333+
msg->getString("EventData", "SimName", mSimName);
334+
335+
msg->getVector3d("EventData", "GlobalPos", mPosGlobal);
336+
337+
// Mature content
338+
U32 event_flags;
339+
msg->getU32("EventData", "EventFlags", event_flags);
340+
mEventFlags = event_flags;
341+
}
299342

300343
LLEventNotification::LLEventNotification(U32 eventId, F64 eventEpoch, const std::string& eventDateStr, const std::string &eventName) :
301344
mEventID(eventId),

indra/newview/lleventnotifier.h

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,24 @@
3333
class LLEventNotification;
3434
class LLMessageSystem;
3535

36+
struct LLEventInfo
37+
{
38+
void unpack(LLMessageSystem* msg);
39+
40+
std::string mName;
41+
U32 mID;
42+
std::string mDesc;
43+
std::string mCategoryStr;
44+
U32 mDuration;
45+
std::string mTimeStr;
46+
LLUUID mRunByID;
47+
std::string mSimName;
48+
LLVector3d mPosGlobal;
49+
F64 mUnixTime; // seconds from 1970
50+
BOOL mHasCover;
51+
U32 mCover;
52+
U32 mEventFlags;
53+
};
3654

3755
class LLEventNotifier
3856
{
@@ -42,6 +60,7 @@ class LLEventNotifier
4260

4361
void update(); // Notify the user of the event if it's coming up
4462
bool add(U32 eventId, F64 eventEpoch, const std::string& eventDateStr, const std::string &eventName);
63+
bool add(LLEventInfo event);
4564
void add(U32 eventId);
4665

4766

@@ -56,9 +75,13 @@ class LLEventNotifier
5675

5776
static void processEventInfoReply(LLMessageSystem *msg, void **);
5877

78+
typedef boost::signals2::signal<bool(LLEventInfo event)> info_received_signal_t;
79+
boost::signals2::connection setEventInfoCallback(const info_received_signal_t::slot_type& cb) { return mEventInfoSignal.connect(cb); };
80+
5981
protected:
6082
en_map mEventNotifications;
61-
LLFrameTimer mNotificationTimer;
83+
LLFrameTimer mNotificationTimer;
84+
info_received_signal_t mEventInfoSignal;
6285
};
6386

6487

0 commit comments

Comments
 (0)