From a59f93266b9f161da9c64b53f24af604bf6a04b5 Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Tue, 12 Jul 2011 15:59:30 +0200 Subject: [PATCH 1/6] Improved documentation regarding kill() a bit. --- indra/newview/statemachine/aistatemachine.h | 26 ++++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/indra/newview/statemachine/aistatemachine.h b/indra/newview/statemachine/aistatemachine.h index 094f30031..0c905668c 100644 --- a/indra/newview/statemachine/aistatemachine.h +++ b/indra/newview/statemachine/aistatemachine.h @@ -70,14 +70,16 @@ // .-------. | | // | Run |_, | Call multiplex_impl() until idle(), abort() or finish() is called. // '-------' | -// | | | -// v | | -// Abort | | Calls abort_impl(). -// | | | -// v v | -// Finish | Calls finish_impl(). -// | | -// `---------' +// | | | +// v | | +// Abort | | Calls abort_impl(). +// | | | +// v v | +// Finish | Calls finish_impl(), which may call kill() and/or the callback +// | | | function passed to run(), if any, which may call kill() and/or run(). +// | `-------' +// v +// Killed Delete the statemachine (all statemachines must be allocated with new). // // Each state causes corresponding code to be called. // Finish cleans up whatever is done by Initialize. @@ -93,6 +95,12 @@ // abort() in case of failure, or finish() in case of success. // Respectively these set the state to Abort and Finish. // +// finish_impl may call kill() for a (default) destruction upon finish. +// Even in that case the callback (passed to run()) may call run() again, +// which overrides the request for a default kill. Or, if finish_impl +// doesn't call kill() the callback may call kill() to request the +// destruction of the state machine object. +// // State machines are run from the "idle" part of the viewer main loop. // Often a state machine has nothing to do however. In that case it can // call the method idle(). This will stop the state machine until @@ -184,7 +192,7 @@ class AIStateMachine { base_state_type mState; //!< State of the base class. bool mIdle; //!< True if this state machine is not running. bool mAborted; //!< True after calling abort() and before calling run(). - bool mQueued; //!< True when the statemachine is queued to be added back to the active list. + bool mQueued; //!< True when the statemachine is queued to be added back to the active list. S64 mSleep; //!< Non-zero while the state machine is sleeping. // Callback facilities. From b6d5743ccb5cad5fe85d9e74b4726c4a737bcd06 Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Sat, 16 Jul 2011 17:20:07 +0200 Subject: [PATCH 2/6] Fix highlighting of Radar and Snapshot toolbar buttons. Thanks to Done Arun. --- indra/newview/app_settings/settings.xml | 22 +++++++++++----------- indra/newview/llfloateravatarlist.cpp | 3 +++ indra/newview/llfloatersnapshot.cpp | 6 ++++++ indra/newview/llfloatersnapshot.h | 1 + indra/newview/lltoolbar.cpp | 4 ++-- 5 files changed, 23 insertions(+), 13 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index ef5719c02..b1842da0a 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -12181,6 +12181,17 @@ Value 0 + SnapshotBtnState + + Comment + + Persist + 0 + Type + Boolean + Value + 0 + SnapshotFormat Comment @@ -15037,17 +15048,6 @@ 473 - RadarListBtnState - - Comment - - Persist - 0 - Type - Boolean - Value - 0 - WindEnabled Comment diff --git a/indra/newview/llfloateravatarlist.cpp b/indra/newview/llfloateravatarlist.cpp index ac058cb2b..7fda1ffd2 100644 --- a/indra/newview/llfloateravatarlist.cpp +++ b/indra/newview/llfloateravatarlist.cpp @@ -229,7 +229,10 @@ void LLFloaterAvatarList::createInstance(bool visible) sInstance = new LLFloaterAvatarList(); LLUICtrlFactory::getInstance()->buildFloater(sInstance, "floater_radar.xml"); if(!visible) + { sInstance->setVisible(FALSE); + gSavedSettings.setBOOL("ShowRadar", FALSE); + } } //static void LLFloaterAvatarList::toggle(void*) diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index e5c8a18a6..a60490da9 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -2110,11 +2110,17 @@ void LLFloaterSnapshot::draw() } } +void LLFloaterSnapshot::onOpen() +{ + gSavedSettings.setBOOL("SnapshotBtnState", TRUE); +} + void LLFloaterSnapshot::onClose(bool app_quitting) { gSnapshotFloaterView->setEnabled(FALSE); // Set invisible so it doesn't eat tooltips. JC gSnapshotFloaterView->setVisible(FALSE); + gSavedSettings.setBOOL("SnapshotBtnState", FALSE); destroy(); } diff --git a/indra/newview/llfloatersnapshot.h b/indra/newview/llfloatersnapshot.h index 14f1872cd..8fb51c945 100644 --- a/indra/newview/llfloatersnapshot.h +++ b/indra/newview/llfloatersnapshot.h @@ -56,6 +56,7 @@ public: /*virtual*/ BOOL postBuild(); /*virtual*/ void draw(); /*virtual*/ void onClose(bool app_quitting); + /*virtual*/ void onOpen(); static void show(void*); static void hide(void*); diff --git a/indra/newview/lltoolbar.cpp b/indra/newview/lltoolbar.cpp index 44fc368f3..8b1325ea2 100644 --- a/indra/newview/lltoolbar.cpp +++ b/indra/newview/lltoolbar.cpp @@ -134,7 +134,7 @@ BOOL LLToolBar::postBuild() childSetControlName("appearance_btn", ""); childSetAction("radar_list_btn", onClickRadarList, this); - childSetControlName("radar_list_btn", "RadarListBtnState"); + childSetControlName("radar_list_btn", "ShowRadar"); childSetAction("fly_btn", onClickFly, this); childSetControlName("fly_btn", "FlyBtnState"); @@ -143,7 +143,7 @@ BOOL LLToolBar::postBuild() childSetControlName("sit_btn", "SitBtnState"); childSetAction("snapshot_btn", onClickSnapshot, this); - childSetControlName("snapshot_btn", ""); + childSetControlName("snapshot_btn", "SnapshotBtnState"); childSetAction("directory_btn", onClickDirectory, this); childSetControlName("directory_btn", "ShowDirectory"); From d018bf99c7c5e0121caa28f96145c101e11f0d02 Mon Sep 17 00:00:00 2001 From: Xara Date: Tue, 19 Jul 2011 22:25:50 -0700 Subject: [PATCH 3/6] Very, very very very very old bug from 2006, REGRESSION! Patch prevent console spam about failed locales set on systems where global locale is reported by "modern" way, I do not remember author, probably Tofu L. then others, not the better way (better is rewrite all this and fire such code OUT of loop!) --- indra/llui/llresmgr.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/indra/llui/llresmgr.cpp b/indra/llui/llresmgr.cpp index 68fd08921..07649adfa 100644 --- a/indra/llui/llresmgr.cpp +++ b/indra/llui/llresmgr.cpp @@ -453,15 +453,17 @@ const std::string LLLocale::USER_LOCALE("en_US.utf8"); const std::string LLLocale::SYSTEM_LOCALE("C"); #endif +static std::string PrevFailedLocaleString = ""; LLLocale::LLLocale(const std::string& locale_string) { mPrevLocaleString = setlocale( LC_ALL, NULL ); char* new_locale_string = setlocale( LC_ALL, locale_string.c_str()); - if ( new_locale_string == NULL) + if ( new_locale_string == NULL && PrevFailedLocaleString != locale_string ) { llwarns << "Failed to set locale " << locale_string.c_str() << llendl; setlocale(LC_ALL, SYSTEM_LOCALE.c_str()); + PrevFailedLocaleString = locale_string; } //else //{ From 2f571a0393756046cf054185c5cb7d10862b1023 Mon Sep 17 00:00:00 2001 From: Siana Gearz Date: Tue, 26 Jul 2011 01:46:53 +0200 Subject: [PATCH 4/6] Signed cleanup on texture fetch and one login bug fix --- indra/newview/app_settings/settings.xml | 2 +- indra/newview/llpanellogin.cpp | 1 + indra/newview/lltexturefetch.cpp | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index b1842da0a..1ba6f7d6b 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -28,7 +28,7 @@ Persist 1 Type - S32 + U32 Value 30 diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 79da3805b..4fbcf0187 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -712,6 +712,7 @@ void LLPanelLogin::setFields(const LLSavedLoginEntry& entry, bool takeFocus) std::string fullname = nameJoin(entry.getFirstName(), entry.getLastName()); LLComboBox* login_combo = sInstance->getChild("name_combo"); login_combo->setTextEntry(fullname); + login_combo->resetTextDirty(); //sInstance->childSetText("name_combo", fullname); std::string grid = entry.getGrid(); diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 967d56b9d..83de34ecd 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -479,8 +479,8 @@ static bool sgConnectionThrottle() { LLMutexLock lock(&mutex); const U32 THROTTLE_TIMESTEPS_PER_SECOND = 10; static const LLCachedControl max_connections_per_second("HTTPRequestRate", 30); - S32 max_connections = max_connections_per_second/THROTTLE_TIMESTEPS_PER_SECOND; - const S32 timestep = USEC_PER_SEC/THROTTLE_TIMESTEPS_PER_SECOND; + U32 max_connections = max_connections_per_second/THROTTLE_TIMESTEPS_PER_SECOND; + const U32 timestep = USEC_PER_SEC/THROTTLE_TIMESTEPS_PER_SECOND; U64 now = LLTimer::getTotalTime(); std::deque timestamps; while(!timestamps.empty() && (timestamps[0]<=now-timestep)) { From 5314f7680308b5d422b7060a16b74ac136ba9609 Mon Sep 17 00:00:00 2001 From: Siana Gearz Date: Tue, 26 Jul 2011 04:16:47 +0200 Subject: [PATCH 5/6] Version 1.5.10(1) --- indra/llcommon/llversionviewer.h | 2 +- indra/newview/app_settings/settings_files.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h index aa8d826d0..ba2e3f542 100644 --- a/indra/llcommon/llversionviewer.h +++ b/indra/llcommon/llversionviewer.h @@ -36,7 +36,7 @@ const S32 LL_VERSION_MAJOR = 1; const S32 LL_VERSION_MINOR = 5; const S32 LL_VERSION_PATCH = 10; -const S32 LL_VERSION_BUILD = 0; +const S32 LL_VERSION_BUILD = 1; const char * const LL_CHANNEL = "Singularity"; diff --git a/indra/newview/app_settings/settings_files.xml b/indra/newview/app_settings/settings_files.xml index ec5574535..6e52cfa24 100644 --- a/indra/newview/app_settings/settings_files.xml +++ b/indra/newview/app_settings/settings_files.xml @@ -61,7 +61,7 @@ Global Name - settings.xml + settings_singularity.xml NameFromSetting ClientSettingsFile @@ -81,7 +81,7 @@ PerAccount Name - settings_per_account.xml + settings_sg_per_account.xml From ee9b689cb418bf10540b82b0be38e5bc1f8cb3b0 Mon Sep 17 00:00:00 2001 From: Siana Gearz Date: Tue, 26 Jul 2011 06:49:33 +0200 Subject: [PATCH 6/6] OK, more login unbreaking =.= --- indra/newview/llpanellogin.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 4fbcf0187..1920750be 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -607,7 +607,7 @@ void LLPanelLogin::giveFocus() if( sInstance ) { // Grab focus and move cursor to first blank input field - std::string first = sInstance->childGetText("name_combo"); + std::string first = sInstance->getChild("name_combo")->getTextEntry(); std::string pass = sInstance->childGetText("password_edit"); BOOL have_first = !first.empty(); @@ -1238,16 +1238,10 @@ void LLPanelLogin::onLoginComboLostFocus(LLFocusableElement* fe, void*) if (sInstance) { LLComboBox* combo = sInstance->getChild("name_combo"); - if(fe == combo) + if(fe == combo && combo->isTextDirty()) { - if (combo->isTextDirty()) - { - clearPassword(); - } - else - { - onSelectLoginEntry(combo, NULL); - } + clearPassword(); + combo->resetTextDirty(); } } }