From 4b9abb162cd7b4cfca3c98a0611cb2272d336476 Mon Sep 17 00:00:00 2001 From: Denis Serdjuk Date: Wed, 27 Jan 2010 18:05:46 +0200 Subject: fixed minor bug EXT-3941 Quick clicks on chiclets are treated as double clicks Handling of mouseDown event was delegated to chiclet's button. Also double callback was connected with onMouseDown handler to ride from missed click behavior. --HG-- branch : product-engine --- indra/newview/llchiclet.cpp | 26 ++++++++------------------ indra/newview/llchiclet.h | 17 ++++------------- 2 files changed, 12 insertions(+), 31 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index f1de4e2982..f646bcccb5 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -459,6 +459,14 @@ LLIMChiclet::LLIMChiclet(const LLIMChiclet::Params& p) enableCounterControl(p.enable_counter); } +/* virtual*/ +BOOL LLIMChiclet::postBuild() +{ + mChicletButton = getChild("chiclet_button"); + mChicletButton->setCommitCallback(boost::bind(&LLIMChiclet::onMouseDown, this)); + mChicletButton->setDoubleClickCallback(boost::bind(&LLIMChiclet::onMouseDown, this)); + return TRUE; +} void LLIMChiclet::setShowSpeaker(bool show) { bool needs_resize = getShowSpeaker() != show; @@ -583,12 +591,6 @@ void LLIMChiclet::setToggleState(bool toggle) mChicletButton->setToggleState(toggle); } -BOOL LLIMChiclet::handleMouseDown(S32 x, S32 y, MASK mask) -{ - onMouseDown(); - return LLChiclet::handleMouseDown(x, y, mask); -} - void LLIMChiclet::draw() { LLUICtrl::draw(); @@ -1905,12 +1907,6 @@ void LLScriptChiclet::onMouseDown() LLScriptFloaterManager::getInstance()->toggleScriptFloater(getSessionId()); } -BOOL LLScriptChiclet::handleMouseDown(S32 x, S32 y, MASK mask) -{ - onMouseDown(); - return LLChiclet::handleMouseDown(x, y, mask); -} - ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// @@ -1975,10 +1971,4 @@ void LLInvOfferChiclet::onMouseDown() LLScriptFloaterManager::instance().toggleScriptFloater(getSessionId()); } -BOOL LLInvOfferChiclet::handleMouseDown(S32 x, S32 y, MASK mask) -{ - onMouseDown(); - return LLChiclet::handleMouseDown(x, y, mask); -} - // EOF diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index bb4846aa57..b006ae3420 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -327,6 +327,10 @@ public: virtual ~LLIMChiclet() {}; + /** + * It is used for default setting up of chicklet:click handler, etc. + */ + BOOL postBuild(); /** * Sets IM session name. This name will be displayed in chiclet tooltip. */ @@ -428,8 +432,6 @@ protected: LLIMChiclet(const LLIMChiclet::Params& p); - /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask); - protected: bool mShowSpeaker; @@ -640,11 +642,6 @@ public: */ /*virtual*/ void onMouseDown(); - /** - * Override default handler - */ - /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask); - protected: LLScriptChiclet(const Params&); @@ -684,12 +681,6 @@ public: */ /*virtual*/ void onMouseDown(); - /** - * Override default handler - */ - /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask); - - protected: LLInvOfferChiclet(const Params&); friend class LLUICtrlFactory; -- cgit v1.2.3 From b23a5dda5a730b1d0196d171dc5005e03b2328d4 Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Wed, 27 Jan 2010 18:19:52 +0200 Subject: Fixed low bug EXT-4647 ("Leaving nearby voice ..." appears when you're not connected to nearby voice channel). - Added flag to check whether to show "Leaving ...". It is false only if voice in parcel is disabled and channel we leave is nearby. --HG-- branch : product-engine --- indra/newview/llimview.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 6ac7378c58..c4b1d7a9f4 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -66,6 +66,7 @@ #include "llspeakers.h" //for LLIMSpeakerMgr #include "lltextutil.h" #include "llviewercontrol.h" +#include "llviewerparcelmgr.h" const static std::string IM_TIME("time"); @@ -1601,6 +1602,9 @@ void LLOutgoingCallDialog::show(const LLSD& key) { mPayload = key; + //will be false only if voice in parcel is disabled and channel we leave is nearby(checked further) + bool show_oldchannel = LLViewerParcelMgr::getInstance()->allowAgentVoice(); + // hide all text at first hideAllText(); @@ -1624,10 +1628,11 @@ void LLOutgoingCallDialog::show(const LLSD& key) } childSetTextArg("leaving", "[CURRENT_CHAT]", old_caller_name); + show_oldchannel = true; } else { - childSetTextArg("leaving", "[CURRENT_CHAT]", getString("localchat")); + childSetTextArg("leaving", "[CURRENT_CHAT]", getString("localchat")); } if (!mPayload["disconnected_channel_name"].asString().empty()) @@ -1672,10 +1677,16 @@ void LLOutgoingCallDialog::show(const LLSD& key) { case LLVoiceChannel::STATE_CALL_STARTED : getChild("calling")->setVisible(true); - getChild("leaving")->setVisible(true); + if(show_oldchannel) + { + getChild("leaving")->setVisible(true); + } break; case LLVoiceChannel::STATE_RINGING : - getChild("leaving")->setVisible(true); + if(show_oldchannel) + { + getChild("leaving")->setVisible(true); + } getChild("connecting")->setVisible(true); break; case LLVoiceChannel::STATE_ERROR : -- cgit v1.2.3 From a904e887bdee8656694551697e860a06bbfe9b6c Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Wed, 27 Jan 2010 19:00:12 +0200 Subject: Fixed normal bug (EXT-4700) Creating a landmark brings up the Landmark sidepanel info twice. - Disabled "Close" and "Back" buttons to prevent closing "Create Landmark" panel until created landmark is loaded. --HG-- branch : product-engine --- indra/newview/llpanelplaces.cpp | 26 ++++++++++++++++++-------- indra/newview/llpanelplaces.h | 2 ++ indra/newview/llviewermessage.cpp | 5 +++-- 3 files changed, 23 insertions(+), 10 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 7272a8a652..29cfbbe606 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -272,11 +272,11 @@ BOOL LLPanelPlaces::postBuild() if (!mPlaceProfile || !mLandmarkInfo) return FALSE; - LLButton* back_btn = mPlaceProfile->getChild("back_btn"); - back_btn->setClickedCallback(boost::bind(&LLPanelPlaces::onBackButtonClicked, this)); + mPlaceProfileBackBtn = mPlaceProfile->getChild("back_btn"); + mPlaceProfileBackBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onBackButtonClicked, this)); - back_btn = mLandmarkInfo->getChild("back_btn"); - back_btn->setClickedCallback(boost::bind(&LLPanelPlaces::onBackButtonClicked, this)); + mLandmarkInfoBackBtn = mLandmarkInfo->getChild("back_btn"); + mLandmarkInfoBackBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onBackButtonClicked, this)); LLLineEditor* title_editor = mLandmarkInfo->getChild("title_editor"); title_editor->setKeystrokeCallback(boost::bind(&LLPanelPlaces::onEditButtonClicked, this), NULL); @@ -327,9 +327,12 @@ void LLPanelPlaces::onOpen(const LLSD& key) mLandmarkInfo->displayParcelInfo(LLUUID(), mPosGlobal); - // Disable Save button because there is no item to save yet. - // The button will be enabled in onLandmarkLoaded callback. + // Disabling "Save", "Close" and "Back" buttons to prevent closing "Create Landmark" + // panel before created landmark is loaded. + // These buttons will be enabled when created landmark is added to inventory. mSaveBtn->setEnabled(FALSE); + mCloseBtn->setEnabled(FALSE); + mLandmarkInfoBackBtn->setEnabled(FALSE); } else if (mPlaceInfoType == LANDMARK_INFO_TYPE) { @@ -437,6 +440,8 @@ void LLPanelPlaces::setItem(LLInventoryItem* item) mEditBtn->setEnabled(is_landmark_editable); mSaveBtn->setEnabled(is_landmark_editable); + mCloseBtn->setEnabled(TRUE); + mLandmarkInfoBackBtn->setEnabled(TRUE); if (is_landmark_editable) { @@ -488,8 +493,6 @@ void LLPanelPlaces::onLandmarkLoaded(LLLandmark* landmark) landmark->getGlobalPos(mPosGlobal); mLandmarkInfo->displayParcelInfo(region_id, mPosGlobal); - mSaveBtn->setEnabled(TRUE); - updateVerbs(); } @@ -1030,6 +1033,13 @@ void LLPanelPlaces::updateVerbs() { mTeleportBtn->setEnabled(have_3d_pos); } + + // Do not enable landmark info Back button when we are waiting + // for newly created landmark to load. + if (!is_create_landmark_visible) + { + mLandmarkInfoBackBtn->setEnabled(TRUE); + } } else { diff --git a/indra/newview/llpanelplaces.h b/indra/newview/llpanelplaces.h index a098974659..5de78b1595 100644 --- a/indra/newview/llpanelplaces.h +++ b/indra/newview/llpanelplaces.h @@ -115,6 +115,8 @@ private: LLToggleableMenu* mPlaceMenu; LLToggleableMenu* mLandmarkMenu; + LLButton* mPlaceProfileBackBtn; + LLButton* mLandmarkInfoBackBtn; LLButton* mTeleportBtn; LLButton* mShowOnMapBtn; LLButton* mEditBtn; diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index d6ce356c4b..36710e7532 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -906,7 +906,7 @@ void open_inventory_offer(const std::vector& items, const std::string& f if ("inventory_handler" == from_name) { //we have to filter inventory_handler messages to avoid notification displaying - LLSideTray::getInstance()->showPanel("panel_places", + LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "landmark").with("id", item->getUUID())); } else if("group_offer" == from_name) @@ -925,8 +925,9 @@ void open_inventory_offer(const std::vector& items, const std::string& f args["FOLDER_NAME"] = std::string(parent_folder ? parent_folder->getName() : "unknown"); LLNotificationsUtil::add("LandmarkCreated", args); // Created landmark is passed to Places panel to allow its editing. In fact panel should be already displayed. + // If the panel is closed we don't reopen it until created landmark is loaded. //TODO*:: dserduk(7/12/09) remove LLPanelPlaces dependency from here - LLPanelPlaces *places_panel = dynamic_cast(LLSideTray::getInstance()->showPanel("panel_places", LLSD())); + LLPanelPlaces *places_panel = dynamic_cast(LLSideTray::getInstance()->getPanel("panel_places")); if (places_panel) { // we are creating a landmark -- cgit v1.2.3 From f5344270f24702711df67f02160b9225d269669b Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Wed, 27 Jan 2010 21:18:13 +0200 Subject: Fixed normal bug (EXT-4592) Negative 'new balance' value in Buy L$ floater - Restricted currency purchase amount to a 10 digit number. --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/floater_buy_currency.xml | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_buy_currency.xml b/indra/newview/skins/default/xui/en/floater_buy_currency.xml index 8f67f564a2..703a02d995 100644 --- a/indra/newview/skins/default/xui/en/floater_buy_currency.xml +++ b/indra/newview/skins/default/xui/en/floater_buy_currency.xml @@ -114,6 +114,7 @@