summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llui/lltextbase.cpp3
-rw-r--r--indra/llui/lltextbox.cpp7
-rw-r--r--indra/llui/lltexteditor.cpp17
-rw-r--r--indra/llui/llview.cpp27
-rw-r--r--indra/newview/llfloaterinventory.cpp41
-rw-r--r--indra/newview/llfloaterinventory.h3
-rw-r--r--indra/newview/llpreviewscript.cpp62
-rw-r--r--indra/newview/lltoolgun.cpp4
-rw-r--r--indra/newview/llviewermenu.cpp2
-rw-r--r--indra/newview/llviewerwindow.cpp4
-rw-r--r--indra/newview/skins/default/xui/en/floater_inventory.xml8
-rw-r--r--indra/newview/skins/default/xui/en/floater_live_lsleditor.xml6
12 files changed, 101 insertions, 83 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index cb60b4fe36..0fd6a14187 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 9de474a4f5..d6ae9e063e 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 983777b747..8d5f277b59 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 8d723877d6..256c776293 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 45a42f994d..6a3a6c9514 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 fd61e121ea..a40efe020b 100644
--- a/indra/newview/llfloaterinventory.h
+++ b/indra/newview/llfloaterinventory.h
@@ -291,6 +291,9 @@ protected:
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 b256914d29..0ecdec65d6 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 8accf6babf..53d71a42cf 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 70f2331efa..2ebf803e5e 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 fd6ffbe07a..5fd5397970 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 4826941b58..0f06558dd1 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 fac8fdbefa..dc6c8302a0 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"