PE merge.

meow-7.2.2
Tofu Linden 2010-02-23 10:49:56 +00:00
commit 0cd1b3f776
21 changed files with 359 additions and 126 deletions

View File

@ -172,6 +172,10 @@ public:
}
}
LLIconCtrl* getIconCtrl() const
{
return mIcon;
}
private:
LLIconCtrl* mIcon;
@ -1629,6 +1633,7 @@ void LLTabContainer::setTabImage(LLPanel* child, LLIconCtrl* icon)
if(button)
{
button->setIcon(icon);
reshapeTuple(tuple);
}
}
}
@ -1639,12 +1644,22 @@ void LLTabContainer::reshapeTuple(LLTabTuple* tuple)
if (!mIsVertical)
{
S32 image_overlay_width = 0;
if(mCustomIconCtrlUsed)
{
LLCustomButtonIconCtrl* button = dynamic_cast<LLCustomButtonIconCtrl*>(tuple->mButton);
LLIconCtrl* icon_ctrl = button->getIconCtrl();
image_overlay_width = icon_ctrl ? icon_ctrl->getRect().getWidth() : 0;
}
else
{
image_overlay_width = tuple->mButton->getImageOverlay().notNull() ?
tuple->mButton->getImageOverlay()->getImage()->getWidth(0) : 0;
}
// remove current width from total tab strip width
mTotalTabWidth -= tuple->mButton->getRect().getWidth();
S32 image_overlay_width = tuple->mButton->getImageOverlay().notNull() ?
tuple->mButton->getImageOverlay()->getImage()->getWidth(0) : 0;
tuple->mPadding = image_overlay_width;
tuple->mButton->reshape(llclamp(mFont->getWidth(tuple->mButton->getLabelSelected()) + tab_padding + tuple->mPadding, mMinTabWidth, mMaxTabWidth),

View File

@ -232,7 +232,7 @@ std::string LLUrlEntryHTTPNoProtocol::getUrl(const std::string &string) const
LLUrlEntrySLURL::LLUrlEntrySLURL()
{
// see http://slurl.com/about.php for details on the SLURL format
mPattern = boost::regex("http://(maps.secondlife.com|slurl.com)/secondlife/\\S+/?(\\d+)?/?(\\d+)?/?(\\d+)?/?\\S*",
mPattern = boost::regex("http://(maps.secondlife.com|slurl.com)/secondlife/[^ /]+(/\\d+){0,3}(/?(\\?title|\\?img|\\?msg)=\\S*)?/?",
boost::regex::perl|boost::regex::icase);
mMenuName = "menu_url_slurl.xml";
mTooltip = LLTrans::getString("TooltipSLURL");

View File

@ -50,6 +50,7 @@
#include "llfloatergroups.h"
#include "llfloaterreg.h"
#include "llfloaterpay.h"
#include "llfloaterworldmap.h"
#include "llinventorymodel.h" // for gInventory.findCategoryUUIDForType
#include "llimview.h" // for gIMMgr
#include "llmutelist.h"
@ -316,6 +317,20 @@ void LLAvatarActions::showProfile(const LLUUID& id)
}
}
// static
void LLAvatarActions::showOnMap(const LLUUID& id)
{
std::string name;
if (!gCacheName->getFullName(id, name))
{
gCacheName->get(id, FALSE, boost::bind(&LLAvatarActions::showOnMap, id));
return;
}
gFloaterWorldMap->trackAvatar(id, name);
LLFloaterReg::showInstance("world_map");
}
// static
void LLAvatarActions::pay(const LLUUID& id)
{

View File

@ -98,6 +98,11 @@ public:
*/
static void showProfile(const LLUUID& id);
/**
* Show avatar on world map.
*/
static void showOnMap(const LLUUID& id);
/**
* Give money to the avatar.
*/

View File

@ -116,34 +116,6 @@ public:
return LLPanel::handleMouseUp(x,y,mask);
}
//*TODO remake it using mouse enter/leave and static LLHandle<LLIconCtrl> to add/remove as a child
BOOL handleToolTip(S32 x, S32 y, MASK mask)
{
LLTextBase* name = getChild<LLTextBase>("user_name");
if (name && name->parentPointInView(x, y) && mAvatarID.notNull() && mFrom.size() && SYSTEM_FROM != mFrom)
{
// Spawn at right side of the name textbox.
LLRect sticky_rect = name->calcScreenRect();
S32 icon_x = llmin(sticky_rect.mLeft + name->getTextBoundingRect().getWidth() + 7, sticky_rect.mRight - 3);
LLToolTip::Params params;
params.background_visible(false);
params.click_callback(boost::bind(&LLChatHistoryHeader::onHeaderPanelClick, this, 0, 0, 0));
params.delay_time(0.0f); // spawn instantly on hover
params.image(LLUI::getUIImage("Info_Small"));
params.message("");
params.padding(0);
params.pos(LLCoordGL(icon_x, sticky_rect.mTop - 2));
params.sticky_rect(sticky_rect);
LLToolTipMgr::getInstance()->show(params);
return TRUE;
}
return LLPanel::handleToolTip(x, y, mask);
}
void onObjectIconContextMenuItemClicked(const LLSD& userdata)
{
std::string level = userdata.asString();
@ -198,7 +170,10 @@ public:
menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_object_icon.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
mPopupMenuHandleObject = menu->getHandle();
setDoubleClickCallback(boost::bind(&LLChatHistoryHeader::onHeaderPanelClick, this, _2, _3, _4));
setDoubleClickCallback(boost::bind(&LLChatHistoryHeader::showInspector, this));
setMouseEnterCallback(boost::bind(&LLChatHistoryHeader::showInfoCtrl, this));
setMouseLeaveCallback(boost::bind(&LLChatHistoryHeader::hideInfoCtrl, this));
return LLPanel::postBuild();
}
@ -232,7 +207,7 @@ public:
return LLPanel::handleRightMouseDown(x,y,mask);
}
void onHeaderPanelClick(S32 x, S32 y, MASK mask)
void showInspector()
{
if (mSourceType == CHAT_SOURCE_OBJECT)
{
@ -245,6 +220,17 @@ public:
//if chat source is system, you may add "else" here to define behaviour.
}
static void onClickInfoCtrl(LLUICtrl* info_ctrl)
{
if (!info_ctrl) return;
LLChatHistoryHeader* header = dynamic_cast<LLChatHistoryHeader*>(info_ctrl->getParent());
if (!header) return;
header->showInspector();
}
const LLUUID& getAvatarId () const { return mAvatarID;}
void setup(const LLChat& chat,const LLStyle::Params& style_params)
@ -385,6 +371,33 @@ protected:
}
}
void showInfoCtrl()
{
if (mAvatarID.isNull() || mFrom.empty() || SYSTEM_FROM == mFrom) return;
if (!sInfoCtrl)
{
sInfoCtrl = LLUICtrlFactory::createFromFile<LLUICtrl>("inspector_info_ctrl.xml", NULL, LLPanel::child_registry_t::instance());
sInfoCtrl->setCommitCallback(boost::bind(&LLChatHistoryHeader::onClickInfoCtrl, sInfoCtrl));
}
LLTextBase* name = getChild<LLTextBase>("user_name");
LLRect sticky_rect = name->getRect();
S32 icon_x = llmin(sticky_rect.mLeft + name->getTextBoundingRect().getWidth() + 7, sticky_rect.mRight - 3);
sInfoCtrl->setOrigin(icon_x, sticky_rect.getCenterY() - sInfoCtrl->getRect().getHeight() / 2 ) ;
addChild(sInfoCtrl);
}
void hideInfoCtrl()
{
if (!sInfoCtrl) return;
if (sInfoCtrl->getParent() == this)
{
removeChild(sInfoCtrl);
}
}
private:
void setTimeField(const LLChat& chat)
{
@ -413,6 +426,8 @@ protected:
LLHandle<LLView> mPopupMenuHandleAvatar;
LLHandle<LLView> mPopupMenuHandleObject;
static LLUICtrl* sInfoCtrl;
LLUUID mAvatarID;
EChatSourceType mSourceType;
std::string mFrom;
@ -421,6 +436,7 @@ protected:
S32 mMinUserNameWidth;
};
LLUICtrl* LLChatHistoryHeader::sInfoCtrl = NULL;
LLChatHistory::LLChatHistory(const LLChatHistory::Params& p)
: LLUICtrl(p),

