Add setting to prevent script errors from stealing focus

This commit is contained in:
Lirusaito
2013-06-23 04:05:25 -04:00
parent 62f5e73767
commit e7669cc94b
5 changed files with 17 additions and 1 deletions

View File

@@ -706,6 +706,17 @@
<key>Value</key>
<integer>0</integer>
</map>
<key>LiruScriptErrorsStealFocus</key>
<map>
<key>Comment</key>
<string>When false, scripts that have errors won't steal focus once they've been failed to compile</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>LiruSensibleARC</key>
<map>
<key>Comment</key>

View File

@@ -193,6 +193,7 @@ void LLPrefsAscentVan::refreshValues()
mAnnounceStreamMetadata = gSavedSettings.getBOOL("AnnounceStreamMetadata");
mUnfocusedFloatersOpaque = gSavedSettings.getBOOL("FloaterUnfocusedBackgroundOpaque");
mCompleteNameProfiles = gSavedSettings.getBOOL("SinguCompleteNameProfiles");
mScriptErrorsStealFocus = gSavedSettings.getBOOL("LiruScriptErrorsStealFocus");
//Tags\Colors ----------------------------------------------------------------------------
mAscentBroadcastTag = gSavedSettings.getBOOL("AscentBroadcastTag");
@@ -263,6 +264,7 @@ void LLPrefsAscentVan::cancel()
gSavedSettings.setBOOL("AnnounceStreamMetadata", mAnnounceStreamMetadata);
gSavedSettings.setBOOL("FloaterUnfocusedBackgroundOpaque", mUnfocusedFloatersOpaque);
gSavedSettings.setBOOL("SinguCompleteNameProfiles", mCompleteNameProfiles);
gSavedSettings.setBOOL("LiruScriptErrorsStealFocus", mScriptErrorsStealFocus);
//Tags\Colors ----------------------------------------------------------------------------
gSavedSettings.setBOOL("AscentBroadcastTag", mAscentBroadcastTag);

View File

@@ -64,6 +64,7 @@ protected:
bool mAnnounceStreamMetadata;
bool mUnfocusedFloatersOpaque;
bool mCompleteNameProfiles;
bool mScriptErrorsStealFocus;
//Tags\Colors
BOOL mAscentBroadcastTag;
std::string mReportClientUUID;

View File

@@ -1155,7 +1155,8 @@ void LLScriptEdCore::onErrorList(LLUICtrl*, void* user_data)
//llinfos << "LLScriptEdCore::onErrorList() - " << row << ", "
//<< column << llendl;
self->mEditor->setCursor(row, column);
self->mEditor->setFocus(TRUE);
if (gSavedSettings.getBOOL("LiruScriptErrorsStealFocus"))
self->mEditor->setFocus(TRUE);
}
}

View File

@@ -13,6 +13,7 @@
<check_box bottom_delta="-20" control_name="AnnounceStreamMetadata" follows="top" height="16" label="Announce music stream's metadata in local chat when tuned in" tool_tip="When a new song comes on, a message will be displayed in local chat with available information about the track." name="announce_stream_metadata"/>
<check_box bottom_delta="-20" control_name="FloaterUnfocusedBackgroundOpaque" follows="top" height="16" label="Make unfocused floaters opaque (requires refocusing each floater to take effect)" tool_tip="When a floater loses focus, it won't turn transparent with this enabled. This may conflict with some skins." name="unfocused_floaters_opaque"/>
<check_box bottom_delta="-20" control_name="SinguCompleteNameProfiles" follows="top" height="16" label="Show complete names (display name and username) in profiles" tool_tip="Disregards the global name display settings, will not work if display names are switched off." name="complete_name_profiles"/>
<check_box bottom_delta="-20" control_name="LiruScriptErrorsStealFocus" follows="top" height="16" label="Let scripts steal focus when they can't compile due to errors"/>
</panel>
<panel border="true" left="1" bottom="-190" height="180" width="500" label="Tags/Colors" name="TagsColors">
<!-- Client tag options -->