diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index cb60b4fe3623a940db54e94bc2d78fde83ca35de..0fd6a141876bb03ff36d1b0b9b3306a02b36b782 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -420,8 +420,9 @@ BOOL LLTextBase::handleToolTipForUrl(LLView *view, S32 x, S32 y, std::string& ms LLToolTipMgr::instance().show(LLToolTipParams() .message(tooltip_msg) .sticky_rect(sticky_rect_screen)); + return TRUE; } - return TRUE; + return FALSE; } LLContextMenu *LLTextBase::createUrlContextMenu(const std::string &in_url) diff --git a/indra/llui/lltextbox.cpp b/indra/llui/lltextbox.cpp index 9de474a4f55949da28245412fbf80ab8a00208c2..d6ae9e063e1c451b9e84d4633686efc0e622b75f 100644 --- a/indra/llui/lltextbox.cpp +++ b/indra/llui/lltextbox.cpp @@ -161,7 +161,12 @@ BOOL LLTextBox::handleHover(S32 x, S32 y, MASK mask) BOOL LLTextBox::handleToolTip(S32 x, S32 y, std::string& msg, LLRect& sticky_rect_screen) { - return handleToolTipForUrl(this, x, y, msg, sticky_rect_screen); + if (handleToolTipForUrl(this, x, y, msg, sticky_rect_screen)) + { + return TRUE; + } + + return LLUICtrl::handleToolTip(x, y, msg, sticky_rect_screen); } void LLTextBox::setText(const LLStringExplicit& text) diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 983777b747b7d8e964391e0951444f3260187178..8d5f277b59eb88ee5c1a3507dced1675d34d4df2 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -1120,21 +1120,12 @@ void LLTextEditor::updateCursorXPos() } // constraint cursor to editable segments of document +// NOTE: index must be within document range S32 LLTextEditor::getEditableIndex(S32 index, bool increasing_direction) { - //// always allow editable position at end of doc - //if (index == getLength()) - //{ - // return index; - //} - segment_set_t::iterator segment_iter; S32 offset; getSegmentAndOffset(index, &segment_iter, &offset); - if (segment_iter == mSegments.end()) - { - return 0; - } LLTextSegmentPtr segmentp = *segment_iter; @@ -3194,7 +3185,11 @@ void LLTextEditor::draw() drawLineNumbers(); { - LLLocalClipRect clip(mTextRect); + // pad clipping rectangle so that cursor can draw at full width + // when at left edge of mTextRect + LLRect clip_rect(mTextRect); + clip_rect.stretch(1); + LLLocalClipRect clip(clip_rect); drawSelectionBackground(); drawPreeditMarker(); drawText(); diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 8d723877d62d305e8d68e184701edd163ba22d3d..256c7762934e6b826b6b11e678634a8a9860e03b 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -675,9 +675,13 @@ LLView* LLView::childrenHandleToolTip(S32 x, S32 y, std::string& msg, LLRect& st LLView* viewp = *child_it; S32 local_x = x - viewp->getRect().mLeft; S32 local_y = y - viewp->getRect().mBottom; - if(viewp->pointInView(local_x, local_y) && - viewp->getVisible() && - viewp->handleToolTip(local_x, local_y, msg, sticky_rect_screen) ) + if(!viewp->pointInView(local_x, local_y) || + !viewp->getVisible()) + { + continue; + } + + if(viewp->handleToolTip(local_x, local_y, msg, sticky_rect_screen) ) { if (sDebugMouseHandling) { @@ -687,17 +691,22 @@ LLView* LLView::childrenHandleToolTip(S32 x, S32 y, std::string& msg, LLRect& st handled_view = viewp; break; } + + if( viewp->blockMouseEvent(x, y) ) + { + handled_view = viewp; + } } return handled_view; } BOOL LLView::handleToolTip(S32 x, S32 y, std::string& msg, LLRect& sticky_rect_screen) { - LLView* child_handler = childrenHandleToolTip(x, y, msg, sticky_rect_screen); - BOOL handled = child_handler != NULL; + BOOL handled = FALSE; - // child widgets get priority on tooltips - if (!handled && !mToolTipMsg.empty()) + // parents provide tooltips first, which are optionally + // overridden by children + if (!mToolTipMsg.empty()) { // allow "scrubbing" over ui by showing next tooltip immediately // if previous one was still visible @@ -712,7 +721,9 @@ BOOL LLView::handleToolTip(S32 x, S32 y, std::string& msg, LLRect& sticky_rect_s handled = TRUE; } - if( blockMouseEvent(x, y) ) + // child tooltips will override our own + LLView* child_handler = childrenHandleToolTip(x, y, msg, sticky_rect_screen); + if (child_handler) { handled = TRUE; } diff --git a/indra/newview/llfloaterinventory.cpp b/indra/newview/llfloaterinventory.cpp index 45a42f994d44df333be55caa37b5d8b56afe6caf..6a3a6c95140bfbc703b14ecd203fa2f7800b7b82 100644 --- a/indra/newview/llfloaterinventory.cpp +++ b/indra/newview/llfloaterinventory.cpp @@ -569,16 +569,7 @@ void LLFloaterInventory::draw() { if (LLInventoryModel::isEverythingFetched()) { - LLLocale locale(LLLocale::USER_LOCALE); - std::ostringstream title; - //title << "Inventory"; - title<<getString("Title"); - std::string item_count_string; - LLResMgr::getInstance()->getIntegerString(item_count_string, gInventory.getItemCount()); - title << " (" << item_count_string << getString("Items")<<")"; - //TODO:: Translate mFilterText - title << mFilterText; - setTitle(title.str()); + updateTitle(); } LLFloater::draw(); } @@ -690,22 +681,30 @@ BOOL LLFloaterInventory::handleKeyHere(KEY key, MASK mask) } -void LLFloaterInventory::changed(U32 mask) +void LLFloaterInventory::updateTitle() { - std::ostringstream title; - //title << "Inventory"; - title<<getString("Title"); + LLLocale locale(LLLocale::USER_LOCALE); + std::string item_count_string; + LLResMgr::getInstance()->getIntegerString(item_count_string, gInventory.getItemCount()); + + LLStringUtil::format_map_t string_args; + string_args["[ITEM_COUNT]"] = item_count_string; + string_args["[FILTER]"] = mFilterText; + if (LLInventoryModel::backgroundFetchActive()) { - LLLocale locale(LLLocale::USER_LOCALE); - std::string item_count_string; - LLResMgr::getInstance()->getIntegerString(item_count_string, gInventory.getItemCount()); - title << " ( "<< getString("Fetched") << item_count_string << getString("Items")<<")"; + setTitle(getString("TitleFetching", string_args)); } - //TODO:: Translate mFilterText - title << mFilterText; - setTitle(title.str()); + else + { + setTitle(getString("TitleCompleted", string_args)); + } +} + +void LLFloaterInventory::changed(U32 mask) +{ + updateTitle(); } //---------------------------------------------------------------------------- diff --git a/indra/newview/llfloaterinventory.h b/indra/newview/llfloaterinventory.h index fd61e121ead3d41c8652b0d4292657fa78c11f3c..a40efe020bf1cdb705b6b7071e8e80bceb5dccaf 100644 --- a/indra/newview/llfloaterinventory.h +++ b/indra/newview/llfloaterinventory.h @@ -291,6 +291,9 @@ friend class LLFloaterInventoryFinder; LLSaveFolderState* mSavedFolderState; std::string mFilterText; + +private: + void updateTitle(); }; class LLSelectFirstFilteredItem : public LLFolderViewFunctor diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index b256914d296447d673bcd5cf4b607fd1982723fa..0ecdec65d6d79a63a87ce627a962a2ccea69b67f 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -289,8 +289,37 @@ LLScriptEdCore::LLScriptEdCore( setFollowsAll(); setBorderVisible(FALSE); - - LLUICtrlFactory::getInstance()->buildPanel(this, "panel_script_ed.xml"); + setXMLFilename("panel_script_ed.xml"); +} + +LLScriptEdCore::~LLScriptEdCore() +{ + deleteBridges(); + + // If the search window is up for this editor, close it. + LLFloaterScriptSearch* script_search = LLFloaterScriptSearch::getInstance(); + if (script_search && script_search->getEditorCore() == this) + { + script_search->closeFloater(); + delete script_search; + } +} + +BOOL LLScriptEdCore::postBuild() +{ + mErrorList = getChild<LLScrollListCtrl>("lsl errors"); + + mFunctions = getChild<LLComboBox>( "Insert..."); + + childSetCommitCallback("Insert...", &LLScriptEdCore::onBtnInsertFunction, this); + + mEditor = getChild<LLViewerTextEditor>("Script Editor"); + + childSetCommitCallback("lsl errors", &LLScriptEdCore::onErrorList, this); + childSetAction("Save_btn", boost::bind(&LLScriptEdCore::doSave,this,FALSE)); + + initMenu(); + std::vector<std::string> funcs; std::vector<std::string> tooltips; @@ -360,36 +389,7 @@ LLScriptEdCore::LLScriptEdCore( { mFunctions->add(*iter); } -} - -LLScriptEdCore::~LLScriptEdCore() -{ - deleteBridges(); - - // If the search window is up for this editor, close it. - LLFloaterScriptSearch* script_search = LLFloaterScriptSearch::getInstance(); - if (script_search && script_search->getEditorCore() == this) - { - script_search->closeFloater(); - delete script_search; - } -} -BOOL LLScriptEdCore::postBuild() -{ - - mErrorList = getChild<LLScrollListCtrl>("lsl errors"); - - mFunctions = getChild<LLComboBox>( "Insert..."); - - childSetCommitCallback("Insert...", &LLScriptEdCore::onBtnInsertFunction, this); - - mEditor = getChild<LLViewerTextEditor>("Script Editor"); - - childSetCommitCallback("lsl errors", &LLScriptEdCore::onErrorList, this); - childSetAction("Save_btn", boost::bind(&LLScriptEdCore::doSave,this,FALSE)); - - initMenu(); return TRUE; } diff --git a/indra/newview/lltoolgun.cpp b/indra/newview/lltoolgun.cpp index 8accf6babf253f7e291d2b7117c404a923aa0dd0..53d71a42cfaea534cd54cde2d4b8ab15e70c76a1 100644 --- a/indra/newview/lltoolgun.cpp +++ b/indra/newview/lltoolgun.cpp @@ -140,7 +140,7 @@ void LLToolGun::draw() { LLUIImagePtr crosshair = LLUI::getUIImage("crosshairs.tga"); crosshair->draw( - ( gViewerWindow->getWorldViewWidth() - crosshair->getWidth() ) / 2, - ( gViewerWindow->getWorldViewHeight() - crosshair->getHeight() ) / 2); + ( gViewerWindow->getVirtualWorldViewRect().getWidth() - crosshair->getWidth() ) / 2, + ( gViewerWindow->getVirtualWorldViewRect().getHeight() - crosshair->getHeight() ) / 2); } } diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 70f2331efadd71af5d7068b0a9ca747c04618222..2ebf803e5ef7e6722daa03ea497407dd44ba0e96 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -7966,7 +7966,7 @@ void initialize_menus() view_listener_t::addMenu(new LLAdvancedForceErrorInfiniteLoop(), "Advanced.ForceErrorInfiniteLoop"); view_listener_t::addMenu(new LLAdvancedForceErrorSoftwareException(), "Advanced.ForceErrorSoftwareException"); view_listener_t::addMenu(new LLAdvancedForceErrorDriverCrash(), "Advanced.ForceErrorDriverCrash"); - view_listener_t::addMenu(new LLAdvancedForceErrorDriverCrash(), "Advanced.ForceErrorDisconnectViewer"); + view_listener_t::addMenu(new LLAdvancedForceErrorDisconnectViewer(), "Advanced.ForceErrorDisconnectViewer"); // Advanced (toplevel) view_listener_t::addMenu(new LLAdvancedToggleShowObjectUpdates(), "Advanced.ToggleShowObjectUpdates"); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index fd6ffbe07a239cd7913e91e11f4de28c7fc48a0e..5fd53979706d4c79d6c1dbf7ab8cb35da413528b 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -4122,8 +4122,8 @@ void LLViewerWindow::drawMouselookInstructions() font->renderUTF8( instructions, 0, - mWorldViewRect.getCenterX(), - mWorldViewRect.mBottom + INSTRUCTIONS_PAD, + getVirtualWorldViewRect().getCenterX(), + getVirtualWorldViewRect().mBottom + INSTRUCTIONS_PAD, LLColor4( 0.0f, 0.0f, 0.0f, 0.6f ), LLFontGL::HCENTER, LLFontGL::TOP); } diff --git a/indra/newview/skins/default/xui/en/floater_inventory.xml b/indra/newview/skins/default/xui/en/floater_inventory.xml index 4826941b5857b2002064311733758dfa3169271a..0f06558dd1ffeec3cb8590f469f43ecbeb4d904a 100644 --- a/indra/newview/skins/default/xui/en/floater_inventory.xml +++ b/indra/newview/skins/default/xui/en/floater_inventory.xml @@ -18,8 +18,12 @@ Inventory </floater.string> <floater.string - name="Items"> - Items... + name="TitleFetching"> + Inventory (Fetching [ITEM_COUNT] Items...) [FILTER] + </floater.string> + <floater.string + name="TitleCompleted"> + Inventory ([ITEM_COUNT] Items) [FILTER] </floater.string> <floater.string name="Fetched"> diff --git a/indra/newview/skins/default/xui/en/floater_live_lsleditor.xml b/indra/newview/skins/default/xui/en/floater_live_lsleditor.xml index fac8fdbefacc6299088b9f7d7d481e9357d6e5f2..dc6c8302a0a3b59ca88f326cb6a568d9c7e99021 100644 --- a/indra/newview/skins/default/xui/en/floater_live_lsleditor.xml +++ b/indra/newview/skins/default/xui/en/floater_live_lsleditor.xml @@ -4,7 +4,7 @@ border_style="line" can_resize="true" follows="left|top" - height="550" + height="570" layout="topleft" min_height="271" min_width="290" @@ -31,9 +31,9 @@ label="Reset" label_selected="Reset" layout="topleft" - left="362" + left="358" name="Reset" - top="525" + top="545" width="128" /> <check_box enabled="false"