View File

@ -442,7 +442,7 @@ LLIMFloater* LLIMFloater::show(const LLUUID& session_id)
void LLIMFloater::getAllowedRect(LLRect& rect)
{
rect = gViewerWindow->getWorldViewRectRaw();
rect = gViewerWindow->getWorldViewRectScaled();
static S32 right_padding = 0;
if (right_padding == 0)
{

View File

@ -674,6 +674,15 @@ void LLLocationInputCtrl::onLocationPrearrange(const LLSD& data)
_1, filter));
}
}
if(mList->isEmpty())
{
/**
* Add a couple of empty items for a better view.
* EXT-5194
*/
for(int i = 0; i < NUMBER_OF_EMPTY_ITEMS; i++ )
add("", LLSD());
}
sortByName();
mList->mouseOverHighlightNthItem(-1); // Clear highlight on the last selected item.

View File

@ -120,6 +120,13 @@ private:
ICON_COUNT
};
/**
* This constant holds number of empty dropdown items, which will be displayed instead of doing nothing when the list is empty.
* Added due to EXT-5194
*/
static const S32 NUMBER_OF_EMPTY_ITEMS = 3;
friend class LLUICtrlFactory;
LLLocationInputCtrl(const Params&);
virtual ~LLLocationInputCtrl();

