From a4a2b148c2b7c051de7ab04d7b05c727064d6e42 Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Thu, 18 Feb 2010 12:27:00 +0200 Subject: Fixed low bug EXT-4057 - Preferences: Draw Distance value of < 100 displays without an "m". Removed redundant code, there is no DrawDistanceMeterText1 so no need to switch visibility. --HG-- branch : product-engine --- indra/newview/llfloaterpreference.cpp | 16 ---------------- .../skins/default/xui/en/panel_preferences_graphics1.xml | 5 +---- 2 files changed, 1 insertion(+), 20 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index f20ef76bed..2c115dbfab 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)); @@ -676,21 +675,6 @@ void LLFloaterPreference::refreshEnabledGraphics() } } -void LLFloaterPreference::updateMeterText(LLUICtrl* ctrl) -{ - // get our UI widgets - LLSliderCtrl* slider = (LLSliderCtrl*) ctrl; - - LLTextBox* m1 = getChild("DrawDistanceMeterText1"); - LLTextBox* m2 = getChild("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/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"> - - + width="255" /> Date: Thu, 18 Feb 2010 12:49:22 +0200 Subject: Fixed low bug EXT-5482 - "Call" item is enabled for "none" item in groups list --HG-- branch : product-engine --- indra/newview/llgrouplist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') 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; } -- cgit v1.2.3 From e624b9c6fad814c39972eaf5707d98084578bb62 Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Thu, 18 Feb 2010 12:55:21 +0200 Subject: Fixed normal bug EXT-5459 - Object dialog looks corrupted after attempt to resize it. Disabled user resizing. --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/floater_script.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') 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"> -- cgit v1.2.3 From ed46f84873c615292965191f28760664a67e0f1f Mon Sep 17 00:00:00 2001 From: Ychebotarev ProductEngine Date: Thu, 18 Feb 2010 15:00:16 +0200 Subject: fix for major EXT-4937 Texture Preview floater doesn't resize to match the aspect ratio of the viewed image --HG-- branch : product-engine --- indra/newview/llpreviewtexture.cpp | 112 +++++++++++++++++++++++++++++++------ 1 file changed, 94 insertions(+), 18 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp index 76b02f07ec..c0c859e9ac 100644 --- a/indra/newview/llpreviewtexture.cpp +++ b/indra/newview/llpreviewtexture.cpp @@ -248,6 +248,7 @@ void LLPreviewTexture::draw() } } } + } @@ -282,18 +283,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(); } @@ -364,13 +399,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); @@ -379,34 +420,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); @@ -468,6 +543,7 @@ void LLPreviewTexture::loadAsset() mImage->setBoostLevel(LLViewerTexture::BOOST_PREVIEW); mImage->forceToSaveRawImage(0) ; mAssetStatus = PREVIEW_ASSET_LOADING; + mUpdateDimensions = TRUE; updateDimensions(); childSetVisible("save_tex_btn", canSaveAs()); } -- cgit v1.2.3 From a52a761460a882a7890033b29ed203e4ce54c486 Mon Sep 17 00:00:00 2001 From: Paul Guslisty Date: Thu, 18 Feb 2010 15:19:57 +0200 Subject: Fixed normal bug EXT - 5426 (Invalid message is shown while viewing empty picks tab of another avata) - Added particular messages for 'PICKS' and 'My Picks' tabs in MyProfile and People panels appropriately. Before there was one message for these tabs. --HG-- branch : product-engine --- indra/newview/llpanelpicks.cpp | 9 ++++++++- indra/newview/skins/default/xui/en/strings.xml | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'indra/newview') 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/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 7703fc01f7..455b4be264 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2127,6 +2127,7 @@ Clears (deletes) the media and all params from the given face. You haven't created any Picks or Classifieds. Click the Plus button below to create a Pick or Classified. + User has no picks or classfields Loading... -- cgit v1.2.3 From eec9f20d746805e772d38f8b338d882a6afb8df1 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Thu, 18 Feb 2010 16:05:11 +0200 Subject: =?UTF-8?q?fixed=20EXT-5006=20=E2=80=9COne=20inventory=20offer=20c?= =?UTF-8?q?ause=20blinking=20of=20both=20Conversations=20and=20Notificatio?= =?UTF-8?q?ns=20wells=E2=80=9D,=20embedded=20inventory=20offer=20panel=20i?= =?UTF-8?q?nto=20IM=20window;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/llchathistory.cpp | 34 ++++++++++++++++------------ indra/newview/llnotificationhandler.h | 5 ---- indra/newview/llnotificationhandlerutil.cpp | 27 ++-------------------- indra/newview/llnotificationofferhandler.cpp | 4 ---- indra/newview/lltoastnotifypanel.cpp | 3 +++ indra/newview/lltoastnotifypanel.h | 1 + 6 files changed, 25 insertions(+), 49 deletions(-) (limited to 'indra/newview') 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 ("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 ( - "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 (*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("text_editor_box", TRUE); 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..c30a4fb253 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(); } @@ -269,27 +270,3 @@ void LLHandlerUtil::addNotifPanelToIM(const LLNotificationPtr& notification) 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( - "impanel", session_id); - if (im_floater != NULL) - { - LLIMModel::LLIMSession * session = LLIMModel::getInstance()->findIMSession( - session_id); - if(session != NULL) - { - session->mMsgs.clear(); - std::list 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/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); -- cgit v1.2.3 From 1933a378ea9082c6603f29964d2a8214e3142638 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Thu, 18 Feb 2010 17:51:06 +0200 Subject: Corrected embedded notification panel message index in session list; --HG-- branch : product-engine --- indra/newview/llnotificationhandlerutil.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp index c30a4fb253..c187ee7bf2 100644 --- a/indra/newview/llnotificationhandlerutil.cpp +++ b/indra/newview/llnotificationhandlerutil.cpp @@ -266,6 +266,7 @@ 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); -- cgit v1.2.3 From 8e134590e6651ba36ba9d38ccf10fae249645299 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Thu, 18 Feb 2010 18:42:31 +0200 Subject: Fixed low bug EXT-871 ("Stop Flying" button isn't displayed after standing up) - moved code to show Stop Flying button in a common place for both cases: click on "Stand" btn & call "Stand Up" menu item --HG-- branch : product-engine --- indra/newview/llmoveview.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'indra/newview') 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() -- cgit v1.2.3