FIRE-1384: Option to show simulator channel in statusbar and notify if simulator version changes on region change

Ansariel 2012-08-25 15:51:37 +02:00
parent 5c7577f0ea
commit c93d93fbed
7 changed files with 143 additions and 11 deletions

View File

@ -18218,6 +18218,39 @@ Change of this parameter will affect the layout of buttons in notification toast
<key>Value</key>
<integer>1</integer>
</map>
<key>FSReleaseCandidateChannelId</key>
<map>
<key>Comment</key>
<string>Defines the string that identifies a simulator release candidate channel in the simulator version string.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>RC</string>
</map>
<key>FSStatusbarShowSimulatorVersion</key>
<map>
<key>Comment</key>
<string>If enabled, the simulator version is included in the V1-like statusbar.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<string>0</string>
</map>
<key>FSShowServerVersionChangeNotice</key>
<map>
<key>Comment</key>
<string>Shows a notice if the simulator version is different after a region crossing or teleport.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<string>1</string>
</map>
</map>
</llsd>

View File

@ -42,6 +42,9 @@
#include "rlvhandler.h"
// [/RLVa:KB]
// <FS:Ansariel> FIRE-1874: Show server channel in statusbar
#include "llappviewer.h"
//static
void LLAgentUI::buildFullname(std::string& name)
{
@ -99,6 +102,27 @@ BOOL LLAgentUI::buildLocationString(std::string& str, ELocationFormat fmt,const
pos_y -= pos_y % 2;
}
// <FS:Ansariel> FIRE-1874: Show server channel in statusbar
static LLCachedControl<bool> fsStatusbarShowSimulatorVersion(gSavedSettings, "FSStatusbarShowSimulatorVersion");
static LLCachedControl<std::string> fsReleaseCandidateChannelId(gSavedSettings, "FSReleaseCandidateChannelId");
std::string simulator_channel;
if (fsStatusbarShowSimulatorVersion)
{
std::istringstream simulator_name(gLastVersionChannel);
std::string rc_part;
// RC identifier should be at 3rd position, RC name is at 4th
if ((simulator_name >> rc_part) &&
(simulator_name >> rc_part) &&
((simulator_name >> rc_part) && rc_part == std::string(fsReleaseCandidateChannelId)) &&
(simulator_name >> rc_part))
{
simulator_channel = rc_part;
}
}
// </FS:Ansariel> FIRE-1874: Show server channel in statusbar
// create a default name and description for the landmark
std::string parcel_name = LLViewerParcelMgr::getInstance()->getAgentParcelName();
std::string region_name = region->getName();
@ -146,11 +170,23 @@ BOOL LLAgentUI::buildLocationString(std::string& str, ELocationFormat fmt,const
sim_access_string.c_str());
break;
case LOCATION_FORMAT_V1_STATUSBAR:
buffer = llformat("%s (%d, %d, %d)%s%s",
region_name.c_str(),
pos_x, pos_y, pos_z,
sim_access_string.empty() ? "" : " - ",
sim_access_string.c_str());
if (fsStatusbarShowSimulatorVersion && !simulator_channel.empty())
{
buffer = llformat("%s - %s - (%d, %d, %d)%s%s",
region_name.c_str(),
simulator_channel.c_str(),
pos_x, pos_y, pos_z,
sim_access_string.empty() ? "" : " - ",
sim_access_string.c_str());
}
else
{
buffer = llformat("%s (%d, %d, %d)%s%s",
region_name.c_str(),
pos_x, pos_y, pos_z,
sim_access_string.empty() ? "" : " - ",
sim_access_string.c_str());
}
break;
}
}
@ -187,12 +223,25 @@ BOOL LLAgentUI::buildLocationString(std::string& str, ELocationFormat fmt,const
sim_access_string.c_str());
break;
case LOCATION_FORMAT_V1_STATUSBAR:
buffer = llformat("%s (%d, %d, %d)%s%s - %s",
region_name.c_str(),
pos_x, pos_y, pos_z,
sim_access_string.empty() ? "" : " - ",
sim_access_string.c_str(),
parcel_name.c_str());
if (fsStatusbarShowSimulatorVersion && !simulator_channel.empty())
{
buffer = llformat("%s - %s - (%d, %d, %d)%s%s - %s",
region_name.c_str(),
simulator_channel.c_str(),
pos_x, pos_y, pos_z,
sim_access_string.empty() ? "" : " - ",
sim_access_string.c_str(),
parcel_name.c_str());
}
else
{
buffer = llformat("%s (%d, %d, %d)%s%s - %s",
region_name.c_str(),
pos_x, pos_y, pos_z,
sim_access_string.empty() ? "" : " - ",
sim_access_string.c_str(),
parcel_name.c_str());
}
break;
}
}