View File

@ -48,7 +48,6 @@
#include "llscrollcontainer.h"
#include "llavatariconctrl.h"
#include "llweb.h"
#include "llfloaterworldmap.h"
#include "llfloaterreg.h"
#include "llnotificationsutil.h"
#include "llvoiceclient.h"
@ -449,10 +448,7 @@ void LLPanelProfileTab::scrollToTop()
void LLPanelProfileTab::onMapButtonClick()
{
std::string name;
gCacheName->getFullName(getAvatarId(), name);
gFloaterWorldMap->trackAvatar(getAvatarId(), name);
LLFloaterReg::showInstance("world_map");
LLAvatarActions::showOnMap(getAvatarId());
}
void LLPanelProfileTab::updateButtons()

View File

@ -69,6 +69,10 @@ static const std::string TRASH_BUTTON_NAME = "trash_btn";
// helper functions
static void filter_list(LLPlacesInventoryPanel* inventory_list, const std::string& string);
static bool category_has_descendents(LLPlacesInventoryPanel* inventory_list);
static void collapse_all_folders(LLFolderView* root_folder);
static void expand_all_folders(LLFolderView* root_folder);
static bool has_expanded_folders(LLFolderView* root_folder);
static bool has_collapsed_folders(LLFolderView* root_folder);
/**
* Functor counting expanded and collapsed folders in folder view tree to know
@ -683,31 +687,29 @@ void LLLandmarksPanel::updateListCommands()
// keep Options & Add Landmark buttons always enabled
mListCommands->childSetEnabled(ADD_FOLDER_BUTTON_NAME, add_folder_enabled);
mListCommands->childSetEnabled(TRASH_BUTTON_NAME, trash_enabled);
mListCommands->childSetEnabled(OPTIONS_BUTTON_NAME,getCurSelectedItem() != NULL);
}
void LLLandmarksPanel::onActionsButtonClick()
{
LLMenuGL* menu = mGearFolderMenu;
LLFolderViewItem* cur_item = NULL;
if(mCurrentSelectedList)
{
cur_item = mCurrentSelectedList->getRootFolder()->getCurSelectedItem();
if(!cur_item)
return;
LLFolderViewEventListener* listenerp = cur_item->getListener();
LLMenuGL* menu =NULL;
if (listenerp->getInventoryType() == LLInventoryType::IT_LANDMARK)
{
menu = mGearLandmarkMenu;
}
else if (listenerp->getInventoryType() == LLInventoryType::IT_CATEGORY)
{
mGearFolderMenu->getChild<LLMenuItemCallGL>("expand")->setVisible(!cur_item->isOpen());
mGearFolderMenu->getChild<LLMenuItemCallGL>("collapse")->setVisible(cur_item->isOpen());
menu = mGearFolderMenu;
if(!cur_item)
return;
LLFolderViewEventListener* listenerp = cur_item->getListener();
if(!listenerp)
return;
if (listenerp->getInventoryType() == LLInventoryType::IT_LANDMARK)
{
menu = mGearLandmarkMenu;
}
}
showActionMenu(menu,OPTIONS_BUTTON_NAME);
}
@ -805,26 +807,33 @@ void LLLandmarksPanel::onClipboardAction(const LLSD& userdata) const
void LLLandmarksPanel::onFoldingAction(const LLSD& userdata)
{
if(!mCurrentSelectedList) return;
LLFolderView* root_folder = mCurrentSelectedList->getRootFolder();
std::string command_name = userdata.asString();
if ("expand_all" == command_name)
{
root_folder->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_DOWN);
root_folder->arrangeAll();
expand_all_folders(mFavoritesInventoryPanel->getRootFolder());
expand_all_folders(mLandmarksInventoryPanel->getRootFolder());
expand_all_folders(mMyInventoryPanel->getRootFolder());
expand_all_folders(mLibraryInventoryPanel->getRootFolder());
for (accordion_tabs_t::const_iterator iter = mAccordionTabs.begin(); iter != mAccordionTabs.end(); ++iter)
{
(*iter)->changeOpenClose(false);
}
}
else if ("collapse_all" == command_name)
{
root_folder->setOpenArrangeRecursively(FALSE, LLFolderViewFolder::RECURSE_DOWN);
collapse_all_folders(mFavoritesInventoryPanel->getRootFolder());
collapse_all_folders(mLandmarksInventoryPanel->getRootFolder());
collapse_all_folders(mMyInventoryPanel->getRootFolder());
collapse_all_folders(mLibraryInventoryPanel->getRootFolder());
// The top level folder is invisible, it must be open to
// display its sub-folders.
root_folder->openTopLevelFolders();
root_folder->arrangeAll();
for (accordion_tabs_t::const_iterator iter = mAccordionTabs.begin(); iter != mAccordionTabs.end(); ++iter)
{
(*iter)->changeOpenClose(true);
}
}
else if ( "sort_by_date" == command_name)
else if ("sort_by_date" == command_name)
{
mSortByDate = !mSortByDate;
updateSortOrder(mLandmarksInventoryPanel, mSortByDate);
@ -833,7 +842,10 @@ void LLLandmarksPanel::onFoldingAction(const LLSD& userdata)
}
else
{
root_folder->doToSelected(&gInventory, userdata);
if(mCurrentSelectedList)
{
mCurrentSelectedList->getRootFolder()->doToSelected(&gInventory, userdata);
}
}
}
@ -853,53 +865,87 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const
{
std::string command_name = userdata.asString();
LLPlacesFolderView* rootFolderView = mCurrentSelectedList ?
LLPlacesFolderView* root_folder_view = mCurrentSelectedList ?
static_cast<LLPlacesFolderView*>(mCurrentSelectedList->getRootFolder()) : NULL;
if (NULL == rootFolderView) return false;
// disable some commands for multi-selection. EXT-1757
if (rootFolderView->getSelectedCount() > 1)
if ("collapse_all" == command_name)
{
if ( "teleport" == command_name
bool disable_collapse_all = !has_expanded_folders(mFavoritesInventoryPanel->getRootFolder())
&& !has_expanded_folders(mLandmarksInventoryPanel->getRootFolder())
&& !has_expanded_folders(mMyInventoryPanel->getRootFolder())
&& !has_expanded_folders(mLibraryInventoryPanel->getRootFolder());
if (disable_collapse_all)
{
for (accordion_tabs_t::const_iterator iter = mAccordionTabs.begin(); iter != mAccordionTabs.end(); ++iter)
{
if ((*iter)->isExpanded())
{
disable_collapse_all = false;
break;
}
}
}
return !disable_collapse_all;
}
else if ("expand_all" == command_name)
{
bool disable_expand_all = !has_collapsed_folders(mFavoritesInventoryPanel->getRootFolder())
&& !has_collapsed_folders(mLandmarksInventoryPanel->getRootFolder())
&& !has_collapsed_folders(mMyInventoryPanel->getRootFolder())
&& !has_collapsed_folders(mLibraryInventoryPanel->getRootFolder());
if (disable_expand_all)
{
for (accordion_tabs_t::const_iterator iter = mAccordionTabs.begin(); iter != mAccordionTabs.end(); ++iter)
{
if (!(*iter)->isExpanded())
{
disable_expand_all = false;
break;
}
}
}
return !disable_expand_all;
}
else if ("sort_by_date" == command_name)
{
// disable "sort_by_date" for Favorites accordion because
// it has its own items order. EXT-1758
if (mCurrentSelectedList == mFavoritesInventoryPanel)
{
return false;
}
}
else if (!root_folder_view)
{
return false;
}
else if ( "paste" == command_name
|| "rename" == command_name
|| "cut" == command_name
|| "copy" == command_name
|| "delete" == command_name
|| "collapse" == command_name
|| "expand" == command_name
)
{
return canSelectedBeModified(command_name);
}
else if ( "teleport" == command_name
|| "more_info" == command_name
|| "rename" == command_name
|| "show_on_map" == command_name
|| "copy_slurl" == command_name
)
{
// disable some commands for multi-selection. EXT-1757
if (root_folder_view->getSelectedCount() > 1)
{
return false;
}
}
// disable some commands for Favorites accordion. EXT-1758
if (mCurrentSelectedList == mFavoritesInventoryPanel)
{
if ( "expand_all" == command_name
|| "collapse_all" == command_name
|| "sort_by_date" == command_name
)
return false;
}
LLCheckFolderState checker;
rootFolderView->applyFunctorRecursively(checker);
// We assume that the root folder is always expanded so we enable "collapse_all"
// command when we have at least one more expanded folder.
if (checker.getExpandedFolders() < 2 && "collapse_all" == command_name)
{
return false;
}
if (checker.getCollapsedFolders() < 1 && "expand_all" == command_name)
{
return false;
}
if("category" == command_name)
else if("category" == command_name)
{
// we can add folder only in Landmarks Accordion
if (mCurrentSelectedList == mLandmarksInventoryPanel)
@ -909,10 +955,6 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const
}
else return false;
}
else if("paste" == command_name || "rename" == command_name || "cut" == command_name || "delete" == command_name)
{
return canSelectedBeModified(command_name);
}
else if("create_pick" == command_name)
{
std::set<LLUUID> selection;
@ -970,6 +1012,9 @@ bool LLLandmarksPanel::canSelectedBeModified(const std::string& command_name) co
{
// validate own rules first
LLFolderViewItem* selected = getCurSelectedItem();
if (!selected) return false;
// nothing can be modified in Library
if (mLibraryInventoryPanel == mCurrentSelectedList) return false;
@ -996,24 +1041,41 @@ bool LLLandmarksPanel::canSelectedBeModified(const std::string& command_name) co
}
// then ask LLFolderView permissions
LLFolderView* root_folder = mCurrentSelectedList->getRootFolder();
if ("copy" == command_name)
{
return root_folder->canCopy();
}
else if ("collapse" == command_name)
{
return selected->isOpen();
}
else if ("expand" == command_name)
{
return !selected->isOpen();
}
if (can_be_modified)
{
LLFolderViewItem* selected = getCurSelectedItem();
LLFolderViewEventListener* listenerp = selected->getListener();
if ("cut" == command_name)
{
can_be_modified = mCurrentSelectedList->getRootFolder()->canCut();
can_be_modified = root_folder->canCut();
}
else if ("rename" == command_name)
{
can_be_modified = selected ? selected->getListener()->isItemRenameable() : false;
can_be_modified = listenerp ? listenerp->isItemRenameable() : false;
}
else if ("delete" == command_name)
{
can_be_modified = selected ? selected->getListener()->isItemRemovable(): false;
can_be_modified = listenerp ? listenerp->isItemRemovable() : false;
}
else if("paste" == command_name)
{
return mCurrentSelectedList->getRootFolder()->canPaste();
can_be_modified = root_folder->canPaste();
}
else
{
@ -1197,4 +1259,54 @@ static bool category_has_descendents(LLPlacesInventoryPanel* inventory_list)
return false;
}
static void collapse_all_folders(LLFolderView* root_folder)
{
if (!root_folder)
return;
root_folder->setOpenArrangeRecursively(FALSE, LLFolderViewFolder::RECURSE_DOWN);
// The top level folder is invisible, it must be open to
// display its sub-folders.
root_folder->openTopLevelFolders();
root_folder->arrangeAll();
}
static void expand_all_folders(LLFolderView* root_folder)
{
if (!root_folder)
return;
root_folder->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_DOWN);
root_folder->arrangeAll();
}
static bool has_expanded_folders(LLFolderView* root_folder)
{
LLCheckFolderState checker;
root_folder->applyFunctorRecursively(checker);
// We assume that the root folder is always expanded so we enable "collapse_all"
// command when we have at least one more expanded folder.
if (checker.getExpandedFolders() < 2)
{
return false;
}
return true;
}
static bool has_collapsed_folders(LLFolderView* root_folder)
{
LLCheckFolderState checker;
root_folder->applyFunctorRecursively(checker);
if (checker.getCollapsedFolders() < 1)
{
return false;
}
return true;
}
// EOF

View File

@ -155,14 +155,14 @@ private:
void doCreatePick(LLLandmark* landmark);
private:
LLPlacesInventoryPanel* mFavoritesInventoryPanel;
LLPlacesInventoryPanel* mLandmarksInventoryPanel;
LLPlacesInventoryPanel* mMyInventoryPanel;
LLPlacesInventoryPanel* mLibraryInventoryPanel;
LLPlacesInventoryPanel* mFavoritesInventoryPanel;
LLPlacesInventoryPanel* mLandmarksInventoryPanel;
LLPlacesInventoryPanel* mMyInventoryPanel;
LLPlacesInventoryPanel* mLibraryInventoryPanel;
LLMenuGL* mGearLandmarkMenu;
LLMenuGL* mGearFolderMenu;
LLMenuGL* mMenuAdd;
LLPlacesInventoryPanel* mCurrentSelectedList;
LLPlacesInventoryPanel* mCurrentSelectedList;
LLInventoryObserver* mInventoryObserver;
LLPanel* mListCommands;

View File

@ -39,6 +39,7 @@
#include "llpanelpeoplemenus.h"
// newview
#include "llagent.h"
#include "llagentdata.h" // for gAgentID
#include "llavataractions.h"
#include "llviewermenu.h" // for gMenuHolder
@ -125,7 +126,7 @@ LLContextMenu* NearbyMenu::createMenu()
registrar.add("Avatar.IM", boost::bind(&LLAvatarActions::startIM, id));
registrar.add("Avatar.Call", boost::bind(&LLAvatarActions::startCall, id));
registrar.add("Avatar.OfferTeleport", boost::bind(&NearbyMenu::offerTeleport, this));
registrar.add("Avatar.ShowOnMap", boost::bind(&LLAvatarActions::startIM, id)); // *TODO: unimplemented
registrar.add("Avatar.ShowOnMap", boost::bind(&LLAvatarActions::showOnMap, id));
registrar.add("Avatar.Share", boost::bind(&LLAvatarActions::share, id));
registrar.add("Avatar.Pay", boost::bind(&LLAvatarActions::pay, id));
registrar.add("Avatar.BlockUnblock", boost::bind(&LLAvatarActions::toggleBlock, id));
@ -218,6 +219,13 @@ bool NearbyMenu::enableContextMenuItem(const LLSD& userdata)
{
return LLAvatarActions::canCall();
}
else if (item == std::string("can_show_on_map"))
{
const LLUUID& id = mUUIDs.front();
return (LLAvatarTracker::instance().isBuddyOnline(id) && is_agent_mappable(id))
|| gAgent.isGodlike();
}
return false;
}

View File

@ -36,6 +36,8 @@
#include "llweb.h"
#include "llurlregistry.h"
const std::string LLSLURL::PREFIX_SL_HELP = "secondlife://app.";
const std::string LLSLURL::PREFIX_SL = "sl://";
const std::string LLSLURL::PREFIX_SECONDLIFE = "secondlife://";
@ -95,6 +97,20 @@ bool LLSLURL::isSLURL(const std::string& url)
return false;
}
bool LLSLURL::isValidSLURL(const std::string& url)
{
std::string temp_url(url);
//"www." may appear in DnD- see description of PREFIX_SLURL_WWW.
// If it is found, we remove it because it isn't expected in regexp.
if (matchPrefix(url, PREFIX_SLURL_WWW))
{
size_t position = url.find("www.");
temp_url.erase(position,4);
}
return LLUrlRegistry::getInstance()->isUrl(temp_url);
}
// static
bool LLSLURL::isSLURLCommand(const std::string& url)
{

View File

@ -60,6 +60,11 @@ public:
*/
static bool isSLURL(const std::string& url);
/**
* Returns true if url is proven valid by regexp check from LLUrlRegistry
*/
static bool isValidSLURL(const std::string& url);
/**
* Is this a special secondlife://app/ URL?
*/

