From e41c907b4facef715a34b9b97ab2bce67bf44b4e Mon Sep 17 00:00:00 2001 From: elektrahesse Date: Thu, 7 Oct 2010 02:05:57 +0200 Subject: Fixed TOS loading and renamed corretly LLIamHere classes in TOS and Voice TOS respectively to LLIamHereTOS and LLIamHereVoice to avoid collisions. --- linden/indra/newview/floatervoicelicense.cpp | 12 ++++++------ linden/indra/newview/llfloatertos.cpp | 20 +++++++++++--------- 2 files changed, 17 insertions(+), 15 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/floatervoicelicense.cpp b/linden/indra/newview/floatervoicelicense.cpp index 4004290..840a9e6 100644 --- a/linden/indra/newview/floatervoicelicense.cpp +++ b/linden/indra/newview/floatervoicelicense.cpp @@ -63,10 +63,10 @@ FloaterVoiceLicense::FloaterVoiceLicense(const LLSD& key) // helper class that trys to download a URL from a web site and calls a method // on parent class indicating if the web server is working or not -class LLIamHere : public LLHTTPClient::Responder +class LLIamHereVoice : public LLHTTPClient::Responder { private: - LLIamHere( FloaterVoiceLicense* parent ) : + LLIamHereVoice( FloaterVoiceLicense* parent ) : mParent( parent ) {} @@ -74,9 +74,9 @@ class LLIamHere : public LLHTTPClient::Responder public: - static boost::intrusive_ptr< LLIamHere > build( FloaterVoiceLicense* parent ) + static boost::intrusive_ptr< LLIamHereVoice > build( FloaterVoiceLicense* parent ) { - return boost::intrusive_ptr< LLIamHere >( new LLIamHere( parent ) ); + return boost::intrusive_ptr< LLIamHereVoice >( new LLIamHereVoice( parent ) ); }; virtual void setParent( FloaterVoiceLicense* parentIn ) @@ -105,7 +105,7 @@ class LLIamHere : public LLHTTPClient::Responder // this is global and not a class member to keep crud out of the header file namespace { - boost::intrusive_ptr< LLIamHere > gResponsePtr = 0; + boost::intrusive_ptr< LLIamHereVoice > gResponsePtr = 0; }; BOOL FloaterVoiceLicense::postBuild() @@ -128,7 +128,7 @@ BOOL FloaterVoiceLicense::postBuild() // start to observe it so we see navigate complete events web_browser->addObserver( this ); - gResponsePtr = LLIamHere::build( this ); + gResponsePtr = LLIamHereVoice::build( this ); LLHTTPClient::get( getString( "real_url" ), gResponsePtr ); } diff --git a/linden/indra/newview/llfloatertos.cpp b/linden/indra/newview/llfloatertos.cpp index 6a392e0..52d7b1f 100644 --- a/linden/indra/newview/llfloatertos.cpp +++ b/linden/indra/newview/llfloatertos.cpp @@ -89,10 +89,10 @@ LLFloaterTOS::LLFloaterTOS(ETOSType type, const std::string & message) // helper class that trys to download a URL from a web site and calls a method // on parent class indicating if the web server is working or not -class LLIamHere : public LLHTTPClient::Responder +class LLIamHereTOS : public LLHTTPClient::Responder { private: - LLIamHere( LLFloaterTOS* parent ) : + LLIamHereTOS( LLFloaterTOS* parent ) : mParent( parent ) {} @@ -100,9 +100,9 @@ class LLIamHere : public LLHTTPClient::Responder public: - static boost::intrusive_ptr< LLIamHere > build( LLFloaterTOS* parent ) + static boost::intrusive_ptr< LLIamHereTOS > build( LLFloaterTOS* parent ) { - return boost::intrusive_ptr< LLIamHere >( new LLIamHere( parent ) ); + return boost::intrusive_ptr< LLIamHereTOS >( new LLIamHereTOS( parent ) ); }; virtual void setParent( LLFloaterTOS* parentIn ) @@ -131,7 +131,7 @@ class LLIamHere : public LLHTTPClient::Responder // this is global and not a class member to keep crud out of the header file namespace { - boost::intrusive_ptr< LLIamHere > gResponsePtr = 0; + boost::intrusive_ptr< LLIamHereTOS > gResponsePtr = 0; }; BOOL LLFloaterTOS::postBuild() @@ -142,13 +142,15 @@ BOOL LLFloaterTOS::postBuild() if ( mType != TOS_TOS ) { + llinfos << "tos_type != TOS_TOS" << llendl; // this displays the critical message LLTextEditor *editor = getChild("tos_text"); editor->setHandleEditKeysDirectly( TRUE ); editor->setEnabled( FALSE ); editor->setWordWrap(TRUE); editor->setFocus(TRUE); - editor->setValue(LLSD(mMessage)); + // editor->setValue(LLSD(mMessage)); + editor->setValue(mMessage); return TRUE; } @@ -159,7 +161,7 @@ BOOL LLFloaterTOS::postBuild() // hide the SL text widget if we're displaying TOS with using a browser widget. LLTextEditor *editor = getChild("tos_text"); - editor->setVisible( FALSE ); + editor->setVisible(FALSE); LLWebBrowserCtrl* web_browser = getChild("tos_html"); if ( web_browser ) @@ -167,8 +169,8 @@ BOOL LLFloaterTOS::postBuild() // start to observe it so we see navigate complete events web_browser->addObserver( this ); - gResponsePtr = LLIamHere::build( this ); - LLHTTPClient::get( getString( "real_url" ), gResponsePtr ); + gResponsePtr = LLIamHereTOS::build( this ); + LLHTTPClient::head( getString( "real_url" ), gResponsePtr ); } return TRUE; -- cgit v1.1 From f944d8f9d855e0c5f3f04840060cd1e4c4b3cf69 Mon Sep 17 00:00:00 2001 From: elektrahesse Date: Fri, 8 Oct 2010 14:14:27 +0200 Subject: Implemented friends tags highlighting, including preferences->general checkbox to enable/disable the feature. The font on the tags is rendered in bold when the option is active. --- linden/indra/newview/app_settings/settings.xml | 11 +++++++ linden/indra/newview/llpanelgeneral.cpp | 2 ++ linden/indra/newview/llvoavatar.cpp | 17 ++++++---- .../xui/en-us/panel_preferences_general.xml | 38 ++++++++++++---------- 4 files changed, 45 insertions(+), 23 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index b38bf9a..d33285d 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml @@ -10926,6 +10926,17 @@ Value 1 + HighlightFriends + + Comment + Display avatar name text in bold if is a friend + Persist + 1 + Type + Boolean + Value + 1 + SnapEnabled Comment diff --git a/linden/indra/newview/llpanelgeneral.cpp b/linden/indra/newview/llpanelgeneral.cpp index a2cba4c..fc6073a 100644 --- a/linden/indra/newview/llpanelgeneral.cpp +++ b/linden/indra/newview/llpanelgeneral.cpp @@ -91,6 +91,7 @@ BOOL LLPanelGeneral::postBuild() childSetValue("show_all_title_checkbox", gSavedSettings.getBOOL("RenderHideGroupTitleAll")); childSetValue("show_my_name_checkbox", gSavedSettings.getBOOL("RenderNameHideSelf")); childSetValue("small_avatar_names_checkbox", gSavedSettings.getBOOL("SmallAvatarNames")); + childSetValue("highlight_friends_checkbox", gSavedSettings.getBOOL("HighlightFriends")); childSetValue("show_my_title_checkbox", gSavedSettings.getBOOL("RenderHideGroupTitle")); childSetValue("afk_timeout_spinner", gSavedSettings.getF32("AFKTimeout")); childSetValue("afk_timeout_checkbox", gSavedSettings.getBOOL("AllowIdleAFK")); @@ -163,6 +164,7 @@ void LLPanelGeneral::apply() gSavedSettings.setBOOL("RenderHideGroupTitleAll", childGetValue("show_all_title_checkbox")); gSavedSettings.setBOOL("RenderNameHideSelf", childGetValue("show_my_name_checkbox")); gSavedSettings.setBOOL("SmallAvatarNames", childGetValue("small_avatar_names_checkbox")); + gSavedSettings.setBOOL("HighlightFriends", childGetValue("highlight_friends_checkbox")); gSavedSettings.setBOOL("RenderHideGroupTitle", childGetValue("show_my_title_checkbox")); gSavedSettings.setF32("AFKTimeout", childGetValue("afk_timeout_spinner").asReal()); gSavedSettings.setBOOL("AllowIdleAFK", childGetValue("afk_timeout_checkbox")); diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp index 6e16ea3..422b22f 100644 --- a/linden/indra/newview/llvoavatar.cpp +++ b/linden/indra/newview/llvoavatar.cpp @@ -3801,15 +3801,20 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) } else { - static BOOL* sSmallAvatarNames = rebind_llcontrol("SmallAvatarNames", &gSavedSettings, true); - if (*sSmallAvatarNames) + S32 style = LLFontGL::NORMAL; + + if (!mIsSelf && gSavedSettings.getBOOL("HighlightFriends")) { - mNameText->setFont(LLFontGL::getFontSansSerif()); + if (is_agent_friend(this->getID())) // Ele: bold for friends + style |= LLFontGL::BOLD; } + + static BOOL* sSmallAvatarNames = rebind_llcontrol("SmallAvatarNames", &gSavedSettings, true); + if (*sSmallAvatarNames) + mNameText->setFont(LLFontGL::getFont(LLFontDescriptor("SansSerif","Medium",style))); else - { - mNameText->setFont(LLFontGL::getFontSansSerifBig()); - } + mNameText->setFont(LLFontGL::getFont(LLFontDescriptor("SansSerif","Large",style))); + mNameText->setTextAlignment(LLHUDText::ALIGN_TEXT_CENTER); mNameText->setFadeDistance(CHAT_NORMAL_RADIUS, 5.f); mNameText->setVisibleOffScreen(FALSE); diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_general.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_general.xml index 7b4b809..badd2b4 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_general.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_general.xml @@ -44,6 +44,10 @@ font="SansSerifSmall" height="16" initial_value="false" label="Hide my name on my screen" left="151" name="show_my_name_checkbox" width="200" /> + @@ -57,34 +61,34 @@ font="SansSerifSmall" height="16" initial_value="false" label="Hide my group title" left="151" name="show_my_title_checkbox" radio_style="false" width="256" /> - UI Size: - -