aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llui
diff options
context:
space:
mode:
authorJacek Antonelli2009-05-24 02:59:02 -0500
committerJacek Antonelli2009-05-24 02:59:08 -0500
commit811454f47ea1f3c5cb8971f0fed0959b18bd0747 (patch)
tree1b8689df2dc8857cdc5a956a5233d5bf94b5c8d7 /linden/indra/llui
parentSecond Life viewer sources 1.23.0-RC (diff)
downloadmeta-impy-811454f47ea1f3c5cb8971f0fed0959b18bd0747.zip
meta-impy-811454f47ea1f3c5cb8971f0fed0959b18bd0747.tar.gz
meta-impy-811454f47ea1f3c5cb8971f0fed0959b18bd0747.tar.bz2
meta-impy-811454f47ea1f3c5cb8971f0fed0959b18bd0747.tar.xz
Second Life viewer sources 1.23.1-RC
Diffstat (limited to 'linden/indra/llui')
-rw-r--r--linden/indra/llui/llmenugl.cpp23
-rw-r--r--linden/indra/llui/llmenugl.h4
-rw-r--r--linden/indra/llui/llnotifications.cpp9
-rw-r--r--linden/indra/llui/llpanel.cpp8
4 files changed, 36 insertions, 8 deletions
diff --git a/linden/indra/llui/llmenugl.cpp b/linden/indra/llui/llmenugl.cpp
index f2f2aae..253b30b 100644
--- a/linden/indra/llui/llmenugl.cpp
+++ b/linden/indra/llui/llmenugl.cpp
@@ -2178,7 +2178,9 @@ void LLMenuGL::arrange( void )
2178 { 2178 {
2179 if ((*item_iter)->getVisible()) 2179 if ((*item_iter)->getVisible())
2180 { 2180 {
2181 if (!getTornOff() && width + (*item_iter)->getNominalWidth() > max_width - spillover_item_width) 2181 if (!getTornOff()
2182 && item_iter != mItems.begin() // Don't spillover the first item!
2183 && width + (*item_iter)->getNominalWidth() > max_width - spillover_item_width)
2182 { 2184 {
2183 // no room for any more items 2185 // no room for any more items
2184 createSpilloverBranch(); 2186 createSpilloverBranch();
@@ -2188,8 +2190,9 @@ void LLMenuGL::arrange( void )
2188 { 2190 {
2189 LLMenuItemGL* itemp = (*spillover_iter); 2191 LLMenuItemGL* itemp = (*spillover_iter);
2190 removeChild(itemp); 2192 removeChild(itemp);
2191 mSpilloverMenu->append(itemp); 2193 mSpilloverMenu->appendNoArrange(itemp); // *NOTE:Mani Favor addChild() in merge with skinning
2192 } 2194 }
2195 mSpilloverMenu->arrange(); // *NOTE: Mani Remove line in merge with skinning/viewer2.0 branch
2193 mItems.erase(item_iter, mItems.end()); 2196 mItems.erase(item_iter, mItems.end());
2194 2197
2195 mItems.push_back(mSpilloverBranch); 2198 mItems.push_back(mSpilloverBranch);
@@ -2215,7 +2218,9 @@ void LLMenuGL::arrange( void )
2215 { 2218 {
2216 if ((*item_iter)->getVisible()) 2219 if ((*item_iter)->getVisible())
2217 { 2220 {
2218 if (!getTornOff() && height + (*item_iter)->getNominalHeight() > max_height - spillover_item_height) 2221 if (!getTornOff()
2222 && item_iter != mItems.begin() // Don't spillover the first item!
2223 && height + (*item_iter)->getNominalHeight() > max_height - spillover_item_height)
2219 { 2224 {
2220 // no room for any more items 2225 // no room for any more items
2221 createSpilloverBranch(); 2226 createSpilloverBranch();
@@ -2225,8 +2230,9 @@ void LLMenuGL::arrange( void )
2225 { 2230 {
2226 LLMenuItemGL* itemp = (*spillover_iter); 2231 LLMenuItemGL* itemp = (*spillover_iter);
2227 removeChild(itemp); 2232 removeChild(itemp);
2228 mSpilloverMenu->append(itemp); 2233 mSpilloverMenu->appendNoArrange(itemp); // *NOTE:Mani Favor addChild() in merge with skinning
2229 } 2234 }
2235 mSpilloverMenu->arrange(); // *NOTE: Mani Remove line in merge with skinning/viewer2.0 branch
2230 mItems.erase(item_iter, mItems.end()); 2236 mItems.erase(item_iter, mItems.end());
2231 mItems.push_back(mSpilloverBranch); 2237 mItems.push_back(mSpilloverBranch);
2232 addChild(mSpilloverBranch); 2238 addChild(mSpilloverBranch);
@@ -2477,6 +2483,15 @@ BOOL LLMenuGL::append( LLMenuItemGL* item )
2477 return TRUE; 2483 return TRUE;
2478} 2484}
2479 2485
2486// *NOTE:Mani - appendNoArrange() should be removed when merging to skinning/viewer2.0
2487// Its added as a fix to a viewer 1.23 bug that has already been address by skinning work.
2488BOOL LLMenuGL::appendNoArrange( LLMenuItemGL* item )
2489{
2490 mItems.push_back( item );
2491 addChild( item );
2492 return TRUE;
2493}
2494
2480// add a separator to this menu 2495// add a separator to this menu
2481BOOL LLMenuGL::appendSeparator( const std::string &separator_name ) 2496BOOL LLMenuGL::appendSeparator( const std::string &separator_name )
2482{ 2497{
diff --git a/linden/indra/llui/llmenugl.h b/linden/indra/llui/llmenugl.h
index a2ef968..030b81b 100644
--- a/linden/indra/llui/llmenugl.h
+++ b/linden/indra/llui/llmenugl.h
@@ -439,6 +439,10 @@ public:
439 // Add the menu item to this menu. 439 // Add the menu item to this menu.
440 virtual BOOL append( LLMenuItemGL* item ); 440 virtual BOOL append( LLMenuItemGL* item );
441 441
442 // *NOTE:Mani - appendNoArrange() should be removed when merging to skinning/viewer2.0
443 // Its added as a fix to a viewer 1.23 bug that has already been address by skinning work.
444 virtual BOOL appendNoArrange( LLMenuItemGL* item );
445
442 // add a separator to this menu 446 // add a separator to this menu
443 virtual BOOL appendSeparator( const std::string &separator_name = LLStringUtil::null ); 447 virtual BOOL appendSeparator( const std::string &separator_name = LLStringUtil::null );
444 448
diff --git a/linden/indra/llui/llnotifications.cpp b/linden/indra/llui/llnotifications.cpp
index 2ae9672..6b7dd0a 100644
--- a/linden/indra/llui/llnotifications.cpp
+++ b/linden/indra/llui/llnotifications.cpp
@@ -310,7 +310,7 @@ void LLNotificationForm::addElement(const std::string& type, const std::string&
310 LLSD element; 310 LLSD element;
311 element["type"] = type; 311 element["type"] = type;
312 element["name"] = name; 312 element["name"] = name;
313 element["label"] = name; 313 element["text"] = name;
314 element["value"] = value; 314 element["value"] = value;
315 element["index"] = mFormData.size(); 315 element["index"] = mFormData.size();
316 mFormData.append(element); 316 mFormData.append(element);
@@ -525,7 +525,12 @@ std::string LLNotification::getSelectedOptionName(const LLSD& response)
525void LLNotification::respond(const LLSD& response) 525void LLNotification::respond(const LLSD& response)
526{ 526{
527 mRespondedTo = true; 527 mRespondedTo = true;
528 LLNotificationFunctorRegistry::instance().getFunctor(mResponseFunctorName)(asLLSD(), response); 528 // look up the functor
529 LLNotificationFunctorRegistry::ResponseFunctor functor =
530 LLNotificationFunctorRegistry::instance().getFunctor(mResponseFunctorName);
531 // and then call it
532 functor(asLLSD(), response);
533
529 if (mTemporaryResponder) 534 if (mTemporaryResponder)
530 { 535 {
531 LLNotificationFunctorRegistry::instance().unregisterFunctor(mResponseFunctorName); 536 LLNotificationFunctorRegistry::instance().unregisterFunctor(mResponseFunctorName);
diff --git a/linden/indra/llui/llpanel.cpp b/linden/indra/llui/llpanel.cpp
index 92d045d..28780c7 100644
--- a/linden/indra/llui/llpanel.cpp
+++ b/linden/indra/llui/llpanel.cpp
@@ -1085,11 +1085,15 @@ struct LLLayoutStack::LLEmbeddedPanel
1085 { 1085 {
1086 if (mOrientation == HORIZONTAL) 1086 if (mOrientation == HORIZONTAL)
1087 { 1087 {
1088 return mVisibleAmt * clamp_rescale(mCollapseAmt, 0.f, 1.f, 1.f, (F32)mMinWidth / (F32)mPanel->getRect().getWidth()); 1088 F32 collapse_amt =
1089 clamp_rescale(mCollapseAmt, 0.f, 1.f, 1.f, (F32)mMinWidth / (F32)llmax(1, mPanel->getRect().getWidth()));
1090 return mVisibleAmt * collapse_amt;
1089 } 1091 }
1090 else 1092 else
1091 { 1093 {
1092 return mVisibleAmt * clamp_rescale(mCollapseAmt, 0.f, 1.f, 1.f, (F32)mMinHeight / (F32)mPanel->getRect().getHeight()); 1094 F32 collapse_amt =
1095 clamp_rescale(mCollapseAmt, 0.f, 1.f, 1.f, llmin(1.f, (F32)mMinHeight / (F32)llmax(1, mPanel->getRect().getHeight())));
1096 return mVisibleAmt * collapse_amt;
1093 } 1097 }
1094 } 1098 }
1095 1099