aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llui
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/llui')
-rw-r--r--linden/indra/llui/llbutton.cpp2
-rw-r--r--linden/indra/llui/llcheckboxctrl.cpp3
-rw-r--r--linden/indra/llui/llcombobox.cpp29
-rw-r--r--linden/indra/llui/llcombobox.h1
-rw-r--r--linden/indra/llui/llfloater.cpp11
-rw-r--r--linden/indra/llui/llfloater.h1
-rw-r--r--linden/indra/llui/lliconctrl.cpp2
-rw-r--r--linden/indra/llui/lllineeditor.cpp12
-rw-r--r--linden/indra/llui/lllineeditor.h1
-rw-r--r--linden/indra/llui/llmenugl.cpp82
-rw-r--r--linden/indra/llui/llmenugl.h5
-rw-r--r--linden/indra/llui/llmultislider.cpp2
-rw-r--r--linden/indra/llui/llmultisliderctrl.cpp4
-rw-r--r--linden/indra/llui/llpanel.cpp45
-rw-r--r--linden/indra/llui/llprogressbar.cpp10
-rw-r--r--linden/indra/llui/llprogressbar.h1
-rw-r--r--linden/indra/llui/llradiogroup.cpp17
-rw-r--r--linden/indra/llui/llradiogroup.h1
-rw-r--r--linden/indra/llui/llscrollcontainer.cpp4
-rw-r--r--linden/indra/llui/llscrollingpanellist.cpp10
-rw-r--r--linden/indra/llui/llscrollingpanellist.h3
-rw-r--r--linden/indra/llui/llscrolllistctrl.cpp2
-rw-r--r--linden/indra/llui/llslider.cpp9
-rw-r--r--linden/indra/llui/llsliderctrl.cpp2
-rw-r--r--linden/indra/llui/llspinctrl.cpp2
-rw-r--r--linden/indra/llui/lltabcontainer.cpp3
-rw-r--r--linden/indra/llui/lltextbox.cpp2
-rw-r--r--linden/indra/llui/lltexteditor.cpp2
-rw-r--r--linden/indra/llui/lluictrlfactory.cpp29
-rw-r--r--linden/indra/llui/lluixmltags.h7
-rw-r--r--linden/indra/llui/llview.cpp4
-rw-r--r--linden/indra/llui/llviewborder.cpp10
-rw-r--r--linden/indra/llui/llviewborder.h1
33 files changed, 296 insertions, 23 deletions
diff --git a/linden/indra/llui/llbutton.cpp b/linden/indra/llui/llbutton.cpp
index 2c2c1c2..1a6c705 100644
--- a/linden/indra/llui/llbutton.cpp
+++ b/linden/indra/llui/llbutton.cpp
@@ -980,6 +980,8 @@ LLXMLNodePtr LLButton::getXML(bool save_children) const
980{ 980{
981 LLXMLNodePtr node = LLUICtrl::getXML(); 981 LLXMLNodePtr node = LLUICtrl::getXML();
982 982
983 node->setName(LL_BUTTON_TAG);
984
983 node->createChild("label", TRUE)->setStringValue(getLabelUnselected()); 985 node->createChild("label", TRUE)->setStringValue(getLabelUnselected());
984 node->createChild("label_selected", TRUE)->setStringValue(getLabelSelected()); 986 node->createChild("label_selected", TRUE)->setStringValue(getLabelSelected());
985 node->createChild("font", TRUE)->setStringValue(LLFontGL::nameFromFont(mGLFont)); 987 node->createChild("font", TRUE)->setStringValue(LLFontGL::nameFromFont(mGLFont));
diff --git a/linden/indra/llui/llcheckboxctrl.cpp b/linden/indra/llui/llcheckboxctrl.cpp
index eda9467..c1daee7 100644
--- a/linden/indra/llui/llcheckboxctrl.cpp
+++ b/linden/indra/llui/llcheckboxctrl.cpp
@@ -298,12 +298,13 @@ void LLCheckBoxCtrl::resetDirty()
298} 298}
299 299
300 300
301
302// virtual 301// virtual
303LLXMLNodePtr LLCheckBoxCtrl::getXML(bool save_children) const 302LLXMLNodePtr LLCheckBoxCtrl::getXML(bool save_children) const
304{ 303{
305 LLXMLNodePtr node = LLUICtrl::getXML(); 304 LLXMLNodePtr node = LLUICtrl::getXML();
306 305
306 node->setName(LL_CHECK_BOX_CTRL_TAG);
307
307 node->createChild("label", TRUE)->setStringValue(mLabel->getText()); 308 node->createChild("label", TRUE)->setStringValue(mLabel->getText());
308 309
309 std::string control_name = mButton->getControlName(); 310 std::string control_name = mButton->getControlName();
diff --git a/linden/indra/llui/llcombobox.cpp b/linden/indra/llui/llcombobox.cpp
index cbc67fe..ce75f03 100644
--- a/linden/indra/llui/llcombobox.cpp
+++ b/linden/indra/llui/llcombobox.cpp
@@ -120,6 +120,8 @@ LLXMLNodePtr LLComboBox::getXML(bool save_children) const
120{ 120{
121 LLXMLNodePtr node = LLUICtrl::getXML(); 121 LLXMLNodePtr node = LLUICtrl::getXML();
122 122
123 node->setName(LL_COMBO_BOX_TAG);
124
123 // Attributes 125 // Attributes
124 126
125 node->createChild("allow_text_entry", TRUE)->setBoolValue(mAllowTextEntry); 127 node->createChild("allow_text_entry", TRUE)->setBoolValue(mAllowTextEntry);
@@ -1172,6 +1174,33 @@ LLFlyoutButton::LLFlyoutButton(
1172 updateLayout(); 1174 updateLayout();
1173} 1175}
1174 1176
1177// virtual
1178LLXMLNodePtr LLFlyoutButton::getXML(bool save_children) const
1179{
1180 LLXMLNodePtr node = LLComboBox::getXML();
1181
1182 node->setName(LL_FLYOUT_BUTTON_TAG);
1183
1184 LLXMLNodePtr child;
1185
1186 for (child = node->getFirstChild(); child.notNull();)
1187 {
1188 if (child->hasName("combo_item"))
1189 {
1190 child->setName(LL_FLYOUT_BUTTON_ITEM_TAG);
1191
1192 //setName does a delete and add, so we have to start over
1193 child = node->getFirstChild();
1194 }
1195 else
1196 {
1197 child = child->getNextSibling();
1198 }
1199 }
1200
1201 return node;
1202}
1203
1175//static 1204//static
1176LLView* LLFlyoutButton::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory) 1205LLView* LLFlyoutButton::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
1177{ 1206{
diff --git a/linden/indra/llui/llcombobox.h b/linden/indra/llui/llcombobox.h
index 33e1baa..95ad17a 100644
--- a/linden/indra/llui/llcombobox.h
+++ b/linden/indra/llui/llcombobox.h
@@ -217,6 +217,7 @@ public:
217 217
218 void setToggleState(BOOL state); 218 void setToggleState(BOOL state);
219 219
220 virtual LLXMLNodePtr getXML(bool save_children = true) const;
220 static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory); 221 static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
221 static void onActionButtonClick(void *userdata); 222 static void onActionButtonClick(void *userdata);
222 static void onSelectAction(LLUICtrl* ctrl, void *userdata); 223 static void onSelectAction(LLUICtrl* ctrl, void *userdata);
diff --git a/linden/indra/llui/llfloater.cpp b/linden/indra/llui/llfloater.cpp
index defe200..8a03300 100644
--- a/linden/indra/llui/llfloater.cpp
+++ b/linden/indra/llui/llfloater.cpp
@@ -2513,6 +2513,15 @@ LLMultiFloater::LLMultiFloater(
2513 2513
2514} 2514}
2515 2515
2516// virtual
2517LLXMLNodePtr LLMultiFloater::getXML(bool save_children) const
2518{
2519 LLXMLNodePtr node = LLFloater::getXML();
2520
2521 node->setName(LL_MULTI_FLOATER_TAG);
2522
2523 return node;
2524}
2516 2525
2517void LLMultiFloater::open() /* Flawfinder: ignore */ 2526void LLMultiFloater::open() /* Flawfinder: ignore */
2518{ 2527{
@@ -2936,6 +2945,8 @@ LLXMLNodePtr LLFloater::getXML(bool save_children) const
2936{ 2945{
2937 LLXMLNodePtr node = LLPanel::getXML(); 2946 LLXMLNodePtr node = LLPanel::getXML();
2938 2947
2948 node->setName(LL_FLOATER_TAG);
2949
2939 node->createChild("title", TRUE)->setStringValue(getCurrentTitle()); 2950 node->createChild("title", TRUE)->setStringValue(getCurrentTitle());
2940 2951
2941 node->createChild("can_resize", TRUE)->setBoolValue(isResizable()); 2952 node->createChild("can_resize", TRUE)->setBoolValue(isResizable());
diff --git a/linden/indra/llui/llfloater.h b/linden/indra/llui/llfloater.h
index 0e3d148..12f878d 100644
--- a/linden/indra/llui/llfloater.h
+++ b/linden/indra/llui/llfloater.h
@@ -398,6 +398,7 @@ public:
398 virtual ~LLMultiFloater() {}; 398 virtual ~LLMultiFloater() {};
399 399
400 virtual BOOL postBuild(); 400 virtual BOOL postBuild();
401 virtual LLXMLNodePtr getXML(bool save_children = true) const;
401 /*virtual*/ void open(); /* Flawfinder: ignore */ 402 /*virtual*/ void open(); /* Flawfinder: ignore */
402 /*virtual*/ void onClose(bool app_quitting); 403 /*virtual*/ void onClose(bool app_quitting);
403 /*virtual*/ void draw(); 404 /*virtual*/ void draw();
diff --git a/linden/indra/llui/lliconctrl.cpp b/linden/indra/llui/lliconctrl.cpp
index cb3b2a3..e73c8fe 100644
--- a/linden/indra/llui/lliconctrl.cpp
+++ b/linden/indra/llui/lliconctrl.cpp
@@ -137,6 +137,8 @@ LLXMLNodePtr LLIconCtrl::getXML(bool save_children) const
137{ 137{
138 LLXMLNodePtr node = LLUICtrl::getXML(); 138 LLXMLNodePtr node = LLUICtrl::getXML();
139 139
140 node->setName(LL_ICON_CTRL_TAG);
141
140 if (mImageName != "") 142 if (mImageName != "")
141 { 143 {
142 node->createChild("image_name", TRUE)->setStringValue(mImageName); 144 node->createChild("image_name", TRUE)->setStringValue(mImageName);
diff --git a/linden/indra/llui/lllineeditor.cpp b/linden/indra/llui/lllineeditor.cpp
index fc33dcf..62759e6 100644
--- a/linden/indra/llui/lllineeditor.cpp
+++ b/linden/indra/llui/lllineeditor.cpp
@@ -2202,6 +2202,8 @@ LLXMLNodePtr LLLineEditor::getXML(bool save_children) const
2202{ 2202{
2203 LLXMLNodePtr node = LLUICtrl::getXML(); 2203 LLXMLNodePtr node = LLUICtrl::getXML();
2204 2204
2205 node->setName(LL_LINE_EDITOR_TAG);
2206
2205 node->createChild("max_length", TRUE)->setIntValue(mMaxLengthBytes); 2207 node->createChild("max_length", TRUE)->setIntValue(mMaxLengthBytes);
2206 2208
2207 node->createChild("font", TRUE)->setStringValue(LLFontGL::nameFromFont(mGLFont)); 2209 node->createChild("font", TRUE)->setStringValue(LLFontGL::nameFromFont(mGLFont));
@@ -2791,6 +2793,16 @@ void LLSearchEditor::onClearSearch(void* user_data)
2791 } 2793 }
2792} 2794}
2793 2795
2796// virtual
2797LLXMLNodePtr LLSearchEditor::getXML(bool save_children) const
2798{
2799 LLXMLNodePtr node = LLUICtrl::getXML();
2800
2801 node->setName(LL_SEARCH_EDITOR_TAG);
2802
2803 return node;
2804}
2805
2794// static 2806// static
2795LLView* LLSearchEditor::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory) 2807LLView* LLSearchEditor::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
2796{ 2808{
diff --git a/linden/indra/llui/lllineeditor.h b/linden/indra/llui/lllineeditor.h
index a670b21..e488165 100644
--- a/linden/indra/llui/lllineeditor.h
+++ b/linden/indra/llui/lllineeditor.h
@@ -385,6 +385,7 @@ public:
385 385
386 /*virtual*/ void draw(); 386 /*virtual*/ void draw();
387 387
388 virtual LLXMLNodePtr getXML(bool save_children = true) const;
388 static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory); 389 static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
389 390
390 void setText(const LLStringExplicit &new_text) { mSearchEdit->setText(new_text); } 391 void setText(const LLStringExplicit &new_text) { mSearchEdit->setText(new_text); }
diff --git a/linden/indra/llui/llmenugl.cpp b/linden/indra/llui/llmenugl.cpp
index 175bf07..b70f98b 100644
--- a/linden/indra/llui/llmenugl.cpp
+++ b/linden/indra/llui/llmenugl.cpp
@@ -154,6 +154,8 @@ LLXMLNodePtr LLMenuItemGL::getXML(bool save_children) const
154{ 154{
155 LLXMLNodePtr node = LLView::getXML(); 155 LLXMLNodePtr node = LLView::getXML();
156 156
157 node->setName(LL_MENU_ITEM_TAG);
158
157 node->createChild("type", TRUE)->setStringValue(getType()); 159 node->createChild("type", TRUE)->setStringValue(getType());
158 160
159 node->createChild("label", TRUE)->setStringValue(mLabel); 161 node->createChild("label", TRUE)->setStringValue(mLabel);
@@ -526,6 +528,8 @@ class LLMenuItemSeparatorGL : public LLMenuItemGL
526public: 528public:
527 LLMenuItemSeparatorGL( const std::string &name = SEPARATOR_NAME ); 529 LLMenuItemSeparatorGL( const std::string &name = SEPARATOR_NAME );
528 530
531 virtual LLXMLNodePtr getXML(bool save_children = true) const;
532
529 virtual std::string getType() const { return "separator"; } 533 virtual std::string getType() const { return "separator"; }
530 534
531 // doIt() - do the primary funcationality of the menu item. 535 // doIt() - do the primary funcationality of the menu item.
@@ -544,6 +548,16 @@ LLMenuItemSeparatorGL::LLMenuItemSeparatorGL( const std::string &name ) :
544{ 548{
545} 549}
546 550
551
552LLXMLNodePtr LLMenuItemSeparatorGL::getXML(bool save_children) const
553{
554 LLXMLNodePtr node = LLMenuItemGL::getXML();
555
556 node->setName(LL_MENU_ITEM_SEPARATOR_GL_TAG);
557
558 return node;
559}
560
547void LLMenuItemSeparatorGL::draw( void ) 561void LLMenuItemSeparatorGL::draw( void )
548{ 562{
549 gGL.color4fv( getDisabledColor().mV ); 563 gGL.color4fv( getDisabledColor().mV );
@@ -624,6 +638,15 @@ LLMenuItemTearOffGL::LLMenuItemTearOffGL(LLHandle<LLFloater> parent_floater_hand
624} 638}
625 639
626 640
641LLXMLNodePtr LLMenuItemTearOffGL::getXML(bool save_children) const
642{
643 LLXMLNodePtr node = LLMenuItemGL::getXML();
644
645 node->setName(LL_MENU_ITEM_TEAR_OFF_GL_TAG);
646
647 return node;
648}
649
627void LLMenuItemTearOffGL::doIt() 650void LLMenuItemTearOffGL::doIt()
628{ 651{
629 if (getMenu()->getTornOff()) 652 if (getMenu()->getTornOff())
@@ -821,6 +844,8 @@ LLXMLNodePtr LLMenuItemCallGL::getXML(bool save_children) const
821{ 844{
822 LLXMLNodePtr node = LLMenuItemGL::getXML(); 845 LLXMLNodePtr node = LLMenuItemGL::getXML();
823 846
847 node->setName(LL_MENU_ITEM_CALL_GL_TAG);
848
824 // Contents 849 // Contents
825 850
826 std::vector<LLListenerEntry> listeners = mDispatcher->getListeners(); 851 std::vector<LLListenerEntry> listeners = mDispatcher->getListeners();
@@ -830,6 +855,9 @@ LLXMLNodePtr LLMenuItemCallGL::getXML(bool save_children) const
830 std::string listener_name = findEventListener((LLSimpleListener*)itor->listener); 855 std::string listener_name = findEventListener((LLSimpleListener*)itor->listener);
831 if (!listener_name.empty()) 856 if (!listener_name.empty())
832 { 857 {
858 // *FIX: It's not always on_click. It could be on_check, on_enable or on_visible,
859 // but there's no way to get that from the data that is stored.
860
833 LLXMLNodePtr child_node = node->createChild("on_click", FALSE); 861 LLXMLNodePtr child_node = node->createChild("on_click", FALSE);
834 child_node->createChild("function", TRUE)->setStringValue(listener_name); 862 child_node->createChild("function", TRUE)->setStringValue(listener_name);
835 child_node->createChild("filter", TRUE)->setStringValue(itor->filter.asString()); 863 child_node->createChild("filter", TRUE)->setStringValue(itor->filter.asString());
@@ -971,6 +999,9 @@ void LLMenuItemCheckGL::setCheckedControl(std::string checked_control, LLView *c
971LLXMLNodePtr LLMenuItemCheckGL::getXML(bool save_children) const 999LLXMLNodePtr LLMenuItemCheckGL::getXML(bool save_children) const
972{ 1000{
973 LLXMLNodePtr node = LLMenuItemCallGL::getXML(); 1001 LLXMLNodePtr node = LLMenuItemCallGL::getXML();
1002
1003 node->setName(LL_MENU_ITEM_CHECK_GL_TAG);
1004
974 return node; 1005 return node;
975} 1006}
976 1007
@@ -1734,6 +1765,8 @@ LLXMLNodePtr LLMenuGL::getXML(bool save_children) const
1734{ 1765{
1735 LLXMLNodePtr node = LLView::getXML(); 1766 LLXMLNodePtr node = LLView::getXML();
1736 1767
1768 node->setName(LL_MENU_GL_TAG);
1769
1737 // Attributes 1770 // Attributes
1738 1771
1739 node->createChild("opaque", TRUE)->setBoolValue(mBgVisible); 1772 node->createChild("opaque", TRUE)->setBoolValue(mBgVisible);
@@ -1904,7 +1937,11 @@ void LLMenuGL::parseChildXML(LLXMLNodePtr child, LLView *parent, LLUICtrlFactory
1904 1937
1905 LLSimpleListener* callback = parent->getListenerByName(callback_name); 1938 LLSimpleListener* callback = parent->getListenerByName(callback_name);
1906 1939
1907 if (!callback) continue; 1940 if (!callback)
1941 {
1942 lldebugs << "Ignoring \"on_check\" \"" << item_name << "\" because \"" << callback_name << "\" is not registered" << llendl;
1943 continue;
1944 }
1908 1945
1909 new_item->addListener(callback, "on_build", userdata); 1946 new_item->addListener(callback, "on_build", userdata);
1910 } 1947 }
@@ -1945,7 +1982,11 @@ void LLMenuGL::parseChildXML(LLXMLNodePtr child, LLView *parent, LLUICtrlFactory
1945 1982
1946 LLSimpleListener* callback = parent->getListenerByName(callback_name); 1983 LLSimpleListener* callback = parent->getListenerByName(callback_name);
1947 1984
1948 if (!callback) continue; 1985 if (!callback)
1986 {
1987 lldebugs << "Ignoring \"on_click\" \"" << item_name << "\" because \"" << callback_name << "\" is not registered" << llendl;
1988 continue;
1989 }
1949 1990
1950 new_item->addListener(callback, "on_click", callback_data); 1991 new_item->addListener(callback, "on_click", callback_data);
1951 } 1992 }
@@ -1975,7 +2016,11 @@ void LLMenuGL::parseChildXML(LLXMLNodePtr child, LLView *parent, LLUICtrlFactory
1975 2016
1976 LLSimpleListener* callback = parent->getListenerByName(callback_name); 2017 LLSimpleListener* callback = parent->getListenerByName(callback_name);
1977 2018
1978 if (!callback) continue; 2019 if (!callback)
2020 {
2021 lldebugs << "Ignoring \"on_enable\" \"" << item_name << "\" because \"" << callback_name << "\" is not registered" << llendl;
2022 continue;
2023 }
1979 2024
1980 new_item->addListener(callback, "on_build", userdata); 2025 new_item->addListener(callback, "on_build", userdata);
1981 } 2026 }
@@ -2015,7 +2060,11 @@ void LLMenuGL::parseChildXML(LLXMLNodePtr child, LLView *parent, LLUICtrlFactory
2015 2060
2016 LLSimpleListener* callback = parent->getListenerByName(callback_name); 2061 LLSimpleListener* callback = parent->getListenerByName(callback_name);
2017 2062
2018 if (!callback) continue; 2063 if (!callback)
2064 {
2065 lldebugs << "Ignoring \"on_visible\" \"" << item_name << "\" because \"" << callback_name << "\" is not registered" << llendl;
2066 continue;
2067 }
2019 2068
2020 new_item->addListener(callback, "on_build", userdata); 2069 new_item->addListener(callback, "on_build", userdata);
2021 } 2070 }
@@ -3033,6 +3082,8 @@ class LLPieMenuBranch : public LLMenuItemGL
3033public: 3082public:
3034 LLPieMenuBranch(const std::string& name, const std::string& label, LLPieMenu* branch); 3083 LLPieMenuBranch(const std::string& name, const std::string& label, LLPieMenu* branch);
3035 3084
3085 virtual LLXMLNodePtr getXML(bool save_children = true) const;
3086
3036 // called to rebuild the draw label 3087 // called to rebuild the draw label
3037 virtual void buildDrawLabel( void ); 3088 virtual void buildDrawLabel( void );
3038 3089
@@ -3055,6 +3106,17 @@ LLPieMenuBranch::LLPieMenuBranch(const std::string& name,
3055 mBranch->setParentMenuItem(this); 3106 mBranch->setParentMenuItem(this);
3056} 3107}
3057 3108
3109// virtual
3110LLXMLNodePtr LLPieMenuBranch::getXML(bool save_children) const
3111{
3112 if (mBranch)
3113 {
3114 return mBranch->getXML();
3115 }
3116
3117 return LLMenuItemGL::getXML();
3118}
3119
3058// called to rebuild the draw label 3120// called to rebuild the draw label
3059void LLPieMenuBranch::buildDrawLabel( void ) 3121void LLPieMenuBranch::buildDrawLabel( void )
3060{ 3122{
@@ -3136,6 +3198,16 @@ LLPieMenu::LLPieMenu(const std::string& name)
3136} 3198}
3137 3199
3138 3200
3201// virtual
3202LLXMLNodePtr LLPieMenu::getXML(bool save_children) const
3203{
3204 LLXMLNodePtr node = LLMenuGL::getXML();
3205
3206 node->setName(LL_PIE_MENU_TAG);
3207
3208 return node;
3209}
3210
3139void LLPieMenu::initXML(LLXMLNodePtr node, LLView *context, LLUICtrlFactory *factory) 3211void LLPieMenu::initXML(LLXMLNodePtr node, LLView *context, LLUICtrlFactory *factory)
3140{ 3212{
3141 LLXMLNodePtr child; 3213 LLXMLNodePtr child;
@@ -3837,6 +3909,8 @@ LLXMLNodePtr LLMenuBarGL::getXML(bool save_children) const
3837 3909
3838 LLXMLNodePtr node = LLMenuGL::getXML(); 3910 LLXMLNodePtr node = LLMenuGL::getXML();
3839 3911
3912 node->setName(LL_MENU_BAR_GL_TAG);
3913
3840 for (item_iter = mItems.begin(); item_iter != mItems.end(); ++item_iter) 3914 for (item_iter = mItems.begin(); item_iter != mItems.end(); ++item_iter)
3841 { 3915 {
3842 LLMenuItemGL* child = *item_iter; 3916 LLMenuItemGL* child = *item_iter;
diff --git a/linden/indra/llui/llmenugl.h b/linden/indra/llui/llmenugl.h
index 030b81b..26fc294 100644
--- a/linden/indra/llui/llmenugl.h
+++ b/linden/indra/llui/llmenugl.h
@@ -368,6 +368,9 @@ public:
368 BOOL* toggle, 368 BOOL* toggle,
369 KEY key = KEY_NONE, MASK mask = MASK_NONE ); 369 KEY key = KEY_NONE, MASK mask = MASK_NONE );
370 370
371 // there is no getXML() because we cannot reference the toggled global variable by XML
372 // use LLMenuItemCheckGL instead.
373
371 virtual std::string getType() const { return "toggle"; } 374 virtual std::string getType() const { return "toggle"; }
372 375
373 // called to rebuild the draw label 376 // called to rebuild the draw label
@@ -636,6 +639,7 @@ public:
636 LLPieMenu(const std::string& name); 639 LLPieMenu(const std::string& name);
637 virtual ~LLPieMenu() {} 640 virtual ~LLPieMenu() {}
638 641
642 virtual LLXMLNodePtr getXML(bool save_children = true) const;
639 void initXML(LLXMLNodePtr node, LLView *context, LLUICtrlFactory *factory); 643 void initXML(LLXMLNodePtr node, LLView *context, LLUICtrlFactory *factory);
640 644
641 // LLView Functionality 645 // LLView Functionality
@@ -800,6 +804,7 @@ class LLMenuItemTearOffGL : public LLMenuItemGL
800public: 804public:
801 LLMenuItemTearOffGL( LLHandle<LLFloater> parent_floater_handle = LLHandle<LLFloater>()); 805 LLMenuItemTearOffGL( LLHandle<LLFloater> parent_floater_handle = LLHandle<LLFloater>());
802 806
807 virtual LLXMLNodePtr getXML(bool save_children = true) const;
803 virtual std::string getType() const { return "tearoff_menu"; } 808 virtual std::string getType() const { return "tearoff_menu"; }
804 809
805 virtual void doIt(void); 810 virtual void doIt(void);
diff --git a/linden/indra/llui/llmultislider.cpp b/linden/indra/llui/llmultislider.cpp
index c1487be..a0da4e2 100644
--- a/linden/indra/llui/llmultislider.cpp
+++ b/linden/indra/llui/llmultislider.cpp
@@ -571,6 +571,8 @@ LLXMLNodePtr LLMultiSlider::getXML(bool save_children) const
571{ 571{
572 LLXMLNodePtr node = LLUICtrl::getXML(); 572 LLXMLNodePtr node = LLUICtrl::getXML();
573 573
574 node->setName(LL_MULTI_SLIDER_TAG);
575
574 node->createChild("initial_val", TRUE)->setFloatValue(getInitialValue()); 576 node->createChild("initial_val", TRUE)->setFloatValue(getInitialValue());
575 node->createChild("min_val", TRUE)->setFloatValue(getMinValue()); 577 node->createChild("min_val", TRUE)->setFloatValue(getMinValue());
576 node->createChild("max_val", TRUE)->setFloatValue(getMaxValue()); 578 node->createChild("max_val", TRUE)->setFloatValue(getMaxValue());
diff --git a/linden/indra/llui/llmultisliderctrl.cpp b/linden/indra/llui/llmultisliderctrl.cpp
index 8bcf9f9..b76c2f6 100644
--- a/linden/indra/llui/llmultisliderctrl.cpp
+++ b/linden/indra/llui/llmultisliderctrl.cpp
@@ -132,7 +132,7 @@ LLMultiSliderCtrl::LLMultiSliderCtrl(const std::string& name, const LLRect& rect
132 &LLLineEditor::prevalidateFloat ); 132 &LLLineEditor::prevalidateFloat );
133 mEditor->setFollowsLeft(); 133 mEditor->setFollowsLeft();
134 mEditor->setFollowsBottom(); 134 mEditor->setFollowsBottom();
135 mEditor->setFocusReceivedCallback( &LLMultiSliderCtrl::onEditorGainFocus ); 135 mEditor->setFocusReceivedCallback( &LLMultiSliderCtrl::onEditorGainFocus, this );
136 mEditor->setIgnoreTab(TRUE); 136 mEditor->setIgnoreTab(TRUE);
137 // don't do this, as selecting the entire text is single clicking in some cases 137 // don't do this, as selecting the entire text is single clicking in some cases
138 // and double clicking in others 138 // and double clicking in others
@@ -501,6 +501,8 @@ LLXMLNodePtr LLMultiSliderCtrl::getXML(bool save_children) const
501{ 501{
502 LLXMLNodePtr node = LLUICtrl::getXML(); 502 LLXMLNodePtr node = LLUICtrl::getXML();
503 503
504 node->setName(LL_MULTI_SLIDER_CTRL_TAG);
505
504 node->createChild("show_text", TRUE)->setBoolValue(mShowText); 506 node->createChild("show_text", TRUE)->setBoolValue(mShowText);
505 507
506 node->createChild("can_edit_text", TRUE)->setBoolValue(mCanEditText); 508 node->createChild("can_edit_text", TRUE)->setBoolValue(mCanEditText);
diff --git a/linden/indra/llui/llpanel.cpp b/linden/indra/llui/llpanel.cpp
index 28780c7..709342b 100644
--- a/linden/indra/llui/llpanel.cpp
+++ b/linden/indra/llui/llpanel.cpp
@@ -402,7 +402,9 @@ void LLPanel::setBorderVisible(BOOL b)
402// virtual 402// virtual
403LLXMLNodePtr LLPanel::getXML(bool save_children) const 403LLXMLNodePtr LLPanel::getXML(bool save_children) const
404{ 404{
405 LLXMLNodePtr node = LLView::getXML(); 405 LLXMLNodePtr node = LLUICtrl::getXML();
406
407 node->setName(LL_PANEL_TAG);
406 408
407 if (mBorder && mBorder->getVisible()) 409 if (mBorder && mBorder->getVisible())
408 { 410 {
@@ -418,6 +420,15 @@ LLXMLNodePtr LLPanel::getXML(bool save_children) const
418 { 420 {
419 node->createChild("label", TRUE)->setStringValue(mLabel); 421 node->createChild("label", TRUE)->setStringValue(mLabel);
420 } 422 }
423
424 ui_string_map_t::const_iterator i = mUIStrings.begin();
425 ui_string_map_t::const_iterator end = mUIStrings.end();
426 for (; i != end; ++i)
427 {
428 LLXMLNodePtr child_node = node->createChild("string", FALSE);
429 child_node->setStringValue(i->second);
430 child_node->createChild("name", TRUE)->setStringValue(i->first);
431 }
421 432
422 if (save_children) 433 if (save_children)
423 { 434 {
@@ -1171,6 +1182,38 @@ void LLLayoutStack::removeCtrl(LLUICtrl* ctrl)
1171LLXMLNodePtr LLLayoutStack::getXML(bool save_children) const 1182LLXMLNodePtr LLLayoutStack::getXML(bool save_children) const
1172{ 1183{
1173 LLXMLNodePtr node = LLView::getXML(); 1184 LLXMLNodePtr node = LLView::getXML();
1185 node->setName(LL_LAYOUT_STACK_TAG);
1186
1187 if (mOrientation == HORIZONTAL)
1188 {
1189 node->createChild("orientation", TRUE)->setStringValue("horizontal");
1190 }
1191 else
1192 {
1193 node->createChild("orientation", TRUE)->setStringValue("vertical");
1194 }
1195
1196 if (save_children)
1197 {
1198 LLView::child_list_const_reverse_iter_t rit;
1199 for (rit = getChildList()->rbegin(); rit != getChildList()->rend(); ++rit)
1200 {
1201 LLView* childp = *rit;
1202
1203 if (childp->getSaveToXML())
1204 {
1205 LLXMLNodePtr xml_node = childp->getXML();
1206
1207 if (xml_node->hasName(LL_PANEL_TAG))
1208 {
1209 xml_node->setName(LL_LAYOUT_PANEL_TAG);
1210 }
1211
1212 node->addChild(xml_node);
1213 }
1214 }
1215 }
1216
1174 return node; 1217 return node;
1175} 1218}
1176 1219
diff --git a/linden/indra/llui/llprogressbar.cpp b/linden/indra/llui/llprogressbar.cpp
index 8833494..d148733 100644
--- a/linden/indra/llui/llprogressbar.cpp
+++ b/linden/indra/llui/llprogressbar.cpp
@@ -124,6 +124,16 @@ void LLProgressBar::setColorBackground(const LLColor4 &c)
124} 124}
125 125
126 126
127// virtual
128LLXMLNodePtr LLProgressBar::getXML(bool save_children) const
129{
130 LLXMLNodePtr node = LLView::getXML();
131
132 node->setName(LL_PROGRESS_BAR_TAG);
133
134 return node;
135}
136
127// static 137// static
128LLView* LLProgressBar::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory) 138LLView* LLProgressBar::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
129{ 139{
diff --git a/linden/indra/llui/llprogressbar.h b/linden/indra/llui/llprogressbar.h
index 00ad61d..5e02c3b 100644
--- a/linden/indra/llui/llprogressbar.h
+++ b/linden/indra/llui/llprogressbar.h
@@ -53,6 +53,7 @@ public:
53 void setColorShadow(const LLColor4 &c); 53 void setColorShadow(const LLColor4 &c);
54 void setColorBackground(const LLColor4 &c); 54 void setColorBackground(const LLColor4 &c);
55 55
56 virtual LLXMLNodePtr getXML(bool save_children = true) const;
56 static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory); 57 static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
57 58
58 /*virtual*/ void draw(); 59 /*virtual*/ void draw();
diff --git a/linden/indra/llui/llradiogroup.cpp b/linden/indra/llui/llradiogroup.cpp
index 33b9398..ad8922d 100644
--- a/linden/indra/llui/llradiogroup.cpp
+++ b/linden/indra/llui/llradiogroup.cpp
@@ -345,6 +345,8 @@ LLXMLNodePtr LLRadioGroup::getXML(bool save_children) const
345{ 345{
346 LLXMLNodePtr node = LLUICtrl::getXML(); 346 LLXMLNodePtr node = LLUICtrl::getXML();
347 347
348 node->setName(LL_RADIO_GROUP_TAG);
349
348 // Attributes 350 // Attributes
349 351
350 node->createChild("draw_border", TRUE)->setBoolValue(mHasBorder); 352 node->createChild("draw_border", TRUE)->setBoolValue(mHasBorder);
@@ -356,9 +358,7 @@ LLXMLNodePtr LLRadioGroup::getXML(bool save_children) const
356 { 358 {
357 LLRadioCtrl* radio = *iter; 359 LLRadioCtrl* radio = *iter;
358 360
359 LLXMLNodePtr child_node = radio->LLView::getXML(); 361 LLXMLNodePtr child_node = radio->getXML();
360 child_node->setStringValue(radio->getLabel());
361 child_node->setName(std::string("radio_item"));
362 362
363 node->addChild(child_node); 363 node->addChild(child_node);
364 } 364 }
@@ -515,3 +515,14 @@ void LLRadioCtrl::setValue(const LLSD& value)
515 mButton->setTabStop(value.asBoolean()); 515 mButton->setTabStop(value.asBoolean());
516} 516}
517 517
518// virtual
519LLXMLNodePtr LLRadioCtrl::getXML(bool save_children) const
520{
521 LLXMLNodePtr node = LLCheckBoxCtrl::getXML();
522
523 node->setName(LL_RADIO_ITEM_TAG);
524
525 node->setStringValue(getLabel());
526
527 return node;
528}
diff --git a/linden/indra/llui/llradiogroup.h b/linden/indra/llui/llradiogroup.h
index 3410b74..b4f65e7 100644
--- a/linden/indra/llui/llradiogroup.h
+++ b/linden/indra/llui/llradiogroup.h
@@ -52,6 +52,7 @@ public:
52 } 52 }
53 /*virtual*/ ~LLRadioCtrl(); 53 /*virtual*/ ~LLRadioCtrl();
54 54
55 virtual LLXMLNodePtr getXML(bool save_children = true) const;
55 /*virtual*/ void setValue(const LLSD& value); 56 /*virtual*/ void setValue(const LLSD& value);
56}; 57};
57 58
diff --git a/linden/indra/llui/llscrollcontainer.cpp b/linden/indra/llui/llscrollcontainer.cpp
index cf03259..6f037e2 100644
--- a/linden/indra/llui/llscrollcontainer.cpp
+++ b/linden/indra/llui/llscrollcontainer.cpp
@@ -679,7 +679,9 @@ S32 LLScrollableContainerView::getBorderWidth() const
679// virtual 679// virtual
680LLXMLNodePtr LLScrollableContainerView::getXML(bool save_children) const 680LLXMLNodePtr LLScrollableContainerView::getXML(bool save_children) const
681{ 681{
682 LLXMLNodePtr node = LLView::getXML(); 682 LLXMLNodePtr node = LLUICtrl::getXML();
683
684 node->setName(LL_SCROLLABLE_CONTAINER_VIEW_TAG);
683 685
684 // Attributes 686 // Attributes
685 687
diff --git a/linden/indra/llui/llscrollingpanellist.cpp b/linden/indra/llui/llscrollingpanellist.cpp
index 05d0c6f..c2afb78 100644
--- a/linden/indra/llui/llscrollingpanellist.cpp
+++ b/linden/indra/llui/llscrollingpanellist.cpp
@@ -139,6 +139,16 @@ void LLScrollingPanelList::draw()
139} 139}
140 140
141 141
142// virtual
143LLXMLNodePtr LLScrollingPanelList::getXML(bool save_children) const
144{
145 LLXMLNodePtr node = LLUICtrl::getXML();
146
147 node->setName(LL_SCROLLING_PANEL_LIST_TAG);
148
149 return node;
150}
151
142// static 152// static
143LLView* LLScrollingPanelList::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory) 153LLView* LLScrollingPanelList::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
144{ 154{
diff --git a/linden/indra/llui/llscrollingpanellist.h b/linden/indra/llui/llscrollingpanellist.h
index b9d7309..9660427 100644
--- a/linden/indra/llui/llscrollingpanellist.h
+++ b/linden/indra/llui/llscrollingpanellist.h
@@ -58,14 +58,13 @@ public:
58 58
59 virtual void setValue(const LLSD& value) {}; 59 virtual void setValue(const LLSD& value) {};
60 60
61 virtual LLXMLNodePtr getXML(bool save_children) const { return LLUICtrl::getXML(); }
62
63 virtual void draw(); 61 virtual void draw();
64 62
65 void clearPanels(); 63 void clearPanels();
66 void addPanel( LLScrollingPanel* panel ); 64 void addPanel( LLScrollingPanel* panel );
67 void updatePanels(BOOL allow_modify); 65 void updatePanels(BOOL allow_modify);
68 66
67 virtual LLXMLNodePtr getXML(bool save_children = true) const;
69 static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory); 68 static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory);
70 69
71private: 70private:
diff --git a/linden/indra/llui/llscrolllistctrl.cpp b/linden/indra/llui/llscrolllistctrl.cpp
index 460b29f..3c2293f 100644
--- a/linden/indra/llui/llscrolllistctrl.cpp
+++ b/linden/indra/llui/llscrolllistctrl.cpp
@@ -2713,6 +2713,8 @@ LLXMLNodePtr LLScrollListCtrl::getXML(bool save_children) const
2713{ 2713{
2714 LLXMLNodePtr node = LLUICtrl::getXML(); 2714 LLXMLNodePtr node = LLUICtrl::getXML();
2715 2715
2716 node->setName(LL_SCROLL_LIST_CTRL_TAG);
2717
2716 // Attributes 2718 // Attributes
2717 2719
2718 node->createChild("multi_select", TRUE)->setBoolValue(mAllowMultipleSelection); 2720 node->createChild("multi_select", TRUE)->setBoolValue(mAllowMultipleSelection);
diff --git a/linden/indra/llui/llslider.cpp b/linden/indra/llui/llslider.cpp
index 4dfc904..7b4da9b 100644
--- a/linden/indra/llui/llslider.cpp
+++ b/linden/indra/llui/llslider.cpp
@@ -291,6 +291,15 @@ LLXMLNodePtr LLSlider::getXML(bool save_children) const
291{ 291{
292 LLXMLNodePtr node = LLUICtrl::getXML(); 292 LLXMLNodePtr node = LLUICtrl::getXML();
293 293
294 if (mVolumeSlider)
295 {
296 node->setName(LL_VOLUME_SLIDER_CTRL_TAG);
297 }
298 else
299 {
300 node->setName(LL_SLIDER_TAG);
301 }
302
294 node->createChild("initial_val", TRUE)->setFloatValue(getInitialValue()); 303 node->createChild("initial_val", TRUE)->setFloatValue(getInitialValue());
295 node->createChild("min_val", TRUE)->setFloatValue(getMinValue()); 304 node->createChild("min_val", TRUE)->setFloatValue(getMinValue());
296 node->createChild("max_val", TRUE)->setFloatValue(getMaxValue()); 305 node->createChild("max_val", TRUE)->setFloatValue(getMaxValue());
diff --git a/linden/indra/llui/llsliderctrl.cpp b/linden/indra/llui/llsliderctrl.cpp
index 31baddd..8a13ed4 100644
--- a/linden/indra/llui/llsliderctrl.cpp
+++ b/linden/indra/llui/llsliderctrl.cpp
@@ -419,6 +419,8 @@ LLXMLNodePtr LLSliderCtrl::getXML(bool save_children) const
419{ 419{
420 LLXMLNodePtr node = LLUICtrl::getXML(); 420 LLXMLNodePtr node = LLUICtrl::getXML();
421 421
422 node->setName(LL_SLIDER_CTRL_TAG);
423
422 node->createChild("show_text", TRUE)->setBoolValue(mShowText); 424 node->createChild("show_text", TRUE)->setBoolValue(mShowText);
423 425
424 node->createChild("can_edit_text", TRUE)->setBoolValue(mCanEditText); 426 node->createChild("can_edit_text", TRUE)->setBoolValue(mCanEditText);
diff --git a/linden/indra/llui/llspinctrl.cpp b/linden/indra/llui/llspinctrl.cpp
index 2f531a2..2992f98 100644
--- a/linden/indra/llui/llspinctrl.cpp
+++ b/linden/indra/llui/llspinctrl.cpp
@@ -483,6 +483,8 @@ LLXMLNodePtr LLSpinCtrl::getXML(bool save_children) const
483{ 483{
484 LLXMLNodePtr node = LLUICtrl::getXML(); 484 LLXMLNodePtr node = LLUICtrl::getXML();
485 485
486 node->setName(LL_SPIN_CTRL_TAG);
487
486 node->createChild("decimal_digits", TRUE)->setIntValue(mPrecision); 488 node->createChild("decimal_digits", TRUE)->setIntValue(mPrecision);
487 489
488 if (mLabelBox) 490 if (mLabelBox)
diff --git a/linden/indra/llui/lltabcontainer.cpp b/linden/indra/llui/lltabcontainer.cpp
index f416948..1f94191 100644
--- a/linden/indra/llui/lltabcontainer.cpp
+++ b/linden/indra/llui/lltabcontainer.cpp
@@ -620,6 +620,9 @@ BOOL LLTabContainer::handleKeyHere(KEY key, MASK mask)
620LLXMLNodePtr LLTabContainer::getXML(bool save_children) const 620LLXMLNodePtr LLTabContainer::getXML(bool save_children) const
621{ 621{
622 LLXMLNodePtr node = LLPanel::getXML(); 622 LLXMLNodePtr node = LLPanel::getXML();
623
624 node->setName(LL_TAB_CONTAINER_COMMON_TAG);
625
623 node->createChild("tab_position", TRUE)->setStringValue((getTabPosition() == TOP ? "top" : "bottom")); 626 node->createChild("tab_position", TRUE)->setStringValue((getTabPosition() == TOP ? "top" : "bottom"));
624 return node; 627 return node;
625} 628}
diff --git a/linden/indra/llui/lltextbox.cpp b/linden/indra/llui/lltextbox.cpp
index 89893bc..e45716f 100644
--- a/linden/indra/llui/lltextbox.cpp
+++ b/linden/indra/llui/lltextbox.cpp
@@ -386,6 +386,8 @@ LLXMLNodePtr LLTextBox::getXML(bool save_children) const
386{ 386{
387 LLXMLNodePtr node = LLUICtrl::getXML(); 387 LLXMLNodePtr node = LLUICtrl::getXML();
388 388
389 node->setName(LL_TEXT_BOX_TAG);
390
389 // Attributes 391 // Attributes
390 node->createChild("font", TRUE)->setStringValue(LLFontGL::nameFromFont(mFontGL)); 392 node->createChild("font", TRUE)->setStringValue(LLFontGL::nameFromFont(mFontGL));
391 node->createChild("halign", TRUE)->setStringValue(LLFontGL::nameFromHAlign(mHAlign)); 393 node->createChild("halign", TRUE)->setStringValue(LLFontGL::nameFromHAlign(mHAlign));
diff --git a/linden/indra/llui/lltexteditor.cpp b/linden/indra/llui/lltexteditor.cpp
index 32106f1..7c05239 100644
--- a/linden/indra/llui/lltexteditor.cpp
+++ b/linden/indra/llui/lltexteditor.cpp
@@ -4296,6 +4296,8 @@ LLXMLNodePtr LLTextEditor::getXML(bool save_children) const
4296{ 4296{
4297 LLXMLNodePtr node = LLUICtrl::getXML(); 4297 LLXMLNodePtr node = LLUICtrl::getXML();
4298 4298
4299 node->setName(LL_SIMPLE_TEXT_EDITOR_TAG);
4300
4299 // Attributes 4301 // Attributes
4300 4302
4301 node->createChild("max_length", TRUE)->setIntValue(getMaxLength()); 4303 node->createChild("max_length", TRUE)->setIntValue(getMaxLength());
diff --git a/linden/indra/llui/lluictrlfactory.cpp b/linden/indra/llui/lluictrlfactory.cpp
index 983cc53..07eb39b 100644
--- a/linden/indra/llui/lluictrlfactory.cpp
+++ b/linden/indra/llui/lluictrlfactory.cpp
@@ -86,6 +86,15 @@ public:
86 LLUICtrlLocate() : LLUICtrl(std::string("locate"), LLRect(0,0,0,0), FALSE, NULL, NULL) { setTabStop(FALSE); } 86 LLUICtrlLocate() : LLUICtrl(std::string("locate"), LLRect(0,0,0,0), FALSE, NULL, NULL) { setTabStop(FALSE); }
87 virtual void draw() { } 87 virtual void draw() { }
88 88
89 virtual LLXMLNodePtr getXML(bool save_children = true) const
90 {
91 LLXMLNodePtr node = LLUICtrl::getXML();
92
93 node->setName(LL_UI_CTRL_LOCATE_TAG);
94
95 return node;
96 }
97
89 static LLView *fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory) 98 static LLView *fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
90 { 99 {
91 std::string name("pad"); 100 std::string name("pad");
@@ -163,20 +172,24 @@ bool LLUICtrlFactory::getLayeredXMLNode(const std::string &xui_filename, LLXMLNo
163 std::string full_filename = gDirUtilp->findSkinnedFilename(sXUIPaths.front(), xui_filename); 172 std::string full_filename = gDirUtilp->findSkinnedFilename(sXUIPaths.front(), xui_filename);
164 if (full_filename.empty()) 173 if (full_filename.empty())
165 { 174 {
166 llwarns << "Couldn't find UI description file: " << sXUIPaths.front() + gDirUtilp->getDirDelimiter() + xui_filename << llendl;
167 return false;
168 }
169
170 if (!LLXMLNode::parseFile(full_filename, root, NULL))
171 {
172 // try filename as passed in since sometimes we load an xml file from a user-supplied path 175 // try filename as passed in since sometimes we load an xml file from a user-supplied path
173 if (!LLXMLNode::parseFile(xui_filename, root, NULL)) 176 if (gDirUtilp->fileExists(xui_filename))
174 { 177 {
175 llwarns << "Problem reading UI description file: " << xui_filename << llendl; 178 full_filename = xui_filename;
179 }
180 else
181 {
182 llwarns << "Couldn't find UI description file: " << sXUIPaths.front() + gDirUtilp->getDirDelimiter() + xui_filename << llendl;
176 return false; 183 return false;
177 } 184 }
178 } 185 }
179 186
187 if (!LLXMLNode::parseFile(full_filename, root, NULL))
188 {
189 llwarns << "Problem reading UI description file: " << full_filename << llendl;
190 return false;
191 }
192
180 LLXMLNodePtr updateRoot; 193 LLXMLNodePtr updateRoot;
181 194
182 std::vector<std::string>::const_iterator itor; 195 std::vector<std::string>::const_iterator itor;
diff --git a/linden/indra/llui/lluixmltags.h b/linden/indra/llui/lluixmltags.h
index 0456666..4166131 100644
--- a/linden/indra/llui/lluixmltags.h
+++ b/linden/indra/llui/lluixmltags.h
@@ -122,5 +122,10 @@ const std::string
122 LL_JOYSTICK_TURN("joystick_turn"), 122 LL_JOYSTICK_TURN("joystick_turn"),
123 LL_GROUP_DROP_TARGET_TAG("group_drop_target"), 123 LL_GROUP_DROP_TARGET_TAG("group_drop_target"),
124 LL_LAYOUT_STACK_TAG("layout_stack"), 124 LL_LAYOUT_STACK_TAG("layout_stack"),
125 LL_FLYOUT_BUTTON_TAG("flyout_button"); 125 LL_LAYOUT_PANEL_TAG("layout_panel"),
126 LL_FLYOUT_BUTTON_TAG("flyout_button"),
127 LL_FLYOUT_BUTTON_ITEM_TAG("flyout_button_item"),
128 LL_SIMPLE_TEXT_EDITOR_TAG("simple_text_editor"),
129 LL_RADIO_ITEM_TAG("radio_item"),
130 LL_PROGRESS_BAR_TAG("progress_bar");
126#endif 131#endif
diff --git a/linden/indra/llui/llview.cpp b/linden/indra/llui/llview.cpp
index 36bc850..8de376f 100644
--- a/linden/indra/llui/llview.cpp
+++ b/linden/indra/llui/llview.cpp
@@ -1943,7 +1943,7 @@ BOOL LLView::localRectToOtherView( const LLRect& local, LLRect* other, LLView* o
1943// virtual 1943// virtual
1944LLXMLNodePtr LLView::getXML(bool save_children) const 1944LLXMLNodePtr LLView::getXML(bool save_children) const
1945{ 1945{
1946 //FIXME: need to provide actual derived type tag, probably outside this method 1946 //If called from a derived class, the derived class will override the node name
1947 LLXMLNodePtr node = new LLXMLNode("view", FALSE); 1947 LLXMLNodePtr node = new LLXMLNode("view", FALSE);
1948 1948
1949 node->createChild("name", TRUE)->setStringValue(getName()); 1949 node->createChild("name", TRUE)->setStringValue(getName());
@@ -2353,6 +2353,8 @@ LLView* LLView::findSnapEdge(S32& new_edge_val, const LLCoordGL& mouse_dir, ESna
2353void LLView::registerEventListener(std::string name, LLSimpleListener* function) 2353void LLView::registerEventListener(std::string name, LLSimpleListener* function)
2354{ 2354{
2355 mDispatchList.insert(std::pair<std::string, LLSimpleListener*>(name, function)); 2355 mDispatchList.insert(std::pair<std::string, LLSimpleListener*>(name, function));
2356 lldebugs << getName() << " registered " << name << llendl;
2357
2356} 2358}
2357 2359
2358void LLView::deregisterEventListener(std::string name) 2360void LLView::deregisterEventListener(std::string name)
diff --git a/linden/indra/llui/llviewborder.cpp b/linden/indra/llui/llviewborder.cpp
index d4a9e9d..47323e2 100644
--- a/linden/indra/llui/llviewborder.cpp
+++ b/linden/indra/llui/llviewborder.cpp
@@ -303,6 +303,16 @@ BOOL LLViewBorder::getBevelFromAttribute(LLXMLNodePtr node, LLViewBorder::EBevel
303} 303}
304 304
305 305
306// virtual
307LLXMLNodePtr LLViewBorder::getXML(bool save_children) const
308{
309 LLXMLNodePtr node = LLView::getXML();
310
311 node->setName(LL_VIEW_BORDER_TAG);
312
313 return node;
314}
315
306// static 316// static
307LLView* LLViewBorder::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory) 317LLView* LLViewBorder::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
308{ 318{
diff --git a/linden/indra/llui/llviewborder.h b/linden/indra/llui/llviewborder.h
index a40e653..1d80b6b 100644
--- a/linden/indra/llui/llviewborder.h
+++ b/linden/indra/llui/llviewborder.h
@@ -51,6 +51,7 @@ public:
51 // llview functionality 51 // llview functionality
52 virtual void draw(); 52 virtual void draw();
53 53
54 virtual LLXMLNodePtr getXML(bool save_children = true) const;
54 static LLView* fromXML(LLXMLNodePtr node, LLView *parent, class LLUICtrlFactory *factory); 55 static LLView* fromXML(LLXMLNodePtr node, LLView *parent, class LLUICtrlFactory *factory);
55 static BOOL getBevelFromAttribute(LLXMLNodePtr node, LLViewBorder::EBevel& bevel_style); 56 static BOOL getBevelFromAttribute(LLXMLNodePtr node, LLViewBorder::EBevel& bevel_style);
56 57