summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorAnkur Ahlawat <anchor@lindenlab.com>2017-11-16 01:59:00 -0800
committerAnkur Ahlawat <anchor@lindenlab.com>2017-11-16 01:59:00 -0800
commit93100236ae34eaa9cd3fa314e7e770339c13eba7 (patch)
treee384d0f81f46900a95a33d0b6b92cbf285e624bf /indra/llui
parenta416dee2cc8c802bba24803c43805fd7fa0f484c (diff)
parentb6d22de58850fc9a5b34eeb5b7930e5845bfc42d (diff)
Merged lindenlab/viewer-release into default
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llaccordionctrltab.cpp5
-rw-r--r--indra/llui/llfolderview.cpp12
-rw-r--r--indra/llui/llfolderview.h12
-rw-r--r--indra/llui/llfolderviewitem.cpp5
-rw-r--r--indra/llui/llfolderviewmodel.h4
-rw-r--r--indra/llui/llmenugl.cpp3
-rw-r--r--indra/llui/llnotifications.cpp24
-rw-r--r--indra/llui/llnotifications.h8
-rw-r--r--indra/llui/llnotificationtemplate.h3
-rw-r--r--indra/llui/llscrollcontainer.cpp50
-rw-r--r--indra/llui/llscrollcontainer.h6
-rw-r--r--indra/llui/llscrolllistctrl.cpp15
-rw-r--r--indra/llui/llscrolllistctrl.h2
-rw-r--r--indra/llui/llspinctrl.cpp26
-rw-r--r--indra/llui/llspinctrl.h1
-rw-r--r--indra/llui/llxuiparser.cpp36
16 files changed, 169 insertions, 43 deletions
diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp
index f8ef5289db..eaf1284237 100644
--- a/indra/llui/llaccordionctrltab.cpp
+++ b/indra/llui/llaccordionctrltab.cpp
@@ -823,6 +823,11 @@ BOOL LLAccordionCtrlTab::handleKey(KEY key, MASK mask, BOOL called_from_parent)
void LLAccordionCtrlTab::showAndFocusHeader()
{
+ if (!mHeader)
+ {
+ return;
+ }
+
mHeader->setFocus(true);
mHeader->setSelected(mSelectionEnabled);
diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp
index f9664e0658..895753aeae 100644
--- a/indra/llui/llfolderview.cpp
+++ b/indra/llui/llfolderview.cpp
@@ -102,6 +102,18 @@ void LLCloseAllFoldersFunctor::doFolder(LLFolderViewFolder* folder)
void LLCloseAllFoldersFunctor::doItem(LLFolderViewItem* item)
{ }
+//---------------------------------------------------------------------------
+
+void LLAllDescendentsPassedFilter::doFolder(LLFolderViewFolder* folder)
+{
+ mAllDescendentsPassedFilter &= (folder) && (folder->passedFilter()) && (folder->descendantsPassedFilter());
+}
+
+void LLAllDescendentsPassedFilter::doItem(LLFolderViewItem* item)
+{
+ mAllDescendentsPassedFilter &= (item) && (item->passedFilter());
+}
+
///----------------------------------------------------------------------------
/// Class LLFolderViewScrollContainer
///----------------------------------------------------------------------------
diff --git a/indra/llui/llfolderview.h b/indra/llui/llfolderview.h
index b5deefd653..2926e160d0 100644
--- a/indra/llui/llfolderview.h
+++ b/indra/llui/llfolderview.h
@@ -400,6 +400,18 @@ public:
virtual void doItem(LLFolderViewItem* item);
};
+class LLAllDescendentsPassedFilter : public LLFolderViewFunctor
+{
+public:
+ LLAllDescendentsPassedFilter() : mAllDescendentsPassedFilter(true) {}
+ /*virtual*/ ~LLAllDescendentsPassedFilter() {}
+ /*virtual*/ void doFolder(LLFolderViewFolder* folder);
+ /*virtual*/ void doItem(LLFolderViewItem* item);
+ bool allDescendentsPassedFilter() const { return mAllDescendentsPassedFilter; }
+protected:
+ bool mAllDescendentsPassedFilter;
+};
+
// Flags for buildContextMenu()
const U32 SUPPRESS_OPEN_ITEM = 0x1;
const U32 FIRST_SELECTED_ITEM = 0x2;
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp
index 3d618548c4..0510e472c5 100644
--- a/indra/llui/llfolderviewitem.cpp
+++ b/indra/llui/llfolderviewitem.cpp
@@ -1176,6 +1176,11 @@ BOOL LLFolderViewFolder::needsArrange()
return mLastArrangeGeneration < getRoot()->getArrangeGeneration();
}
+bool LLFolderViewFolder::descendantsPassedFilter(S32 filter_generation)
+{
+ return getViewModelItem()->descendantsPassedFilter(filter_generation);
+}
+
// Passes selection information on to children and record selection
// information if necessary.
BOOL LLFolderViewFolder::setSelection(LLFolderViewItem* selection, BOOL openitem,
diff --git a/indra/llui/llfolderviewmodel.h b/indra/llui/llfolderviewmodel.h
index 641241a88c..f71a88c56e 100644
--- a/indra/llui/llfolderviewmodel.h
+++ b/indra/llui/llfolderviewmodel.h
@@ -147,6 +147,10 @@ public:
virtual const std::string& getDisplayName() const = 0;
virtual const std::string& getSearchableName() const = 0;
+ virtual std::string getSearchableDescription() const = 0;
+ virtual std::string getSearchableCreatorName()const = 0;
+ virtual std::string getSearchableUUIDString() const = 0;
+
virtual LLPointer<LLUIImage> getIcon() const = 0;
virtual LLPointer<LLUIImage> getIconOpen() const { return getIcon(); }
virtual LLPointer<LLUIImage> getIconOverlay() const { return NULL; }
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index 022f814bbc..0d42f726fa 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -3331,6 +3331,7 @@ BOOL LLMenuBarGL::handleAcceleratorKey(KEY key, MASK mask)
if (getHighlightedItem())
{
clearHoverItem();
+ LLMenuGL::setKeyboardMode(FALSE);
}
else
{
@@ -3777,10 +3778,10 @@ BOOL LLMenuHolderGL::hideMenus()
{
return FALSE;
}
+ LLMenuGL::setKeyboardMode(FALSE);
BOOL menu_visible = hasVisibleMenu();
if (menu_visible)
{
- LLMenuGL::setKeyboardMode(FALSE);
// clicked off of menu, hide them all
for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it)
{
diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp
index 604092d536..7bafd711cb 100644
--- a/indra/llui/llnotifications.cpp
+++ b/indra/llui/llnotifications.cpp
@@ -67,7 +67,8 @@ LLNotificationForm::FormIgnore::FormIgnore()
: text("text"),
control("control"),
invert_control("invert_control", false),
- save_option("save_option", false)
+ save_option("save_option", false),
+ session_only("session_only", false)
{}
LLNotificationForm::FormButton::FormButton()
@@ -125,6 +126,7 @@ bool handleIgnoredNotification(const LLSD& payload)
switch(form->getIgnoreType())
{
case LLNotificationForm::IGNORE_WITH_DEFAULT_RESPONSE:
+ case LLNotificationForm::IGNORE_WITH_DEFAULT_RESPONSE_SESSION_ONLY:
response = pNotif->getResponseTemplate(LLNotification::WITH_DEFAULT_BUTTON);
break;
case LLNotificationForm::IGNORE_WITH_LAST_RESPONSE:
@@ -197,7 +199,7 @@ LLNotificationForm::LLNotificationForm(const std::string& name, const LLNotifica
if (!p.ignore.save_option)
{
- mIgnore = IGNORE_WITH_DEFAULT_RESPONSE;
+ mIgnore = p.ignore.session_only ? IGNORE_WITH_DEFAULT_RESPONSE_SESSION_ONLY : IGNORE_WITH_DEFAULT_RESPONSE;
}
else
{
@@ -426,6 +428,7 @@ LLNotificationTemplate::LLNotificationTemplate(const LLNotificationTemplate::Par
mLogToChat(p.log_to_chat),
mLogToIM(p.log_to_im),
mShowToast(p.show_toast),
+ mFadeToast(p.fade_toast),
mSoundName("")
{
if (p.sound.isProvided()
@@ -942,6 +945,11 @@ bool LLNotification::canShowToast() const
return mTemplatep->mShowToast;
}
+bool LLNotification::canFadeToast() const
+{
+ return mTemplatep->mFadeToast;
+}
+
bool LLNotification::hasFormElements() const
{
return mTemplatep->mForm->getNumElements() != 0;
@@ -1792,6 +1800,18 @@ bool LLNotifications::getIgnoreAllNotifications()
{
return mIgnoreAllNotifications;
}
+
+void LLNotifications::setIgnored(const std::string& name, bool ignored)
+{
+ LLNotificationTemplatePtr templatep = getTemplate(name);
+ templatep->mForm->setIgnored(ignored);
+}
+
+bool LLNotifications::getIgnored(const std::string& name)
+{
+ LLNotificationTemplatePtr templatep = getTemplate(name);
+ return (mIgnoreAllNotifications) || ( (templatep->mForm->getIgnoreType() != LLNotificationForm::IGNORE_NO) && (templatep->mForm->getIgnored()) );
+}
bool LLNotifications::isVisibleByRules(LLNotificationPtr n)
{
diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h
index 024332ee65..ccdfb90054 100644
--- a/indra/llui/llnotifications.h
+++ b/indra/llui/llnotifications.h
@@ -179,6 +179,7 @@ public:
Optional<bool> save_option;
Optional<std::string> control;
Optional<bool> invert_control;
+ Optional<bool> session_only;
FormIgnore();
};
@@ -232,7 +233,8 @@ public:
typedef enum e_ignore_type
{
IGNORE_NO,
- IGNORE_WITH_DEFAULT_RESPONSE,
+ IGNORE_WITH_DEFAULT_RESPONSE,
+ IGNORE_WITH_DEFAULT_RESPONSE_SESSION_ONLY,
IGNORE_WITH_LAST_RESPONSE,
IGNORE_SHOW_AGAIN
} EIgnoreType;
@@ -558,6 +560,7 @@ public:
bool canLogToChat() const;
bool canLogToIM() const;
bool canShowToast() const;
+ bool canFadeToast() const;
bool hasFormElements() const;
void playSound();
@@ -963,6 +966,9 @@ public:
void setIgnoreAllNotifications(bool ignore);
bool getIgnoreAllNotifications();
+ void setIgnored(const std::string& name, bool ignored);
+ bool getIgnored(const std::string& name);
+
bool isVisibleByRules(LLNotificationPtr pNotification);
private:
diff --git a/indra/llui/llnotificationtemplate.h b/indra/llui/llnotificationtemplate.h
index bed29254d8..20cbc89ede 100644
--- a/indra/llui/llnotificationtemplate.h
+++ b/indra/llui/llnotificationtemplate.h
@@ -177,6 +177,7 @@ struct LLNotificationTemplate
Optional<bool> persist,
log_to_im,
show_toast,
+ fade_toast,
log_to_chat,
force_urls_external;
Optional<std::string> functor,
@@ -199,6 +200,7 @@ struct LLNotificationTemplate
Params()
: name("name"),
persist("persist", false),
+ fade_toast("fade_toast", true),
log_to_im("log_to_im", false),
show_toast("show_toast", true),
log_to_chat("log_to_chat", true),
@@ -316,6 +318,7 @@ struct LLNotificationTemplate
bool mLogToChat;
bool mLogToIM;
bool mShowToast;
+ bool mFadeToast;
};
#endif //LL_LLNOTIFICATION_TEMPLATE_H
diff --git a/indra/llui/llscrollcontainer.cpp b/indra/llui/llscrollcontainer.cpp
index f70eebc594..6135cc56ad 100644
--- a/indra/llui/llscrollcontainer.cpp
+++ b/indra/llui/llscrollcontainer.cpp
@@ -72,6 +72,7 @@ LLScrollContainer::Params::Params()
hide_scrollbar("hide_scrollbar"),
min_auto_scroll_rate("min_auto_scroll_rate", 100),
max_auto_scroll_rate("max_auto_scroll_rate", 1000),
+ max_auto_scroll_zone("max_auto_scroll_zone", 16),
reserve_scroll_corner("reserve_scroll_corner", false),
size("size", -1)
{}
@@ -88,6 +89,7 @@ LLScrollContainer::LLScrollContainer(const LLScrollContainer::Params& p)
mReserveScrollCorner(p.reserve_scroll_corner),
mMinAutoScrollRate(p.min_auto_scroll_rate),
mMaxAutoScrollRate(p.max_auto_scroll_rate),
+ mMaxAutoScrollZone(p.max_auto_scroll_zone),
mScrolledView(NULL),
mSize(p.size)
{
@@ -290,8 +292,22 @@ BOOL LLScrollContainer::handleDragAndDrop(S32 x, S32 y, MASK mask,
return TRUE;
}
+bool LLScrollContainer::canAutoScroll(S32 x, S32 y)
+{
+ if (mAutoScrolling)
+ {
+ return true; // already scrolling
+ }
+ return autoScroll(x, y, false);
+}
+
bool LLScrollContainer::autoScroll(S32 x, S32 y)
{
+ return autoScroll(x, y, true);
+}
+
+bool LLScrollContainer::autoScroll(S32 x, S32 y, bool do_scroll)
+{
static LLUICachedControl<S32> scrollbar_size_control ("UIScrollbarSize", 0);
S32 scrollbar_size = (mSize == -1 ? scrollbar_size_control : mSize);
@@ -302,6 +318,8 @@ bool LLScrollContainer::autoScroll(S32 x, S32 y)
screenRectToLocal(getRootView()->getLocalRect(), &screen_local_extents);
LLRect inner_rect_local( 0, mInnerRect.getHeight(), mInnerRect.getWidth(), 0 );
+ // Note: Will also include scrollers as scroll zones, so opposite
+ // scroll zones might have different size due to visible scrollers
if( mScrollbar[HORIZONTAL]->getVisible() )
{
inner_rect_local.mBottom += scrollbar_size;
@@ -316,8 +334,8 @@ bool LLScrollContainer::autoScroll(S32 x, S32 y)
S32 auto_scroll_speed = ll_round(mAutoScrollRate * LLFrameTimer::getFrameDeltaTimeF32());
// autoscroll region should take up no more than one third of visible scroller area
- S32 auto_scroll_region_width = llmin(inner_rect_local.getWidth() / 3, 10);
- S32 auto_scroll_region_height = llmin(inner_rect_local.getHeight() / 3, 10);
+ S32 auto_scroll_region_width = llmin(inner_rect_local.getWidth() / 3, (S32)mMaxAutoScrollZone);
+ S32 auto_scroll_region_height = llmin(inner_rect_local.getHeight() / 3, (S32)mMaxAutoScrollZone);
if( mScrollbar[HORIZONTAL]->getVisible() )
{
@@ -325,8 +343,11 @@ bool LLScrollContainer::autoScroll(S32 x, S32 y)
left_scroll_rect.mRight = inner_rect_local.mLeft + auto_scroll_region_width;
if( left_scroll_rect.pointInRect( x, y ) && (mScrollbar[HORIZONTAL]->getDocPos() > 0) )
{
- mScrollbar[HORIZONTAL]->setDocPos( mScrollbar[HORIZONTAL]->getDocPos() - auto_scroll_speed );
- mAutoScrolling = TRUE;
+ if (do_scroll)
+ {
+ mScrollbar[HORIZONTAL]->setDocPos(mScrollbar[HORIZONTAL]->getDocPos() - auto_scroll_speed);
+ mAutoScrolling = TRUE;
+ }
scrolling = true;
}
@@ -334,8 +355,11 @@ bool LLScrollContainer::autoScroll(S32 x, S32 y)
right_scroll_rect.mLeft = inner_rect_local.mRight - auto_scroll_region_width;
if( right_scroll_rect.pointInRect( x, y ) && (mScrollbar[HORIZONTAL]->getDocPos() < mScrollbar[HORIZONTAL]->getDocPosMax()) )
{
- mScrollbar[HORIZONTAL]->setDocPos( mScrollbar[HORIZONTAL]->getDocPos() + auto_scroll_speed );
- mAutoScrolling = TRUE;
+ if (do_scroll)
+ {
+ mScrollbar[HORIZONTAL]->setDocPos(mScrollbar[HORIZONTAL]->getDocPos() + auto_scroll_speed);
+ mAutoScrolling = TRUE;
+ }
scrolling = true;
}
}
@@ -345,8 +369,11 @@ bool LLScrollContainer::autoScroll(S32 x, S32 y)
bottom_scroll_rect.mTop = inner_rect_local.mBottom + auto_scroll_region_height;
if( bottom_scroll_rect.pointInRect( x, y ) && (mScrollbar[VERTICAL]->getDocPos() < mScrollbar[VERTICAL]->getDocPosMax()) )
{
- mScrollbar[VERTICAL]->setDocPos( mScrollbar[VERTICAL]->getDocPos() + auto_scroll_speed );
- mAutoScrolling = TRUE;
+ if (do_scroll)
+ {
+ mScrollbar[VERTICAL]->setDocPos(mScrollbar[VERTICAL]->getDocPos() + auto_scroll_speed);
+ mAutoScrolling = TRUE;
+ }
scrolling = true;
}
@@ -354,8 +381,11 @@ bool LLScrollContainer::autoScroll(S32 x, S32 y)
top_scroll_rect.mBottom = inner_rect_local.mTop - auto_scroll_region_height;
if( top_scroll_rect.pointInRect( x, y ) && (mScrollbar[VERTICAL]->getDocPos() > 0) )
{
- mScrollbar[VERTICAL]->setDocPos( mScrollbar[VERTICAL]->getDocPos() - auto_scroll_speed );
- mAutoScrolling = TRUE;
+ if (do_scroll)
+ {
+ mScrollbar[VERTICAL]->setDocPos(mScrollbar[VERTICAL]->getDocPos() - auto_scroll_speed);
+ mAutoScrolling = TRUE;
+ }
scrolling = true;
}
}
diff --git a/indra/llui/llscrollcontainer.h b/indra/llui/llscrollcontainer.h
index c4c4d0a136..e6c7891397 100644
--- a/indra/llui/llscrollcontainer.h
+++ b/indra/llui/llscrollcontainer.h
@@ -66,6 +66,7 @@ public:
hide_scrollbar;
Optional<F32> min_auto_scroll_rate,
max_auto_scroll_rate;
+ Optional<U32> max_auto_scroll_zone;
Optional<LLUIColor> bg_color;
Optional<LLScrollbar::callback_t> scroll_callback;
Optional<S32> size;
@@ -114,7 +115,8 @@ public:
virtual void draw();
virtual bool addChild(LLView* view, S32 tab_group = 0);
-
+
+ bool canAutoScroll(S32 x, S32 y);
bool autoScroll(S32 x, S32 y);
S32 getSize() const { return mSize; }
@@ -128,6 +130,7 @@ private:
virtual void scrollHorizontal( S32 new_pos );
virtual void scrollVertical( S32 new_pos );
void updateScroll();
+ bool autoScroll(S32 x, S32 y, bool do_scroll);
void calcVisibleSize( S32 *visible_width, S32 *visible_height, BOOL* show_h_scrollbar, BOOL* show_v_scrollbar ) const;
LLScrollbar* mScrollbar[ORIENTATION_COUNT];
@@ -141,6 +144,7 @@ private:
F32 mAutoScrollRate;
F32 mMinAutoScrollRate;
F32 mMaxAutoScrollRate;
+ U32 mMaxAutoScrollZone;
bool mHideScrollbar;
};
diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index 0afa8d43f1..7c1f4a4dca 100644
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -345,6 +345,21 @@ S32 LLScrollListCtrl::getItemCount() const
return mItemList.size();
}
+BOOL LLScrollListCtrl::hasSelectedItem() const
+{
+ item_list::iterator iter;
+ for (iter = mItemList.begin(); iter < mItemList.end(); )
+ {
+ LLScrollListItem* itemp = *iter;
+ if (itemp && itemp->getSelected())
+ {
+ return TRUE;
+ }
+ iter++;
+ }
+ return FALSE;
+}
+
// virtual LLScrolListInterface function (was deleteAllItems)
void LLScrollListCtrl::clearRows()
{
diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h
index 8343750a54..699a8744e1 100644
--- a/indra/llui/llscrolllistctrl.h
+++ b/indra/llui/llscrolllistctrl.h
@@ -201,6 +201,8 @@ public:
virtual BOOL isSelected(const LLSD& value) const;
+ BOOL hasSelectedItem() const;
+
BOOL handleClick(S32 x, S32 y, MASK mask);
BOOL selectFirstItem();
BOOL selectNthItem( S32 index );
diff --git a/indra/llui/llspinctrl.cpp b/indra/llui/llspinctrl.cpp
index d49e216898..f6831c6d5e 100644
--- a/indra/llui/llspinctrl.cpp
+++ b/indra/llui/llspinctrl.cpp
@@ -130,6 +130,7 @@ LLSpinCtrl::LLSpinCtrl(const LLSpinCtrl::Params& p)
params.follows.flags(FOLLOWS_LEFT | FOLLOWS_BOTTOM);
mEditor = LLUICtrlFactory::create<LLLineEditor> (params);
mEditor->setFocusReceivedCallback( boost::bind(&LLSpinCtrl::onEditorGainFocus, _1, this ));
+ mEditor->setFocusLostCallback( boost::bind(&LLSpinCtrl::onEditorLostFocus, _1, this ));
if (p.allow_digits_only)
{
mEditor->setPrevalidateInput(LLTextValidate::validateNonNegativeS32NoSpace);
@@ -239,6 +240,31 @@ void LLSpinCtrl::onEditorGainFocus( LLFocusableElement* caller, void *userdata )
self->onFocusReceived();
}
+// static
+void LLSpinCtrl::onEditorLostFocus( LLFocusableElement* caller, void *userdata )
+{
+ LLSpinCtrl* self = (LLSpinCtrl*) userdata;
+ llassert( caller == self->mEditor );
+
+ self->onFocusLost();
+
+ std::string text = self->mEditor->getText();
+
+ LLLocale locale(LLLocale::USER_LOCALE);
+ F32 val = (F32)atof(text.c_str());
+
+ F32 saved_val = self->getValueF32();
+ if (saved_val != val && !self->mEditor->isDirty())
+ {
+ // Editor was focused when value update arrived, string
+ // in editor is different from one in spin control.
+ // Since editor is not dirty, it won't commit, so either
+ // attempt to commit value from editor or revert to a more
+ // recent value from spin control
+ self->updateEditor();
+ }
+}
+
void LLSpinCtrl::setValue(const LLSD& value )
{
F32 v = (F32)value.asReal();
diff --git a/indra/llui/llspinctrl.h b/indra/llui/llspinctrl.h
index e34add879d..cab99c35bd 100644
--- a/indra/llui/llspinctrl.h
+++ b/indra/llui/llspinctrl.h
@@ -93,6 +93,7 @@ public:
void onEditorCommit(const LLSD& data);
static void onEditorGainFocus(LLFocusableElement* caller, void *userdata);
+ static void onEditorLostFocus(LLFocusableElement* caller, void *userdata);
static void onEditorChangeFocus(LLUICtrl* caller, S32 direction, void *userdata);
void onUpBtn(const LLSD& data);
diff --git a/indra/llui/llxuiparser.cpp b/indra/llui/llxuiparser.cpp
index 99a0869ce3..138ba8bf02 100644
--- a/indra/llui/llxuiparser.cpp
+++ b/indra/llui/llxuiparser.cpp
@@ -58,10 +58,6 @@ static LLInitParam::Parser::parser_inspect_func_map_t sSimpleXUIInspectFuncs;
const char* NO_VALUE_MARKER = "no_value";
-#ifdef LL_WINDOWS
-const S32 LINE_NUMBER_HERE = 0;
-#endif
-
struct MaxOccursValues : public LLInitParam::TypeValuesHelper<U32, MaxOccursValues>
{
static void declareValues()
@@ -1313,22 +1309,14 @@ bool LLXUIParser::writeSDValue(Parser& parser, const void* val_ptr, name_stack_t
void LLXUIParser::parserWarning(const std::string& message)
{
-#ifdef LL_WINDOWS
- // use Visual Studio friendly formatting of output message for easy access to originating xml
- LL_INFOS() << llformat("%s(%d):\t%s", mCurFileName.c_str(), mCurReadNode->getLineNumber(), message.c_str()) << LL_ENDL;
-#else
- Parser::parserWarning(message);
-#endif
+ std::string warning_msg = llformat("%s:\t%s(%d)", message.c_str(), mCurFileName.c_str(), mCurReadNode->getLineNumber());
+ Parser::parserWarning(warning_msg);
}
void LLXUIParser::parserError(const std::string& message)
{
-#ifdef LL_WINDOWS
- // use Visual Studio friendly formatting of output message for easy access to originating xml
- LL_INFOS() << llformat("%s(%d):\t%s", mCurFileName.c_str(), mCurReadNode->getLineNumber(), message.c_str()) << LL_ENDL;
-#else
- Parser::parserError(message);
-#endif
+ std::string error_msg = llformat("%s:\t%s(%d)", message.c_str(), mCurFileName.c_str(), mCurReadNode->getLineNumber());
+ Parser::parserError(error_msg);
}
@@ -1641,22 +1629,14 @@ bool LLSimpleXUIParser::processText()
void LLSimpleXUIParser::parserWarning(const std::string& message)
{
-#ifdef LL_WINDOWS
- // use Visual Studio friendly formatting of output message for easy access to originating xml
- LL_INFOS() << llformat("%s(%d):\t%s", mCurFileName.c_str(), LINE_NUMBER_HERE, message.c_str()) << LL_ENDL;
-#else
- Parser::parserWarning(message);
-#endif
+ std::string warning_msg = llformat("%s:\t%s", message.c_str(), mCurFileName.c_str());
+ Parser::parserWarning(warning_msg);
}
void LLSimpleXUIParser::parserError(const std::string& message)
{
-#ifdef LL_WINDOWS
- // use Visual Studio friendly formatting of output message for easy access to originating xml
- LL_INFOS() << llformat("%s(%d):\t%s", mCurFileName.c_str(), LINE_NUMBER_HERE, message.c_str()) << LL_ENDL;
-#else
- Parser::parserError(message);
-#endif
+ std::string error_msg = llformat("%s:\t%s", message.c_str(), mCurFileName.c_str());
+ Parser::parserError(error_msg);
}
bool LLSimpleXUIParser::readFlag(Parser& parser, void* val_ptr)