summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llui/llfolderviewitem.cpp9
-rw-r--r--indra/llui/llfolderviewmodel.h2
-rw-r--r--indra/newview/app_settings/settings.xml6
-rw-r--r--indra/newview/llconversationmodel.h2
-rw-r--r--indra/newview/llinventorybridge.cpp24
-rw-r--r--indra/newview/llinventorybridge.h2
-rw-r--r--indra/newview/llinventorypanel.cpp18
-rw-r--r--indra/newview/llinventorypanel.h2
-rw-r--r--indra/newview/llpanelmaininventory.cpp7
-rw-r--r--indra/newview/llpanelmaininventory.h2
-rw-r--r--indra/newview/llpanelobjectinventory.cpp2
-rw-r--r--indra/newview/skins/default/xui/en/floater_inventory_settings.xml28
12 files changed, 70 insertions, 34 deletions
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp
index 4a9ac56d9f..6ddbf26639 100644
--- a/indra/llui/llfolderviewitem.cpp
+++ b/indra/llui/llfolderviewitem.cpp
@@ -2077,12 +2077,17 @@ BOOL LLFolderViewFolder::handleDoubleClick( S32 x, S32 y, MASK mask )
}
if( !handled )
{
- static LLUICachedControl<bool> double_click_new_window("MultiModeDoubleClickOpenWindow", false);
- if (double_click_new_window)
+ static LLUICachedControl<U32> double_click_action("MultiModeDoubleClickFolder", false);
+ if (double_click_action == 1)
{
getViewModelItem()->navigateToFolder(true);
return TRUE;
}
+ if (double_click_action == 2)
+ {
+ getViewModelItem()->navigateToFolder(false, true);
+ return TRUE;
+ }
if(mIndentation < x && x < mIndentation + (isCollapsed() ? 0 : mArrowSize) + mTextPad)
{
// don't select when user double-clicks plus sign
diff --git a/indra/llui/llfolderviewmodel.h b/indra/llui/llfolderviewmodel.h
index b1db9489fd..b5a765fab3 100644
--- a/indra/llui/llfolderviewmodel.h
+++ b/indra/llui/llfolderviewmodel.h
@@ -160,7 +160,7 @@ public:
virtual void closeItem( void ) = 0;
virtual void selectItem(void) = 0;
- virtual void navigateToFolder(bool new_window = false) = 0;
+ virtual void navigateToFolder(bool new_window = false, bool change_mode = false) = 0;
virtual BOOL isItemWearable() const { return FALSE; }
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 3a896b4f5f..23521351ca 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -16909,14 +16909,14 @@
<key>Value</key>
<integer>0</integer>
</map>
-<key>MultiModeDoubleClickOpenWindow</key>
+<key>MultiModeDoubleClickFolder</key>
<map>
<key>Comment</key>
- <string>Sets the action for Double-click on folder in multi-folder view (0 - expands and collapses folder, 1 - opens a new window)</string>
+ <string>Sets the action for Double-click on folder in multi-folder view (0 - expands and collapses folder, 1 - opens a new window, 2 – stays in current floater but switches to SFV)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
- <string>Boolean</string>
+ <string>U32</string>
<key>Value</key>
<integer>0</integer>
</map>
diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h
index c7da060f33..22d2d60905 100644
--- a/indra/newview/llconversationmodel.h
+++ b/indra/newview/llconversationmodel.h
@@ -111,7 +111,7 @@ public:
virtual void previewItem( void );
virtual void selectItem(void) { }
virtual void showProperties(void);
- virtual void navigateToFolder(bool new_window = false) {}
+ virtual void navigateToFolder(bool new_window = false, bool change_mode = false) {}
// Methods used in sorting (see LLConversationSort::operator())
EConversationType const getType() const { return mConvType; }
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index f7b7a6635e..5f1db0895c 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -413,7 +413,7 @@ void LLInvFVBridge::showProperties()
}
}
-void LLInvFVBridge::navigateToFolder(bool new_window)
+void LLInvFVBridge::navigateToFolder(bool new_window, bool change_mode)
{
if(new_window)
{
@@ -421,21 +421,21 @@ void LLInvFVBridge::navigateToFolder(bool new_window)
}
else
{
- LLInventorySingleFolderPanel* panel = dynamic_cast<LLInventorySingleFolderPanel*>(mInventoryPanel.get());
- if (!panel)
+ if(change_mode)
{
- return;
- }
- LLInventoryModel* model = getInventoryModel();
- if (!model)
- {
- return;
+ LLInventoryPanel::setSFViewAndOpenFolder(mInventoryPanel.get(), mUUID);
}
- if (mUUID.isNull())
+ else
{
- return;
+ LLInventorySingleFolderPanel* panel = dynamic_cast<LLInventorySingleFolderPanel*>(mInventoryPanel.get());
+ if (!panel || !getInventoryModel() || mUUID.isNull())
+ {
+ return;
+ }
+
+ panel->changeFolderRoot(mUUID);
}
- panel->changeFolderRoot(mUUID);
+
}
}
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h
index b2cc33aadd..958d284854 100644
--- a/indra/newview/llinventorybridge.h
+++ b/indra/newview/llinventorybridge.h
@@ -107,7 +107,7 @@ public:
virtual std::string getLabelSuffix() const { return LLStringUtil::null; }
virtual void openItem() {}
virtual void closeItem() {}
- virtual void navigateToFolder(bool new_window = false);
+ virtual void navigateToFolder(bool new_window = false, bool change_mode = false);
virtual void showProperties();
virtual BOOL isItemRenameable() const { return TRUE; }
virtual BOOL isMultiPreviewAllowed() { return TRUE; }
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 77588c8716..82f791a171 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -1831,6 +1831,24 @@ void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const L
}
}
+void LLInventoryPanel::setSFViewAndOpenFolder(const LLInventoryPanel* panel, const LLUUID& folder_id)
+{
+
+ LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("inventory");
+ for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin(); iter != inst_list.end(); ++iter)
+ {
+ LLFloaterSidePanelContainer* inventory_floater = dynamic_cast<LLFloaterSidePanelContainer*>(*iter);
+ LLSidepanelInventory* sidepanel_inventory = inventory_floater->findChild<LLSidepanelInventory>("main_panel");
+
+ LLPanelMainInventory* main_inventory = sidepanel_inventory->getMainInventoryPanel();
+ if (main_inventory && panel->hasAncestor(main_inventory) && !main_inventory->isSingleFolderMode())
+ {
+ main_inventory->onViewModeClick();
+ main_inventory->setSingleFolderViewRoot(folder_id, false);
+ }
+ }
+}
+
void LLInventoryPanel::addHideFolderType(LLFolderType::EType folder_type)
{
getFilter().setFilterCategoryTypes(getFilter().getFilterCategoryTypes() & ~(1ULL << folder_type));
diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h
index baaefe5dd7..e9eaaa232d 100644
--- a/indra/newview/llinventorypanel.h
+++ b/indra/newview/llinventorypanel.h
@@ -246,7 +246,7 @@ public:
BOOL main_panel = FALSE,
BOOL take_keyboard_focus = TAKE_FOCUS_YES,
BOOL reset_filter = FALSE);
-
+ static void setSFViewAndOpenFolder(const LLInventoryPanel* panel, const LLUUID& folder_id);
void addItemID(const LLUUID& id, LLFolderViewItem* itemp);
void removeItemID(const LLUUID& id);
LLFolderViewItem* getItemByID(const LLUUID& id);
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 0fd4eb0c15..5da53cc928 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -1321,10 +1321,13 @@ void LLPanelMainInventory::onForwardFolderClicked()
mSingleFolderPanelInventory->onForwardFolder();
}
-void LLPanelMainInventory::setSingleFolderViewRoot(const LLUUID& folder_id)
+void LLPanelMainInventory::setSingleFolderViewRoot(const LLUUID& folder_id, bool clear_nav_history)
{
mSingleFolderPanelInventory->changeFolderRoot(folder_id);
- mSingleFolderPanelInventory->clearNavigationHistory();
+ if(clear_nav_history)
+ {
+ mSingleFolderPanelInventory->clearNavigationHistory();
+ }
}
void LLPanelMainInventory::showActionMenu(LLMenuGL* menu, std::string spawning_view_name)
diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h
index 85373d7de3..6382f44bc9 100644
--- a/indra/newview/llpanelmaininventory.h
+++ b/indra/newview/llpanelmaininventory.h
@@ -103,7 +103,7 @@ public:
void onUpFolderClicked();
void onBackFolderClicked();
void onForwardFolderClicked();
- void setSingleFolderViewRoot(const LLUUID& folder_id);
+ void setSingleFolderViewRoot(const LLUUID& folder_id, bool clear_nav_history = true);
bool isSingleFolderMode() { return mSingleFolderMode; }
protected:
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index c22915c3ab..1348996136 100644
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -125,7 +125,7 @@ public:
virtual BOOL canOpenItem() const { return FALSE; }
virtual void closeItem() {}
virtual void selectItem() {}
- virtual void navigateToFolder(bool new_window = false) {}
+ virtual void navigateToFolder(bool new_window = false, bool change_mode = false) {}
virtual BOOL isItemRenameable() const;
virtual BOOL renameItem(const std::string& new_name);
virtual BOOL isItemMovable() const;
diff --git a/indra/newview/skins/default/xui/en/floater_inventory_settings.xml b/indra/newview/skins/default/xui/en/floater_inventory_settings.xml
index c3e81a5523..bfac79ac46 100644
--- a/indra/newview/skins/default/xui/en/floater_inventory_settings.xml
+++ b/indra/newview/skins/default/xui/en/floater_inventory_settings.xml
@@ -4,10 +4,10 @@
can_minimize="true"
can_resize="false"
save_rect="true"
- height="350"
+ height="370"
width="370"
name="inventory_settings"
- title="Inventory settings">
+ title="INVENTORY SETTINGS">
<icon
follows="top|left"
height="18"
@@ -33,14 +33,14 @@
Double-click on folder in multi-folder view:
</text>
<radio_group
- control_name="MultiModeDoubleClickOpenWindow"
+ control_name="MultiModeDoubleClickFolder"
follows="left|top"
top_pad="8"
layout="topleft"
font="SansSerifMedium"
left="60"
- width="325"
- height="45"
+ width="300"
+ height="70"
name="multi_double_click_setting">
<radio_item
height="20"
@@ -48,7 +48,7 @@
label_text.text_color="White"
follows="left|top"
layout="topleft"
- name="false"
+ name="0"
width="200"/>
<radio_item
height="20"
@@ -57,7 +57,17 @@
label_text.text_color="White"
layout="topleft"
left_delta="0"
- name="true"
+ name="1"
+ top_pad ="5"
+ width="200" />
+ <radio_item
+ height="20"
+ follows="left|top"
+ label="Switch view"
+ label_text.text_color="White"
+ layout="topleft"
+ left_delta="0"
+ name="2"
top_pad ="5"
width="200" />
</radio_group>
@@ -92,7 +102,7 @@
layout="topleft"
font="SansSerifMedium"
left="60"
- width="325"
+ width="300"
height="45"
name="single_double_click_setting">
<radio_item
@@ -135,7 +145,7 @@
layout="topleft"
font="SansSerifMedium"
left="60"
- width="325"
+ width="300"
height="45"
name="find_original_settings">
<radio_item