summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llchiclet.cpp26
-rw-r--r--indra/newview/llchiclet.h17
-rw-r--r--indra/newview/llimview.cpp17
-rw-r--r--indra/newview/llpanelplaces.cpp26
-rw-r--r--indra/newview/llpanelplaces.h2
-rw-r--r--indra/newview/llviewermessage.cpp5
-rw-r--r--indra/newview/skins/default/xui/en/floater_buy_currency.xml1
7 files changed, 50 insertions, 44 deletions
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<LLButton>("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
@@ -328,6 +328,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.
*/
virtual void setIMSessionName(const std::string& name) { setToolTip(name); }
@@ -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;
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<LLTextBox>("calling")->setVisible(true);
- getChild<LLTextBox>("leaving")->setVisible(true);
+ if(show_oldchannel)
+ {
+ getChild<LLTextBox>("leaving")->setVisible(true);
+ }
break;
case LLVoiceChannel::STATE_RINGING :
- getChild<LLTextBox>("leaving")->setVisible(true);
+ if(show_oldchannel)
+ {
+ getChild<LLTextBox>("leaving")->setVisible(true);
+ }
getChild<LLTextBox>("connecting")->setVisible(true);
break;
case LLVoiceChannel::STATE_ERROR :
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<LLButton>("back_btn");
- back_btn->setClickedCallback(boost::bind(&LLPanelPlaces::onBackButtonClicked, this));
+ mPlaceProfileBackBtn = mPlaceProfile->getChild<LLButton>("back_btn");
+ mPlaceProfileBackBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onBackButtonClicked, this));
- back_btn = mLandmarkInfo->getChild<LLButton>("back_btn");
- back_btn->setClickedCallback(boost::bind(&LLPanelPlaces::onBackButtonClicked, this));
+ mLandmarkInfoBackBtn = mLandmarkInfo->getChild<LLButton>("back_btn");
+ mLandmarkInfoBackBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onBackButtonClicked, this));
LLLineEditor* title_editor = mLandmarkInfo->getChild<LLLineEditor>("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<LLUUID>& 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<LLUUID>& 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<LLPanelPlaces*>(LLSideTray::getInstance()->showPanel("panel_places", LLSD()));
+ LLPanelPlaces *places_panel = dynamic_cast<LLPanelPlaces*>(LLSideTray::getInstance()->getPanel("panel_places"));
if (places_panel)
{
// we are creating a landmark
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 @@
</text>
<line_editor
type="string"
+ max_length="10"
halign="right"
font="SansSerifMedium"
select_on_focus="true"