Fix highlighting of Radar and Snapshot toolbar buttons.

Thanks to Done Arun.
This commit is contained in:
Aleric Inglewood
2011-07-16 17:20:07 +02:00
parent 2eb64525ae
commit b6d5743ccb
5 changed files with 23 additions and 13 deletions

View File

@@ -12181,6 +12181,17 @@
<key>Value</key> <key>Value</key>
<integer>0</integer> <integer>0</integer>
</map> </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> <key>SnapshotFormat</key>
<map> <map>
<key>Comment</key> <key>Comment</key>
@@ -15037,17 +15048,6 @@
<integer>473</integer> <integer>473</integer>
</array> </array>
</map> </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> <key>WindEnabled</key>
<map> <map>
<key>Comment</key> <key>Comment</key>

View File

@@ -229,7 +229,10 @@ void LLFloaterAvatarList::createInstance(bool visible)
sInstance = new LLFloaterAvatarList(); sInstance = new LLFloaterAvatarList();
LLUICtrlFactory::getInstance()->buildFloater(sInstance, "floater_radar.xml"); LLUICtrlFactory::getInstance()->buildFloater(sInstance, "floater_radar.xml");
if(!visible) if(!visible)
{
sInstance->setVisible(FALSE); sInstance->setVisible(FALSE);
gSavedSettings.setBOOL("ShowRadar", FALSE);
}
} }
//static //static
void LLFloaterAvatarList::toggle(void*) void LLFloaterAvatarList::toggle(void*)

View File

@@ -2110,11 +2110,17 @@ void LLFloaterSnapshot::draw()
} }
} }
void LLFloaterSnapshot::onOpen()
{
gSavedSettings.setBOOL("SnapshotBtnState", TRUE);
}
void LLFloaterSnapshot::onClose(bool app_quitting) void LLFloaterSnapshot::onClose(bool app_quitting)
{ {
gSnapshotFloaterView->setEnabled(FALSE); gSnapshotFloaterView->setEnabled(FALSE);
// Set invisible so it doesn't eat tooltips. JC // Set invisible so it doesn't eat tooltips. JC
gSnapshotFloaterView->setVisible(FALSE); gSnapshotFloaterView->setVisible(FALSE);
gSavedSettings.setBOOL("SnapshotBtnState", FALSE);
destroy(); destroy();
} }

View File

@@ -56,6 +56,7 @@ public:
/*virtual*/ BOOL postBuild(); /*virtual*/ BOOL postBuild();
/*virtual*/ void draw(); /*virtual*/ void draw();
/*virtual*/ void onClose(bool app_quitting); /*virtual*/ void onClose(bool app_quitting);
/*virtual*/ void onOpen();
static void show(void*); static void show(void*);
static void hide(void*); static void hide(void*);

View File

@@ -134,7 +134,7 @@ BOOL LLToolBar::postBuild()
childSetControlName("appearance_btn", ""); childSetControlName("appearance_btn", "");
childSetAction("radar_list_btn", onClickRadarList, this); childSetAction("radar_list_btn", onClickRadarList, this);
childSetControlName("radar_list_btn", "RadarListBtnState"); childSetControlName("radar_list_btn", "ShowRadar");
childSetAction("fly_btn", onClickFly, this); childSetAction("fly_btn", onClickFly, this);
childSetControlName("fly_btn", "FlyBtnState"); childSetControlName("fly_btn", "FlyBtnState");
@@ -143,7 +143,7 @@ BOOL LLToolBar::postBuild()
childSetControlName("sit_btn", "SitBtnState"); childSetControlName("sit_btn", "SitBtnState");
childSetAction("snapshot_btn", onClickSnapshot, this); childSetAction("snapshot_btn", onClickSnapshot, this);
childSetControlName("snapshot_btn", ""); childSetControlName("snapshot_btn", "SnapshotBtnState");
childSetAction("directory_btn", onClickDirectory, this); childSetAction("directory_btn", onClickDirectory, this);
childSetControlName("directory_btn", "ShowDirectory"); childSetControlName("directory_btn", "ShowDirectory");