diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 3ed19931a..05648d111 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -64,6 +64,8 @@ include_directories( ) set(viewer_SOURCE_FILES + ascentprefssys.cpp + ascentprefsvan.cpp ascentuploadbrowser.cpp dhparam.cpp dsaparam.cpp @@ -335,8 +337,6 @@ set(viewer_SOURCE_FILES llpolymesh.cpp llpolymorph.cpp llprefschat.cpp - ascentprefssys.cpp - ascentprefsvan.cpp llprefsim.cpp llprefsvoice.cpp llpreviewanim.cpp @@ -490,6 +490,7 @@ set(viewer_SOURCE_FILES noise.cpp pipeline.cpp scriptcounter.cpp + wlfPanel_AdvSettings.cpp ) # This gets renamed in the packaging step @@ -513,6 +514,8 @@ endif (LINUX) set(viewer_HEADER_FILES CMakeLists.txt ViewerInstall.cmake + ascentprefssys.h + ascentprefsvan.h ascentuploadbrowser.h emerald.h emeraldboobutils.h @@ -784,8 +787,6 @@ set(viewer_HEADER_FILES llpolymesh.h llpolymorph.h llprefschat.h - ascentprefssys.h - ascentprefsvan.h llprefsim.h llprefsvoice.h llpreview.h @@ -947,6 +948,7 @@ set(viewer_HEADER_FILES scriptcounter.h VertexCache.h VorbisFramework.h + wlfPanel_AdvSettings.h ) source_group("CMake Rules" FILES ViewerInstall.cmake) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 1128bf71d..2ef4170c4 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -12,6 +12,17 @@ Boolean Value 1 + + AscentDisableMinZoomDist + + Comment + Allows much closer camera zooming. + Persist + 1 + Type + Boolean + Value + 1 AscentFlyAlwaysEnabled @@ -431,6 +442,17 @@ Value 0.1 + wlfAdvSettingsPopup + + Comment + Show Windlight popup + Persist + 1 + Type + Boolean + Value + 0 + WoLfVerticalIMTabs Comment @@ -4392,7 +4414,7 @@ Type Boolean Value - 1 + 0 EnergyFromTop diff --git a/indra/newview/ascentprefssys.cpp b/indra/newview/ascentprefssys.cpp index 024a19d0f..9dec6a55c 100644 --- a/indra/newview/ascentprefssys.cpp +++ b/indra/newview/ascentprefssys.cpp @@ -98,18 +98,16 @@ LLPrefsAscentSysImpl::LLPrefsAscentSysImpl() { LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_ascent_system.xml"); childSetCommitCallback("speed_rez_check", onCommitCheckBox, this); - + childSetCommitCallback("show_look_at_check", onCommitCheckBox, this); refresh(); } //static void LLPrefsAscentSysImpl::onCommitCheckBox(LLUICtrl* ctrl, void* user_data) { - LLPrefsAscentSysImpl* self = (LLPrefsAscentSysImpl*)user_data; - - self->childEnable("fetch_inventory_on_login_check"); + LLPrefsAscentSysImpl* self = (LLPrefsAscentSysImpl*)user_data; - llinfos << "Change to " << ctrl->getControlName() << llendl; + llinfos << "Change to " << ctrl->getControlName() << " aka " << ctrl->getName() << llendl; if (ctrl->getControlName() == "SpeedRez") { @@ -124,7 +122,7 @@ void LLPrefsAscentSysImpl::onCommitCheckBox(LLUICtrl* ctrl, void* user_data) self->childDisable("speed_rez_seconds"); } } - else if (ctrl->getControlName() == "ShowLookAt") + else if (ctrl->getName() == "show_look_at_check") { LLHUDEffectLookAt::sDebugLookAt = self->childGetValue("show_look_at_check").asBoolean(); } diff --git a/indra/newview/llfloaterchatterbox.cpp b/indra/newview/llfloaterchatterbox.cpp index b8c5ec440..9e41340fe 100644 --- a/indra/newview/llfloaterchatterbox.cpp +++ b/indra/newview/llfloaterchatterbox.cpp @@ -94,18 +94,16 @@ LLFloaterChatterBox::LLFloaterChatterBox(const LLSD& seed) : { mAutoResize = FALSE; - std::string chatterbox_layout; - if(gSavedSettings.getBOOL("WoLfVerticalIMTabs")) + + if(!gSavedSettings.getBOOL("WoLfVerticalIMTabs")) { - chatterbox_layout = "floater_chatterbox_wolf.xml"; + LLUICtrlFactory::getInstance()->buildFloater(this, "floater_chatterbox.xml", NULL, FALSE); } else { - chatterbox_layout = "floater_chatterbox.xml"; + LLUICtrlFactory::getInstance()->buildFloater(this, "floater_chatterbox_wolf.xml", NULL, FALSE); } - LLUICtrlFactory::getInstance()->buildFloater(this, chatterbox_layout, NULL, FALSE); - /*childHide("chatterbox_tabs_horiz"); - childShow("chatterbox_tabs_vert");*/ + if (gSavedSettings.getBOOL("ContactsTornOff")) { LLFloaterMyFriends* floater_contacts = LLFloaterMyFriends::getInstance(0); diff --git a/indra/newview/llfloaterchatterbox.h b/indra/newview/llfloaterchatterbox.h index 3adbd1437..d3b45576a 100644 --- a/indra/newview/llfloaterchatterbox.h +++ b/indra/newview/llfloaterchatterbox.h @@ -114,6 +114,7 @@ private: protected: LLFloater* mActiveVoiceFloater; + }; @@ -158,8 +159,6 @@ public: } } } - -protected: LLTabContainer* mTabs; }; diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index a90ea3926..08e274bed 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -521,7 +521,8 @@ void LLIMMgr::toggle(void*) LLIMMgr::LLIMMgr() : mFriendObserver(NULL), - mIMReceived(FALSE) + mIMReceived(FALSE), + mIMUnreadCount(0) { mFriendObserver = new LLIMViewFriendObserver(this); LLAvatarTracker::instance().addObserver(mFriendObserver); @@ -665,6 +666,7 @@ void LLIMMgr::addMessage( //notify of a new IM notifyNewIM(); + mIMUnreadCount++; } } @@ -708,6 +710,7 @@ void LLIMMgr::notifyNewIM() void LLIMMgr::clearNewIMNotification() { mIMReceived = FALSE; + mIMUnreadCount = 0; } BOOL LLIMMgr::getIMReceived() const @@ -715,6 +718,11 @@ BOOL LLIMMgr::getIMReceived() const return mIMReceived; } +int LLIMMgr::getIMUnreadCount() +{ + return mIMUnreadCount; +} + // This method returns TRUE if the local viewer has a session // currently open keyed to the uuid. BOOL LLIMMgr::isIMSessionOpen(const LLUUID& uuid) diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index a4e419694..115076bf3 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -133,6 +133,7 @@ public: // IM received that you haven't seen yet BOOL getIMReceived() const; + int getIMUnreadCount(); void setFloaterOpen(BOOL open); /*Flawfinder: ignore*/ BOOL getFloaterOpen(); @@ -206,6 +207,7 @@ private: // An IM has been received that you haven't seen yet. BOOL mIMReceived; + int mIMUnreadCount; LLSD mPendingInvitations; LLSD mPendingAgentListUpdates; diff --git a/indra/newview/lloverlaybar.cpp b/indra/newview/lloverlaybar.cpp index f7dbc569f..a1c8e7044 100644 --- a/indra/newview/lloverlaybar.cpp +++ b/indra/newview/lloverlaybar.cpp @@ -38,6 +38,7 @@ #include "lloverlaybar.h" #include "llaudioengine.h" +#include "importtracker.h" #include "llrender.h" #include "llagent.h" #include "llbutton.h" @@ -58,12 +59,14 @@ #include "llviewerparcelmedia.h" #include "llviewerparcelmgr.h" #include "lluictrlfactory.h" +#include "llviewercontrol.h" #include "llviewerwindow.h" #include "llvoiceclient.h" #include "llvoavatar.h" #include "llvoiceremotectrl.h" #include "llmediactrl.h" #include "llselectmgr.h" +#include "wlfPanel_AdvSettings.h" //Lower right Windlight and Rendering options // // Globals @@ -72,6 +75,10 @@ LLOverlayBar *gOverlayBar = NULL; extern S32 MENU_BAR_HEIGHT; +extern ImportTracker gImportTracker; + +BOOL LLOverlayBar::sAdvSettingsPopup; +BOOL LLOverlayBar::sChatVisible; // // Functions @@ -93,6 +100,13 @@ void* LLOverlayBar::createVoiceRemote(void* userdata) return self->mVoiceRemote; } +void* LLOverlayBar::createAdvSettings(void* userdata) +{ + LLOverlayBar *self = (LLOverlayBar*)userdata; + self->mAdvSettings = new wlfPanel_AdvSettings(); + return self->mAdvSettings; +} + void* LLOverlayBar::createChatBar(void* userdata) { gChatBar = new LLChatBar(); @@ -103,7 +117,9 @@ LLOverlayBar::LLOverlayBar() : LLPanel(), mMediaRemote(NULL), mVoiceRemote(NULL), - mMusicState(STOPPED) + mAdvSettings(NULL), + mMusicState(STOPPED), + mOriginalIMLabel("") { setMouseOpaque(FALSE); setIsChrome(TRUE); @@ -113,27 +129,57 @@ LLOverlayBar::LLOverlayBar() LLCallbackMap::map_t factory_map; factory_map["media_remote"] = LLCallbackMap(LLOverlayBar::createMediaRemote, this); factory_map["voice_remote"] = LLCallbackMap(LLOverlayBar::createVoiceRemote, this); + factory_map["Adv_Settings"] = LLCallbackMap(LLOverlayBar::createAdvSettings, this); factory_map["chat_bar"] = LLCallbackMap(LLOverlayBar::createChatBar, this); LLUICtrlFactory::getInstance()->buildPanel(this, "panel_overlaybar.xml", &factory_map); } +bool updateAdvSettingsPopup(const LLSD &data) +{ + LLOverlayBar::sAdvSettingsPopup = gSavedSettings.getBOOL("wlfAdvSettingsPopup"); + gOverlayBar->childSetVisible("AdvSettings_container", !LLOverlayBar::sAdvSettingsPopup); + gOverlayBar->childSetVisible("AdvSettings_container_exp", LLOverlayBar::sAdvSettingsPopup); + return true; +} + +bool updateChatVisible(const LLSD &data) +{ + LLOverlayBar::sChatVisible = data.asBoolean(); + return true; +} + + BOOL LLOverlayBar::postBuild() { childSetAction("IM Received",onClickIMReceived,this); childSetAction("Set Not Busy",onClickSetNotBusy,this); childSetAction("Mouselook",onClickMouselook,this); childSetAction("Stand Up",onClickStandUp,this); + //childSetAction("Cancel TP",onClickCancelTP,this); childSetAction("Flycam",onClickFlycam,this); childSetVisible("chat_bar", gSavedSettings.getBOOL("ChatVisible")); + //mCancelBtn = getChild("Cancel TP"); setFocusRoot(TRUE); mBuilt = true; + mOriginalIMLabel = getChild("IM Received")->getLabelSelected(); + layoutButtons(); + + sAdvSettingsPopup = gSavedSettings.getBOOL("wlfAdvSettingsPopup"); + sChatVisible = gSavedSettings.getBOOL("ChatVisible"); + + gSavedSettings.getControl("wlfAdvSettingsPopup")->getSignal()->connect(&updateAdvSettingsPopup); + gSavedSettings.getControl("ChatVisible")->getSignal()->connect(&updateChatVisible); + childSetVisible("AdvSettings_container", !sAdvSettingsPopup); + childSetVisible("AdvSettings_container_exp", sAdvSettingsPopup); + return TRUE; } + LLOverlayBar::~LLOverlayBar() { // LLView destructor cleans up children @@ -193,9 +239,25 @@ void LLOverlayBar::refresh() BOOL buttons_changed = FALSE; BOOL im_received = gIMMgr->getIMReceived(); + int unread_count = gIMMgr->getIMUnreadCount(); LLButton* button = getChild("IM Received"); - if (button && button->getVisible() != im_received) + + if ((button && button->getVisible() != im_received) || + (button && button->getVisible())) { + if (unread_count > 0) + { + if (unread_count > 1) + { + std::stringstream ss; + ss << unread_count << " " << getString("unread_count_string_plural"); + button->setLabel(ss.str()); + } + else + { + button->setLabel("1 " + mOriginalIMLabel); + } + } button->setVisible(im_received); sendChildToFront(button); moveChildToBackOfTabGroup(button); @@ -253,21 +315,36 @@ void LLOverlayBar::refresh() moveChildToBackOfTabGroup(mMediaRemote); moveChildToBackOfTabGroup(mVoiceRemote); + moveChildToBackOfTabGroup(mAdvSettings); // turn off the whole bar in mouselook - if (gAgent.cameraMouselook()) + static BOOL last_mouselook = FALSE; + + BOOL in_mouselook = gAgent.cameraMouselook(); + + if(last_mouselook != in_mouselook) { - childSetVisible("media_remote_container", FALSE); - childSetVisible("voice_remote_container", FALSE); - childSetVisible("state_buttons", FALSE); + last_mouselook = in_mouselook; + if (in_mouselook) + { + childSetVisible("media_remote_container", FALSE); + childSetVisible("voice_remote_container", FALSE); + childSetVisible("AdvSettings_container", FALSE); + childSetVisible("AdvSettings_container_exp", FALSE); + childSetVisible("state_buttons", FALSE); + } + else + { + // update "remotes" + childSetVisible("media_remote_container", TRUE); + //childSetVisible("voice_remote_container", LLVoiceClient::voiceEnabled()); + childSetVisible("AdvSettings_container", !sAdvSettingsPopup);//!gSavedSettings.getBOOL("wlfAdvSettingsPopup")); + childSetVisible("AdvSettings_container_exp", sAdvSettingsPopup);//gSavedSettings.getBOOL("wlfAdvSettingsPopup")); + childSetVisible("state_buttons", TRUE); + } } - else - { - // update "remotes" - childSetVisible("media_remote_container", TRUE); + if(!in_mouselook) childSetVisible("voice_remote_container", LLVoiceClient::voiceEnabled()); - childSetVisible("state_buttons", TRUE); - } // always let user toggle into and out of chatbar childSetVisible("chat_bar", gSavedSettings.getBOOL("ChatVisible")); diff --git a/indra/newview/lloverlaybar.h b/indra/newview/lloverlaybar.h index 852d033a1..2d96158e7 100644 --- a/indra/newview/lloverlaybar.h +++ b/indra/newview/lloverlaybar.h @@ -50,6 +50,7 @@ class LLFrameTimer; class LLStatGraph; class LLSlider; class LLVoiceRemoteCtrl; +class wlfPanel_AdvSettings; class LLOverlayBar : public LLPanel @@ -71,6 +72,8 @@ public: static void onClickSetNotBusy(void* data); static void onClickMouselook(void* data); static void onClickStandUp(void* data); + static void onClickCancelTP(void* data); + static void onClickCancelImport(void* data); static void onClickResetView(void* data); static void onClickFlycam(void* data); @@ -83,9 +86,15 @@ public: static void toggleAudioVolumeFloater(void*); + void setCancelTPButtonVisible(BOOL b, const std::string& label); + + static BOOL sAdvSettingsPopup; + static BOOL sChatVisible; + protected: static void* createMediaRemote(void* userdata); static void* createVoiceRemote(void* userdata); + static void* createAdvSettings(void* userdata); static void* createChatBar(void* userdata); void enableMediaButtons(); @@ -93,9 +102,20 @@ protected: protected: LLMediaRemoteCtrl* mMediaRemote; LLVoiceRemoteCtrl* mVoiceRemote; + LLButton* mCancelBtn; + wlfPanel_AdvSettings* mAdvSettings; bool mBuilt; // dialog constructed yet? enum { STOPPED=0, PLAYING=1, PAUSED=2 }; S32 mMusicState; + std::string mOriginalIMLabel; + + +private: + + + /*static bool updateAdvSettingsPopup(const LLSD &data); + static void updateChatVisible(const LLSD &data);*/ + }; extern LLOverlayBar* gOverlayBar; diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index ad98288b3..4fde5180d 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -197,6 +197,7 @@ #include "llpanellogin.h" //#include "llfloateravatars.h" //#include "llactivation.h" +#include "wlfPanel_AdvSettings.h" //Lower right Windlight and Rendering options #include "llao.h" #include "llfloaterblacklist.h" #include "scriptcounter.h" diff --git a/indra/newview/skins/default/xui/en-us/floater_chatterbox.xml b/indra/newview/skins/default/xui/en-us/floater_chatterbox.xml index 69f82864a..3dfa2110f 100644 --- a/indra/newview/skins/default/xui/en-us/floater_chatterbox.xml +++ b/indra/newview/skins/default/xui/en-us/floater_chatterbox.xml @@ -1,12 +1,14 @@ - + height="390" name="floater_chatterbox" + rect_control="ChatterboxRect" title="Communicate" width="392"> + + name="chatterbox_tabs_horiz" tab_position="bottom" tab_width="80" width="395" /> + diff --git a/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml b/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml index b706c74fa..bca168d43 100644 --- a/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml +++ b/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml @@ -185,6 +185,7 @@ follows="left|top" font="SansSerifSmall" height="16" initial_value="false" label="Enable speed-rezzing via draw distance stepping" left="10" mouse_opaque="true" name="speed_rez_check" radio_style="false" + tool_tip="When active, this will progressively increase your draw distance, which allows closer objects/people to rez first." width="400" /> + + +