diff options
author | Paul Guslisty pguslisty@productengine.com <Paul Guslisty pguslisty@productengine.com> | 2010-02-11 12:52:26 +0200 |
---|---|---|
committer | Paul Guslisty pguslisty@productengine.com <Paul Guslisty pguslisty@productengine.com> | 2010-02-11 12:52:26 +0200 |
commit | cf18a1d22c7a4c315a651bc39085bc6d723e8e7d (patch) | |
tree | 6473668d45b97f714cabc1a0263e043cb03de8f4 | |
parent | de7ca5abb26930025b16c7f50aa7469c3b33c09e (diff) |
EXT - 2753 (Implement Avatar icons on IM multifloater tabs) refactoring:
- Deleted unnecessary parameters (UIButtonImageTopPadding, UIButtonImageBottomPadding) from settings.xml and their usage in LLTabContainer
- Deleted triggers (LLIMFloaterContainer::processProperties and LLIMFloaterContainer::changed) due to LLIMFloaterContainer no more Observer
- Renamed class LLParticularGroupMgrObserver to LLParticularGroupObserver as the last one's name is more self explanatory
--HG--
branch : product-engine
-rw-r--r-- | indra/llui/lltabcontainer.cpp | 5 | ||||
-rw-r--r-- | indra/newview/app_settings/settings.xml | 22 | ||||
-rw-r--r-- | indra/newview/llgroupmgr.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llgroupmgr.h | 10 | ||||
-rw-r--r-- | indra/newview/llimfloatercontainer.cpp | 30 | ||||
-rw-r--r-- | indra/newview/llimfloatercontainer.h | 5 |
6 files changed, 9 insertions, 69 deletions
diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index fe699cfa01..13340e7ded 100644 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -1631,14 +1631,9 @@ void LLTabContainer::setTabImage(LLPanel* child, LLIconCtrl* icon) void LLTabContainer::reshapeTuple(LLTabTuple* tuple) { static LLUICachedControl<S32> tab_padding ("UITabPadding", 0); - static LLUICachedControl<S32> image_top_padding ("UIButtonImageTopPadding", 2); - static LLUICachedControl<S32> image_bottom_padding ("UIButtonImageBottomPadding", 2); if (!mIsVertical) { - tuple->mButton->setImageOverlayTopPad(image_top_padding); - tuple->mButton->setImageOverlayBottomPad(image_bottom_padding); - // remove current width from total tab strip width mTotalTabWidth -= tuple->mButton->getRect().getWidth(); diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index db4e0b5afd..48205370ef 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -9949,28 +9949,6 @@ <key>Value</key> <integer>15</integer> </map> - <key>UIButtonImageTopPadding</key> - <map> - <key>Comment</key> - <string>Button Overlay Image Top Padding</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>S32</string> - <key>Value</key> - <integer>2</integer> - </map> - <key>UIButtonImageBottomPadding</key> - <map> - <key>Comment</key> - <string>Button Overlay Image Bottom Padding</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>S32</string> - <key>Value</key> - <integer>2</integer> - </map> <key>UploadBakedTexOld</key> <map> <key>Comment</key> diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp index 4c1019a882..e65990a095 100644 --- a/indra/newview/llgroupmgr.cpp +++ b/indra/newview/llgroupmgr.cpp @@ -762,7 +762,7 @@ void LLGroupMgr::addObserver(LLGroupMgrObserver* observer) mObservers.insert(std::pair<LLUUID, LLGroupMgrObserver*>(observer->getID(), observer)); } -void LLGroupMgr::addObserver(const LLUUID& group_id, LLParticularGroupMgrObserver* observer) +void LLGroupMgr::addObserver(const LLUUID& group_id, LLParticularGroupObserver* observer) { if(group_id.notNull() && observer) { @@ -792,7 +792,7 @@ void LLGroupMgr::removeObserver(LLGroupMgrObserver* observer) } } -void LLGroupMgr::removeObserver(const LLUUID& group_id, LLParticularGroupMgrObserver* observer) +void LLGroupMgr::removeObserver(const LLUUID& group_id, LLParticularGroupObserver* observer) { if(group_id.isNull() || !observer) { @@ -1364,7 +1364,7 @@ void LLGroupMgr::notifyObservers(LLGroupChange gc) gi->second->mChanged = FALSE; - // notify LLParticularGroupMgrObserver + // notify LLParticularGroupObserver observer_map_t::iterator obs_it = mParticularObservers.find(group_id); if(obs_it == mParticularObservers.end()) return; diff --git a/indra/newview/llgroupmgr.h b/indra/newview/llgroupmgr.h index 588b4a9034..2c86de8b97 100644 --- a/indra/newview/llgroupmgr.h +++ b/indra/newview/llgroupmgr.h @@ -53,10 +53,10 @@ protected: LLUUID mID; }; -class LLParticularGroupMgrObserver +class LLParticularGroupObserver { public: - virtual ~LLParticularGroupMgrObserver(){} + virtual ~LLParticularGroupObserver(){} virtual void changed(const LLUUID& group_id, LLGroupChange gc) = 0; }; @@ -313,9 +313,9 @@ public: ~LLGroupMgr(); void addObserver(LLGroupMgrObserver* observer); - void addObserver(const LLUUID& group_id, LLParticularGroupMgrObserver* observer); + void addObserver(const LLUUID& group_id, LLParticularGroupObserver* observer); void removeObserver(LLGroupMgrObserver* observer); - void removeObserver(const LLUUID& group_id, LLParticularGroupMgrObserver* observer); + void removeObserver(const LLUUID& group_id, LLParticularGroupObserver* observer); LLGroupMgrGroupData* getGroupData(const LLUUID& id); void sendGroupPropertiesRequest(const LLUUID& group_id); @@ -374,7 +374,7 @@ private: typedef std::map<LLUUID, LLGroupMgrGroupData*> group_map_t; group_map_t mGroups; - typedef std::set<LLParticularGroupMgrObserver*> observer_set_t; + typedef std::set<LLParticularGroupObserver*> observer_set_t; typedef std::map<LLUUID,observer_set_t> observer_map_t; observer_map_t mParticularObservers; }; diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index ba034609e9..7162386d08 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -121,36 +121,6 @@ void LLIMFloaterContainer::onCloseFloater(LLUUID& id) mSessions.erase(id); } -void LLIMFloaterContainer::processProperties(void* data, enum EAvatarProcessorType type) -{ - if (APT_PROPERTIES == type) - { - LLAvatarData* avatar_data = static_cast<LLAvatarData*>(data); - if (avatar_data) - { - LLUUID avatar_id = avatar_data->avatar_id; - LLUUID* cached_avatarId = LLAvatarIconIDCache::getInstance()->get(avatar_id); - if(cached_avatarId && cached_avatarId->notNull() && avatar_data->image_id != *cached_avatarId) - { - LLAvatarIconIDCache::getInstance()->add(avatar_id,avatar_data->image_id); - mTabContainer->setTabImage(get_ptr_in_map(mSessions, avatar_id), avatar_data->image_id); - } - } - } -} - -void LLIMFloaterContainer::changed(const LLUUID& group_id, LLGroupChange gc) -{ - if (GC_PROPERTIES == gc) - { - LLGroupMgrGroupData* group_data = LLGroupMgr::getInstance()->getGroupData(group_id); - if (group_data && group_data->mInsigniaID.notNull()) - { - mTabContainer->setTabImage(get_ptr_in_map(mSessions, group_id), group_data->mInsigniaID); - } - } -} - void LLIMFloaterContainer::onNewMessageReceived(const LLSD& data) { LLUUID session_id = data["from_id"].asUUID(); diff --git a/indra/newview/llimfloatercontainer.h b/indra/newview/llimfloatercontainer.h index b07ef2d71d..46c0617c01 100644 --- a/indra/newview/llimfloatercontainer.h +++ b/indra/newview/llimfloatercontainer.h @@ -43,7 +43,7 @@ class LLTabContainer; -class LLIMFloaterContainer : public LLMultiFloater, public LLAvatarPropertiesObserver, public LLParticularGroupMgrObserver +class LLIMFloaterContainer : public LLMultiFloater { public: LLIMFloaterContainer(const LLSD& seed); @@ -57,9 +57,6 @@ public: BOOL select_added_floater, LLTabContainer::eInsertionPoint insertion_point = LLTabContainer::END); - void processProperties(void* data, EAvatarProcessorType type); - void changed(const LLUUID& group_id, LLGroupChange gc); - static LLFloater* getCurrentVoiceFloater(); static LLIMFloaterContainer* findInstance(); |