summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llpanellandmarks.cpp21
-rw-r--r--indra/newview/llpanellandmarks.h1
-rw-r--r--indra/newview/llpanelplaces.cpp16
-rw-r--r--indra/newview/llpanelplacestab.h1
-rw-r--r--indra/newview/llpanelteleporthistory.cpp9
-rw-r--r--indra/newview/llpanelteleporthistory.h3
-rw-r--r--indra/newview/llparticipantlist.cpp9
-rw-r--r--indra/newview/skins/default/xui/en/menu_participant_list.xml18
8 files changed, 59 insertions, 19 deletions
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp
index 0a978d1b26..bcc852cf4c 100644
--- a/indra/newview/llpanellandmarks.cpp
+++ b/indra/newview/llpanellandmarks.cpp
@@ -309,6 +309,25 @@ void LLLandmarksPanel::onTeleport()
}
// virtual
+bool LLLandmarksPanel::isSingleItemSelected()
+{
+ bool result = false;
+
+ if (mCurrentSelectedList != NULL)
+ {
+ LLPlacesFolderView* root_view =
+ static_cast<LLPlacesFolderView*>(mCurrentSelectedList->getRootFolder());
+
+ if (root_view->getSelectedCount() == 1)
+ {
+ result = isLandmarkSelected();
+ }
+ }
+
+ return result;
+}
+
+// virtual
void LLLandmarksPanel::updateVerbs()
{
if (!isTabVisible())
@@ -316,8 +335,8 @@ void LLLandmarksPanel::updateVerbs()
bool landmark_selected = isLandmarkSelected();
mTeleportBtn->setEnabled(landmark_selected && isActionEnabled("teleport"));
- mShowOnMapBtn->setEnabled(landmark_selected && isActionEnabled("show_on_map"));
mShowProfile->setEnabled(landmark_selected && isActionEnabled("more_info"));
+ mShowOnMapBtn->setEnabled(true);
// TODO: mantipov: Uncomment when mShareBtn is supported
// Share button should be enabled when neither a folder nor a landmark is selected
diff --git a/indra/newview/llpanellandmarks.h b/indra/newview/llpanellandmarks.h
index 2d1eb0f091..8f8d9c2708 100644
--- a/indra/newview/llpanellandmarks.h
+++ b/indra/newview/llpanellandmarks.h
@@ -60,6 +60,7 @@ public:
/*virtual*/ void onShowProfile();
/*virtual*/ void onTeleport();
/*virtual*/ void updateVerbs();
+ /*virtual*/ bool isSingleItemSelected();
void onSelectionChange(LLPlacesInventoryPanel* inventory_list, const std::deque<LLFolderViewItem*> &items, BOOL user_action);
void onSelectorButtonClicked();
diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp
index 51a11e97e4..028440562d 100644
--- a/indra/newview/llpanelplaces.cpp
+++ b/indra/newview/llpanelplaces.cpp
@@ -615,8 +615,21 @@ void LLPanelPlaces::onShowOnMapButtonClicked()
}
else
{
- if (mActivePanel)
+ if (mActivePanel && mActivePanel->isSingleItemSelected())
+ {
mActivePanel->onShowOnMap();
+ }
+ else
+ {
+ LLFloaterWorldMap* worldmap_instance = LLFloaterWorldMap::getInstance();
+ LLVector3d global_pos = gAgent.getPositionGlobal();
+
+ if (!global_pos.isExactlyZero() && worldmap_instance)
+ {
+ worldmap_instance->trackLocation(global_pos);
+ LLFloaterReg::showInstance("world_map", "center");
+ }
+ }
}
}
@@ -1072,7 +1085,6 @@ void LLPanelPlaces::updateVerbs()
mCloseBtn->setVisible(is_create_landmark_visible && !isLandmarkEditModeOn);
mPlaceInfoBtn->setVisible(!is_place_info_visible && !is_create_landmark_visible && !isLandmarkEditModeOn);
- mShowOnMapBtn->setEnabled(!is_create_landmark_visible && !isLandmarkEditModeOn && have_3d_pos);
mPlaceInfoBtn->setEnabled(!is_create_landmark_visible && !isLandmarkEditModeOn && have_3d_pos);
if (is_place_info_visible)
diff --git a/indra/newview/llpanelplacestab.h b/indra/newview/llpanelplacestab.h
index f4e93a7658..4a155afd71 100644
--- a/indra/newview/llpanelplacestab.h
+++ b/indra/newview/llpanelplacestab.h
@@ -47,6 +47,7 @@ public:
virtual void onShowOnMap() = 0;
virtual void onShowProfile() = 0;
virtual void onTeleport() = 0;
+ virtual bool isSingleItemSelected() = 0;
bool isTabVisible(); // Check if parent TabContainer is visible.
diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp
index c0b2244038..e8b6c6bfe5 100644
--- a/indra/newview/llpanelteleporthistory.cpp
+++ b/indra/newview/llpanelteleporthistory.cpp
@@ -477,6 +477,12 @@ void LLTeleportHistoryPanel::onSearchEdit(const std::string& string)
}
// virtual
+bool LLTeleportHistoryPanel::isSingleItemSelected()
+{
+ return mLastSelectedFlatlList && mLastSelectedFlatlList->getSelectedItem();
+}
+
+// virtual
void LLTeleportHistoryPanel::onShowOnMap()
{
if (!mLastSelectedFlatlList)
@@ -557,7 +563,6 @@ void LLTeleportHistoryPanel::updateVerbs()
if (!mLastSelectedFlatlList)
{
mTeleportBtn->setEnabled(false);
- mShowOnMapBtn->setEnabled(false);
mShowProfile->setEnabled(false);
return;
}
@@ -565,8 +570,8 @@ void LLTeleportHistoryPanel::updateVerbs()
LLTeleportHistoryFlatItem* itemp = dynamic_cast<LLTeleportHistoryFlatItem *> (mLastSelectedFlatlList->getSelectedItem());
mTeleportBtn->setEnabled(NULL != itemp);
- mShowOnMapBtn->setEnabled(NULL != itemp);
mShowProfile->setEnabled(NULL != itemp);
+ mShowOnMapBtn->setEnabled(true);
}
void LLTeleportHistoryPanel::getNextTab(const LLDate& item_date, S32& tab_idx, LLDate& tab_date)
diff --git a/indra/newview/llpanelteleporthistory.h b/indra/newview/llpanelteleporthistory.h
index a456ca506f..1f2be63dc2 100644
--- a/indra/newview/llpanelteleporthistory.h
+++ b/indra/newview/llpanelteleporthistory.h
@@ -77,6 +77,7 @@ public:
/*virtual*/ void onTeleport();
///*virtual*/ void onCopySLURL();
/*virtual*/ void updateVerbs();
+ /*virtual*/ bool isSingleItemSelected();
private:
@@ -123,4 +124,6 @@ private:
LLHandle<LLView> mGearMenuHandle;
};
+
+
#endif //LL_LLPANELTELEPORTHISTORY_H
diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp
index 8c908449a0..2141f43758 100644
--- a/indra/newview/llparticipantlist.cpp
+++ b/indra/newview/llparticipantlist.cpp
@@ -674,12 +674,10 @@ void LLParticipantList::LLParticipantListMenu::show(LLView* spawning_view, const
if (is_muted)
{
LLMenuGL::sMenuContainer->childSetVisible("ModerateVoiceMuteSelected", false);
- LLMenuGL::sMenuContainer->childSetVisible("ModerateVoiceMuteOthers", false);
}
else
{
LLMenuGL::sMenuContainer->childSetVisible("ModerateVoiceUnMuteSelected", false);
- LLMenuGL::sMenuContainer->childSetVisible("ModerateVoiceUnMuteOthers", false);
}
}
@@ -784,16 +782,17 @@ void LLParticipantList::LLParticipantListMenu::moderateVoice(const LLSD& userdat
if (!gAgent.getRegion()) return;
bool moderate_selected = userdata.asString() == "selected";
- const LLUUID& selected_avatar_id = mUUIDs.front();
- bool is_muted = isMuted(selected_avatar_id);
if (moderate_selected)
{
+ const LLUUID& selected_avatar_id = mUUIDs.front();
+ bool is_muted = isMuted(selected_avatar_id);
moderateVoiceParticipant(selected_avatar_id, is_muted);
}
else
{
- moderateVoiceOtherParticipants(selected_avatar_id, is_muted);
+ bool unmute_all = userdata.asString() == "unmute_all";
+ moderateVoiceOtherParticipants(LLUUID::null, unmute_all);
}
}
diff --git a/indra/newview/skins/default/xui/en/menu_participant_list.xml b/indra/newview/skins/default/xui/en/menu_participant_list.xml
index 6a90e92eca..f126431263 100644
--- a/indra/newview/skins/default/xui/en/menu_participant_list.xml
+++ b/indra/newview/skins/default/xui/en/menu_participant_list.xml
@@ -160,34 +160,34 @@
parameter="can_moderate_voice" />
</menu_item_call>
<menu_item_call
- label="Mute everyone else"
+ label="Unmute this participant"
layout="topleft"
- name="ModerateVoiceMuteOthers">
+ name="ModerateVoiceUnMuteSelected">
<on_click
function="ParticipantList.ModerateVoice"
- parameter="others" />
+ parameter="selected" />
<on_enable
function="ParticipantList.EnableItem.Moderate"
parameter="can_moderate_voice" />
</menu_item_call>
<menu_item_call
- label="Unmute this participant"
+ label="Mute everyone"
layout="topleft"
- name="ModerateVoiceUnMuteSelected">
+ name="ModerateVoiceMute">
<on_click
function="ParticipantList.ModerateVoice"
- parameter="selected" />
+ parameter="mute_all" />
<on_enable
function="ParticipantList.EnableItem.Moderate"
parameter="can_moderate_voice" />
</menu_item_call>
<menu_item_call
- label="Unmute everyone else"
+ label="Unmute everyone"
layout="topleft"
- name="ModerateVoiceUnMuteOthers">
+ name="ModerateVoiceUnmute">
<on_click
function="ParticipantList.ModerateVoice"
- parameter="others" />
+ parameter="unmute_all" />
<on_enable
function="ParticipantList.EnableItem.Moderate"
parameter="can_moderate_voice" />