diff options
author | Christian Goetze <cg@lindenlab.com> | 2007-10-17 22:09:27 +0000 |
---|---|---|
committer | Christian Goetze <cg@lindenlab.com> | 2007-10-17 22:09:27 +0000 |
commit | aa8b0cbe690eef9ed4fb7f6f9e8cc75a0a073d76 (patch) | |
tree | 38f24f3ca670cdf3bb232b7bd9b134d606037614 | |
parent | 788c18c00db8dabdbcdc0ab1af2cf35c24eec8e9 (diff) |
QAR-25 svn merge -r71797:71803 svn+ssh://svn/svn/linden/branches/logitech_lcd_4
-rw-r--r-- | indra/llcommon/llpreprocessor.h | 3 | ||||
-rw-r--r-- | indra/newview/licenses-win32.txt | 39 | ||||
-rw-r--r-- | indra/newview/llfloaterchat.cpp | 17 | ||||
-rw-r--r-- | indra/newview/llfloaterpreference.cpp | 42 | ||||
-rw-r--r-- | indra/newview/llfloaterpreference.h | 4 | ||||
-rw-r--r-- | indra/newview/llstatusbar.cpp | 63 | ||||
-rw-r--r-- | indra/newview/llstatusbar.h | 20 | ||||
-rw-r--r-- | indra/newview/llviewerparcelmgr.h | 1 | ||||
-rw-r--r-- | indra/newview/llviewerregion.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llviewerregion.h | 3 | ||||
-rw-r--r-- | indra/newview/llviewerstats.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llviewerstats.h | 3 | ||||
-rw-r--r-- | indra/newview/res/icon1.ico | bin | 0 -> 766 bytes | |||
-rw-r--r-- | indra/newview/res/resource.h | 3 |
14 files changed, 203 insertions, 6 deletions
diff --git a/indra/llcommon/llpreprocessor.h b/indra/llcommon/llpreprocessor.h index b3b79d0089..459d086cda 100644 --- a/indra/llcommon/llpreprocessor.h +++ b/indra/llcommon/llpreprocessor.h @@ -124,6 +124,9 @@ #if defined(LL_WINDOWS) #define BOOST_REGEX_NO_LIB 1 #define CURL_STATICLIB 1 + +#define LL_LCD_COMPILE 1 + #endif // LL_WINDOWS diff --git a/indra/newview/licenses-win32.txt b/indra/newview/licenses-win32.txt index e87d244141..3d9ef9b3b5 100644 --- a/indra/newview/licenses-win32.txt +++ b/indra/newview/licenses-win32.txt @@ -1,4 +1,43 @@ =========== +Logitech License +=========== + +End-User License Agreement for Logitech LCD SDK + +This End-User License Agreement for Logitech LCD SDK ( “Agreement”) is a legal agreement between you, either an individual or legal entity (“You” or “you”) and Logitech Inc. (“Logitech”) for use of the Logitech LCD software development kit, which includes computer software and related media and documentation (hereinafter “LCD SDK”). By using this LCD SDK, you are agreeing to be bound by the terms and conditions of this Agreement. If you do not agree to the terms and conditions of this Agreement, promptly return the LCD SDK and other items that are part of this product in their original package with your sales receipt to your point of purchase for a full refund, or if you have downloaded this software from a Logitech web site, then you must stop using the software and destroy any copies of the software in your possession or control. + +1 Grant of License and Restrictions. +This Agreement grants You the following rights provided that You comply with all terms and conditions of this Agreement. +(a) Logitech grants You a limited, non-exclusive, nontransferable license to install and use an unlimited number of copies of the LCD SDK on computers . All other rights are reserved to Logitech. +(b) You shall not reverse engineer, decompile or disassemble any portion of the LCD SDK, except and only to the extent that this limitation is expressly prohibited by applicable law. +(c) At your option, you may provide reasonable feedback to Logitech, including but not limited to usability, bug reports and test results, with respect to the LCD SDK. All bug reports, test results and other feedback provided to Logitech by You shall be the property of Logitech and may be used by Logitech for any purpose. +(d) In the event Logitech, in its sole discretion, elects to provide copies of the LCD SDK to more than one individual employed by You (if You are not a single individual), each such individual shall be entitled to exercise the rights granted in this Agreement and shall be bound by the terms and conditions herein. + +2 Updates. +Logitech is not obligated to provide technical support or updates to You for the LCD SDK provided to You pursuant to this Agreement. However, Logitech may, in its sole discretion, provide further pre-release versions, technical support, updates and/or supplements (“Updates”) to You, in which case such Updates shall be deemed to be included in the “LCD SDK” and shall be governed by this Agreement, unless other terms of use are provided in writing by Logitech with such Updates. + +3 Intellectual Property Rights. +The LCD SDK is licensed, not sold, to You for use only under the terms and conditions of this Agreement. Logitech and its suppliers retain title to the LCD SDK and all intellectual property rights therein. The LCD SDK is protected by intellectual property laws and international treaties, including U.S. copyright law and international copyright treaties. All rights not expressly granted by Logitech are reserved. + +4 Disclaimer of Warranty. +TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, LOGITECH AND ITS SUPPLIERS PROVIDE THE LCD SDK AND OTHER LOGITECH PRODUCTS AND SERVICES (IF ANY) AS IS AND WITHOUT WARRANTY OF ANY KIND. LOGITECH AND ITS SUPPLIERS EXPRESSLY DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD-PARTY RIGHTS WITH RESPECT TO THE LCD SDK AND ANY WARRANTIES OF NON-INTERFERENCE OR ACCURACY OF INFORMATIONAL CONTENT. NO LOGITECH DEALER, AGENT, OR EMPLOYEE IS AUTHORIZED TO MAKE ANY MODIFICATION, EXTENSION, OR ADDITION TO THIS WARRANTY. Some jurisdictions do not allow limitations on how long an implied warranty lasts, so the above limitation may not apply to you. + +5 Limitation of Liability. +IN NO EVENT WILL LOGITECH OR ITS SUPPLIERS BE LIABLE FOR ANY COSTS OF PROCUREMENT OF SUBSTITUTE PRODUCTS OR SERVICES, LOST PROFITS, LOSS OF INFORMATION OR DATA, OR ANY OTHER SPECIAL, INDIRECT, CONSEQUENTIAL, OR INCIDENTAL DAMAGES ARISING IN ANY WAY OUT OF THE SALE OF, USE OF, OR INABILITY TO USE THE LCD SDK OR ANY LOGITECH PRODUCT OR SERVICE, EVEN IF LOGITECH HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. IN NO CASE SHALL LOGITECH'S AND ITS SUPPLIERS’ TOTAL LIABILITY EXCEED THE ACTUAL MONEY PAID FOR THE LOGITECH PRODUCT OR SERVICE GIVING RISE TO THE LIABILITY. Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so the above limitation or exclusion may not apply to you. The above limitations will not apply in case of personal injury where and to the extent that applicable law requires such liability. + +6 U.S. Government Rights. +Use, duplication, or disclosure of the software contained in the LCD SDK by the U.S. Government is subject to restrictions set forth in this Agreement and as provided in DFARS 227.7202-1(a) and 227.7202-3(a) (1995), DFARS 252.227-7013(c)(1)(ii) (OCT 1988) FAR 12.212(a) (1995), FAR 52.227-19, or FAR 52.227-14 (ALT III), as applicable. Logitech Inc. 6505 Kaiser Drive, Fremont, CA 94555. + +7 Export Law Assurances. +You agree and certify that neither the LCD SDK nor any other technical data received from Logitech will be exported outside the United States except as authorized and as permitted by the laws and regulations of the United States. If you have rightfully obtained the LCD SDK outside of the United States, you agree that you will not re-export the LCD SDK nor any other technical data received from Logitech, except as permitted by the laws and regulations of the United States and the laws and regulations of the jurisdiction in which you obtained the LCD SDK. + +8 Termination: +This Agreement is effective until terminated. Upon any violation of any of the provisions of this Agreement, rights to use the LCD SDK shall automatically terminate and the LCD SDK must be returned to Logitech or all copies of the LCD SDK destroyed. You may also terminate this Agreement at any time by destroying all copies of the LCD SDK in your possession or control. If Logitech makes a request via public announcement or press release to stop using the copies of the LCD SDK, you will comply immediately with this request. The provisions of paragraphs 3, 7, 8 and 12 will survive any termination of this Agreement. + +9 General Terms and Conditions. +If You are an individual signing this Agreement on behalf of a company, then You represent that You have authority to execute this Agreement on behalf of such company. This Agreement will be governed by and construed in accordance with the laws of the United States and the State of California, without regard to or application of its choice of law rules or principles. If for any reason a court of competent jurisdiction finds any provision of this Agreement, or portion thereof, to be unenforceable, that provision of the Agreement shall be enforced to the maximum extent permissible so as to affect the intent of the parties, and the remainder of this Agreement shall continue in full force and effect. This Agreement constitutes the entire agreement between You and Logitech respect to the use of the LCD SDK and supersedes all prior or contemporaneous understandings, communications or agreements, written or oral, regarding such subject matter. + +=========== APR License =========== diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp index 686cc81600..b435ada463 100644 --- a/indra/newview/llfloaterchat.cpp +++ b/indra/newview/llfloaterchat.cpp @@ -73,6 +73,9 @@ #include "llfloaterhtml.h" #include "llweb.h" +// Used for LCD display +extern void AddNewIMToLCD(const LLString &newLine); +extern void AddNewChatToLCD(const LLString &newLine); // // Constants // @@ -309,6 +312,20 @@ void LLFloaterChat::addChat(const LLChat& chat, chat.mChatType == CHAT_TYPE_DEBUG_MSG && !gSavedSettings.getBOOL("ScriptErrorsAsChat"); +#if LL_WINDOWS && LL_LCD_COMPILE + // add into LCD displays + if (!invisible_script_debug_chat) + { + if (!from_instant_message) + { + AddNewChatToLCD(chat.mText); + } + else + { + AddNewIMToLCD(chat.mText); + } + } +#endif if (!invisible_script_debug_chat && !chat.mMuted && gConsole diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index f061018bcb..100ae0cfae 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -54,6 +54,7 @@ #include "llpaneldebug.h" #include "llpanelgeneral.h" #include "llpanelinput.h" +#include "llpanelLCD.h" #include "llpanelmsgs.h" #include "llpanelweb.h" #include "llprefschat.h" @@ -80,6 +81,14 @@ const S32 PREF_FLOATER_MIN_HEIGHT = 2 * SCROLLBAR_SIZE + 2 * LLPANEL_BORDER_WIDT LLFloaterPreference* LLFloaterPreference::sInstance = NULL; +#if LL_WINDOWS +// for Logitech LCD keyboards / speakers +#ifndef LL_LOGITECH_LCD_H +#include "lllogitechlcd.h" +#endif +extern llLCD *gLcdScreen; +#endif + // Must be done at run time, not compile time. JC S32 pref_min_width() { @@ -108,7 +117,8 @@ LLPreferenceCore::LLPreferenceCore(LLTabContainerCommon* tab_container, LLButton mDisplayPanel(NULL), mDisplayPanel2(NULL), mAudioPanel(NULL), - mMsgPanel(NULL) + mMsgPanel(NULL), + mLCDPanel(NULL) { mGeneralPanel = new LLPanelGeneral(); mTabContainer->addTabPanel(mGeneralPanel, mGeneralPanel->getLabel(), FALSE, onTabChanged, mTabContainer); @@ -156,6 +166,20 @@ LLPreferenceCore::LLPreferenceCore(LLTabContainerCommon* tab_container, LLButton mTabContainer->addTabPanel(mPrefsIM->getPanel(), mPrefsIM->getPanel()->getLabel(), FALSE, onTabChanged, mTabContainer); mPrefsIM->getPanel()->setDefaultBtn(default_btn); +#if LL_WINDOWS && LL_LCD_COMPILE + + // only add this option if we actually have a logitech keyboard / speaker set + if (gLcdScreen->Enabled()) + { + mLCDPanel = new LLPanelLCD(); + mTabContainer->addTabPanel(mLCDPanel, mLCDPanel->getLabel(), FALSE, onTabChanged, mTabContainer); + mLCDPanel->setDefaultBtn(default_btn); + } + +#else + mLCDPanel = NULL; +#endif + mMsgPanel = new LLPanelMsgs(); mTabContainer->addTabPanel(mMsgPanel, mMsgPanel->getLabel(), FALSE, onTabChanged, mTabContainer); mMsgPanel->setDefaultBtn(default_btn); @@ -240,6 +264,14 @@ void LLPreferenceCore::apply() #if LL_LIBXUL_ENABLED mWebPanel->apply(); #endif +#if LL_WINDOWS && LL_LCD_COMPILE + // only add this option if we actually have a logitech keyboard / speaker set + if (gLcdScreen->Enabled()) + { + mLCDPanel->apply(); + } +#endif +// mWebPanel->apply(); } @@ -259,6 +291,14 @@ void LLPreferenceCore::cancel() #if LL_LIBXUL_ENABLED mWebPanel->cancel(); #endif +#if LL_WINDOWS && LL_LCD_COMPILE + // only add this option if we actually have a logitech keyboard / speaker set + if (gLcdScreen->Enabled()) + { + mLCDPanel->cancel(); + } +#endif +// mWebPanel->cancel(); } // static diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index db77ebd6af..a4c43fc8d6 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -43,6 +43,7 @@ class LLPanelGeneral; class LLPanelInput; +class LLPanelLCD; class LLPanelDisplay; class LLPanelDisplay2; class LLPanelDisplay3; @@ -89,8 +90,9 @@ private: LLPrefsChat *mPrefsChat; LLPrefsVoice *mPrefsVoice; LLPrefsIM *mPrefsIM; - LLPanelMsgs *mMsgPanel; LLPanelWeb *mWebPanel; + LLPanelMsgs *mMsgPanel; + LLPanelLCD *mLCDPanel; }; // Floater to control preferences (display, audio, bandwidth, general. diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 9bbb25fd2b..df9b370dc4 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -464,6 +464,10 @@ void LLStatusBar::refresh() pos_y -= pos_y % 2; } + mRegionDetails.mTime = mTextTime->getText(); + mRegionDetails.mBalance = mBalance; + mRegionDetails.mAccesString = (char *)region->getSimAccessString(); + mRegionDetails.mPing = region->getNetDetailsForLCD(); if (parcel && !parcel->getName().empty()) { location_name = region->getName() @@ -471,6 +475,43 @@ void LLStatusBar::refresh() pos_x, pos_y, pos_z, region->getSimAccessString(), parcel->getName().c_str()); + + // keep these around for the LCD to use + mRegionDetails.mRegionName = region->getName(); + mRegionDetails.mParcelName = (char *)parcel->getName().c_str(); + mRegionDetails.mX = pos_x; + mRegionDetails.mY = pos_y; + mRegionDetails.mZ = pos_z; + mRegionDetails.mArea = parcel->getArea(); + mRegionDetails.mForSale = parcel->getForSale(); + mRegionDetails.mTraffic = gParcelMgr->getDwelling(); + + if (parcel->isPublic()) + { + snprintf(mRegionDetails.mOwner, MAX_STRING, "Public"); + } + else + { + if (parcel->getIsGroupOwned()) + { + if(!parcel->getGroupID().isNull()) + { + gCacheName->getGroupName(parcel->getGroupID(), mRegionDetails.mOwner); + } + else + { + snprintf(mRegionDetails.mOwner, MAX_STRING, "Group Owned"); + } + } + else + { + // Figure out the owner's name + char owner_first[MAX_STRING]; /*Flawfinder: ignore*/ + char owner_last[MAX_STRING]; /*Flawfinder: ignore*/ + gCacheName->getName(parcel->getOwnerID(), owner_first, owner_last); + snprintf(mRegionDetails.mOwner, MAX_STRING, "%s %s", owner_first, owner_last); /* Flawfinder: ignore */ + } + } } else { @@ -478,12 +519,34 @@ void LLStatusBar::refresh() + llformat(" %d, %d, %d (%s)", pos_x, pos_y, pos_z, region->getSimAccessString()); + // keep these around for the LCD to use + mRegionDetails.mRegionName = region->getName(); + mRegionDetails.mParcelName = "Unknown"; + + mRegionDetails.mX = pos_x; + mRegionDetails.mY = pos_y; + mRegionDetails.mZ = pos_z; + mRegionDetails.mArea = 0; + mRegionDetails.mForSale = FALSE; + snprintf(mRegionDetails.mOwner, MAX_STRING, "Unknown"); + mRegionDetails.mTraffic = 0.0f; } } else { // no region location_name = "(Unknown)"; + // keep these around for the LCD to use + mRegionDetails.mRegionName = LLString("Unknown"); + mRegionDetails.mParcelName = "Unknown"; + mRegionDetails.mAccesString = "Unknown"; + mRegionDetails.mX = 0; + mRegionDetails.mY = 0; + mRegionDetails.mZ = 0; + mRegionDetails.mArea = 0; + mRegionDetails.mForSale = FALSE; + snprintf(mRegionDetails.mOwner, MAX_STRING, "Unknown"); + mRegionDetails.mTraffic = 0.0f; } mTextParcelName->setText(location_name); diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h index 5832dee4f3..e588519eb4 100644 --- a/indra/newview/llstatusbar.h +++ b/indra/newview/llstatusbar.h @@ -47,6 +47,25 @@ class LLUUID; class LLFrameTimer; class LLStatGraph; +// used by LCD screen +class cLLRegionDetails +{ +public: + LLString mRegionName; + char *mParcelName; + char *mAccesString; + S32 mX; + S32 mY; + S32 mZ; + S32 mArea; + BOOL mForSale; + char mOwner[MAX_STRING]; + F32 mTraffic; + S32 mBalance; + LLString mTime; + U32 mPing; +}; + class LLStatusBar : public LLPanel { @@ -83,6 +102,7 @@ public: S32 getSquareMetersCredit() const; S32 getSquareMetersCommitted() const; S32 getSquareMetersLeft() const; + cLLRegionDetails mRegionDetails; protected: // simple method to setup the part that holds the date diff --git a/indra/newview/llviewerparcelmgr.h b/indra/newview/llviewerparcelmgr.h index 58a7067da4..2dd4f28169 100644 --- a/indra/newview/llviewerparcelmgr.h +++ b/indra/newview/llviewerparcelmgr.h @@ -130,6 +130,7 @@ public: F32 getSelectionHeight() const { return F32(mEastNorth.mdV[VY] - mWestSouth.mdV[VY]); } BOOL getSelection(LLVector3d &min, LLVector3d &max) { min = mWestSouth; max = mEastNorth; return !selectionEmpty();} LLViewerRegion* getSelectionRegion(); + F32 getDwelling() const { return mSelectedDwell;} void getDisplayInfo(S32* area, S32* claim, S32* rent, BOOL* for_sale, F32* dwell); diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 0a8d9a8e1d..dd5dba7de5 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -696,7 +696,10 @@ void LLViewerRegion::calculateCameraDistance() mCameraDistanceSquared = (F32)(gAgent.getCameraPositionGlobal() - getCenterGlobal()).magVecSquared(); } -// ---------------- Friends ---------------- +U32 LLViewerRegion::getNetDetailsForLCD() +{ + return mPingDelay; +} std::ostream& operator<<(std::ostream &s, const LLViewerRegion ®ion) { diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index d759361b18..013a96f2d1 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -240,6 +240,9 @@ public: friend std::ostream& operator<<(std::ostream &s, const LLViewerRegion ®ion); + // used by LCD to get details for debug screen + U32 getNetDetailsForLCD(); + public: struct CompareDistance { diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index da75de62e1..96f52a1382 100644 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -176,7 +176,11 @@ const StatAttributes STAT_INFO[LLViewerStats::ST_COUNT] = // ST_TEX_BAKES StatAttributes("Texture Bakes", FALSE, FALSE), // ST_TEX_REBAKES - StatAttributes("Texture Rebakes", FALSE, FALSE) + StatAttributes("Texture Rebakes", FALSE, FALSE), + + // ST_LOGITECH_KEYBOARD + StatAttributes("Logitech LCD", FALSE, FALSE) + }; LLViewerStats::LLViewerStats() diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h index 9e42f29929..3c959a5350 100644 --- a/indra/newview/llviewerstats.h +++ b/indra/newview/llviewerstats.h @@ -160,8 +160,9 @@ public: ST_WINDOW_HEIGHT = 55, ST_TEX_BAKES = 56, ST_TEX_REBAKES = 57, + ST_LOGITECH_LCD = 58, - ST_COUNT = 58 + ST_COUNT = 59 }; diff --git a/indra/newview/res/icon1.ico b/indra/newview/res/icon1.ico Binary files differnew file mode 100644 index 0000000000..ad607598fa --- /dev/null +++ b/indra/newview/res/icon1.ico diff --git a/indra/newview/res/resource.h b/indra/newview/res/resource.h index c7e1552dff..e4d01b1050 100644 --- a/indra/newview/res/resource.h +++ b/indra/newview/res/resource.h @@ -19,6 +19,7 @@ #define IDB_LOGIN 149 #define IDC_CURSOR4 153 #define IDC_CURSOR5 154 +#define IDI_LCD_LL_ICON 157 #define IDC_RADIO_56 1000 #define IDC_RADIO_128 1001 #define IDC_RADIO_256 1002 @@ -151,7 +152,7 @@ // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 156 +#define _APS_NEXT_RESOURCE_VALUE 167 #define _APS_NEXT_COMMAND_VALUE 40002 #define _APS_NEXT_CONTROL_VALUE 1139 #define _APS_NEXT_SYMED_VALUE 101 |