From f15767bbef4e0a87aa032e265b3a0a8d4db907e1 Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Tue, 10 Nov 2009 12:43:17 +0200 Subject: merge --HG-- branch : product-engine --- indra/newview/llsidetray.cpp | 43 +++++++++++++++++++++++++++++++++++++++---- indra/newview/llsidetray.h | 2 ++ 2 files changed, 41 insertions(+), 4 deletions(-) (limited to 'indra/newview') 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("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("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: -- cgit v1.2.3 From 3a8c80a388df64dd58b4dc77e7219dfdd20f4aac Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Tue, 10 Nov 2009 18:45:51 +0200 Subject: fixed EXT-2275 "[BSI] New incoming IM or Group IM pushes all existing (and new) chiclets off the right end of the chiclet bar." --HG-- branch : product-engine --- indra/newview/llchiclet.cpp | 25 +++++++++++++++++++++++-- indra/newview/llchiclet.h | 11 +++++++++++ 2 files changed, 34 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index fe4859ead0..e5c73dcbef 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("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("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 +1225,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..e7afd7f08e 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -830,6 +830,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 +880,7 @@ protected: S32 mScrollingOffset; S32 mMinWidth; bool mShowControls; + static const S32 s_scroll_ratio; }; template -- cgit v1.2.3 From 2857dd026ce67f26f4da2f07ecffd8d6b754625c Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Tue, 10 Nov 2009 21:55:50 +0200 Subject: Implemented normal task EXT-1937 (Please update landmarks and locations to the latest decided format). --HG-- branch : product-engine --- indra/newview/llagentui.cpp | 6 +++--- indra/newview/llnavigationbar.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview') 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/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(item_params); -- cgit v1.2.3 From 560ac281db6876a6173450a642cbe6b23d725d02 Mon Sep 17 00:00:00 2001 From: Andrew Polunin Date: Wed, 11 Nov 2009 11:46:55 +0200 Subject: fixed minor bug EXT-2147 Group and Avatar Place Holder Icons defined in the specs should be used in place of currect placeholders --HG-- branch : product-engine --- indra/newview/llavatariconctrl.cpp | 10 ++++++---- indra/newview/llavatariconctrl.h | 3 ++- indra/newview/llchiclet.h | 3 ++- indra/newview/skins/default/xui/en/panel_avatar_list_item.xml | 2 +- indra/newview/skins/default/xui/en/widgets/avatar_icon.xml | 4 ++++ 5 files changed, 15 insertions(+), 7 deletions(-) create mode 100644 indra/newview/skins/default/xui/en/widgets/avatar_icon.xml (limited to 'indra/newview') 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 avatar_id; Optional draw_tooltip; + Optional 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.h b/indra/newview/llchiclet.h index e7afd7f08e..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 default_icon; Params() - : default_icon("default_icon", "default_land_picture.j2c") + : default_icon("default_icon", "Generic_Group") { }; }; 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 @@ + + + -- cgit v1.2.3 From eed0b3460b8c417c152bbbf6b03b7f3d49255c53 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Wed, 11 Nov 2009 12:09:46 +0200 Subject: fixed EXT-2341 "Add Friend notification not shown", EXT-2351 "Friendship and Teleport offers no longer pop toast notifications"; suppresed IM-floater on incoming offer and registerd offer handler in chiclet counter updater; --HG-- branch : product-engine --- indra/newview/llchiclet.cpp | 1 + indra/newview/llnotificationofferhandler.cpp | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 5402f88cd3..eda4bfaa78 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -103,6 +103,7 @@ LLNotificationChiclet::LLNotificationChiclet(const Params& p) // connect counter handlers to the signals connectCounterUpdatersToSignal("notify"); connectCounterUpdatersToSignal("groupnotify"); + connectCounterUpdatersToSignal("offer"); } LLNotificationChiclet::~LLNotificationChiclet() 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"], -- cgit v1.2.3