--HG--
branch : product-engine
meow-7.2.2
Mike Antipov 2009-11-18 17:27:21 +02:00
commit f3e576eda2
6 changed files with 27 additions and 34 deletions

View File

@ -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"

View File

@ -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(

View File

@ -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;
};
/*

View File

@ -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");

View File

@ -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
{

View File

@ -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