summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-02-13 12:33:56 +0000
committerTofu Linden <tofu.linden@lindenlab.com>2010-02-13 12:33:56 +0000
commitbcbd12f7b1fd091284ac782eff63d4a18887a8e3 (patch)
treed1618dcf805c4fa1b32c042b1b9b0e90d4d3790a /indra/newview
parent3b8463f0fd5f0b2cd54840c34a7a7e303954f768 (diff)
parente890055da3a4635af1a033411e83a96b14aa6f99 (diff)
PE merge.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llpanellandmarks.cpp53
-rw-r--r--indra/newview/llpanellandmarks.h2
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml16
3 files changed, 62 insertions, 9 deletions
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp
index f1cb6e87a3..40ea75ea7a 100644
--- a/indra/newview/llpanellandmarks.cpp
+++ b/indra/newview/llpanellandmarks.cpp
@@ -111,25 +111,76 @@ void LLCheckFolderState::doFolder(LLFolderViewFolder* folder)
}
}
+// Functor searching and opening a folder specified by UUID
+// in a folder view tree.
+class LLOpenFolderByID : public LLFolderViewFunctor
+{
+public:
+ LLOpenFolderByID(const LLUUID& folder_id)
+ : mFolderID(folder_id)
+ , mIsFolderOpen(false)
+ {}
+ virtual ~LLOpenFolderByID() {}
+ /*virtual*/ void doFolder(LLFolderViewFolder* folder);
+ /*virtual*/ void doItem(LLFolderViewItem* item) {}
+
+ bool isFolderOpen() { return mIsFolderOpen; }
+
+private:
+ bool mIsFolderOpen;
+ LLUUID mFolderID;
+};
+
+// virtual
+void LLOpenFolderByID::doFolder(LLFolderViewFolder* folder)
+{
+ if (folder->getListener() && folder->getListener()->getUUID() == mFolderID)
+ {
+ if (!folder->isOpen())
+ {
+ folder->setOpen(TRUE);
+ mIsFolderOpen = true;
+ }
+ }
+}
+
/**
* Bridge to support knowing when the inventory has changed to update Landmarks tab
* ShowFolderState filter setting to show all folders when the filter string is empty and
* empty folder message when Landmarks inventory category has no children.
+ * Ensures that "Landmarks" folder in the Library is open on strart up.
*/
class LLLandmarksPanelObserver : public LLInventoryObserver
{
public:
- LLLandmarksPanelObserver(LLLandmarksPanel* lp) : mLP(lp) {}
+ LLLandmarksPanelObserver(LLLandmarksPanel* lp)
+ : mLP(lp),
+ mIsLibraryLandmarksOpen(false)
+ {}
virtual ~LLLandmarksPanelObserver() {}
/*virtual*/ void changed(U32 mask);
private:
LLLandmarksPanel* mLP;
+ bool mIsLibraryLandmarksOpen;
};
void LLLandmarksPanelObserver::changed(U32 mask)
{
mLP->updateShowFolderState();
+
+ LLPlacesInventoryPanel* library = mLP->getLibraryInventoryPanel();
+ if (!mIsLibraryLandmarksOpen && library)
+ {
+ // Search for "Landmarks" folder in the Library and open it once on start up. See EXT-4827.
+ const LLUUID &landmarks_cat = gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK, false, true);
+ if (landmarks_cat.notNull())
+ {
+ LLOpenFolderByID opener(landmarks_cat);
+ library->getRootFolder()->applyFunctorRecursively(opener);
+ mIsLibraryLandmarksOpen = opener.isFolderOpen();
+ }
+ }
}
LLLandmarksPanel::LLLandmarksPanel()
diff --git a/indra/newview/llpanellandmarks.h b/indra/newview/llpanellandmarks.h
index cbbd10ac26..6358bd6f23 100644
--- a/indra/newview/llpanellandmarks.h
+++ b/indra/newview/llpanellandmarks.h
@@ -78,6 +78,8 @@ public:
*/
void setItemSelected(const LLUUID& obj_id, BOOL take_keyboard_focus);
+ LLPlacesInventoryPanel* getLibraryInventoryPanel() { return mLibraryInventoryPanel; }
+
protected:
/**
* @return true - if current selected panel is not null and selected item is a landmark
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 51f0f6839c..0fbd860648 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -19,7 +19,7 @@
<button
default="true"
index="0"
- name="OK"
+ name="OK_okbutton"
text="$yestext"/>
</form>
</template>
@@ -29,7 +29,7 @@
<button
default="true"
index="0"
- name="OK"
+ name="OK_okignore"
text="$yestext"/>
<ignore text="$ignoretext"/>
</form>
@@ -40,11 +40,11 @@
<button
default="true"
index="0"
- name="OK"
+ name="OK_okcancelbuttons"
text="$yestext"/>
<button
index="1"
- name="Cancel"
+ name="Cancel_okcancelbuttons"
text="$notext"/>
</form>
</template>
@@ -54,11 +54,11 @@
<button
default="true"
index="0"
- name="OK"
+ name="OK_okcancelignore"
text="$yestext"/>
<button
index="1"
- name="Cancel"
+ name="Cancel_okcancelignore"
text="$notext"/>
<ignore text="$ignoretext"/>
</form>
@@ -69,7 +69,7 @@
<button
default="true"
index="0"
- name="OK"
+ name="OK_okhelpbuttons"
text="$yestext"/>
<button
index="1"
@@ -91,7 +91,7 @@
text="$notext"/>
<button
index="2"
- name="Cancel"
+ name="Cancel_yesnocancelbuttons"
text="$canceltext"/>
</form>
</template>