View File

@ -826,8 +826,10 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi
if (slurl_dnd_enabled)
{
// special case SLURLs
if ( LLSLURL::isSLURL( data ) )
// isValidSLURL() call was added here to make sure that dragged SLURL is valid (EXT-4964)
if ( LLSLURL::isSLURL( data ) && LLSLURL::isValidSLURL( data ) )
{
if (drop)
{
@ -3008,17 +3010,16 @@ void LLViewerWindow::updateWorldViewRect(bool use_full_window)
if (mWorldViewRectRaw != new_world_rect)
{
LLRect old_world_rect = mWorldViewRectRaw;
mWorldViewRectRaw = new_world_rect;
gResizeScreenTexture = TRUE;
LLViewerCamera::getInstance()->setViewHeightInPixels( mWorldViewRectRaw.getHeight() );
LLViewerCamera::getInstance()->setAspect( getWorldViewAspectRatio() );
LLRect old_world_rect_scaled = mWorldViewRectScaled;
mWorldViewRectScaled = calcScaledRect(mWorldViewRectRaw, mDisplayScale);
// sending a signal with a new WorldView rect
old_world_rect = calcScaledRect(old_world_rect, mDisplayScale);
mOnWorldViewRectUpdated(old_world_rect, mWorldViewRectScaled);
mOnWorldViewRectUpdated(old_world_rect_scaled, mWorldViewRectScaled);
}
}

View File

@ -24,7 +24,7 @@
tab_height="16"
use_custom_icon_ctrl="true"
tab_icon_ctrl_pad="2"
font_halign="left"
halign="left"
use_ellipses="true"
top="0"
width="390" />

View File

@ -0,0 +1,9 @@
<button
chrome="true"
image_selected="Info_Small"
image_unselected="Info_Small"
image_pressed="Info_Small"
height="12"
name="inspector_info_ctrl"
width="12" />

View File

@ -46,6 +46,16 @@
function="Avatar.EnableItem"
parameter="can_call" />
</menu_item_call>
<menu_item_call
label="Map"
layout="topleft"
name="Map">
<menu_item_call.on_click
function="Avatar.ShowOnMap" />
<menu_item_call.on_enable
function="Avatar.EnableItem"
parameter="can_show_on_map" />
</menu_item_call>
<menu_item_call
label="Share"
layout="topleft"

View File

@ -45,6 +45,9 @@
<on_click
function="Places.LandmarksGear.CopyPaste.Action"
parameter="copy" />
<on_enable
function="Places.LandmarksGear.Enable"
parameter="copy" />
</menu_item_call>
<menu_item_call
label="Paste"
@ -88,6 +91,9 @@
<on_click
function="Places.LandmarksGear.Folding.Action"
parameter="expand" />
<on_enable
function="Places.LandmarksGear.Enable"
parameter="expand" />
</menu_item_call>
<menu_item_call
label="Collapse"
@ -96,6 +102,9 @@
<on_click
function="Places.LandmarksGear.Folding.Action"
parameter="collapse" />
<on_enable
function="Places.LandmarksGear.Enable"
parameter="collapse" />
</menu_item_call>
<menu_item_call
label="Expand all folders"

View File

@ -151,7 +151,6 @@
width="590">
<label
follows="left|top"
font.style="BOLD"
height="15"
layout="topleft"
left="10"

View File

@ -129,7 +129,8 @@ background_visible="true"
label="Close"
layout="topleft"
name="close_btn"
left_pad="3"
right="-10"
top="1"
width="60" />
</panel>
</panel>