summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llui/llmenugl.cpp3
-rw-r--r--indra/llui/llmenugl.h3
-rw-r--r--indra/llui/llpanel.cpp9
-rw-r--r--indra/llui/llui.cpp48
-rw-r--r--indra/llui/lluictrlfactory.cpp27
-rw-r--r--indra/llui/lluictrlfactory.h8
-rw-r--r--indra/newview/llpanelnearbymedia.cpp4
-rw-r--r--indra/newview/llstatusbar.cpp16
-rw-r--r--indra/newview/llstatusbar.h1
-rw-r--r--indra/newview/skins/default/xui/en/menu_edit.xml1
-rw-r--r--indra/newview/skins/default/xui/en/panel_main_inventory.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_people.xml10
-rw-r--r--indra/newview/skins/default/xui/en/panel_picks.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_toast.xml2
-rw-r--r--indra/newview/skins/default/xui/en/sidepanel_task_info.xml2
-rw-r--r--indra/newview/skins/paths.xml10
16 files changed, 94 insertions, 54 deletions
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index b77126996e..b4a1bcb7c5 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -139,6 +139,7 @@ LLMenuItemGL::Params::Params()
: shortcut("shortcut"),
jump_key("jump_key", KEY_NONE),
use_mac_ctrl("use_mac_ctrl", false),
+ allow_key_repeat("allow_key_repeat", false),
rect("rect"),
left("left"),
top("top"),
@@ -160,7 +161,7 @@ LLMenuItemGL::Params::Params()
LLMenuItemGL::LLMenuItemGL(const LLMenuItemGL::Params& p)
: LLUICtrl(p),
mJumpKey(p.jump_key),
- mAllowKeyRepeat(FALSE),
+ mAllowKeyRepeat(p.allow_key_repeat),
mHighlight( FALSE ),
mGotHover( FALSE ),
mBriefItem( FALSE ),
diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h
index 6f0f83d4b9..7668f301ea 100644
--- a/indra/llui/llmenugl.h
+++ b/indra/llui/llmenugl.h
@@ -61,7 +61,8 @@ public:
{
Optional<std::string> shortcut;
Optional<KEY> jump_key;
- Optional<bool> use_mac_ctrl;
+ Optional<bool> use_mac_ctrl,
+ allow_key_repeat;
Ignored rect,
left,
diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp
index 0cd052eefa..9ebdcb87c6 100644
--- a/indra/llui/llpanel.cpp
+++ b/indra/llui/llpanel.cpp
@@ -508,16 +508,19 @@ BOOL LLPanel::initPanelXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr outpu
if (xml_filename.empty())
{
node->getAttributeString("filename", xml_filename);
+ setXMLFilename(xml_filename);
}
if (!xml_filename.empty())
{
+ LLUICtrlFactory::instance().pushFileName(xml_filename);
+
LLFastTimer timer(FTM_EXTERNAL_PANEL_LOAD);
if (output_node)
{
//if we are exporting, we want to export the current xml
//not the referenced xml
- LLXUIParser::instance().readXUI(node, params, xml_filename);
+ LLXUIParser::instance().readXUI(node, params, LLUICtrlFactory::getInstance()->getCurFileName());
Params output_params(params);
setupParamsForExport(output_params, parent);
output_node->setName(node->getName()->mString);
@@ -533,13 +536,13 @@ BOOL LLPanel::initPanelXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr outpu
return FALSE;
}
- LLXUIParser::instance().readXUI(referenced_xml, params, xml_filename);
+ LLXUIParser::instance().readXUI(referenced_xml, params, LLUICtrlFactory::getInstance()->getCurFileName());
// add children using dimensions from referenced xml for consistent layout
setShape(params.rect);
LLUICtrlFactory::createChildren(this, referenced_xml, child_registry_t::instance());
- setXMLFilename(xml_filename);
+ LLUICtrlFactory::instance().popFileName();
}
// ask LLUICtrlFactory for filename, since xml_filename might be empty
diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp
index bf12384a28..dff1cb93e7 100644
--- a/indra/llui/llui.cpp
+++ b/indra/llui/llui.cpp
@@ -1752,6 +1752,33 @@ std::string LLUI::getLanguage()
return language;
}
+struct SubDir : public LLInitParam::Block<SubDir>
+{
+ Mandatory<std::string> value;
+
+ SubDir()
+ : value("value")
+ {}
+};
+
+struct Directory : public LLInitParam::Block<Directory>
+{
+ Multiple<SubDir, AtLeast<1> > subdirs;
+
+ Directory()
+ : subdirs("subdir")
+ {}
+};
+
+struct Paths : public LLInitParam::Block<Paths>
+{
+ Multiple<Directory, AtLeast<1> > directories;
+
+ Paths()
+ : directories("directory")
+ {}
+};
+
//static
void LLUI::setupPaths()
{
@@ -1759,21 +1786,36 @@ void LLUI::setupPaths()
LLXMLNodePtr root;
BOOL success = LLXMLNode::parseFile(filename, root, NULL);
+ Paths paths;
+ LLXUIParser::instance().readXUI(root, paths, filename);
+
sXUIPaths.clear();
- if (success)
+ if (success && paths.validateBlock())
{
LLStringUtil::format_map_t path_args;
path_args["[LANGUAGE]"] = LLUI::getLanguage();
- for (LLXMLNodePtr path = root->getFirstChild(); path.notNull(); path = path->getNextSibling())
+ for (LLInitParam::ParamIterator<Directory>::const_iterator it = paths.directories().begin(),
+ end_it = paths.directories().end();
+ it != end_it;
+ ++it)
{
- std::string path_val_ui(path->getValue());
+ std::string path_val_ui;
+ for (LLInitParam::ParamIterator<SubDir>::const_iterator subdir_it = it->subdirs().begin(),
+ subdir_end_it = it->subdirs().end();
+ subdir_it != subdir_end_it;)
+ {
+ path_val_ui += subdir_it->value();
+ if (++subdir_it != subdir_end_it)
+ path_val_ui += gDirUtilp->getDirDelimiter();
+ }
LLStringUtil::format(path_val_ui, path_args);
if (std::find(sXUIPaths.begin(), sXUIPaths.end(), path_val_ui) == sXUIPaths.end())
{
sXUIPaths.push_back(path_val_ui);
}
+
}
}
else // parsing failed
diff --git a/indra/llui/lluictrlfactory.cpp b/indra/llui/lluictrlfactory.cpp
index 4dd155f8e5..6b337e0d74 100644
--- a/indra/llui/lluictrlfactory.cpp
+++ b/indra/llui/lluictrlfactory.cpp
@@ -101,7 +101,9 @@ void LLUICtrlFactory::loadWidgetTemplate(const std::string& widget_tag, LLInitPa
if (LLUICtrlFactory::getLayeredXMLNode(filename, root_node))
{
+ LLUICtrlFactory::instance().pushFileName(filename);
LLXUIParser::instance().readXUI(root_node, block, filename);
+ LLUICtrlFactory::instance().popFileName();
}
}
@@ -211,7 +213,7 @@ bool LLUICtrlFactory::buildFloater(LLFloater* floaterp, const std::string& filen
bool res = true;
lldebugs << "Building floater " << filename << llendl;
- mFileNames.push_back(gDirUtilp->findSkinnedFilename(LLUI::getSkinPath(), filename));
+ pushFileName(filename);
{
if (!floaterp->getFactoryMap().empty())
{
@@ -234,7 +236,7 @@ bool LLUICtrlFactory::buildFloater(LLFloater* floaterp, const std::string& filen
mFactoryStack.pop_front();
}
}
- mFileNames.pop_back();
+ popFileName();
return res;
}
@@ -283,7 +285,7 @@ BOOL LLUICtrlFactory::buildPanel(LLPanel* panelp, const std::string& filename, L
lldebugs << "Building panel " << filename << llendl;
- mFileNames.push_back(gDirUtilp->findSkinnedFilename(LLUI::getSkinPath(), filename));
+ pushFileName(filename);
{
if (!panelp->getFactoryMap().empty())
{
@@ -306,7 +308,7 @@ BOOL LLUICtrlFactory::buildPanel(LLPanel* panelp, const std::string& filename, L
mFactoryStack.pop_front();
}
}
- mFileNames.pop_back();
+ popFileName();
return didPost;
}
@@ -364,6 +366,23 @@ LLPanel* LLUICtrlFactory::createFactoryPanel(const std::string& name)
return create<LLPanel>(panel_p);
}
+std::string LLUICtrlFactory::getCurFileName()
+{
+ return mFileNames.empty() ? "" : gDirUtilp->getWorkingDir() + gDirUtilp->getDirDelimiter() + mFileNames.back();
+}
+
+
+void LLUICtrlFactory::pushFileName(const std::string& name)
+{
+ mFileNames.push_back(gDirUtilp->findSkinnedFilename(LLUI::getSkinPath(), name));
+}
+
+void LLUICtrlFactory::popFileName()
+{
+ mFileNames.pop_back();
+}
+
+
//-----------------------------------------------------------------------------
//static
diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h
index b1fa6add67..7da96ffce3 100644
--- a/indra/llui/lluictrlfactory.h
+++ b/indra/llui/lluictrlfactory.h
@@ -170,7 +170,9 @@ public:
// Returns 0 on success
S32 saveToXML(LLView* viewp, const std::string& filename);
- std::string getCurFileName() { return mFileNames.empty() ? "" : mFileNames.back(); }
+ std::string getCurFileName();
+ void pushFileName(const std::string& name);
+ void popFileName();
static BOOL getAttributeColor(LLXMLNodePtr node, const std::string& name, LLColor4& color);
@@ -229,7 +231,7 @@ public:
T* widget = NULL;
std::string skinned_filename = findSkinnedFilename(filename);
- getInstance()->mFileNames.push_back(skinned_filename);
+ instance().pushFileName(filename);
{
LLXMLNodePtr root_node;
@@ -263,7 +265,7 @@ public:
}
}
fail:
- getInstance()->mFileNames.pop_back();
+ instance().popFileName();
return widget;
}
diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp
index a162bc9dbc..7f4609b83e 100644
--- a/indra/newview/llpanelnearbymedia.cpp
+++ b/indra/newview/llpanelnearbymedia.cpp
@@ -224,8 +224,8 @@ void LLPanelNearByMedia::reshape(S32 width, S32 height, BOOL called_from_parent)
{
LLPanel::reshape(width, height, called_from_parent);
- LLButton* more_btn = getChild<LLButton>("more_btn");
- if (more_btn->getValue().asBoolean())
+ LLButton* more_btn = findChild<LLButton>("more_btn");
+ if (more_btn && more_btn->getValue().asBoolean())
{
mMoreRect = getRect();
}
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp
index c39b2ad0b5..c02559b209 100644
--- a/indra/newview/llstatusbar.cpp
+++ b/indra/newview/llstatusbar.cpp
@@ -121,7 +121,6 @@ const U32 LLStatusBar::MAX_DATE_STRING_LENGTH = 2000;
LLStatusBar::LLStatusBar(const LLRect& rect)
: LLPanel(),
- mTextHealth(NULL),
mTextTime(NULL),
mSGBandwidth(NULL),
mSGPacketLoss(NULL),
@@ -181,7 +180,6 @@ BOOL LLStatusBar::postBuild()
// build date necessary data (must do after panel built)
setupDate();
- mTextHealth = getChild<LLTextBox>("HealthText" );
mTextTime = getChild<LLTextBox>("TimeText" );
getChild<LLUICtrl>("buyL")->setCommitCallback(
@@ -326,24 +324,12 @@ void LLStatusBar::refresh()
BOOL flash = S32(mHealthTimer->getElapsedSeconds() * ICON_FLASH_FREQUENCY) & 1;
childSetVisible("health", flash);
}
- mTextHealth->setVisible(TRUE);
// Health
childGetRect( "health", buttonRect );
r.setOriginAndSize( x, y, buttonRect.getWidth(), buttonRect.getHeight());
childSetRect("health", r);
x += buttonRect.getWidth();
-
- const S32 health_width = S32( LLFontGL::getFontSansSerifSmall()->getWidth(std::string("100%")) );
- r.set(x, y+TEXT_HEIGHT - 2, x+health_width, y);
- mTextHealth->setRect(r);
- x += health_width;
- }
- else
- {
- // invisible if region doesn't allow damage
- childSetVisible("health", false);
- mTextHealth->setVisible(FALSE);
}
mSGBandwidth->setVisible(net_stats_visible);
@@ -442,8 +428,6 @@ void LLStatusBar::sendMoneyBalanceRequest()
void LLStatusBar::setHealth(S32 health)
{
//llinfos << "Setting health to: " << buffer << llendl;
- mTextHealth->setText(llformat("%d%%", health));
-
if( mHealth > health )
{
if (mHealth > (health + gSavedSettings.getF32("UISndHealthReductionThreshold")))
diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h
index e5240fcc3e..32f29e9e1c 100644
--- a/indra/newview/llstatusbar.h
+++ b/indra/newview/llstatusbar.h
@@ -105,7 +105,6 @@ private:
static void onClickMediaToggle(void* data);
private:
- LLTextBox *mTextHealth;
LLTextBox *mTextTime;
LLStatGraph *mSGBandwidth;
diff --git a/indra/newview/skins/default/xui/en/menu_edit.xml b/indra/newview/skins/default/xui/en/menu_edit.xml
index 68f3cb532c..fab76c497c 100644
--- a/indra/newview/skins/default/xui/en/menu_edit.xml
+++ b/indra/newview/skins/default/xui/en/menu_edit.xml
@@ -52,6 +52,7 @@
<menu_item_call
label="Delete"
name="Delete"
+ allow_key_repeat="true"
shortcut="Del">
<menu_item_call.on_click
function="Edit.Delete" />
diff --git a/indra/newview/skins/default/xui/en/panel_main_inventory.xml b/indra/newview/skins/default/xui/en/panel_main_inventory.xml
index 2a53b3e2fa..16529f4064 100644
--- a/indra/newview/skins/default/xui/en/panel_main_inventory.xml
+++ b/indra/newview/skins/default/xui/en/panel_main_inventory.xml
@@ -104,8 +104,6 @@
</tab_container>
<layout_stack
animate="false"
- background_visible="true"
- bevel_style="none"
border_size="0"
follows="left|right|bottom"
height="25"
diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml
index b79ef1e287..7cd0d5b5f0 100644
--- a/indra/newview/skins/default/xui/en/panel_people.xml
+++ b/indra/newview/skins/default/xui/en/panel_people.xml
@@ -95,8 +95,6 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M
width="313">
<avatar_list
allow_select="true"
- bg_alpha_color="DkGray2"
- bg_opaque_color="DkGray2"
follows="all"
height="356"
ignore_online_status="true"
@@ -300,16 +298,11 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M
-->
<group_list
allow_select="true"
- background_visible="true"
- bg_alpha_color="DkGray2"
- bg_opaque_color="DkGray2"
follows="all"
height="356"
layout="topleft"
left="3"
name="group_list"
- no_filtered_groups_msg="[secondlife:///app/search/groups Try finding the group in search?]"
- no_groups_msg="[secondlife:///app/search/groups Try searching for some groups to join.]"
top="0"
width="307" />
<panel
@@ -386,9 +379,6 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M
width="313">
<avatar_list
allow_select="true"
- background_visible="true"
- bg_alpha_color="DkGray2"
- bg_opaque_color="DkGray2"
follows="all"
height="356"
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/panel_picks.xml b/indra/newview/skins/default/xui/en/panel_picks.xml
index 0093a08e15..a815cdf7f0 100644
--- a/indra/newview/skins/default/xui/en/panel_picks.xml
+++ b/indra/newview/skins/default/xui/en/panel_picks.xml
@@ -38,7 +38,6 @@ bg_opaque_color="DkGray2"
single_expansion="true"
width="313">
<accordion_tab
- can_resize="false"
layout="topleft"
height="235"
min_height="150"
@@ -56,7 +55,6 @@ bg_opaque_color="DkGray2"
width="313" />
</accordion_tab>
<accordion_tab
- can_resize="false"
layout="topleft"
height="235"
name="tab_classifieds"
diff --git a/indra/newview/skins/default/xui/en/panel_toast.xml b/indra/newview/skins/default/xui/en/panel_toast.xml
index 92b4c17247..42f64c3a76 100644
--- a/indra/newview/skins/default/xui/en/panel_toast.xml
+++ b/indra/newview/skins/default/xui/en/panel_toast.xml
@@ -31,8 +31,6 @@
can_close="false"
can_dock="false"
border_visible = "false"
- border_drop_shadow_visible = "false"
- drop_shadow_visible = "false"
border = "false"
>
<panel
diff --git a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
index 30346319df..ef7ec74b5a 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
@@ -1,11 +1,9 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
- auto_tile="true"
height="570"
layout="topleft"
name="object properties"
help_topic="object_properties"
- save_rect="true"
title="Object Profile"
width="333">
<panel.string
diff --git a/indra/newview/skins/paths.xml b/indra/newview/skins/paths.xml
index 3b91a904b0..e6d68488ea 100644
--- a/indra/newview/skins/paths.xml
+++ b/indra/newview/skins/paths.xml
@@ -1,4 +1,10 @@
<paths>
- <directory>xui/en</directory>
- <directory>xui/[LANGUAGE]</directory>
+ <directory>
+ <subdir>xui</subdir>
+ <subdir>en</subdir>
+ </directory>
+ <directory>
+ <subdir>xui</subdir>
+ <subdir>[LANGUAGE]</subdir>
+ </directory>
</paths> \ No newline at end of file