diff options
Diffstat (limited to 'indra/newview')
19 files changed, 147 insertions, 111 deletions
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index cf5ac6b2e6..8fb9decf7b 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -721,22 +721,26 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL notify_box->setFollowsRight(); notify_box->setFollowsTop(); - LLButton* accept_button = notify_box->getChild<LLButton> ("Accept", - TRUE); - if (accept_button != NULL) + ctrl_list_t ctrls = notify_box->getControlPanel()->getCtrlList(); + S32 offset = 0; + for (ctrl_list_t::iterator it = ctrls.begin(); it != ctrls.end(); it++) { - accept_button->setFollowsNone(); - accept_button->setOrigin(2*HPAD, accept_button->getRect().mBottom); - } - - LLButton* decline_button = notify_box->getChild<LLButton> ( - "Decline", TRUE); - if (accept_button != NULL && decline_button != NULL) - { - decline_button->setFollowsNone(); - decline_button->setOrigin(4*HPAD - + accept_button->getRect().getWidth(), - decline_button->getRect().mBottom); + LLButton * button = dynamic_cast<LLButton*> (*it); + if (button != NULL) + { + button->setOrigin( offset, + button->getRect().mBottom); + button->setLeftHPad(2 * HPAD); + button->setRightHPad(2 * HPAD); + // set zero width before perform autoResize() + button->setRect(LLRect(button->getRect().mLeft, + button->getRect().mTop, button->getRect().mLeft, + button->getRect().mBottom)); + button->setAutoResize(true); + button->autoResize(); + offset += 2 * HPAD + button->getRect().getWidth(); + button->setFollowsNone(); + } } LLTextEditor* text_editor = notify_box->getChild<LLTextEditor>("text_editor_box", TRUE); diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 0b7e3fee30..853693b927 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -315,7 +315,6 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) mCommitCallbackRegistrar.add("Pref.ClickEnablePopup", boost::bind(&LLFloaterPreference::onClickEnablePopup, this)); mCommitCallbackRegistrar.add("Pref.ClickDisablePopup", boost::bind(&LLFloaterPreference::onClickDisablePopup, this)); mCommitCallbackRegistrar.add("Pref.LogPath", boost::bind(&LLFloaterPreference::onClickLogPath, this)); - mCommitCallbackRegistrar.add("Pref.UpdateMeterText", boost::bind(&LLFloaterPreference::updateMeterText, this, _1)); mCommitCallbackRegistrar.add("Pref.HardwareSettings", boost::bind(&LLFloaterPreference::onOpenHardwareSettings, this)); mCommitCallbackRegistrar.add("Pref.HardwareDefaults", boost::bind(&LLFloaterPreference::setHardwareDefaults, this)); mCommitCallbackRegistrar.add("Pref.VertexShaderEnable", boost::bind(&LLFloaterPreference::onVertexShaderEnable, this)); @@ -674,21 +673,6 @@ void LLFloaterPreference::refreshEnabledGraphics() } } -void LLFloaterPreference::updateMeterText(LLUICtrl* ctrl) -{ - // get our UI widgets - LLSliderCtrl* slider = (LLSliderCtrl*) ctrl; - - LLTextBox* m1 = getChild<LLTextBox>("DrawDistanceMeterText1"); - LLTextBox* m2 = getChild<LLTextBox>("DrawDistanceMeterText2"); - - // toggle the two text boxes based on whether we have 1 or two digits - F32 val = slider->getValueF32(); - bool two_digits = val < 100; - m1->setVisible(two_digits); - m2->setVisible(!two_digits); -} - void LLFloaterPreference::onClickBrowserClearCache() { LLNotificationsUtil::add("ConfirmClearBrowserCache", LLSD(), LLSD(), callback_clear_browser_cache); diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp index a7401fdb6f..76caa0cf91 100644 --- a/indra/newview/llfloatersearch.cpp +++ b/indra/newview/llfloatersearch.cpp @@ -118,11 +118,9 @@ void LLFloaterSearch::onOpen(const LLSD& key) void LLFloaterSearch::onClose(bool app_quitting) { - if (! app_quitting) - { - // Show the blank home page ready for the next onOpen() - mBrowser->navigateHome(); - } + // tear down the web view so we don't show the previous search + // result when the floater is opened next time + destroy(); } void LLFloaterSearch::handleMediaEvent(LLPluginClassMedia *self, EMediaEvent event) @@ -158,11 +156,6 @@ void LLFloaterSearch::search(const LLSD &key) return; } - // display the blank home page first, to clear the display of - // any previous search results while the new results load. - // The home page is set in floater_search.xml as start_url. - mBrowser->navigateHome(); - // reset the god level warning as we're sending the latest state childHide("refresh_search"); mSearchGodLevel = gAgent.getGodLevel(); diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp index 1ed1113f4d..bcfb516b81 100644 --- a/indra/newview/llgrouplist.cpp +++ b/indra/newview/llgrouplist.cpp @@ -287,7 +287,7 @@ bool LLGroupList::onContextMenuItemEnable(const LLSD& userdata) return gAgent.getGroupID() != selected_group_id; if (userdata.asString() == "call") - return LLVoiceClient::voiceEnabled()&&gVoiceClient->voiceWorking(); + return real_group_selected && LLVoiceClient::voiceEnabled()&&gVoiceClient->voiceWorking(); return real_group_selected; } diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index 4bf2bac649..97e2b5b86e 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -250,6 +250,12 @@ void LLFloaterMove::setSittingMode(BOOL bSitting) else { LLPanelStandStopFlying::clearStandStopFlyingMode(LLPanelStandStopFlying::SSFM_STAND); + + // show "Stop Flying" button if needed. EXT-871 + if (gAgent.getFlying()) + { + LLPanelStandStopFlying::setStandStopFlyingMode(LLPanelStandStopFlying::SSFM_STOP_FLYING); + } } enableInstance(!bSitting); } @@ -684,10 +690,6 @@ void LLPanelStandStopFlying::onStandButtonClick() gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); setFocus(FALSE); // EXT-482 - - BOOL fly = gAgent.getFlying(); - mStopFlyingButton->setVisible(fly); - setVisible(fly); } void LLPanelStandStopFlying::onStopFlyingButtonClick() diff --git a/indra/newview/llnotificationhandler.h b/indra/newview/llnotificationhandler.h index 5f4768e321..0d5c431d75 100644 --- a/indra/newview/llnotificationhandler.h +++ b/indra/newview/llnotificationhandler.h @@ -334,11 +334,6 @@ public: * Adds notification panel to the IM floater. */ static void addNotifPanelToIM(const LLNotificationPtr& notification); - - /** - * Reloads IM floater messages. - */ - static void reloadIMFloaterMessages(const LLNotificationPtr& notification); }; } diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp index 35569cffac..c187ee7bf2 100644 --- a/indra/newview/llnotificationhandlerutil.cpp +++ b/indra/newview/llnotificationhandlerutil.cpp @@ -94,7 +94,8 @@ bool LLHandlerUtil::canSpawnIMSession(const LLNotificationPtr& notification) // static bool LLHandlerUtil::canAddNotifPanelToIM(const LLNotificationPtr& notification) { - return OFFER_FRIENDSHIP == notification->getName(); + return OFFER_FRIENDSHIP == notification->getName() + || USER_GIVE_ITEM == notification->getName(); } @@ -265,31 +266,8 @@ void LLHandlerUtil::addNotifPanelToIM(const LLNotificationPtr& notification) offer["from_id"] = notification->getPayload()["from_id"]; offer["from"] = name; offer["time"] = LLLogChat::timestamp(true); + offer["index"] = (LLSD::Integer)session->mMsgs.size(); session->mMsgs.push_front(offer); LLIMFloater::show(session_id); } - -// static -void LLHandlerUtil::reloadIMFloaterMessages( - const LLNotificationPtr& notification) -{ - LLUUID from_id = notification->getPayload()["from_id"]; - LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, from_id); - LLIMFloater* im_floater = LLFloaterReg::findTypedInstance<LLIMFloater>( - "impanel", session_id); - if (im_floater != NULL) - { - LLIMModel::LLIMSession * session = LLIMModel::getInstance()->findIMSession( - session_id); - if(session != NULL) - { - session->mMsgs.clear(); - std::list<LLSD> chat_history; - LLLogChat::loadAllHistory(session->mHistoryFileName, chat_history); - session->addMessagesFromHistory(chat_history); - } - - im_floater->reloadMessages(); - } -} diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp index 8c13b0fafa..8ebd5de258 100644 --- a/indra/newview/llnotificationofferhandler.cpp +++ b/indra/newview/llnotificationofferhandler.cpp @@ -155,10 +155,6 @@ bool LLOfferHandler::processNotification(const LLSD& notify) } else { - if (LLHandlerUtil::canAddNotifPanelToIM(notification)) - { - LLHandlerUtil::reloadIMFloaterMessages(notification); - } mChannel->killToastByNotificationID(notification->getID()); } } diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp index 8eb0b69491..2ff2597f08 100644 --- a/indra/newview/llpanelpicks.cpp +++ b/indra/newview/llpanelpicks.cpp @@ -351,7 +351,14 @@ void LLPanelPicks::processProperties(void* data, EAvatarProcessorType type) if (mNoPicks && mNoClassifieds) { - childSetValue("picks_panel_text", LLTrans::getString("NoPicksClassifiedsText")); + if(getAvatarId() == gAgentID) + { + childSetValue("picks_panel_text", LLTrans::getString("NoPicksClassifiedsText")); + } + else + { + childSetValue("picks_panel_text", LLTrans::getString("NoAvatarPicksClassifiedsText")); + } } } diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp index 9b46a59782..22a1ef94a7 100644 --- a/indra/newview/llpreviewtexture.cpp +++ b/indra/newview/llpreviewtexture.cpp @@ -249,6 +249,7 @@ void LLPreviewTexture::draw() } } } + } @@ -283,18 +284,52 @@ void LLPreviewTexture::saveAs() // virtual void LLPreviewTexture::reshape(S32 width, S32 height, BOOL called_from_parent) { -// mLastHeight = 0; -// mLastWidth = 0; - mUpdateDimensions = TRUE; LLPreview::reshape(width, height, called_from_parent); + + LLRect dim_rect; + childGetRect("dimensions", dim_rect); + + S32 horiz_pad = 2 * (LLPANEL_BORDER_WIDTH + PREVIEW_PAD) + PREVIEW_RESIZE_HANDLE_SIZE; + + // add space for dimensions and aspect ratio + S32 info_height = dim_rect.mTop + CLIENT_RECT_VPAD; + + LLRect client_rect(horiz_pad, getRect().getHeight(), getRect().getWidth() - horiz_pad, 0); + client_rect.mTop -= (PREVIEW_HEADER_SIZE + CLIENT_RECT_VPAD); + client_rect.mBottom += PREVIEW_BORDER + CLIENT_RECT_VPAD + info_height ; + + S32 client_width = client_rect.getWidth(); + S32 client_height = client_rect.getHeight(); + + if (mAspectRatio > 0.f) + { + if(mAspectRatio > 1.f) + { + client_height = llceil((F32)client_width / mAspectRatio); + if(client_height > client_rect.getHeight()) + { + client_height = client_rect.getHeight(); + client_width = llceil((F32)client_height * mAspectRatio); + } + } + else//mAspectRatio < 1.f + { + client_width = llceil((F32)client_height * mAspectRatio); + if(client_width > client_rect.getWidth()) + { + client_width = client_rect.getWidth(); + client_height = llceil((F32)client_width / mAspectRatio); + } + } + } + + mClientRect.setLeftTopAndSize(client_rect.getCenterX() - (client_width / 2), client_rect.getCenterY() + (client_height / 2), client_width, client_height); + } // virtual void LLPreviewTexture::onFocusReceived() { - mLastHeight = 0; - mLastWidth = 0; - mUpdateDimensions = TRUE; LLPreview::onFocusReceived(); } @@ -365,13 +400,19 @@ void LLPreviewTexture::updateDimensions() { if (!mImage) return; + + if(mImage->getFullWidth() == 0 || mImage->getFullHeight() == 0) + { + return; + } + mUpdateDimensions = FALSE; - - // set text on dimensions display (should be moved out of here and into a callback of some sort) + childSetTextArg("dimensions", "[WIDTH]", llformat("%d", mImage->getFullWidth())); childSetTextArg("dimensions", "[HEIGHT]", llformat("%d", mImage->getFullHeight())); + LLRect dim_rect; childGetRect("dimensions", dim_rect); @@ -380,34 +421,68 @@ void LLPreviewTexture::updateDimensions() // add space for dimensions and aspect ratio S32 info_height = dim_rect.mTop + CLIENT_RECT_VPAD; - LLRect client_rect(horiz_pad, getRect().getHeight(), getRect().getWidth() - horiz_pad, 0); - client_rect.mTop -= (PREVIEW_HEADER_SIZE + CLIENT_RECT_VPAD); - client_rect.mBottom += PREVIEW_BORDER + CLIENT_RECT_VPAD + info_height ; + S32 screen_width = gFloaterView->getSnapRect().getWidth(); + S32 screen_height = gFloaterView->getSnapRect().getHeight(); - S32 client_width = client_rect.getWidth(); - S32 client_height = client_rect.getHeight(); + S32 max_image_width = screen_width - 2*horiz_pad; + S32 max_image_height = screen_height - (PREVIEW_HEADER_SIZE + CLIENT_RECT_VPAD) + - (PREVIEW_BORDER + CLIENT_RECT_VPAD + info_height); + + S32 client_width = llmin(max_image_width,mImage->getFullWidth()); + S32 client_height = llmin(max_image_height,mImage->getFullHeight()); if (mAspectRatio > 0.f) { if(mAspectRatio > 1.f) { client_height = llceil((F32)client_width / mAspectRatio); - if(client_height > client_rect.getHeight()) + if(client_height > max_image_height) { - client_height = client_rect.getHeight(); + client_height = max_image_height; client_width = llceil((F32)client_height * mAspectRatio); } } - else + else//mAspectRatio < 1.f { client_width = llceil((F32)client_height * mAspectRatio); - if(client_width > client_rect.getWidth()) + if(client_width > max_image_width) { - client_width = client_rect.getWidth(); + client_width = max_image_width; client_height = llceil((F32)client_width / mAspectRatio); } } } + else + { + + if(client_height > max_image_height) + { + F32 ratio = (F32)max_image_height/client_height; + client_height = max_image_height; + client_width = llceil((F32)client_height * ratio); + } + + if(client_width > max_image_width) + { + F32 ratio = (F32)max_image_width/client_width; + client_width = max_image_width; + client_height = llceil((F32)client_width * ratio); + } + } + + //now back to whole floater + S32 floater_width = llmax(getMinWidth(),client_width + 2*horiz_pad); + S32 floater_height = llmax(getMinHeight(),client_height + (PREVIEW_HEADER_SIZE + CLIENT_RECT_VPAD) + + (PREVIEW_BORDER + CLIENT_RECT_VPAD + info_height)); + + //reshape floater + reshape( floater_width, floater_height ); + gFloaterView->adjustToFitScreen(this, FALSE); + + //setup image rect... + LLRect client_rect(horiz_pad, getRect().getHeight(), getRect().getWidth() - horiz_pad, 0); + client_rect.mTop -= (PREVIEW_HEADER_SIZE + CLIENT_RECT_VPAD); + client_rect.mBottom += PREVIEW_BORDER + CLIENT_RECT_VPAD + info_height ; mClientRect.setLeftTopAndSize(client_rect.getCenterX() - (client_width / 2), client_rect.getCenterY() + (client_height / 2), client_width, client_height); @@ -469,6 +544,7 @@ void LLPreviewTexture::loadAsset() mImage->setBoostLevel(LLViewerTexture::BOOST_PREVIEW); mImage->forceToSaveRawImage(0) ; mAssetStatus = PREVIEW_ASSET_LOADING; + mUpdateDimensions = TRUE; updateDimensions(); childSetEnabled("save_tex_btn", canSaveAs()); } diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index ef3535042c..c47c017143 100644 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -346,4 +346,7 @@ void LLToastNotifyPanel::onClickButton(void* data) response[button_name] = true; } self->mNotification->respond(response); + + // disable all buttons + self->mControlPanel->setEnabled(FALSE); } diff --git a/indra/newview/lltoastnotifypanel.h b/indra/newview/lltoastnotifypanel.h index 3d57c50386..e791eea469 100644 --- a/indra/newview/lltoastnotifypanel.h +++ b/indra/newview/lltoastnotifypanel.h @@ -55,6 +55,7 @@ class LLToastNotifyPanel: public LLToastPanel public: LLToastNotifyPanel(LLNotificationPtr&); virtual ~LLToastNotifyPanel(); + LLPanel * getControlPanel() { return mControlPanel; } protected: LLButton* createButton(const LLSD& form_element, BOOL is_option); diff --git a/indra/newview/skins/default/xui/en/floater_script.xml b/indra/newview/skins/default/xui/en/floater_script.xml index c3e974d978..984c4fcf1d 100644 --- a/indra/newview/skins/default/xui/en/floater_script.xml +++ b/indra/newview/skins/default/xui/en/floater_script.xml @@ -12,7 +12,7 @@ can_minimize="true" visible="true" width="520" - can_resize="true" + can_resize="false" min_width="350" min_height="369"> </floater> diff --git a/indra/newview/skins/default/xui/en/floater_snapshot.xml b/indra/newview/skins/default/xui/en/floater_snapshot.xml index 2c9402f6cb..1ab3dda52c 100644 --- a/indra/newview/skins/default/xui/en/floater_snapshot.xml +++ b/indra/newview/skins/default/xui/en/floater_snapshot.xml @@ -354,10 +354,6 @@ label="Depth" name="Depth" value="depth" /> - <combo_box.item - label="Object Mattes" - name="ObjectMattes" - value="objects" /> </combo_box> <check_box label="Interface" diff --git a/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml b/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml index c605975c8e..1e2e74f882 100644 --- a/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml @@ -75,6 +75,7 @@ height="16" image_pressed="Info_Press" image_unselected="Info_Over" + layout="topleft" left_pad="3" right="-53" name="info_btn" diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index d8975aadeb..53ca0005a5 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -73,6 +73,11 @@ name="talk" top="5" width="100"> + <speak_button + name="speak_btn" + label="Speak" + label_selected="Speak" + /> <show_button> <show_button.init_callback function="Button.SetDockableFloaterToggle" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml index 82821a1dfe..f20526b491 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml @@ -366,10 +366,7 @@ min_val="64" name="DrawDistance" top="3" - width="255"> - <slider.commit_callback - function="Pref.UpdateMeterText" /> - </slider> + width="255" /> <text type="string" length="1" diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index c62a36bca3..f610a258ff 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2128,6 +2128,7 @@ Clears (deletes) the media and all params from the given face. <!-- panel picks --> <string name="NoPicksClassifiedsText">You haven't created any Picks or Classifieds. Click the Plus button below to create a Pick or Classified.</string> + <string name="NoAvatarPicksClassifiedsText">User has no picks or classfields</string> <string name="PicksClassifiedsLoadingText">Loading...</string> <!-- Multi Preview Floater --> diff --git a/indra/newview/skins/default/xui/en/widgets/talk_button.xml b/indra/newview/skins/default/xui/en/widgets/talk_button.xml index 68cf082c35..a7e271a1ff 100644 --- a/indra/newview/skins/default/xui/en/widgets/talk_button.xml +++ b/indra/newview/skins/default/xui/en/widgets/talk_button.xml @@ -11,9 +11,6 @@ image_unselected="SegmentedBtn_Left_Off" image_pressed="SegmentedBtn_Left_Selected_Press" image_pressed_selected="SegmentedBtn_Left_Selected_Press" - name="speak_btn" - label="Speak" - label_selected="Speak" tab_stop="false" /> <show_button |