aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJacek Antonelli2010-01-04 21:30:03 -0600
committerJacek Antonelli2010-01-04 21:31:09 -0600
commit8a5b11f0c3d2c8f539eb2d779be439e33222e89b (patch)
tree1541c758201b083b3a030fd3aa7e8d6bf81c0faa
parentChangeLog entry: Several changes to work better on 64bit Linux. (diff)
downloadmeta-impy-8a5b11f0c3d2c8f539eb2d779be439e33222e89b.zip
meta-impy-8a5b11f0c3d2c8f539eb2d779be439e33222e89b.tar.gz
meta-impy-8a5b11f0c3d2c8f539eb2d779be439e33222e89b.tar.bz2
meta-impy-8a5b11f0c3d2c8f539eb2d779be439e33222e89b.tar.xz
Added LLFloater::setTitleArg and LLFloater::setShortTitleArg.
This allows doing "[ARG]" replacement in floater titles.
-rw-r--r--ChangeLog.txt9
-rw-r--r--linden/indra/llui/llfloater.cpp26
-rw-r--r--linden/indra/llui/llfloater.h6
3 files changed, 33 insertions, 8 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt
index 64894ab..7eaaa42 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,3 +1,12 @@
12010-01-04 Jacek Antonelli <jacek.antonelli@gmail.com>
2
3 * Added LLFloater::setTitleArg and LLFloater::setShortTitleArg.
4 This allows doing "[ARG]" replacement in floater titles.
5
6 modified: linden/indra/llui/llfloater.cpp
7 modified: linden/indra/llui/llfloater.h
8
9
12010-01-03 Armin Weatherwax <Armin.Weatherwax@gmail.com> 102010-01-03 Armin Weatherwax <Armin.Weatherwax@gmail.com>
2 11
3 * Several changes to work better on 64bit Linux. 12 * Several changes to work better on 64bit Linux.
diff --git a/linden/indra/llui/llfloater.cpp b/linden/indra/llui/llfloater.cpp
index defe200..e667bd4 100644
--- a/linden/indra/llui/llfloater.cpp
+++ b/linden/indra/llui/llfloater.cpp
@@ -691,11 +691,11 @@ void LLFloater::applyTitle()
691 691
692 if (isMinimized() && !mShortTitle.empty()) 692 if (isMinimized() && !mShortTitle.empty())
693 { 693 {
694 mDragHandle->setTitle( mShortTitle ); 694 mDragHandle->setTitle( mShortTitle.getString() );
695 } 695 }
696 else 696 else
697 { 697 {
698 mDragHandle->setTitle ( mTitle ); 698 mDragHandle->setTitle ( mTitle.getString() );
699 } 699 }
700} 700}
701 701
@@ -706,7 +706,7 @@ const std::string& LLFloater::getCurrentTitle() const
706 706
707void LLFloater::setTitle( const std::string& title ) 707void LLFloater::setTitle( const std::string& title )
708{ 708{
709 mTitle = title; 709 mTitle.assign(title);
710 applyTitle(); 710 applyTitle();
711} 711}
712 712
@@ -718,13 +718,13 @@ std::string LLFloater::getTitle()
718 } 718 }
719 else 719 else
720 { 720 {
721 return mTitle; 721 return mTitle.getString();
722 } 722 }
723} 723}
724 724
725void LLFloater::setShortTitle( const std::string& short_title ) 725void LLFloater::setShortTitle( const std::string& short_title )
726{ 726{
727 mShortTitle = short_title; 727 mShortTitle.assign(short_title);
728 applyTitle(); 728 applyTitle();
729} 729}
730 730
@@ -736,11 +736,25 @@ std::string LLFloater::getShortTitle()
736 } 736 }
737 else 737 else
738 { 738 {
739 return mShortTitle; 739 return mShortTitle.getString();
740 } 740 }
741} 741}
742 742
743 743
744BOOL LLFloater::setTitleArg( const std::string& key, const LLStringExplicit& text )
745{
746 mTitle.setArg(key, text);
747 applyTitle();
748 return TRUE;
749}
750
751BOOL LLFloater::setShortTitleArg( const std::string& key, const LLStringExplicit& text )
752{
753 mShortTitle.setArg(key, text);
754 applyTitle();
755 return TRUE;
756}
757
744 758
745BOOL LLFloater::canSnapTo(const LLView* other_view) 759BOOL LLFloater::canSnapTo(const LLView* other_view)
746{ 760{
diff --git a/linden/indra/llui/llfloater.h b/linden/indra/llui/llfloater.h
index 0e3d148..4906e85 100644
--- a/linden/indra/llui/llfloater.h
+++ b/linden/indra/llui/llfloater.h
@@ -165,6 +165,8 @@ public:
165 std::string getTitle(); 165 std::string getTitle();
166 void setShortTitle( const std::string& short_title ); 166 void setShortTitle( const std::string& short_title );
167 std::string getShortTitle(); 167 std::string getShortTitle();
168 BOOL setTitleArg( const std::string& key, const LLStringExplicit& text );
169 BOOL setShortTitleArg( const std::string& key, const LLStringExplicit& text );
168 void setTitleVisible(bool visible); 170 void setTitleVisible(bool visible);
169 virtual void setMinimized(BOOL b); 171 virtual void setMinimized(BOOL b);
170 void moveResizeHandlesToFront(); 172 void moveResizeHandlesToFront();
@@ -276,8 +278,8 @@ private:
276 BOOL mMinimized; 278 BOOL mMinimized;
277 BOOL mForeground; 279 BOOL mForeground;
278 LLHandle<LLFloater> mDependeeHandle; 280 LLHandle<LLFloater> mDependeeHandle;
279 std::string mTitle; 281 LLUIString mTitle;
280 std::string mShortTitle; 282 LLUIString mShortTitle;
281 283
282 BOOL mFirstLook; // TRUE if the _next_ time this floater is visible will be the first time in the session that it is visible. 284 BOOL mFirstLook; // TRUE if the _next_ time this floater is visible will be the first time in the session that it is visible.
283 285