From 913786a62b2b8d8e6d9c483ea805a21e694fd818 Mon Sep 17 00:00:00 2001 From: skolb Date: Fri, 23 Oct 2009 15:29:00 -0700 Subject: DEV-41787 Media Auto Play controls were removed from prefs. Also made auto play override prim settings. --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llviewermedia.cpp | 4 ++-- .../skins/default/xui/en/panel_preferences_privacy.xml | 18 ++++++++++++++---- 3 files changed, 27 insertions(+), 6 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index fd0e05e7e2..eb045349c2 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -375,6 +375,17 @@ Value 0 + AutoPlayMedia + + Comment + Allow media objects to automatically play or navigate? + Persist + 1 + Type + Boolean + Value + 1 + AutoSnapshot Comment diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 5967b68e51..0b6ac0e2e2 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -250,7 +250,7 @@ viewer_media_t LLViewerMedia::updateMediaImpl(LLMediaEntry* media_entry, const s media_impl->mMediaSource->setSize(media_entry->getWidthPixels(), media_entry->getHeightPixels()); } - if((was_loaded || media_entry->getAutoPlay()) && !update_from_self) + if((was_loaded || (media_entry->getAutoPlay() && gSavedSettings.getBOOL("AutoPlayMedia"))) && !update_from_self) { if(!media_entry->getCurrentURL().empty()) { @@ -273,7 +273,7 @@ viewer_media_t LLViewerMedia::updateMediaImpl(LLMediaEntry* media_entry, const s media_impl->setHomeURL(media_entry->getHomeURL()); - if(media_entry->getAutoPlay()) + if(media_entry->getAutoPlay() && gSavedSettings.getBOOL("AutoPlayMedia")) { needs_navigate = true; } diff --git a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml index c4dc8834db..ce7939c00f 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml @@ -77,10 +77,19 @@ name="cookies_enabled" top_pad="10" width="350" /> + Logs: - + Date: Fri, 23 Oct 2009 16:40:10 -0700 Subject: EXT-968 Side tray buttons have "selected" appearance when each tab is selected. Changed mTabs to hold LLSideTrayTab* so we don't have to dynamic_cast<> everywhere Reviewed with Leyla. --- indra/newview/llsidetray.cpp | 61 ++++++++++++---------- indra/newview/llsidetray.h | 2 +- .../skins/default/xui/en/panel_side_tray.xml | 4 ++ 3 files changed, 39 insertions(+), 28 deletions(-) (limited to 'indra') diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index 22c3779050..a11ee05532 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -334,14 +334,19 @@ LLSideTrayTab* LLSideTray::getTab(const std::string& name) } -void LLSideTray::toggleTabButton (LLSideTrayTab* tab) +void LLSideTray::toggleTabButton(LLSideTrayTab* tab) { if(tab == NULL) return; - string name = tab->getName(); - std::map::iterator tIt = mTabButtons.find(name); - if(tIt!=mTabButtons.end()) - tIt->second->setToggleState(!tIt->second->getToggleState()); + std::string name = tab->getName(); + std::map::iterator it = mTabButtons.find(name); + if(it != mTabButtons.end()) + { + LLButton* btn = it->second; + bool new_state = !btn->getToggleState(); + btn->setToggleState(new_state); + btn->setImageOverlay( new_state ? tab->mImageSelected : tab->mImage ); + } } bool LLSideTray::selectTabByIndex(size_t index) @@ -349,9 +354,7 @@ bool LLSideTray::selectTabByIndex(size_t index) if(index>=mTabs.size()) return false; - LLSideTrayTab* sidebar_tab = dynamic_cast(mTabs[index]); - if(sidebar_tab == NULL) - return false; + LLSideTrayTab* sidebar_tab = mTabs[index]; return selectTabByName(sidebar_tab->getName()); } @@ -380,9 +383,7 @@ bool LLSideTray::selectTabByName (const std::string& name) child_vector_const_iter_t child_it; for ( child_it = mTabs.begin(); child_it != mTabs.end(); ++child_it) { - LLSideTrayTab* sidebar_tab = dynamic_cast(*child_it); - if(sidebar_tab == NULL) - continue; + LLSideTrayTab* sidebar_tab = *child_it; sidebar_tab->setVisible(sidebar_tab == mActiveTab); } return true; @@ -439,9 +440,7 @@ void LLSideTray::createButtons () child_vector_const_iter_t child_it = mTabs.begin(); for ( ; child_it != mTabs.end(); ++child_it) { - LLSideTrayTab* sidebar_tab = dynamic_cast(*child_it); - if(sidebar_tab == NULL) - continue; + LLSideTrayTab* sidebar_tab = *child_it; std::string name = sidebar_tab->getName(); @@ -527,9 +526,7 @@ void LLSideTray::arrange () int offset = (sidetray_params.default_button_height+sidetray_params.default_button_margin)*2; for ( child_it = mTabs.begin(); child_it != mTabs.end(); ++child_it) { - LLSideTrayTab* sidebar_tab = dynamic_cast(*child_it); - if(sidebar_tab == NULL) - continue; + LLSideTrayTab* sidebar_tab = *child_it; ctrl_rect.setLeftTopAndSize(0,getRect().getHeight()-offset ,sidetray_params.default_button_width @@ -552,10 +549,7 @@ void LLSideTray::arrange () //arrange tabs for ( child_it = mTabs.begin(); child_it != mTabs.end(); ++child_it) { - LLSideTrayTab* sidebar_tab = dynamic_cast(*child_it); - if(sidebar_tab == NULL) - continue; - + LLSideTrayTab* sidebar_tab = *child_it; sidebar_tab->setRect(ctrl_rect); sidebar_tab->arrange(mMaxBarWidth,getRect().getHeight()); } @@ -564,6 +558,23 @@ void LLSideTray::arrange () void LLSideTray::collapseSideBar() { mCollapsed = true; + // Reset all overlay images, because there is no "selected" tab when the + // whole side tray is hidden. + child_vector_const_iter_t it = mTabs.begin(); + for ( ; it != mTabs.end(); ++it ) + { + LLSideTrayTab* tab = *it; + std::string name = tab->getName(); + std::map::const_iterator btn_it = + mTabButtons.find(name); + if (btn_it != mTabButtons.end()) + { + LLButton* btn = btn_it->second; + btn->setImageOverlay( tab->mImage ); + } + } + + // Home tab doesn't put its button in mTabButtons LLSideTrayTab* home_tab = getTab("sidebar_home"); if (home_tab) { @@ -643,9 +654,7 @@ void LLSideTray::reshape (S32 width, S32 height, BOOL called_from_parent) int offset = (sidetray_params.default_button_height+sidetray_params.default_button_margin)*2; for ( child_it = mTabs.begin(); child_it != mTabs.end(); ++child_it) { - LLSideTrayTab* sidebar_tab = dynamic_cast(*child_it); - if(sidebar_tab == NULL) - continue; + LLSideTrayTab* sidebar_tab = *child_it; ctrl_rect.setLeftTopAndSize(0,getRect().getHeight()-offset ,sidetray_params.default_button_width @@ -667,9 +676,7 @@ void LLSideTray::reshape (S32 width, S32 height, BOOL called_from_parent) for ( child_it = mTabs.begin(); child_it != mTabs.end(); ++child_it) { - LLSideTrayTab* sidebar_tab = dynamic_cast(*child_it); - if(sidebar_tab == NULL) - continue; + LLSideTrayTab* sidebar_tab = *child_it; sidebar_tab->reshape(mMaxBarWidth,getRect().getHeight()); ctrl_rect.setLeftTopAndSize(sidetray_params.default_button_width,getRect().getHeight(),mMaxBarWidth,getRect().getHeight()); sidebar_tab->setRect(ctrl_rect); diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h index 845eb86bc1..b49251ec79 100644 --- a/indra/newview/llsidetray.h +++ b/indra/newview/llsidetray.h @@ -69,7 +69,7 @@ public: static bool instanceCreated (); protected: LLSideTray(Params& params); - typedef std::vector child_vector_t; + typedef std::vector child_vector_t; typedef child_vector_t::iterator child_vector_iter_t; typedef child_vector_t::const_iterator child_vector_const_iter_t; typedef child_vector_t::reverse_iterator child_vector_reverse_iter_t; diff --git a/indra/newview/skins/default/xui/en/panel_side_tray.xml b/indra/newview/skins/default/xui/en/panel_side_tray.xml index 6abcbc40d2..3f64c9c633 100644 --- a/indra/newview/skins/default/xui/en/panel_side_tray.xml +++ b/indra/newview/skins/default/xui/en/panel_side_tray.xml @@ -35,6 +35,7 @@ tab_title="People" description="Find your friends, contacts and people nearby." image="TabIcon_People_Off" + image_selected="TabIcon_People_Selected" mouse_opaque="false" background_visible="true" > @@ -77,6 +78,7 @@ label="Places" description="Find places to go and places you've visited before." image="TabIcon_Places_Off" + image_selected="TabIcon_Places_Selected" mouse_opaque="false" background_visible="true" > @@ -95,6 +97,7 @@ tab_title="Me" description="Edit your public profile and Picks." image="TabIcon_Me_Off" + image_selected="TabIcon_Me_Selected" mouse_opaque="false" background_visible="true" > @@ -112,6 +115,7 @@ tab_title="Appearance" description="Change your appearance and current look." image="TabIcon_Appearance_Off" + image_selected="TabIcon_Appearance_Selected" mouse_opaque="false" background_visible="true" > -- cgit v1.2.3 From d9b6c6cbd75b9eb937aa1579a9eb2e0175edd3a0 Mon Sep 17 00:00:00 2001 From: Erica Firment Date: Fri, 23 Oct 2009 16:48:02 -0700 Subject: EXT-1702, EXT-1692, Viewer 2.0 Fit & Finish Pass: People Panel - Profile --- .../newview/skins/default/xui/en/panel_profile.xml | 50 +++++++++++----------- .../skins/default/xui/en/panel_profile_view.xml | 9 ++-- 2 files changed, 31 insertions(+), 28 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/panel_profile.xml b/indra/newview/skins/default/xui/en/panel_profile.xml index a32be90a33..73a759a8ba 100644 --- a/indra/newview/skins/default/xui/en/panel_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_profile.xml @@ -53,7 +53,7 @@ left="10" name="second_life_image_panel" top="0" - width="290"> + width="280"> + width="165" /> @@ -95,7 +96,7 @@ top_pad="10" left="10" name="first_life_image_panel" - width="290"> + width="280"> + width="165" /> @@ -151,7 +153,7 @@ name="homepage_edit" top_pad="0" value="http://librarianavengers.org" - width="290" + width="280" word_wrap="false" use_elipsis="true" /> @@ -205,7 +207,7 @@ name="acc_status_text" top_pad="0" value="Resident. No payment info on file." - width="295" + width="280" word_wrap="true" /> - + name="sl_groups" + top_pad="0" + width="280" + expanded_bg_visible="true" + expanded_bg_color="DkGray"> Lorem ipsum dolor sit amet, consectetur adlkjpiscing elit moose moose. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet. adipiscing elit. Aenean rigviverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet sorbet ipsum. adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum. - + + width="303">