FIRE-31033: Keep Teleport/Map/Profile buttons on places floater
parent
ca97cd9b14
commit
aa2c08836b
|
|
@ -54,6 +54,15 @@ BOOL FSFloaterTeleportHistory::postBuild()
|
|||
{
|
||||
mHistoryPanel->setIsStandAlone(true);
|
||||
|
||||
mHistoryPanel->mTeleportBtn = getChild<LLButton>("teleport_btn");
|
||||
mHistoryPanel->mShowOnMapBtn = getChild<LLButton>("map_btn");
|
||||
mHistoryPanel->mShowProfile = getChild<LLButton>("profile_btn");
|
||||
|
||||
mHistoryPanel->mTeleportBtn->setClickedCallback(boost::bind(&LLTeleportHistoryPanel::onTeleport, mHistoryPanel));
|
||||
mHistoryPanel->mShowProfile->setClickedCallback(boost::bind(&LLTeleportHistoryPanel::onShowProfile, mHistoryPanel));
|
||||
mHistoryPanel->mShowOnMapBtn->setClickedCallback(boost::bind(&LLTeleportHistoryPanel::onShowOnMap, mHistoryPanel));
|
||||
|
||||
|
||||
mFilterEditor = getChild<LLFilterEditor>("Filter");
|
||||
if (mFilterEditor)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -208,6 +208,13 @@ void LLLandmarksPanel::onShowOnMap()
|
|||
return;
|
||||
}
|
||||
|
||||
// <FS:Ansariel> FIRE-31033: Keep Teleport/Map/Profile buttons on places floater
|
||||
// Disable the "Map" button because loading landmark can take some time.
|
||||
// During this time the button is useless. It will be enabled on callback finish
|
||||
// or upon switching to other item.
|
||||
mShowOnMapBtn->setEnabled(FALSE);
|
||||
// </FS:Ansariel>
|
||||
|
||||
doActionOnCurSelectedLandmark(boost::bind(&LLLandmarksPanel::doShowOnMap, this, _1));
|
||||
}
|
||||
|
||||
|
|
@ -293,6 +300,16 @@ void LLLandmarksPanel::updateVerbs()
|
|||
{
|
||||
sRemoveBtn->setEnabled(isActionEnabled("delete") && (isFolderSelected() || isLandmarkSelected()));
|
||||
}
|
||||
|
||||
// <FS:Ansariel> FIRE-31033: Keep Teleport/Map/Profile buttons on places floater
|
||||
if (!isTabVisible())
|
||||
return;
|
||||
|
||||
bool landmark_selected = isLandmarkSelected();
|
||||
mTeleportBtn->setEnabled(landmark_selected && isActionEnabled("teleport"));
|
||||
mShowProfile->setEnabled(landmark_selected && isActionEnabled("more_info"));
|
||||
mShowOnMapBtn->setEnabled(landmark_selected && isActionEnabled("show_on_map"));
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
|
||||
void LLLandmarksPanel::setItemSelected(const LLUUID& obj_id, BOOL take_keyboard_focus)
|
||||
|
|
@ -1071,6 +1088,7 @@ void LLLandmarksPanel::doShowOnMap(LLLandmark* landmark)
|
|||
LLFloaterReg::showInstance("world_map", "center");
|
||||
}
|
||||
|
||||
mShowOnMapBtn->setEnabled(TRUE); // <FS:Ansariel> FIRE-31033: Keep Teleport/Map/Profile buttons on places floater
|
||||
mGearLandmarkMenu->setItemEnabled("show_on_map", TRUE);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -307,6 +307,11 @@ BOOL LLPanelPlaces::postBuild()
|
|||
mOverflowBtn = getChild<LLMenuButton>("overflow_btn");
|
||||
mOverflowBtn->setMouseDownCallback(boost::bind(&LLPanelPlaces::onOverflowButtonClicked, this));
|
||||
|
||||
// <FS:Ansariel> FIRE-31033: Keep Teleport/Map/Profile buttons on places floater
|
||||
mPlaceInfoBtn = getChild<LLButton>("profile_btn");
|
||||
mPlaceInfoBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onProfileButtonClicked, this));
|
||||
// </FS:Ansariel>
|
||||
|
||||
mGearMenuButton = getChild<LLMenuButton>("options_gear_btn");
|
||||
mGearMenuButton->setMouseDownCallback(boost::bind(&LLPanelPlaces::onGearMenuClick, this));
|
||||
|
||||
|
|
@ -355,7 +360,7 @@ BOOL LLPanelPlaces::postBuild()
|
|||
}
|
||||
|
||||
mButtonsContainer = getChild<LLPanel>("button_layout_panel");
|
||||
mButtonsContainer->setVisible(FALSE);
|
||||
//mButtonsContainer->setVisible(FALSE); // <FS:Ansariel> FIRE-31033: Keep Teleport/Map/Profile buttons on places floater
|
||||
mFilterContainer = getChild<LLLayoutStack>("top_menu_panel");
|
||||
|
||||
mFilterEditor = getChild<LLFilterEditor>("Filter");
|
||||
|
|
@ -963,6 +968,16 @@ void LLPanelPlaces::onOverflowButtonClicked()
|
|||
mOverflowBtn->setMenu(menu, LLMenuButton::MP_TOP_RIGHT);
|
||||
}
|
||||
|
||||
// <FS:Ansariel> FIRE-31033: Keep Teleport/Map/Profile buttons on places floater
|
||||
void LLPanelPlaces::onProfileButtonClicked()
|
||||
{
|
||||
if (!mActivePanel)
|
||||
return;
|
||||
|
||||
mActivePanel->onShowProfile();
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
bool LLPanelPlaces::onOverflowMenuItemEnable(const LLSD& param)
|
||||
{
|
||||
std::string value = param.asString();
|
||||
|
|
@ -1245,6 +1260,9 @@ void LLPanelPlaces::createTabs()
|
|||
LLFavoritesPanel* favorites_panel = new LLFavoritesPanel();
|
||||
if (favorites_panel)
|
||||
{
|
||||
// <FS:Ansariel> FIRE-31033: Keep Teleport/Map/Profile buttons on places floater
|
||||
favorites_panel->setPanelPlacesButtons(this);
|
||||
|
||||
mTabContainer->addTabPanel(
|
||||
LLTabContainer::TabPanelParams().
|
||||
panel(favorites_panel).
|
||||
|
|
@ -1255,6 +1273,9 @@ void LLPanelPlaces::createTabs()
|
|||
LLLandmarksPanel* landmarks_panel = new LLLandmarksPanel();
|
||||
if (landmarks_panel)
|
||||
{
|
||||
// <FS:Ansariel> FIRE-31033: Keep Teleport/Map/Profile buttons on places floater
|
||||
landmarks_panel->setPanelPlacesButtons(this);
|
||||
|
||||
mTabContainer->addTabPanel(
|
||||
LLTabContainer::TabPanelParams().
|
||||
panel(landmarks_panel).
|
||||
|
|
@ -1265,6 +1286,9 @@ void LLPanelPlaces::createTabs()
|
|||
LLTeleportHistoryPanel* teleport_history_panel = new LLTeleportHistoryPanel();
|
||||
if (teleport_history_panel)
|
||||
{
|
||||
// <FS:Ansariel> FIRE-31033: Keep Teleport/Map/Profile buttons on places floater
|
||||
teleport_history_panel->setPanelPlacesButtons(this);
|
||||
|
||||
mTabContainer->addTabPanel(
|
||||
LLTabContainer::TabPanelParams().
|
||||
panel(teleport_history_panel).
|
||||
|
|
@ -1369,12 +1393,17 @@ void LLPanelPlaces::updateVerbs()
|
|||
mSaveBtn->setVisible(isLandmarkEditModeOn);
|
||||
mCancelBtn->setVisible(isLandmarkEditModeOn);
|
||||
mCloseBtn->setVisible(is_create_landmark_visible && !isLandmarkEditModeOn);
|
||||
// <FS:Ansariel> FIRE-31033: Keep Teleport/Map/Profile buttons on places floater
|
||||
mPlaceInfoBtn->setVisible(!is_place_info_visible && !is_create_landmark_visible && !isLandmarkEditModeOn && !is_pick_panel_visible);
|
||||
|
||||
bool show_options_btn = is_place_info_visible && !is_create_landmark_visible && !isLandmarkEditModeOn;
|
||||
mOverflowBtn->setVisible(show_options_btn);
|
||||
getChild<LLLayoutPanel>("lp_options")->setVisible(show_options_btn);
|
||||
getChild<LLLayoutPanel>("lp2")->setVisible(!show_options_btn);
|
||||
|
||||
// <FS:Ansariel> FIRE-31033: Keep Teleport/Map/Profile buttons on places floater
|
||||
mPlaceInfoBtn->setEnabled(!is_create_landmark_visible && !isLandmarkEditModeOn && have_3d_pos);
|
||||
|
||||
if (is_place_info_visible)
|
||||
{
|
||||
mShowOnMapBtn->setEnabled(have_3d_pos);
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@ private:
|
|||
bool onOverflowMenuItemEnable(const LLSD& param);
|
||||
void onCreateLandmarkButtonClicked(const LLUUID& folder_id);
|
||||
void onBackButtonClicked();
|
||||
void onProfileButtonClicked(); // <FS:Ansariel> FIRE-31033: Keep Teleport/Map/Profile buttons on places floater
|
||||
void onGearMenuClick();
|
||||
void onSortingMenuClick();
|
||||
void onAddMenuClick();
|
||||
|
|
@ -140,6 +141,7 @@ private:
|
|||
LLButton* mCancelBtn;
|
||||
LLButton* mCloseBtn;
|
||||
LLMenuButton* mOverflowBtn;
|
||||
LLButton* mPlaceInfoBtn; // <FS:Ansariel> FIRE-31033: Keep Teleport/Map/Profile buttons on places floater
|
||||
|
||||
// Top menu
|
||||
LLMenuButton* mGearMenuButton;
|
||||
|
|
|
|||
|
|
@ -48,6 +48,15 @@ bool LLPanelPlacesTab::isTabVisible()
|
|||
return true;
|
||||
}
|
||||
|
||||
// <FS:Ansariel> FIRE-31033: Keep Teleport/Map/Profile buttons on places floater
|
||||
void LLPanelPlacesTab::setPanelPlacesButtons(LLPanelPlaces* panel)
|
||||
{
|
||||
mTeleportBtn = panel->getChild<LLButton>("teleport_btn");
|
||||
mShowOnMapBtn = panel->getChild<LLButton>("map_btn");
|
||||
mShowProfile = panel->getChild<LLButton>("profile_btn");
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
void LLPanelPlacesTab::onRegionResponse(const LLVector3d& landmark_global_pos,
|
||||
U64 region_handle,
|
||||
const std::string& url,
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ public:
|
|||
|
||||
bool isTabVisible(); // Check if parent TabContainer is visible.
|
||||
|
||||
void setPanelPlacesButtons(LLPanelPlaces* panel); // <FS:Ansariel> FIRE-31033: Keep Teleport/Map/Profile buttons on places floater
|
||||
void onRegionResponse(const LLVector3d& landmark_global_pos,
|
||||
U64 region_handle,
|
||||
const std::string& url,
|
||||
|
|
@ -70,6 +71,12 @@ public:
|
|||
void setRemoveBtn(LLButton* trash_btn) { sRemoveBtn = trash_btn; }
|
||||
|
||||
protected:
|
||||
// <FS:Ansariel> FIRE-31033: Keep Teleport/Map/Profile buttons on places floater
|
||||
LLButton* mTeleportBtn;
|
||||
LLButton* mShowOnMapBtn;
|
||||
LLButton* mShowProfile;
|
||||
// </FS:Ansariel>
|
||||
|
||||
// Search string for filtering landmarks and teleport history locations
|
||||
static std::string sFilterSubString;
|
||||
static LLButton* sRemoveBtn;
|
||||
|
|
|
|||
|
|
@ -661,6 +661,22 @@ void LLTeleportHistoryPanel::updateVerbs()
|
|||
{
|
||||
sRemoveBtn->setEnabled(true);
|
||||
}
|
||||
|
||||
// <FS:Ansariel> FIRE-31033: Keep Teleport/Map/Profile buttons on places floater
|
||||
if (!mLastSelectedFlatlList)
|
||||
{
|
||||
mTeleportBtn->setEnabled(false);
|
||||
mShowProfile->setEnabled(false);
|
||||
mShowOnMapBtn->setEnabled(false);
|
||||
return;
|
||||
}
|
||||
|
||||
LLTeleportHistoryFlatItem* itemp = dynamic_cast<LLTeleportHistoryFlatItem *> (mLastSelectedFlatlList->getSelectedItem());
|
||||
|
||||
mTeleportBtn->setEnabled(NULL != itemp);
|
||||
mShowProfile->setEnabled(NULL != itemp);
|
||||
mShowOnMapBtn->setEnabled(NULL != itemp);
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
|
||||
// virtual
|
||||
|
|
|
|||
|
|
@ -3,4 +3,21 @@
|
|||
<filter_editor label="Teleport-Liste filtern" name="Filter"/>
|
||||
<menu_button tool_tip="Optionen anzeigen" name="options_gear_btn"/>
|
||||
<menu_button tool_tip="Sortieroptionen anzeigen" name="sorting_menu_btn"/>
|
||||
<panel name="button_panel">
|
||||
<layout_stack name="bottom_bar_ls0">
|
||||
<layout_panel name="show_lm_panel">
|
||||
<layout_stack name="bottom_bar_ls1">
|
||||
<layout_panel name="teleport_btn_lp">
|
||||
<button label="Teleportieren" name="teleport_btn" tool_tip="Zu ausgewähltem Standort teleportieren"/>
|
||||
</layout_panel>
|
||||
<layout_panel name="chat_btn_lp">
|
||||
<button label="Karte" name="map_btn" tool_tip="Den entsprechenden Standort auf der Karte anzeigen"/>
|
||||
</layout_panel>
|
||||
<layout_panel name="chat_btn_lp">
|
||||
<button label="Profil" name="profile_btn" tool_tip="Ortsprofil anzeigen"/>
|
||||
</layout_panel>
|
||||
</layout_stack>
|
||||
</layout_panel>
|
||||
</layout_stack>
|
||||
</panel>
|
||||
</floater>
|
||||
|
|
|
|||
|
|
@ -42,6 +42,11 @@
|
|||
<menu_button name="overflow_btn" tool_tip="Zusätzliche Optionen anzeigen"/>
|
||||
</layout_panel>
|
||||
<layout_panel name="lp2">
|
||||
<layout_stack name="bottom_bar_profile_ls">
|
||||
<layout_panel name="profile_btn_lp">
|
||||
<button label="Profil" name="profile_btn" tool_tip="Ortsprofil anzeigen"/>
|
||||
</layout_panel>
|
||||
</layout_stack>
|
||||
<layout_stack name="bottom_bar_close_ls3">
|
||||
<layout_panel name="close_btn_lp">
|
||||
<button label="Schließen" name="close_btn"/>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
positioning="centered"
|
||||
legacy_header_height="18"
|
||||
can_resize="true"
|
||||
height="435"
|
||||
height="475"
|
||||
layout="topleft"
|
||||
name="floater_tphistory"
|
||||
help_topic="floater_tphistory"
|
||||
|
|
@ -62,4 +62,110 @@
|
|||
name="history_placeholder"
|
||||
layout="topleft"
|
||||
follows="all"/>
|
||||
|
||||
<panel
|
||||
top="448"
|
||||
follows="bottom|left|right"
|
||||
height="23"
|
||||
layout="topleft"
|
||||
left="0"
|
||||
name="button_panel"
|
||||
width="309">
|
||||
<layout_stack
|
||||
follows="bottom|left|right"
|
||||
height="23"
|
||||
layout="topleft"
|
||||
mouse_opaque="false"
|
||||
name="bottom_bar_ls0"
|
||||
left="4"
|
||||
orientation="horizontal"
|
||||
top="0"
|
||||
width="309">
|
||||
|
||||
<layout_panel
|
||||
follows="bottom|left|right"
|
||||
height="23"
|
||||
layout="bottomleft"
|
||||
left="0"
|
||||
mouse_opaque="false"
|
||||
name="show_lm_panel"
|
||||
auto_resize="true"
|
||||
width="188">
|
||||
|
||||
<layout_stack
|
||||
follows="bottom|left|right"
|
||||
height="23"
|
||||
layout="topleft"
|
||||
mouse_opaque="false"
|
||||
name="bottom_bar_ls1"
|
||||
left="0"
|
||||
orientation="horizontal"
|
||||
top="0"
|
||||
width="188">
|
||||
<layout_panel
|
||||
follows="bottom|left|right"
|
||||
height="23"
|
||||
layout="bottomleft"
|
||||
left="0"
|
||||
mouse_opaque="false"
|
||||
name="teleport_btn_lp"
|
||||
auto_resize="true"
|
||||
width="109">
|
||||
<button
|
||||
follows="bottom|left|right"
|
||||
height="23"
|
||||
label="Teleport"
|
||||
layout="topleft"
|
||||
left="1"
|
||||
name="teleport_btn"
|
||||
tool_tip="Teleport to the selected area"
|
||||
top="0"
|
||||
width="108" />
|
||||
</layout_panel>
|
||||
|
||||
<layout_panel
|
||||
follows="bottom|left|right"
|
||||
height="23"
|
||||
layout="bottomleft"
|
||||
left_pad="3"
|
||||
mouse_opaque="false"
|
||||
name="chat_btn_lp"
|
||||
auto_resize="true"
|
||||
width="83">
|
||||
<button
|
||||
follows="bottom|left|right"
|
||||
height="23"
|
||||
label="Map"
|
||||
layout="topleft"
|
||||
left="1"
|
||||
name="map_btn"
|
||||
tool_tip="Show the corresponding area on the World Map"
|
||||
top="0"
|
||||
width="82"/>
|
||||
</layout_panel>
|
||||
|
||||
<layout_panel
|
||||
follows="bottom|left|right"
|
||||
height="23"
|
||||
layout="bottomleft"
|
||||
left_pad="3"
|
||||
mouse_opaque="false"
|
||||
name="chat_btn_lp"
|
||||
auto_resize="true"
|
||||
width="83">
|
||||
<button
|
||||
follows="bottom|left|right"
|
||||
height="23"
|
||||
label="Show Profile"
|
||||
layout="topleft"
|
||||
left="1"
|
||||
name="profile_btn"
|
||||
tool_tip="Show the profile of this location"
|
||||
top="0"
|
||||
width="82" />
|
||||
</layout_panel>
|
||||
</layout_stack>
|
||||
</layout_panel>
|
||||
</layout_stack>
|
||||
</panel>
|
||||
</floater>
|
||||
|
|
|
|||
|
|
@ -318,6 +318,41 @@
|
|||
name="lp2"
|
||||
auto_resize="true"
|
||||
width="116">
|
||||
|
||||
<!--*********************** Profile button ***********************-->
|
||||
|
||||
<layout_stack
|
||||
follows="bottom|left|right"
|
||||
height="23"
|
||||
layout="topleft"
|
||||
mouse_opaque="false"
|
||||
name="bottom_bar_profile_ls"
|
||||
left="0"
|
||||
orientation="horizontal"
|
||||
top="0"
|
||||
width="110">
|
||||
<layout_panel
|
||||
follows="bottom|left|right"
|
||||
height="23"
|
||||
layout="bottomleft"
|
||||
left_pad="3"
|
||||
mouse_opaque="false"
|
||||
name="profile_btn_lp"
|
||||
auto_resize="true"
|
||||
width="102">
|
||||
<button
|
||||
follows="bottom|left|right"
|
||||
height="23"
|
||||
label="Profile"
|
||||
layout="topleft"
|
||||
mouse_opaque="false"
|
||||
name="profile_btn"
|
||||
left="1"
|
||||
tool_tip="Show place profile"
|
||||
top="0"
|
||||
width="101" />
|
||||
</layout_panel>
|
||||
</layout_stack>
|
||||
|
||||
<!--*********************** Close button ***********************-->
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue