summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/app_settings/keywords.ini3
-rw-r--r--indra/newview/app_settings/settings.xml160
-rw-r--r--indra/newview/llappviewer.cpp3
-rw-r--r--indra/newview/llchatbar.cpp56
-rw-r--r--indra/newview/llfirstuse.cpp9
-rw-r--r--indra/newview/llfloaterbuy.cpp6
-rw-r--r--indra/newview/llfloaterbuy.h2
-rw-r--r--indra/newview/llfloaterchat.cpp14
-rw-r--r--indra/newview/llfloaterfriends.cpp13
-rw-r--r--indra/newview/llfloaterfriends.h4
-rw-r--r--indra/newview/llfloaterpostcard.cpp4
-rw-r--r--indra/newview/llfloatersnapshot.h2
-rw-r--r--indra/newview/llfloatertos.cpp56
-rw-r--r--indra/newview/llfloaterworldmap.cpp16
-rw-r--r--indra/newview/llimpanel.cpp87
-rw-r--r--indra/newview/lloverlaybar.cpp18
-rw-r--r--indra/newview/lloverlaybar.h1
-rw-r--r--indra/newview/llpanelavatar.cpp79
-rw-r--r--indra/newview/llpanelavatar.h7
-rw-r--r--indra/newview/llpanellogin.cpp31
-rw-r--r--indra/newview/llpanelobject.cpp39
-rw-r--r--indra/newview/llpanelobject.h2
-rw-r--r--indra/newview/llstartup.cpp20
-rw-r--r--indra/newview/llstylemap.cpp2
-rw-r--r--indra/newview/lltoolbrush.cpp63
-rw-r--r--indra/newview/llviewerdisplay.cpp2
-rw-r--r--indra/newview/llviewermenu.cpp27
-rw-r--r--indra/newview/llviewermessage.cpp56
-rw-r--r--indra/newview/llviewerwindow.cpp35
-rw-r--r--indra/newview/llviewerwindow.h6
-rw-r--r--indra/newview/llworldmap.cpp10
-rw-r--r--indra/newview/llworldmap.h1
-rw-r--r--indra/newview/llworldmapview.cpp24
-rw-r--r--indra/newview/pipeline.cpp11
-rw-r--r--indra/newview/pipeline.h3
35 files changed, 486 insertions, 386 deletions
diff --git a/indra/newview/app_settings/keywords.ini b/indra/newview/app_settings/keywords.ini
index b6892dc262..23c88dc449 100644
--- a/indra/newview/app_settings/keywords.ini
+++ b/indra/newview/app_settings/keywords.ini
@@ -404,6 +404,9 @@ PRIM_SCULPT_TYPE_SPHERE Stitch edges in a sphere-like way
PRIM_SCULPT_TYPE_TORUS Stitch edges in a torus-like way
PRIM_SCULPT_TYPE_PLANE Do not stitch edges
PRIM_SCULPT_TYPE_CYLINDER Stitch edges in a cylinder-like way
+PRIM_SCULPT_TYPE_MASK Mask used to determine stitching type
+PRIM_SCULPT_FLAG_INVERT Flag to specify that the surface normals should be inverted
+PRIM_SCULPT_FLAG_MIRROR Flag to specify that the prim should be reflected along X axis
MASK_BASE Base permissions
MASK_OWNER Owner permissions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index fd4f293d66..120c2b7ab1 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -23,6 +23,22 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>UserChatColor</key>
+ <map>
+ <key>Comment</key>
+ <string>Color of your chat messages</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Color4</string>
+ <key>Value</key>
+ <array>
+ <real>0.0196078431372</real>
+ <real>0.6862745098039</real>
+ <real>0.9803921568627</real>
+ <real>1</real>
+ </array>
+ </map>
<key>AgentChatColor</key>
<map>
<key>Comment</key>
@@ -1090,16 +1106,16 @@
<real>0.5</real>
</map>
<key>ChatFontSize</key>
- <map>
- <key>Comment</key>
- <string>Size of chat text in chat console (0 = small, 1 = medium, 2 = big)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
+ <map>
+ <key>Comment</key>
+ <string>Size of chat text in chat console (0 = small, 1 = big)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>ChatFullWidth</key>
<map>
<key>Comment</key>
@@ -1134,16 +1150,16 @@
<integer>1</integer>
</map>
<key>ChatPersistTime</key>
- <map>
- <key>Comment</key>
- <string>Time for which chat stays visible in console (seconds)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>20</real>
- </map>
+ <map>
+ <key>Comment</key>
+ <string>Time for which chat stays visible in console (seconds)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>20.0</real>
+ </map>
<key>ChatShowTimestamps</key>
<map>
<key>Comment</key>
@@ -1867,16 +1883,16 @@
<integer>0</integer>
</map>
<key>ConsoleBackgroundOpacity</key>
- <map>
- <key>Comment</key>
- <string>Opacity of chat console (0.0 = completely transparent, 1.0 = completely opaque)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>0.700</real>
- </map>
+ <map>
+ <key>Comment</key>
+ <string>Opacity of chat console (0.0 = completely transparent, 1.0 = completely opaque)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>0.700</real>
+ </map>
<key>ConsoleBufferSize</key>
<map>
<key>Comment</key>
@@ -2605,7 +2621,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>speaker_name</string>
+ <string>speaking_status</string>
</map>
<key>FloaterAdvancedSkyRect</key>
<map>
@@ -4505,17 +4521,6 @@
<key>Value</key>
<real>128.0</real>
</map>
- <key>MapShowClassifieds</key>
- <map>
- <key>Comment</key>
- <string>Show locations associated with classified ads on world map</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>MapShowEvents</key>
<map>
<key>Comment</key>
@@ -5049,21 +5054,21 @@
<integer>0</integer>
</map>
<key>ObjectChatColor</key>
- <map>
- <key>Comment</key>
- <string>Color of chat messages from objects</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1</real>
- <real>0.5</real>
- <real>0.0</real>
- <real>1</real>
- </array>
- </map>
+ <map>
+ <key>Comment</key>
+ <string>Color of chat messages from objects</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Color4</string>
+ <key>Value</key>
+ <array>
+ <real>1</real>
+ <real>0.5</real>
+ <real>0.0</real>
+ <real>1</real>
+ </array>
+ </map>
<key>OpenDebugStatAdvanced</key>
<map>
<key>Comment</key>
@@ -7056,17 +7061,28 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>ShowObjectUpdates</key>
+ <key>ShowInInventory</key>
<map>
<key>Comment</key>
- <string>Show when update messages are received for individual objects</string>
+ <string>Automatically opens inventory to show accepted objects</string>
<key>Persist</key>
- <integer>0</integer>
+ <integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
- <integer>0</integer>
+ <integer>1</integer>
</map>
+ <key>ShowObjectUpdates</key>
+ <map>
+ <key>Comment</key>
+ <string>Show when update messages are received for individual objects</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>ShowOverlayTitle</key>
<map>
<key>Comment</key>
@@ -7393,6 +7409,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>SnapshotFormat</key>
+ <map>
+ <key>Comment</key>
+ <string>Save snapshots in this format (0 = PNG, 1 = JPEG, 2 = BMP)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>SnapshotLocalLastResolution</key>
<map>
<key>Comment</key>
@@ -7404,17 +7431,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>SnapshotFormat</key>
- <map>
- <key>Comment</key>
- <string>Save snapshots in this format (0 = PNG, 1 = JPEG, 2 = BMP)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>SnapshotPostcardLastResolution</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 211182f2b5..b3458f80da 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -855,6 +855,9 @@ bool LLAppViewer::init()
bool LLAppViewer::mainLoop()
{
+ mMainloopTimeout = new LLWatchdogTimeout();
+ // *FIX:Mani - Make this a setting, once new settings exist in this branch.
+
//-------------------------------------------
// Run main loop until time to quit
//-------------------------------------------
diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp
index fac934a3bb..2e542995d4 100644
--- a/indra/newview/llchatbar.cpp
+++ b/indra/newview/llchatbar.cpp
@@ -378,40 +378,40 @@ LLWString LLChatBar::stripChannelNumber(const LLWString &mesg, S32* channel)
void LLChatBar::sendChat( EChatType type )
{
- LLWString text;
- if (mInputEditor) text = mInputEditor->getWText();
- LLWStringUtil::trim(text);
- LLWStringUtil::replaceChar(text,182,'\n'); // Convert paragraph symbols back into newlines.
-
- if (!text.empty())
+ if (mInputEditor)
{
- // store sent line in history, duplicates will get filtered
- if (mInputEditor) mInputEditor->updateHistory();
- // Check if this is destined for another channel
- S32 channel = 0;
- stripChannelNumber(text, &channel);
-
- std::string utf8text = wstring_to_utf8str(text);
- // Try to trigger a gesture, if not chat to a script.
- std::string utf8_revised_text;
- if (0 == channel)
- {
- // discard returned "found" boolean
- gGestureManager.triggerAndReviseString(utf8text, &utf8_revised_text);
- }
- else
+ LLWString text = mInputEditor->getConvertedText();
+ if (!text.empty())
{
- utf8_revised_text = utf8text;
- }
+ // store sent line in history, duplicates will get filtered
+ if (mInputEditor) mInputEditor->updateHistory();
+ // Check if this is destined for another channel
+ S32 channel = 0;
+ stripChannelNumber(text, &channel);
+
+ std::string utf8text = wstring_to_utf8str(text);
+ // Try to trigger a gesture, if not chat to a script.
+ std::string utf8_revised_text;
+ if (0 == channel)
+ {
+ // discard returned "found" boolean
+ gGestureManager.triggerAndReviseString(utf8text, &utf8_revised_text);
+ }
+ else
+ {
+ utf8_revised_text = utf8text;
+ }
- utf8_revised_text = utf8str_trim(utf8_revised_text);
+ utf8_revised_text = utf8str_trim(utf8_revised_text);
- if (!utf8_revised_text.empty())
- {
- // Chat with animation
- sendChatFromViewer(utf8_revised_text, type, TRUE);
+ if (!utf8_revised_text.empty())
+ {
+ // Chat with animation
+ sendChatFromViewer(utf8_revised_text, type, TRUE);
+ }
}
}
+
childSetValue("Chat Editor", LLStringUtil::null);
gAgent.stopTyping();
diff --git a/indra/newview/llfirstuse.cpp b/indra/newview/llfirstuse.cpp
index 6c956a1ed0..475473abe7 100644
--- a/indra/newview/llfirstuse.cpp
+++ b/indra/newview/llfirstuse.cpp
@@ -42,6 +42,7 @@
#include "llviewercontrol.h"
#include "llui.h"
#include "llappviewer.h"
+#include "lltracker.h"
// static
std::set<std::string> LLFirstUse::sConfigVariables;
@@ -162,9 +163,13 @@ void LLFirstUse::useTeleport()
{
if (gSavedSettings.getWarning("FirstTeleport"))
{
- gSavedSettings.setWarning("FirstTeleport", FALSE);
+ LLVector3d teleportDestination = LLTracker::getTrackedPositionGlobal();
+ if(teleportDestination != LLVector3d::zero)
+ {
+ gSavedSettings.setWarning("FirstTeleport", FALSE);
- LLNotifyBox::showXml("FirstTeleport");
+ LLNotifyBox::showXml("FirstTeleport");
+ }
}
}
diff --git a/indra/newview/llfloaterbuy.cpp b/indra/newview/llfloaterbuy.cpp
index e64f218457..ed2cc2b7c3 100644
--- a/indra/newview/llfloaterbuy.cpp
+++ b/indra/newview/llfloaterbuy.cpp
@@ -194,7 +194,6 @@ void LLFloaterBuy::show(const LLSaleInfo& sale_info)
sInstance->requestVOInventory();
}
-
void LLFloaterBuy::inventoryChanged(LLViewerObject* obj,
InventoryObjectList* inv,
S32 serial_num,
@@ -290,6 +289,11 @@ void LLFloaterBuy::inventoryChanged(LLViewerObject* obj,
removeVOInventoryListener();
}
+void LLFloaterBuy::close(bool app_quitting)
+{
+ LLSelectMgr::getInstance()->deselectAll();
+ LLFloater::close(app_quitting);
+}
// static
void LLFloaterBuy::onClickBuy(void*)
diff --git a/indra/newview/llfloaterbuy.h b/indra/newview/llfloaterbuy.h
index 7f18a894e7..1506b465d6 100644
--- a/indra/newview/llfloaterbuy.h
+++ b/indra/newview/llfloaterbuy.h
@@ -65,6 +65,8 @@ protected:
S32 serial_num,
void* data);
+ /*virtual*/ void close(bool app_quitting = false);
+
static void onClickBuy(void*);
static void onClickCancel(void*);
diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp
index 745e7766f2..ba02ccc320 100644
--- a/indra/newview/llfloaterchat.cpp
+++ b/indra/newview/llfloaterchat.cpp
@@ -205,9 +205,10 @@ void add_timestamped_line(LLViewerTextEditor* edit, const LLChat &chat, const LL
chat.mFromID != LLUUID::null &&
(line.length() > chat.mFromName.length() && line.find(chat.mFromName,0) == 0))
{
- line = line.substr(chat.mFromName.length());
+ std::string start_line = line.substr(0, chat.mFromName.length() + 1);
+ line = line.substr(chat.mFromName.length() + 1);
const LLStyleSP &sourceStyle = LLStyleMap::instance().lookup(chat.mFromID);
- edit->appendStyledText(chat.mFromName, false, prepend_newline, &sourceStyle);
+ edit->appendStyledText(start_line, false, prepend_newline, &sourceStyle);
prepend_newline = false;
}
edit->appendColoredText(line, false, prepend_newline, color);
@@ -420,7 +421,14 @@ LLColor4 get_text_color(const LLChat& chat)
}
else
{
- text_color = gSavedSettings.getColor4("AgentChatColor");
+ if(gAgent.getID() == chat.mFromID)
+ {
+ text_color = gSavedSettings.getColor4("UserChatColor");
+ }
+ else
+ {
+ text_color = gSavedSettings.getColor4("AgentChatColor");
+ }
}
break;
case CHAT_SOURCE_OBJECT:
diff --git a/indra/newview/llfloaterfriends.cpp b/indra/newview/llfloaterfriends.cpp
index 46727c3698..c5823ce0de 100644
--- a/indra/newview/llfloaterfriends.cpp
+++ b/indra/newview/llfloaterfriends.cpp
@@ -573,16 +573,15 @@ void LLPanelFriends::onClickIM(void* user_data)
}
// static
-void LLPanelFriends::requestFriendship(const LLUUID& target_id, const std::string& target_name)
+void LLPanelFriends::requestFriendship(const LLUUID& target_id, const std::string& target_name, const std::string& message)
{
- // HACK: folder id stored as "message"
LLUUID calling_card_folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_CALLINGCARD);
- std::string message = calling_card_folder_id.asString();
send_improved_im(target_id,
target_name,
message,
IM_ONLINE,
- IM_FRIENDSHIP_OFFERED);
+ IM_FRIENDSHIP_OFFERED,
+ calling_card_folder_id);
}
struct LLAddFriendData
@@ -592,12 +591,12 @@ struct LLAddFriendData
};
// static
-void LLPanelFriends::callbackAddFriend(S32 option, void* data)
+void LLPanelFriends::callbackAddFriend(S32 option, const std::string& text, void* data)
{
LLAddFriendData* add = (LLAddFriendData*)data;
if (option == 0)
{
- requestFriendship(add->mID, add->mName);
+ requestFriendship(add->mID, add->mName, text);
}
delete add;
}
@@ -629,7 +628,7 @@ void LLPanelFriends::requestFriendshipDialog(const LLUUID& id,
// TODO: accept a line of text with this dialog
LLStringUtil::format_map_t args;
args["[NAME]"] = name;
- gViewerWindow->alertXml("AddFriend", args, callbackAddFriend, data);
+ gViewerWindow->alertXmlEditText("AddFriend", args, NULL, NULL, callbackAddFriend, data);
}
// static
diff --git a/indra/newview/llfloaterfriends.h b/indra/newview/llfloaterfriends.h
index d934faa616..c8cdce49a7 100644
--- a/indra/newview/llfloaterfriends.h
+++ b/indra/newview/llfloaterfriends.h
@@ -80,7 +80,7 @@ public:
// Just request friendship, no dialog.
static void requestFriendship(const LLUUID& target_id,
- const std::string& target_name);
+ const std::string& target_name, const std::string& message);
private:
@@ -119,7 +119,7 @@ private:
// callback methods
static void onSelectName(LLUICtrl* ctrl, void* user_data);
- static void callbackAddFriend(S32 option, void* user_data);
+ static void callbackAddFriend(S32 option, const std::string& text, void* user_data);
static void onPickAvatar(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* user_data);
static void onMaximumSelect(void* user_data);
diff --git a/indra/newview/llfloaterpostcard.cpp b/indra/newview/llfloaterpostcard.cpp
index 790a5c0743..d97023e256 100644
--- a/indra/newview/llfloaterpostcard.cpp
+++ b/indra/newview/llfloaterpostcard.cpp
@@ -392,10 +392,10 @@ void LLFloaterPostcard::sendPostcard()
{
gAssetStorage->storeAssetData(mTransactionID, LLAssetType::AT_IMAGE_JPEG, &uploadCallback, (void *)this, FALSE);
}
-
+
// give user feedback of the event
gViewerWindow->playSnapshotAnimAndSound();
- LLUploadDialog::modalUploadDialog("Uploading...\n\nPostcard");
+ LLUploadDialog::modalUploadDialog(getString("upload_message"));
// don't destroy the window until the upload is done
// this way we keep the information in the form
diff --git a/indra/newview/llfloatersnapshot.h b/indra/newview/llfloatersnapshot.h
index bbf5c9e40b..407a5ef02c 100644
--- a/indra/newview/llfloatersnapshot.h
+++ b/indra/newview/llfloatersnapshot.h
@@ -49,7 +49,7 @@ public:
SNAPSHOT_FORMAT_BMP
} ESnapshotFormat;
- LLFloaterSnapshot();
+ LLFloaterSnapshot();
virtual ~LLFloaterSnapshot();
/*virtual*/ BOOL postBuild();
diff --git a/indra/newview/llfloatertos.cpp b/indra/newview/llfloatertos.cpp
index 5ace957694..ad592f909e 100644
--- a/indra/newview/llfloatertos.cpp
+++ b/indra/newview/llfloatertos.cpp
@@ -127,50 +127,38 @@ BOOL LLFloaterTOS::postBuild()
{
childSetAction("Continue", onContinue, this);
childSetAction("Cancel", onCancel, this);
- childSetCommitCallback("tos_agreement", updateAgree, this);
+ childSetCommitCallback("agree_chk", updateAgree, this);
if ( mType != TOS_TOS )
{
// this displays the critical message
- LLTextEditor *Editor = getChild<LLTextEditor>("tos_text");
- if (Editor)
- {
- Editor->setHandleEditKeysDirectly( TRUE );
- Editor->setEnabled( FALSE );
- Editor->setReadOnlyFgColor(LLColor4::white);
- Editor->setWordWrap(TRUE);
- Editor->setFocus(TRUE);
- }
- childSetValue("tos_text", LLSD(mMessage));
+ LLTextEditor *editor = getChild<LLTextEditor>("tos_text");
+ editor->setHandleEditKeysDirectly( TRUE );
+ editor->setEnabled( FALSE );
+ editor->setWordWrap(TRUE);
+ editor->setFocus(TRUE);
+ editor->setValue(LLSD(mMessage));
+
return TRUE;
}
// disable Agree to TOS radio button until the page has fully loaded
- LLRadioGroup* tos_agreement = getChild<LLRadioGroup>("tos_agreement");
- if ( tos_agreement )
- {
- tos_agreement->setEnabled( false );
- };
+ LLCheckBoxCtrl* tos_agreement = getChild<LLCheckBoxCtrl>("agree_chk");
+ tos_agreement->setEnabled( false );
// hide the SL text widget if we're displaying TOS with using a browser widget.
LLTextEditor *editor = getChild<LLTextEditor>("tos_text");
- if ( editor )
- {
- editor->setVisible( FALSE );
- };
+ editor->setVisible( FALSE );
LLWebBrowserCtrl* web_browser = getChild<LLWebBrowserCtrl>("tos_html");
if ( web_browser )
{
// start to observe it so we see navigate complete events
- if ( web_browser )
- {
- web_browser->addObserver( this );
- };
+ web_browser->addObserver( this );
gResponsePtr = LLIamHere::build( this );
LLHTTPClient::get( getString( "real_url" ), gResponsePtr );
- };
+ }
return TRUE;
}
@@ -194,11 +182,8 @@ void LLFloaterTOS::setSiteIsAlive( bool alive )
{
// normally this is set when navigation to TOS page navigation completes (so you can't accept before TOS loads)
// but if the page is unavailable, we need to do this now
- LLRadioGroup* tos_agreement = getChild<LLRadioGroup>("tos_agreement");
- if ( tos_agreement )
- {
- tos_agreement->setEnabled( true );
- };
+ LLCheckBoxCtrl* tos_agreement = getChild<LLCheckBoxCtrl>("agree_chk");
+ tos_agreement->setEnabled( true );
if ( web_browser )
{
@@ -236,8 +221,8 @@ void LLFloaterTOS::draw()
void LLFloaterTOS::updateAgree(LLUICtrl*, void* userdata )
{
LLFloaterTOS* self = (LLFloaterTOS*) userdata;
- std::string agree = self->childGetValue("tos_agreement").asString();
- self->childSetEnabled("Continue", (agree == "radio_agree") );
+ bool agree = self->childGetValue("agree_chk").asBoolean();
+ self->childSetEnabled("Continue", agree);
}
// static
@@ -286,10 +271,7 @@ void LLFloaterTOS::onNavigateComplete( const EventType& eventIn )
{
llinfos << "NAVIGATE COMPLETE" << llendl;
// enable Agree to TOS radio button now that page has loaded
- LLRadioGroup* tos_agreement = getChild<LLRadioGroup>("tos_agreement");
- if ( tos_agreement )
- {
- tos_agreement->setEnabled( true );
- };
+ LLCheckBoxCtrl * tos_agreement = getChild<LLCheckBoxCtrl>("agree_chk");
+ tos_agreement->setEnabled( true );
};
}
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index d26acaa892..89c91bbf2b 100644
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -398,12 +398,18 @@ BOOL LLFloaterWorldMap::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
if (!isMinimized() && isFrontmost())
{
- F32 slider_value = (F32)childGetValue("zoom slider").asReal();
- slider_value += ((F32)clicks * -0.3333f);
- childSetValue("zoom slider", LLSD(slider_value));
- return TRUE;
+ LLRect area;
+ childGetRect("search_results", area);
+ if(!area.pointInRect(x, y))
+ {
+ F32 slider_value = (F32)childGetValue("zoom slider").asReal();
+ slider_value += ((F32)clicks * -0.3333f);
+ childSetValue("zoom slider", LLSD(slider_value));
+ return TRUE;
+ }
}
- return FALSE;
+
+ return LLFloater::handleScrollWheel(x, y, clicks);
}
diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp
index 328cb85c1f..ca5dd7be36 100644
--- a/indra/newview/llimpanel.cpp
+++ b/indra/newview/llimpanel.cpp
@@ -1238,6 +1238,7 @@ BOOL LLFloaterIMPanel::postBuild()
mInputEditor->setCallbackUserData(this);
mInputEditor->setCommitOnFocusLost( FALSE );
mInputEditor->setRevertOnEsc( FALSE );
+ mInputEditor->setReplaceNewlinesWithSpaces( FALSE );
childSetAction("profile_callee_btn", onClickProfile, this);
childSetAction("group_info_btn", onClickGroupInfo, this);
@@ -1925,8 +1926,6 @@ void deliver_message(const std::string& utf8_text,
void LLFloaterIMPanel::sendMsg()
{
- LLWString text = mInputEditor->getWText();
- LLWStringUtil::trim(text);
if (!gAgent.isGodlike()
&& (mDialog == IM_NOTHING_SPECIAL)
&& mOtherParticipantUUID.isNull())
@@ -1934,57 +1933,63 @@ void LLFloaterIMPanel::sendMsg()
llinfos << "Cannot send IM to everyone unless you're a god." << llendl;
return;
}
- if(text.length() > 0)
- {
- // Truncate and convert to UTF8 for transport
- std::string utf8_text = wstring_to_utf8str(text);
- utf8_text = utf8str_truncate(utf8_text, MAX_MSG_BUF_SIZE - 1);
- if ( mSessionInitialized )
+ if (mInputEditor)
+ {
+ LLWString text = mInputEditor->getConvertedText();
+ if(!text.empty())
{
- deliver_message(utf8_text,
- mSessionUUID,
- mOtherParticipantUUID,
- mDialog);
-
- // local echo
- if((mDialog == IM_NOTHING_SPECIAL) &&
- (mOtherParticipantUUID.notNull()))
+ // Truncate and convert to UTF8 for transport
+ std::string utf8_text = wstring_to_utf8str(text);
+ utf8_text = utf8str_truncate(utf8_text, MAX_MSG_BUF_SIZE - 1);
+
+ if ( mSessionInitialized )
{
- std::string history_echo;
- gAgent.buildFullname(history_echo);
-
- // Look for IRC-style emotes here.
- std::string prefix = utf8_text.substr(0, 4);
- if (prefix == "/me " || prefix == "/me'")
+ deliver_message(utf8_text,
+ mSessionUUID,
+ mOtherParticipantUUID,
+ mDialog);
+
+ // local echo
+ if((mDialog == IM_NOTHING_SPECIAL) &&
+ (mOtherParticipantUUID.notNull()))
{
- utf8_text.replace(0,3,"");
- }
- else
- {
- history_echo += ": ";
- }
- history_echo += utf8_text;
+ std::string history_echo;
+ gAgent.buildFullname(history_echo);
- BOOL other_was_typing = mOtherTyping;
+ // Look for IRC-style emotes here.
+ std::string prefix = utf8_text.substr(0, 4);
+ if (prefix == "/me " || prefix == "/me'")
+ {
+ utf8_text.replace(0,3,"");
+ }
+ else
+ {
+ history_echo += ": ";
+ }
+ history_echo += utf8_text;
- addHistoryLine(history_echo, gSavedSettings.getColor("IMChatColor"), true, gAgent.getID());
+ BOOL other_was_typing = mOtherTyping;
- if (other_was_typing)
- {
- addTypingIndicator(mOtherTypingName);
- }
+ addHistoryLine(history_echo, gSavedSettings.getColor("IMChatColor"), true, gAgent.getID());
+ if (other_was_typing)
+ {
+ addTypingIndicator(mOtherTypingName);
+ }
+
+ }
+ }
+ else
+ {
+ //queue up the message to send once the session is
+ //initialized
+ mQueuedMsgsForInit.append(utf8_text);
}
- }
- else
- {
- //queue up the message to send once the session is
- //initialized
- mQueuedMsgsForInit.append(utf8_text);
}
LLViewerStats::getInstance()->incStat(LLViewerStats::ST_IM_COUNT);
+
}
mInputEditor->setText(LLStringUtil::null);
diff --git a/indra/newview/lloverlaybar.cpp b/indra/newview/lloverlaybar.cpp
index 483793cfad..7162c2e925 100644
--- a/indra/newview/lloverlaybar.cpp
+++ b/indra/newview/lloverlaybar.cpp
@@ -120,7 +120,6 @@ BOOL LLOverlayBar::postBuild()
{
childSetAction("IM Received",onClickIMReceived,this);
childSetAction("Set Not Busy",onClickSetNotBusy,this);
- childSetAction("Release Keys",onClickReleaseKeys,this);
childSetAction("Mouselook",onClickMouselook,this);
childSetAction("Stand Up",onClickStandUp,this);
childSetVisible("chat_bar", gSavedSettings.getBOOL("ChatVisible"));
@@ -210,17 +209,6 @@ void LLOverlayBar::refresh()
buttons_changed = TRUE;
}
- BOOL controls_grabbed = gAgent.anyControlGrabbed();
- button = getChild<LLButton>("Release Keys");
-
- if (button && button->getVisible() != controls_grabbed)
- {
- button->setVisible(controls_grabbed);
- sendChildToFront(button);
- moveChildToBackOfTabGroup(button);
- buttons_changed = TRUE;
- }
-
BOOL mouselook_grabbed;
mouselook_grabbed = gAgent.isControlGrabbed(CONTROL_ML_LBUTTON_DOWN_INDEX)
|| gAgent.isControlGrabbed(CONTROL_ML_LBUTTON_UP_INDEX);
@@ -296,12 +284,6 @@ void LLOverlayBar::onClickSetNotBusy(void*)
// static
-void LLOverlayBar::onClickReleaseKeys(void*)
-{
- gAgent.forceReleaseControls();
-}
-
-// static
void LLOverlayBar::onClickResetView(void* data)
{
handle_reset_view();
diff --git a/indra/newview/lloverlaybar.h b/indra/newview/lloverlaybar.h
index 0ccb1b517b..581effa56b 100644
--- a/indra/newview/lloverlaybar.h
+++ b/indra/newview/lloverlaybar.h
@@ -68,7 +68,6 @@ public:
static void onClickIMReceived(void* data);
static void onClickSetNotBusy(void* data);
- static void onClickReleaseKeys(void* data);
static void onClickMouselook(void* data);
static void onClickStandUp(void* data);
static void onClickResetView(void* data);
diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp
index 7162f9dc53..7d66da30e5 100644
--- a/indra/newview/llpanelavatar.cpp
+++ b/indra/newview/llpanelavatar.cpp
@@ -459,9 +459,9 @@ BOOL LLPanelAvatarNotes::postBuild(void)
BOOL LLPanelAvatarWeb::postBuild(void)
{
- childSetAction("load",onClickLoad,this);
- childSetAction("open",onClickOpen,this);
- childSetAction("home",onClickLoad,this);
+ childSetKeystrokeCallback("url_edit", onURLKeystroke, this);
+ childSetCommitCallback("load", onCommitLoad, this);
+
childSetAction("web_profile_help",onClickWebProfileHelp,this);
childSetCommitCallback("url_edit",onCommitURL,this);
@@ -544,31 +544,26 @@ LLPanelAvatarWeb::~LLPanelAvatarWeb()
void LLPanelAvatarWeb::enableControls(BOOL self)
{
childSetEnabled("url_edit",self);
- childSetVisible("status_text",!self && !mURL.empty());
+ childSetVisible("status_text",!self && !mHome.empty());
childSetText("status_text", LLStringUtil::null);
}
void LLPanelAvatarWeb::setWebURL(std::string url)
{
- bool changed_url = (mURL != url);
+ bool changed_url = (mHome != url);
- mURL = url;
- bool have_url = !mURL.empty();
+ mHome = url;
+ bool have_url = !mHome.empty();
- childSetText("url_edit",mURL);
-
- childSetEnabled("load",have_url);
- childSetEnabled("open",have_url);
-
- childSetVisible("home",false);
- childSetVisible("load",true);
+ childSetText("url_edit", mHome);
+ childSetEnabled("load", mHome.length() > 0);
if (have_url
&& gSavedSettings.getBOOL("AutoLoadWebProfiles"))
{
if (changed_url)
{
- load();
+ load(mHome);
}
}
else
@@ -577,7 +572,7 @@ void LLPanelAvatarWeb::setWebURL(std::string url)
}
BOOL own_avatar = (getPanelAvatar()->getAvatarID() == gAgent.getID() );
- childSetVisible("status_text",!own_avatar && !mURL.empty());
+ childSetVisible("status_text",!own_avatar && !mHome.empty());
}
@@ -607,47 +602,45 @@ void LLPanelAvatarWeb::load(std::string url)
mWebBrowser->navigateTo( url );
}
- // If we have_url then we loaded so use the home button
- // Or if the url in address bar is not the home url show the home button.
- bool use_home = (have_url
- || url != mURL);
-
- childSetVisible("profile_html",have_url);
- childSetVisible("load",!use_home);
- childSetVisible("home",use_home);
-
- childSetEnabled("load",!use_home);
- childSetEnabled("home",use_home);
- childSetEnabled("open",have_url);
-
-}
-
-void LLPanelAvatarWeb::load()
-{
- load(mURL);
+ childSetVisible("profile_html", have_url);
}
-// static
-void LLPanelAvatarWeb::onClickLoad(void* data)
+//static
+void LLPanelAvatarWeb::onURLKeystroke(LLLineEditor* editor, void* data)
{
LLPanelAvatarWeb* self = (LLPanelAvatarWeb*)data;
-
if (!self) return;
-
- self->load();
+ LLSD::String url = editor->getText();
+ self->childSetEnabled("load", url.length() > 0);
+ return;
}
// static
-void LLPanelAvatarWeb::onClickOpen(void* data)
+void LLPanelAvatarWeb::onCommitLoad(LLUICtrl* ctrl, void* data)
{
LLPanelAvatarWeb* self = (LLPanelAvatarWeb*)data;
if (!self) return;
- std::string url = self->childGetText("url_edit");
- if (!url.empty())
+ LLSD::String valstr = ctrl->getValue().asString();
+ LLSD::String urlstr = self->childGetText("url_edit");
+ if (valstr == "") // load url string into browser panel
+ {
+ self->load(urlstr);
+ }
+ else if (valstr == "open") // open in user's external browser
{
- LLWeb::loadURLExternal(url);
+ if (!urlstr.empty())
+ {
+ LLWeb::loadURLExternal(urlstr);
+ }
+ }
+ else if (valstr == "home") // reload profile owner's home page
+ {
+ if (!self->mHome.empty())
+ {
+ self->load(self->mHome);
+ }
}
}
diff --git a/indra/newview/llpanelavatar.h b/indra/newview/llpanelavatar.h
index 5aadb5c6d7..833b124389 100644
--- a/indra/newview/llpanelavatar.h
+++ b/indra/newview/llpanelavatar.h
@@ -147,10 +147,9 @@ public:
void setWebURL(std::string url);
- void load();
void load(std::string url);
- static void onClickLoad(void* data);
- static void onClickOpen(void* data);
+ static void onURLKeystroke(LLLineEditor* editor, void* data);
+ static void onCommitLoad(LLUICtrl* ctrl, void* data);
static void onCommitURL(LLUICtrl* ctrl, void* data);
static void onClickWebProfileHelp(void *);
@@ -159,7 +158,7 @@ public:
virtual void onLocationChange( const EventType& eventIn );
private:
- std::string mURL;
+ std::string mHome;
LLWebBrowserCtrl* mWebBrowser;
};
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index b73dcfc40b..d01721984a 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -433,6 +433,9 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
LLTextBox* forgot_password_text = getChild<LLTextBox>("forgot_password_text");
forgot_password_text->setClickedCallback(onClickForgotPassword);
+
+ LLTextBox* create_new_account_text = getChild<LLTextBox>("create_new_account_text");
+ create_new_account_text->setClickedCallback(onClickNewAccount);
#endif
// get the web browser control
@@ -1063,9 +1066,15 @@ void LLPanelLogin::onClickConnect(void *)
}
else
{
- // empty first or last name
- // same as clicking new account
- onClickNewAccount(NULL);
+ if (gHideLinks)
+ {
+ gViewerWindow->alertXml("MustHaveAccountToLogInNoLinks");
+ }
+ else
+ {
+ gViewerWindow->alertXml("MustHaveAccountToLogIn",
+ LLPanelLogin::newAccountAlertCallback);
+ }
}
}
}
@@ -1077,7 +1086,7 @@ void LLPanelLogin::newAccountAlertCallback(S32 option, void*)
if (0 == option)
{
llinfos << "Going to account creation URL" << llendl;
- LLWeb::loadURL( CREATE_ACCOUNT_URL );
+ LLWeb::loadURLExternal( CREATE_ACCOUNT_URL );
}
else
{
@@ -1089,15 +1098,7 @@ void LLPanelLogin::newAccountAlertCallback(S32 option, void*)
// static
void LLPanelLogin::onClickNewAccount(void*)
{
- if (gHideLinks)
- {
- gViewerWindow->alertXml("MustHaveAccountToLogInNoLinks");
- }
- else
- {
- gViewerWindow->alertXml("MustHaveAccountToLogIn",
- LLPanelLogin::newAccountAlertCallback);
- }
+ LLWeb::loadURLExternal( CREATE_ACCOUNT_URL );
}
@@ -1121,15 +1122,15 @@ void LLPanelLogin::onClickVersion(void*)
LLFloaterAbout::show(NULL);
}
+//static
void LLPanelLogin::onClickForgotPassword(void*)
{
if (sInstance )
{
- LLWeb::loadURL(sInstance->getString( "forgot_password_url" ));
+ LLWeb::loadURLExternal(sInstance->getString( "forgot_password_url" ));
}
}
-
// static
void LLPanelLogin::onPassKey(LLLineEditor* caller, void* user_data)
{
diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp
index d3fb041bad..d54de05d23 100644
--- a/indra/newview/llpanelobject.cpp
+++ b/indra/newview/llpanelobject.cpp
@@ -289,9 +289,12 @@ BOOL LLPanelObject::postBuild()
}
mLabelSculptType = getChild<LLTextBox>("label sculpt type");
- mCtrlSculptType = getChild<LLComboBox>( "sculpt type control");
+ mCtrlSculptType = getChild<LLComboBox>("sculpt type control");
childSetCommitCallback("sculpt type control", onCommitSculptType, this);
-
+ mCtrlSculptMirror = getChild<LLCheckBoxCtrl>("sculpt mirror control");
+ childSetCommitCallback("sculpt mirror control", onCommitSculptType, this);
+ mCtrlSculptInvert = getChild<LLCheckBoxCtrl>("sculpt invert control");
+ childSetCommitCallback("sculpt invert control", onCommitSculptType, this);
// Start with everyone disabled
clearCtrls();
@@ -1057,6 +1060,8 @@ void LLPanelObject::getState( )
mCtrlSculptTexture->setVisible(sculpt_texture_visible);
mLabelSculptType->setVisible(sculpt_texture_visible);
mCtrlSculptType->setVisible(sculpt_texture_visible);
+ mCtrlSculptMirror->setVisible(sculpt_texture_visible);
+ mCtrlSculptInvert->setVisible(sculpt_texture_visible);
// sculpt texture
@@ -1086,12 +1091,29 @@ void LLPanelObject::getState( )
mTextureCtrl->setImageAssetID(LLUUID::null);
}
+ U8 sculpt_type = sculpt_params->getSculptType();
+ U8 sculpt_stitching = sculpt_type & LL_SCULPT_TYPE_MASK;
+ BOOL sculpt_invert = sculpt_type & LL_SCULPT_FLAG_INVERT;
+ BOOL sculpt_mirror = sculpt_type & LL_SCULPT_FLAG_MIRROR;
+
if (mCtrlSculptType)
{
- mCtrlSculptType->setCurrentByIndex(sculpt_params->getSculptType());
+ mCtrlSculptType->setCurrentByIndex(sculpt_stitching);
mCtrlSculptType->setEnabled(editable);
}
+ if (mCtrlSculptMirror)
+ {
+ mCtrlSculptMirror->set(sculpt_mirror);
+ mCtrlSculptMirror->setEnabled(editable);
+ }
+
+ if (mCtrlSculptInvert)
+ {
+ mCtrlSculptInvert->set(sculpt_invert);
+ mCtrlSculptInvert->setEnabled(editable);
+ }
+
if (mLabelSculptType)
{
mLabelSculptType->setEnabled(TRUE);
@@ -1725,9 +1747,18 @@ void LLPanelObject::sendSculpt()
if (mCtrlSculptTexture)
sculpt_params.setSculptTexture(mCtrlSculptTexture->getImageAssetID());
+ U8 sculpt_type = 0;
+
if (mCtrlSculptType)
- sculpt_params.setSculptType(mCtrlSculptType->getCurrentIndex());
+ sculpt_type |= mCtrlSculptType->getCurrentIndex();
+
+ if ((mCtrlSculptMirror) && (mCtrlSculptMirror->get()))
+ sculpt_type |= LL_SCULPT_FLAG_MIRROR;
+
+ if ((mCtrlSculptInvert) && (mCtrlSculptInvert->get()))
+ sculpt_type |= LL_SCULPT_FLAG_INVERT;
+ sculpt_params.setSculptType(sculpt_type);
mObject->setParameterEntry(LLNetworkData::PARAMS_SCULPT, sculpt_params, TRUE);
}
diff --git a/indra/newview/llpanelobject.h b/indra/newview/llpanelobject.h
index dd94922e10..32f79955b6 100644
--- a/indra/newview/llpanelobject.h
+++ b/indra/newview/llpanelobject.h
@@ -170,6 +170,8 @@ protected:
LLTextureCtrl *mCtrlSculptTexture;
LLTextBox *mLabelSculptType;
LLComboBox *mCtrlSculptType;
+ LLCheckBoxCtrl *mCtrlSculptMirror;
+ LLCheckBoxCtrl *mCtrlSculptInvert;
LLVector3 mCurEulerDegrees; // to avoid sending rotation when not changed
BOOL mIsPhysical; // to avoid sending "physical" when not changed
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 59b25acca4..07eada87ea 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -189,6 +189,8 @@
// exported globals
//
bool gAgentMovementCompleted = false;
+std::string gInitialOutfit;
+std::string gInitialOutfitGender;
std::string SCREEN_HOME_FILENAME = "screen_home.bmp";
std::string SCREEN_LAST_FILENAME = "screen_last.bmp";
@@ -1607,6 +1609,9 @@ bool idle_startup()
gFloaterMap->setVisible( gSavedSettings.getBOOL("ShowMiniMap") );
+ LLRect window(0, gViewerWindow->getWindowHeight(), gViewerWindow->getWindowWidth(), 0);
+ gViewerWindow->adjustControlRectanglesForFirstUse(window);
+
if (gSavedSettings.getBOOL("ShowCameraControls"))
{
LLFloaterCamera::showInstance();
@@ -2256,6 +2261,21 @@ bool idle_startup()
LLStartUp::loadInitialOutfit( sInitialOutfit, sInitialOutfitGender );
}
+
+ // We now have an inventory skeleton, so if this is a user's first
+ // login, we can start setting up their clothing and avatar
+ // appearance. This helps to avoid the generic "Ruth" avatar in
+ // the orientation island tutorial experience. JC
+ if (gAgent.isFirstLogin()
+ && !sInitialOutfit.empty() // registration set up an outfit
+ && !sInitialOutfitGender.empty() // and a gender
+ && gAgent.getAvatarObject() // can't wear clothes without object
+ && !gAgent.isGenderChosen() ) // nothing already loading
+ {
+ // Start loading the wearables, textures, gestures
+ LLStartUp::loadInitialOutfit( sInitialOutfit, sInitialOutfitGender );
+ }
+
// wait precache-delay and for agent's avatar or a lot longer.
if(((timeout_frac > 1.f) && gAgent.getAvatarObject())
|| (timeout_frac > 3.f))
diff --git a/indra/newview/llstylemap.cpp b/indra/newview/llstylemap.cpp
index bff23590d3..3190726be1 100644
--- a/indra/newview/llstylemap.cpp
+++ b/indra/newview/llstylemap.cpp
@@ -61,7 +61,7 @@ const LLStyleSP &LLStyleMap::lookup(const LLUUID &source)
LLStyleSP style(new LLStyle);
style->setVisible(true);
style->setFontName(LLStringUtil::null);
- if (source != gAgent.getID() && source != LLUUID::null)
+ if (source != LLUUID::null)
{
style->setColor(gSavedSettings.getColor4("HTMLLinkColor"));
std::string link = llformat("secondlife:///app/agent/%s/about",source.asString().c_str());
diff --git a/indra/newview/lltoolbrush.cpp b/indra/newview/lltoolbrush.cpp
index b644e43a64..07a9650af2 100644
--- a/indra/newview/lltoolbrush.cpp
+++ b/indra/newview/lltoolbrush.cpp
@@ -466,6 +466,27 @@ void LLToolBrushLand::render()
}
}
+/*
+ * Draw vertical lines from each vertex straight up in world space
+ * with lengths indicating the current "strength" slider.
+ * Decorate the tops and bottoms of the lines like this:
+ *
+ * Raise Revert
+ * /|\ ___
+ * | |
+ * | |
+ *
+ * Rough Smooth
+ * /|\ ___
+ * | |
+ * | |
+ * \|/..........._|_
+ *
+ * Lower Flatten
+ * | |
+ * | |
+ * \|/..........._|_
+ */
void LLToolBrushLand::renderOverlay(LLSurface& land, const LLVector3& pos_region,
const LLVector3& pos_world)
{
@@ -479,19 +500,55 @@ void LLToolBrushLand::renderOverlay(LLSurface& land, const LLVector3& pos_region
S32 i = (S32) pos_region.mV[VX];
S32 j = (S32) pos_region.mV[VY];
S32 half_edge = llfloor(LAND_BRUSH_SIZE[mBrushIndex]);
+ S32 radioAction = gSavedSettings.getS32("RadioLandBrushAction");
+ F32 force = gSavedSettings.getF32("LandBrushForce"); // .1 to 100?
- gGL.begin(LLVertexBuffer::POINTS);
+ gGL.begin(LLVertexBuffer::LINES);
for(S32 di = -half_edge; di <= half_edge; di++)
{
if((i+di) < 0 || (i+di) >= (S32)land.mGridsPerEdge) continue;
for(S32 dj = -half_edge; dj <= half_edge; dj++)
{
if( (j+dj) < 0 || (j+dj) >= (S32)land.mGridsPerEdge ) continue;
- gGL.vertex3f(pos_world.mV[VX] + di, pos_world.mV[VY] + dj,
- land.getZ((i+di)+(j+dj)*land.mGridsPerEdge));
+ const F32
+ wx = pos_world.mV[VX] + di,
+ wy = pos_world.mV[VY] + dj,
+ wz = land.getZ((i+di)+(j+dj)*land.mGridsPerEdge),
+ norm_dist = sqrt((float)di*di + dj*dj) / half_edge,
+ force_scale = sqrt(2.f) - norm_dist, // 1 at center, 0 at corner
+ wz2 = wz + .2 + (.2 + force/100) * force_scale, // top vertex
+ tic = .075f; // arrowhead size
+ // vertical line
+ gGL.vertex3f(wx, wy, wz);
+ gGL.vertex3f(wx, wy, wz2);
+ if(radioAction == E_LAND_RAISE || radioAction == E_LAND_NOISE) // up arrow
+ {
+ gGL.vertex3f(wx, wy, wz2);
+ gGL.vertex3f(wx+tic, wy, wz2-tic);
+ gGL.vertex3f(wx, wy, wz2);
+ gGL.vertex3f(wx-tic, wy, wz2-tic);
+ }
+ if(radioAction == E_LAND_LOWER || radioAction == E_LAND_NOISE) // down arrow
+ {
+ gGL.vertex3f(wx, wy, wz);
+ gGL.vertex3f(wx+tic, wy, wz+tic);
+ gGL.vertex3f(wx, wy, wz);
+ gGL.vertex3f(wx-tic, wy, wz+tic);
+ }
+ if(radioAction == E_LAND_REVERT || radioAction == E_LAND_SMOOTH) // flat top
+ {
+ gGL.vertex3f(wx-tic, wy, wz2);
+ gGL.vertex3f(wx+tic, wy, wz2);
+ }
+ if(radioAction == E_LAND_LEVEL || radioAction == E_LAND_SMOOTH) // flat bottom
+ {
+ gGL.vertex3f(wx-tic, wy, wz);
+ gGL.vertex3f(wx+tic, wy, wz);
+ }
}
}
gGL.end();
+
glPopMatrix();
}
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index 99abfb02ee..433029ca6b 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -44,6 +44,7 @@
#include "lldynamictexture.h"
#include "lldrawpoolalpha.h"
#include "llfeaturemanager.h"
+#include "llfirstuse.h"
#include "llframestats.h"
#include "llhudmanager.h"
#include "llimagebmp.h"
@@ -379,6 +380,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
if( arrival_fraction > 1.f )
{
arrival_fraction = 1.f;
+ LLFirstUse::useTeleport();
gAgent.setTeleportState( LLAgent::TELEPORT_NONE );
}
gViewerWindow->setProgressCancelButtonVisible(FALSE, std::string("Cancel")); //TODO: Translate
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 5d2b8e43ba..52cbcf85a9 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -1036,8 +1036,7 @@ void init_client_menu(LLMenuGL* menu)
menu->appendSeparator();
menu->append(new LLMenuItemToggleGL("Show Updates",
- &gShowObjectUpdates,
- 'U', MASK_ALT | MASK_SHIFT | MASK_CONTROL));
+ &gShowObjectUpdates));
menu->appendSeparator();
@@ -2912,8 +2911,7 @@ void request_friendship(const LLUUID& dest_id)
}
if (!fullname.empty())
{
- LLPanelFriends::requestFriendship(dest_id, fullname);
- LLNotifyBox::showXml("OfferedFriendship", args);
+ LLPanelFriends::requestFriendshipDialog(dest_id, fullname);
}
else
{
@@ -4493,6 +4491,25 @@ class LLToolsStopAllAnimations : public view_listener_t
}
};
+class LLToolsReleaseKeys : public view_listener_t
+{
+ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+ {
+ gAgent.forceReleaseControls();
+
+ return true;
+ }
+};
+
+class LLToolsEnableReleaseKeys : public view_listener_t
+{
+ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
+ {
+ gMenuHolder->findControl(userdata["control"].asString())->setValue( gAgent.anyControlGrabbed() );
+ return true;
+ }
+};
+
//void handle_hinge(void*)
//{
// LLSelectMgr::getInstance()->sendHinge(1);
@@ -7825,6 +7842,8 @@ void initialize_menus()
addMenu(new LLToolsLink(), "Tools.Link");
addMenu(new LLToolsUnlink(), "Tools.Unlink");
addMenu(new LLToolsStopAllAnimations(), "Tools.StopAllAnimations");
+ addMenu(new LLToolsReleaseKeys(), "Tools.ReleaseKeys");
+ addMenu(new LLToolsEnableReleaseKeys(), "Tools.EnableReleaseKeys");
addMenu(new LLToolsLookAtSelection(), "Tools.LookAtSelection");
addMenu(new LLToolsBuyOrTake(), "Tools.BuyOrTake");
addMenu(new LLToolsTakeCopy(), "Tools.TakeCopy");
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 9146acb750..4c739c0712 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -108,6 +108,7 @@
#include "lltool.h"
#include "lltoolbar.h"
#include "lltoolmgr.h"
+#include "lltrans.h"
#include "llui.h" // for make_ui_sound
#include "lluploaddialog.h"
#include "llviewercamera.h"
@@ -828,13 +829,15 @@ void open_offer(const std::vector<LLUUID>& items, const std::string& from_name)
{
continue;
}
+ LLAssetType::EType asset_type = item->getType();
+
//if we are throttled, don't display them - Gigs
if (check_offer_throttle(from_name, false))
{
// I'm not sure this is a good idea. JC
bool show_keep_discard = item->getPermissions().getCreator() != gAgent.getID();
//bool show_keep_discard = true;
- switch(item->getType())
+ switch(asset_type)
{
case LLAssetType::AT_NOTECARD:
open_notecard((LLViewerInventoryItem*)item, std::string("Note: ") + item->getName(), LLUUID::null, show_keep_discard, LLUUID::null, FALSE);
@@ -858,6 +861,11 @@ void open_offer(const std::vector<LLUUID>& items, const std::string& from_name)
return;
}
+ if(gSavedSettings.getBOOL("ShowInInventory") &&
+ asset_type != LLAssetType::AT_CALLINGCARD)
+ {
+ LLInventoryView::showAgentInventory(TRUE);
+ }
//Trash Check
LLUUID trash_id;
trash_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_TRASH);
@@ -1909,8 +1917,18 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
else
{
args["[NAME]"] = name;
- LLNotifyBox::showXml("OfferFriendship", args,
- &friendship_offer_callback, (void*)offer);
+ if(message.empty())
+ {
+ //support for frienship offers from clients before July 2008
+ LLNotifyBox::showXml("OfferFriendshipNoMessage", args,
+ &friendship_offer_callback, (void*)offer);
+ }
+ else
+ {
+ args["[MESSAGE]"] = message;
+ LLNotifyBox::showXml("OfferFriendship", args,
+ &friendship_offer_callback, (void*)offer);
+ }
}
}
break;
@@ -2163,7 +2181,6 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
chat.mTime = LLFrameTimer::getElapsedSeconds();
- BOOL is_self = (from_id == gAgent.getID());
BOOL is_busy = gAgent.getBusy();
BOOL is_muted = FALSE;
@@ -2279,14 +2296,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
switch(chat.mChatType)
{
case CHAT_TYPE_WHISPER:
- if (is_self)
- {
- verb = " whisper: ";
- }
- else
- {
- verb = " whispers: ";
- }
+ verb = " " + LLTrans::getString("whisper") + " ";
break;
case CHAT_TYPE_DEBUG_MSG:
case CHAT_TYPE_OWNER:
@@ -2294,14 +2304,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
verb = ": ";
break;
case CHAT_TYPE_SHOUT:
- if (is_self)
- {
- verb = " shout: ";
- }
- else
- {
- verb = " shouts: ";
- }
+ verb = " " + LLTrans::getString("shout") + " ";
break;
case CHAT_TYPE_START:
case CHAT_TYPE_STOP:
@@ -2313,14 +2316,8 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
break;
}
- if (is_self)
- {
- chat.mText = std::string("You");
- }
- else
- {
- chat.mText = from_name;
- }
+
+ chat.mText = from_name;
chat.mText += verb;
chat.mText += mesg;
}
@@ -2642,9 +2639,6 @@ void process_teleport_finish(LLMessageSystem* msg, void**)
// gTeleportDisplay = TRUE;
// gTeleportDisplayTimer.reset();
// gViewerWindow->setShowProgress(TRUE);
-
- // This could be first use of teleport, so test for that
- LLFirstUse::useTeleport();
}
// stuff we have to do every time we get an AvatarInitComplete from a sim
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 299785d590..9ef9724dd2 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -472,7 +472,7 @@ public:
ypos += y_inc;
}
// only display these messages if we are actually rendering beacons at this moment
- if (LLPipeline::getRenderBeacons(NULL) && LLPipeline::getProcessBeacons(NULL))
+ if (LLPipeline::getRenderBeacons(NULL) && gSavedSettings.getBOOL("BeaconAlwaysOn"))
{
if (LLPipeline::getRenderParticleBeacons(NULL))
{
@@ -1398,7 +1398,7 @@ LLViewerWindow::LLViewerWindow(
// Default to application directory.
LLViewerWindow::sSnapshotBaseName = "Snapshot";
LLViewerWindow::sMovieBaseName = "SLmovie";
- LLViewerWindow::sSnapshotDir.clear();
+ resetSnapshotLoc();
// create window
mWindow = LLWindowManager::createWindow(
@@ -1746,8 +1746,6 @@ void LLViewerWindow::adjustRectanglesForFirstUse(const LLRect& window)
adjust_rect_top_left("FloaterLandRect5", window);
- adjust_rect_top_left("FloaterHUDRect2", window);
-
adjust_rect_top_left("FloaterFindRect2", window);
adjust_rect_top_left("FloaterGestureRect2", window);
@@ -1769,8 +1767,26 @@ void LLViewerWindow::adjustRectanglesForFirstUse(const LLRect& window)
r.getHeight());
gSavedSettings.setRect("FloaterInventoryRect", r);
}
+
+// adjust_rect_top_left("FloaterHUDRect2", window);
+
+ // slightly off center to be left of the avatar.
+ r = gSavedSettings.getRect("FloaterHUDRect2");
+ r.setOriginAndSize(
+ window.getWidth()/3 - r.getWidth()/2,
+ window.getHeight()/2 - r.getHeight()/2,
+ r.getWidth(),
+ r.getHeight());
+ gSavedSettings.setRect("FloaterHUDRect2", r);
}
+//Rectangles need to be adjusted after the window is constructed
+//in order for proper centering to take place
+void LLViewerWindow::adjustControlRectanglesForFirstUse(const LLRect& window)
+{
+ adjust_rect_bottom_center("FloaterMoveRect2", window);
+ adjust_rect_top_center("FloaterCameraRect3", window);
+}
void LLViewerWindow::initWorldUI()
{
@@ -2678,13 +2694,6 @@ BOOL LLViewerWindow::handlePerFrameHover()
}
}
- gPipeline.sRenderProcessBeacons = FALSE;
- KEY key = gKeyboard->currentKey();
- if (((mask & MASK_CONTROL) && ('N' == key || 'n' == key)) || gSavedSettings.getBOOL("BeaconAlwaysOn"))
- {
- gPipeline.sRenderProcessBeacons = TRUE;
- }
-
BOOL handled = FALSE;
BOOL handled_by_top_ctrl = FALSE;
@@ -3735,8 +3744,8 @@ BOOL LLViewerWindow::saveImageNumbered(LLImageFormatted *image)
else
pick_type = LLFilePicker::FFSAVE_ALL; // ???
- // Get a directory if this is the first time.
- if (sSnapshotDir.empty())
+ // Get a base file location if needed.
+ if ( ! isSnapshotLocSet())
{
std::string proposed_name( sSnapshotBaseName );
proposed_name.append( extension );
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index 30a9d91de9..91f0129446 100644
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -136,7 +136,8 @@ public:
void initGLDefaults();
void initBase();
- void adjustRectanglesForFirstUse(const LLRect& full_window);
+ void adjustRectanglesForFirstUse(const LLRect& window);
+ void adjustControlRectanglesForFirstUse(const LLRect& window);
void initWorldUI();
//
@@ -280,8 +281,9 @@ public:
BOOL saveSnapshot(const std::string& filename, S32 image_width, S32 image_height, BOOL show_ui = TRUE, BOOL do_rebuild = FALSE, ESnapshotType type = SNAPSHOT_TYPE_COLOR);
BOOL rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_height, BOOL keep_window_aspect = TRUE, BOOL is_texture = FALSE,
BOOL show_ui = TRUE, BOOL do_rebuild = FALSE, ESnapshotType type = SNAPSHOT_TYPE_COLOR, S32 max_size = MAX_IMAGE_SIZE );
-
BOOL thumbnailSnapshot(LLImageRaw *raw, S32 preview_width, S32 preview_height, BOOL show_ui, BOOL do_rebuild, ESnapshotType type) ;
+ BOOL isSnapshotLocSet() const { return ! sSnapshotDir.empty(); }
+ void resetSnapshotLoc() const { sSnapshotDir.clear(); }
BOOL saveImageNumbered(LLImageFormatted *image);
// Reset the directory where snapshots are saved.
diff --git a/indra/newview/llworldmap.cpp b/indra/newview/llworldmap.cpp
index 2afeb4a1e4..3352e97768 100644
--- a/indra/newview/llworldmap.cpp
+++ b/indra/newview/llworldmap.cpp
@@ -179,7 +179,6 @@ void LLWorldMap::eraseItems()
mPGEvents.clear();
mMatureEvents.clear();
mLandForSale.clear();
- mClassifieds.clear();
}
// mAgentLocationsMap.clear(); // persists
// mNumAgents.clear(); // persists
@@ -310,11 +309,6 @@ void LLWorldMap::setCurrentLayer(S32 layer, bool request_layer)
sendItemRequest(MAP_ITEM_LAND_FOR_SALE);
}
- if (mClassifieds.size() == 0)
- {
- sendItemRequest(MAP_ITEM_CLASSIFIED);
- }
-
clearImageRefs();
clearSimFlags();
}
@@ -768,9 +762,7 @@ void LLWorldMap::processMapItemReply(LLMessageSystem* msg, void**)
}
case MAP_ITEM_CLASSIFIED: // classifieds
{
- // HACK: Z-height is in Extra2 field.
- new_item.mPosGlobal.mdV[VZ] = (F64)extra2;
- LLWorldMap::getInstance()->mClassifieds.push_back(new_item);
+ //DEPRECATED: no longer used
break;
}
case MAP_ITEM_AGENT_LOCATIONS: // agent locations
diff --git a/indra/newview/llworldmap.h b/indra/newview/llworldmap.h
index 5d9e1972ae..d397a8f041 100644
--- a/indra/newview/llworldmap.h
+++ b/indra/newview/llworldmap.h
@@ -192,7 +192,6 @@ public:
item_info_list_t mPGEvents;
item_info_list_t mMatureEvents;
item_info_list_t mLandForSale;
- item_info_list_t mClassifieds;
std::map<U64,S32> mNumAgents;
diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp
index b5e23550b9..e63dcfc1e8 100644
--- a/indra/newview/llworldmapview.cpp
+++ b/indra/newview/llworldmapview.cpp
@@ -717,11 +717,6 @@ void LLWorldMapView::draw()
drawGenericItems(LLWorldMap::getInstance()->mLandForSale, sForSaleImage);
}
- if (gSavedSettings.getBOOL("MapShowClassifieds"))
- {
- drawGenericItems(LLWorldMap::getInstance()->mClassifieds, sClassifiedsImage);
- }
-
if (gSavedSettings.getBOOL("MapShowEvents"))
{
drawEvents();
@@ -1549,10 +1544,6 @@ void LLWorldMapView::handleClick(S32 x, S32 y, MASK mask,
{
(*it).mSelected = FALSE;
}
- for (it = LLWorldMap::getInstance()->mClassifieds.begin(); it != LLWorldMap::getInstance()->mClassifieds.end(); ++it)
- {
- (*it).mSelected = FALSE;
- }
// Select event you clicked on
if (gSavedSettings.getBOOL("MapShowEvents"))
@@ -1601,21 +1592,6 @@ void LLWorldMapView::handleClick(S32 x, S32 y, MASK mask,
}
}
- if (gSavedSettings.getBOOL("MapShowClassifieds"))
- {
- for (it = LLWorldMap::getInstance()->mClassifieds.begin(); it != LLWorldMap::getInstance()->mClassifieds.end(); ++it)
- {
- LLItemInfo& classified = *it;
-
- if (checkItemHit(x, y, classified, id, true))
- {
- *hit_type = MAP_ITEM_CLASSIFIED;
- mItemPicked = TRUE;
- return;
- }
- }
- }
-
// If we get here, we haven't clicked on an icon
gFloaterWorldMap->trackLocation(pos_global);
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 7269e32d71..36035f165b 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -211,7 +211,6 @@ BOOL LLPipeline::sRenderParticleBeacons = FALSE;
BOOL LLPipeline::sRenderSoundBeacons = FALSE;
BOOL LLPipeline::sRenderBeacons = FALSE;
BOOL LLPipeline::sRenderHighlight = TRUE;
-BOOL LLPipeline::sRenderProcessBeacons = FALSE;
S32 LLPipeline::sUseOcclusion = 0;
BOOL LLPipeline::sFastAlpha = TRUE;
BOOL LLPipeline::sDisableShaders = FALSE;
@@ -2084,8 +2083,8 @@ void LLPipeline::postSort(LLCamera& camera)
std::sort(sCull->beginAlphaGroups(), sCull->endAlphaGroups(), LLSpatialGroup::CompareDepthGreater());
}
- // only render if the flag is set. The flag is only set if the right key is pressed, we are in edit mode or the toggle is set in the menus
- if (sRenderProcessBeacons)
+ // only render if the flag is set. The flag is only set if we are in edit mode or the toggle is set in the menus
+ if (gSavedSettings.getBOOL("BeaconAlwaysOn"))
{
if (sRenderScriptedTouchBeacons)
{
@@ -3969,12 +3968,6 @@ BOOL LLPipeline::getRenderHighlights(void*)
return sRenderHighlight;
}
-// static
-BOOL LLPipeline::getProcessBeacons(void* data)
-{
- return sRenderProcessBeacons;
-}
-
LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector3& start, const LLVector3& end,
S32* face_hit,
LLVector3* intersection, // return the intersection point
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index 389b80813d..a6f76df47a 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -273,8 +273,6 @@ public:
static void toggleRenderHighlights(void* data);
static BOOL getRenderHighlights(void* data);
- static BOOL getProcessBeacons(void* data);
-
private:
void unloadShaders();
void addToQuickLookup( LLDrawPool* new_poolp );
@@ -550,7 +548,6 @@ protected:
public:
static BOOL sRenderBeacons;
static BOOL sRenderHighlight;
- static BOOL sRenderProcessBeacons;
};
void render_bbox(const LLVector3 &min, const LLVector3 &max);