summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-04-19 14:26:08 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-04-19 14:26:08 +0100
commit47c8cb4891adc74f928f7712f79d7d1032bea567 (patch)
tree1669484c4e69ee476ed27d3fd999fd93a54bfad2 /indra/newview
parent689fdd553c38ddef9c33f90c0b408bb2e9299742 (diff)
parent532d732645f2369d17eba9c2ed0d594b486d416e (diff)
merge from viewer-trunk
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llagent.cpp12
-rw-r--r--indra/newview/llappviewer.cpp6
-rw-r--r--indra/newview/llfeaturemanager.cpp4
-rw-r--r--indra/newview/llfolderview.cpp6
-rw-r--r--indra/newview/llfolderview.h2
-rw-r--r--indra/newview/llinventorybridge.cpp7
-rw-r--r--indra/newview/llmoveview.cpp6
-rw-r--r--indra/newview/llpaneloutfitedit.cpp34
-rw-r--r--indra/newview/llpaneloutfitedit.h1
-rw-r--r--indra/newview/llviewerjoystick.cpp2
-rw-r--r--indra/newview/llviewermessage.cpp3
-rw-r--r--indra/newview/llvoavatar.cpp2
-rw-r--r--indra/newview/skins/default/xui/en/panel_outfit_edit.xml103
13 files changed, 140 insertions, 48 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index f434782977..8bcf680876 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -1295,6 +1295,13 @@ void LLAgent::stopAutoPilot(BOOL user_cancel)
{
resetAxes(mAutoPilotTargetFacing);
}
+ // Restore previous flying state before invoking mAutoPilotFinishedCallback to allow
+ // callback function to change the flying state (like in near_sit_down_point()).
+ // If the user cancelled, don't change the fly state
+ if (!user_cancel)
+ {
+ setFlying(mAutoPilotFlyOnStop);
+ }
//NB: auto pilot can terminate for a reason other than reaching the destination
if (mAutoPilotFinishedCallback)
{
@@ -1302,11 +1309,6 @@ void LLAgent::stopAutoPilot(BOOL user_cancel)
}
mLeaderID = LLUUID::null;
- // If the user cancelled, don't change the fly state
- if (!user_cancel)
- {
- setFlying(mAutoPilotFlyOnStop);
- }
setControlFlags(AGENT_CONTROL_STOP);
if (user_cancel && !mAutoPilotBehaviorName.empty())
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 7a381d05ad..cc44a96675 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -864,7 +864,7 @@ bool LLAppViewer::init()
minSpecs += "\n";
unsupported = true;
}
- if(gSysCPU.getMhz() < minCPU)
+ if(gSysCPU.getMHz() < minCPU)
{
minSpecs += LLNotifications::instance().getGlobalString("UnsupportedCPU");
minSpecs += "\n";
@@ -2550,7 +2550,7 @@ void LLAppViewer::writeSystemInfo()
gDebugInfo["CPUInfo"]["CPUString"] = gSysCPU.getCPUString();
gDebugInfo["CPUInfo"]["CPUFamily"] = gSysCPU.getFamily();
- gDebugInfo["CPUInfo"]["CPUMhz"] = gSysCPU.getMhz();
+ gDebugInfo["CPUInfo"]["CPUMhz"] = (S32)gSysCPU.getMHz();
gDebugInfo["CPUInfo"]["CPUAltivec"] = gSysCPU.hasAltivec();
gDebugInfo["CPUInfo"]["CPUSSE"] = gSysCPU.hasSSE();
gDebugInfo["CPUInfo"]["CPUSSE2"] = gSysCPU.hasSSE2();
@@ -2563,7 +2563,7 @@ void LLAppViewer::writeSystemInfo()
// which may have been the intended grid. This can b
gDebugInfo["GridName"] = LLViewerLogin::getInstance()->getGridLabel();
- // *FIX:Mani - move this ddown in llappviewerwin32
+ // *FIX:Mani - move this down in llappviewerwin32
#ifdef LL_WINDOWS
DWORD thread_id = GetCurrentThreadId();
gDebugInfo["MainloopThreadID"] = (S32)thread_id;
diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp
index fbb90c69f3..50b08f782a 100644
--- a/indra/newview/llfeaturemanager.cpp
+++ b/indra/newview/llfeaturemanager.cpp
@@ -621,9 +621,9 @@ void LLFeatureManager::applyBaseMasks()
#if LL_SOLARIS && defined(__sparc) // even low MHz SPARCs are fast
#error The 800 is hinky. Would something like a LL_MIN_MHZ make more sense here?
- if (gSysCPU.getMhz() < 800)
+ if (gSysCPU.getMHz() < 800)
#else
- if (gSysCPU.getMhz() < 1100)
+ if (gSysCPU.getMHz() < 1100)
#endif
{
maskFeatures("CPUSlow");
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index 8d4d6a178a..c492bfcef1 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -1416,8 +1416,8 @@ void LLFolderView::startRenamingSelectedItem( void )
mRenamer->setVisible( TRUE );
// set focus will fail unless item is visible
mRenamer->setFocus( TRUE );
- mRenamer->setTopLostCallback(boost::bind(onRenamerLost, _1));
- mRenamer->setFocusLostCallback(boost::bind(onRenamerLost, _1));
+ mRenamer->setTopLostCallback(boost::bind(&LLFolderView::onRenamerLost, this, _1));
+ mRenamer->setFocusLostCallback(boost::bind(&LLFolderView::onRenamerLost, this, _1));
gViewerWindow->addPopup(mRenamer);
}
}
@@ -2386,9 +2386,9 @@ S32 LLFolderView::notify(const LLSD& info)
/// Local function definitions
///----------------------------------------------------------------------------
-//static
void LLFolderView::onRenamerLost( LLFocusableElement* renamer)
{
+ mRenameItem = NULL;
LLUICtrl* uictrl = dynamic_cast<LLUICtrl*>(renamer);
if (uictrl)
{
diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h
index 42390dfd17..874723bb1a 100644
--- a/indra/newview/llfolderview.h
+++ b/indra/newview/llfolderview.h
@@ -279,7 +279,7 @@ protected:
LLScrollContainer* mScrollContainer; // NULL if this is not a child of a scroll container.
void commitRename( const LLSD& data );
- static void onRenamerLost( LLFocusableElement* renamer);
+ void onRenamerLost( LLFocusableElement* renamer);
void finishRenamingItem( void );
void closeRenamer( void );
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index a62c759ace..9762897491 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -2692,6 +2692,13 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
{
// This is the lost+found folder.
mItems.push_back(std::string("Empty Lost And Found"));
+
+ mDisabledItems.push_back(std::string("New Folder"));
+ mDisabledItems.push_back(std::string("New Script"));
+ mDisabledItems.push_back(std::string("New Note"));
+ mDisabledItems.push_back(std::string("New Gesture"));
+ mDisabledItems.push_back(std::string("New Clothes"));
+ mDisabledItems.push_back(std::string("New Body Parts"));
}
if(trash_id == mUUID)
diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp
index 0ddc4efc81..7df5a33313 100644
--- a/indra/newview/llmoveview.cpp
+++ b/indra/newview/llmoveview.cpp
@@ -200,7 +200,11 @@ void LLFloaterMove::setFlyingMode(BOOL fly)
if (instance)
{
instance->setFlyingModeImpl(fly);
- BOOL is_sitting = isAgentAvatarValid() && gAgentAvatarp->isSitting();
+ LLVOAvatarSelf* avatar_object = gAgent.getAvatarObject();
+ bool is_sitting = avatar_object
+ && (avatar_object->getRegion() != NULL)
+ && (!avatar_object->isDead())
+ && avatar_object->isSitting();
instance->showModeButtons(!fly && !is_sitting);
}
if (fly)
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index d78a448acb..ba6473839a 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -133,10 +133,6 @@ mRemoveFromOutfitBtn(NULL), mLookObserver(NULL)
mLookItemTypes.push_back(LLLookItemType());
}
- // TODO: make these strings translatable
- mLookItemTypes[LIT_ALL] = LLLookItemType("All Items", ALL_ITEMS_MASK);
- mLookItemTypes[LIT_WEARABLE] = LLLookItemType("Shape & Clothing", WEARABLE_MASK);
- mLookItemTypes[LIT_ATTACHMENT] = LLLookItemType("Attachments", ATTACHMENT_MASK);
}
@@ -159,10 +155,15 @@ LLPanelOutfitEdit::~LLPanelOutfitEdit()
BOOL LLPanelOutfitEdit::postBuild()
{
// gInventory.isInventoryUsable() no longer needs to be tested per Richard's fix for race conditions between inventory and panels
-
+
+ mLookItemTypes[LIT_ALL] = LLLookItemType(getString("Filter.All"), ALL_ITEMS_MASK);
+ mLookItemTypes[LIT_WEARABLE] = LLLookItemType(getString("Filter.Clothes/Body"), WEARABLE_MASK);
+ mLookItemTypes[LIT_ATTACHMENT] = LLLookItemType(getString("Filter.Objects"), ATTACHMENT_MASK);
+
mCurrentOutfitName = getChild<LLTextBox>("curr_outfit_name");
childSetCommitCallback("add_btn", boost::bind(&LLPanelOutfitEdit::showAddWearablesPanel, this), NULL);
+ childSetCommitCallback("filter_button", boost::bind(&LLPanelOutfitEdit::showWearablesFilter, this), NULL);
mLookContents = getChild<LLScrollListCtrl>("look_items_list");
mLookContents->sortByColumn("look_item_sort", TRUE);
@@ -174,7 +175,7 @@ BOOL LLPanelOutfitEdit::postBuild()
mInventoryItemsPanel->setSelectCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this, _1, _2));
mInventoryItemsPanel->getRootFolder()->setReshapeCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this, _1, _2));
- LLComboBox* type_filter = getChild<LLComboBox>("inventory_filter");
+ LLComboBox* type_filter = getChild<LLComboBox>("filter_wearables_combobox");
type_filter->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onTypeFilterChanged, this, _1));
type_filter->removeall();
for (U32 i = 0; i < mLookItemTypes.size(); ++i)
@@ -236,6 +237,11 @@ void LLPanelOutfitEdit::showAddWearablesPanel()
childSetVisible("add_wearables_panel", childGetValue("add_btn"));
}
+void LLPanelOutfitEdit::showWearablesFilter()
+{
+ childSetVisible("filter_combobox_panel", childGetValue("filter_button"));
+}
+
void LLPanelOutfitEdit::saveOutfit(bool as_new)
{
if (!as_new && LLAppearanceMgr::getInstance()->updateBaseOutfit())
@@ -457,20 +463,18 @@ void LLPanelOutfitEdit::onInventorySelectionChange(const std::deque<LLFolderView
void LLPanelOutfitEdit::onOutfitItemSelectionChange(void)
{
- S32 left_offset = -4;
- S32 top_offset = -10;
LLScrollListItem* item = mLookContents->getLastSelectedItem();
if (!item)
return;
- LLRect rect = item->getRect();
- LLRect btn_rect(
- left_offset + rect.mRight - 50,
- top_offset + rect.mTop,
- left_offset + rect.mRight - 30,
- top_offset + rect.mBottom);
+ LLRect item_rect;
+ mLookContents->localRectToOtherView(item->getRect(), &item_rect, getChild<LLUICtrl>("outfit_wearables_panel"));
+
+ // TODO button(and item list) should be removed (when new widget is ready)
+ LLRect btn_rect = mEditWearableBtn->getRect();
+ btn_rect.set(item_rect.mRight - btn_rect.getWidth(), item_rect.mTop, item_rect.mRight, item_rect.mBottom);
- mEditWearableBtn->setRect(btn_rect);
+ mEditWearableBtn->setShape(btn_rect);
mEditWearableBtn->setEnabled(TRUE);
if (!mEditWearableBtn->getVisible())
diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h
index fa92d4c314..69e8016534 100644
--- a/indra/newview/llpaneloutfitedit.h
+++ b/indra/newview/llpaneloutfitedit.h
@@ -87,6 +87,7 @@ public:
// only update the location if there is none already available.
void showAddWearablesPanel();
+ void showWearablesFilter();
void saveOutfit(bool as_new = false);
void showSaveMenu();
diff --git a/indra/newview/llviewerjoystick.cpp b/indra/newview/llviewerjoystick.cpp
index b758f6c701..240a539f2e 100644
--- a/indra/newview/llviewerjoystick.cpp
+++ b/indra/newview/llviewerjoystick.cpp
@@ -163,7 +163,7 @@ LLViewerJoystick::LLViewerJoystick()
memset(mBtn, 0, sizeof(mBtn));
// factor in bandwidth? bandwidth = gViewerStats->mKBitStat
- mPerfScale = 4000.f / gSysCPU.getMhz();
+ mPerfScale = 4000.f / gSysCPU.getMHz(); // hmm. why?
}
// -----------------------------------------------------------------------------
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index e0c327068c..1fcbbd7fd4 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -4430,6 +4430,9 @@ void process_avatar_sit_response(LLMessageSystem *mesgsys, void **user_data)
}
gAgentCamera.setForceMouselook(force_mouselook);
+ // Forcing turning off flying here to prevent flying after pressing "Stand"
+ // to stand up from an object. See EXT-1655.
+ gAgent.setFlying(FALSE);
LLViewerObject* object = gObjectList.findObject(sitObjectID);
if (object)
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 6bd8f2790c..fcf163cfe5 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -5765,6 +5765,8 @@ void LLVOAvatar::sitOnObject(LLViewerObject *sit_object)
mDrawable->mXform.setRotation(mDrawable->getWorldRotation() * inv_obj_rot);
gPipeline.markMoved(mDrawable, TRUE);
+ // Notice that removing sitDown() from here causes avatars sitting on
+ // objects to be not rendered for new arrivals. See EXT-6835 and EXT-1655.
sitDown(TRUE);
mRoot.getXform()->setParent(&sit_object->mDrawable->mXform); // LLVOAvatar::sitOnObject
mRoot.setPosition(getPosition());
diff --git a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
index 9ece4aead8..bc37af0319 100644
--- a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
@@ -25,6 +25,10 @@
(unknown)
</panel.string>
+ <!-- Wearables filtering strings -->
+ <string name="Filter.All" value="All"/>
+ <string name="Filter.Clothes/Body" value="Clothes/Body"/>
+ <string name="Filter.Objects" value="Objects"/>
<button
follows="top|left"
@@ -154,6 +158,16 @@
sort_column="look_item_sort"
name="look_item_sort" />
</scroll_list>
+ <!-- TODO remove this button. Added it temporary for QA to be able to test new edit wearable panel (see EXT-6564)-->
+ <button
+ follows="left|top|right"
+ height="20"
+ label="edit"
+ left="0"
+ top="0"
+ layout="topleft"
+ name="edit_wearable_btn"
+ width="40" />
<panel
background_visible="true"
@@ -222,29 +236,18 @@
<layout_panel
auto_resize="true"
default_tab_group="3"
- height="250"
- min_height="120"
+ height="210"
+ min_height="210"
name="add_wearables_panel"
width="300"
tab_group="2"
user_resize="true"
visible="false">
- <text
- follows="top|left|right"
- font="SansSerifBold"
- height="13"
- layout="topleft"
- left="5"
- name="status"
- text_color="LtGray"
- top="5"
- value="Add Wearables"
- use_ellipses="true"
- width="275" />
-
+ <!-- *NOTE is not used, invisible and disabled -->
<filter_editor
background_image="TextField_Search_Off"
+ enabled="false"
follows="left|top|right"
font="SansSerif"
label="Filter"
@@ -254,13 +257,79 @@
height="20"
name="look_item_filter"
text_color="black"
- text_pad_left="25" />
+ text_pad_left="25"
+ visible="false"/>
+
+ <layout_stack
+ animate="true"
+ follows="all"
+ height="25"
+ width="300"
+ layout="topleft"
+ orientation="horizontal"
+ name="filter_panels"
+ top="0"
+ left="0">
+ <layout_panel
+ layout="topleft"
+ follows="left|top|right"
+ height="25"
+ label="IM Control Panel"
+ name="filter_button_panel"
+ width="150"
+ auto_resize="true"
+ user_resize="false">
+ <text
+ follows="top|left|right"
+ font="SansSerifBold"
+ height="13"
+ layout="topleft"
+ left="5"
+ name="add_to_outfit_label"
+ text_color="LtGray"
+ top="3"
+ value="Add to Outfit:"
+ use_ellipses="true"
+ width="270" />
+ <button
+ follows="top|right"
+ height="20"
+ image_hover_unselected="Toolbar_Middle_Over"
+ image_overlay=""
+ image_selected="Toolbar_Middle_Selected"
+ image_unselected="Toolbar_Middle_Off"
+ is_toggle="true"
+ label="O"
+ layout="topleft"
+ right="-1"
+ name="filter_button"
+ top="3"
+ width="20" />
+ </layout_panel>
+ <layout_panel
+ auto_resize="true"
+ height="25"
+ min_width="130"
+ name="filter_combobox_panel"
+ width="150"
+ user_resize="false"
+ visible="false">
+ <combo_box
+ follows="top|left|right"
+ height="20"
+ layout="topleft"
+ right="-5"
+ name="filter_wearables_combobox"
+ top="0"
+ width="130"/>
+ </layout_panel>
+ </layout_stack>
<inventory_panel
allow_multi_select="false"
border="false"
follows="left|top|right|bottom"
- height="176"
+ height="155"
layout="topleft"
left="0"
mouse_opaque="false"