diff options
author | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2009-11-11 13:06:33 +0200 |
---|---|---|
committer | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2009-11-11 13:06:33 +0200 |
commit | 511d8a0a6072e8f1ac87eb7beb6935940794a882 (patch) | |
tree | d3dd3a9a76d3a177b9ca1189d31aa4b7a71d8041 /indra | |
parent | e29fbb572f2e10db1f2f3c448bc59aafec4a62c8 (diff) | |
parent | f4f3903b60447f694e9a51c85c58233f66cff2ae (diff) |
Merge
--HG--
branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llagentui.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llavatariconctrl.cpp | 10 | ||||
-rw-r--r-- | indra/newview/llavatariconctrl.h | 3 | ||||
-rw-r--r-- | indra/newview/llchiclet.cpp | 26 | ||||
-rw-r--r-- | indra/newview/llchiclet.h | 14 | ||||
-rw-r--r-- | indra/newview/llnavigationbar.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llnotificationofferhandler.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llsidetray.cpp | 43 | ||||
-rw-r--r-- | indra/newview/llsidetray.h | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_avatar_list_item.xml | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/widgets/avatar_icon.xml | 4 |
11 files changed, 95 insertions, 22 deletions
diff --git a/indra/newview/llagentui.cpp b/indra/newview/llagentui.cpp index 2911a35581..568ac4164a 100644 --- a/indra/newview/llagentui.cpp +++ b/indra/newview/llagentui.cpp @@ -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()); diff --git a/indra/newview/llavatariconctrl.cpp b/indra/newview/llavatariconctrl.cpp index 46902006a6..327d80ba34 100644 --- a/indra/newview/llavatariconctrl.cpp +++ b/indra/newview/llavatariconctrl.cpp @@ -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; diff --git a/indra/newview/llavatariconctrl.h b/indra/newview/llavatariconctrl.h index 5eb830df4b..38616b7852 100644 --- a/indra/newview/llavatariconctrl.h +++ b/indra/newview/llavatariconctrl.h @@ -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(); }; diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 97447a85c6..eda4bfaa78 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -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) { diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index 97af82fe2f..eab4a282f5 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -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") { }; }; @@ -831,6 +832,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() */ BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); @@ -870,6 +881,7 @@ protected: S32 mScrollingOffset; S32 mMinWidth; bool mShowControls; + static const S32 s_scroll_ratio; }; template<class T> diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index 63794be085..d38cd28ce2 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -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); diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp index 75ef5208e7..6305ca12aa 100644 --- a/indra/newview/llnotificationofferhandler.cpp +++ b/indra/newview/llnotificationofferhandler.cpp @@ -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"], diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index a11ee05532..b25dea92cc 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -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); diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h index b49251ec79..246979ac54 100644 --- a/indra/newview/llsidetray.h +++ b/indra/newview/llsidetray.h @@ -135,6 +135,8 @@ public: S32 getTrayWidth(); void resetPanelRect (); + + void processTriState (); protected: diff --git a/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml b/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml index 0c42686531..2eaa3a94ee 100644 --- a/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml @@ -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" diff --git a/indra/newview/skins/default/xui/en/widgets/avatar_icon.xml b/indra/newview/skins/default/xui/en/widgets/avatar_icon.xml new file mode 100644 index 0000000000..a35e2c3663 --- /dev/null +++ b/indra/newview/skins/default/xui/en/widgets/avatar_icon.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> + +<avatar_icon default_icon_name="Generic_Person_Large"> +</avatar_icon> |