diff options
author | Mike Antipov <mantipov@productengine.com> | 2009-11-18 17:27:21 +0200 |
---|---|---|
committer | Mike Antipov <mantipov@productengine.com> | 2009-11-18 17:27:21 +0200 |
commit | f3e576eda24ab363ee280e52ae7fc3cdd2107321 (patch) | |
tree | 61b380d935fe285699f23896c555cf4a242dd483 | |
parent | fce52249abdba7a865f03c88692a45e8ff972763 (diff) | |
parent | 0688ae8c51d1c6d79ed30bb10ad049fd5ce790ef (diff) |
merge
--HG--
branch : product-engine
-rw-r--r-- | indra/newview/llchannelmanager.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llchiclet.cpp | 26 | ||||
-rw-r--r-- | indra/newview/llchiclet.h | 11 | ||||
-rw-r--r-- | indra/newview/llimview.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llsyswellwindow.h | 3 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_bottomtray.xml | 17 |
6 files changed, 27 insertions, 34 deletions
diff --git a/indra/newview/llchannelmanager.cpp b/indra/newview/llchannelmanager.cpp index 3443d8b593..aa584b3ae8 100644 --- a/indra/newview/llchannelmanager.cpp +++ b/indra/newview/llchannelmanager.cpp @@ -37,7 +37,6 @@ #include "llappviewer.h" #include "llviewercontrol.h" #include "llimview.h" -#include "llbottomtray.h" #include "llviewerwindow.h" #include "llrootview.h" #include "llsyswellwindow.h" diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 4078fac4ec..caf6917d90 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -81,27 +81,17 @@ LLNotificationChiclet::Params::Params() button.tab_stop(FALSE); button.label(LLStringUtil::null); - unread_notifications.name("unread"); - unread_notifications.font(LLFontGL::getFontSansSerif()); - unread_notifications.text_color=(LLColor4::white); - unread_notifications.font_halign(LLFontGL::HCENTER); - unread_notifications.mouse_opaque(FALSE); } LLNotificationChiclet::LLNotificationChiclet(const Params& p) : LLChiclet(p) , mButton(NULL) -, mCounterCtrl(NULL) +, mCounter(0) { LLButton::Params button_params = p.button; - button_params.rect(p.rect()); mButton = LLUICtrlFactory::create<LLButton>(button_params); addChild(mButton); - LLChicletNotificationCounterCtrl::Params unread_params = p.unread_notifications; - mCounterCtrl = LLUICtrlFactory::create<LLChicletNotificationCounterCtrl>(unread_params); - addChild(mCounterCtrl); - // connect counter handlers to the signals connectCounterUpdatersToSignal("notify"); connectCounterUpdatersToSignal("groupnotify"); @@ -126,13 +116,15 @@ void LLNotificationChiclet::connectCounterUpdatersToSignal(std::string notificat void LLNotificationChiclet::setCounter(S32 counter) { - mCounterCtrl->setCounter(counter); -} + std::string s_count; + if(counter != 0) + { + s_count = llformat("%d", counter); + } -void LLNotificationChiclet::setShowCounter(bool show) -{ - LLChiclet::setShowCounter(show); - mCounterCtrl->setVisible(getShowCounter()); + mButton->setLabel(s_count); + + mCounter = counter; } boost::signals2::connection LLNotificationChiclet::setClickCallback( diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index eab4a282f5..bb5dc1e550 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -638,13 +638,14 @@ public: /*virtual*/ void setCounter(S32 counter); - /*virtual*/S32 getCounter() { return mCounterCtrl->getCounter(); } - - /*virtual*/ void setShowCounter(bool show); + // *TODO: mantipov: seems getCounter is not necessary for LLNotificationChiclet + // but inherited interface requires it to implement. + // Probably it can be safe removed. + /*virtual*/S32 getCounter() { return mCounter; } boost::signals2::connection setClickCallback(const commit_callback_t& cb); - /*virtual*/ ~ LLNotificationChiclet(); + /*virtual*/ ~LLNotificationChiclet(); // methods for updating a number of unread System notifications void incUreadSystemNotifications() { setCounter(++mUreadSystemNotifications); } @@ -662,7 +663,7 @@ protected: protected: LLButton* mButton; - LLChicletNotificationCounterCtrl* mCounterCtrl; + S32 mCounter; }; /* diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index dc32291714..dd78bb631f 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -49,6 +49,7 @@ #include "llbottomtray.h" #include "llcallingcard.h" #include "llchat.h" +#include "llchiclet.h"
#include "llresmgr.h" #include "llfloaterchat.h" #include "llfloaterchatterbox.h" @@ -1194,7 +1195,7 @@ BOOL LLIncomingCallDialog::postBuild() // check to see if this is an Avaline call LLUUID session_id = mPayload["session_id"].asUUID(); - bool is_avatar = LLVoiceClient::getInstance()->isParticipantAvatar(session_id);
+ bool is_avatar = LLVoiceClient::getInstance()->isParticipantAvatar(session_id); childSetVisible("Start IM", is_avatar); // no IM for avaline LLUICtrl* caller_name_widget = getChild<LLUICtrl>("caller name"); diff --git a/indra/newview/llsyswellwindow.h b/indra/newview/llsyswellwindow.h index cbc5f7358f..3e4cdbdcbe 100644 --- a/indra/newview/llsyswellwindow.h +++ b/indra/newview/llsyswellwindow.h @@ -39,12 +39,13 @@ #include "llbutton.h" #include "llscreenchannel.h" #include "llscrollcontainer.h" -#include "llchiclet.h" #include "llimview.h" #include "boost/shared_ptr.hpp" class LLFlatListView; +class LLChiclet; +class LLIMChiclet; class LLSysWellWindow : public LLDockableFloater, LLIMSessionObserver { diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index d2933c0c0e..00711a29e0 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -299,8 +299,8 @@ as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly. min_height="28" top="0" name="sys_well_panel" - width="34" - min_width="34" + width="54" + min_width="54" user_resize="false"> <chiclet_notification follows="right" @@ -309,22 +309,21 @@ as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly. left="0" name="sys_well" top="4" - width="34"> + width="54"> <button auto_resize="true" halign="right" height="23" follows="right" flash_color="EmphasisColor" + left="0" name="Unread" image_overlay="Notices_Unread" - width="20" + image_overlay_alignment="right" + pad_right="6" + pad_left="6" + width="54" /> - <unread_notifications - width="34" - height="20" - left="0" - top="19" /> </chiclet_notification> </layout_panel> <icon |