summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfavoritesbar.cpp14
-rw-r--r--indra/newview/lllandmarkactions.cpp18
-rw-r--r--indra/newview/lllandmarkactions.h6
-rw-r--r--indra/newview/llpanelavatar.cpp6
-rw-r--r--indra/newview/llpanelgroupgeneral.cpp21
-rw-r--r--indra/newview/llpanelpicks.cpp1
-rw-r--r--indra/newview/llpanelplaceinfo.cpp8
-rw-r--r--indra/newview/llpanelplaces.cpp157
-rw-r--r--indra/newview/llpanelplaces.h8
-rw-r--r--indra/newview/llpanelprofile.cpp10
-rw-r--r--indra/newview/llpanelprofile.h8
-rw-r--r--indra/newview/llpanelprofileview.cpp24
-rw-r--r--indra/newview/llpanelprofileview.h12
-rw-r--r--indra/newview/skins/default/xui/en/favorites_bar_button.xml2
-rw-r--r--indra/newview/skins/default/xui/en/menu_landmark.xml33
-rw-r--r--indra/newview/skins/default/xui/en/menu_place.xml47
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_general.xml16
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_pick_list_item.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_places.xml33
-rw-r--r--indra/newview/skins/default/xui/en/panel_profile.xml25
-rw-r--r--indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml11
22 files changed, 309 insertions, 155 deletions
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index 9dfc7bcee7..f739e159f3 100644
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -422,18 +422,8 @@ void LLFavoritesBarCtrl::showDropDownMenu()
if(menu)
{
- if (menu->getClosedByButtonClick())
- {
- menu->resetClosedByButtonClick();
- return;
- }
-
- if (menu->getVisible())
- {
- menu->setVisible(FALSE);
- menu->resetClosedByButtonClick();
+ if (!menu->toggleVisibility())
return;
- }
LLInventoryModel::item_array_t items;
@@ -559,7 +549,7 @@ void LLFavoritesBarCtrl::onButtonRightClick( LLUUID item_id,LLView* fav_button,S
LLMenuGL::showPopup(fav_button, menu, x, y);
}
-void copy_slurl_to_clipboard_cb(const LLVector3d& posGlobal, std::string& slurl)
+void copy_slurl_to_clipboard_cb(std::string& slurl)
{
gClipboard.copyFromString(utf8str_to_wstring(slurl));
}
diff --git a/indra/newview/lllandmarkactions.cpp b/indra/newview/lllandmarkactions.cpp
index 608b9b20e6..a341d81b94 100644
--- a/indra/newview/lllandmarkactions.cpp
+++ b/indra/newview/lllandmarkactions.cpp
@@ -182,7 +182,7 @@ void LLLandmarkActions::createLandmarkHere()
createLandmarkHere(landmark_name, landmark_desc, folder_id);
}
-void LLLandmarkActions::getSLURLfromPosGlobal(const LLVector3d& global_pos, slurl_signal_t signal)
+void LLLandmarkActions::getSLURLfromPosGlobal(const LLVector3d& global_pos, slurl_callback_t cb)
{
std::string sim_name;
bool gotSimName = LLWorldMap::getInstance()->simNameFromPosGlobal(global_pos, sim_name);
@@ -190,7 +190,7 @@ void LLLandmarkActions::getSLURLfromPosGlobal(const LLVector3d& global_pos, slur
{
std::string slurl = LLSLURL::buildSLURLfromPosGlobal(sim_name, global_pos);
- signal(global_pos, slurl);
+ cb(slurl);
return;
}
@@ -198,16 +198,16 @@ void LLLandmarkActions::getSLURLfromPosGlobal(const LLVector3d& global_pos, slur
{
U64 new_region_handle = to_region_handle(global_pos);
- LLWorldMap::url_callback_t cb = boost::bind(&LLLandmarkActions::onRegionResponse,
- signal,
- global_pos,
- _1, _2, _3, _4);
+ LLWorldMap::url_callback_t url_cb = boost::bind(&LLLandmarkActions::onRegionResponse,
+ cb,
+ global_pos,
+ _1, _2, _3, _4);
- LLWorldMap::getInstance()->sendHandleRegionRequest(new_region_handle, cb, std::string("unused"), false);
+ LLWorldMap::getInstance()->sendHandleRegionRequest(new_region_handle, url_cb, std::string("unused"), false);
}
}
-void LLLandmarkActions::onRegionResponse(slurl_signal_t signal,
+void LLLandmarkActions::onRegionResponse(slurl_callback_t cb,
const LLVector3d& global_pos,
U64 region_handle,
const std::string& url,
@@ -226,7 +226,7 @@ void LLLandmarkActions::onRegionResponse(slurl_signal_t signal,
slurl = "";
}
- signal(global_pos, slurl);
+ cb(slurl);
}
bool LLLandmarkActions::getLandmarkGlobalPos(const LLUUID& landmarkInventoryItemID, LLVector3d& posGlobal)
diff --git a/indra/newview/lllandmarkactions.h b/indra/newview/lllandmarkactions.h
index e04d1bf543..12c7398f6a 100644
--- a/indra/newview/lllandmarkactions.h
+++ b/indra/newview/lllandmarkactions.h
@@ -41,7 +41,7 @@
class LLLandmarkActions
{
public:
- typedef boost::function<void(const LLVector3d& global_pos, std::string& slurl)> slurl_signal_t;
+ typedef boost::function<void(std::string& slurl)> slurl_callback_t;
/**
* @brief Fetches landmark LLViewerInventoryItems for the given landmark name.
@@ -80,7 +80,7 @@ public:
/**
* @brief Creates SLURL for given global position.
*/
- static void getSLURLfromPosGlobal(const LLVector3d& global_pos, slurl_signal_t signal);
+ static void getSLURLfromPosGlobal(const LLVector3d& global_pos, slurl_callback_t cb);
/**
* @brief Gets landmark global position specified by inventory LLUUID.
@@ -96,7 +96,7 @@ private:
LLLandmarkActions();
LLLandmarkActions(const LLLandmarkActions&);
- static void onRegionResponse(slurl_signal_t signal,
+ static void onRegionResponse(slurl_callback_t cb,
const LLVector3d& global_pos,
U64 region_handle,
const std::string& url,
diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp
index 6c7fb8a0be..6e94b087a6 100644
--- a/indra/newview/llpanelavatar.cpp
+++ b/indra/newview/llpanelavatar.cpp
@@ -369,7 +369,6 @@ void LLPanelAvatarProfile::resetControls()
childSetVisible("sl_groups", true);
childSetEnabled("add_friend", true);
- childSetVisible("user_name", false);
childSetVisible("status_me_panel", false);
childSetVisible("profile_me_buttons_panel", false);
childSetVisible("account_actions_panel", false);
@@ -609,10 +608,6 @@ BOOL LLPanelAvatarMeProfile::postBuild()
void LLPanelAvatarMeProfile::onOpen(const LLSD& key)
{
LLPanelProfileTab::onOpen(key);
-
- std::string full_name;
- gCacheName->getFullName(getAvatarId(), full_name);
- childSetValue("user_name", full_name);
}
void LLPanelAvatarMeProfile::processProfileProperties(const LLAvatarData* avatar_data)
@@ -647,7 +642,6 @@ void LLPanelAvatarMeProfile::fillStatusData(const LLAvatarData* avatar_data)
void LLPanelAvatarMeProfile::resetControls()
{
- childSetVisible("user_name", true);
childSetVisible("status_panel", false);
childSetVisible("profile_buttons_panel", false);
childSetVisible("title_groups_text", false);
diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp
index d63e112357..22706513e0 100644
--- a/indra/newview/llpanelgroupgeneral.cpp
+++ b/indra/newview/llpanelgroupgeneral.cpp
@@ -887,6 +887,10 @@ void LLPanelGroupGeneral::updateChanged()
void LLPanelGroupGeneral::reset()
{
+ mFounderName->setVisible(false);
+
+ getChild<LLUICtrl>("prepend_founded_by")->setVisible(false);
+
mCtrlReceiveNotices->set(false);
@@ -1010,21 +1014,8 @@ void LLPanelGroupGeneral::setGroupID(const LLUUID& id)
mComboActiveTitle = getChild<LLComboBox>("active_title");
- if (mGroupID.isNull())
- {
- mGroupNameEditor->setEnabled(TRUE);
- mEditCharter->setEnabled(TRUE);
-
- mCtrlShowInGroupList->setEnabled(TRUE);
- mComboMature->setEnabled(TRUE);
- mCtrlOpenEnrollment->setEnabled(TRUE);
- mCtrlEnrollmentFee->setEnabled(TRUE);
- mSpinEnrollmentFee->setEnabled(TRUE);
-
- mBtnJoinGroup->setVisible(FALSE);
- mBtnInfo->setVisible(FALSE);
- mGroupName->setVisible(FALSE);
- }
+ mFounderName->setVisible(true);
+ getChild<LLUICtrl>("prepend_founded_by")->setVisible(true);
resetDirty();
diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp
index afcd8c735c..051bf08c2f 100644
--- a/indra/newview/llpanelpicks.cpp
+++ b/indra/newview/llpanelpicks.cpp
@@ -204,6 +204,7 @@ void LLPanelPicks::reshapePicksList()
reshapePickItem(childp, last_bottom,pickList->getRect().getWidth());
}
+ //*TODO move back panel reshaping before reshaping pick items, so it will be more durable to xui xml changes
S32 height = pickList->getChildCount() * ((*child_first_it)->getRect().getHeight() + PICK_ITEMS_BETWEEN);
LLRect rc = pickList->getRect();
rc.setLeftTopAndSize(rc.mLeft, rc.mTop, rc.getWidth(), height);
diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp
index 0931333ed9..34feb0f5a9 100644
--- a/indra/newview/llpanelplaceinfo.cpp
+++ b/indra/newview/llpanelplaceinfo.cpp
@@ -240,10 +240,7 @@ void LLPanelPlaceInfo::setParcelID(const LLUUID& parcel_id)
}
void LLPanelPlaceInfo::setInfoType(INFO_TYPE type)
-{
- if (type != PLACE)
- toggleMediaPanel(FALSE);
-
+{
bool is_landmark_info_type = type == LANDMARK;
LLPanel* landmark_info_panel = getChild<LLPanel>("landmark_info_panel");
if (landmark_info_panel)
@@ -276,6 +273,9 @@ void LLPanelPlaceInfo::setInfoType(INFO_TYPE type)
mCurrentTitle = getString("title_place");
break;
}
+
+ if (type != PLACE)
+ toggleMediaPanel(FALSE);
}
BOOL LLPanelPlaceInfo::isMediaPanelVisible()
diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp
index 7461d150c8..41be268483 100644
--- a/indra/newview/llpanelplaces.cpp
+++ b/indra/newview/llpanelplaces.cpp
@@ -43,6 +43,7 @@
#include "lluictrlfactory.h"
#include "llagent.h"
+#include "lllandmarkactions.h"
#include "lllandmarklist.h"
#include "llfloaterworldmap.h"
#include "llpanelplaces.h"
@@ -50,14 +51,22 @@
#include "llpanelteleporthistory.h"
#include "llsidetray.h"
#include "lltoggleablemenu.h"
+#include "llviewermenu.h"
#include "llviewerparcelmgr.h"
#include "llviewerregion.h"
+static const std::string AGENT_INFO_TYPE = "agent";
+static const std::string CREATE_LANDMARK_INFO_TYPE = "create_landmark";
+static const std::string LANDMARK_INFO_TYPE = "landmark";
+static const std::string REMOTE_PLACE_INFO_TYPE = "remote_place";
+static const std::string TELEPORT_HISTORY_INFO_TYPE = "teleport_history";
+
// Helper functions
static bool cmp_folders(const folder_pair_t& left, const folder_pair_t& right);
static std::string getFullFolderName(const LLViewerInventoryCategory* cat);
static void collectLandmarkFolders(LLInventoryModel::cat_array_t& cats);
static const LLVector3 get_pos_local_from_global(const LLVector3d &pos_global);
+static void onSLURLBuilt(std::string& slurl);
static LLRegisterPanelClassWrapper<LLPanelPlaces> t_places("panel_places");
@@ -68,6 +77,8 @@ LLPanelPlaces::LLPanelPlaces()
mFilterEditor(NULL),
mPlaceInfo(NULL),
mItem(NULL),
+ mPlaceMenu(NULL),
+ mLandmarkMenu(NULL),
mLandmarkFoldersMenuHandle(),
mPosGlobal()
{
@@ -107,7 +118,23 @@ BOOL LLPanelPlaces::postBuild()
mOverflowBtn = getChild<LLButton>("overflow_btn");
// *TODO: Assign the action to an appropriate event.
- mOverflowBtn->setClickedCallback(boost::bind(&LLPanelPlaces::toggleMediaPanel, this));
+ //mOverflowBtn->setClickedCallback(boost::bind(&LLPanelPlaces::toggleMediaPanel, this));
+ mOverflowBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onOverflowButtonClicked, this));
+
+ LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
+ registrar.add("Places.OverflowMenu.Action", boost::bind(&LLPanelPlaces::onOverflowMenuItemClicked, this, _2));
+
+ mPlaceMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_place.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
+ if (!mPlaceMenu)
+ {
+ llwarns << "Error loading Place menu" << llendl;
+ }
+
+ mLandmarkMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_landmark.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
+ if (!mLandmarkMenu)
+ {
+ llwarns << "Error loading Landmark menu" << llendl;
+ }
mTabContainer = getChild<LLTabContainer>("Places Tabs");
if (mTabContainer)
@@ -147,21 +174,21 @@ void LLPanelPlaces::onOpen(const LLSD& key)
togglePlaceInfoPanel(TRUE);
updateVerbs();
- if (mPlaceInfoType == "agent")
+ if (mPlaceInfoType == AGENT_INFO_TYPE)
{
mPlaceInfo->setInfoType(LLPanelPlaceInfo::PLACE);
mPlaceInfo->displayAgentParcelInfo();
mPosGlobal = gAgent.getPositionGlobal();
}
- else if (mPlaceInfoType == "create_landmark")
+ else if (mPlaceInfoType == CREATE_LANDMARK_INFO_TYPE)
{
mPlaceInfo->setInfoType(LLPanelPlaceInfo::CREATE_LANDMARK);
mPlaceInfo->displayAgentParcelInfo();
mPosGlobal = gAgent.getPositionGlobal();
}
- else if (mPlaceInfoType == "landmark")
+ else if (mPlaceInfoType == LANDMARK_INFO_TYPE)
{
LLUUID item_uuid = key["id"].asUUID();
LLInventoryItem* item = gInventory.getItem(item_uuid);
@@ -170,7 +197,7 @@ void LLPanelPlaces::onOpen(const LLSD& key)
setItem(item);
}
- else if (mPlaceInfoType == "remote_place")
+ else if (mPlaceInfoType == REMOTE_PLACE_INFO_TYPE)
{
if (mPlaceInfo->isMediaPanelVisible())
{
@@ -186,7 +213,7 @@ void LLPanelPlaces::onOpen(const LLSD& key)
LLUUID(),
mPosGlobal);
}
- else if (mPlaceInfoType == "teleport_history")
+ else if (mPlaceInfoType == TELEPORT_HISTORY_INFO_TYPE)
{
S32 index = key["id"].asInteger();
@@ -237,11 +264,10 @@ void LLPanelPlaces::onLandmarkLoaded(LLLandmark* landmark)
LLUUID region_id;
landmark->getRegionID(region_id);
- LLVector3d pos_global;
- landmark->getGlobalPos(pos_global);
+ landmark->getGlobalPos(mPosGlobal);
mPlaceInfo->displayParcelInfo(landmark->getRegionPos(),
region_id,
- pos_global);
+ mPosGlobal);
}
void LLPanelPlaces::onFilterEdit(const std::string& search_string)
@@ -273,12 +299,17 @@ void LLPanelPlaces::onShareButtonClicked()
{
// TODO: Launch the "Things" Share wizard
}
+*/
-void LLPanelPlaces::onCopySLURLButtonClicked()
+void LLPanelPlaces::copySLURL()
{
- mActivePanel->onCopySLURL();
+ LLLandmarkActions::getSLURLfromPosGlobal(mPosGlobal, boost::bind(&onSLURLBuilt, _1));
+}
+
+void LLPanelPlaces::deleteLandmark()
+{
+ gInventory.removeItem(mItem->getUUID());
}
-*/
void LLPanelPlaces::onTeleportButtonClicked()
{
@@ -287,13 +318,13 @@ void LLPanelPlaces::onTeleportButtonClicked()
if (mPlaceInfo->getVisible())
{
- if (mPlaceInfoType == "landmark")
+ if (mPlaceInfoType == LANDMARK_INFO_TYPE)
{
LLSD payload;
payload["asset_id"] = mItem->getAssetUUID();
LLNotifications::instance().add("TeleportFromLandmark", LLSD(), payload);
}
- else if (mPlaceInfoType == "remote_place" || mPlaceInfoType == "agent")
+ else if (mPlaceInfoType == AGENT_INFO_TYPE || mPlaceInfoType == REMOTE_PLACE_INFO_TYPE)
{
LLFloaterWorldMap* worldmap_instance = LLFloaterWorldMap::getInstance();
if (!mPosGlobal.isExactlyZero() && worldmap_instance)
@@ -320,9 +351,9 @@ void LLPanelPlaces::onShowOnMapButtonClicked()
if(!worldmap_instance)
return;
- if (mPlaceInfoType == "agent" ||
- mPlaceInfoType == "create_landmark" ||
- mPlaceInfoType == "remote_place")
+ if (mPlaceInfoType == AGENT_INFO_TYPE ||
+ mPlaceInfoType == CREATE_LANDMARK_INFO_TYPE ||
+ mPlaceInfoType == REMOTE_PLACE_INFO_TYPE)
{
if (!mPosGlobal.isExactlyZero())
{
@@ -330,7 +361,7 @@ void LLPanelPlaces::onShowOnMapButtonClicked()
LLFloaterReg::showInstance("world_map", "center");
}
}
- else if (mPlaceInfoType == "landmark")
+ else if (mPlaceInfoType == LANDMARK_INFO_TYPE)
{
LLLandmark* landmark = gLandmarkList.getAsset(mItem->getAssetUUID());
if (!landmark)
@@ -353,6 +384,52 @@ void LLPanelPlaces::onShowOnMapButtonClicked()
}
}
+void LLPanelPlaces::onOverflowButtonClicked()
+{
+ bool is_agent_place_info_visible = mPlaceInfoType == AGENT_INFO_TYPE;
+ bool is_landmark_info_visible = mPlaceInfoType == LANDMARK_INFO_TYPE;
+
+ LLToggleableMenu* menu;
+
+ if (is_agent_place_info_visible && mPlaceMenu != NULL)
+ {
+ menu = mPlaceMenu;
+ }
+ else if (is_landmark_info_visible && mLandmarkMenu != NULL)
+ {
+ menu = mLandmarkMenu;
+ }
+ else
+ {
+ return;
+ }
+
+ if (!menu->toggleVisibility())
+ return;
+
+ menu->updateParent(LLMenuGL::sMenuContainer);
+ LLRect rect = mOverflowBtn->getRect();
+ menu->setButtonRect(rect, this);
+ LLMenuGL::showPopup(this, menu, rect.mRight, rect.mTop);
+}
+
+void LLPanelPlaces::onOverflowMenuItemClicked(const LLSD& param)
+{
+ std::string item = param.asString();
+ if (item == "landmark")
+ {
+ onOpen(LLSD().insert("type", CREATE_LANDMARK_INFO_TYPE));
+ }
+ else if (item == "copy")
+ {
+ copySLURL();
+ }
+ else if (item == "delete")
+ {
+ deleteLandmark();
+ }
+}
+
void LLPanelPlaces::onCreateLandmarkButtonClicked(const LLUUID& folder_id)
{
if (!mPlaceInfo)
@@ -380,11 +457,11 @@ void LLPanelPlaces::toggleMediaPanel()
return;
mPlaceInfo->toggleMediaPanel(!mPlaceInfo->isMediaPanelVisible());
-
+
// Refresh the current place info because
// the media panel controls can't refer to
// the remote parcel media.
- onOpen(LLSD().insert("type", "agent"));
+ onOpen(LLSD().insert("type", AGENT_INFO_TYPE));
}
void LLPanelPlaces::togglePlaceInfoPanel(BOOL visible)
@@ -402,7 +479,7 @@ void LLPanelPlaces::togglePlaceInfoPanel(BOOL visible)
LLRect rect = getRect();
LLRect new_rect = LLRect(rect.mLeft, rect.mTop, rect.mRight, mTabContainer->getRect().mBottom);
- mPlaceInfo->reshape(new_rect.getWidth(),new_rect.getHeight());
+ mPlaceInfo->reshape(new_rect.getWidth(),new_rect.getHeight());
}
}
@@ -450,13 +527,13 @@ void LLPanelPlaces::onAgentParcelChange()
if (!mPlaceInfo)
return;
- if (mPlaceInfo->getVisible() && mPlaceInfoType == "create_landmark")
+ if (mPlaceInfo->getVisible() && mPlaceInfoType == CREATE_LANDMARK_INFO_TYPE)
{
onOpen(LLSD().insert("type", mPlaceInfoType));
}
else if (mPlaceInfo->isMediaPanelVisible())
{
- onOpen(LLSD().insert("type", "agent"));
+ onOpen(LLSD().insert("type", AGENT_INFO_TYPE));
}
else
{
@@ -470,8 +547,8 @@ void LLPanelPlaces::updateVerbs()
return;
bool is_place_info_visible = mPlaceInfo->getVisible();
- bool is_agent_place_info_visible = mPlaceInfoType == "agent";
- bool is_create_landmark_visible = mPlaceInfoType == "create_landmark";
+ bool is_agent_place_info_visible = mPlaceInfoType == AGENT_INFO_TYPE;
+ bool is_create_landmark_visible = mPlaceInfoType == CREATE_LANDMARK_INFO_TYPE;
bool is_media_panel_visible = mPlaceInfo->isMediaPanelVisible();
mTeleportBtn->setVisible(!is_create_landmark_visible);
@@ -479,9 +556,7 @@ void LLPanelPlaces::updateVerbs()
mCreateLandmarkBtn->setVisible(is_create_landmark_visible);
mFolderMenuBtn->setVisible(is_create_landmark_visible);
- // Enable overflow button only when showing the information
- // about agent's current location.
- mOverflowBtn->setEnabled(is_agent_place_info_visible);
+ mOverflowBtn->setEnabled(is_place_info_visible && !is_media_panel_visible && !is_create_landmark_visible);
if (is_place_info_visible)
{
@@ -493,7 +568,7 @@ void LLPanelPlaces::updateVerbs()
!mPosGlobal.isExactlyZero() &&
!LLViewerParcelMgr::getInstance()->inAgentParcel(mPosGlobal));
}
- else if (mPlaceInfoType == "landmark" || mPlaceInfoType == "remote_place")
+ else if (mPlaceInfoType == LANDMARK_INFO_TYPE || mPlaceInfoType == REMOTE_PLACE_INFO_TYPE)
{
mTeleportBtn->setEnabled(TRUE);
}
@@ -525,18 +600,8 @@ void LLPanelPlaces::showLandmarkFoldersMenu()
if(!menu)
return;
- if (menu->getClosedByButtonClick())
- {
- menu->resetClosedByButtonClick();
+ if (!menu->toggleVisibility())
return;
- }
-
- if (menu->getVisible())
- {
- menu->setVisible(FALSE);
- menu->resetClosedByButtonClick();
- return;
- }
// Collect all folders that can contain landmarks.
LLInventoryModel::cat_array_t cats;
@@ -705,7 +770,7 @@ static void collectLandmarkFolders(LLInventoryModel::cat_array_t& cats)
}
}
-const LLVector3 get_pos_local_from_global(const LLVector3d &pos_global)
+static const LLVector3 get_pos_local_from_global(const LLVector3d &pos_global)
{
F32 region_x = (F32)fmod( pos_global.mdV[VX], (F64)REGION_WIDTH_METERS );
F32 region_y = (F32)fmod( pos_global.mdV[VY], (F64)REGION_WIDTH_METERS );
@@ -713,3 +778,13 @@ const LLVector3 get_pos_local_from_global(const LLVector3d &pos_global)
LLVector3 pos_local(region_x, region_y, (F32)pos_global.mdV[VZ]);
return pos_local;
}
+
+static void onSLURLBuilt(std::string& slurl)
+{
+ LLView::getWindow()->copyTextToClipboard(utf8str_to_wstring(slurl));
+
+ LLSD args;
+ args["SLURL"] = slurl;
+
+ LLNotifications::instance().add("CopySLURL", args);
+}
diff --git a/indra/newview/llpanelplaces.h b/indra/newview/llpanelplaces.h
index 431c8168d9..a200bc2d28 100644
--- a/indra/newview/llpanelplaces.h
+++ b/indra/newview/llpanelplaces.h
@@ -66,10 +66,11 @@ private:
void onFilterEdit(const std::string& search_string);
void onTabSelected();
- //void onCopySLURLButtonClicked();
//void onShareButtonClicked();
void onTeleportButtonClicked();
void onShowOnMapButtonClicked();
+ void onOverflowButtonClicked();
+ void onOverflowMenuItemClicked(const LLSD& param);
void onCreateLandmarkButtonClicked(const LLUUID& folder_id);
void onBackButtonClicked();
@@ -80,11 +81,16 @@ private:
void updateVerbs();
void showLandmarkFoldersMenu();
+
+ void copySLURL();
+ void deleteLandmark();
LLFilterEditor* mFilterEditor;
LLPanelPlacesTab* mActivePanel;
LLTabContainer* mTabContainer;
LLPanelPlaceInfo* mPlaceInfo;
+ LLToggleableMenu* mPlaceMenu;
+ LLToggleableMenu* mLandmarkMenu;
LLButton* mCreateLandmarkBtn;
LLButton* mFolderMenuBtn;
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index 017a7312a1..0af996fac0 100644
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -102,6 +102,10 @@ void LLPanelProfile::onOpen(const LLSD& key)
{
getTabCtrl()->getCurrentPanel()->onOpen(getAvatarId());
}
+
+ // Update the avatar name.
+ gCacheName->get(getAvatarId(), FALSE,
+ boost::bind(&LLPanelProfile::onAvatarNameCached, this, _1, _2, _3, _4));
}
//*TODO redo panel toggling
@@ -163,3 +167,9 @@ void LLPanelProfile::setAllChildrenVisible(BOOL visible)
viewp->setVisible(visible);
}
}
+
+void LLPanelProfile::onAvatarNameCached(const LLUUID& id, const std::string& first_name, const std::string& last_name, BOOL is_group)
+{
+ llassert(getAvatarId() == id);
+ getChild<LLTextBox>("user_name", FALSE)->setValue(first_name + " " + last_name);
+}
diff --git a/indra/newview/llpanelprofile.h b/indra/newview/llpanelprofile.h
index b55963ec4a..0864ec1bc3 100644
--- a/indra/newview/llpanelprofile.h
+++ b/indra/newview/llpanelprofile.h
@@ -72,6 +72,14 @@ protected:
profile_tabs_t& getTabContainer() { return mTabContainer; }
private:
+ // LLCacheName will call this function when avatar name is loaded from server.
+ // This is required to display names that have not been cached yet.
+ void onAvatarNameCached(
+ const LLUUID& id,
+ const std::string& first_name,
+ const std::string& last_name,
+ BOOL is_group);
+
LLTabContainer* mTabCtrl;
profile_tabs_t mTabContainer;
LLUUID mAvatarId;
diff --git a/indra/newview/llpanelprofileview.cpp b/indra/newview/llpanelprofileview.cpp
index cd18dc4462..1235340f57 100644
--- a/indra/newview/llpanelprofileview.cpp
+++ b/indra/newview/llpanelprofileview.cpp
@@ -44,7 +44,6 @@ static std::string PANEL_NOTES = "panel_notes";
LLPanelProfileView::LLPanelProfileView()
: LLPanelProfile()
-, mCacheNameCallbackConnected(false)
{
}
@@ -66,21 +65,6 @@ void LLPanelProfileView::onOpen(const LLSD& key)
}
LLPanelProfile::onOpen(key);
-
- // *HACK Profile View is created before gCacheName, as a result we can't call addObserver()
- // in postBuild() and have to connect callback here.
- // This will call addObserver() once per LLPanelProfileView instance.
- if(!mCacheNameCallbackConnected)
- {
- gCacheName->addObserver(boost::bind(&LLPanelProfileView::cacheNameCallback, this, _1, _2, _3, _4));
- mCacheNameCallbackConnected = true;
- }
-
- // getFullName() will return "(Loading...)" for non cached names,
- // in this case cacheNameCallback() will resolve the name.
- std::string full_name;
- gCacheName->getFullName(getAvatarId(),full_name);
- childSetValue("user_name",full_name);
}
BOOL LLPanelProfileView::postBuild()
@@ -105,11 +89,3 @@ void LLPanelProfileView::onBackBtnClick()
parent->openPreviousPanel();
}
}
-
-void LLPanelProfileView::cacheNameCallback(const LLUUID& id, const std::string& first_name, const std::string& last_name, BOOL is_group)
-{
- if(getAvatarId() == id)
- {
- childSetValue("user_name", first_name + " " + last_name);
- }
-}
diff --git a/indra/newview/llpanelprofileview.h b/indra/newview/llpanelprofileview.h
index 4d5e2997c1..92def7b7ca 100644
--- a/indra/newview/llpanelprofileview.h
+++ b/indra/newview/llpanelprofileview.h
@@ -60,21 +60,9 @@ public:
/*virtual*/ BOOL postBuild();
- // LLCacheName will call this function when avatar name is loaded from server.
- // This is required to display names that have not been cached yet.
- void cacheNameCallback(
- const LLUUID& id,
- const std::string& first_name,
- const std::string& last_name,
- BOOL is_group);
-
protected:
void onBackBtnClick();
-
-private:
-
- bool mCacheNameCallbackConnected;
};
#endif //LL_LLPANELPROFILEVIEW_H
diff --git a/indra/newview/skins/default/xui/en/favorites_bar_button.xml b/indra/newview/skins/default/xui/en/favorites_bar_button.xml
index 02784bb74b..01d8054e9a 100644
--- a/indra/newview/skins/default/xui/en/favorites_bar_button.xml
+++ b/indra/newview/skins/default/xui/en/favorites_bar_button.xml
@@ -1,6 +1,4 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<!-- *NOTE: mantipov: to use the "use_ellipses" attribute label should be LEFT aligned
-untill LLFontGL::render() is fixed to avoid this requirement-->
<!-- *NOTE: mantipov: top & height should be synchronized with <favorites_bar> in the panel_navigation_bar.xml-->
<!-- All buttons in the Favorites bar will be created from this one -->
<button
diff --git a/indra/newview/skins/default/xui/en/menu_landmark.xml b/indra/newview/skins/default/xui/en/menu_landmark.xml
new file mode 100644
index 0000000000..64f6ce9bb5
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/menu_landmark.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<toggleable_menu
+ height="201"
+ layout="topleft"
+ mouse_opaque="false"
+ name="landmark_overflow_menu"
+ width="128">
+ <menu_item_call
+ label="Copy SLURL"
+ layout="topleft"
+ name="copy">
+ <menu_item_call.on_click
+ function="Places.OverflowMenu.Action"
+ parameter="copy" />
+ </menu_item_call>
+ <menu_item_call
+ label="Delete"
+ layout="topleft"
+ name="delete">
+ <menu_item_call.on_click
+ function="Places.OverflowMenu.Action"
+ parameter="delete" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Create Pick"
+ layout="topleft"
+ name="pick">
+ <menu_item_call.on_click
+ function="Places.OverflowMenu.Action"
+ parameter="pick" />
+ </menu_item_call>
+</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_place.xml b/indra/newview/skins/default/xui/en/menu_place.xml
new file mode 100644
index 0000000000..a9f98e35cc
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/menu_place.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<toggleable_menu
+ height="201"
+ layout="topleft"
+ mouse_opaque="false"
+ name="place_overflow_menu"
+ width="128">
+ <menu_item_call
+ label="Make a Landmark"
+ layout="topleft"
+ name="landmark">
+ <menu_item_call.on_click
+ function="Places.OverflowMenu.Action"
+ parameter="landmark" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Create Pick"
+ layout="topleft"
+ name="pick">
+ <menu_item_call.on_click
+ function="Places.OverflowMenu.Action"
+ parameter="pick" />
+ </menu_item_call>
+ <menu_item_separator
+ layout="topleft"/>
+ <menu_item_call
+ enabled="false"
+ label="Buy Pass"
+ layout="topleft"
+ name="pass">
+ <menu_item_call.on_click
+ function="Places.OverflowMenu.Action"
+ parameter="pass" />
+ </menu_item_call>
+ <menu_item_separator
+ layout="topleft"/>
+ <menu_item_call
+ enabled="false"
+ label="Edit"
+ layout="topleft"
+ name="edit">
+ <menu_item_call.on_click
+ function="Places.OverflowMenu.Action"
+ parameter="edit" />
+ </menu_item_call>
+</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/en/panel_group_general.xml b/indra/newview/skins/default/xui/en/panel_group_general.xml
index 454236f5ad..fd154792dd 100644
--- a/indra/newview/skins/default/xui/en/panel_group_general.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_general.xml
@@ -40,6 +40,20 @@ Hover your mouse over the options for more help.
name="help_button"
top="8"
width="20" /> -->
+ <line_editor
+ follows="left|top"
+ font="SansSerifSmall"
+ prevalidate_callback="asci"
+ halign="left"
+ height="16"
+ label="Type your new group name here"
+ layout="topleft"
+ left="10"
+ max_length="35"
+ name="group_name_editor"
+ top="10"
+ visible="false"
+ width="235" />
<name_box
follows="left|top"
height="16"
@@ -47,7 +61,7 @@ Hover your mouse over the options for more help.
layout="topleft"
left="10"
name="founder_name"
- top_pad="10"
+ top="10"
width="100" />
<text
type="string"
diff --git a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml
index 93fc938622..e90a57a375 100644
--- a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml
@@ -69,7 +69,7 @@
left="5"
visible="false"
width="65" />
- <accordion layout="topleft" left="2" width="296" top="28" height="600" follows="all" name="group_general_tab">
+ <accordion layout="topleft" left="2" width="296" top="28" height="600" follows="all" name="group_accordion">
<accordion_tab min_height="515" title="Group General" name="group_general_tab">
<panel class="panel_group_general" filename="panel_group_general.xml" name="group_general_tab_panel"/>
</accordion_tab>
diff --git a/indra/newview/skins/default/xui/en/panel_pick_list_item.xml b/indra/newview/skins/default/xui/en/panel_pick_list_item.xml
index 0bfdb12806..6f4110067b 100644
--- a/indra/newview/skins/default/xui/en/panel_pick_list_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_pick_list_item.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
bevel_style="none"
- follows="top|left|right|bottom"
+ follows="top|left|right"
height="120"
layout="topleft"
left="0"
diff --git a/indra/newview/skins/default/xui/en/panel_places.xml b/indra/newview/skins/default/xui/en/panel_places.xml
index edaa8f7fa7..bff28718a7 100644
--- a/indra/newview/skins/default/xui/en/panel_places.xml
+++ b/indra/newview/skins/default/xui/en/panel_places.xml
@@ -40,7 +40,6 @@
scale_image="false"
top="8"
width="13" />
-
<tab_container
follows="all"
height="326"
@@ -54,18 +53,17 @@
class="panel_place_info"
filename="panel_place_info.xml"
follows="all"
- layout="topleft"
- top="30"
height="326"
+ layout="topleft"
left="0"
name="panel_place_info"
+ top="30"
visible="false" />
-
<panel
- name="button_panel"
- layout="topleft"
height="25"
+ layout="topleft"
left="0"
+ name="button_panel"
top_pad="10"
width="305">
<button
@@ -75,8 +73,8 @@
label="Teleport"
layout="topleft"
left="5"
- top="0"
name="teleport_btn"
+ top="0"
width="80" />
<button
follows="bottom|left"
@@ -84,8 +82,8 @@
height="25"
label="Map"
layout="topleft"
- name="map_btn"
left_pad="5"
+ name="map_btn"
top="0"
width="80" />
<button
@@ -93,13 +91,22 @@
follows="bottom|left"
font="SansSerifSmallBold"
height="25"
- left_pad="5"
- top="0"
label="Share"
layout="topleft"
+ left_pad="5"
name="share_btn"
+ top="0"
width="60" />
-
+ <button
+ follows="bottom|right"
+ font="SansSerifSmallBold"
+ height="25"
+ label="▼"
+ layout="topleft"
+ left_pad="5"
+ name="overflow_btn"
+ top="0"
+ width="30" />
<button
follows="bottom|left"
font="SansSerifSmallBold"
@@ -110,8 +117,8 @@
label="Create"
layout="topleft"
left="5"
- top="0"
name="create_landmark_btn"
+ top="0"
width="60" />
<button
follows="bottom|left"
@@ -122,8 +129,8 @@
image_unselected="widgets/ComboButton_Off.png"
label="▼"
layout="topleft"
- name="folder_menu_btn"
left_pad="0"
+ name="folder_menu_btn"
top="0"
width="20" />
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_profile.xml b/indra/newview/skins/default/xui/en/panel_profile.xml
index 904f8bde65..23c8223e7b 100644
--- a/indra/newview/skins/default/xui/en/panel_profile.xml
+++ b/indra/newview/skins/default/xui/en/panel_profile.xml
@@ -2,7 +2,7 @@
<panel
bevel_style="out"
follows="left|top|right|bottom"
- height="570"
+ height="420"
label="Profile"
layout="topleft"
left="0"
@@ -57,15 +57,25 @@
<scroll_container
color="DkGray2"
follows="left|top|right|bottom"
- height="570"
+ height="300"
layout="topleft"
left="0"
name="profile_scroll"
+ reserve_scroll_corner="true"
opaque="true"
width="255">
+
+ <panel
+ name="scroll_content_panel"
+ follows="left|top|right"
+ layout="topleft"
+ top="0"
+ left="0"
+ width="240"
+ height="500">
+
<panel
- bevel_style="in"
- follows="left|top"
+ follows="left|top"
height="125"
layout="topleft"
left="10"
@@ -79,7 +89,7 @@
follows="top|left"
height="125"
layout="topleft"
- left="10"
+ left="0"
name="2nd_life_pic"
top="10"
width="125" />
@@ -263,6 +273,10 @@
word_wrap="true">
Lorem ipsum dolor sit amet, consectetur adlkjpiscing elit moose moose. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet. adipiscing elit. Aenean rigviverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet sorbet ipsum. adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum.
</text>
+
+
+ </panel>
+
</scroll_container>
<panel
follows="bottom|left"
@@ -316,7 +330,6 @@
width="75" />
</panel>
<panel
- follows="bottom|left"
height="30"
layout="topleft"
left="10"
diff --git a/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml b/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml
index 629f1d260a..7ea059ba6a 100644
--- a/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml
+++ b/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml
@@ -39,6 +39,7 @@
name="tab_icon"
right="-10"
top="10"
+ image_name="TabIcon_Home_Selected"
width="20" />
<text
follows="left|right|bottom"
@@ -82,12 +83,12 @@
color="DkGray"
follows="top|right"
height="20"
- image_name="TabIcon_Places_Off"
layout="topleft"
name="tab_icon"
right="-10"
top="10"
- width="20" />
+ width="20"
+ image_name="TabIcon_Places_Selected"/>
<text
follows="left|right|bottom|top"
font="SansSerifBold"
@@ -134,7 +135,8 @@
name="tab_icon"
right="-10"
top="10"
- width="20" />
+ width="20"
+ image_name="TabIcon_Me_Selected"/>
<text
follows="left|right|bottom|top"
font="SansSerifBold"
@@ -181,7 +183,8 @@
name="tab_icon"
right="-10"
top="10"
- width="20" />
+ width="20"
+ image_name="TabIcon_Things_Selected"/>
<text
follows="left|right|bottom|top"
font="SansSerifBold"