View File

@ -4664,6 +4664,16 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
return;
}
// <FS:Ansariel> Bring back simulator version changed messages after TP
if (!gLastVersionChannel.empty() && gSavedSettings.getBOOL("FSShowServerVersionChangeNotice"))
{
LLSD args;
args["OLDVERSION"] = gLastVersionChannel;
args["NEWVERSION"] = version_channel;
LLNotificationsUtil::add("ServerVersionChanged", args);
}
// </FS:Ansariel>
gLastVersionChannel = version_channel;
}

View File

@ -3694,4 +3694,11 @@ Das Foto kann jetzt [http://www.flickr.com/photos/upload/edit/?ids=[ID] hier] be
<notification name="FirstUseFlyOverride">
Warnung: Bitte verwende die Funktion zur Aufhebung der Flugbeschränkung verantwortungsvoll! Die Verwendung ohne die Zustimmung des Landeigentümers kann dazu führen, dass du von dem entsprechenden Land verbannt wirst.
</notification>
<notification name="ServerVersionChanged">
Die betretene Region verwendet eine andere Simulator-Version.
Aktueller Simulator: [NEWVERSION]
Vorheriger Simulator: [OLDVERSION]
</notification>
</notifications>

View File

@ -80,6 +80,8 @@
<check_box label="Avatar umdrehen beim Rückwärtsgehen" name="backwardsturnavatar" tool_tip="Dreht den Avatar mit dem Gesicht zur Kamera beim Rückwärtsgehen."/>
<check_box label="Doppelte Landmarken auf der Weltkarte filtern" name="WorldmapFilterDuplicateLandmarks" tool_tip="Filtert doppelte (identische) Landmarken in der Übersicht der Landmarken auf der Weltkarte."/>
<check_box label="Erweiterte Regionsinformationen auf der Weltkarte anzeigen" name="FSAdvancedWorldmapRegionInfo" tool_tip="Zeigt erweiterte Regionsinformationen (Anzahl Avatare und Alterseinstufung) auf der Weltkarte an."/>
<check_box label="Info anzeigen, wenn sich der Simulator-Kanal beim Regionswechsel ändert" name="FSShowServerVersionChangeNotice" tool_tip="Zeigt an, falls sich beim einem Wechsel der Region oder durch einen Teleport die Version des Simulators ändert, auf dem die Region läuft."/>
<check_box label="Simulator-Kanal in der Statusleiste anzeigen" name="FSStatusbarShowSimulatorVersion" tool_tip="Zeigt den Kanal des Simulators an, auf dem die aktuelle Region läuft."/>
</panel>
</tab_container>
</panel>

View File

@ -9071,4 +9071,13 @@ Caution: Use the Fly Override responsibily! Using the Fly Override without the l
name="okbutton"
yestext="OK"/>
</notification>
<notification
icon="notifytip.tga"
name="ServerVersionChanged"
type="notifytip">
The region you have entered is running a different simulator version.
Current simulator: [NEWVERSION]
Previous simulator: [OLDVERSION]
</notification>
</notifications>

View File

@ -605,6 +605,28 @@
width="270"
control_name="FSAdvancedWorldmapRegionInfo"
tool_tip="Shows additional region infos on the world map (avatar count and maturity level)."/>
<check_box top_pad="5"
follows="left|top"
height="16"
initial_value="false"
label="Notify if the simulator version changes while changing the region"
left="15"
name="FSShowServerVersionChangeNotice"
width="270"
control_name="FSShowServerVersionChangeNotice"
tool_tip="Displays a notice if the simulator version changes during a teleport or while crossing a region."/>
<check_box top_pad="5"
follows="left|top"
height="16"
initial_value="false"
label="Show simulator channel in status bar"
left="15"
name="FSStatusbarShowSimulatorVersion"
width="270"
control_name="FSStatusbarShowSimulatorVersion"
tool_tip="Shows the current simulator channel in the V1-like status bar."/>
</panel>
</tab_container>
</panel>