diff options
Diffstat (limited to 'indra/newview')
218 files changed, 1765 insertions, 1058 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 630902c48f..2920b30129 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -230,6 +230,7 @@ set(viewer_SOURCE_FILES llgroupiconctrl.cpp llgrouplist.cpp llgroupmgr.cpp + llhints.cpp llhomelocationresponder.cpp llhudeffect.cpp llhudeffectbeam.cpp @@ -300,6 +301,7 @@ set(viewer_SOURCE_FILES llnotificationalerthandler.cpp llnotificationgrouphandler.cpp llnotificationhandlerutil.cpp + llnotificationhinthandler.cpp llnotificationmanager.cpp llnotificationofferhandler.cpp llnotificationscripthandler.cpp @@ -754,6 +756,7 @@ set(viewer_HEADER_FILES llgroupiconctrl.h llgrouplist.h llgroupmgr.h + llhints.h llhomelocationresponder.h llhudeffect.h llhudeffectbeam.h @@ -1300,6 +1303,7 @@ set(viewer_APPSETTINGS_FILES app_settings/cmd_line.xml app_settings/grass.xml app_settings/high_graphics.xml + app_settings/ignorable_dialogs.xml app_settings/keys.ini app_settings/keywords.ini app_settings/logcontrol.xml diff --git a/indra/newview/app_settings/cmd_line.xml b/indra/newview/app_settings/cmd_line.xml index 5f143431de..00d69f805e 100644 --- a/indra/newview/app_settings/cmd_line.xml +++ b/indra/newview/app_settings/cmd_line.xml @@ -296,7 +296,7 @@ <key>multiple</key> <map> <key>desc</key> - <string>Allow multple viewers.</string> + <string>Allow multiple viewers.</string> <key>map-to</key> <string>AllowMultipleViewers</string> </map> diff --git a/indra/newview/app_settings/ignorable_dialogs.xml b/indra/newview/app_settings/ignorable_dialogs.xml index d0e1f62a84..0720ccee49 100644 --- a/indra/newview/app_settings/ignorable_dialogs.xml +++ b/indra/newview/app_settings/ignorable_dialogs.xml @@ -1,10 +1,10 @@ <?xml version="1.0" ?> <llsd> <map> - <key>FirstAppearance</key> + <key>FirstInventoryOffer</key> <map> <key>Comment</key> - <string>Enables FirstAppearance warning dialog</string> + <string>Shows hint when a person or object offers resident an inventory item</string> <key>Persist</key> <integer>1</integer> <key>Type</key> @@ -12,120 +12,54 @@ <key>Value</key> <integer>1</integer> </map> - <key>FirstAttach</key> - <map> - <key>Comment</key> - <string>Enables FirstAttach warning dialog</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>1</integer> - </map> - <key>FirstBalanceDecrease</key> - <map> - <key>Comment</key> - <string>Enables FirstBalanceDecrease warning dialog</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>1</integer> - </map> - <key>FirstBalanceIncrease</key> - <map> - <key>Comment</key> - <string>Enables FirstBalanceIncrease warning dialog</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>1</integer> - </map> - <key>FirstBuild</key> - <map> - <key>Comment</key> - <string>Enables FirstBuild warning dialog</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>1</integer> - </map> - <key>FirstDebugMenus</key> - <map> - <key>Comment</key> - <string>Enables FirstDebugMenus warning dialog</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>1</integer> - </map> - <key>FirstFlexible</key> - <map> - <key>Comment</key> - <string>Enables FirstFlexible warning dialog</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>1</integer> - </map> - <key>FirstGoTo</key> - <map> - <key>Comment</key> - <string>Enables FirstGoTo warning dialog</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>1</integer> - </map> - <key>FirstInventory</key> - <map> - <key>Comment</key> - <string>Enables FirstInventory warning dialog</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>1</integer> - </map> - <key>FirstLeftClickNoHit</key> - <map> - <key>Comment</key> - <string>Enables FirstLeftClickNoHit warning dialog</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>1</integer> - </map> - <key>FirstMap</key> - <map> - <key>Comment</key> - <string>Enables FirstMap warning dialog</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>1</integer> - </map> - <key>FirstMedia</key> + <key>FirstNotUseDestinationGuide</key> + <map> + <key>Comment</key> + <string>Shows hint when resident doesn't activate destination guide</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> + <key>FirstNotUseSidePanel</key> + <map> + <key>Comment</key> + <string>Shows hint when resident doesn't activate side panel</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> + <key>FirstNotMoving</key> + <map> + <key>Comment</key> + <string>Shows hint when resident doesn't move</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> + <key>FirstReceiveLindens</key> + <map> + <key>Comment</key> + <string>Shows hint when resident receives linden dollars</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> + <key>FirstOtherChatBeforeUser</key> <map> <key>Comment</key> - <string>Enables FirstMedia warning dialog</string> + <string>Shows hint when someone else chats first</string> <key>Persist</key> <integer>1</integer> <key>Type</key> @@ -155,43 +89,11 @@ <key>Value</key> <integer>1</integer> </map> - <key>FirstSculptedPrim</key> - <map> - <key>Comment</key> - <string>Enables FirstSculptedPrim warning dialog</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>1</integer> - </map> + <key>FirstSit</key> <map> <key>Comment</key> - <string>Enables FirstSit warning dialog</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>1</integer> - </map> - <key>FirstTeleport</key> - <map> - <key>Comment</key> - <string>Enables FirstTeleport warning dialog</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>1</integer> - </map> - <key>FirstVoice</key> - <map> - <key>Comment</key> - <string>Enables FirstVoice warning dialog</string> + <string>Shows hint when someone sits for the first time</string> <key>Persist</key> <integer>1</integer> <key>Type</key> diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 07418d1b5e..09b0e03b34 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3793,7 +3793,7 @@ <key>Comment</key> <string>URL for the web page to display in the Home side panel</string> <key>Persist</key> - <integer>0</integer> + <integer>1</integer> <key>Type</key> <string>String</string> <key>Value</key> @@ -5175,6 +5175,17 @@ <key>Value</key> <real>3.0</real> </map> + <key>MediaEnablePopups</key> + <map> + <key>Comment</key> + <string>If true, enable targeted links and javascript in media to open new media browser windows.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>MediaOnAPrimUI</key> <map> <key>Comment</key> @@ -6436,6 +6447,17 @@ <key>Value</key> <real>1.0</real> </map> + <key>MediaBrowserWindowLimit</key> + <map> + <key>Comment</key> + <string>Maximum number of media brower windows that can be open at once (0 for no limit)</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>S32</string> + <key>Value</key> + <integer>5</integer> + </map> <key>MediaRollOffRate</key> <map> <key>Comment</key> @@ -11936,5 +11958,38 @@ <key>Value</key> <integer>10</integer> </map> + <key>NotMovingHintTimeout</key> + <map> + <key>Comment</key> + <string>Number of seconds to wait for resident to move before displaying move hint.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>F32</string> + <key>Value</key> + <real>120.0</real> + </map> + <key>DestinationGuideHintTimeout</key> + <map> + <key>Comment</key> + <string>Number of seconds to wait before telling resident about destination guide.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>F32</string> + <key>Value</key> + <real>600.0</real> + </map> + <key>SidePanelHintTimeout</key> + <map> + <key>Comment</key> + <string>Number of seconds to wait before telling resident about side panel.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>F32</string> + <key>Value</key> + <real>300.0</real> + </map> </map> </llsd> diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index fe7e883d83..3d12b9a1f1 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -38,6 +38,7 @@ #include "llcallingcard.h" #include "llchannelmanager.h" #include "llconsole.h" +#include "llfirstuse.h" #include "llfloatercamera.h" #include "llfloaterreg.h" #include "llfloatertools.h" @@ -193,8 +194,6 @@ LLAgent::LLAgent() : mbFlagsDirty(FALSE), mbFlagsNeedReset(FALSE), - mbJump(FALSE), - mAutoPilot(FALSE), mAutoPilotFlyOnStop(FALSE), mAutoPilotTargetGlobal(), @@ -226,8 +225,9 @@ LLAgent::LLAgent() : mControlsTakenPassedOnCount[i] = 0; } - mListener.reset(new LLAgentListener(*this)); + + mMoveTimer.stop(); } // Requires gSavedSettings to be initialized. @@ -236,6 +236,8 @@ LLAgent::LLAgent() : //----------------------------------------------------------------------------- void LLAgent::init() { + mMoveTimer.start(); + gSavedSettings.declareBOOL("SlowMotionAnimation", FALSE, "Declared in code", FALSE); gSavedSettings.getControl("SlowMotionAnimation")->getSignal()->connect(boost::bind(&handleSlowMotionAnimation, _2)); @@ -300,6 +302,9 @@ void LLAgent::ageChat() //----------------------------------------------------------------------------- void LLAgent::moveAt(S32 direction, bool reset) { + mMoveTimer.reset(); + LLFirstUse::notMoving(false); + // age chat timer so it fades more quickly when you are intentionally moving ageChat(); @@ -325,6 +330,9 @@ void LLAgent::moveAt(S32 direction, bool reset) //----------------------------------------------------------------------------- void LLAgent::moveAtNudge(S32 direction) { + mMoveTimer.reset(); + LLFirstUse::notMoving(false); + // age chat timer so it fades more quickly when you are intentionally moving ageChat(); @@ -347,6 +355,9 @@ void LLAgent::moveAtNudge(S32 direction) //----------------------------------------------------------------------------- void LLAgent::moveLeft(S32 direction) { + mMoveTimer.reset(); + LLFirstUse::notMoving(false); + // age chat timer so it fades more quickly when you are intentionally moving ageChat(); @@ -369,6 +380,9 @@ void LLAgent::moveLeft(S32 direction) //----------------------------------------------------------------------------- void LLAgent::moveLeftNudge(S32 direction) { + mMoveTimer.reset(); + LLFirstUse::notMoving(false); + // age chat timer so it fades more quickly when you are intentionally moving ageChat(); @@ -391,6 +405,9 @@ void LLAgent::moveLeftNudge(S32 direction) //----------------------------------------------------------------------------- void LLAgent::moveUp(S32 direction) { + mMoveTimer.reset(); + LLFirstUse::notMoving(false); + // age chat timer so it fades more quickly when you are intentionally moving ageChat(); @@ -536,6 +553,9 @@ void LLAgent::toggleFlying() { BOOL fly = !gAgent.getFlying(); + gAgent.mMoveTimer.reset(); + LLFirstUse::notMoving(false); + gAgent.setFlying( fly ); gAgentCamera.resetView(); } @@ -1533,6 +1553,12 @@ void LLAgent::propagate(const F32 dt) //----------------------------------------------------------------------------- void LLAgent::updateAgentPosition(const F32 dt, const F32 yaw_radians, const S32 mouse_x, const S32 mouse_y) { + if (mMoveTimer.getStarted() && mMoveTimer.getElapsedTimeF32() > gSavedSettings.getF32("NotMovingHintTimeout")) + { + LLFirstUse::notMoving(); + mMoveTimer.stop(); + } + propagate(dt); // static S32 cameraUpdateCount = 0; @@ -2961,12 +2987,6 @@ void LLAgent::processScriptControlChange(LLMessageSystem *msg, void **) total_count++; } } - - // Any control taken? If so, might be first time. - //if (total_count > 0) - //{ - //LLFirstUse::useOverrideKeys(); - //} } else { diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index c643cef78f..a4e6377853 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -264,6 +264,7 @@ public: private: LLFrameTimer mFidgetTimer; LLFrameTimer mFocusObjectFadeTimer; + LLFrameTimer mMoveTimer; F32 mNextFidgetTime; S32 mCurrentFidget; @@ -359,14 +360,6 @@ private: BOOL mIsBusy; //-------------------------------------------------------------------- - // Jump - //-------------------------------------------------------------------- -public: - BOOL getJump() const { return mbJump; } -private: - BOOL mbJump; - - //-------------------------------------------------------------------- // Grab //-------------------------------------------------------------------- public: diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index bfe3e52657..051c4e1e7d 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -262,6 +262,7 @@ const F64 FRAME_STALL_THRESHOLD = 1.0; LLTimer gRenderStartTime; LLFrameTimer gForegroundTime; +LLFrameTimer gLoggedInTime; LLTimer gLogoutTimer; static const F32 LOGOUT_REQUEST_TIME = 6.f; // this will be cut short by the LogoutReply msg. F32 gLogoutMaxTime = LOGOUT_REQUEST_TIME; @@ -360,19 +361,19 @@ bool create_text_segment_icon_from_url_match(LLUrlMatch* match,LLTextBase* base) if(gAgent.isInGroup(match_id, TRUE)) { - LLGroupIconCtrl::Params icon_params = LLUICtrlFactory::instance().getDefaultParams<LLGroupIconCtrl>(); + LLGroupIconCtrl::Params icon_params; icon_params.group_id = match_id; icon_params.rect = LLRect(0, 16, 16, 0); icon_params.visible = true; - icon = LLUICtrlFactory::instance().createWidget<LLGroupIconCtrl>(icon_params); + icon = LLUICtrlFactory::instance().create<LLGroupIconCtrl>(icon_params); } else { - LLAvatarIconCtrl::Params icon_params = LLUICtrlFactory::instance().getDefaultParams<LLAvatarIconCtrl>(); + LLAvatarIconCtrl::Params icon_params; icon_params.avatar_id = match_id; icon_params.rect = LLRect(0, 16, 16, 0); icon_params.visible = true; - icon = LLUICtrlFactory::instance().createWidget<LLAvatarIconCtrl>(icon_params); + icon = LLUICtrlFactory::instance().create<LLAvatarIconCtrl>(icon_params); } LLInlineViewSegment::Params params; @@ -591,6 +592,7 @@ LLAppViewer::LLAppViewer() : setupErrorHandling(); sInstance = this; + gLoggedInTime.stop(); } LLAppViewer::~LLAppViewer() @@ -1117,7 +1119,7 @@ bool LLAppViewer::mainLoop() { LLMemType mt_sleep(LLMemType::MTYPE_SLEEP); LLFastTimer t2(FTM_SLEEP); - + // yield some time to the os based on command line option if(mYieldTime >= 0) { @@ -1200,17 +1202,17 @@ bool LLAppViewer::mainLoop() } } - if(!total_work_pending) //pause texture fetching threads if nothing to process. - { - LLAppViewer::getTextureCache()->pause(); - LLAppViewer::getImageDecodeThread()->pause(); - LLAppViewer::getTextureFetch()->pause(); - } - if(!total_io_pending) //pause file threads if nothing to process. - { - LLVFSThread::sLocal->pause(); - LLLFSThread::sLocal->pause(); - } + if(!total_work_pending) //pause texture fetching threads if nothing to process. + { + LLAppViewer::getTextureCache()->pause(); + LLAppViewer::getImageDecodeThread()->pause(); + LLAppViewer::getTextureFetch()->pause(); + } + if(!total_io_pending) //pause file threads if nothing to process. + { + LLVFSThread::sLocal->pause(); + LLLFSThread::sLocal->pause(); + } if ((LLStartUp::getStartupState() >= STATE_CLEANUP) && (frameTimer.getElapsedTimeF64() > FRAME_STALL_THRESHOLD)) @@ -4262,6 +4264,7 @@ void LLAppViewer::pingMainloopTimeout(const std::string& state, F32 secs) void LLAppViewer::handleLoginComplete() { + gLoggedInTime.start(); initMainloopTimeout("Mainloop Init"); // Store some data to DebugInfo in case of a freeze. diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index 1fcf38d18a..e7fffde83e 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -307,6 +307,7 @@ extern U32 gFrameStalls; extern LLTimer gRenderStartTime; extern LLFrameTimer gForegroundTime; +extern LLFrameTimer gLoggedInTime; extern F32 gLogoutMaxTime; extern LLTimer gLogoutTimer; diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp index 1cd705c2f9..82436e3991 100644 --- a/indra/newview/llavatarlist.cpp +++ b/indra/newview/llavatarlist.cpp @@ -492,7 +492,7 @@ LLAvalineListItem::LLAvalineListItem(bool hide_number/* = true*/) : LLAvatarList , mIsHideNumber(hide_number) { // should not use buildPanel from the base class to ensure LLAvalineListItem::postBuild is called. - LLUICtrlFactory::getInstance()->buildPanel(this, "panel_avatar_list_item.xml"); + buildFromFile( "panel_avatar_list_item.xml"); } BOOL LLAvalineListItem::postBuild() diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index 341913edf7..29caa296d4 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -69,7 +69,7 @@ LLAvatarListItem::LLAvatarListItem(bool not_from_ui_factory/* = true*/) { if (not_from_ui_factory) { - LLUICtrlFactory::getInstance()->buildPanel(this, "panel_avatar_list_item.xml"); + buildFromFile("panel_avatar_list_item.xml"); } // *NOTE: mantipov: do not use any member here. They can be uninitialized here in case instance // is created from the UICtrlFactory diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 6ee4387236..fba15693c8 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -41,6 +41,7 @@ #include "llagentcamera.h" #include "llchiclet.h" #include "llfloatercamera.h" +#include "llhints.h" #include "llimfloater.h" // for LLIMFloater #include "llnearbychatbar.h" #include "llspeakbutton.h" @@ -62,10 +63,6 @@ template class LLBottomTray* LLSingleton<class LLBottomTray>::getInstance(); namespace { const std::string& PANEL_CHICLET_NAME = "chiclet_list_panel"; - const std::string& PANEL_CHATBAR_NAME = "chat_bar"; - const std::string& PANEL_MOVEMENT_NAME = "movement_panel"; - const std::string& PANEL_CAMERA_NAME = "cam_panel"; - const std::string& PANEL_GESTURE_NAME = "gesture_panel"; S32 get_panel_min_width(LLLayoutStack* stack, LLView* panel) { @@ -73,7 +70,7 @@ namespace llassert(stack); if ( stack && panel && panel->getVisible() ) { - stack->getPanelMinSize(panel->getName(), &minimal_width, NULL); + stack->getPanelMinSize(panel->getName(), &minimal_width); } return minimal_width; } @@ -84,7 +81,7 @@ namespace llassert(stack); if ( stack && panel && panel->getVisible() ) { - stack->getPanelMaxSize(panel->getName(), &max_width, NULL); + stack->getPanelMaxSize(panel->getName(), &max_width); } return max_width; } @@ -105,18 +102,20 @@ class LLBottomTrayLite { public: LLBottomTrayLite() - : mNearbyChatBar(NULL), - mGesturePanel(NULL) + : mNearbyChatBar(NULL), + mChatBarContainer(NULL), + mGesturePanel(NULL) { mFactoryMap["chat_bar"] = LLCallbackMap(LLBottomTray::createNearbyChatBar, NULL); - LLUICtrlFactory::getInstance()->buildPanel(this, "panel_bottomtray_lite.xml"); + buildFromFile("panel_bottomtray_lite.xml"); // Necessary for focus movement among child controls setFocusRoot(TRUE); } BOOL postBuild() { - mNearbyChatBar = getChild<LLNearbyChatBar>("chat_bar"); + mNearbyChatBar = findChild<LLNearbyChatBar>("chat_bar"); + mChatBarContainer = getChild<LLLayoutPanel>("chat_bar_layout_panel"); mGesturePanel = getChild<LLPanel>("gesture_panel"); // Hide "show_nearby_chat" button @@ -138,6 +137,7 @@ public: } LLNearbyChatBar* mNearbyChatBar; + LLLayoutPanel* mChatBarContainer; LLPanel* mGesturePanel; }; @@ -146,13 +146,14 @@ LLBottomTray::LLBottomTray(const LLSD&) mSpeakPanel(NULL), mSpeakBtn(NULL), mNearbyChatBar(NULL), - mToolbarStack(NULL) -, mMovementButton(NULL) -, mResizeState(RS_NORESIZE) -, mBottomTrayContextMenu(NULL) -, mCamButton(NULL) -, mBottomTrayLite(NULL) -, mIsInLiteMode(false) + mChatBarContainer(NULL), + mToolbarStack(NULL), + mMovementButton(NULL), + mResizeState(RS_NORESIZE), + mBottomTrayContextMenu(NULL), + mCamButton(NULL), + mBottomTrayLite(NULL), + mIsInLiteMode(false) { // Firstly add ourself to IMSession observers, so we catch session events // before chiclets do that. @@ -160,7 +161,7 @@ LLBottomTray::LLBottomTray(const LLSD&) mFactoryMap["chat_bar"] = LLCallbackMap(LLBottomTray::createNearbyChatBar, NULL); - LLUICtrlFactory::getInstance()->buildPanel(this,"panel_bottomtray.xml"); + buildFromFile("panel_bottomtray.xml"); LLUICtrl::CommitCallbackRegistry::defaultRegistrar().add("CameraPresets.ChangeView", boost::bind(&LLFloaterCamera::onClickCameraItem, _2)); @@ -189,7 +190,7 @@ LLBottomTray::~LLBottomTray() if (mNearbyChatBar) { // store custom width of chatbar panel. - S32 custom_width = mNearbyChatBar->getRect().getWidth(); + S32 custom_width = mChatBarContainer->getRect().getWidth(); gSavedSettings.setS32("ChatBarCustomWidth", custom_width); } @@ -384,7 +385,7 @@ S32 LLBottomTray::notifyParent(const LLSD& info) const std::string& name = info["view_name"]; // expected only resize of nearby chatbar - if (mNearbyChatBar->getName() != name) return LLPanel::notifyParent(info); + if (mChatBarContainer->getName() != name) return LLPanel::notifyParent(info); const S32 new_width = info["new_width"]; @@ -414,8 +415,8 @@ void LLBottomTray::updateContextMenu(S32 x, S32 y, MASK mask) { LLUICtrl* edit_box = mNearbyChatBar->getChild<LLUICtrl>("chat_box"); - S32 local_x = x - mNearbyChatBar->getRect().mLeft - edit_box->getRect().mLeft; - S32 local_y = y - mNearbyChatBar->getRect().mBottom - edit_box->getRect().mBottom; + S32 local_x = x - mChatBarContainer->getRect().mLeft - edit_box->getRect().mLeft; + S32 local_y = y - mChatBarContainer->getRect().mBottom - edit_box->getRect().mBottom; bool in_edit_box = edit_box->pointInView(local_x, local_y); @@ -468,10 +469,12 @@ BOOL LLBottomTray::postBuild() mBottomTrayContextMenu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_bottomtray.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); gMenuHolder->addChild(mBottomTrayContextMenu); + mNearbyChatBar = findChild<LLNearbyChatBar>("chat_bar"); + mChatBarContainer = getChild<LLLayoutPanel>("chat_bar_layout_panel"); - mNearbyChatBar = getChild<LLNearbyChatBar>("chat_bar"); mToolbarStack = getChild<LLLayoutStack>("toolbar_stack"); mMovementButton = getChild<LLButton>("movement_btn"); + LLHints::registerHintTarget("move_btn", mMovementButton->getHandle()); mCamButton = getChild<LLButton>("camera_btn"); setRightMouseDownCallback(boost::bind(&LLBottomTray::showBottomTrayContextMenu,this, _2, _3,_4)); @@ -673,14 +676,14 @@ void LLBottomTray::reshape(S32 width, S32 height, BOOL called_from_parent) // we can not to do this from postBuild because reshape is called from parent view on startup // creation after it and reset width according to resize logic. static bool needs_restore_custom_state = true; - if (mNearbyChatBar && needs_restore_custom_state) + if (mChatBarContainer && needs_restore_custom_state) { // restore custom width of chatbar panel. S32 new_width = gSavedSettings.getS32("ChatBarCustomWidth"); if (new_width > 0) { processChatbarCustomization(new_width); - mNearbyChatBar->reshape(new_width, mNearbyChatBar->getRect().getHeight()); + mChatBarContainer->reshape(new_width, mChatBarContainer->getRect().getHeight()); } needs_restore_custom_state = false; } @@ -719,7 +722,7 @@ S32 LLBottomTray::processWidthDecreased(S32 delta_width) << llendl; } - const S32 chatbar_panel_width = mNearbyChatBar->getRect().getWidth(); + const S32 chatbar_panel_width = mChatBarContainer->getRect().getWidth(); const S32 chatbar_panel_min_width = get_panel_min_width(mToolbarStack, mNearbyChatBar); if (still_should_be_processed && chatbar_panel_width > chatbar_panel_min_width) { @@ -733,7 +736,7 @@ S32 LLBottomTray::processWidthDecreased(S32 delta_width) still_should_be_processed = delta_width < 0; - mNearbyChatBar->reshape(mNearbyChatBar->getRect().getWidth() - delta_panel, mNearbyChatBar->getRect().getHeight()); + mChatBarContainer->reshape(mChatBarContainer->getRect().getWidth() - delta_panel, mChatBarContainer->getRect().getHeight()); log(mNearbyChatBar, "after processing panel decreasing via nearby chatbar panel"); @@ -761,7 +764,7 @@ S32 LLBottomTray::processWidthDecreased(S32 delta_width) if (buttons_freed_width > 0) { log(mNearbyChatBar, "before applying compensative width"); - mNearbyChatBar->reshape(mNearbyChatBar->getRect().getWidth() + buttons_freed_width, mNearbyChatBar->getRect().getHeight() ); + mChatBarContainer->reshape(mChatBarContainer->getRect().getWidth() + buttons_freed_width, mChatBarContainer->getRect().getHeight() ); log(mNearbyChatBar, "after applying compensative width"); lldebugs << buttons_freed_width << llendl; } @@ -777,9 +780,9 @@ void LLBottomTray::processWidthIncreased(S32 delta_width) const S32 chiclet_panel_width = mChicletPanel->getParent()->getRect().getWidth(); static const S32 chiclet_panel_min_width = mChicletPanel->getMinWidth(); - const S32 chatbar_panel_width = mNearbyChatBar->getRect().getWidth(); - static const S32 chatbar_panel_min_width = get_panel_min_width(mToolbarStack, mNearbyChatBar); - static const S32 chatbar_panel_max_width = get_panel_max_width(mToolbarStack, mNearbyChatBar); + const S32 chatbar_panel_width = mChatBarContainer->getRect().getWidth(); + static const S32 chatbar_panel_min_width = get_panel_min_width(mToolbarStack, mChatBarContainer); + static const S32 chatbar_panel_max_width = get_panel_max_width(mToolbarStack, mChatBarContainer); const S32 chatbar_available_shrink_width = chatbar_panel_width - chatbar_panel_min_width; const S32 available_width_chiclet = chiclet_panel_width - chiclet_panel_min_width; @@ -817,7 +820,7 @@ void LLBottomTray::processWidthIncreased(S32 delta_width) } log(mNearbyChatBar, "increase width: before applying compensative width"); - mNearbyChatBar->reshape(mNearbyChatBar->getRect().getWidth() - chatbar_shrink_width, mNearbyChatBar->getRect().getHeight() ); + mChatBarContainer->reshape(mChatBarContainer->getRect().getWidth() - chatbar_shrink_width, mChatBarContainer->getRect().getHeight() ); if (mNearbyChatBar) log(mNearbyChatBar, "after applying compensative width"); lldebugs << chatbar_shrink_width << llendl; @@ -838,7 +841,7 @@ void LLBottomTray::processWidthIncreased(S32 delta_width) // how many space can nearby chatbar take? - S32 chatbar_panel_width_ = mNearbyChatBar->getRect().getWidth(); + S32 chatbar_panel_width_ = mChatBarContainer->getRect().getWidth(); if (delta_width > 0 && chatbar_panel_width_ < chatbar_panel_max_width) { S32 delta_panel_max = chatbar_panel_max_width - chatbar_panel_width_; @@ -849,7 +852,7 @@ void LLBottomTray::processWidthIncreased(S32 delta_width) << llendl; delta_width -= delta_panel_max; - mNearbyChatBar->reshape(chatbar_panel_width_ + delta_panel, mNearbyChatBar->getRect().getHeight()); + mChatBarContainer->reshape(chatbar_panel_width_ + delta_panel, mChatBarContainer->getRect().getHeight()); log(mNearbyChatBar, "applied unprocessed delta width"); } } @@ -971,7 +974,7 @@ void LLBottomTray::processShrinkButtons(S32& required_width, S32& buttons_freed_ S32 panel_min_width = 0; std::string panel_name = mSpeakPanel->getName(); - bool success = mToolbarStack->getPanelMinSize(panel_name, &panel_min_width, NULL); + bool success = mToolbarStack->getPanelMinSize(panel_name, &panel_min_width); if (!success) { lldebugs << "Panel was not found to get its min width: " << panel_name << llendl; @@ -1017,7 +1020,7 @@ void LLBottomTray::processShrinkButton(EResizeState processed_object_type, S32& S32 panel_width = panel->getRect().getWidth(); S32 panel_min_width = 0; std::string panel_name = panel->getName(); - bool success = mToolbarStack->getPanelMinSize(panel_name, &panel_min_width, NULL); + bool success = mToolbarStack->getPanelMinSize(panel_name, &panel_min_width); S32 possible_shrink_width = panel_width - panel_min_width; if (!success) @@ -1306,7 +1309,7 @@ bool LLBottomTray::setVisibleAndFitWidths(EResizeState object_type, bool visible { // Calculate the possible shrunk width as difference between current and minimal widths const S32 chatbar_shrunk_width = - mNearbyChatBar->getRect().getWidth() - get_panel_min_width(mToolbarStack, mNearbyChatBar); + mChatBarContainer->getRect().getWidth() - get_panel_min_width(mToolbarStack, mChatBarContainer); S32 sum_of_min_widths = get_panel_min_width(mToolbarStack, mSpeakPanel); S32 sum_of_curr_widths = get_curr_width(mSpeakPanel); @@ -1326,7 +1329,7 @@ bool LLBottomTray::setVisibleAndFitWidths(EResizeState object_type, bool visible // Minimal width of current panel S32 minimal_width = 0; - mToolbarStack->getPanelMinSize(cur_panel->getName(), &minimal_width, NULL); + mToolbarStack->getPanelMinSize(cur_panel->getName(), &minimal_width); if ( (available_width + possible_shrunk_width) >= minimal_width) { @@ -1403,7 +1406,7 @@ void LLBottomTray::processChatbarCustomization(S32 new_width) { if (NULL == mNearbyChatBar) return; - const S32 delta_width = mNearbyChatBar->getRect().getWidth() - new_width; + const S32 delta_width = mChatBarContainer->getRect().getWidth() - new_width; if (delta_width == 0) return; diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index bd9d35f209..b75e97551d 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -27,20 +27,17 @@ #ifndef LL_LLBOTTOMPANEL_H #define LL_LLBOTTOMPANEL_H -#include "llmenugl.h" - #include "llpanel.h" #include "llimview.h" -#include "llcombobox.h" class LLChicletPanel; -class LLLineEditor; class LLLayoutStack; -class LLNotificationChiclet; class LLSpeakButton; class LLNearbyChatBar; class LLIMChiclet; class LLBottomTrayLite; +class LLLayoutPanel; +class LLMenuGL; // Build time optimization, generate once in .cpp file #ifndef LLBOTTOMTRAY_CPP @@ -375,6 +372,7 @@ protected: LLPanel* mSpeakPanel; LLSpeakButton* mSpeakBtn; LLNearbyChatBar* mNearbyChatBar; + LLLayoutPanel* mChatBarContainer; LLLayoutStack* mToolbarStack; LLMenuGL* mBottomTrayContextMenu; LLButton* mCamButton; diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index c78f73c3b8..b11bba58e4 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -141,7 +141,7 @@ BOOL LLCallFloater::postBuild() childSetAction("leave_call_btn", boost::bind(&LLCallFloater::leaveCall, this)); - mNonAvatarCaller = getChild<LLNonAvatarCaller>("non_avatar_caller"); + mNonAvatarCaller = findChild<LLNonAvatarCaller>("non_avatar_caller"); mNonAvatarCaller->setVisible(FALSE); LLView *anchor_panel = LLBottomTray::getInstance()->getChild<LLView>("speak_flyout_btn"); diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp index 967db21244..143a740c5b 100644 --- a/indra/newview/llchatbar.cpp +++ b/indra/newview/llchatbar.cpp @@ -565,6 +565,10 @@ void LLChatBar::sendChatFromViewer(const std::string &utf8text, EChatType type, void LLChatBar::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate) { + // as soon as we say something, we no longer care about teaching the user + // how to chat + gWarningSettings.setBOOL("FirstOtherChatBeforeUser", FALSE); + // Look for "/20 foo" channel chats. S32 channel = 0; LLWString out_text = stripChannelNumber(wtext, &channel); diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 1f67a659bd..b9af6d425b 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -101,7 +101,7 @@ public: static LLChatHistoryHeader* createInstance(const std::string& file_name) { LLChatHistoryHeader* pInstance = new LLChatHistoryHeader; - LLUICtrlFactory::getInstance()->buildPanel(pInstance, file_name); + pInstance->buildFromFile(file_name); return pInstance; } @@ -396,7 +396,7 @@ protected: return; } - LLTextBase* name = getChild<LLTextBase>("user_name"); + LLTextBox* name = getChild<LLTextBox>("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 ) ; @@ -496,12 +496,17 @@ void LLChatHistory::initFromParams(const LLChatHistory::Params& p) const S32 NEW_TEXT_NOTICE_HEIGHT = 20; - LLPanel::Params panel_p; + LLLayoutPanel::Params panel_p; panel_p.name = "spacer"; panel_p.background_visible = false; panel_p.has_border = false; panel_p.mouse_opaque = false; - stackp->addPanel(LLUICtrlFactory::create<LLPanel>(panel_p), 0, 30, S32_MAX, S32_MAX, true, false, LLLayoutStack::ANIMATE); + panel_p.min_dim = 30; + panel_p.max_dim = S32_MAX; + panel_p.auto_resize = true; + panel_p.user_resize = false; + + stackp->addPanel(LLUICtrlFactory::create<LLLayoutPanel>(panel_p), LLLayoutStack::ANIMATE); panel_p.name = "new_text_notice_holder"; LLRect new_text_notice_rect = getLocalRect(); @@ -510,7 +515,10 @@ void LLChatHistory::initFromParams(const LLChatHistory::Params& p) panel_p.background_opaque = true; panel_p.background_visible = true; panel_p.visible = false; - mMoreChatPanel = LLUICtrlFactory::create<LLPanel>(panel_p); + panel_p.min_dim = 0; + panel_p.auto_resize = false; + panel_p.user_resize = false; + mMoreChatPanel = LLUICtrlFactory::create<LLLayoutPanel>(panel_p); LLTextBox::Params text_p(p.more_chat_text); text_p.rect = mMoreChatPanel->getLocalRect(); @@ -519,7 +527,7 @@ void LLChatHistory::initFromParams(const LLChatHistory::Params& p) mMoreChatText = LLUICtrlFactory::create<LLTextBox>(text_p, mMoreChatPanel); mMoreChatText->setClickedCallback(boost::bind(&LLChatHistory::onClickMoreText, this)); - stackp->addPanel(mMoreChatPanel, 0, 0, S32_MAX, S32_MAX, false, false, LLLayoutStack::ANIMATE); + stackp->addPanel(mMoreChatPanel, LLLayoutStack::ANIMATE); } diff --git a/indra/newview/llchathistory.h b/indra/newview/llchathistory.h index 112a33f1ee..ac48d7bf29 100644 --- a/indra/newview/llchathistory.h +++ b/indra/newview/llchathistory.h @@ -138,7 +138,7 @@ class LLChatHistory : public LLUICtrl S32 mTopHeaderPad; S32 mBottomHeaderPad; - LLPanel* mMoreChatPanel; + class LLLayoutPanel* mMoreChatPanel; LLTextBox* mMoreChatText; LLTextEditor* mEditor; typedef std::set<std::string> unread_chat_source_t; diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp index 67b7ac5383..e78bdbe25c 100644 --- a/indra/newview/llchatitemscontainerctrl.cpp +++ b/indra/newview/llchatitemscontainerctrl.cpp @@ -51,7 +51,7 @@ static const S32 msg_height_pad = 5; LLNearbyChatToastPanel* LLNearbyChatToastPanel::createInstance() { LLNearbyChatToastPanel* item = new LLNearbyChatToastPanel(); - LLUICtrlFactory::getInstance()->buildPanel(item, "panel_chat_item.xml"); + item->buildFromFile("panel_chat_item.xml"); item->setFollows(FOLLOWS_NONE); return item; } diff --git a/indra/newview/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp index 268d9958d1..a42677845e 100644 --- a/indra/newview/llcompilequeue.cpp +++ b/indra/newview/llcompilequeue.cpp @@ -89,7 +89,6 @@ LLFloaterScriptQueue::LLFloaterScriptQueue(const LLSD& key) : mDone(false), mMono(false) { - //Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this,"floater_script_queue.xml", FALSE); } // Destroys the object diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp index b715647143..a09c0ea0f8 100644 --- a/indra/newview/llfasttimerview.cpp +++ b/indra/newview/llfasttimerview.cpp @@ -117,7 +117,7 @@ BOOL LLFastTimerView::handleRightMouseDown(S32 x, S32 y, MASK mask) { S32 bar_idx = MAX_VISIBLE_HISTORY - ((y - mBarRect.mBottom) * (MAX_VISIBLE_HISTORY + 2) / mBarRect.getHeight()); bar_idx = llclamp(bar_idx, 0, MAX_VISIBLE_HISTORY); - mPrintStats = bar_idx; + mPrintStats = LLFastTimer::NamedTimer::HISTORY_NUM - mScrollIndex - bar_idx; } return FALSE; } @@ -134,6 +134,17 @@ LLFastTimer::NamedTimer* LLFastTimerView::getLegendID(S32 y) return NULL; } +BOOL LLFastTimerView::handleDoubleClick(S32 x, S32 y, MASK mask) +{ + for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer()); + it != end_timer_tree(); + ++it) + { + (*it)->setCollapsed(false); + } + return TRUE; +} + BOOL LLFastTimerView::handleMouseDown(S32 x, S32 y, MASK mask) { @@ -947,7 +958,7 @@ void LLFastTimerView::draw() { legend_stat += ", "; } - first = true; + first = false; legend_stat += idp->getName(); if (idp->getCollapsed()) @@ -974,8 +985,7 @@ void LLFastTimerView::draw() U64 ticks; if (mPrintStats > 0) { - S32 hidx = (mPrintStats - 1) - mScrollIndex; - ticks = idp->getHistoricalCount(hidx); + ticks = idp->getHistoricalCount(mPrintStats); } else { diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h index 961d03abf1..3788897cec 100644 --- a/indra/newview/llfasttimerview.h +++ b/indra/newview/llfasttimerview.h @@ -48,6 +48,7 @@ private: public: virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); + virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask); virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask); virtual BOOL handleHover(S32 x, S32 y, MASK mask); diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index 5796e67618..dd1f92a25c 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -161,22 +161,13 @@ public: if (!region_name.empty()) { - LLToolTip::Params params; std::string extra_message = llformat("%s (%d, %d, %d)", region_name.c_str(), mLandmarkInfoGetter.getPosX(), mLandmarkInfoGetter.getPosY(), mLandmarkInfoGetter.getPosZ()); + LLToolTip::Params params; params.message = llformat("%s\n%s", getLabelSelected().c_str(), extra_message.c_str()); - - LLRect rect = calcScreenRect(); - LLFontGL* standart_font = LLFontGL::getFontSansSerif(); - if(standart_font) - { - S32 w = llmax((S32)(standart_font->getWidthF32(getLabelSelected())+0.5),(S32)(standart_font->getWidthF32(extra_message)+0.5)); - rect.mRight = rect.mLeft + w; - params.max_width = w; - } - - params.sticky_rect = rect; + params.max_width = 1000; + params.sticky_rect = calcScreenRect(); LLToolTipMgr::instance().show(params); } @@ -661,16 +652,23 @@ void LLFavoritesBarCtrl::draw() } } -LLXMLNodePtr LLFavoritesBarCtrl::getButtonXMLNode() +const LLButton::Params& LLFavoritesBarCtrl::getButtonParams() { - LLXMLNodePtr buttonXMLNode = NULL; - bool success = LLUICtrlFactory::getLayeredXMLNode("favorites_bar_button.xml", buttonXMLNode); - if (!success) + static LLButton::Params button_params; + static bool params_initialized = false; + + if (!params_initialized) { - llwarns << "Failed to create Favorites Bar button from favorites_bar_button.xml" << llendl; - buttonXMLNode = NULL; + LLXMLNodePtr button_xml_node; + if(LLUICtrlFactory::getLayeredXMLNode("favorites_bar_button.xml", button_xml_node)) + { + LLXUIParser parser; + parser.readXUI(button_xml_node, button_params, "favorites_bar_button.xml"); + } + params_initialized = true; } - return buttonXMLNode; + + return button_params; } void LLFavoritesBarCtrl::updateButtons() @@ -682,11 +680,8 @@ void LLFavoritesBarCtrl::updateButtons() return; } - static LLXMLNodePtr buttonXMLNode = getButtonXMLNode(); - if (buttonXMLNode.isNull()) - { - return; - } + const LLButton::Params& button_params = getButtonParams(); + if(mItems.empty()) { mBarLabel->setVisible(TRUE); @@ -762,7 +757,7 @@ void LLFavoritesBarCtrl::updateButtons() int j = first_changed_item_index; for (; j < mItems.count(); j++) { - last_new_button = createButton(mItems[j], buttonXMLNode, last_right_edge); + last_new_button = createButton(mItems[j], button_params, last_right_edge); if (!last_new_button) { break; @@ -780,8 +775,7 @@ void LLFavoritesBarCtrl::updateButtons() //or there are some new favorites, or width had been changed // so if we need to display chevron button, we must update dropdown items too. mUpdateDropDownItems = true; - S32 buttonHGap = 2; // default value - buttonXMLNode->getAttributeS32("left", buttonHGap); + S32 buttonHGap = button_params.rect.left; // default value LLRect rect; // Chevron button should stay right aligned rect.setOriginAndSize(getRect().mRight - mChevronButton->getRect().getWidth() - buttonHGap, 0, @@ -808,12 +802,10 @@ void LLFavoritesBarCtrl::updateButtons() } } -LLButton* LLFavoritesBarCtrl::createButton(const LLPointer<LLViewerInventoryItem> item, LLXMLNodePtr &buttonXMLNode, S32 x_offset) +LLButton* LLFavoritesBarCtrl::createButton(const LLPointer<LLViewerInventoryItem> item, const LLButton::Params& button_params, S32 x_offset) { - S32 def_button_width = 120; - buttonXMLNode->getAttributeS32("width", def_button_width); - S32 button_x_delta = 2; // default value - buttonXMLNode->getAttributeS32("left", button_x_delta); + S32 def_button_width = button_params.rect.width; + S32 button_x_delta = button_params.rect.left; // default value S32 curr_x = x_offset; /** @@ -831,13 +823,16 @@ LLButton* LLFavoritesBarCtrl::createButton(const LLPointer<LLViewerInventoryItem { return NULL; } - fav_btn = LLUICtrlFactory::defaultBuilder<LLFavoriteLandmarkButton>(buttonXMLNode, this, NULL); + LLButton::Params fav_btn_params(button_params); + fav_btn = LLUICtrlFactory::create<LLFavoriteLandmarkButton>(fav_btn_params); if (NULL == fav_btn) { llwarns << "Unable to create LLFavoriteLandmarkButton widget: " << item->getName() << llendl; return NULL; } + addChild(fav_btn); + LLRect butt_rect (fav_btn->getRect()); fav_btn->setLandmarkID(item->getUUID()); butt_rect.setOriginAndSize(curr_x + button_x_delta, fav_btn->getRect().mBottom, width, fav_btn->getRect().getHeight()); diff --git a/indra/newview/llfavoritesbar.h b/indra/newview/llfavoritesbar.h index bdb1b8288f..37645523f6 100644 --- a/indra/newview/llfavoritesbar.h +++ b/indra/newview/llfavoritesbar.h @@ -71,8 +71,8 @@ public: protected: void updateButtons(); - LLButton* createButton(const LLPointer<LLViewerInventoryItem> item, LLXMLNodePtr &root, S32 x_offset ); - LLXMLNodePtr getButtonXMLNode(); + LLButton* createButton(const LLPointer<LLViewerInventoryItem> item, const LLButton::Params& button_params, S32 x_offset ); + const LLButton::Params& getButtonParams(); BOOL collectFavoriteItems(LLInventoryModel::item_array_t &items); void onButtonClick(LLUUID id); diff --git a/indra/newview/llfirstuse.cpp b/indra/newview/llfirstuse.cpp index 4d5b08243a..ead06d59f9 100644 --- a/indra/newview/llfirstuse.cpp +++ b/indra/newview/llfirstuse.cpp @@ -30,7 +30,7 @@ // library includes #include "indra_constants.h" -#include "llnotificationsutil.h" +#include "llnotifications.h" // viewer includes #include "llagent.h" // for gAgent.inPrelude() @@ -39,7 +39,7 @@ #include "llappviewer.h" #include "lltracker.h" -/* + // static std::set<std::string> LLFirstUse::sConfigVariables; @@ -70,211 +70,105 @@ void LLFirstUse::resetFirstUse() gWarningSettings.setBOOL(*iter, TRUE); } } -*/ -/* - -// Called whenever the viewer detects that your balance went up -void LLFirstUse::useBalanceIncrease(S32 delta) -{ - if (gWarningSettings.getBOOL("FirstBalanceIncrease")) - { - gWarningSettings.setBOOL("FirstBalanceIncrease", FALSE); - - LLSD args; - args["AMOUNT"] = llformat("%d",delta); - LLNotificationsUtil::add("FirstBalanceIncrease", args); - } -} - - -// Called whenever the viewer detects your balance went down -void LLFirstUse::useBalanceDecrease(S32 delta) -{ - if (gWarningSettings.getBOOL("FirstBalanceDecrease")) - { - gWarningSettings.setBOOL("FirstBalanceDecrease", FALSE); - - LLSD args; - args["AMOUNT"] = llformat("%d",-delta); - LLNotificationsUtil::add("FirstBalanceDecrease", args); - } -} - // static -void LLFirstUse::useSit() +void LLFirstUse::otherAvatarChatFirst(bool enable) { - // Our orientation island uses sitting to teach vehicle driving - // so just never show this message. JC - //if (gWarningSettings.getBOOL("FirstSit")) - //{ - // gWarningSettings.setBOOL("FirstSit", FALSE); - // - // LLNotificationsUtil::add("FirstSit"); - //} + firstUseNotification("FirstOtherChatBeforeUser", enable, "HintChat", LLSD(), LLSD().with("target", "incoming_chat").with("direction", "right")); } // static -void LLFirstUse::useMap() +void LLFirstUse::sit(bool enable) { - if (gWarningSettings.getBOOL("FirstMap")) - { - gWarningSettings.setBOOL("FirstMap", FALSE); - - LLNotificationsUtil::add("FirstMap"); - } + firstUseNotification("FirstSit", enable, "HintSit", LLSD(), LLSD().with("target", "stand_btn").with("direction", "top")); } // static -void LLFirstUse::useGoTo() +void LLFirstUse::newInventory(bool enable) { - // nothing for now JC + firstUseNotification("FirstInventoryOffer", enable, "HintInventory", LLSD(), LLSD().with("target", "inventory_btn").with("direction", "left")); } // static -void LLFirstUse::useBuild() +void LLFirstUse::useSandbox() { - if (gWarningSettings.getBOOL("FirstBuild")) - { - gWarningSettings.setBOOL("FirstBuild", FALSE); - - LLNotificationsUtil::add("FirstBuild"); - } + firstUseNotification("FirstSandbox", true, "FirstSandbox", LLSD().with("HOURS", SANDBOX_CLEAN_FREQ).with("TIME", SANDBOX_FIRST_CLEAN_HOUR)); } - - */ -/* -// static -void LLFirstUse::useLeftClickNoHit() -{ - if (gWarningSettings.getBOOL("FirstLeftClickNoHit")) - { - gWarningSettings.setBOOL("FirstLeftClickNoHit", FALSE); - LLNotificationsUtil::add("FirstLeftClickNoHit"); - } -} -*/ -/* // static -void LLFirstUse::useTeleport() +void LLFirstUse::notUsingDestinationGuide(bool enable) { - if (gWarningSettings.getBOOL("FirstTeleport")) - { - LLVector3d teleportDestination = LLTracker::getTrackedPositionGlobal(); - if(teleportDestination != LLVector3d::zero) - { - gWarningSettings.setBOOL("FirstTeleport", FALSE); - - LLNotificationsUtil::add("FirstTeleport"); - } - } + // not doing this yet + //firstUseNotification("FirstNotUseDestinationGuide", enable, "HintDestinationGuide", LLSD(), LLSD().with("target", "dest_guide_btn").with("direction", "left")); } -*/ -// static -void LLFirstUse::useOverrideKeys() -{ - // Our orientation island uses key overrides to teach vehicle driving - // so don't show this message until you get off OI. JC - if (!gAgent.inPrelude()) - { - if (gWarningSettings.getBOOL("FirstOverrideKeys")) - { - gWarningSettings.setBOOL("FirstOverrideKeys", FALSE); - LLNotificationsUtil::add("FirstOverrideKeys"); - } - } -} -/* // static -void LLFirstUse::useAttach() +void LLFirstUse::notUsingSidePanel(bool enable) { - // nothing for now + // not doing this yet + //firstUseNotification("FirstNotUseSidePanel", enable, "HintSidePanel", LLSD(), LLSD().with("target", "side_panel_btn").with("direction", "left")); } // static -void LLFirstUse::useAppearance() +void LLFirstUse::notMoving(bool enable) { - if (gWarningSettings.getBOOL("FirstAppearance")) - { - gWarningSettings.setBOOL("FirstAppearance", FALSE); - - LLNotificationsUtil::add("FirstAppearance"); - } + firstUseNotification("FirstNotMoving", enable, "HintMove", LLSD(), LLSD().with("target", "move_btn").with("direction", "top")); } // static -void LLFirstUse::useInventory() +void LLFirstUse::receiveLindens(bool enable) { - if (gWarningSettings.getBOOL("FirstInventory")) - { - gWarningSettings.setBOOL("FirstInventory", FALSE); - - LLNotificationsUtil::add("FirstInventory"); - } + firstUseNotification("FirstReceiveLindens", enable, "HintLindenDollar", LLSD(), LLSD().with("target", "linden_balance").with("direction", "bottom")); } -*/ -// static -void LLFirstUse::useSandbox() +//static +void LLFirstUse::firstUseNotification(const std::string& control_var, bool enable, const std::string& notification_name, LLSD args, LLSD payload) { - if (gWarningSettings.getBOOL("FirstSandbox")) - { - gWarningSettings.setBOOL("FirstSandbox", FALSE); + init(); - LLSD args; - args["HOURS"] = llformat("%d",SANDBOX_CLEAN_FREQ); - args["TIME"] = llformat("%d",SANDBOX_FIRST_CLEAN_HOUR); - LLNotificationsUtil::add("FirstSandbox", args); - } -} -/* -// static -void LLFirstUse::useFlexible() -{ - if (gWarningSettings.getBOOL("FirstFlexible")) + if (enable) { - gWarningSettings.setBOOL("FirstFlexible", FALSE); + LL_DEBUGS("LLFirstUse") << "Trigger first use notification " << notification_name << LL_ENDL; - LLNotificationsUtil::add("FirstFlexible"); - } -} - -// static -void LLFirstUse::useDebugMenus() -{ - if (gWarningSettings.getBOOL("FirstDebugMenus")) + // if notification doesn't already exist and this notification hasn't been disabled... + if (gWarningSettings.getBOOL(control_var)) + { // create new notification + LLNotifications::instance().add(LLNotification::Params().name(notification_name).substitutions(args).payload(payload.with("control_var", control_var))); + } + } + else { - gWarningSettings.setBOOL("FirstDebugMenus", FALSE); - - LLNotificationsUtil::add("FirstDebugMenus"); + LL_DEBUGS("LLFirstUse") << "Disabling first use notification " << notification_name << LL_ENDL; + LLNotifications::instance().cancelByName(notification_name); + // redundantly clear settings var here, in case there are no notifications to cancel + gWarningSettings.setBOOL(control_var, FALSE); } + } // static -void LLFirstUse::useSculptedPrim() +void LLFirstUse::init() { - if (gWarningSettings.getBOOL("FirstSculptedPrim")) + static bool initialized = false; + if (!initialized) { - gWarningSettings.setBOOL("FirstSculptedPrim", FALSE); - - LLNotificationsUtil::add("FirstSculptedPrim"); - + LLNotifications::instance().getChannel("Hints")->connectChanged(&processNotification); } + initialized = true; } -// static -void LLFirstUse::useMedia() +//static +bool LLFirstUse::processNotification(const LLSD& notify) { - if (gWarningSettings.getBOOL("FirstMedia")) + if (notify["sigtype"].asString() == "delete") { - gWarningSettings.setBOOL("FirstMedia", FALSE); - - // Popup removed as a short-term fix for EXT-1643. - // Ultimately, the plan is to kill all First Use dialogs - //LLNotificationsUtil::add("FirstMedia"); + LLNotificationPtr notification = LLNotifications::instance().find(notify["id"].asUUID()); + if (notification) + { + // disable any future notifications + gWarningSettings.setBOOL(notification->getPayload()["control_var"], FALSE); + } } + return false; } -*/ diff --git a/indra/newview/llfirstuse.h b/indra/newview/llfirstuse.h index 771e38ed33..275f134400 100644 --- a/indra/newview/llfirstuse.h +++ b/indra/newview/llfirstuse.h @@ -70,10 +70,13 @@ object or from inventory. 14. First time you create/edit a sculpted prim. */ +class LLNotification; + + class LLFirstUse { public: -/* + // Add a config variable to be reset on resetFirstUse() static void addConfigVariable(const std::string& var); @@ -81,35 +84,21 @@ public: static void disableFirstUse(); static void resetFirstUse(); - // These methods are called each time the appropriate action is - // taken. The functions themselves handle only showing the dialog - // the first time, or subsequent times if the user wishes. - static void useBalanceIncrease(S32 delta); - static void useBalanceDecrease(S32 delta); - static void useSit(); - static void useMap(); - static void useGoTo(); - static void useBuild(); -// static void useLeftClickNoHit(); - static void useTeleport(); -*/ - static void useOverrideKeys(); -/* - static void useAttach(); - static void useAppearance(); - static void useInventory(); - */ + static void otherAvatarChatFirst(bool enable = true); + static void sit(bool enable = true); + static void notUsingDestinationGuide(bool enable = true); + static void notUsingSidePanel(bool enable = true); + static void notMoving(bool enable = true); + static void newInventory(bool enable = true); + static void receiveLindens(bool enable = true); static void useSandbox(); -/* - static void useFlexible(); - static void useDebugMenus(); - static void useSculptedPrim(); - static void useMedia(); - protected: + static void firstUseNotification(const std::string& control_var, bool enable, const std::string& notification_name, LLSD args = LLSD(), LLSD payload = LLSD()); static std::set<std::string> sConfigVariables; -*/ + + static void init(); + static bool processNotification(const LLSD& notify); }; #endif diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index 5ac006302e..135137069c 100644 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -94,7 +94,6 @@ public: LLFloaterAbout::LLFloaterAbout(const LLSD& key) : LLFloater(key) { - //LLUICtrlFactory::getInstance()->buildFloater(this, "floater_about.xml"); } diff --git a/indra/newview/llfloaterauction.cpp b/indra/newview/llfloaterauction.cpp index 5cab770c42..252c7b51ae 100644 --- a/indra/newview/llfloaterauction.cpp +++ b/indra/newview/llfloaterauction.cpp @@ -74,7 +74,6 @@ LLFloaterAuction::LLFloaterAuction(const LLSD& key) : LLFloater(key), mParcelID(-1) { -// LLUICtrlFactory::getInstance()->buildFloater(this, "floater_auction.xml"); mCommitCallbackRegistrar.add("ClickSnapshot", boost::bind(&LLFloaterAuction::onClickSnapshot, this)); mCommitCallbackRegistrar.add("ClickSellToAnyone", boost::bind(&LLFloaterAuction::onClickSellToAnyone, this)); mCommitCallbackRegistrar.add("ClickStartAuction", boost::bind(&LLFloaterAuction::onClickStartAuction, this)); diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp index 9391c761b7..9f96a22f56 100644 --- a/indra/newview/llfloateravatarpicker.cpp +++ b/indra/newview/llfloateravatarpicker.cpp @@ -79,7 +79,6 @@ LLFloaterAvatarPicker::LLFloaterAvatarPicker(const LLSD& key) mNearMeListComplete(FALSE), mCloseOnSelect(FALSE) { -// LLUICtrlFactory::getInstance()->buildFloater(this, "floater_avatar_picker.xml"); mCommitCallbackRegistrar.add("Refresh.FriendList", boost::bind(&LLFloaterAvatarPicker::populateFriend, this)); } diff --git a/indra/newview/llfloateravatartextures.cpp b/indra/newview/llfloateravatartextures.cpp index a6613968fb..10cf26521f 100644 --- a/indra/newview/llfloateravatartextures.cpp +++ b/indra/newview/llfloateravatartextures.cpp @@ -40,7 +40,6 @@ LLFloaterAvatarTextures::LLFloaterAvatarTextures(const LLSD& id) : LLFloater(id), mID(id.asUUID()) { -// LLUICtrlFactory::getInstance()->buildFloater(this, "floater_avatar_textures.xml"); } LLFloaterAvatarTextures::~LLFloaterAvatarTextures() diff --git a/indra/newview/llfloaterbeacons.cpp b/indra/newview/llfloaterbeacons.cpp index 0b8605d041..e24df948c4 100644 --- a/indra/newview/llfloaterbeacons.cpp +++ b/indra/newview/llfloaterbeacons.cpp @@ -36,8 +36,6 @@ LLFloaterBeacons::LLFloaterBeacons(const LLSD& seed) : LLFloater(seed) { -// LLUICtrlFactory::getInstance()->buildFloater(this, "floater_beacons.xml"); - // Initialize pipeline states from saved settings. // OK to do at floater constructor time because beacons do not display unless the floater is open // therefore it is OK to not initialize the pipeline state before needed. diff --git a/indra/newview/llfloaterbuildoptions.cpp b/indra/newview/llfloaterbuildoptions.cpp index 7e939a537d..4b6fe4a115 100644 --- a/indra/newview/llfloaterbuildoptions.cpp +++ b/indra/newview/llfloaterbuildoptions.cpp @@ -40,7 +40,6 @@ LLFloaterBuildOptions::LLFloaterBuildOptions(const LLSD& key) : LLFloater(key) { - //LLUICtrlFactory::getInstance()->buildFloater(this, "floater_build_options.xml"); } LLFloaterBuildOptions::~LLFloaterBuildOptions() diff --git a/indra/newview/llfloaterbulkpermission.cpp b/indra/newview/llfloaterbulkpermission.cpp index 02c7a6da7e..90f40628a8 100644 --- a/indra/newview/llfloaterbulkpermission.cpp +++ b/indra/newview/llfloaterbulkpermission.cpp @@ -57,7 +57,6 @@ LLFloaterBulkPermission::LLFloaterBulkPermission(const LLSD& seed) mDone(FALSE) { mID.generate(); -// LLUICtrlFactory::getInstance()->buildFloater(this,"floater_bulk_perms.xml"); mCommitCallbackRegistrar.add("BulkPermission.Apply", boost::bind(&LLFloaterBulkPermission::onApplyBtn, this)); mCommitCallbackRegistrar.add("BulkPermission.Close", boost::bind(&LLFloaterBulkPermission::onCloseBtn, this)); mCommitCallbackRegistrar.add("BulkPermission.CheckAll", boost::bind(&LLFloaterBulkPermission::onCheckAll, this)); diff --git a/indra/newview/llfloaterbump.cpp b/indra/newview/llfloaterbump.cpp index af98453c3c..a02b67f08e 100644 --- a/indra/newview/llfloaterbump.cpp +++ b/indra/newview/llfloaterbump.cpp @@ -45,7 +45,6 @@ LLFloaterBump::LLFloaterBump(const LLSD& key) : LLFloater(key) { if(gNoRender) return; - //LLUICtrlFactory::getInstance()->buildFloater(this, "floater_bumps.xml"); } diff --git a/indra/newview/llfloaterbuy.cpp b/indra/newview/llfloaterbuy.cpp index 32add57737..f46a2be0fa 100644 --- a/indra/newview/llfloaterbuy.cpp +++ b/indra/newview/llfloaterbuy.cpp @@ -51,7 +51,6 @@ LLFloaterBuy::LLFloaterBuy(const LLSD& key) : LLFloater(key) { -// LLUICtrlFactory::getInstance()->buildFloater(this, "floater_buy_object.xml"); } BOOL LLFloaterBuy::postBuild() diff --git a/indra/newview/llfloaterbuycontents.cpp b/indra/newview/llfloaterbuycontents.cpp index 77fb5590df..a7388d21a3 100644 --- a/indra/newview/llfloaterbuycontents.cpp +++ b/indra/newview/llfloaterbuycontents.cpp @@ -41,6 +41,7 @@ #include "llinventorydefines.h" #include "llinventoryfunctions.h" #include "llinventorymodel.h" // for gInventory +#include "llfirstuse.h" #include "llfloaterreg.h" #include "llfloaterinventory.h" // for LLInventoryIcon::getIcon #include "llnotificationsutil.h" @@ -54,7 +55,6 @@ LLFloaterBuyContents::LLFloaterBuyContents(const LLSD& key) : LLFloater(key) { -// LLUICtrlFactory::getInstance()->buildFloater(this, "floater_buy_contents.xml"); } BOOL LLFloaterBuyContents::postBuild() @@ -284,6 +284,10 @@ void LLFloaterBuyContents::onClickBuy() // it doesn't match region info then sale is canceled. LLSelectMgr::getInstance()->sendBuy(gAgent.getID(), category_id, mSaleInfo); + // NOTE: do this here instead of on receipt of object, since contents are transfered + // via a generic BulkUpdateInventory message with no way of distinguishing it from + // other inventory operations + LLFirstUse::newInventory(); closeFloater(); } diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp index 69824b3843..a54df32c62 100644 --- a/indra/newview/llfloaterbuyland.cpp +++ b/indra/newview/llfloaterbuyland.cpp @@ -293,8 +293,7 @@ LLFloaterBuyLandUI::LLFloaterBuyLandUI(const LLSD& key) mParcelBuyInfo(0) { LLViewerParcelMgr::getInstance()->addObserver(&mParcelSelectionObserver); - -// LLUICtrlFactory::getInstance()->buildFloater(sInstance, "floater_buy_land.xml"); + } LLFloaterBuyLandUI::~LLFloaterBuyLandUI() diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp index d4067452b0..ad24c6534a 100644 --- a/indra/newview/llfloatercamera.cpp +++ b/indra/newview/llfloatercamera.cpp @@ -345,7 +345,7 @@ BOOL LLFloaterCamera::postBuild() setTitleVisible(TRUE); // restore title visibility after chrome applying mRotate = getChild<LLJoystickCameraRotate>(ORBIT); - mZoom = getChild<LLPanelCameraZoom>(ZOOM); + mZoom = findChild<LLPanelCameraZoom>(ZOOM); mTrack = getChild<LLJoystickCameraTrack>(PAN); assignButton2Mode(CAMERA_CTRL_MODE_MODES, "avatarview_btn"); diff --git a/indra/newview/llfloatercolorpicker.cpp b/indra/newview/llfloatercolorpicker.cpp index 89e745f651..4201ae1da1 100644 --- a/indra/newview/llfloatercolorpicker.cpp +++ b/indra/newview/llfloatercolorpicker.cpp @@ -107,9 +107,6 @@ LLFloaterColorPicker::LLFloaterColorPicker (LLColorSwatchCtrl* swatch, BOOL show mCanApplyImmediately ( show_apply_immediate ), mContextConeOpacity ( 0.f ) { - // build the majority of the gui using the factory builder - LLUICtrlFactory::getInstance()->buildFloater ( this, "floater_color_picker.xml", NULL ); - // create user interface for this picker createUI (); diff --git a/indra/newview/llfloaterdaycycle.cpp b/indra/newview/llfloaterdaycycle.cpp index aacb543267..22816ee802 100644 --- a/indra/newview/llfloaterdaycycle.cpp +++ b/indra/newview/llfloaterdaycycle.cpp @@ -59,7 +59,6 @@ const F32 LLFloaterDayCycle::sHoursPerDay = 24.0f; LLFloaterDayCycle::LLFloaterDayCycle(const LLSD& key) : LLFloater(key) { - //LLUICtrlFactory::getInstance()->buildFloater(this, "floater_day_cycle_options.xml"); } BOOL LLFloaterDayCycle::postBuild() diff --git a/indra/newview/llfloaterenvsettings.cpp b/indra/newview/llfloaterenvsettings.cpp index 337d4934e1..fcaef1f34b 100644 --- a/indra/newview/llfloaterenvsettings.cpp +++ b/indra/newview/llfloaterenvsettings.cpp @@ -50,7 +50,6 @@ LLFloaterEnvSettings::LLFloaterEnvSettings(const LLSD& key) : LLFloater(key) { - //LLUICtrlFactory::getInstance()->buildFloater(this, "floater_env_settings.xml"); } // virtual LLFloaterEnvSettings::~LLFloaterEnvSettings() diff --git a/indra/newview/llfloatergodtools.cpp b/indra/newview/llfloatergodtools.cpp index f95112a8ab..2dbe324586 100644 --- a/indra/newview/llfloatergodtools.cpp +++ b/indra/newview/llfloatergodtools.cpp @@ -121,8 +121,6 @@ LLFloaterGodTools::LLFloaterGodTools(const LLSD& key) mFactoryMap["region"] = LLCallbackMap(createPanelRegion, this); mFactoryMap["objects"] = LLCallbackMap(createPanelObjects, this); mFactoryMap["request"] = LLCallbackMap(createPanelRequest, this); -// LLUICtrlFactory::getInstance()->buildFloater(this, "floater_god_tools.xml"); - } BOOL LLFloaterGodTools::postBuild() diff --git a/indra/newview/llfloatergroups.cpp b/indra/newview/llfloatergroups.cpp index 3cd2154531..234a09d157 100644 --- a/indra/newview/llfloatergroups.cpp +++ b/indra/newview/llfloatergroups.cpp @@ -338,11 +338,10 @@ void LLPanelGroups::onGroupList(LLUICtrl* ctrl, void* userdata) if(self) self->enableButtons(); } -void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id, U64 powers_mask) +void init_group_list(LLScrollListCtrl* group_list, const LLUUID& highlight_id, U64 powers_mask) { S32 count = gAgent.mGroups.count(); LLUUID id; - LLCtrlListInterface *group_list = ctrl->getListInterface(); if (!group_list) return; group_list->operateOnAll(LLCtrlListInterface::OP_DELETE); @@ -366,10 +365,12 @@ void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id, U64 pow element["columns"][0]["font"]["name"] = "SANSSERIF"; element["columns"][0]["font"]["style"] = style; - group_list->addElement(element, ADD_SORTED); + group_list->addElement(element); } } + group_list->sortOnce(0, TRUE); + // add "none" to list at top { std::string style = "NORMAL"; diff --git a/indra/newview/llfloaterhardwaresettings.cpp b/indra/newview/llfloaterhardwaresettings.cpp index 2985626bd7..77af054522 100644 --- a/indra/newview/llfloaterhardwaresettings.cpp +++ b/indra/newview/llfloaterhardwaresettings.cpp @@ -56,7 +56,6 @@ LLFloaterHardwareSettings::LLFloaterHardwareSettings(const LLSD& key) mFogRatio(0.0), mProbeHardwareOnStartup(FALSE) { - //LLUICtrlFactory::getInstance()->buildFloater(this, "floater_hardware_settings.xml"); } LLFloaterHardwareSettings::~LLFloaterHardwareSettings() diff --git a/indra/newview/llfloaterhud.cpp b/indra/newview/llfloaterhud.cpp index 8fc0598248..4181d1906e 100644 --- a/indra/newview/llfloaterhud.cpp +++ b/indra/newview/llfloaterhud.cpp @@ -54,8 +54,6 @@ LLFloaterHUD::LLFloaterHUD(const LLSD& key) return; } - //LLUICtrlFactory::getInstance()->buildFloater(this, "floater_hud.xml"); - // Don't grab the focus as it will impede performing in-world actions // while using the HUD setIsChrome(TRUE); diff --git a/indra/newview/llfloaterinspect.cpp b/indra/newview/llfloaterinspect.cpp index 8e7f7e083c..691f1b206c 100644 --- a/indra/newview/llfloaterinspect.cpp +++ b/indra/newview/llfloaterinspect.cpp @@ -47,7 +47,6 @@ LLFloaterInspect::LLFloaterInspect(const LLSD& key) : LLFloater(key), mDirty(FALSE) { - //LLUICtrlFactory::getInstance()->buildFloater(this, "floater_inspect.xml"); mCommitCallbackRegistrar.add("Inspect.OwnerProfile", boost::bind(&LLFloaterInspect::onClickOwnerProfile, this)); mCommitCallbackRegistrar.add("Inspect.CreatorProfile", boost::bind(&LLFloaterInspect::onClickCreatorProfile, this)); mCommitCallbackRegistrar.add("Inspect.SelectObject", boost::bind(&LLFloaterInspect::onSelectObject, this)); diff --git a/indra/newview/llfloaterinventory.cpp b/indra/newview/llfloaterinventory.cpp index 0891023a6d..df769bdd88 100644 --- a/indra/newview/llfloaterinventory.cpp +++ b/indra/newview/llfloaterinventory.cpp @@ -54,7 +54,7 @@ LLFloaterInventory::~LLFloaterInventory() BOOL LLFloaterInventory::postBuild() { - mPanelMainInventory = getChild<LLPanelMainInventory>("Inventory Panel"); + mPanelMainInventory = findChild<LLPanelMainInventory>("Inventory Panel"); return TRUE; } diff --git a/indra/newview/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp index e1994bb8bc..c37798c330 100644 --- a/indra/newview/llfloaterjoystick.cpp +++ b/indra/newview/llfloaterjoystick.cpp @@ -44,8 +44,6 @@ LLFloaterJoystick::LLFloaterJoystick(const LLSD& data) : LLFloater(data) { - //Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this, "floater_joystick.xml"); - initFromSettings(); } diff --git a/indra/newview/llfloaterlagmeter.cpp b/indra/newview/llfloaterlagmeter.cpp index a92273521f..68b1770bb2 100644 --- a/indra/newview/llfloaterlagmeter.cpp +++ b/indra/newview/llfloaterlagmeter.cpp @@ -47,7 +47,6 @@ const std::string LAG_GOOD_IMAGE_NAME = "lag_status_good.tga"; LLFloaterLagMeter::LLFloaterLagMeter(const LLSD& key) : LLFloater(key) { -// LLUICtrlFactory::getInstance()->buildFloater(this, "floater_lagmeter.xml"); mCommitCallbackRegistrar.add("LagMeter.ClickShrink", boost::bind(&LLFloaterLagMeter::onClickShrink, this)); } diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 2f080ab334..df0d22561e 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -248,8 +248,6 @@ LLFloaterLand::LLFloaterLand(const LLSD& seed) mFactoryMap["land_media_panel"] = LLCallbackMap(createPanelLandMedia, this); mFactoryMap["land_access_panel"] = LLCallbackMap(createPanelLandAccess, this); - //LLUICtrlFactory::getInstance()->buildFloater(this, "floater_about_land.xml", false); - sObserver = new LLParcelSelectionObserver(); LLViewerParcelMgr::getInstance()->addObserver( sObserver ); } @@ -2434,7 +2432,7 @@ void LLPanelLandAccess::refresh() suffix.append(" " + parent_floater->getString("Remaining") + ")"); } if (mListAccess) - mListAccess->addNameItem(entry.mID, ADD_SORTED, TRUE, suffix); + mListAccess->addNameItem(entry.mID, ADD_DEFAULT, TRUE, suffix); } } @@ -2475,7 +2473,7 @@ void LLPanelLandAccess::refresh() } suffix.append(" " + parent_floater->getString("Remaining") + ")"); } - mListBanned->addNameItem(entry.mID, ADD_SORTED, TRUE, suffix); + mListBanned->addNameItem(entry.mID, ADD_DEFAULT, TRUE, suffix); } } diff --git a/indra/newview/llfloaterlandholdings.cpp b/indra/newview/llfloaterlandholdings.cpp index 31f20fbd29..98e9b74278 100644 --- a/indra/newview/llfloaterlandholdings.cpp +++ b/indra/newview/llfloaterlandholdings.cpp @@ -60,7 +60,6 @@ LLFloaterLandHoldings::LLFloaterLandHoldings(const LLSD& key) mSortColumn(""), mSortAscending(TRUE) { -// LLUICtrlFactory::getInstance()->buildFloater(floater, "floater_land_holdings.xml"); } BOOL LLFloaterLandHoldings::postBuild() @@ -69,10 +68,9 @@ BOOL LLFloaterLandHoldings::postBuild() childSetAction("Show on Map", onClickMap, this); // Grant list - getChild<LLScrollListCtrl>("grant list")->setDoubleClickCallback(onGrantList, this); - - LLCtrlListInterface *list = childGetListInterface("grant list"); - if (!list) return TRUE; + LLScrollListCtrl* grant_list = getChild<LLScrollListCtrl>("grant list"); + grant_list->sortByColumnIndex(0, TRUE); + grant_list->setDoubleClickCallback(onGrantList, this); S32 count = gAgent.mGroups.count(); for(S32 i = 0; i < count; ++i) @@ -91,7 +89,7 @@ BOOL LLFloaterLandHoldings::postBuild() element["columns"][1]["value"] = areastr; element["columns"][1]["font"] = "SANSSERIF"; - list->addElement(element, ADD_SORTED); + grant_list->addElement(element); } center(); diff --git a/indra/newview/llfloatermap.cpp b/indra/newview/llfloatermap.cpp index 0f8b709f29..8da67f5b9b 100644 --- a/indra/newview/llfloatermap.cpp +++ b/indra/newview/llfloatermap.cpp @@ -69,7 +69,6 @@ LLFloaterMap::LLFloaterMap(const LLSD& key) mTextBoxSouthWest(NULL), mMap(NULL) { - //Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this, "floater_map.xml", FALSE); } LLFloaterMap::~LLFloaterMap() diff --git a/indra/newview/llfloatermediabrowser.cpp b/indra/newview/llfloatermediabrowser.cpp index 434d0681ab..5d0df1f037 100644 --- a/indra/newview/llfloatermediabrowser.cpp +++ b/indra/newview/llfloatermediabrowser.cpp @@ -53,8 +53,54 @@ LLFloaterMediaBrowser::LLFloaterMediaBrowser(const LLSD& key) : LLFloater(key) { -// LLUICtrlFactory::getInstance()->buildFloater(this, "floater_media_browser.xml"); +} +//static +void LLFloaterMediaBrowser::create(const std::string &url, const std::string& target) +{ + std::string tag = target; + + if(target.empty() || target == "_blank") + { + // create a unique tag for this instance + LLUUID id; + id.generate(); + tag = id.asString(); + } + + S32 browser_window_limit = gSavedSettings.getS32("MediaBrowserWindowLimit"); + + if(LLFloaterReg::findInstance("media_browser", tag) != NULL) + { + // There's already a media browser for this tag, so we won't be opening a new window. + } + else if(browser_window_limit != 0) + { + // showInstance will open a new window. Figure out how many media browsers are already open, + // and close the least recently opened one if this will put us over the limit. + + LLFloaterReg::const_instance_list_t &instances = LLFloaterReg::getFloaterList("media_browser"); + lldebugs << "total instance count is " << instances.size() << llendl; + + for(LLFloaterReg::const_instance_list_t::const_iterator iter = instances.begin(); iter != instances.end(); iter++) + { + lldebugs << " " << (*iter)->getKey() << llendl; + } + + if(instances.size() >= (size_t)browser_window_limit) + { + // Destroy the least recently opened instance + (*instances.begin())->closeFloater(); + } + } + + LLFloaterMediaBrowser *browser = dynamic_cast<LLFloaterMediaBrowser*> (LLFloaterReg::showInstance("media_browser", tag)); + llassert(browser); + if(browser) + { + // tell the browser instance to load the specified URL + browser->openMedia(url); + } } void LLFloaterMediaBrowser::draw() @@ -99,6 +145,7 @@ BOOL LLFloaterMediaBrowser::postBuild() mAddressCombo = getChild<LLComboBox>("address"); mAddressCombo->setCommitCallback(onEnterAddress, this); + mAddressCombo->sortByName(); childSetAction("back", onClickBack, this); childSetAction("forward", onClickForward, this); @@ -170,6 +217,11 @@ void LLFloaterMediaBrowser::handleMediaEvent(LLPluginClassMedia* self, EMediaEve getChildView("back")->setEnabled(self->getHistoryBackAvailable()); getChildView("forward")->setEnabled(self->getHistoryForwardAvailable()); } + else if(event == MEDIA_EVENT_CLOSE_REQUEST) + { + // The browser instance wants its window closed. + closeFloater(); + } } void LLFloaterMediaBrowser::setCurrentURL(const std::string& url) { @@ -179,7 +231,7 @@ void LLFloaterMediaBrowser::setCurrentURL(const std::string& url) if (mCurrentURL != "about:blank") { mAddressCombo->remove(mCurrentURL); - mAddressCombo->add(mCurrentURL, ADD_SORTED); + mAddressCombo->add(mCurrentURL); mAddressCombo->selectByValue(mCurrentURL); // Serialize url history @@ -191,12 +243,6 @@ void LLFloaterMediaBrowser::setCurrentURL(const std::string& url) getChildView("reload")->setEnabled(TRUE); } -void LLFloaterMediaBrowser::onOpen(const LLSD& media_url) -{ - LLFloater::onOpen(media_url); - openMedia(media_url.asString()); -} - //static void LLFloaterMediaBrowser::onEnterAddress(LLUICtrl* ctrl, void* user_data) { diff --git a/indra/newview/llfloatermediabrowser.h b/indra/newview/llfloatermediabrowser.h index ffd8be4461..ee4aef814f 100644 --- a/indra/newview/llfloatermediabrowser.h +++ b/indra/newview/llfloatermediabrowser.h @@ -39,12 +39,14 @@ class LLFloaterMediaBrowser : public LLViewerMediaObserver { public: + LOG_CLASS(LLFloaterMediaBrowser); LLFloaterMediaBrowser(const LLSD& key); + static void create(const std::string &url, const std::string& target); + /*virtual*/ BOOL postBuild(); /*virtual*/ void onClose(bool app_quitting); /*virtual*/ void draw(); - /*virtual*/ void onOpen(const LLSD& key); // inherited from LLViewerMediaObserver /*virtual*/ void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event); diff --git a/indra/newview/llfloaternotificationsconsole.cpp b/indra/newview/llfloaternotificationsconsole.cpp index 08475b1e55..08bab95654 100644 --- a/indra/newview/llfloaternotificationsconsole.cpp +++ b/indra/newview/llfloaternotificationsconsole.cpp @@ -37,10 +37,10 @@ const S32 NOTIFICATION_PANEL_HEADER_HEIGHT = 20; const S32 HEADER_PADDING = 38; -class LLNotificationChannelPanel : public LLPanel +class LLNotificationChannelPanel : public LLLayoutPanel { public: - LLNotificationChannelPanel(const std::string& channel_name); + LLNotificationChannelPanel(const Params& p); BOOL postBuild(); private: @@ -52,14 +52,14 @@ private: LLNotificationChannelPtr mChannelRejectsPtr; }; -LLNotificationChannelPanel::LLNotificationChannelPanel(const std::string& channel_name) - : LLPanel() +LLNotificationChannelPanel::LLNotificationChannelPanel(const LLNotificationChannelPanel::Params& p) +: LLLayoutPanel(p) { - mChannelPtr = LLNotifications::instance().getChannel(channel_name); + mChannelPtr = LLNotifications::instance().getChannel(p.name); mChannelRejectsPtr = LLNotificationChannelPtr( - LLNotificationChannel::buildChannel(channel_name + "rejects", mChannelPtr->getParentChannelName(), + LLNotificationChannel::buildChannel(p.name() + "rejects", mChannelPtr->getParentChannelName(), !boost::bind(mChannelPtr->getFilter(), _1))); - LLUICtrlFactory::instance().buildPanel(this, "panel_notifications_channel.xml"); + buildFromFile( "panel_notifications_channel.xml"); } BOOL LLNotificationChannelPanel::postBuild() @@ -167,8 +167,6 @@ LLFloaterNotificationConsole::LLFloaterNotificationConsole(const LLSD& key) : LLFloater(key) { mCommitCallbackRegistrar.add("ClickAdd", boost::bind(&LLFloaterNotificationConsole::onClickAdd, this)); - - //LLUICtrlFactory::instance().buildFloater(this, "floater_notifications_console.xml"); } BOOL LLFloaterNotificationConsole::postBuild() @@ -203,8 +201,13 @@ BOOL LLFloaterNotificationConsole::postBuild() void LLFloaterNotificationConsole::addChannel(const std::string& name, bool open) { LLLayoutStack& stack = getChildRef<LLLayoutStack>("notification_channels"); - LLNotificationChannelPanel* panelp = new LLNotificationChannelPanel(name); - stack.addPanel(panelp, 0, NOTIFICATION_PANEL_HEADER_HEIGHT, S32_MAX, S32_MAX, TRUE, TRUE, LLLayoutStack::ANIMATE); + LLNotificationChannelPanel::Params p; + p.min_dim = NOTIFICATION_PANEL_HEADER_HEIGHT; + p.auto_resize = true; + p.user_resize = true; + p.name = name; + LLNotificationChannelPanel* panelp = new LLNotificationChannelPanel(p); + stack.addPanel(panelp, LLLayoutStack::ANIMATE); LLButton& header_button = panelp->getChildRef<LLButton>("header"); header_button.setToggleState(!open); @@ -248,7 +251,6 @@ LLFloaterNotification::LLFloaterNotification(LLNotification* note) : LLFloater(LLSD()), mNote(note) { - LLUICtrlFactory::instance().buildFloater(this, "floater_notification.xml", NULL); } BOOL LLFloaterNotification::postBuild() diff --git a/indra/newview/llfloateropenobject.cpp b/indra/newview/llfloateropenobject.cpp index d6f6ba9e5b..8b6619def2 100644 --- a/indra/newview/llfloateropenobject.cpp +++ b/indra/newview/llfloateropenobject.cpp @@ -56,7 +56,6 @@ LLFloaterOpenObject::LLFloaterOpenObject(const LLSD& key) mPanelInventoryObject(NULL), mDirty(TRUE) { -// LLUICtrlFactory::getInstance()->buildFloater(this,"floater_openobject.xml"); mCommitCallbackRegistrar.add("OpenObject.MoveToInventory", boost::bind(&LLFloaterOpenObject::onClickMoveToInventory, this)); mCommitCallbackRegistrar.add("OpenObject.MoveAndWear", boost::bind(&LLFloaterOpenObject::onClickMoveAndWear, this)); } diff --git a/indra/newview/llfloaterperms.cpp b/indra/newview/llfloaterperms.cpp index bb851a349e..4817766790 100644 --- a/indra/newview/llfloaterperms.cpp +++ b/indra/newview/llfloaterperms.cpp @@ -37,7 +37,6 @@ LLFloaterPerms::LLFloaterPerms(const LLSD& seed) : LLFloater(seed) { - //LLUICtrlFactory::getInstance()->buildFloater(this, "floater_perm_prefs.xml"); mCommitCallbackRegistrar.add("Perms.Copy", boost::bind(&LLFloaterPerms::onCommitCopy, this)); mCommitCallbackRegistrar.add("Perms.OK", boost::bind(&LLFloaterPerms::onClickOK, this)); mCommitCallbackRegistrar.add("Perms.Cancel", boost::bind(&LLFloaterPerms::onClickCancel, this)); diff --git a/indra/newview/llfloaterpostcard.cpp b/indra/newview/llfloaterpostcard.cpp index bcdcd50288..e8e9f76912 100644 --- a/indra/newview/llfloaterpostcard.cpp +++ b/indra/newview/llfloaterpostcard.cpp @@ -76,7 +76,6 @@ LLFloaterPostcard::LLFloaterPostcard(const LLSD& key) mViewerImage(NULL), mHasFirstMsgFocus(false) { - //LLUICtrlFactory::getInstance()->buildFloater(this, "floater_postcard.xml"); } // Destroys the object diff --git a/indra/newview/llfloaterpostprocess.cpp b/indra/newview/llfloaterpostprocess.cpp index 7f27caf68f..2d61109e17 100644 --- a/indra/newview/llfloaterpostprocess.cpp +++ b/indra/newview/llfloaterpostprocess.cpp @@ -42,7 +42,6 @@ LLFloaterPostProcess::LLFloaterPostProcess(const LLSD& key) : LLFloater(key) { - //LLUICtrlFactory::getInstance()->buildFloater(this, "floater_post_process.xml"); } LLFloaterPostProcess::~LLFloaterPostProcess() diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 3804a1b858..9892b4e357 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -131,7 +131,6 @@ LLVoiceSetKeyDialog::LLVoiceSetKeyDialog(const LLSD& key) : LLModalDialog(key), mParent(NULL) { -// LLUICtrlFactory::getInstance()->buildFloater(this, "floater_select_key.xml", NULL); } //virtual @@ -820,13 +819,11 @@ void LLFloaterPreference::buildPopupLists() row["columns"][1]["font"] = "SANSSERIF_SMALL"; row["columns"][1]["width"] = 360; } - item = disabled_popups.addElement(row, - ADD_SORTED); + item = disabled_popups.addElement(row); } else { - item = enabled_popups.addElement(row, - ADD_SORTED); + item = enabled_popups.addElement(row); } if (item) diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp index e4e4713dbc..dd12fa64d3 100644 --- a/indra/newview/llfloaterproperties.cpp +++ b/indra/newview/llfloaterproperties.cpp @@ -108,8 +108,6 @@ LLFloaterProperties::LLFloaterProperties(const LLUUID& item_id) mDirty(TRUE) { mPropertiesObserver = new LLPropertiesObserver(this); - - //LLUICtrlFactory::getInstance()->buildFloater(this,"floater_inventory_item_properties.xml"); } // Destroys the object diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 29ad0f3b9c..ed81fdec16 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -161,7 +161,6 @@ LLUUID LLFloaterRegionInfo::sRequestInvoice; LLFloaterRegionInfo::LLFloaterRegionInfo(const LLSD& seed) : LLFloater(seed) { - //LLUICtrlFactory::getInstance()->buildFloater(this, "floater_region_info.xml", FALSE); } BOOL LLFloaterRegionInfo::postBuild() @@ -174,32 +173,32 @@ BOOL LLFloaterRegionInfo::postBuild() mInfoPanels.push_back(panel); panel->getCommitCallbackRegistrar().add("RegionInfo.ManageTelehub", boost::bind(&LLPanelRegionInfo::onClickManageTelehub, panel)); - LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_general.xml"); + panel->buildFromFile("panel_region_general.xml"); mTab->addTabPanel(LLTabContainer::TabPanelParams().panel(panel).select_tab(true)); panel = new LLPanelRegionDebugInfo; mInfoPanels.push_back(panel); - LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_debug.xml"); + panel->buildFromFile("panel_region_debug.xml"); mTab->addTabPanel(panel); panel = new LLPanelRegionTextureInfo; mInfoPanels.push_back(panel); - LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_texture.xml"); + panel->buildFromFile("panel_region_texture.xml"); mTab->addTabPanel(panel); panel = new LLPanelRegionTerrainInfo; mInfoPanels.push_back(panel); - LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_terrain.xml"); + panel->buildFromFile("panel_region_terrain.xml"); mTab->addTabPanel(panel); panel = new LLPanelEstateInfo; mInfoPanels.push_back(panel); - LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_estate.xml"); + panel->buildFromFile("panel_region_estate.xml"); mTab->addTabPanel(panel); panel = new LLPanelEstateCovenant; mInfoPanels.push_back(panel); - LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_covenant.xml"); + panel->buildFromFile("panel_region_covenant.xml"); mTab->addTabPanel(panel); gMessageSystem->setHandlerFunc( diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index 97f192a708..66d7e804ea 100644 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -103,7 +103,6 @@ LLFloaterReporter::LLFloaterReporter(const LLSD& key) mCopyrightWarningSeen( FALSE ), mResourceDatap(new LLResourceData()) { - //LLUICtrlFactory::getInstance()->buildFloater(this, "floater_report_abuse.xml"); } // static diff --git a/indra/newview/llfloaterscriptdebug.cpp b/indra/newview/llfloaterscriptdebug.cpp index 118dea2c74..a0d1a32e12 100644 --- a/indra/newview/llfloaterscriptdebug.cpp +++ b/indra/newview/llfloaterscriptdebug.cpp @@ -52,8 +52,6 @@ LLFloaterScriptDebug::LLFloaterScriptDebug(const LLSD& key) : LLMultiFloater(key) { -// LLUICtrlFactory::getInstance()->buildFloater(this, "floater_script_debug.xml"); - // avoid resizing of the window to match // the initial size of the tabbed-childs, whenever a tab is opened or closed mAutoResize = FALSE; @@ -141,8 +139,6 @@ LLFloaterScriptDebugOutput::LLFloaterScriptDebugOutput(const LLSD& object_id) : LLFloater(LLSD(object_id)), mObjectID(object_id.asUUID()) { - //LLUICtrlFactory::getInstance()->buildFloater(this, "floater_script_debug_panel.xml"); - // enabled autocous blocks controling focus via LLFloaterReg::showInstance setAutoFocus(FALSE); } diff --git a/indra/newview/llfloaterscriptlimits.cpp b/indra/newview/llfloaterscriptlimits.cpp index 571f26e09f..cd792c263c 100644 --- a/indra/newview/llfloaterscriptlimits.cpp +++ b/indra/newview/llfloaterscriptlimits.cpp @@ -115,7 +115,7 @@ BOOL LLFloaterScriptLimits::postBuild() LLPanelScriptLimitsRegionMemory* panel_memory; panel_memory = new LLPanelScriptLimitsRegionMemory; mInfoPanels.push_back(panel_memory); - LLUICtrlFactory::getInstance()->buildPanel(panel_memory, "panel_script_limits_region_memory.xml"); + panel_memory->buildFromFile( "panel_script_limits_region_memory.xml"); mTab->addTabPanel(panel_memory); } @@ -124,7 +124,7 @@ BOOL LLFloaterScriptLimits::postBuild() { LLPanelScriptLimitsAttachment* panel_attachments = new LLPanelScriptLimitsAttachment; mInfoPanels.push_back(panel_attachments); - LLUICtrlFactory::getInstance()->buildPanel(panel_attachments, "panel_script_limits_my_avatar.xml"); + panel_attachments->buildFromFile("panel_script_limits_my_avatar.xml"); mTab->addTabPanel(panel_attachments); } @@ -706,38 +706,44 @@ void LLPanelScriptLimitsRegionMemory::setRegionDetails(LLSD content) } } - LLSD element; + LLScrollListItem::Params item_params; + item_params.value = task_id; - element["id"] = task_id; - element["columns"][0]["column"] = "size"; - element["columns"][0]["value"] = llformat("%d", size); - element["columns"][0]["font"] = "SANSSERIF"; - element["columns"][1]["column"] = "urls"; - element["columns"][1]["value"] = llformat("%d", urls); - element["columns"][1]["font"] = "SANSSERIF"; - element["columns"][2]["column"] = "name"; - element["columns"][2]["value"] = name_buf; - element["columns"][2]["font"] = "SANSSERIF"; - element["columns"][3]["column"] = "owner"; - element["columns"][3]["value"] = owner_buf; - element["columns"][3]["font"] = "SANSSERIF"; - element["columns"][4]["column"] = "parcel"; - element["columns"][4]["value"] = parcel_name; - element["columns"][4]["font"] = "SANSSERIF"; - element["columns"][5]["column"] = "location"; - if(has_locations) - { - element["columns"][5]["value"] = llformat("<%0.1f,%0.1f,%0.1f>", location_x, location_y, location_z); - } - else - { - element["columns"][5]["value"] = ""; - } - element["columns"][5]["font"] = "SANSSERIF"; + LLScrollListCell::Params cell_params; + cell_params.font = LLFontGL::getFontSansSerif(); + + cell_params.column = "size"; + cell_params.value = size; + item_params.columns.add(cell_params); + + cell_params.column = "urls"; + cell_params.value = urls; + item_params.columns.add(cell_params); + + cell_params.column = "name"; + cell_params.value = name_buf; + item_params.columns.add(cell_params); - list->addElement(element, ADD_SORTED); + cell_params.column = "owner"; + cell_params.value = owner_buf; + item_params.columns.add(cell_params); + + cell_params.column = "parcel"; + cell_params.value = parcel_name; + item_params.columns.add(cell_params); + + cell_params.column = "location"; + cell_params.value = has_locations + ? llformat("<%0.1f,%0.1f,%0.1f>", location_x, location_y, location_z) + : ""; + item_params.columns.add(cell_params); + + list->addRow(item_params); + LLSD element; element["owner_id"] = owner_id; + + element["id"] = task_id; element["local_id"] = local_id; mObjectListItems.push_back(element); } diff --git a/indra/newview/llfloatersettingsdebug.cpp b/indra/newview/llfloatersettingsdebug.cpp index 41a05055fe..71882fbb83 100644 --- a/indra/newview/llfloatersettingsdebug.cpp +++ b/indra/newview/llfloatersettingsdebug.cpp @@ -39,7 +39,6 @@ LLFloaterSettingsDebug::LLFloaterSettingsDebug(const LLSD& key) : LLFloater(key) { - //LLUICtrlFactory::getInstance()->buildFloater(this, "floater_settings_debug.xml"); mCommitCallbackRegistrar.add("SettingSelect", boost::bind(&LLFloaterSettingsDebug::onSettingSelect, this,_1)); mCommitCallbackRegistrar.add("CommitSettings", boost::bind(&LLFloaterSettingsDebug::onCommitSettings, this)); mCommitCallbackRegistrar.add("ClickDefault", boost::bind(&LLFloaterSettingsDebug::onClickDefault, this)); diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index f58f704ff2..5f97d9d9e4 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -2070,7 +2070,6 @@ LLFloaterSnapshot::LLFloaterSnapshot(const LLSD& key) : LLFloater(key), impl (*(new Impl)) { - //Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this, "floater_snapshot.xml", FALSE); } // Destroys the object diff --git a/indra/newview/llfloatertelehub.cpp b/indra/newview/llfloatertelehub.cpp index d945f1a2de..b845fd132d 100644 --- a/indra/newview/llfloatertelehub.cpp +++ b/indra/newview/llfloatertelehub.cpp @@ -51,7 +51,6 @@ LLFloaterTelehub::LLFloaterTelehub(const LLSD& key) mTelehubRot(), mNumSpawn(0) { - //LLUICtrlFactory::getInstance()->buildFloater(sInstance, "floater_telehub.xml"); } BOOL LLFloaterTelehub::postBuild() diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index 58a0d08c7d..370bf05bf7 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -350,7 +350,6 @@ LLFloaterTools::LLFloaterTools(const LLSD& key) mFactoryMap["Contents"] = LLCallbackMap(createPanelContents, this);//LLPanelContents mFactoryMap["land info panel"] = LLCallbackMap(createPanelLandInfo, this);//LLPanelLandInfo - //Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this,"floater_tools.xml",FALSE); mCommitCallbackRegistrar.add("BuildTool.setTool", boost::bind(&LLFloaterTools::setTool,this, _2)); mCommitCallbackRegistrar.add("BuildTool.commitZoom", boost::bind(&commit_slider_zoom, _1)); mCommitCallbackRegistrar.add("BuildTool.commitRadioFocus", boost::bind(&commit_radio_group_focus, _1)); diff --git a/indra/newview/llfloatertopobjects.cpp b/indra/newview/llfloatertopobjects.cpp index a984dd1d51..099b657c7c 100644 --- a/indra/newview/llfloatertopobjects.cpp +++ b/indra/newview/llfloatertopobjects.cpp @@ -64,7 +64,6 @@ void LLFloaterTopObjects::show() } sInstance = new LLFloaterTopObjects(); -// LLUICtrlFactory::getInstance()->buildFloater(sInstance, "floater_top_objects.xml"); sInstance->center(); } */ diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp index 333e44e077..5dc8067648 100644 --- a/indra/newview/llfloateruipreview.cpp +++ b/indra/newview/llfloateruipreview.cpp @@ -394,7 +394,6 @@ LLFloaterUIPreview::LLFloaterUIPreview(const LLSD& key) mLastDisplayedX(0), mLastDisplayedY(0) { - // called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this, "floater_ui_preview.xml"); } // Destructor @@ -832,7 +831,7 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID, bool save) if (save) { LLXMLNodePtr floater_write = new LLXMLNode(); - LLUICtrlFactory::getInstance()->buildFloater(*floaterp, path, floater_write); // just build it + (*floaterp)->buildFromFile(path, floater_write); // just build it if (!floater_write->isNull()) { @@ -846,7 +845,7 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID, bool save) } else { - LLUICtrlFactory::getInstance()->buildFloater(*floaterp, path, NULL); // just build it + (*floaterp)->buildFromFile(path); // just build it (*floaterp)->openFloater((*floaterp)->getKey()); (*floaterp)->setCanResize((*floaterp)->isResizable()); } @@ -885,7 +884,7 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID, bool save) if (save) { LLXMLNodePtr panel_write = new LLXMLNode(); - LLUICtrlFactory::getInstance()->buildPanel(panel, path, panel_write); // build it + panel->buildFromFile(path, panel_write); // build it if (!panel_write->isNull()) { @@ -899,7 +898,7 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID, bool save) } else { - LLUICtrlFactory::getInstance()->buildPanel(panel, path); // build it + panel->buildFromFile(path); // build it LLRect new_size = panel->getRect(); // get its rectangle panel->setOrigin(0,0); // reset its origin point so it's not offset by -left or other XUI attributes (*floaterp)->setTitle(path); // use the file name as its title, since panels have no guaranteed meaningful name attribute diff --git a/indra/newview/llfloaterurlentry.cpp b/indra/newview/llfloaterurlentry.cpp index 40f6d07286..151cd2a1cd 100644 --- a/indra/newview/llfloaterurlentry.cpp +++ b/indra/newview/llfloaterurlentry.cpp @@ -82,7 +82,7 @@ LLFloaterURLEntry::LLFloaterURLEntry(LLHandle<LLPanel> parent) : LLFloater(LLSD()), mPanelLandMediaHandle(parent) { - LLUICtrlFactory::getInstance()->buildFloater(this, "floater_url_entry.xml", NULL); + buildFromFile("floater_url_entry.xml"); } //----------------------------------------------------------------------------- diff --git a/indra/newview/llfloatervoicedevicesettings.cpp b/indra/newview/llfloatervoicedevicesettings.cpp index 34277001ee..fa863653b4 100644 --- a/indra/newview/llfloatervoicedevicesettings.cpp +++ b/indra/newview/llfloatervoicedevicesettings.cpp @@ -332,7 +332,6 @@ LLFloaterVoiceDeviceSettings::LLFloaterVoiceDeviceSettings(const LLSD& seed) mFactoryMap["device_settings"] = LLCallbackMap(createPanelVoiceDeviceSettings, this); // do not automatically open singleton floaters (as result of getInstance()) // BOOL no_open = FALSE; -// Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this, "floater_device_settings.xml", no_open); } BOOL LLFloaterVoiceDeviceSettings::postBuild() { diff --git a/indra/newview/llfloaterwater.cpp b/indra/newview/llfloaterwater.cpp index 9c3f943013..be4b144f41 100644 --- a/indra/newview/llfloaterwater.cpp +++ b/indra/newview/llfloaterwater.cpp @@ -63,7 +63,6 @@ std::set<std::string> LLFloaterWater::sDefaultPresets; LLFloaterWater::LLFloaterWater(const LLSD& key) : LLFloater(key) { - //LLUICtrlFactory::getInstance()->buildFloater(this, "floater_water.xml"); } LLFloaterWater::~LLFloaterWater() diff --git a/indra/newview/llfloaterwhitelistentry.cpp b/indra/newview/llfloaterwhitelistentry.cpp index 7c618e788f..2a499f681b 100644 --- a/indra/newview/llfloaterwhitelistentry.cpp +++ b/indra/newview/llfloaterwhitelistentry.cpp @@ -41,7 +41,6 @@ LLFloaterWhiteListEntry::LLFloaterWhiteListEntry( const LLSD& key ) : LLFloater(key) { -// LLUICtrlFactory::getInstance()->buildFloater(this, "floater_whitelist_entry.xml"); } /////////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llfloaterwindlight.cpp b/indra/newview/llfloaterwindlight.cpp index 7131cb5de3..ae98b2cf99 100644 --- a/indra/newview/llfloaterwindlight.cpp +++ b/indra/newview/llfloaterwindlight.cpp @@ -66,7 +66,6 @@ static const F32 WL_SUN_AMBIENT_SLIDER_SCALE = 3.0f; LLFloaterWindLight::LLFloaterWindLight(const LLSD& key) : LLFloater(key) { - //LLUICtrlFactory::getInstance()->buildFloater(this, "floater_windlight_options.xml"); } LLFloaterWindLight::~LLFloaterWindLight() diff --git a/indra/newview/llfloaterwindowsize.cpp b/indra/newview/llfloaterwindowsize.cpp index 105efae032..a70f2af11a 100644 --- a/indra/newview/llfloaterwindowsize.cpp +++ b/indra/newview/llfloaterwindowsize.cpp @@ -80,7 +80,6 @@ public: LLFloaterWindowSize::LLFloaterWindowSize(const LLSD& key) : LLFloater(key) { - //LLUICtrlFactory::getInstance()->buildFloater(this, "floater_window_size.xml"); } LLFloaterWindowSize::~LLFloaterWindowSize() diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index 3afa31b873..7236894542 100644 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -199,7 +199,6 @@ LLFloaterWorldMap::LLFloaterWorldMap(const LLSD& key) mFactoryMap["objects_mapview"] = LLCallbackMap(createWorldMapView, NULL); - //Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this, "floater_world_map.xml", FALSE); mCommitCallbackRegistrar.add("WMap.Coordinates", boost::bind(&LLFloaterWorldMap::onCoordinatesCommit, this)); mCommitCallbackRegistrar.add("WMap.Location", boost::bind(&LLFloaterWorldMap::onLocationCommit, this)); mCommitCallbackRegistrar.add("WMap.AvatarCombo", boost::bind(&LLFloaterWorldMap::onAvatarComboCommit, this)); diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp index 4f9d51ce58..c3e6e1c2dc 100644 --- a/indra/newview/llgrouplist.cpp +++ b/indra/newview/llgrouplist.cpp @@ -283,7 +283,7 @@ mGroupNameBox(NULL), mInfoBtn(NULL), mGroupID(LLUUID::null) { - LLUICtrlFactory::getInstance()->buildPanel(this, "panel_group_list_item.xml"); + buildFromFile( "panel_group_list_item.xml"); // Remember group icon width including its padding from the name text box, // so that we can hide and show the icon again later. diff --git a/indra/newview/llhints.cpp b/indra/newview/llhints.cpp new file mode 100644 index 0000000000..a90131499d --- /dev/null +++ b/indra/newview/llhints.cpp @@ -0,0 +1,347 @@ +/** + * @file llhints.cpp + * @brief Hint popups for displaying context sensitive help in a UI overlay + * + * $LicenseInfo:firstyear=2000&license=viewergpl$ + * + * Copyright (c) 2000-2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + + +#include "llviewerprecompiledheaders.h" // must be first include + +#include "llhints.h" + +#include "llbutton.h" +#include "lltextbox.h" +#include "llviewerwindow.h" +#include "llsdparam.h" + +class LLHintPopup : public LLPanel +{ +public: + + typedef enum e_popup_direction + { + LEFT, + TOP, + RIGHT, + BOTTOM + } EPopupDirection; + + struct PopupDirections : public LLInitParam::TypeValuesHelper<LLHintPopup::EPopupDirection, PopupDirections> + { + static void declareValues() + { + declare("left", LLHintPopup::LEFT); + declare("right", LLHintPopup::RIGHT); + declare("top", LLHintPopup::TOP); + declare("bottom", LLHintPopup::BOTTOM); + } + }; + + struct TargetParams : public LLInitParam::Block<TargetParams> + { + Mandatory<std::string> target; + Mandatory<EPopupDirection, PopupDirections> direction; + + TargetParams() + : target("target"), + direction("direction") + {} + }; + + struct Params : public LLInitParam::Block<Params, LLPanel::Params> + { + Mandatory<LLNotificationPtr> notification; + Optional<TargetParams> target_params; + Optional<S32> distance; + Optional<LLUIImage*> left_arrow, + up_arrow, + right_arrow, + down_arrow; + Optional<S32> left_arrow_offset, + up_arrow_offset, + right_arrow_offset, + down_arrow_offset; + Optional<F32> fade_in_time, + fade_out_time; + + Params() + : distance("distance"), + left_arrow("left_arrow"), + up_arrow("up_arrow"), + right_arrow("right_arrow"), + down_arrow("down_arrow"), + left_arrow_offset("left_arrow_offset"), + up_arrow_offset("up_arrow_offset"), + right_arrow_offset("right_arrow_offset"), + down_arrow_offset("down_arrow_offset"), + fade_in_time("fade_in_time"), + fade_out_time("fade_out_time") + {} + }; + + LLHintPopup(const Params&); + + /*virtual*/ BOOL postBuild(); + + void onClickClose() { hide(); LLNotifications::instance().cancel(mNotification); } + void draw(); + void hide() { if(!mHidden) {mHidden = true; mFadeTimer.reset();} } + +private: + LLNotificationPtr mNotification; + std::string mTarget; + EPopupDirection mDirection; + S32 mDistance; + LLUIImagePtr mArrowLeft, + mArrowUp, + mArrowRight, + mArrowDown; + S32 mArrowLeftOffset, + mArrowUpOffset, + mArrowRightOffset, + mArrowDownOffset; + LLFrameTimer mFadeTimer; + F32 mFadeInTime, + mFadeOutTime; + bool mHidden; +}; + +static LLDefaultChildRegistry::Register<LLHintPopup> r("hint_popup"); + + +LLHintPopup::LLHintPopup(const LLHintPopup::Params& p) +: mNotification(p.notification), + mDirection(TOP), + mDistance(p.distance), + mArrowLeft(p.left_arrow), + mArrowUp(p.up_arrow), + mArrowRight(p.right_arrow), + mArrowDown(p.down_arrow), + mArrowLeftOffset(p.left_arrow_offset), + mArrowUpOffset(p.up_arrow_offset), + mArrowRightOffset(p.right_arrow_offset), + mArrowDownOffset(p.down_arrow_offset), + mHidden(false), + mFadeInTime(p.fade_in_time), + mFadeOutTime(p.fade_out_time), + LLPanel(p) +{ + if (p.target_params.isProvided()) + { + mDirection = p.target_params.direction; + mTarget = p.target_params.target; + } + buildFromFile( "panel_hint.xml", NULL, p); +} + +BOOL LLHintPopup::postBuild() +{ + LLTextBox& hint_text = getChildRef<LLTextBox>("hint_text"); + hint_text.setText(mNotification->getMessage()); + + getChild<LLButton>("close")->setClickedCallback(boost::bind(&LLHintPopup::onClickClose, this)); + getChild<LLTextBox>("hint_title")->setText(mNotification->getLabel()); + + LLRect text_bounds = hint_text.getTextBoundingRect(); + S32 delta_height = text_bounds.getHeight() - hint_text.getRect().getHeight(); + reshape(getRect().getWidth(), getRect().getHeight() + delta_height); + return TRUE; +} + +void LLHintPopup::draw() +{ + F32 alpha = 1.f; + if (mHidden) + { + alpha = clamp_rescale(mFadeTimer.getElapsedTimeF32(), 0.f, mFadeOutTime, 1.f, 0.f); + if (alpha == 0.f) + { + die(); + return; + } + } + else + { + alpha = clamp_rescale(mFadeTimer.getElapsedTimeF32(), 0.f, mFadeInTime, 0.f, 1.f); + } + + { LLViewDrawContext context(alpha); + + if (mTarget.empty()) + { + // just draw contents, no arrow, in default position + LLPanel::draw(); + } + else + { + LLView* targetp = LLHints::getHintTarget(mTarget).get(); + if (!targetp) + { + // target widget is no longer valid, go away + die(); + } + else if (!targetp->isInVisibleChain()) + { + // if target is invisible, don't draw, but keep alive in case widget comes back + } + else + { + LLRect target_rect; + targetp->localRectToOtherView(targetp->getLocalRect(), &target_rect, getParent()); + + LLRect my_local_rect = getLocalRect(); + LLRect my_rect; + LLRect arrow_rect; + LLUIImagePtr arrow_imagep; + + switch(mDirection) + { + case LEFT: + my_rect.setCenterAndSize( target_rect.mLeft - (my_local_rect.getWidth() / 2 + mDistance), + target_rect.getCenterY(), + my_local_rect.getWidth(), + my_local_rect.getHeight()); + if (mArrowRight) + { + arrow_rect.setCenterAndSize(my_local_rect.mRight + mArrowRight->getWidth() / 2 + mArrowRightOffset, + my_local_rect.getCenterY(), + mArrowRight->getWidth(), + mArrowRight->getHeight()); + arrow_imagep = mArrowRight; + } + break; + case TOP: + my_rect.setCenterAndSize( target_rect.getCenterX(), + target_rect.mTop + (my_local_rect.getHeight() / 2 + mDistance), + my_local_rect.getWidth(), + my_local_rect.getHeight()); + if (mArrowDown) + { + arrow_rect.setCenterAndSize(my_local_rect.getCenterX(), + my_local_rect.mBottom - mArrowDown->getHeight() / 2 + mArrowDownOffset, + mArrowDown->getWidth(), + mArrowDown->getHeight()); + arrow_imagep = mArrowDown; + } + break; + case RIGHT: + my_rect.setCenterAndSize( target_rect.mRight + (my_local_rect.getWidth() / 2 + mDistance), + target_rect.getCenterY(), + my_local_rect.getWidth(), + my_local_rect.getHeight()); + if (mArrowLeft) + { + arrow_rect.setCenterAndSize(my_local_rect.mLeft - mArrowLeft->getWidth() / 2 + mArrowLeftOffset, + my_local_rect.getCenterY(), + mArrowLeft->getWidth(), + mArrowLeft->getHeight()); + arrow_imagep = mArrowLeft; + } + break; + case BOTTOM: + my_rect.setCenterAndSize( target_rect.getCenterX(), + target_rect.mBottom - (my_local_rect.getHeight() / 2 + mDistance), + my_local_rect.getWidth(), + my_local_rect.getHeight()); + if (mArrowUp) + { + arrow_rect.setCenterAndSize(my_local_rect.getCenterX(), + my_local_rect.mTop + mArrowUp->getHeight() / 2 + mArrowUpOffset, + mArrowUp->getWidth(), + mArrowUp->getHeight()); + arrow_imagep = mArrowUp; + } + break; + } + setShape(my_rect); + LLPanel::draw(); + + if (arrow_imagep) arrow_imagep->draw(arrow_rect, LLColor4(1.f, 1.f, 1.f, alpha)); + } + } + } +} + + +LLRegistry<std::string, LLHandle<LLView> > LLHints::sTargetRegistry; +std::map<LLNotificationPtr, class LLHintPopup*> LLHints::sHints; + +//static +void LLHints::show(LLNotificationPtr hint) +{ + LLHintPopup::Params p(LLUICtrlFactory::getDefaultParams<LLHintPopup>()); + + LLParamSDParser parser; + parser.readSD(hint->getPayload(), p, true); + p.notification = hint; + + if (p.validateBlock()) + { + LLHintPopup* popup = new LLHintPopup(p); + + sHints[hint] = popup; + + LLView* hint_holder = gViewerWindow->getHintHolder(); + if (hint_holder) + { + hint_holder->addChild(popup); + popup->centerWithin(hint_holder->getLocalRect()); + } + } +} + +void LLHints::hide(LLNotificationPtr hint) +{ + hint_map_t::iterator found_it = sHints.find(hint); + if (found_it != sHints.end()) + { + found_it->second->hide(); + sHints.erase(found_it); + } +} + +//static +void LLHints::registerHintTarget(const std::string& name, LLHandle<LLView> target) +{ + sTargetRegistry.defaultRegistrar().replace(name, target); +} + +//static +LLHandle<LLView> LLHints::getHintTarget(const std::string& name) +{ + LLHandle<LLView>* handlep = sTargetRegistry.getValue(name); + if (handlep) + { + return *handlep; + } + else + { + return LLHandle<LLView>(); + } +} diff --git a/indra/newview/llhints.h b/indra/newview/llhints.h new file mode 100644 index 0000000000..d2580df012 --- /dev/null +++ b/indra/newview/llhints.h @@ -0,0 +1,54 @@ +/** + * @file llhints.h + * @brief Hint popups for displaying context sensitive help in a UI overlay + * + * $LicenseInfo:firstyear=2000&license=viewergpl$ + * + * Copyright (c) 2000-2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LL_LLHINTS_H +#define LL_LLHINTS_H + +#include "llpanel.h" +#include "llnotifications.h" + + +class LLHints +{ +public: + static void show(LLNotificationPtr hint); + static void hide(LLNotificationPtr hint); + static void registerHintTarget(const std::string& name, LLHandle<LLView> target); + static LLHandle<LLView> getHintTarget(const std::string& name); +private: + static LLRegistry<std::string, LLHandle<LLView> > sTargetRegistry; + typedef std::map<LLNotificationPtr, class LLHintPopup*> hint_map_t; + static hint_map_t sHints; +}; + + +#endif diff --git a/indra/newview/llhudview.cpp b/indra/newview/llhudview.cpp index 686bcfae1c..9a63e99357 100644 --- a/indra/newview/llhudview.cpp +++ b/indra/newview/llhudview.cpp @@ -50,7 +50,7 @@ const S32 HUD_ARROW_SIZE = 32; LLHUDView::LLHUDView(const LLRect& r) { - LLUICtrlFactory::getInstance()->buildPanel(this, "panel_hud.xml"); + buildFromFile( "panel_hud.xml"); setShape(r, true); } diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 658e9403d8..56d3ed1c4d 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -251,14 +251,14 @@ BOOL LLIMFloater::postBuild() } mControlPanel->setSessionId(mSessionID); - mControlPanel->setVisible(gSavedSettings.getBOOL("IMShowControlPanel")); + mControlPanel->getParent()->setVisible(gSavedSettings.getBOOL("IMShowControlPanel")); LLButton* slide_left = getChild<LLButton>("slide_left_btn"); - slide_left->setVisible(mControlPanel->getVisible()); + slide_left->setVisible(mControlPanel->getParent()->getVisible()); slide_left->setClickedCallback(boost::bind(&LLIMFloater::onSlide, this)); LLButton* slide_right = getChild<LLButton>("slide_right_btn"); - slide_right->setVisible(!mControlPanel->getVisible()); + slide_right->setVisible(!mControlPanel->getParent()->getVisible()); slide_right->setClickedCallback(boost::bind(&LLIMFloater::onSlide, this)); mInputEditor = getChild<LLLineEditor>("chat_editor"); @@ -357,12 +357,12 @@ void* LLIMFloater::createPanelAdHocControl(void* userdata) void LLIMFloater::onSlide() { - mControlPanel->setVisible(!mControlPanel->getVisible()); + mControlPanel->getParent()->setVisible(!mControlPanel->getParent()->getVisible()); - gSavedSettings.setBOOL("IMShowControlPanel", mControlPanel->getVisible()); + gSavedSettings.setBOOL("IMShowControlPanel", mControlPanel->getParent()->getVisible()); - getChild<LLButton>("slide_left_btn")->setVisible(mControlPanel->getVisible()); - getChild<LLButton>("slide_right_btn")->setVisible(!mControlPanel->getVisible()); + getChild<LLButton>("slide_left_btn")->setVisible(mControlPanel->getParent()->getVisible()); + getChild<LLButton>("slide_right_btn")->setVisible(!mControlPanel->getParent()->getVisible()); LLLayoutStack* stack = getChild<LLLayoutStack>("im_panels"); if (stack) stack->setAnimate(true); diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index 5bbab1f092..33cb3a54a7 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -94,9 +94,9 @@ void LLIMFloaterContainer::addFloater(LLFloater* floaterp, if(gAgent.isInGroup(session_id, TRUE)) { - LLGroupIconCtrl::Params icon_params = LLUICtrlFactory::instance().getDefaultParams<LLGroupIconCtrl>(); + LLGroupIconCtrl::Params icon_params; icon_params.group_id = session_id; - icon = LLUICtrlFactory::instance().createWidget<LLGroupIconCtrl>(icon_params); + icon = LLUICtrlFactory::instance().create<LLGroupIconCtrl>(icon_params); mSessions[session_id] = floaterp; floaterp->mCloseSignal.connect(boost::bind(&LLIMFloaterContainer::onCloseFloater, this, session_id)); @@ -105,9 +105,9 @@ void LLIMFloaterContainer::addFloater(LLFloater* floaterp, { LLUUID avatar_id = LLIMModel::getInstance()->getOtherParticipantID(session_id); - LLAvatarIconCtrl::Params icon_params = LLUICtrlFactory::instance().getDefaultParams<LLAvatarIconCtrl>(); + LLAvatarIconCtrl::Params icon_params; icon_params.avatar_id = avatar_id; - icon = LLUICtrlFactory::instance().createWidget<LLAvatarIconCtrl>(icon_params); + icon = LLUICtrlFactory::instance().create<LLAvatarIconCtrl>(icon_params); mSessions[session_id] = floaterp; floaterp->mCloseSignal.connect(boost::bind(&LLIMFloaterContainer::onCloseFloater, this, session_id)); diff --git a/indra/newview/llinventorylistitem.cpp b/indra/newview/llinventorylistitem.cpp index 1ea91103f1..225d0288a9 100644 --- a/indra/newview/llinventorylistitem.cpp +++ b/indra/newview/llinventorylistitem.cpp @@ -302,7 +302,9 @@ LLPanelInventoryListItemBase::LLPanelInventoryListItemBase(LLViewerInventoryItem } else { - mIconCtrl = dynamic_cast<LLIconCtrl*>(LLUICtrlFactory::createDefaultWidget<LLIconCtrl>("item_icon")); + LLIconCtrl::Params icon_params; + icon_params.name = "item_icon"; + mIconCtrl = LLUICtrlFactory::create<LLIconCtrl>(icon_params); } LLTextBox::Params text_params(params.item_name); @@ -315,7 +317,9 @@ LLPanelInventoryListItemBase::LLPanelInventoryListItemBase(LLViewerInventoryItem } else { - mTitleCtrl = dynamic_cast<LLTextBox*>(LLUICtrlFactory::createDefaultWidget<LLTextBox>("item_title")); + LLTextBox::Params text_aprams; + text_params.name = "item_title"; + mTitleCtrl = LLUICtrlFactory::create<LLTextBox>(text_params); } } diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index a6ff76cf84..40ae9b06b7 100644 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -950,6 +950,12 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event) LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_NAME_CHANGED" << LL_ENDL; }; break; + + case MEDIA_EVENT_CLOSE_REQUEST: + { + LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_CLOSE_REQUEST" << LL_ENDL; + } + break; }; // chain all events to any potential observers of this object. diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index 3d0f4cc1ed..6658e1d7e8 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -39,7 +39,9 @@ #include "llvoavatarself.h" // to check gAgentAvatarp->isSitting() #include "llbottomtray.h" #include "llbutton.h" +#include "llfirstuse.h" #include "llfloaterreg.h" +#include "llhints.h" #include "lljoystickbutton.h" #include "lluictrlfactory.h" #include "llviewerwindow.h" @@ -161,6 +163,7 @@ void LLFloaterMove::setVisible(BOOL visible) if (visible) { + LLFirstUse::notMoving(false); // Attach the Stand/Stop Flying panel. LLPanelStandStopFlying* ssf_panel = LLPanelStandStopFlying::getInstance(); ssf_panel->reparent(this); @@ -560,6 +563,11 @@ void LLPanelStandStopFlying::setStandStopFlyingMode(EStandStopFlyingMode mode) { LLPanelStandStopFlying* panel = getInstance(); + if (mode == SSFM_STAND) + { + LLFirstUse::sit(); + LLFirstUse::notMoving(false); + } panel->mStandButton->setVisible(SSFM_STAND == mode); panel->mStopFlyingButton->setVisible(SSFM_STOP_FLYING == mode); @@ -590,6 +598,7 @@ BOOL LLPanelStandStopFlying::postBuild() mStandButton->setCommitCallback(boost::bind(&LLPanelStandStopFlying::onStandButtonClick, this)); mStandButton->setCommitCallback(boost::bind(&LLFloaterMove::enableInstance, TRUE)); mStandButton->setVisible(FALSE); + LLHints::registerHintTarget("stand_btn", mStandButton->getHandle()); mStopFlyingButton = getChild<LLButton>("stop_fly_btn"); //mStopFlyingButton->setCommitCallback(boost::bind(&LLFloaterMove::setFlyingMode, FALSE)); @@ -688,7 +697,7 @@ void LLPanelStandStopFlying::reparent(LLFloaterMove* move_view) LLPanelStandStopFlying* LLPanelStandStopFlying::getStandStopFlyingPanel() { LLPanelStandStopFlying* panel = new LLPanelStandStopFlying(); - LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_stand_stop_flying.xml"); + panel->buildFromFile("panel_stand_stop_flying.xml"); panel->setVisible(FALSE); //LLUI::getRootView()->addChild(panel); @@ -701,6 +710,8 @@ LLPanelStandStopFlying* LLPanelStandStopFlying::getStandStopFlyingPanel() void LLPanelStandStopFlying::onStandButtonClick() { + LLFirstUse::sit(false); + LLSelectMgr::getInstance()->deselectAllForStandingUp(); gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp index e7e60f544c..6521ae3b1e 100644 --- a/indra/newview/llnamelistctrl.cpp +++ b/indra/newview/llnamelistctrl.cpp @@ -253,7 +253,8 @@ void LLNameListCtrl::addNameItem(LLNameListCtrl::NameItem& item, EAddPosition po LLScrollListItem* LLNameListCtrl::addElement(const LLSD& element, EAddPosition pos, void* userdata) { LLNameListCtrl::NameItem item_params; - LLParamSDParser::instance().readSD(element, item_params); + LLParamSDParser parser; + parser.readSD(element, item_params); item_params.userdata = userdata; return addNameItemRow(item_params, pos); } diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index 18bba6e358..58849393b4 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -272,7 +272,7 @@ LLNavigationBar::LLNavigationBar() mPurgeTPHistoryItems(false), mSaveToLocationHistory(false) { - LLUICtrlFactory::getInstance()->buildPanel(this, "panel_navigation_bar.xml"); + buildFromFile( "panel_navigation_bar.xml"); // set a listener function for LoginComplete event LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&LLNavigationBar::handleLoginComplete, this)); diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index 4f9845d704..712d20b6b0 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -32,6 +32,7 @@ #include "llfloaterreg.h" #include "lltrans.h" +#include "llfirstuse.h" #include "llnearbychatbar.h" #include "llbottomtray.h" #include "llagent.h" @@ -391,8 +392,7 @@ LLCtrlListInterface* LLGestureComboList::getListInterface() } LLNearbyChatBar::LLNearbyChatBar() - : LLPanel() - , mChatBox(NULL) +: mChatBox(NULL) { mSpeakerMgr = LLLocalSpeakerMgr::getInstance(); } @@ -484,6 +484,7 @@ BOOL LLNearbyChatBar::matchChatTypeTrigger(const std::string& in_str, std::strin void LLNearbyChatBar::onChatBoxKeystroke(LLLineEditor* caller, void* userdata) { + LLFirstUse::otherAvatarChatFirst(false); LLNearbyChatBar* self = (LLNearbyChatBar *)userdata; diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index a747c228a6..303f2abcce 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -31,7 +31,9 @@ #include "llbottomtray.h" #include "llchatitemscontainerctrl.h" +#include "llfirstuse.h" #include "llfloaterscriptdebug.h" +#include "llhints.h" #include "llnearbychat.h" #include "llrecentpeople.h" @@ -55,7 +57,13 @@ LLToastPanelBase* createToastPanel() class LLNearbyChatScreenChannel: public LLScreenChannelBase { public: - LLNearbyChatScreenChannel(const LLUUID& id):LLScreenChannelBase(id) { mStopProcessing = false;}; + typedef std::vector<LLHandle<LLToast> > toast_vec_t; + typedef std::list<LLHandle<LLToast> > toast_list_t; + + LLNearbyChatScreenChannel(const LLUUID& id):LLScreenChannelBase(id) + { + mStopProcessing = false; + } void addNotification (LLSD& notification); void arrangeToasts (); @@ -75,15 +83,12 @@ public: } // hide all toasts from screen, but not remove them from a channel - virtual void hideToastsFromScreen() - { - }; // removes all toasts from a channel virtual void removeToastsFromChannel() { - for(std::vector<LLToast*>::iterator it = m_active_toasts.begin(); it != m_active_toasts.end(); ++it) + for(toast_vec_t::iterator it = m_active_toasts.begin(); it != m_active_toasts.end(); ++it) { - addToToastPool((*it)); + addToToastPool(it->get()); } m_active_toasts.clear(); }; @@ -98,10 +103,11 @@ public: protected: void addToToastPool(LLToast* toast) { + if (!toast) return; toast->setVisible(FALSE); toast->stopTimer(); toast->setIsHidden(true); - m_toast_pool.push_back(toast); + m_toast_pool.push_back(toast->getHandle()); } void createOverflowToast(S32 bottom, F32 timer); @@ -110,8 +116,8 @@ protected: bool createPoolToast(); - std::vector<LLToast*> m_active_toasts; - std::list<LLToast*> m_toast_pool; + toast_vec_t m_active_toasts; + toast_list_t m_toast_pool; bool mStopProcessing; }; @@ -132,7 +138,7 @@ void LLNearbyChatScreenChannel::onToastFade(LLToast* toast) if(!toast) return; - std::vector<LLToast*>::iterator pos = std::find(m_active_toasts.begin(),m_active_toasts.end(),toast); + toast_vec_t::iterator pos = std::find(m_active_toasts.begin(),m_active_toasts.end(),toast->getHandle()); if(pos!=m_active_toasts.end()) m_active_toasts.erase(pos); @@ -159,7 +165,7 @@ bool LLNearbyChatScreenChannel::createPoolToast() toast->setOnFadeCallback(boost::bind(&LLNearbyChatScreenChannel::onToastFade, this, _1)); toast->setOnToastDestroyedCallback(boost::bind(&LLNearbyChatScreenChannel::onToastDestroyed, this, _1)); - m_toast_pool.push_back(toast); + m_toast_pool.push_back(toast->getHandle()); return true; } @@ -177,17 +183,20 @@ void LLNearbyChatScreenChannel::addNotification(LLSD& notification) { LLUUID fromID = notification["from_id"].asUUID(); // agent id or object id std::string from = notification["from"].asString(); - LLToast* toast = m_active_toasts[0]; - LLNearbyChatToastPanel* panel = dynamic_cast<LLNearbyChatToastPanel*>(toast->getPanel()); - - if(panel && panel->messageID() == fromID && panel->getFromName() == from && panel->canAddText()) + LLToast* toast = m_active_toasts[0].get(); + if (toast) { - panel->addMessage(notification); - toast->reshapeToPanel(); - toast->resetTimer(); - - arrangeToasts(); - return; + LLNearbyChatToastPanel* panel = dynamic_cast<LLNearbyChatToastPanel*>(toast->getPanel()); + + if(panel && panel->messageID() == fromID && panel->getFromName() == from && panel->canAddText()) + { + panel->addMessage(notification); + toast->reshapeToPanel(); + toast->resetTimer(); + + arrangeToasts(); + return; + } } } @@ -215,7 +224,7 @@ void LLNearbyChatScreenChannel::addNotification(LLSD& notification) //take 1st element from pool, (re)initialize it, put it in active toasts - LLToast* toast = m_toast_pool.back(); + LLToast* toast = m_toast_pool.back().get(); m_toast_pool.pop_back(); @@ -228,25 +237,36 @@ void LLNearbyChatScreenChannel::addNotification(LLSD& notification) toast->reshapeToPanel(); toast->resetTimer(); - m_active_toasts.push_back(toast); + m_active_toasts.push_back(toast->getHandle()); arrangeToasts(); } void LLNearbyChatScreenChannel::arrangeToasts() { - if(m_active_toasts.size() == 0 || isHovering()) - return; - - hideToastsFromScreen(); + if(!isHovering()) + { + showToastsBottom(); + } - showToastsBottom(); + if (m_active_toasts.empty()) + { + LLHints::registerHintTarget("incoming_chat", LLHandle<LLView>()); + } + else + { + LLToast* toast = m_active_toasts.front().get(); + if (toast) + { + LLHints::registerHintTarget("incoming_chat", m_active_toasts.front().get()->LLView::getHandle()); + } + } } -int sort_toasts_predicate(LLToast* first,LLToast* second) +int sort_toasts_predicate(LLHandle<LLToast> first, LLHandle<LLToast> second) { - F32 v1 = first->getTimer()->getEventTimer().getElapsedTimeF32(); - F32 v2 = second->getTimer()->getEventTimer().getElapsedTimeF32(); + F32 v1 = first.get()->getTimer()->getEventTimer().getElapsedTimeF32(); + F32 v2 = second.get()->getTimer()->getEventTimer().getElapsedTimeF32(); return v1 < v2; } @@ -264,20 +284,22 @@ void LLNearbyChatScreenChannel::showToastsBottom() //calc max visible item and hide other toasts. - for(std::vector<LLToast*>::iterator it = m_active_toasts.begin(); it != m_active_toasts.end(); ++it) + for(toast_vec_t::iterator it = m_active_toasts.begin(); it != m_active_toasts.end(); ++it) { - S32 toast_top = bottom + (*it)->getRect().getHeight() + margin; + LLToast* toast = it->get(); + if (!toast) continue; + + S32 toast_top = bottom + toast->getRect().getHeight() + margin; if(toast_top > gFloaterView->getRect().getHeight()) { while(it!=m_active_toasts.end()) { - addToToastPool((*it)); + addToToastPool(it->get()); it=m_active_toasts.erase(it); } break; } - LLToast* toast = (*it); toast_rect = toast->getRect(); toast_rect.setLeftTopAndSize(getRect().mLeft , bottom + toast_rect.getHeight(), toast_rect.getWidth() ,toast_rect.getHeight()); @@ -288,13 +310,16 @@ void LLNearbyChatScreenChannel::showToastsBottom() // use reverse order to provide correct z-order and avoid toast blinking - for(std::vector<LLToast*>::reverse_iterator it = m_active_toasts.rbegin(); it != m_active_toasts.rend(); ++it) + for(toast_vec_t::reverse_iterator it = m_active_toasts.rbegin(); it != m_active_toasts.rend(); ++it) { - LLToast* toast = (*it); - toast->setIsHidden(false); - toast->setVisible(TRUE); - + LLToast* toast = it->get(); + if (toast) + { + toast->setIsHidden(false); + toast->setVisible(TRUE); + } } + } void LLNearbyChatScreenChannel::reshape (S32 width, S32 height, BOOL called_from_parent) @@ -340,8 +365,6 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, const LLSD &args) { if(chat_msg.mMuted == TRUE) return; - if(chat_msg.mSourceType == CHAT_SOURCE_AGENT && chat_msg.mFromID.notNull()) - LLRecentPeople::instance().add(chat_msg.mFromID); if(chat_msg.mText.empty()) return;//don't process empty messages @@ -444,7 +467,13 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, const LLSD &args) notification["font_size"] = (S32)LLViewerChat::getChatFontSize() ; channel->addNotification(notification); } - + + if(chat_msg.mSourceType == CHAT_SOURCE_AGENT + && chat_msg.mFromID.notNull() + && chat_msg.mFromID != gAgentID) + { + LLFirstUse::otherAvatarChatFirst(); + } } void LLNearbyChatHandler::onDeleteToast(LLToast* toast) diff --git a/indra/newview/llnotificationhandler.h b/indra/newview/llnotificationhandler.h index 060eccf5c7..3c84a02b68 100644 --- a/indra/newview/llnotificationhandler.h +++ b/indra/newview/llnotificationhandler.h @@ -263,6 +263,20 @@ protected: void onRejectToast(LLUUID& id); }; +/** + * Handler for UI hints. + */ +class LLHintHandler : public LLSingleton<LLHintHandler> +{ +public: + LLHintHandler(); + virtual ~LLHintHandler(); + + // base interface functions + virtual bool processNotification(const LLSD& notify); +}; + + class LLHandlerUtil { public: diff --git a/indra/newview/llnotificationhinthandler.cpp b/indra/newview/llnotificationhinthandler.cpp new file mode 100644 index 0000000000..a9460821b0 --- /dev/null +++ b/indra/newview/llnotificationhinthandler.cpp @@ -0,0 +1,64 @@ +/** + * @file llnotificationhinthandler.cpp + * @brief Notification Handler Class for UI Hints + * + * $LicenseInfo:firstyear=2000&license=viewergpl$ + * + * Copyright (c) 2000-2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + + +#include "llviewerprecompiledheaders.h" // must be first include + +#include "llnotificationhandler.h" +#include "llhints.h" +#include "llnotifications.h" + +using namespace LLNotificationsUI; + +LLHintHandler::LLHintHandler() +{ +} + +LLHintHandler::~LLHintHandler() +{ +} + +bool LLHintHandler::processNotification(const LLSD& notify) +{ + LLNotificationPtr notification = LLNotifications::instance().find(notify["id"].asUUID()); + + std::string sigtype = notify["sigtype"].asString(); + if (sigtype == "add" || sigtype == "load") + { + LLHints::show(notification); + } + else if (sigtype == "delete") + { + LLHints::hide(notification); + } + return false; +} diff --git a/indra/newview/llnotificationmanager.cpp b/indra/newview/llnotificationmanager.cpp index 3bbf6cea16..17cf1ab2b8 100644 --- a/indra/newview/llnotificationmanager.cpp +++ b/indra/newview/llnotificationmanager.cpp @@ -60,6 +60,7 @@ void LLNotificationManager::init() LLNotificationChannel::buildChannel("AlertModal", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "alertmodal")); LLNotificationChannel::buildChannel("IM Notifications", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "notifytoast")); LLNotificationChannel::buildChannel("Offer", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "offer")); + LLNotificationChannel::buildChannel("Hints", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "hint")); LLNotifications::instance().getChannel("Notifications")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1)); LLNotifications::instance().getChannel("NotificationTips")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1)); @@ -68,6 +69,7 @@ void LLNotificationManager::init() LLNotifications::instance().getChannel("AlertModal")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1)); LLNotifications::instance().getChannel("IM Notifications")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1)); LLNotifications::instance().getChannel("Offer")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1)); + LLNotifications::instance().getChannel("Hints")->connectChanged(boost::bind(&LLHintHandler::processNotification, LLHintHandler::getInstance(), _1)); mNotifyHandlers["notify"] = boost::shared_ptr<LLEventHandler>(new LLScriptHandler(NT_NOTIFY, LLSD())); mNotifyHandlers["notifytip"] = boost::shared_ptr<LLEventHandler>(new LLTipHandler(NT_NOTIFY, LLSD())); diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index 51f9a03a9c..7dda63ed4a 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -63,6 +63,39 @@ bool LLOutfitTabNameComparator::compare(const LLAccordionCtrlTab* tab1, const LL return name1 < name2; } +struct outfit_accordion_tab_params : public LLInitParam::Block<outfit_accordion_tab_params, LLAccordionCtrlTab::Params> +{ + Mandatory<LLWearableItemsList::Params> wearable_list; + + outfit_accordion_tab_params() + : wearable_list("wearable_items_list") + {} +}; + +const outfit_accordion_tab_params& get_accordion_tab_params() +{ + static outfit_accordion_tab_params tab_params; + static bool initialized = false; + if (!initialized) + { + initialized = true; + + LLXMLNodePtr xmlNode; + if (LLUICtrlFactory::getLayeredXMLNode("outfit_accordion_tab.xml", xmlNode)) + { + LLXUIParser parser; + parser.readXUI(xmlNode, tab_params, "outfit_accordion_tab.xml"); + } + else + { + llwarns << "Failed to read xml of Outfit's Accordion Tab from outfit_accordion_tab.xml" << llendl; + } + } + + return tab_params; +} + + ////////////////////////////////////////////////////////////////////////// class LLOutfitListGearMenu @@ -437,8 +470,11 @@ void LLOutfitsList::refreshList(const LLUUID& category_id) std::string name = cat->getName(); - static LLXMLNodePtr accordionXmlNode = getAccordionTabXMLNode(); - LLAccordionCtrlTab* tab = LLUICtrlFactory::defaultBuilder<LLAccordionCtrlTab>(accordionXmlNode, NULL, NULL); + outfit_accordion_tab_params tab_params(get_accordion_tab_params()); + LLAccordionCtrlTab* tab = LLUICtrlFactory::create<LLAccordionCtrlTab>(tab_params); + LLWearableItemsList* wearable_list = LLUICtrlFactory::create<LLWearableItemsList>(tab_params.wearable_list); + wearable_list->setShape(tab->getLocalRect()); + tab->addChild(wearable_list); tab->setName(name); tab->setTitle(name); @@ -731,19 +767,6 @@ bool LLOutfitsList::hasItemSelected() ////////////////////////////////////////////////////////////////////////// // Private methods ////////////////////////////////////////////////////////////////////////// -LLXMLNodePtr LLOutfitsList::getAccordionTabXMLNode() -{ - LLXMLNodePtr xmlNode = NULL; - bool success = LLUICtrlFactory::getLayeredXMLNode("outfit_accordion_tab.xml", xmlNode); - if (!success) - { - llwarns << "Failed to read xml of Outfit's Accordion Tab from outfit_accordion_tab.xml" << llendl; - return NULL; - } - - return xmlNode; -} - void LLOutfitsList::computeDifference( const LLInventoryModel::cat_array_t& vcats, uuid_vec_t& vadded, @@ -1076,7 +1099,7 @@ void LLOutfitsList::onCOFChanged() // items lists and update their worn state there. for (LLInventoryModel::item_array_t::const_iterator iter = item_array.begin(); iter != item_array.end(); - ++iter) + ++iter) { vnew.push_back((*iter)->getLinkedUUID()); } diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h index 37b909c93e..2e9a0d2dd9 100644 --- a/indra/newview/lloutfitslist.h +++ b/indra/newview/lloutfitslist.h @@ -111,12 +111,6 @@ public: bool hasItemSelected(); private: - /** - * Reads xml with accordion tab and Flat list from xml file. - * - * @return LLPointer to XMLNode with accordion tab and flat list. - */ - LLXMLNodePtr getAccordionTabXMLNode(); /** * Wrapper for LLCommonUtils::computeDifference. @see LLCommonUtils::computeDifference diff --git a/indra/newview/llpanelavatartag.cpp b/indra/newview/llpanelavatartag.cpp index d174b8da96..77d67c7b09 100644 --- a/indra/newview/llpanelavatartag.cpp +++ b/indra/newview/llpanelavatartag.cpp @@ -37,7 +37,7 @@ LLPanelAvatarTag::LLPanelAvatarTag(const LLUUID& key, const std::string im_time) , mAvatarId(LLUUID::null) // , mFadeTimer() { - LLUICtrlFactory::getInstance()->buildPanel(this, "panel_avatar_tag.xml"); + buildFromFile( "panel_avatar_tag.xml"); setLeftButtonClickCallback(boost::bind(&LLPanelAvatarTag::onClick, this)); setAvatarId(key); setTime(im_time); diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp index bf7214eb3b..6889b98ab1 100644 --- a/indra/newview/llpanelclassified.cpp +++ b/indra/newview/llpanelclassified.cpp @@ -138,7 +138,7 @@ LLPanelClassifiedInfo::~LLPanelClassifiedInfo() LLPanelClassifiedInfo* LLPanelClassifiedInfo::create() { LLPanelClassifiedInfo* panel = new LLPanelClassifiedInfo(); - LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_classified_info.xml"); + panel->buildFromFile("panel_classified_info.xml"); return panel; } @@ -611,7 +611,7 @@ LLPanelClassifiedEdit::~LLPanelClassifiedEdit() LLPanelClassifiedEdit* LLPanelClassifiedEdit::create() { LLPanelClassifiedEdit* panel = new LLPanelClassifiedEdit(); - LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_edit_classified.xml"); + panel->buildFromFile("panel_edit_classified.xml"); return panel; } diff --git a/indra/newview/llpanelgenerictip.cpp b/indra/newview/llpanelgenerictip.cpp index 2660814afc..4ccdaa78f3 100644 --- a/indra/newview/llpanelgenerictip.cpp +++ b/indra/newview/llpanelgenerictip.cpp @@ -36,7 +36,7 @@ LLPanelGenericTip::LLPanelGenericTip( const LLNotificationPtr& notification) : LLPanelTipToast(notification) { - LLUICtrlFactory::getInstance()->buildPanel(this, "panel_generic_tip.xml"); + buildFromFile( "panel_generic_tip.xml"); getChild<LLUICtrl>("message")->setValue(notification->getMessage()); diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp index 840b98213d..3a31d99598 100644 --- a/indra/newview/llpanelgroupgeneral.cpp +++ b/indra/newview/llpanelgroupgeneral.cpp @@ -740,7 +740,7 @@ void LLPanelGroupGeneral::updateMembers() sSDTime += sd_timer.getElapsedTimeF32(); element_timer.reset(); - LLScrollListItem* member_row = mListVisibleMembers->addElement(row);//, ADD_SORTED); + LLScrollListItem* member_row = mListVisibleMembers->addElement(row); if ( member->isOwner() ) { diff --git a/indra/newview/llpanelgroupinvite.cpp b/indra/newview/llpanelgroupinvite.cpp index 535b2a9e2d..b26bcc854c 100644 --- a/indra/newview/llpanelgroupinvite.cpp +++ b/indra/newview/llpanelgroupinvite.cpp @@ -369,7 +369,7 @@ LLPanelGroupInvite::LLPanelGroupInvite(const LLUUID& group_id) mPendingUpdate(FALSE) { // Pass on construction of this panel to the control factory. - LLUICtrlFactory::getInstance()->buildPanel(this, "panel_group_invite.xml"); + buildFromFile( "panel_group_invite.xml"); } LLPanelGroupInvite::~LLPanelGroupInvite() diff --git a/indra/newview/llpanelgrouplandmoney.cpp b/indra/newview/llpanelgrouplandmoney.cpp index d4736d22ae..8d8d9bc1c4 100644 --- a/indra/newview/llpanelgrouplandmoney.cpp +++ b/indra/newview/llpanelgrouplandmoney.cpp @@ -522,7 +522,7 @@ void LLPanelGroupLandMoney::impl::processGroupLand(LLMessageSystem* msg) row["columns"][4]["column"] = "hidden"; row["columns"][4]["value"] = hidden; - mGroupParcelsp->addElement(row, ADD_SORTED); + mGroupParcelsp->addElement(row); } } } diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index 579a271ce8..639364ff8d 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -1625,7 +1625,7 @@ void LLPanelGroupMembersSubTab::updateMembers() row["columns"][2]["value"] = mMemberProgress->second->getOnlineStatus(); row["columns"][2]["font"] = "SANSSERIF_SMALL"; - LLScrollListItem* member = mMembersList->addElement(row);//, ADD_SORTED); + LLScrollListItem* member = mMembersList->addElement(row); LLUUID id = member->getUUID(); mHasMatch = TRUE; diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 43814ac652..60800eff90 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -197,7 +197,7 @@ LLLandmarksPanel::LLLandmarksPanel() mInventoryObserver = new LLLandmarksPanelObserver(this); gInventory.addObserver(mInventoryObserver); - LLUICtrlFactory::getInstance()->buildPanel(this, "panel_landmarks.xml"); + buildFromFile( "panel_landmarks.xml"); } LLLandmarksPanel::~LLLandmarksPanel() diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index be1afbd8d7..f1bd861f1d 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -187,7 +187,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, // Logo mLogoImage = LLUI::getUIImage("startup_logo"); - LLUICtrlFactory::getInstance()->buildPanel(this, "panel_login.xml"); + buildFromFile( "panel_login.xml"); #if USE_VIEWER_AUTH //leave room for the login menu bar @@ -1104,9 +1104,10 @@ void LLPanelLogin::updateServerCombo() { if (!grid_choice->first.empty()) { - server_choice_combo->add(grid_choice->second, grid_choice->first, ADD_SORTED); + server_choice_combo->add(grid_choice->second, grid_choice->first); } } + server_choice_combo->sortByName(); server_choice_combo->addSeparator(ADD_TOP); diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 27e054af34..c5d4f95f08 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -642,7 +642,6 @@ LLFloaterInventoryFinder::LLFloaterInventoryFinder(LLPanelMainInventory* invento mPanelMainInventory(inventory_view), mFilter(inventory_view->getPanel()->getFilter()) { - LLUICtrlFactory::getInstance()->buildFloater(this, "floater_inventory_view_finder.xml", NULL); updateElementsFromFilter(); } diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h index fb31206870..cf2cc14531 100644 --- a/indra/newview/llpanelmaininventory.h +++ b/indra/newview/llpanelmaininventory.h @@ -41,6 +41,7 @@ class LLFilterEditor; class LLTabContainer; class LLFloaterInventoryFinder; class LLMenuGL; +class LLFloater; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLPanelMainInventory diff --git a/indra/newview/llpanelme.cpp b/indra/newview/llpanelme.cpp index 5cd4cea96d..36a3aae15f 100644 --- a/indra/newview/llpanelme.cpp +++ b/indra/newview/llpanelme.cpp @@ -162,7 +162,7 @@ void LLPanelMe::onCancelClicked() LLPanelMyProfileEdit::LLPanelMyProfileEdit() : LLPanelMyProfile() { - LLUICtrlFactory::getInstance()->buildPanel(this, "panel_edit_profile.xml"); + buildFromFile( "panel_edit_profile.xml"); setAvatarId(gAgent.getID()); } diff --git a/indra/newview/llpanelmediasettingsgeneral.cpp b/indra/newview/llpanelmediasettingsgeneral.cpp index 92c8365a70..2856ea9db1 100644 --- a/indra/newview/llpanelmediasettingsgeneral.cpp +++ b/indra/newview/llpanelmediasettingsgeneral.cpp @@ -74,7 +74,7 @@ LLPanelMediaSettingsGeneral::LLPanelMediaSettingsGeneral() : mMediaEditable(false) { // build dialog from XML - LLUICtrlFactory::getInstance()->buildPanel(this, "panel_media_settings_general.xml"); + buildFromFile( "panel_media_settings_general.xml"); } //////////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llpanelmediasettingspermissions.cpp b/indra/newview/llpanelmediasettingspermissions.cpp index 339376cbf6..5378886b56 100644 --- a/indra/newview/llpanelmediasettingspermissions.cpp +++ b/indra/newview/llpanelmediasettingspermissions.cpp @@ -59,7 +59,7 @@ LLPanelMediaSettingsPermissions::LLPanelMediaSettingsPermissions() : mPermsWorldControl( 0 ) { // build dialog from XML - LLUICtrlFactory::getInstance()->buildPanel(this, "panel_media_settings_permissions.xml"); + buildFromFile( "panel_media_settings_permissions.xml"); } //////////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llpanelmediasettingssecurity.cpp b/indra/newview/llpanelmediasettingssecurity.cpp index a0d4c2f761..b588e8f930 100644 --- a/indra/newview/llpanelmediasettingssecurity.cpp +++ b/indra/newview/llpanelmediasettingssecurity.cpp @@ -53,7 +53,7 @@ LLPanelMediaSettingsSecurity::LLPanelMediaSettingsSecurity() : mCommitCallbackRegistrar.add("Media.whitelistDelete", boost::bind(&LLPanelMediaSettingsSecurity::onBtnDel, this)); // build dialog from XML - LLUICtrlFactory::getInstance()->buildPanel(this, "panel_media_settings_security.xml"); + buildFromFile( "panel_media_settings_security.xml"); } //////////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp index 811d70ade3..fcc67d6840 100644 --- a/indra/newview/llpanelnearbymedia.cpp +++ b/indra/newview/llpanelnearbymedia.cpp @@ -96,7 +96,7 @@ LLPanelNearByMedia::LLPanelNearByMedia() mCommitCallbackRegistrar.add("SelectedMediaCtrl.Zoom", boost::bind(&LLPanelNearByMedia::onClickSelectedMediaZoom, this)); mCommitCallbackRegistrar.add("SelectedMediaCtrl.Unzoom", boost::bind(&LLPanelNearByMedia::onClickSelectedMediaUnzoom, this)); - LLUICtrlFactory::instance().buildPanel(this, "panel_nearby_media.xml"); + buildFromFile( "panel_nearby_media.xml"); } LLPanelNearByMedia::~LLPanelNearByMedia() diff --git a/indra/newview/llpanelonlinestatus.cpp b/indra/newview/llpanelonlinestatus.cpp index 2f1300e0f2..8202dfe9a3 100644 --- a/indra/newview/llpanelonlinestatus.cpp +++ b/indra/newview/llpanelonlinestatus.cpp @@ -35,7 +35,7 @@ LLPanelOnlineStatus::LLPanelOnlineStatus( LLPanelTipToast(notification) { - LLUICtrlFactory::getInstance()->buildPanel(this, + buildFromFile( "panel_online_status_toast.xml"); diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index c9380bf6e6..e74b148062 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -485,7 +485,7 @@ BOOL LLPanelOutfitEdit::postBuild() setVisibleCallback(boost::bind(&LLPanelOutfitEdit::onVisibilityChange, this, _2)); - mCOFWearables = getChild<LLCOFWearables>("cof_wearables_list"); + mCOFWearables = findChild<LLCOFWearables>("cof_wearables_list"); mCOFWearables->setCommitCallback(boost::bind(&LLPanelOutfitEdit::filterWearablesBySelectedItem, this)); mCOFWearables->getCOFCallbacks().mAddWearable = boost::bind(&LLPanelOutfitEdit::onAddWearableClicked, this); diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index c6a7bd88a0..5999ecd5de 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -302,10 +302,10 @@ bool LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata) void LLPanelOutfitsInventory::initTabPanels() { - mCurrentOutfitPanel = getChild<LLPanelWearing>(COF_TAB_NAME); + mCurrentOutfitPanel = findChild<LLPanelWearing>(COF_TAB_NAME); mCurrentOutfitPanel->setSelectionChangeCallback(boost::bind(&LLPanelOutfitsInventory::updateVerbs, this)); - mMyOutfitsPanel = getChild<LLOutfitsList>(OUTFITS_TAB_NAME); + mMyOutfitsPanel = findChild<LLOutfitsList>(OUTFITS_TAB_NAME); mMyOutfitsPanel->setSelectionChangeCallback(boost::bind(&LLPanelOutfitsInventory::updateVerbs, this)); mAppearanceTabs = getChild<LLTabContainer>("appearance_tabs"); diff --git a/indra/newview/llpanelpick.cpp b/indra/newview/llpanelpick.cpp index 7615a93a49..271728220c 100644 --- a/indra/newview/llpanelpick.cpp +++ b/indra/newview/llpanelpick.cpp @@ -74,7 +74,7 @@ LLPanelPickInfo* LLPanelPickInfo::create() { LLPanelPickInfo* panel = new LLPanelPickInfo(); - LLUICtrlFactory::getInstance()->buildPanel(panel, XML_PANEL_PICK_INFO); + panel->buildFromFile(XML_PANEL_PICK_INFO); return panel; } @@ -344,7 +344,7 @@ void LLPanelPickInfo::onClickBack() LLPanelPickEdit* LLPanelPickEdit::create() { LLPanelPickEdit* panel = new LLPanelPickEdit(); - LLUICtrlFactory::getInstance()->buildPanel(panel, XML_PANEL_EDIT_PICK); + panel->buildFromFile(XML_PANEL_EDIT_PICK); return panel; } diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp index a5c3c9faef..27787ac211 100644 --- a/indra/newview/llpanelpicks.cpp +++ b/indra/newview/llpanelpicks.cpp @@ -1039,7 +1039,7 @@ LLPickItem::LLPickItem() , mSnapshotID(LLUUID::null) , mNeedData(true) { - LLUICtrlFactory::getInstance()->buildPanel(this,"panel_pick_list_item.xml"); + buildFromFile("panel_pick_list_item.xml"); } LLPickItem::~LLPickItem() @@ -1169,7 +1169,7 @@ LLClassifiedItem::LLClassifiedItem(const LLUUID& avatar_id, const LLUUID& classi , mAvatarId(avatar_id) , mClassifiedId(classified_id) { - LLUICtrlFactory::getInstance()->buildPanel(this,"panel_classifieds_list_item.xml"); + buildFromFile("panel_classifieds_list_item.xml"); LLAvatarPropertiesProcessor::getInstance()->addObserver(getAvatarId(), this); LLAvatarPropertiesProcessor::getInstance()->sendClassifiedInfoRequest(getClassifiedId()); diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 5aed1e55e3..f0e60386b6 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -37,6 +37,7 @@ #include "llcombobox.h" #include "llfiltereditor.h" +#include "llfirstuse.h" #include "llfloaterreg.h" #include "llnotificationsutil.h" #include "lltabcontainer.h" @@ -246,7 +247,7 @@ LLPanelPlaces::LLPanelPlaces() LLViewerParcelMgr::getInstance()->addAgentParcelChangedCallback( boost::bind(&LLPanelPlaces::updateVerbs, this)); - //LLUICtrlFactory::getInstance()->buildPanel(this, "panel_places.xml"); // Called from LLRegisterPanelClass::defaultPanelClassBuilder() + //buildFromFile( "panel_places.xml"); // Called from LLRegisterPanelClass::defaultPanelClassBuilder() } LLPanelPlaces::~LLPanelPlaces() @@ -321,8 +322,8 @@ BOOL LLPanelPlaces::postBuild() mFilterEditor->setCommitCallback(boost::bind(&LLPanelPlaces::onFilterEdit, this, _2, false)); } - mPlaceProfile = getChild<LLPanelPlaceProfile>("panel_place_profile"); - mLandmarkInfo = getChild<LLPanelLandmarkInfo>("panel_landmark_info"); + mPlaceProfile = findChild<LLPanelPlaceProfile>("panel_place_profile"); + mLandmarkInfo = findChild<LLPanelLandmarkInfo>("panel_landmark_info"); if (!mPlaceProfile || !mLandmarkInfo) return FALSE; @@ -346,6 +347,8 @@ BOOL LLPanelPlaces::postBuild() void LLPanelPlaces::onOpen(const LLSD& key) { + LLFirstUse::notUsingDestinationGuide(false); + if (!mPlaceProfile || !mLandmarkInfo) return; diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp index f198a411a3..b04971f980 100644 --- a/indra/newview/llpanelprimmediacontrols.cpp +++ b/indra/newview/llpanelprimmediacontrols.cpp @@ -114,7 +114,7 @@ LLPanelPrimMediaControls::LLPanelPrimMediaControls() : mCommitCallbackRegistrar.add("MediaCtrl.SkipBack", boost::bind(&LLPanelPrimMediaControls::onClickSkipBack, this)); mCommitCallbackRegistrar.add("MediaCtrl.SkipForward", boost::bind(&LLPanelPrimMediaControls::onClickSkipForward, this)); - LLUICtrlFactory::getInstance()->buildPanel(this, "panel_prim_media_controls.xml"); + buildFromFile( "panel_prim_media_controls.xml"); mInactivityTimer.reset(); mFadeTimer.stop(); mCurrentZoom = ZOOM_NONE; @@ -1173,7 +1173,7 @@ void LLPanelPrimMediaControls::setCurrentURL() // if (media_address_combo && mCurrentURL != "about:blank") // { // media_address_combo->remove(mCurrentURL); -// media_address_combo->add(mCurrentURL, ADD_SORTED); +// media_address_combo->add(mCurrentURL); // media_address_combo->selectByValue(mCurrentURL); // } #else // USE_COMBO_BOX_FOR_MEDIA_URL diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index 65b9e76a4e..4e63563979 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -127,11 +127,11 @@ BOOL LLPanelProfile::postBuild() getTabCtrl()->setCommitCallback(boost::bind(&LLPanelProfile::onTabSelected, this, _2)); - LLPanelPicks* panel_picks = getChild<LLPanelPicks>(PANEL_PICKS); + LLPanelPicks* panel_picks = findChild<LLPanelPicks>(PANEL_PICKS); panel_picks->setProfilePanel(this); getTabContainer()[PANEL_PICKS] = panel_picks; - getTabContainer()[PANEL_PROFILE] = getChild<LLPanelAvatarProfile>(PANEL_PROFILE); + getTabContainer()[PANEL_PROFILE] = findChild<LLPanelAvatarProfile>(PANEL_PROFILE); return TRUE; } diff --git a/indra/newview/llpanelprofileview.cpp b/indra/newview/llpanelprofileview.cpp index c0f504fef6..dba047660d 100644 --- a/indra/newview/llpanelprofileview.cpp +++ b/indra/newview/llpanelprofileview.cpp @@ -114,7 +114,7 @@ BOOL LLPanelProfileView::postBuild() { LLPanelProfile::postBuild(); - getTabContainer()[PANEL_NOTES] = getChild<LLPanelAvatarNotes>(PANEL_NOTES); + getTabContainer()[PANEL_NOTES] = findChild<LLPanelAvatarNotes>(PANEL_NOTES); //*TODO remove this, according to style guide we don't use status combobox getTabContainer()[PANEL_PROFILE]->getChildView("online_me_status_text")->setVisible( FALSE); diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp index a7cbf52290..9b8167b15a 100644 --- a/indra/newview/llpanelteleporthistory.cpp +++ b/indra/newview/llpanelteleporthistory.cpp @@ -126,7 +126,7 @@ LLTeleportHistoryFlatItem::LLTeleportHistoryFlatItem(S32 index, LLTeleportHistor mRegionName(region_name), mHighlight(hl) { - LLUICtrlFactory::getInstance()->buildPanel(this, "panel_teleport_history_item.xml"); + buildFromFile( "panel_teleport_history_item.xml"); } LLTeleportHistoryFlatItem::~LLTeleportHistoryFlatItem() @@ -377,7 +377,7 @@ LLTeleportHistoryPanel::LLTeleportHistoryPanel() mLastSelectedFlatlList(NULL), mLastSelectedItemIndex(-1) { - LLUICtrlFactory::getInstance()->buildPanel(this, "panel_teleport_history.xml"); + buildFromFile( "panel_teleport_history.xml"); } LLTeleportHistoryPanel::~LLTeleportHistoryPanel() diff --git a/indra/newview/llpaneltopinfobar.cpp b/indra/newview/llpaneltopinfobar.cpp index 0d17fb3e82..a9ca7314ce 100644 --- a/indra/newview/llpaneltopinfobar.cpp +++ b/indra/newview/llpaneltopinfobar.cpp @@ -66,7 +66,7 @@ LLPanelTopInfoBar::LLPanelTopInfoBar(): mParcelChangedObserver(0) LLUICtrl::CommitCallbackRegistry::currentRegistrar() .add("TopInfoBar.Action", boost::bind(&LLPanelTopInfoBar::onContextMenuItemClicked, this, _2)); - LLUICtrlFactory::getInstance()->buildPanel(this, "panel_topinfo_bar.xml"); + buildFromFile( "panel_topinfo_bar.xml"); } LLPanelTopInfoBar::~LLPanelTopInfoBar() diff --git a/indra/newview/llpanelvolumepulldown.cpp b/indra/newview/llpanelvolumepulldown.cpp index f2772b5d88..aea7b33d7f 100644 --- a/indra/newview/llpanelvolumepulldown.cpp +++ b/indra/newview/llpanelvolumepulldown.cpp @@ -54,7 +54,7 @@ LLPanelVolumePulldown::LLPanelVolumePulldown() mCommitCallbackRegistrar.add("Vol.setControlFalse", boost::bind(&LLPanelVolumePulldown::setControlFalse, this, _2)); mCommitCallbackRegistrar.add("Vol.GoAudioPrefs", boost::bind(&LLPanelVolumePulldown::onAdvancedButtonClick, this, _2)); - LLUICtrlFactory::instance().buildPanel(this, "panel_volume_pulldown.xml"); + buildFromFile( "panel_volume_pulldown.xml"); } BOOL LLPanelVolumePulldown::postBuild() diff --git a/indra/newview/llpreviewanim.cpp b/indra/newview/llpreviewanim.cpp index b328f65349..8e8b530e13 100644 --- a/indra/newview/llpreviewanim.cpp +++ b/indra/newview/llpreviewanim.cpp @@ -43,7 +43,6 @@ extern LLAgent gAgent; LLPreviewAnim::LLPreviewAnim(const LLSD& key) : LLPreview( key ) { - //Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this,"floater_preview_animation.xml", FALSE); } // static diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp index 3f4edbaf97..16284d1a7e 100644 --- a/indra/newview/llpreviewgesture.cpp +++ b/indra/newview/llpreviewgesture.cpp @@ -311,9 +311,6 @@ LLPreviewGesture::LLPreviewGesture(const LLSD& key) NONE_LABEL = LLTrans::getString("---"); SHIFT_LABEL = LLTrans::getString("KBShift"); CTRL_LABEL = LLTrans::getString("KBCtrl"); - - //Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this, "floater_preview_gesture.xml", FALSE); - } diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp index e85a6a7094..9f3ee6ac5d 100644 --- a/indra/newview/llpreviewnotecard.cpp +++ b/indra/newview/llpreviewnotecard.cpp @@ -71,7 +71,6 @@ LLPreviewNotecard::LLPreviewNotecard(const LLSD& key) //const LLUUID& item_id, { mAssetID = item->getAssetUUID(); } - //Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this,"floater_preview_notecard.xml", FALSE); } LLPreviewNotecard::~LLPreviewNotecard() diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index d280cf1625..627010bb53 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -151,7 +151,7 @@ LLFloaterScriptSearch::LLFloaterScriptSearch(LLScriptEdCore* editor_core) : LLFloater(LLSD()), mEditorCore(editor_core) { - LLUICtrlFactory::getInstance()->buildFloater(this,"floater_script_search.xml", NULL); + buildFromFile("floater_script_search.xml"); sInstance = this; @@ -654,7 +654,7 @@ void LLScriptEdCore::onBtnDynamicHelp() if (!live_help_floater) { live_help_floater = new LLFloater(LLSD()); - LLUICtrlFactory::getInstance()->buildFloater(live_help_floater, "floater_lsl_guide.xml", NULL); + live_help_floater->buildFromFile("floater_lsl_guide.xml", NULL); LLFloater* parent = dynamic_cast<LLFloater*>(getParent()); llassert(parent); if (parent) @@ -942,7 +942,6 @@ LLPreviewLSL::LLPreviewLSL(const LLSD& key ) mPendingUploads(0) { mFactoryMap["script panel"] = LLCallbackMap(LLPreviewLSL::createScriptEdPanel, this); - //Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this,"floater_script_preview.xml", FALSE); } // virtual @@ -1417,7 +1416,6 @@ LLLiveLSLEditor::LLLiveLSLEditor(const LLSD& key) : mIsNew(false) { mFactoryMap["script ed panel"] = LLCallbackMap(LLLiveLSLEditor::createScriptEdPanel, this); - //Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this,"floater_live_lsleditor.xml", FALSE); } BOOL LLLiveLSLEditor::postBuild() diff --git a/indra/newview/llpreviewsound.cpp b/indra/newview/llpreviewsound.cpp index 6b53b45990..33d2d015ad 100644 --- a/indra/newview/llpreviewsound.cpp +++ b/indra/newview/llpreviewsound.cpp @@ -45,7 +45,6 @@ const F32 SOUND_GAIN = 1.0f; LLPreviewSound::LLPreviewSound(const LLSD& key) : LLPreview( key ) { - //Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this,"floater_preview_sound.xml", FALSE); } // virtual diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp index 1155f35de8..fd6b326ef1 100644 --- a/indra/newview/llpreviewtexture.cpp +++ b/indra/newview/llpreviewtexture.cpp @@ -77,7 +77,6 @@ LLPreviewTexture::LLPreviewTexture(const LLSD& key) { mPreviewToSave = TRUE; } - //Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this, "floater_preview_texture.xml", FALSE); } LLPreviewTexture::~LLPreviewTexture() diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp index cde99f8d7c..aeb0a35ae4 100644 --- a/indra/newview/llprogressview.cpp +++ b/indra/newview/llprogressview.cpp @@ -128,15 +128,10 @@ void LLProgressView::setVisible(BOOL visible) if (getVisible() && !visible) { mFadeTimer.start(); - // hiding progress view, so show menu bars - LLUI::getRootView()->getChildView("menu_bar_holder")->setVisible(TRUE); } // showing progress view else if (!getVisible() && visible) { - // showing progress view, so hide menu bars - LLUI::getRootView()->getChildView("menu_bar_holder")->setVisible(FALSE); - setFocus(TRUE); mFadeTimer.stop(); mProgressTimer.start(); diff --git a/indra/newview/llscrollingpanelparam.cpp b/indra/newview/llscrollingpanelparam.cpp index 2d8c9b0fec..05b273cd29 100644 --- a/indra/newview/llscrollingpanelparam.cpp +++ b/indra/newview/llscrollingpanelparam.cpp @@ -56,7 +56,7 @@ LLScrollingPanelParam::LLScrollingPanelParam( const LLPanel::Params& panel_param mAllowModify(allow_modify), mWearable(wearable) { - LLUICtrlFactory::getInstance()->buildPanel(this, "panel_scrolling_param.xml"); + buildFromFile( "panel_scrolling_param.xml"); // *HACK To avoid hard coding texture position, lets use border's position for texture. LLViewBorder* left_border = getChild<LLViewBorder>("left_border"); diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index b4c1516f71..23e96c22fa 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -31,6 +31,7 @@ #include "llappearancemgr.h" #include "llavataractions.h" #include "llbutton.h" +#include "llfirstuse.h" #include "llinventorybridge.h" #include "llinventoryfunctions.h" #include "llinventorypanel.h" @@ -50,7 +51,7 @@ LLSidepanelInventory::LLSidepanelInventory() mPanelMainInventory(NULL) { - //LLUICtrlFactory::getInstance()->buildPanel(this, "panel_inventory.xml"); // Called from LLRegisterPanelClass::defaultPanelClassBuilder() + //buildFromFile( "panel_inventory.xml"); // Called from LLRegisterPanelClass::defaultPanelClassBuilder() } LLSidepanelInventory::~LLSidepanelInventory() @@ -84,7 +85,7 @@ BOOL LLSidepanelInventory::postBuild() mOverflowBtn = mInventoryPanel->getChild<LLButton>("overflow_btn"); mOverflowBtn->setClickedCallback(boost::bind(&LLSidepanelInventory::onOverflowButtonClicked, this)); - mPanelMainInventory = mInventoryPanel->getChild<LLPanelMainInventory>("panel_main_inventory"); + mPanelMainInventory = mInventoryPanel->findChild<LLPanelMainInventory>("panel_main_inventory"); mPanelMainInventory->setSelectCallback(boost::bind(&LLSidepanelInventory::onSelectionChange, this, _1, _2)); LLTabContainer* tabs = mPanelMainInventory->getChild<LLTabContainer>("inventory filter tabs"); tabs->setCommitCallback(boost::bind(&LLSidepanelInventory::updateVerbs, this)); @@ -102,7 +103,7 @@ BOOL LLSidepanelInventory::postBuild() // UI elements from item panel { - mItemPanel = getChild<LLSidepanelItemInfo>("sidepanel__item_panel"); + mItemPanel = findChild<LLSidepanelItemInfo>("sidepanel__item_panel"); LLButton* back_btn = mItemPanel->getChild<LLButton>("back_btn"); back_btn->setClickedCallback(boost::bind(&LLSidepanelInventory::onBackButtonClicked, this)); @@ -110,7 +111,7 @@ BOOL LLSidepanelInventory::postBuild() // UI elements from task panel { - mTaskPanel = getChild<LLSidepanelTaskInfo>("sidepanel__task_panel"); + mTaskPanel = findChild<LLSidepanelTaskInfo>("sidepanel__task_panel"); if (mTaskPanel) { LLButton* back_btn = mTaskPanel->getChild<LLButton>("back_btn"); @@ -123,6 +124,8 @@ BOOL LLSidepanelInventory::postBuild() void LLSidepanelInventory::onOpen(const LLSD& key) { + LLFirstUse::newInventory(false); + if(key.size() == 0) return; @@ -168,7 +171,7 @@ void LLSidepanelInventory::onShopButtonClicked() void LLSidepanelInventory::performActionOnSelection(const std::string &action) { - LLPanelMainInventory *panel_main_inventory = mInventoryPanel->getChild<LLPanelMainInventory>("panel_main_inventory"); + LLPanelMainInventory *panel_main_inventory = mInventoryPanel->findChild<LLPanelMainInventory>("panel_main_inventory"); LLFolderViewItem* current_item = panel_main_inventory->getActivePanel()->getRootFolder()->getCurSelectedItem(); if (!current_item) { @@ -306,7 +309,7 @@ void LLSidepanelInventory::updateVerbs() bool LLSidepanelInventory::canShare() { LLPanelMainInventory* panel_main_inventory = - mInventoryPanel->getChild<LLPanelMainInventory>("panel_main_inventory"); + mInventoryPanel->findChild<LLPanelMainInventory>("panel_main_inventory"); LLFolderView* root_folder = panel_main_inventory->getActivePanel()->getRootFolder(); @@ -324,7 +327,7 @@ bool LLSidepanelInventory::canShare() LLInventoryItem *LLSidepanelInventory::getSelectedItem() { - LLPanelMainInventory *panel_main_inventory = mInventoryPanel->getChild<LLPanelMainInventory>("panel_main_inventory"); + LLPanelMainInventory *panel_main_inventory = mInventoryPanel->findChild<LLPanelMainInventory>("panel_main_inventory"); LLFolderViewItem* current_item = panel_main_inventory->getActivePanel()->getRootFolder()->getCurSelectedItem(); if (!current_item) { @@ -337,7 +340,7 @@ LLInventoryItem *LLSidepanelInventory::getSelectedItem() U32 LLSidepanelInventory::getSelectedCount() { - LLPanelMainInventory *panel_main_inventory = mInventoryPanel->getChild<LLPanelMainInventory>("panel_main_inventory"); + LLPanelMainInventory *panel_main_inventory = mInventoryPanel->findChild<LLPanelMainInventory>("panel_main_inventory"); std::set<LLUUID> selection_list = panel_main_inventory->getActivePanel()->getRootFolder()->getSelectionList(); return selection_list.size(); } diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp index 731079fb5d..4dc4a34028 100644 --- a/indra/newview/llsidepaneliteminfo.cpp +++ b/indra/newview/llsidepaneliteminfo.cpp @@ -88,8 +88,6 @@ LLSidepanelItemInfo::LLSidepanelItemInfo() : mItemID(LLUUID::null) { mPropertiesObserver = new LLItemPropertiesObserver(this); - - //LLUICtrlFactory::getInstance()->buildFloater(this,"floater_inventory_item_properties.xml"); } // Destroys the object diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index 78890fae93..d8ee345199 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -31,6 +31,8 @@ #include "llagentcamera.h" #include "llappviewer.h" #include "llbottomtray.h" +#include "llfirstuse.h" +#include "llhints.h" #include "llsidetray.h" #include "llviewerwindow.h" #include "llaccordionctrl.h" @@ -416,6 +418,7 @@ void LLSideTray::createButtons () { mCollapseButton = createButton("",sidebar_tab->mImage,sidebar_tab->getTabTitle(), boost::bind(&LLSideTray::onToggleCollapse, this)); + LLHints::registerHintTarget("side_panel_btn", mCollapseButton->getHandle()); } else { @@ -424,6 +427,8 @@ void LLSideTray::createButtons () mTabButtons[name] = button; } } + LLHints::registerHintTarget("inventory_btn", mTabButtons["sidebar_inventory"]->getHandle()); + LLHints::registerHintTarget("dest_guide_btn", mTabButtons["sidebar_places"]->getHandle()); } void LLSideTray::processTriState () @@ -460,6 +465,7 @@ void LLSideTray::onTabButtonClick(string name) void LLSideTray::onToggleCollapse() { + LLFirstUse::notUsingSidePanel(false); if(mCollapsed) { expandSideBar(); diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 975d1f9f32..c56cacd12b 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -794,10 +794,6 @@ bool idle_startup() if (STATE_LOGIN_CLEANUP == LLStartUp::getStartupState()) { - // Move the progress view in front of the UI immediately when login is performed - // this allows not to see main menu after Alt+Tab was pressed while login. EXT-744. - gViewerWindow->moveProgressViewToFront(); - //reset the values that could have come in from a slurl // DEV-42215: Make sure they're not empty -- gUserCredential // might already have been set from gSavedSettings, and it's too bad @@ -1251,9 +1247,6 @@ bool idle_startup() if (!gNoRender) { - // Move the progress view in front of the UI - gViewerWindow->moveProgressViewToFront(); - // direct logging to the debug console's line buffer LLError::logToFixedBuffer(gDebugView->mDebugConsolep); diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index b622e98971..5f7e092afe 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -33,6 +33,7 @@ #include "llagentcamera.h" #include "llbutton.h" #include "llcommandhandler.h" +#include "llfirstuse.h" #include "llviewercontrol.h" #include "llfloaterbuycurrency.h" #include "llbuycurrencyhtml.h" @@ -41,6 +42,7 @@ #include "llpanelvolumepulldown.h" #include "llfloaterregioninfo.h" #include "llfloaterscriptdebug.h" +#include "llhints.h" #include "llhudicon.h" #include "llnavigationbar.h" #include "llkeyboard.h" @@ -134,7 +136,7 @@ LLStatusBar::LLStatusBar(const LLRect& rect) mBalanceTimer = new LLFrameTimer(); mHealthTimer = new LLFrameTimer(); - LLUICtrlFactory::getInstance()->buildPanel(this,"panel_status_bar.xml"); + buildFromFile("panel_status_bar.xml"); } LLStatusBar::~LLStatusBar() @@ -185,6 +187,8 @@ BOOL LLStatusBar::postBuild() mMediaToggle->setClickedCallback( &LLStatusBar::onClickMediaToggle, this ); mMediaToggle->setMouseEnterCallback(boost::bind(&LLStatusBar::onMouseEnterNearbyMedia, this)); + LLHints::registerHintTarget("linden_balance", getChild<LLView>("balance_bg")->getHandle()); + gSavedSettings.getControl("MuteAudio")->getSignal()->connect(boost::bind(&LLStatusBar::onVolumeChanged, this, _2)); // Adding Net Stat Graph @@ -332,6 +336,11 @@ void LLStatusBar::creditBalance(S32 credit) void LLStatusBar::setBalance(S32 balance) { + if (balance > getBalance() && getBalance() != 0) + { + LLFirstUse::receiveLindens(); + } + std::string money_str = LLResMgr::getInstance()->getMonetaryString( balance ); LLTextBox* balance_box = getChild<LLTextBox>("balance"); @@ -454,6 +463,7 @@ void LLStatusBar::onClickBuyCurrency() // open a currency floater - actual one open depends on // value specified in settings.xml LLBuyCurrencyHTML::openCurrencyFloater(); + LLFirstUse::receiveLindens(false); } void LLStatusBar::onMouseEnterVolume() diff --git a/indra/newview/llsyswellitem.cpp b/indra/newview/llsyswellitem.cpp index 4a107fefa8..057d80457c 100644 --- a/indra/newview/llsyswellitem.cpp +++ b/indra/newview/llsyswellitem.cpp @@ -38,7 +38,7 @@ LLSysWellItem::LLSysWellItem(const Params& p) : LLPanel(p), mTitle(NULL), mCloseBtn(NULL) { - LLUICtrlFactory::getInstance()->buildPanel(this, "panel_sys_well_item.xml"); + buildFromFile( "panel_sys_well_item.xml"); mTitle = getChild<LLTextBox>("title"); mCloseBtn = getChild<LLButton>("close_btn"); diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index 750fbe54a7..99342bb564 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -249,7 +249,7 @@ LLIMWellWindow::RowPanel::RowPanel(const LLSysWellWindow* parent, const LLUUID& S32 chicletCounter, const std::string& name, const LLUUID& otherParticipantId) : LLPanel(LLPanel::Params()), mChiclet(NULL), mParent(parent) { - LLUICtrlFactory::getInstance()->buildPanel(this, "panel_activeim_row.xml", NULL); + buildFromFile( "panel_activeim_row.xml", NULL); // Choose which of the pre-created chiclets (IM/group) to use. // The other one gets hidden. @@ -346,7 +346,7 @@ LLIMWellWindow::ObjectRowPanel::ObjectRowPanel(const LLUUID& notification_id, bo : LLPanel() , mChiclet(NULL) { - LLUICtrlFactory::getInstance()->buildPanel(this, "panel_active_object_row.xml", NULL); + buildFromFile( "panel_active_object_row.xml", NULL); initChiclet(notification_id); diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 1625b4bafd..cb9fc4c5fe 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -197,7 +197,6 @@ LLFloaterTexturePicker::LLFloaterTexturePicker( mSelectedItemPinned( FALSE ) { mCanApplyImmediately = can_apply_immediately; - LLUICtrlFactory::getInstance()->buildFloater(this,"floater_texture_ctrl.xml",NULL); setCanMinimize(FALSE); } diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index 749cf2c948..a9ab98da5f 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -77,7 +77,7 @@ LLToast::LLToast(const LLToast::Params& p) { mTimer.reset(new LLToastLifeTimer(this, p.lifetime_secs)); - LLUICtrlFactory::getInstance()->buildFloater(this, "panel_toast.xml", NULL); + buildFromFile("panel_toast.xml", NULL); setCanDrag(FALSE); diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h index b22f3b9d09..0a96c092a0 100644 --- a/indra/newview/lltoast.h +++ b/indra/newview/lltoast.h @@ -188,6 +188,8 @@ public: virtual S32 notifyParent(const LLSD& info); + LLHandle<LLToast> getHandle() { mHandle.bind(this); return mHandle; } + private: void onToastMouseEnter(); @@ -200,6 +202,8 @@ private: LLUUID mSessionID; LLNotificationPtr mNotification; + LLRootHandle<LLToast> mHandle; + LLPanel* mWrapperPanel; // timer counts a lifetime of a toast diff --git a/indra/newview/lltoastgroupnotifypanel.cpp b/indra/newview/lltoastgroupnotifypanel.cpp index 4c75b07ae8..78cc96b353 100644 --- a/indra/newview/lltoastgroupnotifypanel.cpp +++ b/indra/newview/lltoastgroupnotifypanel.cpp @@ -54,7 +54,7 @@ LLToastGroupNotifyPanel::LLToastGroupNotifyPanel(LLNotificationPtr& notification : LLToastPanel(notification), mInventoryOffer(NULL) { - LLUICtrlFactory::getInstance()->buildPanel(this, "panel_group_notify.xml"); + buildFromFile( "panel_group_notify.xml"); const LLSD& payload = notification->getPayload(); LLGroupData groupData; if (!gAgent.getGroupData(payload["group_id"].asUUID(),groupData)) diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp index 82ccca4330..1d8b82ec1b 100644 --- a/indra/newview/lltoastimpanel.cpp +++ b/indra/newview/lltoastimpanel.cpp @@ -45,7 +45,7 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notif mAvatarIcon(NULL), mAvatarName(NULL), mTime(NULL), mMessage(NULL), mGroupIcon(NULL) { - LLUICtrlFactory::getInstance()->buildPanel(this, "panel_instant_message.xml"); + buildFromFile( "panel_instant_message.xml"); mGroupIcon = getChild<LLGroupIconCtrl>("group_icon"); mAvatarIcon = getChild<LLAvatarIconCtrl>("avatar_icon"); diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index ca6efa9d2f..9dd1b3f233 100644 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -61,7 +61,7 @@ mNumButtons(0), mAddedDefaultBtn(false), mCloseNotificationOnDestroy(true) { - LLUICtrlFactory::getInstance()->buildPanel(this, "panel_notification.xml"); + buildFromFile( "panel_notification.xml"); if(rect != LLRect::null) { this->setShape(rect); diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 283669aaef..2e3570a3af 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -2820,25 +2820,21 @@ void LLViewerMediaImpl::handleMediaEvent(LLPluginClassMedia* plugin, LLPluginCla LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_CLICK_LINK_HREF, target is \"" << plugin->getClickTarget() << "\", uri is " << plugin->getClickURL() << LL_ENDL; // retrieve the event parameters std::string url = plugin->getClickURL(); + std::string target = plugin->getClickTarget(); U32 target_type = plugin->getClickTargetType(); - + switch (target_type) { - case LLPluginClassMedia::TARGET_EXTERNAL: - // force url to external browser - LLWeb::loadURLExternal(url); - break; - case LLPluginClassMedia::TARGET_BLANK: - // open in SL media browser or external browser based on user pref - LLWeb::loadURL(url); - break; case LLPluginClassMedia::TARGET_NONE: // ignore this click and let media plugin handle it break; - case LLPluginClassMedia::TARGET_OTHER: - LL_WARNS("LinkTarget") << "Unsupported link target type" << LL_ENDL; + default: + if(gSavedSettings.getBOOL("MediaEnablePopups")) + { + // loadURL now handles distinguishing between _blank, _external, and other named targets. + LLWeb::loadURL(url, target); + } break; - default: break; } }; break; diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index daeace0ec5..e1ce0b384a 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -7262,7 +7262,7 @@ void handle_load_from_xml(void*) { std::string filename = picker.getFirstFile(); LLFloater* floater = new LLFloater(LLSD()); - LLUICtrlFactory::getInstance()->buildFloater(floater, filename, NULL); + floater->buildFromFile(filename); } } diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 92c61ddefe..c0d3d0ee53 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -50,6 +50,7 @@ #include "llagentcamera.h" #include "llcallingcard.h" #include "llbuycurrencyhtml.h" +#include "llfirstuse.h" #include "llfloaterbuyland.h" #include "llfloaterland.h" #include "llfloaterregioninfo.h" @@ -930,6 +931,15 @@ protected: //one global instance to bind them LLOpenTaskOffer* gNewInventoryObserver=NULL; +class LLNewInventoryHintObserver : public LLInventoryAddedObserver +{ +protected: + /*virtual*/ void done() + { + LLFirstUse::newInventory(); + } +}; + void start_new_inventory_observer() { if (!gNewInventoryObserver) //task offer observer @@ -945,6 +955,8 @@ void start_new_inventory_observer() gInventoryMoveObserver = new LLViewerInventoryMoveFromWorldObserver; gInventory.addObserver(gInventoryMoveObserver); } + + gInventory.addObserver(new LLNewInventoryHintObserver()); } class LLDiscardAgentOffer : public LLInventoryFetchItemsObserver @@ -1871,6 +1883,8 @@ void inventory_offer_handler(LLOfferInfo* info) LLPostponedNotification::add<LLPostponedOfferNotification>(p, info->mFromID, false); } } + + LLFirstUse::newInventory(); } bool lure_callback(const LLSD& notification, const LLSD& response) diff --git a/indra/newview/llviewerparcelmedia.cpp b/indra/newview/llviewerparcelmedia.cpp index e9a4c4dd0a..0cb1ad2f39 100644 --- a/indra/newview/llviewerparcelmedia.cpp +++ b/indra/newview/llviewerparcelmedia.cpp @@ -568,6 +568,12 @@ void LLViewerParcelMedia::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_NAME_CHANGED" << LL_ENDL; }; break; + + case MEDIA_EVENT_CLOSE_REQUEST: + { + LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_CLOSE_REQUEST" << LL_ENDL; + } + break; }; } diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 456516ab6b..abe75a1224 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -1544,7 +1544,8 @@ bool LLUIImageList::initFromFile() } UIImageDeclarations images; - LLXUIParser::instance().readXUI(root, images, base_file_path); + LLXUIParser parser; + parser.readXUI(root, images, base_file_path); if (!images.validateBlock()) return false; diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 13db913f60..7459e72646 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -96,6 +96,7 @@ #include "llface.h" #include "llfeaturemanager.h" #include "llfilepicker.h" +#include "llfirstuse.h" #include "llfloater.h" #include "llfloaterbuildoptions.h" #include "llfloaterbuyland.h" @@ -1514,7 +1515,7 @@ void LLViewerWindow::initBase() // (But wait to add it as a child of the root view so that it will be in front of the // other views.) MainPanel* main_view = new MainPanel(); - LLUICtrlFactory::instance().buildPanel(main_view, "main_view.xml"); + main_view->buildFromFile("main_view.xml"); main_view->setShape(full_window); getRootView()->addChild(main_view); @@ -1522,7 +1523,8 @@ void LLViewerWindow::initBase() mWorldViewPlaceholder = main_view->getChildView("world_view_rect")->getHandle(); mNonSideTrayView = main_view->getChildView("non_side_tray_view")->getHandle(); mFloaterViewHolder = main_view->getChildView("floater_view_holder")->getHandle(); - mPopupView = main_view->getChild<LLPopupView>("popup_holder"); + mPopupView = main_view->findChild<LLPopupView>("popup_holder"); + mHintHolder = main_view->getChild<LLView>("hint_holder")->getHandle(); // Constrain floaters to inside the menu and status bar regions. gFloaterView = main_view->getChild<LLFloaterView>("Floater View"); @@ -1560,7 +1562,7 @@ void LLViewerWindow::initBase() LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&LLFloaterPreference::initBusyResponse)); // Add the progress bar view (startup view), which overrides everything - mProgressView = getRootView()->getChild<LLProgressView>("progress_view"); + mProgressView = getRootView()->findChild<LLProgressView>("progress_view"); setShowProgress(FALSE); setProgressCancelButtonVisible(FALSE); @@ -2416,6 +2418,18 @@ void LLViewerWindow::updateUI() static std::string last_handle_msg; + if (gLoggedInTime.getStarted()) + { + if (gLoggedInTime.getElapsedTimeF32() > gSavedSettings.getF32("DestinationGuideHintTimeout")) + { + LLFirstUse::notUsingDestinationGuide(); + } + if (gLoggedInTime.getElapsedTimeF32() > gSavedSettings.getF32("SidePanelHintTimeout")) + { + LLFirstUse::notUsingSidePanel(); + } + } + LLConsole::updateClass(); // animate layout stacks so we have up to date rect for world view @@ -4230,14 +4244,6 @@ BOOL LLViewerWindow::getShowProgress() const return (mProgressView && mProgressView->getVisible()); } -void LLViewerWindow::moveProgressViewToFront() -{ - if( mProgressView && mRootView ) - { - mRootView->sendChildToFront(mProgressView); - } -} - void LLViewerWindow::setProgressString(const std::string& string) { if (mProgressView) diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index 21507699b0..633c3a41d2 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -271,7 +271,6 @@ public: void setShowProgress(const BOOL show); BOOL getShowProgress() const; - void moveProgressViewToFront(); void setProgressString(const std::string& string); void setProgressPercent(const F32 percent); void setProgressMessage(const std::string& msg); @@ -288,6 +287,7 @@ public: void updateWorldViewRect(bool use_full_window=false); LLView* getNonSideTrayView() { return mNonSideTrayView.get(); } LLView* getFloaterViewHolder() { return mFloaterViewHolder.get(); } + LLView* getHintHolder() { return mHintHolder.get(); } BOOL handleKey(KEY key, MASK mask); void handleScrollWheel (S32 clicks); @@ -447,6 +447,7 @@ protected: LLHandle<LLView> mWorldViewPlaceholder; // widget that spans the portion of screen dedicated to rendering the 3d world LLHandle<LLView> mNonSideTrayView; // parent of world view + bottom bar, etc...everything but the side tray LLHandle<LLView> mFloaterViewHolder; // container for floater_view + LLHandle<LLView> mHintHolder; // container for hints LLPopupView* mPopupView; // container for transient popups class LLDebugText* mDebugText; // Internal class for debug text diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp index 54accfe4ee..298e5590d0 100644 --- a/indra/newview/llweb.cpp +++ b/indra/newview/llweb.cpp @@ -78,23 +78,28 @@ void LLWeb::initClass() // static -void LLWeb::loadURL(const std::string& url) +void LLWeb::loadURL(const std::string& url, const std::string& target) { - if (gSavedSettings.getBOOL("UseExternalBrowser")) + if(target == "_internal") + { + // Force load in the internal browser, as if with a blank target. + loadURLInternal(url); + } + else if (gSavedSettings.getBOOL("UseExternalBrowser") || (target == "_external")) { loadURLExternal(url); } else { - loadURLInternal(url); + loadURLInternal(url, target); } } // static -void LLWeb::loadURLInternal(const std::string &url) +void LLWeb::loadURLInternal(const std::string &url, const std::string& target) { - LLFloaterReg::showInstance("media_browser", url); + LLFloaterMediaBrowser::create(url, target); } diff --git a/indra/newview/llweb.h b/indra/newview/llweb.h index 1ba856babe..691b687fef 100644 --- a/indra/newview/llweb.h +++ b/indra/newview/llweb.h @@ -43,11 +43,14 @@ public: static void initClass(); /// Load the given url in the user's preferred web browser - static void loadURL(const std::string& url); + static void loadURL(const std::string& url, const std::string& target); + static void loadURL(const std::string& url) { loadURL(url, LLStringUtil::null); } /// Load the given url in the user's preferred web browser - static void loadURL(const char* url) { loadURL( ll_safe_string(url) ); } + static void loadURL(const char* url, const std::string& target) { loadURL( ll_safe_string(url), target); } + static void loadURL(const char* url) { loadURL( ll_safe_string(url), LLStringUtil::null ); } /// Load the given url in the Second Life internal web browser - static void loadURLInternal(const std::string &url); + static void loadURLInternal(const std::string &url, const std::string& target); + static void loadURLInternal(const std::string &url) { loadURLInternal(url, LLStringUtil::null); } /// Load the given url in the operating system's web browser, async if we want to return immediately /// before browser has spawned static void loadURLExternal(const std::string& url); diff --git a/indra/newview/skins/default/textures/icons/pop_up_caution.png b/indra/newview/skins/default/textures/icons/pop_up_caution.png Binary files differnew file mode 100644 index 0000000000..78b681cb33 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/pop_up_caution.png diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 082b37d80b..8d6a564687 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -645,5 +645,13 @@ with the same filename but different name <texture name="buy_off" file_name="widgets/buy_off.png" preload="true" scale.left="2" scale.top="15" scale.right="67" scale.bottom="4"/> <texture name="buy_over" file_name="widgets/buy_over.png" preload="true" scale.left="2" scale.top="15" scale.right="67" scale.bottom="4"/> <texture name="buy_press" file_name="widgets/buy_press.png" preload="true" scale.left="2" scale.top="15" scale.right="67" scale.bottom="4"/> - + + <texture name="hint_background" file_name="windows/hint_background.png" preload="false" scale.left="8" scale.top="70" scale.right="195" scale.bottom="11"/> + <texture name="hint_arrow_left" file_name="windows/hint_arrow_left.png" preload="false"/> + <texture name="hint_arrow_right" file_name="windows/hint_arrow_right.png" preload="false"/> + <texture name="hint_arrow_up" file_name="windows/hint_arrow_up.png" preload="false"/> + <texture name="hint_arrow_down" file_name="windows/hint_arrow_down.png" preload="false"/> + + <texture name="Yellow_Gradient" file_name="windows/yellow_gradient.png"/> + <texture name="Popup_Caution" file_name="icons/pop_up_caution.png"/> </textures> diff --git a/indra/newview/skins/default/textures/windows/hint_arrow_down.png b/indra/newview/skins/default/textures/windows/hint_arrow_down.png Binary files differnew file mode 100644 index 0000000000..11ab3c2d0c --- /dev/null +++ b/indra/newview/skins/default/textures/windows/hint_arrow_down.png diff --git a/indra/newview/skins/default/textures/windows/hint_arrow_left.png b/indra/newview/skins/default/textures/windows/hint_arrow_left.png Binary files differnew file mode 100644 index 0000000000..e5c597a550 --- /dev/null +++ b/indra/newview/skins/default/textures/windows/hint_arrow_left.png diff --git a/indra/newview/skins/default/textures/windows/hint_arrow_right.png b/indra/newview/skins/default/textures/windows/hint_arrow_right.png Binary files differnew file mode 100644 index 0000000000..3f89187e13 --- /dev/null +++ b/indra/newview/skins/default/textures/windows/hint_arrow_right.png diff --git a/indra/newview/skins/default/textures/windows/hint_arrow_up.png b/indra/newview/skins/default/textures/windows/hint_arrow_up.png Binary files differnew file mode 100644 index 0000000000..1050097efb --- /dev/null +++ b/indra/newview/skins/default/textures/windows/hint_arrow_up.png diff --git a/indra/newview/skins/default/textures/windows/hint_background.png b/indra/newview/skins/default/textures/windows/hint_background.png Binary files differnew file mode 100644 index 0000000000..0839a95205 --- /dev/null +++ b/indra/newview/skins/default/textures/windows/hint_background.png diff --git a/indra/newview/skins/default/textures/windows/yellow_gradient.png b/indra/newview/skins/default/textures/windows/yellow_gradient.png Binary files differnew file mode 100644 index 0000000000..5fd847aaef --- /dev/null +++ b/indra/newview/skins/default/textures/windows/yellow_gradient.png diff --git a/indra/newview/skins/default/xui/da/floater_im_session.xml b/indra/newview/skins/default/xui/da/floater_im_session.xml index aa7df6ad2b..16df7e4b03 100644 --- a/indra/newview/skins/default/xui/da/floater_im_session.xml +++ b/indra/newview/skins/default/xui/da/floater_im_session.xml @@ -1,7 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="panel_im"> <layout_stack name="im_panels"> - <layout_panel label="IM kontrol panel" name="panel_im_control_panel"/> <layout_panel> <line_editor label="Til" name="chat_editor"/> </layout_panel> diff --git a/indra/newview/skins/default/xui/da/floater_voice_controls.xml b/indra/newview/skins/default/xui/da/floater_voice_controls.xml index 2e59dfd649..4c956f13a7 100644 --- a/indra/newview/skins/default/xui/da/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/da/floater_voice_controls.xml @@ -19,10 +19,12 @@ <layout_panel name="my_panel"> <text name="user_text" value="Min avatar:"/> </layout_panel> - <layout_stack name="voice_effect_and_leave_call_stack"> - <layout_panel name="leave_call_btn_panel"> - <button label="Forlad opkald" name="leave_call_btn"/> - </layout_panel> - </layout_stack> + <layout_panel name="leave_call_panel"> + <layout_stack name="voice_effect_and_leave_call_stack"> + <layout_panel name="leave_call_btn_panel"> + <button label="Forlad opkald" name="leave_call_btn"/> + </layout_panel> + </layout_stack> + </layout_panel> </layout_stack> </floater> diff --git a/indra/newview/skins/default/xui/da/panel_notes.xml b/indra/newview/skins/default/xui/da/panel_notes.xml index 5b3a2d0906..00128497ba 100644 --- a/indra/newview/skins/default/xui/da/panel_notes.xml +++ b/indra/newview/skins/default/xui/da/panel_notes.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="Noter & Privatliv" name="panel_notes"> <layout_stack name="layout"> - <panel name="notes_stack"> + <layout_panel name="notes_stack"> <scroll_container name="profile_scroll"> <panel name="profile_scroll_panel"> <text name="status_message" value="Min private noter:"/> @@ -11,13 +11,13 @@ <check_box label="Editére, slette og tage mine objekter" name="objects_check"/> </panel> </scroll_container> - </panel> - <panel name="notes_buttons_panel"> + </layout_panel> + <layout_panel name="notes_buttons_panel"> <button label="Tilføj ven" name="add_friend" tool_tip="Tilbyd venskab til beboer"/> <button label="IM" name="im" tool_tip="Åben session med personlig besked (IM)"/> <button label="Kald" name="call" tool_tip="Opkald til denne beboer"/> <button label="Kort" name="show_on_map_btn" tool_tip="Vis beboer på kort"/> <button label="Teleport" name="teleport" tool_tip="Tilbyd teleport"/> - </panel> + </layout_panel> </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/da/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/da/panel_prim_media_controls.xml index d3b3c7e21e..cfb32500c6 100644 --- a/indra/newview/skins/default/xui/da/panel_prim_media_controls.xml +++ b/indra/newview/skins/default/xui/da/panel_prim_media_controls.xml @@ -13,9 +13,9 @@ 50 </string> <layout_stack name="progress_indicator_area"> - <panel name="media_progress_indicator"> + <layout_panel name="media_progress_indicator"> <progress_bar name="media_progress_bar" tool_tip="Medie hentes"/> - </panel> + </layout_panel> </layout_stack> <layout_stack name="media_controls"> <layout_panel name="back"> diff --git a/indra/newview/skins/default/xui/de/floater_im_session.xml b/indra/newview/skins/default/xui/de/floater_im_session.xml index c69bb600ea..abaf275651 100644 --- a/indra/newview/skins/default/xui/de/floater_im_session.xml +++ b/indra/newview/skins/default/xui/de/floater_im_session.xml @@ -1,7 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="panel_im"> <layout_stack name="im_panels"> - <layout_panel label="IM Steuerkonsole" name="panel_im_control_panel"/> <layout_panel> <line_editor label="An" name="chat_editor"/> </layout_panel> diff --git a/indra/newview/skins/default/xui/de/floater_voice_controls.xml b/indra/newview/skins/default/xui/de/floater_voice_controls.xml index 07b7689cd0..22f2fd93ab 100644 --- a/indra/newview/skins/default/xui/de/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/de/floater_voice_controls.xml @@ -19,10 +19,12 @@ <layout_panel name="my_panel"> <text name="user_text" value="Mein Avatar:"/> </layout_panel> - <layout_stack name="voice_effect_and_leave_call_stack"> - <layout_panel name="leave_call_btn_panel"> - <button label="Anruf beenden" name="leave_call_btn"/> - </layout_panel> - </layout_stack> + <layout_panel name="leave_call_panel"> + <layout_stack name="voice_effect_and_leave_call_stack"> + <layout_panel name="leave_call_btn_panel"> + <button label="Anruf beenden" name="leave_call_btn"/> + </layout_panel> + </layout_stack> + </layout_panel> </layout_stack> </floater> diff --git a/indra/newview/skins/default/xui/de/panel_notifications_channel.xml b/indra/newview/skins/default/xui/de/panel_notifications_channel.xml index e2166f7baf..35bd76ce70 100644 --- a/indra/newview/skins/default/xui/de/panel_notifications_channel.xml +++ b/indra/newview/skins/default/xui/de/panel_notifications_channel.xml @@ -1,15 +1,19 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="notifications_panel"> <layout_stack name="stack1"> - <scroll_list name="notifications_list"> - <column label="Name" name="name"/> - <column label="Inhalt" name="content"/> - <column label="Datum" name="date"/> - </scroll_list> - <scroll_list name="notification_rejects_list"> - <column label="Name" name="name"/> - <column label="Inhalt" name="content"/> - <column label="Datum" name="date"/> - </scroll_list> + <layout_panel name="notifications_list_panel" > + <scroll_list name="notifications_list"> + <column label="Name" name="name"/> + <column label="Inhalt" name="content"/> + <column label="Datum" name="date"/> + </scroll_list> + </layout_panel> + <layout_panel name="rejects_list_panel" > + <scroll_list name="notification_rejects_list"> + <column label="Name" name="name"/> + <column label="Inhalt" name="content"/> + <column label="Datum" name="date"/> + </scroll_list> + </layout_panel> </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/de/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/de/panel_prim_media_controls.xml index 0a19483f8b..c85f2762b1 100644 --- a/indra/newview/skins/default/xui/de/panel_prim_media_controls.xml +++ b/indra/newview/skins/default/xui/de/panel_prim_media_controls.xml @@ -7,9 +7,9 @@ 0.2 </string> <layout_stack name="progress_indicator_area"> - <panel name="media_progress_indicator"> + <layout_panel name="media_progress_indicator"> <progress_bar name="media_progress_bar" tool_tip="Medien werden geladen"/> - </panel> + </layout_panel> </layout_stack> <layout_stack name="media_controls"> <layout_panel name="back"> 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 b365040c20..e7dd62eb64 100644 --- a/indra/newview/skins/default/xui/en/favorites_bar_button.xml +++ b/indra/newview/skins/default/xui/en/favorites_bar_button.xml @@ -22,6 +22,6 @@ pad_right="9" scale_image="true" tab_stop="false" - top="0" + bottom="0" use_ellipses="true" width="140" /> diff --git a/indra/newview/skins/default/xui/en/floater_aaa.xml b/indra/newview/skins/default/xui/en/floater_aaa.xml index cae6146880..930bbaa8cb 100644 --- a/indra/newview/skins/default/xui/en/floater_aaa.xml +++ b/indra/newview/skins/default/xui/en/floater_aaa.xml @@ -20,7 +20,7 @@ <string name="nudge_parabuild" translate="false">Nudge 1</string> <string name="test_the_vlt">This string CHANGE2 is extracted.</string> <string name="testing_eli">Just a test. changes.</string> - <chat_history + <text_editor parse_urls="true" bg_readonly_color="ChatHistoryBgColor" bg_writeable_color="ChatHistoryBgColor" @@ -32,26 +32,51 @@ layout="topleft" height="260" name="chat_history" + max_length="200000" parse_highlights="true" text_color="ChatHistoryTextColor" text_readonly_color="ChatHistoryTextColor" translate="false" + track_end="true" + wrap="true" width="320"> -Really long line that is long enough to wrap once with jyg descenders. -Really long line that is long enough to wrap once with jyg descenders. -Really long line that is long enough to wrap once with jyg descenders. -Really long line that is long enough to wrap once with jyg descenders. -Really long line that is long enough to wrap once with jyg descenders. -Really long line that is long enough to wrap once with jyg descenders. -Really long line that is long enough to wrap once with jyg descenders. -Really long line that is long enough to wrap once with jyg descenders. -Really long line that is long enough to wrap once with jyg descenders. -Really long line that is long enough to wrap once with jyg descenders. -Really long line that is long enough to wrap once with jyg descenders. -Really long line that is long enough to wrap once with jyg descenders. -Really long line that is long enough to wrap once with jyg descenders. -Really long line that is long enough to wrap once with jyg descenders. -Really long line that is long enough to wrap once with jyg descenders. -Really long line that is long enough to wrap once with jyg descenders. - </chat_history> + Really long line that is long enough to wrap once with jyg descenders. + Really long line that is long enough to wrap once with jyg descenders. + Really long line that is long enough to wrap once with jyg descenders. + Really long line that is long enough to wrap once with jyg descenders. + Really long line that is long enough to wrap once with jyg descenders. + Really long line that is long enough to wrap once with jyg descenders. + Really long line that is long enough to wrap once with jyg descenders. + Really long line that is long enough to wrap once with jyg descenders. + Really long line that is long enough to wrap once with jyg descenders. + Really long line that is long enough to wrap once with jyg descenders. + Really long line that is long enough to wrap once with jyg descenders. + Really long line that is long enough to wrap once with jyg descenders. + Really long line that is long enough to wrap once with jyg descenders. + Really long line that is long enough to wrap once with jyg descenders. + Really long line that is long enough to wrap once with jyg descenders. + Really long line that is long enough to wrap once with jyg descenders. + Really long line that is long enough to wrap once with jyg descenders. + Really long line that is long enough to wrap once with jyg descenders. + Really long line that is long enough to wrap once with jyg descenders. + Really long line that is long enough to wrap once with jyg descenders. + Really long line that is long enough to wrap once with jyg descenders. + Really long line that is long enough to wrap once with jyg descenders. + Really long line that is long enough to wrap once with jyg descenders. + Really long line that is long enough to wrap once with jyg descenders. + Really long line that is long enough to wrap once with jyg descenders. + Really long line that is long enough to wrap once with jyg descenders. + Really long line that is long enough to wrap once with jyg descenders. + Really long line that is long enough to wrap once with jyg descenders. + Really long line that is long enough to wrap once with jyg descenders. + Really long line that is long enough to wrap once with jyg descenders. + Really long line that is long enough to wrap once with jyg descenders. + Really long line that is long enough to wrap once with jyg descenders. + Really long line that is long enough to wrap once with jyg descenders. + Really long line that is long enough to wrap once with jyg descenders. + Really long line that is long enough to wrap once with jyg descenders. + Really long line that is long enough to wrap once with jyg descenders. + Really long line that is long enough to wrap once with jyg descenders. + Really long line that is long enough to wrap once with jyg descenders. + </text_editor> </floater> diff --git a/indra/newview/skins/default/xui/en/floater_help_browser.xml b/indra/newview/skins/default/xui/en/floater_help_browser.xml index 214fb6ce54..13017cc803 100644 --- a/indra/newview/skins/default/xui/en/floater_help_browser.xml +++ b/indra/newview/skins/default/xui/en/floater_help_browser.xml @@ -24,6 +24,7 @@ follows="left|right|top|bottom" layout="topleft" left="5" + orientation="vertical" name="stack1" top="20" width="640"> diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml index 6c1214f152..a371e98322 100644 --- a/indra/newview/skins/default/xui/en/floater_im_session.xml +++ b/indra/newview/skins/default/xui/en/floater_im_session.xml @@ -30,12 +30,19 @@ top="20" left="0"> <layout_panel - name="panel_im_control_panel" - layout="topleft" - follows="left" - min_width="115" + name="im_control_panel_holder" + min_width="115" + width="150" + height="320" auto_resize="false" - user_resize="true" /> + user_resize="false"> + <panel + name="panel_im_control_panel" + layout="topleft" + height="320" + width="150" + follows="all"/> + </layout_panel> <layout_panel default_tab_group="3" left="0" diff --git a/indra/newview/skins/default/xui/en/floater_media_browser.xml b/indra/newview/skins/default/xui/en/floater_media_browser.xml index c02d607586..3b78da2a79 100644 --- a/indra/newview/skins/default/xui/en/floater_media_browser.xml +++ b/indra/newview/skins/default/xui/en/floater_media_browser.xml @@ -9,7 +9,7 @@ name="floater_about" help_topic="floater_about" save_rect="true" - single_instance="true" + auto_tile="true" title="MEDIA BROWSER" width="820"> <floater.string @@ -26,6 +26,7 @@ layout="topleft" left="10" name="stack1" + orientation="vertical" top="20" width="800"> <layout_panel @@ -181,6 +182,76 @@ function="MediaBrowser.Assign" /> </button> </layout_panel> + <layout_panel + height="30" + layout="topleft" + name="notification_area" + visible="false" + user_resize="false" + background_visible="true" + bg_alpha_image="Yellow_Gradient" + auto_resize="false" + width="800"> + <layout_stack + top="0" + height="30" + width="800" + left="0" + follows="all" + orientation="horizontal" + > + <layout_panel + height="30"> + <icon value="Popup_Caution" + left="5" + top="7" + width="16" + height="15"/> + <text left_pad="8" + top="10" + height="25" + width="400" + text_color="black" + font="SansSerifSmall" + font.style="BOLD" + name="notification_text" + value="Notification text here" + /> + </layout_panel> + <layout_panel + height="30" + width="270" + auto_resize="false" + name="form_elements"> + <check_box name="enable_check" + left="5" + top="5" + height="20" + width="120" + label="Enable all popups" + text_enabled_color="black" + /> + <button left_pad="5" + width="140" + top="4" + label="Open pop-up window"/> + </layout_panel> + <layout_panel + height="30" + width="25" + auto_resize="false" + name="close_panel"> + <button left="5" + name="close" + width="16" + height="16" + top="8" + image_color="DkGray_66" + image_unselected="Icon_Close_Foreground" + image_selected="Icon_Close_Press"/> + </layout_panel> + </layout_stack> + </layout_panel> <layout_panel height="40" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/floater_notifications_console.xml b/indra/newview/skins/default/xui/en/floater_notifications_console.xml index ca81b9bcf0..e243ccd2f9 100644 --- a/indra/newview/skins/default/xui/en/floater_notifications_console.xml +++ b/indra/newview/skins/default/xui/en/floater_notifications_console.xml @@ -36,6 +36,7 @@ follows="left|right|top|bottom" layout="topleft" left="5" + orientation="vertical" name="notification_channels" right="-5" top="42" /> diff --git a/indra/newview/skins/default/xui/en/floater_voice_controls.xml b/indra/newview/skins/default/xui/en/floater_voice_controls.xml index bf5bd87ad6..a46604c834 100644 --- a/indra/newview/skins/default/xui/en/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/en/floater_voice_controls.xml @@ -86,6 +86,7 @@ visible="true" width="20" /> </layout_panel> + <layout_panel name="leave_call_panel"> <layout_stack clip="true" auto_resize="false" @@ -96,7 +97,7 @@ name="voice_effect_and_leave_call_stack" orientation="horizontal" width="262"> - <panel + <layout_panel class="panel_voice_effect" name="panel_voice_effect" visiblity_control="VoiceMorphingEnabled" @@ -118,6 +119,7 @@ width="100" /> </layout_panel> </layout_stack> + </layout_panel> <layout_panel follows="all" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/main_view.xml b/indra/newview/skins/default/xui/en/main_view.xml index a1ca910cbb..8d9ebf6e06 100644 --- a/indra/newview/skins/default/xui/en/main_view.xml +++ b/indra/newview/skins/default/xui/en/main_view.xml @@ -20,6 +20,7 @@ mouse_opaque="false" name="nav_bar_container" tab_stop="false" + min_height="10" width="1024" user_resize="false" visible="false"> @@ -65,25 +66,24 @@ mouse_opaque="false" name="world_stack" orientation="vertical"> - <panel auto_resize="true" - follows="all" - height="500" - layout="topleft" - tab_stop="false" - mouse_opaque="false" - name="hud container" - width="500"> - <panel auto_resize="false" - follows="left|top" - height="19" - left="0" - mouse_opaque="false" - name="topinfo_bar_container" - tab_stop="false" - top="0" - user_resize="false" - visible="false" - width="1024"/> + <layout_panel auto_resize="true" + follows="all" + height="500" + layout="topleft" + tab_stop="false" + mouse_opaque="false" + user_resize="false" + name="hud container" + width="500"> + <panel follows="left|top" + height="19" + left="0" + mouse_opaque="false" + name="topinfo_bar_container" + tab_stop="false" + top="0" + visible="false" + width="1024"/> <panel follows="right|top|bottom" height="500" mouse_opaque="false" @@ -101,10 +101,10 @@ name="stand_stop_flying_container" visible="false" width="500"/> - </panel> + </layout_panel> <layout_panel auto_resize="false" - follows="all" min_height="33" + height="33" mouse_opaque="false" name="bottom_tray_container" visible="false"/> @@ -112,7 +112,7 @@ </layout_panel> <!-- side tray --> <layout_panel auto_resize="false" - follows="all" + follows="top|bottom" height="500" min_width="333" mouse_opaque="false" @@ -187,15 +187,6 @@ <panel top="0" follows="all" height="768" - mouse_opaque="true" - name="progress_view" - filename="panel_progress.xml" - class="progress_view" - width="1024" - visible="false"/> - <panel top="0" - follows="all" - height="768" mouse_opaque="false" name="popup_holder" class="popup_holder" @@ -208,6 +199,22 @@ bottom="-1" height="11" /> </panel> + <view top="0" + left="0" + width="1024" + height="768" + name="hint_holder" + mouse_opaque="false" + follows="all"/> + <panel top="0" + follows="all" + height="768" + mouse_opaque="true" + name="progress_view" + filename="panel_progress.xml" + class="progress_view" + width="1024" + visible="false"/> <menu_holder top="0" follows="all" height="768" diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 609a9b09be..47bb0fe45b 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -6397,6 +6397,62 @@ Mute everyone? <unique/> </notification> + <notification + name="HintChat" + label="Chat" + type="hint"> + To join the conversation, type into the chat field below. + <unique/> + </notification> + + <notification + name="HintSit" + label="Stand" + type="hint"> + To stand up and exit the sitting position, click the Stand button. + <unique/> + </notification> + + <notification + name="HintDestinationGuide" + label="Explore the World" + type="hint"> + The Destination Guide contains thousands of new places to discover. Select a location and choose Teleport to start exploring. + <unique/> + </notification> + + <notification + name="HintSidePanel" + label="Side Panel" + type="hint"> + Get quick access to your inventory, outfits, profiles and more in the side panel. + <unique/> + </notification> + + <notification + name="HintMove" + label="Move" + type="hint"> + To walk or run, open the Move Panel and use the directional arrows to navigate. You can also use the directional keys on your keyboard. + <unique/> + </notification> + + <notification + name="HintInventory" + label="Inventory" + type="hint"> + Check your inventory to find items. Newest items can be easily found in the Recent tab. + <unique/> + </notification> + + <notification + name="HintLindenDollar" + label="You've got Linden Dollars!" + type="hint"> + Here's your current balance of L$. Click Buy L$ to purchase more Linden Dollars. + <unique/> + </notification> + <global name="UnsupportedCPU"> - Your CPU speed does not meet the minimum requirements. </global> diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index 4b622691b3..b06a72f584 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -29,31 +29,32 @@ orientation="horizontal" top="0" width="1310"> - <icon + <layout_panel auto_resize="false" - follows="left|right" - height="10" - image_name="spacer24.tga" - layout="topleft" - left="0" + user_resize="false" min_width="2" - top="0" width="2" /> <layout_panel auto_resize="false" - filename="panel_nearby_chat_bar.xml" - follows="left|right" - height="28" layout="topleft" - left="0" max_width="320" - min_height="23" min_width="214" + height="28" mouse_opaque="false" - name="chat_bar" - top="4" + name="chat_bar_layout_panel" user_resize="true" - width="308" /> + width="308" > + <panel + name="chat_bar" + filename="panel_nearby_chat_bar.xml" + left="0" + height="28" + width="308" + top="0" + mouse_opaque="false" + follows="left|right" + /> + </layout_panel> <!-- There is resize bar between chatbar and Speak button. It has 2px width (is is set as 2*UIResizeBarOverlap) --> @@ -400,18 +401,10 @@ as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly. width="7" /> </chiclet_panel> </layout_panel> - <icon - auto_resize="false" - color="0 0 0 0" - follows="left|right" - height="10" - image_name="spacer24.tga" - layout="topleft" - left="0" - min_width="4" - name="DUMMY" - top="0" - width="4" /> + <layout_panel auto_resize="false" + user_resize="false" + width="4" + min_width="4"/> <layout_panel auto_resize="false" follows="right" @@ -503,17 +496,11 @@ image_pressed_selected "Lit" + "Selected" - there are new messages and the Well </button> </chiclet_notification> </layout_panel> - <icon + <layout_panel auto_resize="false" - color="0 0 0 0" - follows="left|right" - height="10" - image_name="spacer24.tga" - layout="topleft" - left="0" + user_resize="false" min_width="4" name="DUMMY2" - top="0" width="8" /> </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray_lite.xml b/indra/newview/skins/default/xui/en/panel_bottomtray_lite.xml index 6e9476f814..efb1da4c05 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray_lite.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray_lite.xml @@ -28,30 +28,28 @@ orientation="horizontal" top="0" width="1000"> - <icon + <layout_panel auto_resize="false" - follows="left|right" - height="10" - image_name="spacer24.tga" - layout="topleft" + user_resize="false" min_width="2" - left="0" - top="0" width="2" /> <layout_panel mouse_opaque="false" auto_resize="true" - follows="left|right" height="28" layout="topleft" - left="0" - min_height="23" width="310" - top="4" min_width="188" - name="chat_bar" - user_resize="false" - filename="panel_nearby_chat_bar.xml" /> + user_resize="false"> + <panel + left="0" + filename="panel_nearby_chat_bar.xml" + follows="left|right" + top="4" + width="310" + name="chat_bar" + mouse_opaque="false"/> + </layout_panel> <layout_panel mouse_opaque="false" auto_resize="false" @@ -79,17 +77,11 @@ use_ellipses="true" /> </gesture_combo_list> </layout_panel> - <icon + <layout_panel auto_resize="false" - color="0 0 0 0" - follows="left|right" - height="10" - image_name="spacer24.tga" - layout="topleft" - left="0" + user_resize="false" min_width="3" name="after_gesture_panel" - top="0" width="3"/> </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_group_land_money.xml b/indra/newview/skins/default/xui/en/panel_group_land_money.xml index 76f7484c68..1e1d2d18ca 100644 --- a/indra/newview/skins/default/xui/en/panel_group_land_money.xml +++ b/indra/newview/skins/default/xui/en/panel_group_land_money.xml @@ -60,6 +60,8 @@ left="0" right="-1" top="0" + sort_column="0" + sort_ascending="true" name="group_parcel_list" width="313"> <scroll_list.columns diff --git a/indra/newview/skins/default/xui/en/panel_hint.xml b/indra/newview/skins/default/xui/en/panel_hint.xml new file mode 100644 index 0000000000..839dbc58f2 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_hint.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<panel + width="205" + height="100"> + <text name="hint_title" + font="SansSerifMedium" + left="8" + right="180" + top="8" + bottom="20" + follows="left|right|top" + text_color="White" + wrap="false"/> + <text name="hint_text" + left="8" + right="197" + top="26" + bottom="92" + follows="all" + text_color="White" + wrap="true"/> + <button right="197" + top="8" + width="16" + height="16" + name="close" + follows="right|top" + image_unselected="Icon_Close_Foreground" + image_selected="Icon_Close_Press"/> +</panel> diff --git a/indra/newview/skins/default/xui/en/panel_im_control_panel.xml b/indra/newview/skins/default/xui/en/panel_im_control_panel.xml index 33a5e01e4c..aa0edbfb8a 100644 --- a/indra/newview/skins/default/xui/en/panel_im_control_panel.xml +++ b/indra/newview/skins/default/xui/en/panel_im_control_panel.xml @@ -3,11 +3,11 @@ border="false" height="300" name="panel_im_control_panel" - width="119"> + width="150"> <avatar_icon follows="left|top" height="105" - left_delta="5" + left_delta="20" name="avatar_icon" top="-5" width="114"/> @@ -22,7 +22,7 @@ name="button_stack" orientation="vertical" top_pad="5" - width="114"> + width="145"> <layout_panel mouse_opaque="false" auto_resize="true" @@ -31,7 +31,7 @@ layout="topleft" left="2" min_height="0" - width="109" + width="140" top="0" name="spacer" user_resize="false" /> @@ -41,7 +41,7 @@ height="20" layout="topleft" min_height="20" - width="109" + width="140" name="view_profile_btn_panel" user_resize="false"> <button @@ -50,7 +50,7 @@ label="Profile" name="view_profile_btn" top="0" - width="109" /> + width="140" /> </layout_panel> <layout_panel auto_resize="false" @@ -58,7 +58,7 @@ height="25" layout="topleft" min_height="25" - width="109" + width="140" name="add_friend_btn_panel" user_resize="false"> <button @@ -67,7 +67,7 @@ label="Add Friend" name="add_friend_btn" top="5" - width="109" /> + width="140" /> </layout_panel> <layout_panel auto_resize="false" @@ -75,7 +75,7 @@ height="25" layout="topleft" min_height="25" - width="109" + width="140" name="teleport_btn_panel" user_resize="false"> <button @@ -85,7 +85,7 @@ label="Teleport" name="teleport_btn" tool_tip = "Offer to teleport this person" - width="109" /> + width="140" /> </layout_panel> <layout_panel auto_resize="false" @@ -93,7 +93,7 @@ height="25" layout="topleft" min_height="25" - width="109" + width="140" name="share_btn_panel" user_resize="false"> <button @@ -102,7 +102,7 @@ height="23" label="Share" name="share_btn" - width="109" /> + width="140" /> </layout_panel> <layout_panel auto_resize="false" @@ -110,7 +110,7 @@ height="25" layout="topleft" min_height="25" - width="109" + width="140" name="pay_btn_panel" user_resize="false"> <button @@ -119,7 +119,7 @@ height="23" label="Pay" name="pay_btn" - width="109" /> + width="140" /> </layout_panel> <layout_panel auto_resize="false" @@ -127,7 +127,7 @@ height="25" layout="topleft" min_height="25" - width="109" + width="140" name="call_btn_panel" user_resize="false"> <button @@ -135,7 +135,7 @@ height="23" label="Call" name="call_btn" - width="109" /> + width="140" /> </layout_panel> <layout_panel auto_resize="false" @@ -143,7 +143,7 @@ height="25" layout="topleft" min_height="25" - width="109" + width="140" name="end_call_btn_panel" user_resize="false" visible="false"> @@ -152,7 +152,7 @@ height="23" label="End Call" name="end_call_btn" - width="109" /> + width="140" /> </layout_panel> <layout_panel auto_resize="false" @@ -160,7 +160,7 @@ height="25" layout="topleft" min_height="25" - width="109" + width="140" name="voice_ctrls_btn_panel" user_resize="false" visible="false"> @@ -169,7 +169,7 @@ height="23" label="Voice Controls" name="voice_ctrls_btn" - width="109" /> + width="140" /> </layout_panel> </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_notifications_channel.xml b/indra/newview/skins/default/xui/en/panel_notifications_channel.xml index 3143b0a40c..c3dc588ba2 100644 --- a/indra/newview/skins/default/xui/en/panel_notifications_channel.xml +++ b/indra/newview/skins/default/xui/en/panel_notifications_channel.xml @@ -14,6 +14,9 @@ orientation="horizontal" top="20" width="100"> + <layout_panel name="notifications_list_panel" + width="100" + user_resize="true"> <scroll_list draw_heading="true" follows="left|right|top|bottom" @@ -24,7 +27,6 @@ sort_ascending="false" sort_column="2" top="0" - user_resize="true" width="100"> <scroll_list.columns label="Name" @@ -39,6 +41,10 @@ name="date" width="150" /> </scroll_list> + </layout_panel> + <layout_panel name="rejects_list_panel" + width="100" + user_resize="true"> <scroll_list draw_heading="true" follows="left|right|top|bottom" @@ -49,7 +55,6 @@ sort_ascending="false" sort_column="2" top="0" - user_resize="true" width="100"> <scroll_list.columns label="Name" @@ -64,6 +69,7 @@ name="date" width="150" /> </scroll_list> + </layout_panel> </layout_stack> <button follows="left|right|top" diff --git a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml index cf174da2f0..f5df177b68 100644 --- a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml +++ b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml @@ -183,6 +183,7 @@ It is calculated as border_size + 2*UIResizeBarOverlap follows="all" height="185" width="313" + orientation="vertical" layout="topleft" name="filter_panels" top="0" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_alerts.xml b/indra/newview/skins/default/xui/en/panel_preferences_alerts.xml index 516457dd93..559df5bec9 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_alerts.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_alerts.xml @@ -57,6 +57,8 @@ left="10" multi_select="true" name="enabled_popups" + sort_column="0" + sort_ascending="true" width="495" /> <button enabled_control="FirstSelectedDisabledPopups" @@ -103,6 +105,8 @@ height="140" layout="topleft" left="10" + sort_column="0" + sort_ascending="true" multi_select="true" name="disabled_popups" width="495" /> diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml index 113d5fb6dc..7ae717d0e3 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml @@ -291,7 +291,7 @@ control_name="RenderReflectionDetail" height="23" layout="topleft" - left_="10" + left_delta="10" top_pad ="0" name="Reflections" width="150"> diff --git a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml index 6bf00373ea..b25fd695c9 100644 --- a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml +++ b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml @@ -33,10 +33,9 @@ mouse_opaque="false" layout="topleft" user_resize="false" /> - <panel + <layout_panel name="media_progress_indicator" mouse_opaque="false" - follows="left|right|top" height="8" layout="topleft" left="0" @@ -55,7 +54,7 @@ top="0" left="0" tool_tip="Media is Loading"/> - </panel> + </layout_panel> <layout_panel name="right_bookend_bottom" width="0" diff --git a/indra/newview/skins/default/xui/en/panel_progress.xml b/indra/newview/skins/default/xui/en/panel_progress.xml index 727c5fb7b2..2868d91cc7 100644 --- a/indra/newview/skins/default/xui/en/panel_progress.xml +++ b/indra/newview/skins/default/xui/en/panel_progress.xml @@ -34,6 +34,7 @@ height="768" layout="topleft" left="0" + orientation="vertical" name="stack2" top="0" width="640"> diff --git a/indra/newview/skins/default/xui/en/panel_script_limits_region_memory.xml b/indra/newview/skins/default/xui/en/panel_script_limits_region_memory.xml index 9dff00fa0b..c5e8bf5803 100644 --- a/indra/newview/skins/default/xui/en/panel_script_limits_region_memory.xml +++ b/indra/newview/skins/default/xui/en/panel_script_limits_region_memory.xml @@ -79,6 +79,8 @@ layout="topleft" left_delta="0" multi_select="true" + sort_column="0" + sort_ascending="true" name="scripts_list" top_delta="16" width="460"> 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 ab3cc036d5..e261d6d555 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 @@ -23,6 +23,7 @@ layout="topleft" left_delta="0" name="browser_layout" + orientation="vertical" top_delta="0" width="313"> <web_browser diff --git a/indra/newview/skins/default/xui/en/widgets/hint_popup.xml b/indra/newview/skins/default/xui/en/widgets/hint_popup.xml new file mode 100644 index 0000000000..a9975941af --- /dev/null +++ b/indra/newview/skins/default/xui/en/widgets/hint_popup.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<hint_popup + name="hint" + background_opaque="true" + background_visible="true" + chrome="true" + layout="topleft" + bg_opaque_image="hint_background" + distance="24" + left_arrow="hint_arrow_left" + up_arrow="hint_arrow_up" + right_arrow="hint_arrow_right" + down_arrow="hint_arrow_down" + left_arrow_offset="3" + up_arrow_offset="-2" + right_arrow_offset="-3" + down_arrow_offset="5" + fade_in_time="0.2" + fade_out_time="0.3"> +</hint_popup> diff --git a/indra/newview/skins/default/xui/en/widgets/scroll_bar.xml b/indra/newview/skins/default/xui/en/widgets/scroll_bar.xml index 48bc021e6d..830ea12e41 100644 --- a/indra/newview/skins/default/xui/en/widgets/scroll_bar.xml +++ b/indra/newview/skins/default/xui/en/widgets/scroll_bar.xml @@ -8,18 +8,18 @@ thickness="15"> <up_button image_unselected="ScrollArrow_Up" image_selected="ScrollArrow_Up" - scale_image="true" thickness="15" + scale_image="true" hover_glow_amount="0.35"/> <down_button image_unselected="ScrollArrow_Down" image_selected="ScrollArrow_Down" - scale_image="true" thickness="15" + scale_image="true" hover_glow_amount="0.35"/> <left_button image_unselected="ScrollArrow_Left" image_selected="ScrollArrow_Left" - scale_image="true" thickness="15" + scale_image="true" hover_glow_amount="0.35"/> <right_button image_unselected="ScrollArrow_Right" image_selected="ScrollArrow_Right" - scale_image="true" thickness="15" + scale_image="true" hover_glow_amount="0.35"/> </scroll_bar> diff --git a/indra/newview/skins/default/xui/en/widgets/simple_text_editor.xml b/indra/newview/skins/default/xui/en/widgets/simple_text_editor.xml index 3878c7a144..a120b1aec8 100644 --- a/indra/newview/skins/default/xui/en/widgets/simple_text_editor.xml +++ b/indra/newview/skins/default/xui/en/widgets/simple_text_editor.xml @@ -23,7 +23,4 @@ bg_writeable_color="TextBgWriteableColor" bg_selected_color="EmphasisColor" bg_focus_color="TextBgFocusColor"> - <simple_text_editor.border - bevel_style="in" - follows="all" /> </simple_text_editor> diff --git a/indra/newview/skins/default/xui/en/widgets/text_editor.xml b/indra/newview/skins/default/xui/en/widgets/text_editor.xml index 180120ec89..0f7f50b312 100644 --- a/indra/newview/skins/default/xui/en/widgets/text_editor.xml +++ b/indra/newview/skins/default/xui/en/widgets/text_editor.xml @@ -2,5 +2,4 @@ <!-- Core parameters are in simple_text_editor.xml --> <text_editor parse_urls="false" - text_readonly_color="LabelDisabledColor" show_context_menu="true"/> diff --git a/indra/newview/skins/default/xui/es/floater_im_session.xml b/indra/newview/skins/default/xui/es/floater_im_session.xml index c7312e609b..3d9d17fc81 100644 --- a/indra/newview/skins/default/xui/es/floater_im_session.xml +++ b/indra/newview/skins/default/xui/es/floater_im_session.xml @@ -1,7 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="panel_im"> <layout_stack name="im_panels"> - <layout_panel label="Panel de control de MI" name="panel_im_control_panel"/> <layout_panel> <line_editor label="A" name="chat_editor"/> </layout_panel> diff --git a/indra/newview/skins/default/xui/es/floater_voice_controls.xml b/indra/newview/skins/default/xui/es/floater_voice_controls.xml index 51adeb4dff..6f4782417d 100644 --- a/indra/newview/skins/default/xui/es/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/es/floater_voice_controls.xml @@ -19,10 +19,12 @@ <layout_panel name="my_panel"> <text name="user_text" value="Mi avatar:"/> </layout_panel> - <layout_stack name="voice_effect_and_leave_call_stack"> - <layout_panel name="leave_call_btn_panel"> - <button label="Colgar" name="leave_call_btn"/> - </layout_panel> - </layout_stack> + <layout_panel name="leave_call_panel"> + <layout_stack name="voice_effect_and_leave_call_stack"> + <layout_panel name="leave_call_btn_panel"> + <button label="Colgar" name="leave_call_btn"/> + </layout_panel> + </layout_stack> + </layout_panel> </layout_stack> </floater> diff --git a/indra/newview/skins/default/xui/es/panel_notes.xml b/indra/newview/skins/default/xui/es/panel_notes.xml index 8de2afa767..da98e1b15e 100644 --- a/indra/newview/skins/default/xui/es/panel_notes.xml +++ b/indra/newview/skins/default/xui/es/panel_notes.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="Notas y Privacidad" name="panel_notes"> <layout_stack name="layout"> - <panel name="notes_stack"> + <layout_panel name="notes_stack"> <scroll_container name="profile_scroll"> <panel name="profile_scroll_panel"> <text name="status_message" value="Mis notas privadas:"/> @@ -11,13 +11,13 @@ <check_box label="Edite, borre o coja mis objetos" name="objects_check"/> </panel> </scroll_container> - </panel> - <panel name="notes_buttons_panel"> + </layout_panel> + <layout_panel name="notes_buttons_panel"> <button label="Añadir como amigo" name="add_friend" tool_tip="Ofrecer amistad a este Residente"/> <button label="MI" name="im" tool_tip="Abrir un mensaje instantáneo"/> <button label="Llamar" name="call" tool_tip="Llamar a este Residente"/> <button label="Mapa" name="show_on_map_btn" tool_tip="Mostrar al Residente en el mapa"/> <button label="Teleportar" name="teleport" tool_tip="Ofrecer teleporte"/> - </panel> + </layout_panel> </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/es/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/es/panel_prim_media_controls.xml index 174922e28e..90b9e475e7 100644 --- a/indra/newview/skins/default/xui/es/panel_prim_media_controls.xml +++ b/indra/newview/skins/default/xui/es/panel_prim_media_controls.xml @@ -13,9 +13,9 @@ 50 </string> <layout_stack name="progress_indicator_area"> - <panel name="media_progress_indicator"> + <layout_panel name="media_progress_indicator"> <progress_bar name="media_progress_bar" tool_tip="Los media se están cargando"/> - </panel> + </layout_panel> </layout_stack> <layout_stack name="media_controls"> <layout_panel name="back"> diff --git a/indra/newview/skins/default/xui/fr/floater_im_session.xml b/indra/newview/skins/default/xui/fr/floater_im_session.xml index c3df4a869c..516eb41362 100644 --- a/indra/newview/skins/default/xui/fr/floater_im_session.xml +++ b/indra/newview/skins/default/xui/fr/floater_im_session.xml @@ -1,7 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="panel_im"> <layout_stack name="im_panels"> - <layout_panel label="Panneau de contrôle IM" name="panel_im_control_panel"/> <layout_panel> <line_editor label="À" name="chat_editor"/> </layout_panel> diff --git a/indra/newview/skins/default/xui/fr/floater_voice_controls.xml b/indra/newview/skins/default/xui/fr/floater_voice_controls.xml index 5c26527ed6..8397dc4263 100644 --- a/indra/newview/skins/default/xui/fr/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/fr/floater_voice_controls.xml @@ -19,10 +19,12 @@ <layout_panel name="my_panel"> <text name="user_text" value="Mon avatar :"/> </layout_panel> - <layout_stack name="voice_effect_and_leave_call_stack"> - <layout_panel name="leave_call_btn_panel"> - <button label="Quitter l'appel" name="leave_call_btn"/> - </layout_panel> - </layout_stack> + <layout_panel name="leave_call_panel"> + <layout_stack name="voice_effect_and_leave_call_stack"> + <layout_panel name="leave_call_btn_panel"> + <button label="Quitter l'appel" name="leave_call_btn"/> + </layout_panel> + </layout_stack> + </layout_panel> </layout_stack> </floater> diff --git a/indra/newview/skins/default/xui/fr/panel_notifications_channel.xml b/indra/newview/skins/default/xui/fr/panel_notifications_channel.xml index 5beb71981c..110e017050 100644 --- a/indra/newview/skins/default/xui/fr/panel_notifications_channel.xml +++ b/indra/newview/skins/default/xui/fr/panel_notifications_channel.xml @@ -1,15 +1,19 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="notifications_panel"> <layout_stack name="stack1"> - <scroll_list name="notifications_list"> - <column label="Nom" name="name"/> - <column label="Contenu" name="content"/> - <column label="Date" name="date"/> - </scroll_list> - <scroll_list name="notification_rejects_list"> - <column label="Nom" name="name"/> - <column label="Contenu" name="content"/> - <column label="Date" name="date"/> - </scroll_list> + <layout_panel name="notifications_list_panel" > + <scroll_list name="notifications_list"> + <column label="Nom" name="name"/> + <column label="Contenu" name="content"/> + <column label="Date" name="date"/> + </scroll_list> + </layout_panel> + <layout_panel name="rejects_list_panel" > + <scroll_list name="notification_rejects_list"> + <column label="Nom" name="name"/> + <column label="Contenu" name="content"/> + <column label="Date" name="date"/> + </scroll_list> + </layout_panel> </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/fr/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/fr/panel_prim_media_controls.xml index f6b9bdcb81..f16fcebd02 100644 --- a/indra/newview/skins/default/xui/fr/panel_prim_media_controls.xml +++ b/indra/newview/skins/default/xui/fr/panel_prim_media_controls.xml @@ -7,9 +7,9 @@ 0.2 </string> <layout_stack name="progress_indicator_area"> - <panel name="media_progress_indicator"> + <layout_panel name="media_progress_indicator"> <progress_bar name="media_progress_bar" tool_tip="Le média est en cours de chargement"/> - </panel> + </layout_panel> </layout_stack> <layout_stack name="media_controls"> <layout_panel name="back"> diff --git a/indra/newview/skins/default/xui/it/floater_im_session.xml b/indra/newview/skins/default/xui/it/floater_im_session.xml index 8d395ea04b..3d9d17fc81 100644 --- a/indra/newview/skins/default/xui/it/floater_im_session.xml +++ b/indra/newview/skins/default/xui/it/floater_im_session.xml @@ -1,7 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="panel_im"> <layout_stack name="im_panels"> - <layout_panel label="Pannello di controllo IM" name="panel_im_control_panel"/> <layout_panel> <line_editor label="A" name="chat_editor"/> </layout_panel> diff --git a/indra/newview/skins/default/xui/it/floater_voice_controls.xml b/indra/newview/skins/default/xui/it/floater_voice_controls.xml index d2fd462062..4741d8d32f 100644 --- a/indra/newview/skins/default/xui/it/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/it/floater_voice_controls.xml @@ -19,10 +19,12 @@ <layout_panel name="my_panel"> <text name="user_text" value="Il mio avatar:"/> </layout_panel> - <layout_stack name="voice_effect_and_leave_call_stack"> - <layout_panel name="leave_call_btn_panel"> - <button label="Abbandona chiamata" name="leave_call_btn"/> - </layout_panel> - </layout_stack> + <layout_panel name="leave_call_panel"> + <layout_stack name="voice_effect_and_leave_call_stack"> + <layout_panel name="leave_call_btn_panel"> + <button label="Abbandona chiamata" name="leave_call_btn"/> + </layout_panel> + </layout_stack> + </layout_panel> </layout_stack> </floater> diff --git a/indra/newview/skins/default/xui/it/panel_notes.xml b/indra/newview/skins/default/xui/it/panel_notes.xml index 9ce6b47a32..945bff1603 100644 --- a/indra/newview/skins/default/xui/it/panel_notes.xml +++ b/indra/newview/skins/default/xui/it/panel_notes.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="Note e Privacy" name="panel_notes"> <layout_stack name="layout"> - <panel name="notes_stack"> + <layout_panel name="notes_stack"> <scroll_container name="profile_scroll"> <panel name="profile_scroll_panel"> <text name="status_message" value="Le mie note private:"/> @@ -11,13 +11,13 @@ <check_box label="Modificare, eliminare o prendere i miei oggetti" name="objects_check"/> </panel> </scroll_container> - </panel> - <panel name="notes_buttons_panel"> + </layout_panel> + <layout_panel name="notes_buttons_panel"> <button label="Aggiungi amico" name="add_friend" tool_tip="Offri amicizia a questo residente"/> <button label="IM" name="im" tool_tip="Apri una sessione messaggio istantaneo"/> <button label="Chiama" name="call" tool_tip="Chiama questo residente"/> <button label="Mappa" name="show_on_map_btn" tool_tip="Mostra il residente sulla mappa"/> <button label="Teleport" name="teleport" tool_tip="Offri teleport"/> - </panel> + </layout_panel> </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/it/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/it/panel_prim_media_controls.xml index ef7aaf2e8c..4620d72977 100644 --- a/indra/newview/skins/default/xui/it/panel_prim_media_controls.xml +++ b/indra/newview/skins/default/xui/it/panel_prim_media_controls.xml @@ -13,9 +13,9 @@ 50 </string> <layout_stack name="progress_indicator_area"> - <panel name="media_progress_indicator"> + <layout_panel name="media_progress_indicator"> <progress_bar name="media_progress_bar" tool_tip="L'elemento multimediale è in caricamento"/> - </panel> + </layout_panel> </layout_stack> <layout_stack name="media_controls"> <layout_panel name="back"> diff --git a/indra/newview/skins/default/xui/ja/floater_im_session.xml b/indra/newview/skins/default/xui/ja/floater_im_session.xml index 6646cc0b25..dfa1c85ca2 100644 --- a/indra/newview/skins/default/xui/ja/floater_im_session.xml +++ b/indra/newview/skins/default/xui/ja/floater_im_session.xml @@ -1,7 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="panel_im"> <layout_stack name="im_panels"> - <layout_panel label="IM コントロールパネル" name="panel_im_control_panel"/> <layout_panel> <line_editor label="宛先" name="chat_editor"/> </layout_panel> diff --git a/indra/newview/skins/default/xui/ja/floater_voice_controls.xml b/indra/newview/skins/default/xui/ja/floater_voice_controls.xml index 4b95aa544f..0caca22bc1 100644 --- a/indra/newview/skins/default/xui/ja/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/ja/floater_voice_controls.xml @@ -19,10 +19,12 @@ <layout_panel name="my_panel"> <text name="user_text" value="マイ アバター:"/> </layout_panel> - <layout_stack name="voice_effect_and_leave_call_stack"> - <layout_panel name="leave_call_btn_panel"> - <button label="コール終了" name="leave_call_btn"/> - </layout_panel> - </layout_stack> + <layout_panel name="leave_call_panel"> + <layout_stack name="voice_effect_and_leave_call_stack"> + <layout_panel name="leave_call_btn_panel"> + <button label="コール終了" name="leave_call_btn"/> + </layout_panel> + </layout_stack> + </layout_panel> </layout_stack> </floater> diff --git a/indra/newview/skins/default/xui/ja/panel_notifications_channel.xml b/indra/newview/skins/default/xui/ja/panel_notifications_channel.xml index 5723535fd2..aff427ed49 100644 --- a/indra/newview/skins/default/xui/ja/panel_notifications_channel.xml +++ b/indra/newview/skins/default/xui/ja/panel_notifications_channel.xml @@ -1,15 +1,19 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="notifications_panel"> <layout_stack name="stack1"> - <scroll_list name="notifications_list"> - <column label="名前" name="name"/> - <column label="コンテンツ" name="content"/> - <column label="日付" name="date"/> - </scroll_list> - <scroll_list name="notification_rejects_list"> - <column label="名前" name="name"/> - <column label="コンテンツ" name="content"/> - <column label="日付" name="date"/> - </scroll_list> + <layout_panel name="notifications_list_panel"> + <scroll_list name="notifications_list"> + <column label="名前" name="name"/> + <column label="コンテンツ" name="content"/> + <column label="日付" name="date"/> + </scroll_list> + </layout_panel> + <layout_panel name="rejects_list_panel"> + <scroll_list name="notification_rejects_list"> + <column label="名前" name="name"/> + <column label="コンテンツ" name="content"/> + <column label="日付" name="date"/> + </scroll_list> + </layout_panel> </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/ja/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/ja/panel_prim_media_controls.xml index a9897c7ae4..5506373eb0 100644 --- a/indra/newview/skins/default/xui/ja/panel_prim_media_controls.xml +++ b/indra/newview/skins/default/xui/ja/panel_prim_media_controls.xml @@ -7,9 +7,9 @@ 0.2 </string> <layout_stack name="progress_indicator_area"> - <panel name="media_progress_indicator"> + <layout_panel name="media_progress_indicator"> <progress_bar name="media_progress_bar" tool_tip="ローディング"/> - </panel> + </layout_panel> </layout_stack> <layout_stack name="media_controls"> <layout_panel name="back"> diff --git a/indra/newview/skins/default/xui/pl/floater_im_session.xml b/indra/newview/skins/default/xui/pl/floater_im_session.xml index db513f787c..9041ff7416 100644 --- a/indra/newview/skins/default/xui/pl/floater_im_session.xml +++ b/indra/newview/skins/default/xui/pl/floater_im_session.xml @@ -1,7 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="panel_im"> <layout_stack name="im_panels"> - <layout_panel label="Panel kontroli wiadomości prywatnej (IM)" name="panel_im_control_panel"/> <layout_panel> <line_editor label="Do" name="chat_editor"/> </layout_panel> diff --git a/indra/newview/skins/default/xui/pl/floater_voice_controls.xml b/indra/newview/skins/default/xui/pl/floater_voice_controls.xml index c222e4edbb..80200cfb21 100644 --- a/indra/newview/skins/default/xui/pl/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/pl/floater_voice_controls.xml @@ -19,10 +19,12 @@ <layout_panel name="my_panel"> <text name="user_text" value="Mój awatar:"/> </layout_panel> - <layout_stack name="voice_effect_and_leave_call_stack"> - <layout_panel name="leave_call_btn_panel"> - <button label="Zakończ rozmowę" name="leave_call_btn"/> - </layout_panel> - </layout_stack> + <layout_panel name="leave_call_panel"> + <layout_stack name="voice_effect_and_leave_call_stack"> + <layout_panel name="leave_call_btn_panel"> + <button label="Zakończ rozmowę" name="leave_call_btn"/> + </layout_panel> + </layout_stack> + </layout_panel> </layout_stack> </floater> diff --git a/indra/newview/skins/default/xui/pl/panel_notes.xml b/indra/newview/skins/default/xui/pl/panel_notes.xml index 35cb7e1bce..ec6008065f 100644 --- a/indra/newview/skins/default/xui/pl/panel_notes.xml +++ b/indra/newview/skins/default/xui/pl/panel_notes.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="Notatki & Prywatność" name="panel_notes"> <layout_stack name="layout"> - <panel name="notes_stack"> + <layout_panel name="notes_stack"> <scroll_container name="profile_scroll"> <panel name="profile_scroll_panel"> <text name="status_message" value="Notatki:"/> @@ -11,13 +11,13 @@ <check_box label="Edytowanie, kasowanie lub zabieranie moich obiektów" name="objects_check"/> </panel> </scroll_container> - </panel> - <panel name="notes_buttons_panel"> + </layout_panel> + <layout_panel name="notes_buttons_panel"> <button label="Dodaj do znajomych" name="add_friend" tool_tip="Zaoferuj znajomość Rezydentowi"/> <button label="IM" name="im" tool_tip="Otwórz wiadomości IM"/> <button label="Dzwoń" name="call" tool_tip="Zadzwoń do Rezydenta"/> <button label="Mapa" name="show_on_map_btn" tool_tip="Pokaż Rezydenta na mapie"/> <button label="Teleportuj" name="teleport" tool_tip="Teleportuj"/> - </panel> + </layout_panel> </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/pl/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/pl/panel_prim_media_controls.xml index a1a9be9242..b5763e1291 100644 --- a/indra/newview/skins/default/xui/pl/panel_prim_media_controls.xml +++ b/indra/newview/skins/default/xui/pl/panel_prim_media_controls.xml @@ -13,9 +13,9 @@ 50 </string> <layout_stack name="progress_indicator_area"> - <panel name="media_progress_indicator"> + <layout_panel name="media_progress_indicator"> <progress_bar name="media_progress_bar" tool_tip="Wczytywanie mediów"/> - </panel> + </layout_panel> </layout_stack> <layout_stack name="media_controls"> <layout_panel name="back"> diff --git a/indra/newview/skins/default/xui/pt/floater_im_session.xml b/indra/newview/skins/default/xui/pt/floater_im_session.xml index 39dde3408b..5543ffa41d 100644 --- a/indra/newview/skins/default/xui/pt/floater_im_session.xml +++ b/indra/newview/skins/default/xui/pt/floater_im_session.xml @@ -1,7 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="panel_im"> <layout_stack name="im_panels"> - <layout_panel label="Painel de controle de MI" name="panel_im_control_panel"/> <layout_panel> <line_editor label="Para" name="chat_editor"/> </layout_panel> diff --git a/indra/newview/skins/default/xui/pt/floater_voice_controls.xml b/indra/newview/skins/default/xui/pt/floater_voice_controls.xml index 44f08b76b5..2337ee3074 100644 --- a/indra/newview/skins/default/xui/pt/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/pt/floater_voice_controls.xml @@ -19,10 +19,12 @@ <layout_panel name="my_panel"> <text name="user_text" value="Meu avatar:"/> </layout_panel> - <layout_stack name="voice_effect_and_leave_call_stack"> - <layout_panel name="leave_call_btn_panel"> - <button label="Desligar" name="leave_call_btn"/> - </layout_panel> - </layout_stack> + <layout_panel name="leave_call_panel"> + <layout_stack name="voice_effect_and_leave_call_stack"> + <layout_panel name="leave_call_btn_panel"> + <button label="Desligar" name="leave_call_btn"/> + </layout_panel> + </layout_stack> + </layout_panel> </layout_stack> </floater> diff --git a/indra/newview/skins/default/xui/pt/panel_notes.xml b/indra/newview/skins/default/xui/pt/panel_notes.xml index 9aa842d9a5..6fb614a8c4 100644 --- a/indra/newview/skins/default/xui/pt/panel_notes.xml +++ b/indra/newview/skins/default/xui/pt/panel_notes.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="Anotações e Privacidade" name="panel_notes"> <layout_stack name="layout"> - <panel name="notes_stack"> + <layout_panel name="notes_stack"> <scroll_container name="profile_scroll"> <panel name="profile_scroll_panel"> <text name="status_message" value="Minhas anotações privadas:"/> @@ -11,13 +11,13 @@ <check_box label="Pegar, editar ou excluir objetos meus" name="objects_check"/> </panel> </scroll_container> - </panel> - <panel name="notes_buttons_panel"> + </layout_panel> + <layout_panel name="notes_buttons_panel"> <button label="Adicionar amigo" name="add_friend" tool_tip="Oferecer amizade ao residente"/> <button label="MI" name="im" tool_tip="Abrir sessão de mensagem instantânea"/> <button label="Ligar" name="call" tool_tip="Ligar para este residente"/> <button label="Mapa" name="show_on_map_btn" tool_tip="Exibir o residente no mapa"/> <button label="Teletransportar" name="teleport" tool_tip="Oferecer teletransporte"/> - </panel> + </layout_panel> </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/pt/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/pt/panel_prim_media_controls.xml index a1254b4da0..9e07b6772f 100644 --- a/indra/newview/skins/default/xui/pt/panel_prim_media_controls.xml +++ b/indra/newview/skins/default/xui/pt/panel_prim_media_controls.xml @@ -13,9 +13,9 @@ 50 </string> <layout_stack name="progress_indicator_area"> - <panel name="media_progress_indicator"> + <layout_panel name="media_progress_indicator"> <progress_bar name="media_progress_bar" tool_tip="Carregando mídia"/> - </panel> + </layout_panel> </layout_stack> <layout_stack name="media_controls"> <layout_panel name="back"> |