Skip to content
Snippets Groups Projects
Commit c7786aa5 authored by Steven Bennetts's avatar Steven Bennetts
Browse files

Merging revisions 2146-2150 of...

Merging revisions 2146-2150 of https://svn.aws.productengine.com/secondlife/pe/stable-2 into P:\svn\viewer-2.0.0-3, respecting ancestry
* Bugs: EXT-1752 EXT-1754
parent 0041d485
No related branches found
No related tags found
No related merge requests found
......@@ -157,7 +157,7 @@ namespace tut
template<> template<>
void host_object::test<9>()
{
std::string hostStr = "google.com";
std::string hostStr = "linux.org";
LLHost host;
host.setHostByName(hostStr);
......
......@@ -39,6 +39,7 @@
#include "llimview.h"
#include "llbottomtray.h"
#include "llviewerwindow.h"
#include "llrootview.h"
#include <algorithm>
......@@ -121,6 +122,8 @@ void LLChannelManager::onLoginCompleted()
return;
}
gViewerWindow->getRootView()->addChild(mStartUpChannel);
// init channel's position and size
S32 channel_right_bound = gViewerWindow->getWorldViewRect().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth");
......@@ -128,7 +131,7 @@ void LLChannelManager::onLoginCompleted()
mStartUpChannel->setShowToasts(true);
mStartUpChannel->setCommitCallback(boost::bind(&LLChannelManager::onStartUpToastClose, this));
mStartUpChannel->createStartUpToast(away_notifications, gSavedSettings.getS32("ChannelBottomPanelMargin"), gSavedSettings.getS32("StartUpToastLifeTime"));
mStartUpChannel->createStartUpToast(away_notifications, gSavedSettings.getS32("StartUpToastLifeTime"));
}
//--------------------------------------------------------------------------
......@@ -139,19 +142,11 @@ void LLChannelManager::onStartUpToastClose()
mStartUpChannel->setVisible(FALSE);
mStartUpChannel->closeStartUpToast();
removeChannelByID(LLUUID(gSavedSettings.getString("StartUpChannelUUID")));
delete mStartUpChannel;
mStartUpChannel = NULL;
}
// set StartUp Toast Flag to allow all other channels to show incoming toasts
LLScreenChannel::setStartUpToastShown();
// force NEARBY CHAT CHANNEL to repost all toasts if present
//LLScreenChannelBase* nearby_channel = findChannelByID(LLUUID(gSavedSettings.getString("NearByChatChannelUUID")));
//!!!!!!!!!!!!!!
//FIXME
//nearby_channel->loadStoredToastsToChannel();
//nearby_channel->setCanStoreToasts(false);
}
//--------------------------------------------------------------------------
......
......@@ -515,23 +515,23 @@ void LLLandmarksPanel::onAddFolderButtonClick() const
LLFolderViewItem* item = getCurSelectedItem();
if(item && mCurrentSelectedList == mLandmarksInventoryPanel)
{
LLFolderBridge *parentBridge = NULL;
LLFolderViewEventListener* folder_bridge = NULL;
if(item-> getListener()->getInventoryType() == LLInventoryType::IT_LANDMARK)
{
parentBridge = dynamic_cast<LLFolderBridge*>(item->getParentFolder()->getListener());
/*WORKAROUND:*
LLFolderView::doIdle() is calling in each frame,
it changes selected items before LLFolderView::startRenamingSelectedItem.
To avoid it we have to change keyboardFocus.
*/
gFocusMgr.setKeyboardFocus(item->getParentFolder());
// for a landmark get parent folder bridge
folder_bridge = item->getParentFolder()->getListener();
}
else if (item-> getListener()->getInventoryType() == LLInventoryType::IT_CATEGORY)
{
parentBridge = dynamic_cast<LLFolderBridge*>(item->getListener());
gFocusMgr.setKeyboardFocus(item);
// for a folder get its own bridge
folder_bridge = item->getListener();
}
menu_create_inventory_item(mCurrentSelectedList->getRootFolder(),parentBridge, LLSD("category"));
menu_create_inventory_item(mCurrentSelectedList->getRootFolder()
, dynamic_cast<LLFolderBridge*>(folder_bridge)
, LLSD("category")
, gInventory.findCategoryUUIDForType(LLAssetType::AT_LANDMARK)
);
}
}
......
......@@ -412,7 +412,7 @@ void LLScreenChannel::showToastsBottom()
(*it).toast->stopTimer();
mHiddenToastsNum++;
}
createOverflowToast(bottom, gSavedSettings.getS32("NotificationToastLifeTime"));
createOverflowToast(bottom, gSavedSettings.getS32("NotificationTipToastLifeTime"));
}
}
......@@ -449,7 +449,7 @@ void LLScreenChannel::createOverflowToast(S32 bottom, F32 timer)
if(!mOverflowToastPanel)
return;
mOverflowToastPanel->setOnFadeCallback(boost::bind(&LLScreenChannel::onOverflowToastHide, this));
mOverflowToastPanel->setOnFadeCallback(boost::bind(&LLScreenChannel::closeOverflowToastPanel, this));
LLTextBox* text_box = mOverflowToastPanel->getChild<LLTextBox>("toast_text");
LLIconCtrl* icon = mOverflowToastPanel->getChild<LLIconCtrl>("icon");
......@@ -514,7 +514,7 @@ void LLScreenChannel::closeOverflowToastPanel()
}
//--------------------------------------------------------------------------
void LLScreenChannel::createStartUpToast(S32 notif_num, S32 bottom, F32 timer)
void LLScreenChannel::createStartUpToast(S32 notif_num, F32 timer)
{
LLRect toast_rect;
LLToast::Params p;
......@@ -545,13 +545,15 @@ void LLScreenChannel::createStartUpToast(S32 notif_num, S32 bottom, F32 timer)
toast_rect = mStartUpToastPanel->getRect();
mStartUpToastPanel->reshape(getRect().getWidth(), toast_rect.getHeight(), true);
toast_rect.setLeftTopAndSize(getRect().mLeft, bottom + toast_rect.getHeight()+gSavedSettings.getS32("ToastGap"), getRect().getWidth(), toast_rect.getHeight());
toast_rect.setLeftTopAndSize(0, toast_rect.getHeight()+gSavedSettings.getS32("ToastGap"), getRect().getWidth(), toast_rect.getHeight());
mStartUpToastPanel->setRect(toast_rect);
text_box->setValue(text);
text_box->setVisible(TRUE);
icon->setVisible(TRUE);
addChild(mStartUpToastPanel);
mStartUpToastPanel->setVisible(TRUE);
}
......@@ -572,7 +574,7 @@ void LLScreenChannel::closeStartUpToast()
{
if(mStartUpToastPanel != NULL)
{
mStartUpToastPanel->closeFloater();
mStartUpToastPanel->setVisible(FALSE);
mStartUpToastPanel = NULL;
}
}
......
......@@ -256,7 +256,7 @@ class LLScreenChannel : public LLScreenChannelBase
void createOverflowToast(S32 bottom, F32 timer);
// create the StartUp Toast
void createStartUpToast(S32 notif_num, S32 bottom, F32 timer);
void createStartUpToast(S32 notif_num, F32 timer);
// Channel's flags
static bool mWasStartUpToastShown;
......
......@@ -990,7 +990,7 @@ const std::string NEW_LSL_NAME = "New Script"; // *TODO:Translate? (probably not
const std::string NEW_NOTECARD_NAME = "New Note"; // *TODO:Translate? (probably not)
const std::string NEW_GESTURE_NAME = "New Gesture"; // *TODO:Translate? (probably not)
void menu_create_inventory_item(LLFolderView* folder, LLFolderBridge *bridge, const LLSD& userdata)
void menu_create_inventory_item(LLFolderView* folder, LLFolderBridge *bridge, const LLSD& userdata, const LLUUID& default_parent_uuid)
{
std::string type = userdata.asString();
......@@ -1003,15 +1003,22 @@ void menu_create_inventory_item(LLFolderView* folder, LLFolderBridge *bridge, co
a_type = LLAssetType::AT_OUTFIT;
if ("my_otfts" == type)
a_type = LLAssetType::AT_MY_OUTFITS;
LLUUID category;
LLUUID parent_id;
if (bridge)
{
category = gInventory.createNewCategory(bridge->getUUID(), a_type, LLStringUtil::null);
parent_id = bridge->getUUID();
}
else if (default_parent_uuid.notNull())
{
parent_id = default_parent_uuid;
}
else
{
category = gInventory.createNewCategory(gInventory.getRootFolderID(), a_type, LLStringUtil::null);
parent_id = gInventory.getRootFolderID();
}
LLUUID category = gInventory.createNewCategory(parent_id, a_type, LLStringUtil::null);
gInventory.notifyObservers();
folder->setSelectionByID(category, TRUE);
}
......
......@@ -341,6 +341,7 @@ void copy_inventory_from_notecard(const LLUUID& object_id,
void menu_create_inventory_item(LLFolderView* folder,
LLFolderBridge* bridge,
const LLSD& userdata);
const LLSD& userdata,
const LLUUID& default_parent_uuid = LLUUID::null);
#endif // LL_LLVIEWERINVENTORY_H
......@@ -7,7 +7,7 @@
visible="false"
layout="topleft"
width="350"
height="72"
height="40"
left="100"
top="500"
follows="right|bottom"
......@@ -24,18 +24,18 @@
visible="false"
follows="left|top|right|bottom"
font="SansSerifBold"
height="40"
height="28"
layout="topleft"
left="60"
name="toast_text"
word_wrap="true"
text_color="white"
top="20"
top="10"
width="290">
Toast text;
</text>
<icon
top="20"
top="4"
left="10"
width="32"
height="32"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment