Merge branch 'master' of github-siana:siana/SingularityViewer into future

This commit is contained in:
Siana Gearz
2011-08-03 01:01:00 +02:00
10 changed files with 51 additions and 36 deletions

View File

@@ -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";

View File

@@ -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
//{

View File

@@ -12383,6 +12383,17 @@
<key>Value</key>
<integer>0</integer>
</map>
<key>SnapshotBtnState</key>
<map>
<key>Comment</key>
<string/>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>SnapshotFormat</key>
<map>
<key>Comment</key>
@@ -14326,17 +14337,6 @@
<integer>473</integer>
</array>
</map>
<key>RadarListBtnState</key>
<map>
<key>Comment</key>
<string/>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>WindEnabled</key>
<map>
<key>Comment</key>

View File

@@ -61,7 +61,7 @@
<key>Global</key>
<map>
<key>Name</key>
<string>settings.xml</string>
<string>settings_singularity.xml</string>
<key>NameFromSetting</key>
<string>ClientSettingsFile</string>
</map>
@@ -81,7 +81,7 @@
<key>PerAccount</key>
<map>
<key>Name</key>
<string>settings_per_account.xml</string>
<string>settings_sg_per_account.xml</string>
</map>
</map>
</map>

View File

@@ -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*)

View File

@@ -2111,11 +2111,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();
}

View File

@@ -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*);

View File

@@ -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<LLComboBox>("name_combo")->getTextEntry();
std::string pass = sInstance->childGetText("password_edit");
BOOL have_first = !first.empty();
@@ -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<LLComboBox>("name_combo");
login_combo->setTextEntry(fullname);
login_combo->resetTextDirty();
//sInstance->childSetText("name_combo", fullname);
std::string grid = entry.getGrid();
@@ -1237,16 +1238,10 @@ void LLPanelLogin::onLoginComboLostFocus(LLFocusableElement* fe, void*)
if (sInstance)
{
LLComboBox* combo = sInstance->getChild<LLComboBox>("name_combo");
if(fe == combo)
if(fe == combo && combo->isTextDirty())
{
if (combo->isTextDirty())
{
clearPassword();
}
else
{
onSelectLoginEntry(combo, NULL);
}
clearPassword();
combo->resetTextDirty();
}
}
}

View File

@@ -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");

View File

@@ -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.