summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llmessage/tests/llhost_test.cpp2
-rw-r--r--indra/newview/llchannelmanager.cpp13
-rw-r--r--indra/newview/llpanellandmarks.cpp22
-rw-r--r--indra/newview/llscreenchannel.cpp12
-rw-r--r--indra/newview/llscreenchannel.h2
-rw-r--r--indra/newview/llviewerinventory.cpp15
-rw-r--r--indra/newview/llviewerinventory.h3
-rw-r--r--indra/newview/skins/default/xui/en/panel_toast.xml8
8 files changed, 41 insertions, 36 deletions
diff --git a/indra/llmessage/tests/llhost_test.cpp b/indra/llmessage/tests/llhost_test.cpp
index 6dbdcb86e7..2424dbcb6b 100644
--- a/indra/llmessage/tests/llhost_test.cpp
+++ b/indra/llmessage/tests/llhost_test.cpp
@@ -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);
diff --git a/indra/newview/llchannelmanager.cpp b/indra/newview/llchannelmanager.cpp
index a75ae1d3b3..77f941eef0 100644
--- a/indra/newview/llchannelmanager.cpp
+++ b/indra/newview/llchannelmanager.cpp
@@ -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);
}
//--------------------------------------------------------------------------
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp
index daeeb50561..665ce9f59c 100644
--- a/indra/newview/llpanellandmarks.cpp
+++ b/indra/newview/llpanellandmarks.cpp
@@ -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)
+ );
}
}
diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp
index 04b6d40dfc..1683d113a9 100644
--- a/indra/newview/llscreenchannel.cpp
+++ b/indra/newview/llscreenchannel.cpp
@@ -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;
}
}
diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h
index 07bbea3014..987bc4b596 100644
--- a/indra/newview/llscreenchannel.h
+++ b/indra/newview/llscreenchannel.h
@@ -256,7 +256,7 @@ private:
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;
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 7e88320f49..1ad60d9a97 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -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);
}
diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h
index f55a695652..d523bf2859 100644
--- a/indra/newview/llviewerinventory.h
+++ b/indra/newview/llviewerinventory.h
@@ -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
diff --git a/indra/newview/skins/default/xui/en/panel_toast.xml b/indra/newview/skins/default/xui/en/panel_toast.xml
index 01fd84e09d..2e500fc2aa 100644
--- a/indra/newview/skins/default/xui/en/panel_toast.xml
+++ b/indra/newview/skins/default/xui/en/panel_toast.xml
@@ -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"