mirror of
https://github.com/FirestormViewer/phoenix-firestorm.git
synced 2026-08-14 08:53:53 +00:00
Fix more issues with LL's legacy search:
* Remember last selected tab across sessions * Searching for groups via groups panel in contacts always opening FS legacy search
This commit is contained in:
@@ -106,6 +106,11 @@ bool LLFloaterDirectory::postBuild()
|
||||
});
|
||||
mDirectoryTabs = getChild<LLTabContainer>("Directory Tabs");
|
||||
mDirectoryTabs->setCommitCallback([&](LLUICtrl*, const LLSD&) { updateProfileButtonVisibility(); });
|
||||
|
||||
if (!mDirectoryTabs->selectTab(gSavedSettings.getS32("FSLastSearchTab")))
|
||||
{
|
||||
mDirectoryTabs->selectFirstTab();
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
// <FS:TJ> Always navigate if the SearchURL has changed
|
||||
@@ -120,6 +125,12 @@ void LLFloaterDirectory::onOpen(const LLSD& key)
|
||||
{
|
||||
LLFloater::onOpen(key);
|
||||
|
||||
if (key.has("tab") && key["tab"].asString() == "groups")
|
||||
{
|
||||
mDirectoryTabs->selectTabByName("panel_dir_groups");
|
||||
return;
|
||||
}
|
||||
|
||||
// <FS:TJ> Always navigate if the SearchURL has changed
|
||||
std::string search_url = LFSimFeatureHandler::instance().searchURL();
|
||||
if (search_url.empty())
|
||||
@@ -148,6 +159,16 @@ void LLFloaterDirectory::onOpen(const LLSD& key)
|
||||
}
|
||||
// </FS:PP>
|
||||
|
||||
// <FS:Ansariel> Remember last selected tab across sessions
|
||||
void LLFloaterDirectory::onClose(bool app_quitting)
|
||||
{
|
||||
if (mDirectoryTabs)
|
||||
{
|
||||
gSavedSettings.setS32("FSLastSearchTab", mDirectoryTabs->getCurrentPanelIndex());
|
||||
}
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
void LLFloaterDirectory::hideAllDetailPanels()
|
||||
{
|
||||
if (mPanelAvatarp) mPanelAvatarp->setVisible(false);
|
||||
|
||||
@@ -68,6 +68,7 @@ public:
|
||||
|
||||
bool postBuild() override;
|
||||
void onOpen(const LLSD& key) override; // <FS:PP> FIRE-36483 Menu, navbar and toolbar button must open the same search window
|
||||
void onClose(bool app_quitting) override; // <FS:Ansariel> Remember last selected tab across sessions
|
||||
|
||||
void updateProfileButtonVisibility(); // <FS:Ansariel> Add "open profile" button
|
||||
|
||||
|
||||
@@ -263,7 +263,7 @@ void LLGroupActions::search()
|
||||
{
|
||||
// <FS:Ansariel> Open groups search panel instead of invoking presumed failed websearch
|
||||
//LLFloaterReg::showInstance("search", LLSD().with("collection", "groups"));
|
||||
LLFloaterReg::showInstance("search", LLSD().with("tab", "groups"));
|
||||
LLFloaterReg::showInstance((gSavedSettings.getBOOL("FSUseFSLegacySearch") ? "search" : "legacy_search"), LLSD().with("tab", "groups"));
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user