--HG--
branch : product-engine
meow-7.2.2
Dmitry Zaporozhan 2009-11-11 13:06:33 +02:00
commit 511d8a0a60
11 changed files with 95 additions and 22 deletions

View File

@ -159,19 +159,19 @@ BOOL LLAgentUI::buildLocationString(std::string& str, ELocationFormat fmt,const
buffer = llformat("%.100s", parcel_name.c_str());
break;
case LOCATION_FORMAT_NORMAL:
buffer = llformat("%s, %s", region_name.c_str(), parcel_name.c_str());
buffer = llformat("%s, %s", parcel_name.c_str(), region_name.c_str());
break;
case LOCATION_FORMAT_WITHOUT_SIM:
buffer = llformat("%s, %s (%d, %d, %d)",
region_name.c_str(),
parcel_name.c_str(),
region_name.c_str(),
pos_x, pos_y, pos_z);
break;
case LOCATION_FORMAT_FULL:
std::string sim_access_string = region->getSimAccessString();
buffer = llformat("%s, %s (%d, %d, %d)%s%s",
region_name.c_str(),
parcel_name.c_str(),
region_name.c_str(),
pos_x, pos_y, pos_z,
sim_access_string.empty() ? "" : " - ",
sim_access_string.c_str());

View File

@ -143,7 +143,8 @@ void LLAvatarIconIDCache::remove (const LLUUID& avatar_id)
LLAvatarIconCtrl::Params::Params()
: avatar_id("avatar_id"),
draw_tooltip("draw_tooltip", true)
draw_tooltip("draw_tooltip", true),
default_icon_name("default_icon_name")
{
name = "avatar_icon";
}
@ -151,7 +152,8 @@ LLAvatarIconCtrl::Params::Params()
LLAvatarIconCtrl::LLAvatarIconCtrl(const LLAvatarIconCtrl::Params& p)
: LLIconCtrl(p),
mDrawTooltip(p.draw_tooltip)
mDrawTooltip(p.draw_tooltip),
mDefaultIconName(p.default_icon_name)
{
mPriority = LLViewerFetchedTexture::BOOST_ICON;
@ -193,7 +195,7 @@ LLAvatarIconCtrl::LLAvatarIconCtrl(const LLAvatarIconCtrl::Params& p)
}
else
{
LLIconCtrl::setValue("default_profile_picture.j2c");
LLIconCtrl::setValue(mDefaultIconName);
}
}
@ -260,7 +262,7 @@ bool LLAvatarIconCtrl::updateFromCache()
}
else
{
LLIconCtrl::setValue("default_profile_picture.j2c");
LLIconCtrl::setValue(mDefaultIconName);
}
return true;

View File

@ -74,6 +74,7 @@ public:
{
Optional <LLUUID> avatar_id;
Optional <bool> draw_tooltip;
Optional <std::string> default_icon_name;
Params();
};
@ -106,7 +107,7 @@ protected:
std::string mFirstName;
std::string mLastName;
bool mDrawTooltip;
std::string mDefaultIconName;
bool updateFromCache();
};

View File

@ -59,6 +59,9 @@ static const LLRect CHICLET_RECT(0, 25, 25, 0);
static const LLRect CHICLET_ICON_RECT(0, 24, 24, 0);
static const LLRect VOICE_INDICATOR_RECT(25, 25, 45, 0);
// static
const S32 LLChicletPanel::s_scroll_ratio = 10;
S32 LLNotificationChiclet::mUreadSystemNotifications = 0;
boost::signals2::signal<LLChiclet* (const LLUUID&),
@ -100,6 +103,7 @@ LLNotificationChiclet::LLNotificationChiclet(const Params& p)
// connect counter handlers to the signals
connectCounterUpdatersToSignal("notify");
connectCounterUpdatersToSignal("groupnotify");
connectCounterUpdatersToSignal("offer");
}
LLNotificationChiclet::~LLNotificationChiclet()
@ -856,12 +860,14 @@ BOOL LLChicletPanel::postBuild()
mLeftScrollButton=getChild<LLButton>("chicklet_left_scroll_button");
LLTransientFloaterMgr::getInstance()->addControlView(mLeftScrollButton);
mLeftScrollButton->setClickedCallback(boost::bind(&LLChicletPanel::onLeftScrollClick,this));
mLeftScrollButton->setMouseDownCallback(boost::bind(&LLChicletPanel::onLeftScrollClick,this));
mLeftScrollButton->setHeldDownCallback(boost::bind(&LLChicletPanel::onLeftScrollHeldDown,this));
mLeftScrollButton->setEnabled(false);
mRightScrollButton=getChild<LLButton>("chicklet_right_scroll_button");
LLTransientFloaterMgr::getInstance()->addControlView(mRightScrollButton);
mRightScrollButton->setClickedCallback(boost::bind(&LLChicletPanel::onRightScrollClick,this));
mRightScrollButton->setMouseDownCallback(boost::bind(&LLChicletPanel::onRightScrollClick,this));
mRightScrollButton->setHeldDownCallback(boost::bind(&LLChicletPanel::onRightScrollHeldDown,this));
mRightScrollButton->setEnabled(false);
return TRUE;
@ -1220,6 +1226,22 @@ void LLChicletPanel::onRightScrollClick()
scrollRight();
}
void LLChicletPanel::onLeftScrollHeldDown()
{
S32 offset = mScrollingOffset;
mScrollingOffset = mScrollingOffset / s_scroll_ratio;
scrollLeft();
mScrollingOffset = offset;
}
void LLChicletPanel::onRightScrollHeldDown()
{
S32 offset = mScrollingOffset;
mScrollingOffset = mScrollingOffset / s_scroll_ratio;
scrollRight();
mScrollingOffset = offset;
}
boost::signals2::connection LLChicletPanel::setChicletClickedCallback(
const commit_callback_t& cb)
{

View File

@ -107,6 +107,7 @@ public:
{
draw_tooltip(FALSE);
mouse_opaque(FALSE);
default_icon_name("Generic_Person");
};
};
@ -128,7 +129,7 @@ public:
Optional<std::string> default_icon;
Params()
: default_icon("default_icon", "default_land_picture.j2c")
: default_icon("default_icon", "Generic_Group")
{
};
};
@ -830,6 +831,16 @@ protected:
*/
void onRightScrollClick();
/*
* Callback for right scroll button held down event
*/
void onLeftScrollHeldDown();
/*
* Callback for left scroll button held down event
*/
void onRightScrollHeldDown();
/*
* Callback for mouse wheel scrolled, calls scrollRight() or scrollLeft()
*/
@ -870,6 +881,7 @@ protected:
S32 mScrollingOffset;
S32 mMinWidth;
bool mShowControls;
static const S32 s_scroll_ratio;
};
template<class T>

View File

@ -480,7 +480,7 @@ void LLNavigationBar::rebuildTeleportHistoryMenu()
type = LLTeleportHistoryMenuItem::TYPE_CURRENT;
LLTeleportHistoryMenuItem::Params item_params;
item_params.label = item_params.name = hist_items[i].getTitle();
item_params.label = item_params.name = hist_items[i].mTitle;
item_params.item_type = type;
item_params.on_click.function(boost::bind(&LLNavigationBar::onTeleportHistoryMenuItemClicked, this, i));
LLTeleportHistoryMenuItem* new_itemp = LLUICtrlFactory::create<LLTeleportHistoryMenuItem>(item_params);

View File

@ -95,14 +95,9 @@ bool LLOfferHandler::processNotification(const LLSD& notify)
LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, notification->getPayload()["from_id"]);
if (!LLIMMgr::instance().hasSession(session_id))
{
// create session with faked type to avoid creating chicklets
session_id = LLIMMgr::instance().addSession(
notification->getSubstitutions()["NAME"], IM_NOTHING_SPECIAL,
notification->getPayload()["from_id"]);
if (session_id != LLUUID::null)
{
LLIMFloater::show(session_id);
}
}
LLIMMgr::instance().addMessage(session_id, LLUUID(),
notification->getSubstitutions()["NAME"],

View File

@ -460,16 +460,51 @@ void LLSideTray::createButtons ()
}
}
void LLSideTray::processTriState ()
{
if(mCollapsed)
expandSideBar();
else
{
//!!!!!!!!!!!!!!!!!
//** HARDCODED!!!!!
//!!!!!!!!!!!!!!!!!
//there is no common way to determine "default" panel for tab
//so default panels for now will be hardcoded
//hardcoded for people tab and profile tab
/*if(mActiveTab == getTab("sidebar_people"))
{
LLSideTrayPanelContainer* container = findChild<LLSideTrayPanelContainer>("panel_container");
if(container && container->getCurrentPanelIndex()>0)
{
container->onOpen(LLSD().insert("sub_panel_name","panel_people"));
}
else
collapseSideBar();
}
else if(mActiveTab == getTab("sidebar_me"))
{
LLTabContainer* tab_container = findChild<LLTabContainer>("tabs");
if(tab_container && tab_container->getCurrentPanelIndex()>0)
tab_container->selectFirstTab();
else
collapseSideBar();
}
else*/
collapseSideBar();
}
}
void LLSideTray::onTabButtonClick(string name)
{
LLSideTrayTab* side_bar = getTab(name);
if(side_bar == mActiveTab)
{
if(mCollapsed)
expandSideBar();
else
collapseSideBar();
processTriState ();
return;
}
selectTabByName (name);

View File

@ -135,6 +135,8 @@ public:
S32 getTrayWidth();
void resetPanelRect ();
void processTriState ();
protected:

View File

@ -30,7 +30,7 @@
<avatar_icon
follows="top|left"
height="20"
image_name="smile.png"
default_icon_name="Generic_Person"
layout="topleft"
left="5"
mouse_opaque="true"

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<avatar_icon default_icon_name="Generic_Person_Large">
</avatar_icon>