summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/CMakeLists.txt261
-rw-r--r--indra/newview/app_settings/settings.xml4
-rw-r--r--indra/newview/llappearancemgr.cpp55
-rw-r--r--indra/newview/llfloatersearch.cpp7
-rw-r--r--indra/newview/llfolderview.cpp20
-rw-r--r--indra/newview/llfolderview.h1
-rw-r--r--indra/newview/llinventorybridge.cpp13
-rw-r--r--indra/newview/llinventoryobserver.h1
-rw-r--r--indra/newview/llinventorypanel.cpp24
-rw-r--r--indra/newview/llpaneloutfitsinventory.cpp53
-rw-r--r--indra/newview/llpaneloutfitsinventory.h19
-rw-r--r--indra/newview/llpanelpicks.cpp85
-rw-r--r--indra/newview/llpanelpicks.h7
-rw-r--r--indra/newview/llpanelprofile.cpp28
-rw-r--r--indra/newview/llsidepanelappearance.cpp14
-rw-r--r--indra/newview/llsidepanelappearance.h2
-rw-r--r--indra/newview/llsidepanelinventorysubpanel.cpp4
-rw-r--r--indra/newview/llsidepaneliteminfo.cpp14
-rw-r--r--indra/newview/llsidepaneltaskinfo.cpp246
-rw-r--r--indra/newview/llsidepaneltaskinfo.h36
-rw-r--r--indra/newview/lltexturefetch.cpp2
-rw-r--r--indra/newview/llviewerhome.cpp12
-rw-r--r--indra/newview/llviewermenu.cpp6
-rw-r--r--indra/newview/llvoiceclient.cpp16
-rw-r--r--indra/newview/pipeline.cpp8
-rw-r--r--indra/newview/skins/default/xui/en/panel_outfits_inventory.xml157
-rw-r--r--indra/newview/skins/default/xui/en/sidepanel_appearance.xml76
-rw-r--r--indra/newview/skins/default/xui/en/sidepanel_task_info.xml20
-rwxr-xr-xindra/newview/viewer_manifest.py203
29 files changed, 757 insertions, 637 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 293faa7b70..3ecc35cc8e 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1353,7 +1353,6 @@ add_executable(${VIEWER_BINARY_NAME}
MACOSX_BUNDLE
${viewer_SOURCE_FILES}
)
-check_message_template(${VIEWER_BINARY_NAME})
if (LLKDU_LIBRARY)
add_dependencies(${VIEWER_BINARY_NAME} ${LLKDU_LIBRARY})
@@ -1390,45 +1389,82 @@ if (WINDOWS)
)
endif(USE_PRECOMPILED_HEADERS)
- # sets the 'working directory' for debugging from visual studio.
- if (NOT UNATTENDED)
- add_custom_command(
- TARGET ${VIEWER_BINARY_NAME} POST_BUILD
- COMMAND ${CMAKE_SOURCE_DIR}/tools/vstool/vstool.exe
- ARGS
- --solution
- ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}.sln
- --workingdir
- ${VIEWER_BINARY_NAME}
- "${CMAKE_CURRENT_SOURCE_DIR}"
- COMMENT "Setting the ${VIEWER_BINARY_NAME} working directory for debugging."
- )
- endif (NOT UNATTENDED)
-
- add_custom_command(
- TARGET ${VIEWER_BINARY_NAME} PRE_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS
- -E
- copy_if_different
- ${CMAKE_CURRENT_SOURCE_DIR}/../../scripts/messages/message_template.msg
- ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/app_settings/message_template.msg
- COMMENT "Copying message_template.msg to the runtime folder."
- )
-
- add_custom_command(
- TARGET ${VIEWER_BINARY_NAME} PRE_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS
- -E
- copy_if_different
- ${CMAKE_CURRENT_SOURCE_DIR}/../../etc/message.xml
- ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/app_settings/message.xml
- COMMENT "Copying message.xml to the runtime folder."
+ # If adding a file to viewer_manifest.py in the WindowsManifest.construct() method, be sure to add the dependency
+ # here.
+ # *NOTE:Mani - This is a crappy hack to have important dependecies for the viewer_manifest copy action
+ # be met. I'm looking forward to a source-code split-up project next year that will address this kind of thing.
+ # In the meantime, if you have any ideas on how to easily maintain one list, either here or in viewer_manifest.py
+ # and have the build deps get tracked *please* tell me about it.
+ set(COPY_INPUT_DEPENDECIES
+ # The following commented dependencies are determined at variably at build time. Can't do this here.
+ #llkdu.dll => llkdu.dll
+ #${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libtcmalloc_minimal.dll => None ... Skipping libtcmalloc_minimal.dll
+ ${CMAKE_SOURCE_DIR}/../etc/message.xml
+ ${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg
+ ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/llcommon.dll
+ ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libapr-1.dll
+ ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libaprutil-1.dll
+ ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libapriconv-1.dll
+ ${SHARED_LIB_STAGING_DIR}/Release/openjpeg.dll
+ ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/openjpeg.dll
+ ${SHARED_LIB_STAGING_DIR}/Debug/openjpegd.dll
+ ${SHARED_LIB_STAGING_DIR}/Release/msvcr80.dll
+ ${SHARED_LIB_STAGING_DIR}/Release/msvcp80.dll
+ ${SHARED_LIB_STAGING_DIR}/Release/Microsoft.VC80.CRT.manifest
+ ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/msvcr80.dll
+ ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/msvcp80.dll
+ ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/Microsoft.VC80.CRT.manifest
+ ${SHARED_LIB_STAGING_DIR}/Debug/msvcr80d.dll
+ ${SHARED_LIB_STAGING_DIR}/Debug/msvcp80d.dll
+ ${SHARED_LIB_STAGING_DIR}/Debug/Microsoft.VC80.DebugCRT.manifest
+ ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/SLVoice.exe
+ ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/vivoxsdk.dll
+ ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/ortp.dll
+ ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libsndfile-1.dll
+ ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/zlib1.dll
+ ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/vivoxplatform.dll
+ ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/vivoxoal.dll
+ ${CMAKE_CURRENT_SOURCE_DIR}/licenses-win32.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/featuretable.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/dbghelp.dll
+ ${CMAKE_CURRENT_SOURCE_DIR}/fmod.dll
+ ${CMAKE_BINARY_DIR}/media_plugins/quicktime/${CMAKE_CFG_INTDIR}/media_plugin_quicktime.dll
+ ${CMAKE_BINARY_DIR}/media_plugins/quicktime/${CMAKE_CFG_INTDIR}/media_plugin_webkit.dll
+ ${ARCH_PREBUILT_DIRS_RELEASE}/libeay32.dll
+ ${ARCH_PREBUILT_DIRS_RELEASE}/qtcore4.dll
+ ${ARCH_PREBUILT_DIRS_RELEASE}/qtgui4.dll
+ ${ARCH_PREBUILT_DIRS_RELEASE}/qtnetwork4.dll
+ ${ARCH_PREBUILT_DIRS_RELEASE}/qtopengl4.dll
+ ${ARCH_PREBUILT_DIRS_RELEASE}/qtwebkit4.dll
+ ${ARCH_PREBUILT_DIRS_RELEASE}/ssleay32.dll
+ ${ARCH_PREBUILT_DIRS_RELEASE}/imageformats/qgif4.dll
+ ${ARCH_PREBUILT_DIRS_RELEASE}/imageformats/qico4.dll
+ ${ARCH_PREBUILT_DIRS_RELEASE}/imageformats/qjpeg4.dll
+ ${ARCH_PREBUILT_DIRS_RELEASE}/imageformats/qmng4.dll
+ ${ARCH_PREBUILT_DIRS_RELEASE}/imageformats/qsvg4.dll
+ ${ARCH_PREBUILT_DIRS_RELEASE}/imageformats/qtiff4.dll
+ ${ARCH_PREBUILT_DIRS_DEBUG}/libeay32.dll
+ ${ARCH_PREBUILT_DIRS_DEBUG}/qtcored4.dll
+ ${ARCH_PREBUILT_DIRS_DEBUG}/qtguid4.dll
+ ${ARCH_PREBUILT_DIRS_DEBUG}/qtnetworkd4.dll
+ ${ARCH_PREBUILT_DIRS_DEBUG}/qtopengld4.dll
+ ${ARCH_PREBUILT_DIRS_DEBUG}/qtwebkitd4.dll
+ ${ARCH_PREBUILT_DIRS_DEBUG}/ssleay32.dll
+ ${ARCH_PREBUILT_DIRS_DEBUG}/imageformats/qgifd4.dll
+ ${ARCH_PREBUILT_DIRS_DEBUG}/imageformats/qicod4.dll
+ ${ARCH_PREBUILT_DIRS_DEBUG}/imageformats/qjpegd4.dll
+ ${ARCH_PREBUILT_DIRS_DEBUG}/imageformats/qmngd4.dll
+ ${ARCH_PREBUILT_DIRS_DEBUG}/imageformats/qsvgd4.dll
+ ${ARCH_PREBUILT_DIRS_DEBUG}/imageformats/qtiffd4.dll
+ SLPlugin
+ media_plugin_quicktime
+ media_plugin_webkit
+ windows-crash-logger
+ windows-updater
)
-
+
add_custom_command(
- TARGET ${VIEWER_BINARY_NAME} POST_BUILD
+ OUTPUT ${CMAKE_CFG_INTDIR}/copy_touched.bat
COMMAND ${PYTHON_EXECUTABLE}
ARGS
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
@@ -1439,11 +1475,17 @@ if (WINDOWS)
--dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
--grid=${GRID}
--source=${CMAKE_CURRENT_SOURCE_DIR}
- DEPENDS ${VIEWER_BINARY_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
+ --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/copy_touched.bat
+ DEPENDS
+ ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
+ stage_third_party_libs
+ ${COPY_INPUT_DEPENDECIES}
COMMENT "Performing viewer_manifest copy"
)
+
+ add_custom_target(copy_w_viewer_manifest ALL DEPENDS ${CMAKE_CFG_INTDIR}/copy_touched.bat)
- add_dependencies(${VIEWER_BINARY_NAME} stage_third_party_libs llcommon)
+ add_dependencies(${VIEWER_BINARY_NAME} stage_third_party_libs llcommon copy_w_viewer_manifest)
if(LLKDU_LIBRARY)
# kdu may not exist!
@@ -1462,6 +1504,21 @@ if (WINDOWS)
windows-crash-logger
)
+ # sets the 'working directory' for debugging from visual studio.
+ if (NOT UNATTENDED)
+ add_custom_command(
+ TARGET ${VIEWER_BINARY_NAME} POST_BUILD
+ COMMAND ${CMAKE_SOURCE_DIR}/tools/vstool/vstool.exe
+ ARGS
+ --solution
+ ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}.sln
+ --workingdir
+ ${VIEWER_BINARY_NAME}
+ "${CMAKE_CURRENT_SOURCE_DIR}"
+ COMMENT "Setting the ${VIEWER_BINARY_NAME} working directory for debugging."
+ )
+ endif (NOT UNATTENDED)
+
if (PACKAGE)
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/event_host.tar.bz2
@@ -1476,7 +1533,7 @@ if (WINDOWS)
${EVENT_HOST_SCRIPTS}
${CMAKE_CURRENT_SOURCE_DIR}/event_host_manifest.py
)
-
+
add_custom_command(
OUTPUT ${CMAKE_CFG_INTDIR}/touched.bat
COMMAND ${PYTHON_EXECUTABLE}
@@ -1499,6 +1556,8 @@ if (WINDOWS)
# sorted out on the parabuild cluster...
#${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/event_host.tar.bz2)
+ check_message_template(package)
+
endif (PACKAGE)
endif (WINDOWS)
@@ -1580,6 +1639,7 @@ if (LINUX)
add_custom_target(package ALL DEPENDS ${product}.tar.bz2)
add_dependencies(package linux-crash-logger-strip-target)
add_dependencies(package linux-updater-strip-target)
+ check_message_template(package)
endif (NOT INSTALL)
endif (LINUX)
@@ -1618,6 +1678,7 @@ if (DARWIN)
if (PACKAGE)
add_custom_target(package ALL DEPENDS ${VIEWER_BINARY_NAME})
+ check_message_template(package)
add_dependencies(package mac-updater mac-crash-logger)
add_custom_command(
@@ -1721,121 +1782,3 @@ if (LL_TESTS)
endif (LL_TESTS)
-# Don't do these for DARWIN or LINUX here -- they're taken care of by viewer_manifest.py
-if (WINDOWS)
- add_custom_command(
- TARGET ${VIEWER_BINARY_NAME} POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS
- -E
- make_directory
- ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/llplugin
- COMMENT "Creating llplugin dir."
- )
-
- get_target_property(BUILT_SLPLUGIN SLPlugin LOCATION)
- add_custom_command(
- TARGET ${VIEWER_BINARY_NAME} POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS
- -E
- copy_if_different
- ${BUILT_SLPLUGIN}
- ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
- COMMENT "Copying SLPlugin executable to the runtime folder."
- )
-
- get_target_property(BUILT_WEBKIT_PLUGIN media_plugin_webkit LOCATION)
- add_custom_command(
- TARGET ${VIEWER_BINARY_NAME} POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS
- -E
- copy_if_different
- ${BUILT_WEBKIT_PLUGIN}
- ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/llplugin
- COMMENT "Copying WebKit Plugin to the runtime folder."
- )
-
- get_target_property(BUILT_QUICKTIME_PLUGIN media_plugin_quicktime LOCATION)
- add_custom_command(
- TARGET ${VIEWER_BINARY_NAME} POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS
- -E
- copy_if_different
- ${BUILT_QUICKTIME_PLUGIN}
- ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/llplugin
- COMMENT "Copying Quicktime Plugin to the runtime folder."
- )
-
- #*******************************
- # Copy media plugin support dlls
- # Debug config runtime files required for the plugins
- set(plugins_debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug")
- set(plugins_debug_files
- libeay32.dll
- qtcored4.dll
- qtguid4.dll
- qtnetworkd4.dll
- qtopengld4.dll
- qtwebkitd4.dll
- qtxmlpatternsd4.dll
- ssleay32.dll
- )
- copy_if_different(
- ${plugins_debug_src_dir}
- "${CMAKE_CURRENT_BINARY_DIR}/Debug/llplugin"
- out_targets
- ${plugins_debug_files}
- )
- set(media_plugin_targets ${media_plugin_targets} ${out_targets})
-
- # Release & ReleaseDebInfo config runtime files required for the plugins
- set(plugins_release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release")
- set(plugins_release_files
- libeay32.dll
- qtcore4.dll
- qtgui4.dll
- qtnetwork4.dll
- qtopengl4.dll
- qtwebkit4.dll
- qtxmlpatterns4.dll
- ssleay32.dll
- )
- copy_if_different(
- ${plugins_release_src_dir}
- "${CMAKE_CURRENT_BINARY_DIR}/Release/llplugin"
- out_targets
- ${plugins_release_files}
- )
- set(media_plugin_targets ${media_plugin_targets} ${out_targets})
-
- copy_if_different(
- ${plugins_release_src_dir}
- "${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/llplugin"
- out_targets
- ${plugins_release_files}
- )
- set(media_plugin_targets ${media_plugin_targets} ${out_targets})
-
- add_custom_target(copy_media_plugin_libs ALL
- DEPENDS
- ${media_plugin_targets}
- )
-
- add_custom_command(
- TARGET ${VIEWER_BINARY_NAME} POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS
- -E
- copy_directory
- ${CMAKE_BINARY_DIR}/test_apps/llplugintest/${CMAKE_CFG_INTDIR}/imageformats
- ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/llplugin/imageformats
- COMMENT "Copying llpluging imageformat libs."
- )
-
- add_dependencies(${VIEWER_BINARY_NAME} llmediaplugintest copy_media_plugin_libs)
-
-endif (WINDOWS)
-
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 9dfce27fad..578f8fd4f0 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -3585,7 +3585,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://www.secondlife.com/</string>
+ <string>http://lecs.viewer-sidebar.secondlife.com.s3.amazonaws.com/sidebar.html</string>
</map>
<key>SearchURL</key>
<map>
@@ -3596,7 +3596,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://int.searchwww-phx0.damballah.lindenlab.com/viewer/[CATEGORY]?q=[QUERY]&amp;p=[AUTH_KEY]&amp;r=[MATURITY]&amp;lang=[LANGUAGE]&amp;g=[GODLIKE]</string>
+ <string>http://int.searchwww-phx0.damballah.lindenlab.com/viewer/[CATEGORY]?q=[QUERY]&amp;p=[AUTH_TOKEN]&amp;r=[MATURITY]&amp;lang=[LANGUAGE]&amp;g=[GODLIKE]</string>
</map>
<key>HighResSnapshot</key>
<map>
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index c06098689d..43b2f34ecd 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -455,7 +455,10 @@ void LLAppearanceManager::purgeCategory(const LLUUID& category, bool keep_outfit
LLViewerInventoryItem *item = items.get(i);
if (keep_outfit_links && (item->getActualType() == LLAssetType::AT_LINK_FOLDER))
continue;
- gInventory.purgeObject(item->getUUID());
+ if (item->getIsLinkType())
+ {
+ gInventory.purgeObject(item->getUUID());
+ }
}
}
@@ -871,10 +874,48 @@ bool areMatchingWearables(const LLViewerInventoryItem *a, const LLViewerInventor
(a->getWearableType() == b->getWearableType()));
}
+class LLDeferredCOFLinkObserver: public LLInventoryObserver
+{
+public:
+ LLDeferredCOFLinkObserver(const LLUUID& item_id, bool do_update):
+ mItemID(item_id),
+ mDoUpdate(do_update)
+ {
+ }
+
+ ~LLDeferredCOFLinkObserver()
+ {
+ }
+
+ /* virtual */ void changed(U32 mask)
+ {
+ const LLInventoryItem *item = gInventory.getItem(mItemID);
+ if (item)
+ {
+ gInventory.removeObserver(this);
+ LLAppearanceManager::instance().addCOFItemLink(item,mDoUpdate);
+ delete this;
+ }
+ }
+
+private:
+ const LLUUID mItemID;
+ bool mDoUpdate;
+};
+
+
void LLAppearanceManager::addCOFItemLink(const LLUUID &item_id, bool do_update )
{
const LLInventoryItem *item = gInventory.getItem(item_id);
- addCOFItemLink(item, do_update);
+ if (!item)
+ {
+ LLDeferredCOFLinkObserver *observer = new LLDeferredCOFLinkObserver(item_id, do_update);
+ gInventory.addObserver(observer);
+ }
+ else
+ {
+ addCOFItemLink(item, do_update);
+ }
}
void LLAppearanceManager::addCOFItemLink(const LLInventoryItem *item, bool do_update )
@@ -909,7 +950,10 @@ void LLAppearanceManager::addCOFItemLink(const LLInventoryItem *item, bool do_up
else if (areMatchingWearables(vitem,inv_item))
{
gAgentWearables.removeWearable(inv_item->getWearableType(),true,0);
- gInventory.purgeObject(inv_item->getUUID());
+ if (inv_item->getIsLinkType())
+ {
+ gInventory.purgeObject(inv_item->getUUID());
+ }
}
}
if (linked_already)
@@ -958,10 +1002,9 @@ void LLAppearanceManager::removeCOFItemLinks(const LLUUID& item_id, bool do_upda
for (S32 i=0; i<item_array.count(); i++)
{
const LLInventoryItem* item = item_array.get(i).get();
- if (item->getLinkedUUID() == item_id)
+ if (item->getIsLinkType() && item->getLinkedUUID() == item_id)
{
- const LLUUID& item_id = item_array.get(i)->getUUID();
- gInventory.purgeObject(item_id);
+ gInventory.purgeObject(item->getUUID());
}
}
if (do_update)
diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp
index b197ed0ac6..595d84f9f0 100644
--- a/indra/newview/llfloatersearch.cpp
+++ b/indra/newview/llfloatersearch.cpp
@@ -131,8 +131,13 @@ void LLFloaterSearch::search(const LLSD &key)
subs["QUERY"] = LLURI::escape(search_text);
// add the permissions token that login.cgi gave us
+ // We use "search_token", and fallback to "auth_token" if not present.
LLSD search_token = LLLoginInstance::getInstance()->getResponse("search_token");
- subs["AUTH_KEY"] = search_token.asString();
+ if (search_token.asString().empty())
+ {
+ search_token = LLLoginInstance::getInstance()->getResponse("auth_token");
+ }
+ subs["AUTH_TOKEN"] = search_token.asString();
// add the user's preferred maturity (can be changed via prefs)
std::string maturity;
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index 321982ceb6..adf7f08702 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -1939,6 +1939,26 @@ LLFolderViewItem* LLFolderView::getItemByID(const LLUUID& id)
return NULL;
}
+LLFolderViewFolder* LLFolderView::getFolderByID(const LLUUID& id)
+{
+ if (id.isNull())
+ {
+ return this;
+ }
+
+ for (folders_t::iterator iter = mFolders.begin();
+ iter != mFolders.end();
+ ++iter)
+ {
+ LLFolderViewFolder *folder = (*iter);
+ if (folder->getListener()->getUUID() == id)
+ {
+ return folder;
+ }
+ }
+ return NULL;
+}
+
bool LLFolderView::doToSelected(LLInventoryModel* model, const LLSD& userdata)
{
std::string action = userdata.asString();
diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h
index d18ba385d8..2598af4df4 100644
--- a/indra/newview/llfolderview.h
+++ b/indra/newview/llfolderview.h
@@ -248,6 +248,7 @@ public:
void addItemID(const LLUUID& id, LLFolderViewItem* itemp);
void removeItemID(const LLUUID& id);
LLFolderViewItem* getItemByID(const LLUUID& id);
+ LLFolderViewFolder* getFolderByID(const LLUUID& id);
bool doToSelected(LLInventoryModel* model, const LLSD& userdata);
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index e2f9663000..bacc685130 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -973,7 +973,7 @@ bool LLInvFVBridge::isInOutfitsSidePanel() const
dynamic_cast<LLPanelOutfitsInventory*>(LLSideTray::getInstance()->getPanel("panel_outfits_inventory"));
if (!outfit_panel)
return false;
- return outfit_panel->isAccordionPanel(my_panel);
+ return outfit_panel->isTabPanel(my_panel);
}
// +=================================================+
@@ -2496,7 +2496,10 @@ void LLFolderBridge::folderOptionsMenu()
checkFolderForContentsOfType(model, is_object) ||
checkFolderForContentsOfType(model, is_gesture) )
{
- mItems.push_back(std::string("Folder Wearables Separator"));
+ if (!is_sidepanel)
+ {
+ mItems.push_back(std::string("Folder Wearables Separator"));
+ }
// Only enable add/replace outfit for non-default folders.
if (!is_default_folder)
@@ -2902,6 +2905,9 @@ void saveItemsOrder(LLInventoryModel::item_array_t& items)
item->updateServer(FALSE);
gInventory.updateItem(item);
+
+ // Tell the parent folder to refresh its sort order.
+ gInventory.addChangedMask(LLInventoryObserver::SORT, item->getParentUUID());
}
gInventory.notifyObservers();
@@ -2998,8 +3004,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
}
const LLUUID& favorites_id = model->findCategoryUUIDForType(LLFolderType::FT_FAVORITE);
- const LLUUID& landmarks_id = model->findCategoryUUIDForType(LLFolderType::FT_LANDMARK);
- const BOOL folder_allows_reorder = ((mUUID == landmarks_id) || (mUUID == favorites_id));
+ const BOOL folder_allows_reorder = (mUUID == favorites_id);
// we can move item inside a folder only if this folder is Favorites. See EXT-719
accept = is_movable && ((mUUID != inv_item->getParentUUID()) || folder_allows_reorder);
diff --git a/indra/newview/llinventoryobserver.h b/indra/newview/llinventoryobserver.h
index 99e6dbe3c8..c1f192e2bf 100644
--- a/indra/newview/llinventoryobserver.h
+++ b/indra/newview/llinventoryobserver.h
@@ -62,6 +62,7 @@ public:
STRUCTURE = 16, // structural change (eg item or folder moved)
CALLING_CARD = 32, // (eg online, grant status, cancel)
REBUILD = 64, // item UI changed (eg item type different)
+ SORT = 128, // folder needs to be resorted.
ALL = 0xffffffff
};
LLInventoryObserver();
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 92b9dc427f..3c34ba32e2 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -278,6 +278,7 @@ void LLInventoryPanel::modelChanged(U32 mask)
const LLUUID& item_id = (*items_iter);
const LLInventoryObject* model_item = model->getObject(item_id);
LLFolderViewItem* view_item = mFolders->getItemByID(item_id);
+ LLFolderViewFolder* view_folder = mFolders->getFolderByID(item_id);
//////////////////////////////
// LABEL Operation
@@ -320,7 +321,18 @@ void LLInventoryPanel::modelChanged(U32 mask)
view_item->refresh();
}
}
-
+
+ //////////////////////////////
+ // SORT Operation
+ // Sort the folder.
+ if (mask & LLInventoryObserver::SORT)
+ {
+ if (view_folder)
+ {
+ view_folder->requestSort();
+ }
+ }
+
// We don't typically care which of these masks the item is actually flagged with, since the masks
// may not be accurate (e.g. in the main inventory panel, I move an item from My Inventory into
// Landmarks; this is a STRUCTURE change for that panel but is an ADD change for the Landmarks
@@ -385,16 +397,6 @@ void LLInventoryPanel::modelChanged(U32 mask)
}
}
}
-
- /* I don't think we need this code, but not positive -- Seraph
- if (!handled)
- {
- // It's a small change that only requires a refresh.
- // *TODO: figure out a more efficient way to do the refresh
- // since it is expensive on large inventories
- mFolders->refresh();
- }
- */
}
// static
diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp
index 4511bca23a..5b36a5406a 100644
--- a/indra/newview/llpaneloutfitsinventory.cpp
+++ b/indra/newview/llpaneloutfitsinventory.cpp
@@ -75,12 +75,12 @@ LLPanelOutfitsInventory::~LLPanelOutfitsInventory()
BOOL LLPanelOutfitsInventory::postBuild()
{
- initAccordionPanels();
+ initTabPanels();
initListCommandsHandlers();
return TRUE;
}
-void LLPanelOutfitsInventory::updateParent()
+void LLPanelOutfitsInventory::updateVerbs()
{
if (mParent)
{
@@ -127,7 +127,7 @@ void LLPanelOutfitsInventory::onSearchEdit(const std::string& string)
mActivePanel->setFilterSubString(string);
}
-void LLPanelOutfitsInventory::onWear()
+void LLPanelOutfitsInventory::onWearButtonClick()
{
LLFolderViewEventListener* listenerp = getCorrectListenerForAction();
if (listenerp)
@@ -167,7 +167,7 @@ void LLPanelOutfitsInventory::onNew()
void LLPanelOutfitsInventory::onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action)
{
updateListCommands();
- updateParent();
+ updateVerbs();
if (getRootFolder()->needsAutoRename() && items.size())
{
getRootFolder()->startRenamingSelectedItem();
@@ -234,13 +234,14 @@ void LLPanelOutfitsInventory::initListCommandsHandlers()
mListCommands->childSetAction("options_gear_btn", boost::bind(&LLPanelOutfitsInventory::onGearButtonClick, this));
mListCommands->childSetAction("trash_btn", boost::bind(&LLPanelOutfitsInventory::onTrashButtonClick, this));
mListCommands->childSetAction("add_btn", boost::bind(&LLPanelOutfitsInventory::onAddButtonClick, this));
-
+ mListCommands->childSetAction("wear_btn", boost::bind(&LLPanelOutfitsInventory::onWearButtonClick, this));
+
LLDragAndDropButton* trash_btn = mListCommands->getChild<LLDragAndDropButton>("trash_btn");
trash_btn->setDragAndDropHandler(boost::bind(&LLPanelOutfitsInventory::handleDragAndDropToTrash, this
- , _4 // BOOL drop
- , _5 // EDragAndDropType cargo_type
- , _7 // EAcceptance* accept
- ));
+ , _4 // BOOL drop
+ , _5 // EDragAndDropType cargo_type
+ , _7 // EAcceptance* accept
+ ));
mCommitCallbackRegistrar.add("panel_outfits_inventory_gear_default.Custom.Action",
boost::bind(&LLPanelOutfitsInventory::onCustomAction, this, _2));
@@ -252,8 +253,10 @@ void LLPanelOutfitsInventory::initListCommandsHandlers()
void LLPanelOutfitsInventory::updateListCommands()
{
bool trash_enabled = isActionEnabled("delete");
+ bool wear_enabled = isActionEnabled("wear");
mListCommands->childSetEnabled("trash_btn", trash_enabled);
+ mListCommands->childSetEnabled("wear_btn", wear_enabled);
}
void LLPanelOutfitsInventory::onGearButtonClick()
@@ -308,7 +311,7 @@ void LLPanelOutfitsInventory::onCustomAction(const LLSD& userdata)
}
if (command_name == "wear")
{
- onWear();
+ onWearButtonClick();
}
if (command_name == "add")
{
@@ -407,41 +410,41 @@ bool LLPanelOutfitsInventory::handleDragAndDropToTrash(BOOL drop, EDragAndDropTy
////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
-// Accordion //
+// Tab panels //
-void LLPanelOutfitsInventory::initAccordionPanels()
+void LLPanelOutfitsInventory::initTabPanels()
{
- mAccordionPanels.resize(2);
+ mTabPanels.resize(2);
LLInventoryPanel *myoutfits_panel = getChild<LLInventoryPanel>("outfitslist_accordionpanel");
myoutfits_panel->setFilterTypes(1LL << LLFolderType::FT_OUTFIT, LLInventoryFilter::FILTERTYPE_CATEGORY);
myoutfits_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
- mAccordionPanels[0] = myoutfits_panel;
+ mTabPanels[0] = myoutfits_panel;
mActivePanel = myoutfits_panel;
LLInventoryPanel *cof_panel = getChild<LLInventoryPanel>("cof_accordionpanel");
cof_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
- mAccordionPanels[1] = cof_panel;
+ mTabPanels[1] = cof_panel;
- for (accordionpanels_vec_t::iterator iter = mAccordionPanels.begin();
- iter != mAccordionPanels.end();
+ for (tabpanels_vec_t::iterator iter = mTabPanels.begin();
+ iter != mTabPanels.end();
++iter)
{
LLInventoryPanel *panel = (*iter);
- panel->setSelectCallback(boost::bind(&LLPanelOutfitsInventory::onAccordionSelectionChange, this, panel, _1, _2));
+ panel->setSelectCallback(boost::bind(&LLPanelOutfitsInventory::onTabSelectionChange, this, panel, _1, _2));
}
}
-void LLPanelOutfitsInventory::onAccordionSelectionChange(LLInventoryPanel* accordion_panel, const std::deque<LLFolderViewItem*> &items, BOOL user_action)
+void LLPanelOutfitsInventory::onTabSelectionChange(LLInventoryPanel* tab_panel, const std::deque<LLFolderViewItem*> &items, BOOL user_action)
{
if (user_action && items.size() > 0)
{
- for (accordionpanels_vec_t::iterator iter = mAccordionPanels.begin();
- iter != mAccordionPanels.end();
+ for (tabpanels_vec_t::iterator iter = mTabPanels.begin();
+ iter != mTabPanels.end();
++iter)
{
LLInventoryPanel *panel = (*iter);
- if (panel == accordion_panel)
+ if (panel == tab_panel)
{
mActivePanel = panel;
}
@@ -459,10 +462,10 @@ LLInventoryPanel* LLPanelOutfitsInventory::getActivePanel()
return mActivePanel;
}
-bool LLPanelOutfitsInventory::isAccordionPanel(LLInventoryPanel *panel)
+bool LLPanelOutfitsInventory::isTabPanel(LLInventoryPanel *panel)
{
- for(accordionpanels_vec_t::iterator it = mAccordionPanels.begin();
- it != mAccordionPanels.end();
+ for(tabpanels_vec_t::iterator it = mTabPanels.begin();
+ it != mTabPanels.end();
++it)
{
if (*it == panel)
diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h
index afeaef485d..9b6b483e3b 100644
--- a/indra/newview/llpaneloutfitsinventory.h
+++ b/indra/newview/llpaneloutfitsinventory.h
@@ -54,7 +54,6 @@ public:
/*virtual*/ BOOL postBuild();
void onSearchEdit(const std::string& string);
- void onWear();
void onAdd();
void onRemove();
void onEdit();
@@ -71,29 +70,30 @@ public:
LLFolderView* getRootFolder();
protected:
- void updateParent();
+ void updateVerbs();
bool getIsCorrectType(const LLFolderViewEventListener *listenerp) const;
private:
LLSidepanelAppearance* mParent;
LLSaveFolderState* mSavedFolderState;
+
public:
//////////////////////////////////////////////////////////////////////////////////
- // Accordion //
+ // tab panels
LLInventoryPanel* getActivePanel();
- bool isAccordionPanel(LLInventoryPanel *panel);
+ bool isTabPanel(LLInventoryPanel *panel);
protected:
- void initAccordionPanels();
- void onAccordionSelectionChange(LLInventoryPanel* accordion_panel, const std::deque<LLFolderViewItem*> &items, BOOL user_action);
+ void initTabPanels();
+ void onTabSelectionChange(LLInventoryPanel* tab_panel, const std::deque<LLFolderViewItem*> &items, BOOL user_action);
private:
LLInventoryPanel* mActivePanel;
- typedef std::vector<LLInventoryPanel *> accordionpanels_vec_t;
- accordionpanels_vec_t mAccordionPanels;
+ typedef std::vector<LLInventoryPanel *> tabpanels_vec_t;
+ tabpanels_vec_t mTabPanels;
- // Accordion //
+ // tab panels //
////////////////////////////////////////////////////////////////////////////////
@@ -103,6 +103,7 @@ protected:
void initListCommandsHandlers();
void updateListCommands();
void onGearButtonClick();
+ void onWearButtonClick();
void onAddButtonClick();
void showActionMenu(LLMenuGL* menu, std::string spawning_view_name);
void onTrashButtonClick();
diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp
index 498782fb44..0a13180c73 100644
--- a/indra/newview/llpanelpicks.cpp
+++ b/indra/newview/llpanelpicks.cpp
@@ -57,7 +57,6 @@
#include "llpanelprofile.h"
#include "llpanelpick.h"
#include "llpanelclassified.h"
-#include "llpanelprofileview.h"
#include "llsidetray.h"
static const std::string XML_BTN_NEW = "new_btn";
@@ -88,6 +87,14 @@ public:
bool handle(const LLSD& params, const LLSD& query_map, LLMediaCtrl* web)
{
+ // handle app/classified/create urls first
+ if (params.size() == 1 && params[0].asString() == "create")
+ {
+ createClassified();
+ return true;
+ }
+
+ // then handle the general app/classified/{UUID}/{CMD} urls
if (params.size() < 2)
{
return false;
@@ -114,6 +121,31 @@ public:
return false;
}
+ void createClassified()
+ {
+ // open the new classified panel on the Me > Picks sidetray
+ LLSD params;
+ params["id"] = gAgent.getID();
+ params["open_tab_name"] = "panel_picks";
+ params["show_tab_panel"] = "create_classified";
+ LLSideTray::getInstance()->showPanel("panel_me", params);
+ }
+
+ void openClassified(LLAvatarClassifiedInfo* c_info)
+ {
+ // open the classified info panel on the Me > Picks sidetray
+ LLSD params;
+ params["id"] = c_info->creator_id;
+ params["open_tab_name"] = "panel_picks";
+ params["show_tab_panel"] = "classified_details";
+ params["classified_id"] = c_info->classified_id;
+ params["classified_avatar_id"] = c_info->creator_id;
+ params["classified_snapshot_id"] = c_info->snapshot_id;
+ params["classified_name"] = c_info->name;
+ params["classified_desc"] = c_info->description;
+ LLSideTray::getInstance()->showPanel("panel_profile_view", params);
+ }
+
/*virtual*/ void processProperties(void* data, EAvatarProcessorType type)
{
if (APT_CLASSIFIED_INFO != type)
@@ -128,22 +160,8 @@ public:
return;
}
- // open the people profile page for the classified's owner
- LLSD params;
- params["id"] = c_info->creator_id;
- params["classified"] = c_info->classified_id;
- params["open_tab_name"] = "panel_profile";
- LLPanelProfileView *profile = dynamic_cast<LLPanelProfileView*>(LLSideTray::getInstance()->showPanel("panel_profile_view", params));
-
- // then open the classified panel on this user's profile panel
- if (profile)
- {
- LLPanelPicks* panel_picks = profile->getChild<LLPanelPicks>("panel_picks");
- if (panel_picks)
- {
- panel_picks->openClassifiedInfo(c_info);
- }
- }
+ // open the detail side tray for this classified
+ openClassified(c_info);
// remove our observer now that we're done
mClassifiedIds.erase(c_info->classified_id);
@@ -693,33 +711,24 @@ void LLPanelPicks::openClassifiedInfo()
LLClassifiedItem* c_item = getSelectedClassifiedItem();
- createClassifiedInfoPanel();
-
- LLSD params;
- params["classified_id"] = c_item->getClassifiedId();
- params["avatar_id"] = c_item->getAvatarId();
- params["snapshot_id"] = c_item->getSnapshotId();
- params["name"] = c_item->getClassifiedName();
- params["desc"] = c_item->getDescription();
-
- getProfilePanel()->openPanel(mPanelClassifiedInfo, params);
+ openClassifiedInfo(c_item->getClassifiedId(), c_item->getAvatarId(),
+ c_item->getSnapshotId(), c_item->getClassifiedName(),
+ c_item->getDescription());
}
-void LLPanelPicks::openClassifiedInfo(LLAvatarClassifiedInfo *c_info)
+void LLPanelPicks::openClassifiedInfo(const LLUUID &classified_id,
+ const LLUUID &avatar_id,
+ const LLUUID &snapshot_id,
+ const std::string &name, const std::string &desc)
{
- if (! c_info)
- {
- return;
- }
-
createClassifiedInfoPanel();
LLSD params;
- params["classified_id"] = c_info->classified_id;
- params["avatar_id"] = c_info->creator_id;
- params["snapshot_id"] = c_info->snapshot_id;
- params["name"] = c_info->name;
- params["desc"] = c_info->description;
+ params["classified_id"] = classified_id;
+ params["avatar_id"] = avatar_id;
+ params["snapshot_id"] = snapshot_id;
+ params["name"] = name;
+ params["desc"] = desc;
getProfilePanel()->openPanel(mPanelClassifiedInfo, params);
}
diff --git a/indra/newview/llpanelpicks.h b/indra/newview/llpanelpicks.h
index 893a0c53a3..0ebf9e26dd 100644
--- a/indra/newview/llpanelpicks.h
+++ b/indra/newview/llpanelpicks.h
@@ -86,9 +86,6 @@ public:
// parent panels failed to work (picks related code was in my profile panel)
void setProfilePanel(LLPanelProfile* profile_panel);
- // display the info panel for the given classified
- void openClassifiedInfo(LLAvatarClassifiedInfo *c_info);
-
protected:
/*virtual*/void updateButtons();
@@ -120,6 +117,10 @@ private:
void openPickInfo();
void openClassifiedInfo();
+ void openClassifiedInfo(const LLUUID &classified_id, const LLUUID &avatar_id,
+ const LLUUID &snapshot_id, const std::string &name,
+ const std::string &desc);
+ friend class LLPanelProfile;
void showAccordion(const std::string& name, bool show);
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index 3274820174..c73ade53c8 100644
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -144,6 +144,7 @@ BOOL LLPanelProfile::postBuild()
void LLPanelProfile::onOpen(const LLSD& key)
{
+ // open the desired panel
if (key.has("open_tab_name"))
{
getTabContainer()[PANEL_PICKS]->onClosePanel();
@@ -155,6 +156,33 @@ void LLPanelProfile::onOpen(const LLSD& key)
{
getTabCtrl()->getCurrentPanel()->onOpen(getAvatarId());
}
+
+ // support commands to open further pieces of UI
+ if (key.has("show_tab_panel"))
+ {
+ std::string panel = key["show_tab_panel"].asString();
+ if (panel == "create_classified")
+ {
+ LLPanelPicks* picks = dynamic_cast<LLPanelPicks *>(getTabContainer()[PANEL_PICKS]);
+ if (picks)
+ {
+ picks->createNewClassified();
+ }
+ }
+ else if (panel == "classified_details")
+ {
+ LLUUID classified_id = key["classified_id"].asUUID();
+ LLUUID avatar_id = key["classified_avatar_id"].asUUID();
+ LLUUID snapshot_id = key["classified_snapshot_id"].asUUID();
+ std::string name = key["classified_name"].asString();
+ std::string desc = key["classified_desc"].asString();
+ LLPanelPicks* picks = dynamic_cast<LLPanelPicks *>(getTabContainer()[PANEL_PICKS]);
+ if (picks)
+ {
+ picks->openClassifiedInfo(classified_id, avatar_id, snapshot_id, name, desc);
+ }
+ }
+ }
}
//*TODO redo panel toggling
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index eb3695a371..30b0075c4b 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -113,9 +113,6 @@ BOOL LLSidepanelAppearance::postBuild()
mEditAppearanceBtn = getChild<LLButton>("editappearance_btn");
mEditAppearanceBtn->setClickedCallback(boost::bind(&LLSidepanelAppearance::onEditAppearanceButtonClicked, this));
- mWearBtn = getChild<LLButton>("wear_btn");
- mWearBtn->setClickedCallback(boost::bind(&LLSidepanelAppearance::onWearButtonClicked, this));
-
mEditBtn = getChild<LLButton>("edit_btn");
mEditBtn->setClickedCallback(boost::bind(&LLSidepanelAppearance::onEditButtonClicked, this));
@@ -199,14 +196,6 @@ void LLSidepanelAppearance::onFilterEdit(const std::string& search_string)
}
}
-void LLSidepanelAppearance::onWearButtonClicked()
-{
- if (!mLookInfo->getVisible())
- {
- mPanelOutfitsInventory->onWear();
- }
-}
-
void LLSidepanelAppearance::onOpenOutfitButtonClicked()
{
const LLViewerInventoryItem *outfit_link = LLAppearanceManager::getInstance()->getCurrentOutfitLink();
@@ -284,7 +273,6 @@ void LLSidepanelAppearance::toggleLookInfoPanel(BOOL visible)
mLookInfo->setVisible(visible);
mPanelOutfitsInventory->setVisible(!visible);
mFilterEditor->setVisible(!visible);
- mWearBtn->setVisible(!visible);
mEditBtn->setVisible(!visible);
mNewOutfitBtn->setVisible(!visible);
mCurrOutfitPanel->setVisible(!visible);
@@ -314,12 +302,10 @@ void LLSidepanelAppearance::updateVerbs()
{
const bool is_correct_type = (mPanelOutfitsInventory->getCorrectListenerForAction() != NULL);
mEditBtn->setEnabled(is_correct_type);
- mWearBtn->setEnabled(is_correct_type);
}
else
{
mEditBtn->setEnabled(FALSE);
- mWearBtn->setEnabled(FALSE);
}
}
diff --git a/indra/newview/llsidepanelappearance.h b/indra/newview/llsidepanelappearance.h
index 9c870f631a..8ef2088eda 100644
--- a/indra/newview/llsidepanelappearance.h
+++ b/indra/newview/llsidepanelappearance.h
@@ -67,7 +67,6 @@ private:
void onOpenOutfitButtonClicked();
void onEditAppearanceButtonClicked();
- void onWearButtonClicked();
void onEditButtonClicked();
void onNewOutfitButtonClicked();
void onBackButtonClicked();
@@ -82,7 +81,6 @@ private:
LLButton* mOpenOutfitBtn;
LLButton* mEditAppearanceBtn;
- LLButton* mWearBtn;
LLButton* mEditBtn;
LLButton* mNewOutfitBtn;
LLPanel* mCurrOutfitPanel;
diff --git a/indra/newview/llsidepanelinventorysubpanel.cpp b/indra/newview/llsidepanelinventorysubpanel.cpp
index 793904faa8..56e342c3ce 100644
--- a/indra/newview/llsidepanelinventorysubpanel.cpp
+++ b/indra/newview/llsidepanelinventorysubpanel.cpp
@@ -95,7 +95,9 @@ void LLSidepanelInventorySubpanel::setIsEditing(BOOL edit)
BOOL LLSidepanelInventorySubpanel::getIsEditing() const
{
- return mIsEditing;
+
+ return TRUE; // Default everything to edit mode since we're not using an edit button anymore.
+ // return mIsEditing;
}
void LLSidepanelInventorySubpanel::reset()
diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp
index 25518d87d6..1965e634b6 100644
--- a/indra/newview/llsidepaneliteminfo.cpp
+++ b/indra/newview/llsidepaneliteminfo.cpp
@@ -172,7 +172,7 @@ void LLSidepanelItemInfo::refresh()
}
}
- if (!getIsEditing())
+ if (!getIsEditing() || !item)
{
const std::string no_item_names[]={
"LabelItemName",
@@ -261,18 +261,6 @@ void LLSidepanelItemInfo::refreshFromItem(LLInventoryItem* item)
GP_OBJECT_MANIPULATE)
&& is_obj_modify && is_complete;
- const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH);
- bool item_in_trash = item->getUUID() == trash_id || gInventory.isObjectDescendentOf(item->getUUID(), trash_id);
-
- if (is_modifiable && !item_in_trash)
- {
- setIsEditing(TRUE);
- }
- else
- {
- setIsEditing(FALSE);
- }
-
childSetEnabled("LabelItemNameTitle",TRUE);
childSetEnabled("LabelItemName",is_modifiable && !is_calling_card); // for now, don't allow rename of calling cards
childSetText("LabelItemName",item->getName());
diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp
index 2c40e948de..50cec3184d 100644
--- a/indra/newview/llsidepaneltaskinfo.cpp
+++ b/indra/newview/llsidepaneltaskinfo.cpp
@@ -101,13 +101,25 @@ BOOL LLSidepanelTaskInfo::postBuild()
mBuyBtn = getChild<LLButton>("buy_btn");
mBuyBtn->setClickedCallback(boost::bind(&LLSidepanelTaskInfo::onBuyButtonClicked, this));
- childSetPrevalidate("Object Name",LLLineEditor::prevalidateASCIIPrintableNoPipe);
- childSetPrevalidate("Object Description",LLLineEditor::prevalidateASCIIPrintableNoPipe);
-
mLabelGroupName = getChild<LLNameBox>("Group Name Proxy");
- childSetCommitCallback("checkbox for sale",onClickForSale,this);
-
+ childSetCommitCallback("Object Name", LLSidepanelTaskInfo::onCommitName,this);
+ childSetPrevalidate("Object Name", LLLineEditor::prevalidateASCIIPrintableNoPipe);
+ childSetCommitCallback("Object Description", LLSidepanelTaskInfo::onCommitDesc,this);
+ childSetPrevalidate("Object Description", LLLineEditor::prevalidateASCIIPrintableNoPipe);
+ getChild<LLUICtrl>("button set group")->setCommitCallback(boost::bind(&LLSidepanelTaskInfo::onClickGroup,this));
+ childSetCommitCallback("checkbox share with group", &LLSidepanelTaskInfo::onCommitGroupShare,this);
+ childSetAction("button deed", &LLSidepanelTaskInfo::onClickDeedToGroup,this);
+ childSetCommitCallback("checkbox allow everyone move", &LLSidepanelTaskInfo::onCommitEveryoneMove,this);
+ childSetCommitCallback("checkbox allow everyone copy", &LLSidepanelTaskInfo::onCommitEveryoneCopy,this);
+ childSetCommitCallback("checkbox for sale", &LLSidepanelTaskInfo::onCommitSaleInfo,this);
+ childSetCommitCallback("sale type", &LLSidepanelTaskInfo::onCommitSaleType,this);
+ childSetCommitCallback("Edit Cost", &LLSidepanelTaskInfo::onCommitSaleInfo, this);
+ childSetCommitCallback("checkbox next owner can modify", &LLSidepanelTaskInfo::onCommitNextOwnerModify,this);
+ childSetCommitCallback("checkbox next owner can copy", &LLSidepanelTaskInfo::onCommitNextOwnerCopy,this);
+ childSetCommitCallback("checkbox next owner can transfer", &LLSidepanelTaskInfo::onCommitNextOwnerTransfer,this);
+ childSetCommitCallback("clickaction", &LLSidepanelTaskInfo::onCommitClickAction,this);
+ childSetCommitCallback("search_check", &LLSidepanelTaskInfo::onCommitIncludeInSearch,this);
return TRUE;
}
@@ -860,7 +872,7 @@ static bool callback_deed_to_group(const LLSD& notification, const LLSD& respons
return FALSE;
}
-void LLSidepanelTaskInfo::onClickDeedToGroup()
+void LLSidepanelTaskInfo::onClickDeedToGroup(void *data)
{
LLNotificationsUtil::add("DeedObjectToGroup", LLSD(), LLSD(), callback_deed_to_group);
}
@@ -869,121 +881,149 @@ void LLSidepanelTaskInfo::onClickDeedToGroup()
/// Permissions checkboxes
///----------------------------------------------------------------------------
-void LLSidepanelTaskInfo::onCommitPerm(LLCheckBoxCtrl *ctrl, U8 field, U32 perm)
+// static
+void LLSidepanelTaskInfo::onCommitPerm(LLUICtrl *ctrl, void *data, U8 field, U32 perm)
{
- const LLViewerObject* object = mObjectSelection->getFirstRootObject();
- if (!object) return;
+ LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject();
+ if(!object) return;
- BOOL new_state = ctrl->get();
+ // Checkbox will have toggled itself
+ // LLSidepanelTaskInfo* self = (LLSidepanelTaskInfo*)data;
+ LLCheckBoxCtrl *check = (LLCheckBoxCtrl *)ctrl;
+ BOOL new_state = check->get();
+
LLSelectMgr::getInstance()->selectionSetObjectPermissions(field, new_state, perm);
}
-void LLSidepanelTaskInfo::onCommitGroupShare()
+// static
+void LLSidepanelTaskInfo::onCommitGroupShare(LLUICtrl *ctrl, void *data)
{
- LLCheckBoxCtrl *ctrl = getChild<LLCheckBoxCtrl>("checkbox share with group");
- onCommitPerm(ctrl, PERM_GROUP, PERM_MODIFY | PERM_MOVE | PERM_COPY);
+ onCommitPerm(ctrl, data, PERM_GROUP, PERM_MODIFY | PERM_MOVE | PERM_COPY);
}
-void LLSidepanelTaskInfo::onCommitEveryoneMove()
+// static
+void LLSidepanelTaskInfo::onCommitEveryoneMove(LLUICtrl *ctrl, void *data)
{
- LLCheckBoxCtrl *ctrl = getChild<LLCheckBoxCtrl>("checkbox allow everyone move");
- onCommitPerm(ctrl, PERM_EVERYONE, PERM_MOVE);
+ onCommitPerm(ctrl, data, PERM_EVERYONE, PERM_MOVE);
}
-void LLSidepanelTaskInfo::onCommitEveryoneCopy()
+// static
+void LLSidepanelTaskInfo::onCommitEveryoneCopy(LLUICtrl *ctrl, void *data)
{
- LLCheckBoxCtrl *ctrl = getChild<LLCheckBoxCtrl>("checkbox allow everyone copy");
- onCommitPerm(ctrl, PERM_EVERYONE, PERM_COPY);
+ onCommitPerm(ctrl, data, PERM_EVERYONE, PERM_COPY);
}
-void LLSidepanelTaskInfo::onCommitNextOwnerModify()
+// static
+void LLSidepanelTaskInfo::onCommitNextOwnerModify(LLUICtrl* ctrl, void* data)
{
- LLCheckBoxCtrl *ctrl = getChild<LLCheckBoxCtrl>("checkbox next owner can modify");
- onCommitPerm(ctrl, PERM_NEXT_OWNER, PERM_MODIFY);
+ //llinfos << "LLSidepanelTaskInfo::onCommitNextOwnerModify" << llendl;
+ onCommitPerm(ctrl, data, PERM_NEXT_OWNER, PERM_MODIFY);
}
-void LLSidepanelTaskInfo::onCommitNextOwnerCopy()
+// static
+void LLSidepanelTaskInfo::onCommitNextOwnerCopy(LLUICtrl* ctrl, void* data)
{
- LLCheckBoxCtrl *ctrl = getChild<LLCheckBoxCtrl>("checkbox next owner can copy");
- onCommitPerm(ctrl, PERM_NEXT_OWNER, PERM_COPY);
+ //llinfos << "LLSidepanelTaskInfo::onCommitNextOwnerCopy" << llendl;
+ onCommitPerm(ctrl, data, PERM_NEXT_OWNER, PERM_COPY);
}
-void LLSidepanelTaskInfo::onCommitNextOwnerTransfer()
+// static
+void LLSidepanelTaskInfo::onCommitNextOwnerTransfer(LLUICtrl* ctrl, void* data)
{
- LLCheckBoxCtrl *ctrl = getChild<LLCheckBoxCtrl>("checkbox next owner can transfer");
- onCommitPerm(ctrl, PERM_NEXT_OWNER, PERM_TRANSFER);
+ //llinfos << "LLSidepanelTaskInfo::onCommitNextOwnerTransfer" << llendl;
+ onCommitPerm(ctrl, data, PERM_NEXT_OWNER, PERM_TRANSFER);
}
-void LLSidepanelTaskInfo::onCommitName()
+// static
+void LLSidepanelTaskInfo::onCommitName(LLUICtrl*, void* data)
{
- LLLineEditor* tb = getChild<LLLineEditor>("Object Name");
- LLSelectMgr::getInstance()->selectionSetObjectName(tb->getText());
+ //llinfos << "LLSidepanelTaskInfo::onCommitName()" << llendl;
+ LLSidepanelTaskInfo* self = (LLSidepanelTaskInfo*)data;
+ LLLineEditor* tb = self->getChild<LLLineEditor>("Object Name");
+ if(tb)
+ {
+ LLSelectMgr::getInstance()->selectionSetObjectName(tb->getText());
+// LLSelectMgr::getInstance()->selectionSetObjectName(self->mLabelObjectName->getText());
+ }
}
-void LLSidepanelTaskInfo::onCommitDesc()
+
+// static
+void LLSidepanelTaskInfo::onCommitDesc(LLUICtrl*, void* data)
{
- LLLineEditor* le = getChild<LLLineEditor>("Object Description");
- LLSelectMgr::getInstance()->selectionSetObjectDescription(le->getText());
+ //llinfos << "LLSidepanelTaskInfo::onCommitDesc()" << llendl;
+ LLSidepanelTaskInfo* self = (LLSidepanelTaskInfo*)data;
+ LLLineEditor* le = self->getChild<LLLineEditor>("Object Description");
+ if(le)
+ {
+ LLSelectMgr::getInstance()->selectionSetObjectDescription(le->getText());
+ }
}
-void LLSidepanelTaskInfo::onCommitSaleInfo()
+// static
+void LLSidepanelTaskInfo::onCommitSaleInfo(LLUICtrl*, void* data)
{
- setAllSaleInfo();
+ LLSidepanelTaskInfo* self = (LLSidepanelTaskInfo*)data;
+ self->setAllSaleInfo();
}
-void LLSidepanelTaskInfo::onCommitSaleType()
+// static
+void LLSidepanelTaskInfo::onCommitSaleType(LLUICtrl*, void* data)
{
- setAllSaleInfo();
+ LLSidepanelTaskInfo* self = (LLSidepanelTaskInfo*)data;
+ self->setAllSaleInfo();
}
+
void LLSidepanelTaskInfo::setAllSaleInfo()
{
- llinfos << "LLSidepanelTaskInfo::setAllSaleInfo()" << llendl;
-
LLSaleInfo::EForSale sale_type = LLSaleInfo::FS_NOT;
+
LLCheckBoxCtrl *checkPurchase = getChild<LLCheckBoxCtrl>("checkbox for sale");
+
// Set the sale type if the object(s) are for sale.
- if (checkPurchase && checkPurchase->get())
+ if(checkPurchase && checkPurchase->get())
{
sale_type = static_cast<LLSaleInfo::EForSale>(getChild<LLComboBox>("sale type")->getValue().asInteger());
}
S32 price = -1;
- const LLSpinCtrl *edit_price = getChild<LLSpinCtrl>("Edit Cost");
+
+ LLSpinCtrl *edit_price = getChild<LLSpinCtrl>("Edit Cost");
price = (edit_price->getTentative()) ? DEFAULT_PRICE : edit_price->getValue().asInteger();
+
// If somehow an invalid price, turn the sale off.
if (price < 0)
sale_type = LLSaleInfo::FS_NOT;
- LLSaleInfo sale_info(sale_type, price);
- LLSelectMgr::getInstance()->selectionSetObjectSaleInfo(sale_info);
- // If turned off for-sale, make sure click-action buy is turned
- // off as well
- if (sale_type == LLSaleInfo::FS_NOT)
- {
- U8 click_action = 0;
- LLSelectMgr::getInstance()->selectionGetClickAction(&click_action);
- if (click_action == CLICK_ACTION_BUY)
- {
- LLSelectMgr::getInstance()->selectionSetClickAction(CLICK_ACTION_TOUCH);
- }
- }
-}
+ LLSaleInfo old_sale_info;
+ LLSelectMgr::getInstance()->selectGetSaleInfo(old_sale_info);
-// static
-void LLSidepanelTaskInfo::onClickForSale(LLUICtrl* ctrl, void* data)
-{
- LLSidepanelTaskInfo* self = (LLSidepanelTaskInfo*)data;
- self->updateUIFromSaleInfo();
-}
+ LLSaleInfo new_sale_info(sale_type, price);
+ LLSelectMgr::getInstance()->selectionSetObjectSaleInfo(new_sale_info);
+
+ U8 old_click_action = 0;
+ LLSelectMgr::getInstance()->selectionGetClickAction(&old_click_action);
-void LLSidepanelTaskInfo::updateUIFromSaleInfo()
-{
- /*
- TODO: Update sale button enable/disable state and default
- sale button settings when this sale button is enabled/disabled.
- */
+ if (old_sale_info.isForSale()
+ && !new_sale_info.isForSale()
+ && old_click_action == CLICK_ACTION_BUY)
+ {
+ // If turned off for-sale, make sure click-action buy is turned
+ // off as well
+ LLSelectMgr::getInstance()->
+ selectionSetClickAction(CLICK_ACTION_TOUCH);
+ }
+ else if (new_sale_info.isForSale()
+ && !old_sale_info.isForSale()
+ && old_click_action == CLICK_ACTION_TOUCH)
+ {
+ // If just turning on for-sale, preemptively turn on one-click buy
+ // unless user have a different click action set
+ LLSelectMgr::getInstance()->
+ selectionSetClickAction(CLICK_ACTION_BUY);
+ }
}
struct LLSelectionPayable : public LLSelectedObjectFunctor
@@ -997,8 +1037,35 @@ struct LLSelectionPayable : public LLSelectedObjectFunctor
}
};
+static U8 string_value_to_click_action(std::string p_value)
+{
+ if (p_value == "Touch")
+ return CLICK_ACTION_TOUCH;
+ if (p_value == "Sit")
+ return CLICK_ACTION_SIT;
+ if (p_value == "Buy")
+ return CLICK_ACTION_BUY;
+ if (p_value == "Pay")
+ return CLICK_ACTION_PAY;
+ if (p_value == "Open")
+ return CLICK_ACTION_OPEN;
+ if (p_value == "Zoom")
+ return CLICK_ACTION_ZOOM;
+ return CLICK_ACTION_TOUCH;
+}
+
+// static
+void LLSidepanelTaskInfo::onCommitClickAction(LLUICtrl* ctrl, void*)
+{
+ LLComboBox* box = (LLComboBox*)ctrl;
+ if (!box) return;
+ std::string value = box->getValue().asString();
+ U8 click_action = string_value_to_click_action(value);
+ doClickAction(click_action);
+}
+
// static
-void LLSidepanelTaskInfo::onCommitClickAction(U8 click_action)
+void LLSidepanelTaskInfo::doClickAction(U8 click_action)
{
if (click_action == CLICK_ACTION_BUY)
{
@@ -1020,7 +1087,7 @@ void LLSidepanelTaskInfo::onCommitClickAction(U8 click_action)
{
// Verify object has script with money() handler
LLSelectionPayable payable;
- const BOOL can_pay = mObjectSelection->applyToObjects(&payable);
+ bool can_pay = LLSelectMgr::getInstance()->getSelection()->applyToObjects(&payable);
if (!can_pay)
{
// Warn, but do it anyway.
@@ -1031,10 +1098,11 @@ void LLSidepanelTaskInfo::onCommitClickAction(U8 click_action)
}
// static
-void LLSidepanelTaskInfo::onCommitIncludeInSearch()
+void LLSidepanelTaskInfo::onCommitIncludeInSearch(LLUICtrl* ctrl, void* data)
{
- LLCheckBoxCtrl *ctrl = getChild<LLCheckBoxCtrl>("search_check");
- LLSelectMgr::getInstance()->selectionSetIncludeInSearch(ctrl->get());
+ LLCheckBoxCtrl* box = (LLCheckBoxCtrl*)ctrl;
+ llassert(box);
+ LLSelectMgr::getInstance()->selectionSetIncludeInSearch(box->get());
}
// virtual
@@ -1042,13 +1110,15 @@ void LLSidepanelTaskInfo::updateVerbs()
{
LLSidepanelInventorySubpanel::updateVerbs();
+ /*
mOpenBtn->setVisible(!getIsEditing());
mPayBtn->setVisible(!getIsEditing());
mBuyBtn->setVisible(!getIsEditing());
-
- mOpenBtn->setEnabled(enable_object_open());
//const LLViewerObject *obj = getFirstSelectedObject();
//mEditBtn->setEnabled(obj && obj->permModify());
+ */
+
+ mOpenBtn->setEnabled(enable_object_open());
}
void LLSidepanelTaskInfo::onOpenButtonClicked()
@@ -1061,28 +1131,28 @@ void LLSidepanelTaskInfo::onOpenButtonClicked()
void LLSidepanelTaskInfo::onPayButtonClicked()
{
- onCommitClickAction(CLICK_ACTION_PAY);
+ doClickAction(CLICK_ACTION_PAY);
}
void LLSidepanelTaskInfo::onBuyButtonClicked()
{
- onCommitClickAction(CLICK_ACTION_BUY);
+ doClickAction(CLICK_ACTION_BUY);
}
// virtual
void LLSidepanelTaskInfo::save()
{
- onCommitGroupShare();
- onCommitEveryoneMove();
- onCommitEveryoneCopy();
- onCommitNextOwnerModify();
- onCommitNextOwnerCopy();
- onCommitNextOwnerTransfer();
- onCommitName();
- onCommitDesc();
- onCommitSaleInfo();
- onCommitSaleType();
- onCommitIncludeInSearch();
+ onCommitGroupShare(getChild<LLCheckBoxCtrl>("checkbox share with group"), this);
+ onCommitEveryoneMove(getChild<LLCheckBoxCtrl>("checkbox allow everyone move"), this);
+ onCommitEveryoneCopy(getChild<LLCheckBoxCtrl>("checkbox allow everyone copy"), this);
+ onCommitNextOwnerModify(getChild<LLCheckBoxCtrl>("checkbox next owner can modify"), this);
+ onCommitNextOwnerCopy(getChild<LLCheckBoxCtrl>("checkbox next owner can copy"), this);
+ onCommitNextOwnerTransfer(getChild<LLCheckBoxCtrl>("checkbox next owner can transfer"), this);
+ onCommitName(getChild<LLLineEditor>("Object Name"), this);
+ onCommitDesc(getChild<LLLineEditor>("Object Description"), this);
+ onCommitSaleInfo(NULL, this);
+ onCommitSaleType(NULL, this);
+ onCommitIncludeInSearch(getChild<LLCheckBoxCtrl>("search_check"), this);
}
void LLSidepanelTaskInfo::setObjectSelection(LLObjectSelectionHandle selection)
diff --git a/indra/newview/llsidepaneltaskinfo.h b/indra/newview/llsidepaneltaskinfo.h
index 7c6d9983ae..cf36c20767 100644
--- a/indra/newview/llsidepaneltaskinfo.h
+++ b/indra/newview/llsidepaneltaskinfo.h
@@ -72,28 +72,30 @@ protected:
static void onClickRelease(void*);
void onClickGroup();
void cbGroupID(LLUUID group_id);
+ static void onClickDeedToGroup(void*);
- void onClickDeedToGroup();
- void onCommitPerm(LLCheckBoxCtrl* ctrl, U8 field, U32 perm);
- void onCommitGroupShare();
- void onCommitEveryoneMove();
- void onCommitEveryoneCopy();
- void onCommitNextOwnerModify();
- void onCommitNextOwnerCopy();
- void onCommitNextOwnerTransfer();
- void onCommitName();
- void onCommitDesc();
- void onCommitSaleInfo();
- void onCommitSaleType();
-
- void onCommitClickAction(U8 click_action);
- void onCommitIncludeInSearch();
+ static void onCommitPerm(LLUICtrl *ctrl, void *data, U8 field, U32 perm);
+ static void onCommitGroupShare(LLUICtrl *ctrl, void *data);
+
+ static void onCommitEveryoneMove(LLUICtrl *ctrl, void *data);
+ static void onCommitEveryoneCopy(LLUICtrl *ctrl, void *data);
+
+ static void onCommitNextOwnerModify(LLUICtrl* ctrl, void* data);
+ static void onCommitNextOwnerCopy(LLUICtrl* ctrl, void* data);
+ static void onCommitNextOwnerTransfer(LLUICtrl* ctrl, void* data);
+
+ static void onCommitName(LLUICtrl* ctrl, void* data);
+ static void onCommitDesc(LLUICtrl* ctrl, void* data);
+
+ static void onCommitSaleInfo(LLUICtrl* ctrl, void* data);
+ static void onCommitSaleType(LLUICtrl* ctrl, void* data);
void setAllSaleInfo();
- static void onClickForSale(LLUICtrl* ctrl, void *data);
- void updateUIFromSaleInfo();
+ static void onCommitClickAction(LLUICtrl* ctrl, void* data);
+ static void onCommitIncludeInSearch(LLUICtrl* ctrl, void*);
+ static void doClickAction(U8 click_action);
void disableAll();
private:
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index 85259fdc1e..9f69ed3964 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -887,6 +887,8 @@ bool LLTextureFetchWorker::doWork(S32 param)
}
else
{
+ // mFormattedImage gauranteed to not be NULL since cur_size != 0
+ mLoadedDiscard = mFormattedImage->getDiscardLevel();
mState = DECODE_IMAGE;
return false; // use what we have
}
diff --git a/indra/newview/llviewerhome.cpp b/indra/newview/llviewerhome.cpp
index 2bae07f665..6299b4fabd 100644
--- a/indra/newview/llviewerhome.cpp
+++ b/indra/newview/llviewerhome.cpp
@@ -48,7 +48,7 @@ std::string LLViewerHome::getHomeURL()
// this value from settings.xml and support various substitutions
LLSD substitution;
- substitution["AUTH_KEY"] = LLURI::escape(getAuthKey());
+ substitution["AUTH_TOKEN"] = LLURI::escape(getAuthKey());
// get the home URL and expand all of the substitutions
// (also adds things like [LANGUAGE], [VERSION], [OS], etc.)
@@ -62,7 +62,13 @@ std::string LLViewerHome::getAuthKey()
// return the value of the (optional) auth token returned by login.cgi
// this lets the server provide an authentication token that we can
// blindly pass to the Home web page for it to perform authentication.
- static const std::string authKeyName("home_sidetray_token");
- return LLLoginInstance::getInstance()->getResponse(authKeyName);
+ // We use "home_sidetray_token", and fallback to "auth_token" if not
+ // present.
+ LLSD auth_token = LLLoginInstance::getInstance()->getResponse("home_sidetray_token");
+ if (auth_token.asString().empty())
+ {
+ auth_token = LLLoginInstance::getInstance()->getResponse("auth_token");
+ }
+ return auth_token.asString();
}
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 0be0b56bc3..dfa775c292 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -2529,8 +2529,6 @@ void handle_object_edit()
void handle_object_inspect()
{
- // Disable sidepanel inspector
- /*
LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection();
LLViewerObject* selected_objectp = selection->getFirstRootObject();
if (selected_objectp)
@@ -2539,9 +2537,11 @@ void handle_object_inspect()
key["task"] = "task";
LLSideTray::getInstance()->showPanel("sidepanel_inventory", key);
}
- */
+ /*
+ // Old floater properties
LLFloaterReg::showInstance("inspect", LLSD());
+ */
}
//---------------------------------------------------------------------------
diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp
index 1889ca78c3..cfa1f05ec0 100644
--- a/indra/newview/llvoiceclient.cpp
+++ b/indra/newview/llvoiceclient.cpp
@@ -113,23 +113,15 @@ static void setUUIDFromStringHash(LLUUID &uuid, const std::string &str)
static int scale_mic_volume(float volume)
{
// incoming volume has the range [0.0 ... 2.0], with 1.0 as the default.
- // Map it as follows: 0.0 -> 40, 1.0 -> 44, 2.0 -> 75
-
- volume -= 1.0f; // offset volume to the range [-1.0 ... 1.0], with 0 at the default.
- int scaled_volume = 44; // offset scaled_volume by its default level
- if(volume < 0.0f)
- scaled_volume += ((int)(volume * 4.0f)); // (44 - 40)
- else
- scaled_volume += ((int)(volume * 31.0f)); // (75 - 44)
-
- return scaled_volume;
+ // Map it to Vivox levels as follows: 0.0 -> 30, 1.0 -> 50, 2.0 -> 70
+ return 30 + (int)(volume * 20.0f);
}
static int scale_speaker_volume(float volume)
{
// incoming volume has the range [0.0 ... 1.0], with 0.5 as the default.
- // Map it as follows: 0.0 -> 0, 0.5 -> 50, 1.0 -> 100
- return (int)(volume * 100.0f);
+ // Map it to Vivox levels as follows: 0.0 -> 30, 0.5 -> 50, 1.0 -> 70
+ return 30 + (int)(volume * 40.0f);
}
class LLViewerVoiceAccountProvisionResponder :
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 282eddf380..73b5222ee3 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -7268,13 +7268,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
updateCull(camera, ref_result, 1);
stateSort(camera, ref_result);
}
- else
- {
- gGL.setColorMask(true, true);
- mWaterRef.clear();
- gGL.setColorMask(true, false);
- }
-
+
ref_mask = mRenderTypeMask;
mRenderTypeMask = mask;
}
diff --git a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml
index db95d01b43..ab73f135b9 100644
--- a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml
@@ -1,61 +1,104 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<panel name="Outfits"
- height="510"
- width="333"
- follows="top|left"
- left="0"
- top_pad="0">
- <accordion
- single_expansion="true"
- height="510"
- layout="topleft"
- left="0"
- follows="top|left"
- name="outfits_accordion"
- top_pad="0"
- width="333">
- <accordion_tab
- expanded="false"
- layout="topleft"
- name="tab_cof"
- title="Current Outfit">
- <inventory_panel
+
+ <panel name="Outfits"
+ background_visible="true"
+ follows="all"
+ height="550"
+ label="Things"
+ layout="topleft"
+ min_height="350"
+ min_width="240"
+ width="330"
+ border="false">
+ <tab_container
+ follows="all"
+ height="500"
+ layout="topleft"
+ left="10"
+ name="appearance_tabs"
+ tab_min_width="100"
+ tab_height="30"
+ tab_position="top"
+ halign="center"
+ width="313">
+ <inventory_panel
+ label="MY OUTFITS"
+ help_topic="my_outfits_tab"
allow_multi_select="true"
+ follows="all"
border="false"
- height="460"
- left="0"
- top="0"
- mouse_opaque="true"
- name="cof_accordionpanel"
- start_folder="Current Outfit" />
- </accordion_tab>
- <accordion_tab
- expanded="true"
- layout="topleft"
- name="tab_outfits"
- title="My Outfits">
- <inventory_panel
- allow_multi_select="true"
- border="false"
- follows="all"
- left="0"
- top="0"
- height="460"
- mouse_opaque="true"
- name="outfitslist_accordionpanel"
- start_folder="My Outfits" />
- </accordion_tab>
- </accordion>
- <!--<button bottom="0"
- halign="center"
- height="23"
- label=">"
- enabled="false"
- mouse_opaque="false"
- name="selector"
- width="20"
- left="0"
- visible="false"
- follows="right|bottom"
- tool_tip="View outfit properties" />-->
+ left="0"
+ top="0"
+ height="500"
+ width="290"
+ mouse_opaque="true"
+ name="outfitslist_accordionpanel"
+ start_folder="My Outfits" />
+ <inventory_panel
+ label="WEARING"
+ help_topic="now_wearing_tab"
+ allow_multi_select="true"
+ border="false"
+ height="500"
+ width="290"
+ left="0"
+ top="0"
+ mouse_opaque="true"
+ name="cof_accordionpanel"
+ start_folder="Current Outfit" />
+ </tab_container>
+ <panel
+ background_visible="true"
+ follows="bottom|left"
+ height="50"
+ layout="topleft"
+ left="0"
+ visible="true"
+ name="bottom_panel"
+ top_pad="10"
+ width="313">
+ <button
+ follows="bottom|left"
+ tool_tip="Show additional options"
+ height="18"
+ image_disabled="OptionsMenu_Disabled"
+ image_selected="OptionsMenu_Press"
+ image_unselected="OptionsMenu_Off"
+ layout="topleft"
+ left="10"
+ name="options_gear_btn"
+ top="6"
+ width="18" />
+ <button
+ follows="bottom|left"
+ height="18"
+ image_selected="AddItem_Press"
+ image_unselected="AddItem_Off"
+ image_disabled="AddItem_Disabled"
+ layout="topleft"
+ left_pad="5"
+ name="add_btn"
+ tool_tip="Add new item"
+ width="18" />
+ <dnd_button
+ follows="bottom|left"
+ height="18"
+ image_selected="TrashItem_Press"
+ image_unselected="TrashItem_Off"
+ layout="topleft"
+ right="-5"
+ name="trash_btn"
+ tool_tip="Remove selected item"
+ top="6"
+ width="18" />
+ <button
+ follows="top|left"
+ height="23"
+ label="Wear"
+ layout="topleft"
+ name="wear_btn"
+ right="-5"
+ top_pad="0"
+ width="90" />
+ </panel>
</panel>
diff --git a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml
index 3dac1a9614..27f19d44fa 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml
@@ -85,72 +85,21 @@ left="0"
class="panel_outfits_inventory"
filename="panel_outfits_inventory.xml"
name="panel_outfits_inventory"
- height="510"
+ height="550"
min_height="510"
width="333"
top_pad="0"
- follows="top|left"
+ follows="all"
/>
- <panel
- visible="true"
- name="bottom_panel"
- height="50"
- left="0"
- top_pad="3"
- follows="bottom|left"
- width="333">
- <button
- follows="bottom|left"
- tool_tip="Show additional options"
- height="18"
- image_disabled="OptionsMenu_Disabled"
- image_selected="OptionsMenu_Press"
- image_unselected="OptionsMenu_Off"
- layout="topleft"
- left="10"
- name="options_gear_btn"
- top="6"
- width="18" />
- <button
- follows="bottom|left"
- height="18"
- image_selected="AddItem_Press"
- image_unselected="AddItem_Off"
- image_disabled="AddItem_Disabled"
- layout="topleft"
- left_pad="5"
- name="newlook_btn"
- tool_tip="Add new outfit"
- width="18" />
- <dnd_button
- follows="bottom|left"
- height="18"
- image_selected="TrashItem_Press"
- image_unselected="TrashItem_Off"
- layout="topleft"
- right="-5"
- name="trash_btn"
- tool_tip="Remove selected item"
- top="6"
- width="18" />
- <button
- follows="bottom|left"
- height="23"
- label="Wear"
- layout="topleft"
- name="wear_btn"
- right="-5"
- top_pad="0"
- width="90" />
- </panel>
- <!-- <button
- follows="bottom|left"
- height="23"
- label="New outfit"
- layout="topleft"
- left_pad="5"
- right="-10"
- width="100" />-->
+ <!-- <button
+ follows="bottom|left"
+ height="23"
+ label="New outfit"
+ layout="topleft"
+ left_pad="5"
+ right="-10"
+ name="newlook_btn"
+ width="100" />-->
<panel
class="panel_look_info"
filename="panel_look_info.xml"
@@ -167,4 +116,5 @@ left="0"
left="0"
name="panel_edit_wearable"
visible="false" />
-</panel> \ No newline at end of file
+</panel>
+
diff --git a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
index eff2ca1fcd..5b379b54e3 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
@@ -487,7 +487,7 @@
height="25"
label="Open"
layout="topleft"
- left_pad="5"
+ left="5"
name="open_btn"
top="0"
width="60" />
@@ -509,23 +509,5 @@
name="buy_btn"
top="0"
width="60" />
- <button
- follows="bottom|right"
- height="25"
- label="Cancel"
- layout="topleft"
- name="cancel_btn"
- right="-1"
- top="0"
- width="70" />
- <button
- follows="bottom|right"
- height="25"
- label="Save"
- layout="topleft"
- name="save_btn"
- left_pad="-135"
- top="0"
- width="60" />
</panel>
</panel> \ No newline at end of file
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index d6d6aa48d1..59b674b1b8 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -40,67 +40,73 @@ sys.path.append(os.path.join(viewer_dir, '../lib/python/indra/util'))
from llmanifest import LLManifest, main, proper_windows_path, path_ancestors
class ViewerManifest(LLManifest):
+ def is_packaging_viewer(self):
+ # This is overridden by the WindowsManifest sub-class,
+ # which has different behavior if it is not packaging the viewer.
+ return True
+
def construct(self):
super(ViewerManifest, self).construct()
self.exclude("*.svn*")
self.path(src="../../scripts/messages/message_template.msg", dst="app_settings/message_template.msg")
self.path(src="../../etc/message.xml", dst="app_settings/message.xml")
- if self.prefix(src="app_settings"):
- self.exclude("logcontrol.xml")
- self.exclude("logcontrol-dev.xml")
- self.path("*.pem")
- self.path("*.ini")
- self.path("*.xml")
- self.path("*.db2")
-
- # include the entire shaders directory recursively
- self.path("shaders")
- # ... and the entire windlight directory
- self.path("windlight")
- self.end_prefix("app_settings")
-
- if self.prefix(src="character"):
- self.path("*.llm")
- self.path("*.xml")
- self.path("*.tga")
- self.end_prefix("character")
-
- # Include our fonts
- if self.prefix(src="fonts"):
- self.path("*.ttf")
- self.path("*.txt")
- self.end_prefix("fonts")
-
- # skins
- if self.prefix(src="skins"):
- self.path("paths.xml")
- # include the entire textures directory recursively
- if self.prefix(src="*/textures"):
- self.path("*/*.tga")
- self.path("*/*.j2c")
- self.path("*/*.jpg")
- self.path("*/*.png")
- self.path("*.tga")
- self.path("*.j2c")
- self.path("*.jpg")
- self.path("*.png")
- self.path("textures.xml")
- self.end_prefix("*/textures")
- self.path("*/xui/*/*.xml")
- self.path("*/xui/*/widgets/*.xml")
- self.path("*/*.xml")
-
- # Local HTML files (e.g. loading screen)
- if self.prefix(src="*/html"):
- self.path("*.png")
- self.path("*/*/*.html")
- self.path("*/*/*.gif")
- self.end_prefix("*/html")
- self.end_prefix("skins")
-
- # Files in the newview/ directory
- self.path("gpu_table.txt")
+ if self.is_packaging_viewer():
+ if self.prefix(src="app_settings"):
+ self.exclude("logcontrol.xml")
+ self.exclude("logcontrol-dev.xml")
+ self.path("*.pem")
+ self.path("*.ini")
+ self.path("*.xml")
+ self.path("*.db2")
+
+ # include the entire shaders directory recursively
+ self.path("shaders")
+ # ... and the entire windlight directory
+ self.path("windlight")
+ self.end_prefix("app_settings")
+
+ if self.prefix(src="character"):
+ self.path("*.llm")
+ self.path("*.xml")
+ self.path("*.tga")
+ self.end_prefix("character")
+
+ # Include our fonts
+ if self.prefix(src="fonts"):
+ self.path("*.ttf")
+ self.path("*.txt")
+ self.end_prefix("fonts")
+
+ # skins
+ if self.prefix(src="skins"):
+ self.path("paths.xml")
+ # include the entire textures directory recursively
+ if self.prefix(src="*/textures"):
+ self.path("*/*.tga")
+ self.path("*/*.j2c")
+ self.path("*/*.jpg")
+ self.path("*/*.png")
+ self.path("*.tga")
+ self.path("*.j2c")
+ self.path("*.jpg")
+ self.path("*.png")
+ self.path("textures.xml")
+ self.end_prefix("*/textures")
+ self.path("*/xui/*/*.xml")
+ self.path("*/xui/*/widgets/*.xml")
+ self.path("*/*.xml")
+
+ # Local HTML files (e.g. loading screen)
+ if self.prefix(src="*/html"):
+ self.path("*.png")
+ self.path("*/*/*.html")
+ self.path("*/*/*.gif")
+ self.end_prefix("*/html")
+ self.end_prefix("skins")
+
+ # Files in the newview/ directory
+ self.path("gpu_table.txt")
def login_channel(self):
"""Channel reported for login and upgrade purposes ONLY;
@@ -163,6 +169,12 @@ class WindowsManifest(ViewerManifest):
else:
return ''.join(self.channel().split()) + '.exe'
+ def is_packaging_viewer(self):
+ # Some commands, files will only be included
+ # if we are packaging the viewer on windows.
+ # This manifest is also used to copy
+ # files during the build.
+ return 'package' in self.args['actions']
def test_msvcrt_and_copy_action(self, src, dst):
# This is used to test a dll manifest.
@@ -211,22 +223,25 @@ class WindowsManifest(ViewerManifest):
print "Doesn't exist:", src
def enable_crt_manifest_check(self):
- WindowsManifest.copy_action = WindowsManifest.test_msvcrt_and_copy_action
+ if self.is_packaging_viewer():
+ WindowsManifest.copy_action = WindowsManifest.test_msvcrt_and_copy_action
def enable_no_crt_manifest_check(self):
- WindowsManifest.copy_action = WindowsManifest.test_for_no_msvcrt_manifest_and_copy_action
+ if self.is_packaging_viewer():
+ WindowsManifest.copy_action = WindowsManifest.test_for_no_msvcrt_manifest_and_copy_action
def disable_manifest_check(self):
- del WindowsManifest.copy_action
+ if self.is_packaging_viewer():
+ del WindowsManifest.copy_action
def construct(self):
super(WindowsManifest, self).construct()
self.enable_crt_manifest_check()
- # Find secondlife-bin.exe in the 'configuration' dir, then rename it to the result of final_exe.
- self.path(src='%s/secondlife-bin.exe' % self.args['configuration'], dst=self.final_exe())
-
+ if self.is_packaging_viewer():
+ # Find secondlife-bin.exe in the 'configuration' dir, then rename it to the result of final_exe.
+ self.path(src='%s/secondlife-bin.exe' % self.args['configuration'], dst=self.final_exe())
# Plugin host application
self.path(os.path.join(os.pardir,
@@ -316,27 +331,52 @@ class WindowsManifest(ViewerManifest):
if self.prefix(src='../media_plugins/webkit/%s' % self.args['configuration'], dst="llplugin"):
self.path("media_plugin_webkit.dll")
self.end_prefix()
-
- if self.prefix(src="../../libraries/i686-win32/lib/release", dst="llplugin"):
- self.path("libeay32.dll")
- self.path("qtcore4.dll")
- self.path("qtgui4.dll")
- self.path("qtnetwork4.dll")
- self.path("qtopengl4.dll")
- self.path("qtwebkit4.dll")
+
+ if self.args['configuration'].lower() == 'debug':
+ if self.prefix(src=os.path.join(os.pardir, os.pardir, 'libraries', 'i686-win32', 'lib', 'debug'),
+ dst="llplugin"):
+ self.path("libeay32.dll")
+ self.path("qtcored4.dll")
+ self.path("qtguid4.dll")
+ self.path("qtnetworkd4.dll")
+ self.path("qtopengld4.dll")
+ self.path("qtwebkitd4.dll")
+ self.path("ssleay32.dll")
+
+ # For WebKit/Qt plugin runtimes (image format plugins)
+ if self.prefix(src="imageformats", dst="llplugin/imageformats"):
+ self.path("qgifd4.dll")
+ self.path("qicod4.dll")
+ self.path("qjpegd4.dll")
+ self.path("qmngd4.dll")
+ self.path("qsvgd4.dll")
+ self.path("qtiffd4.dll")
+ self.end_prefix()
+
+ self.end_prefix()
+ else:
+ if self.prefix(src=os.path.join(os.pardir, os.pardir, 'libraries', 'i686-win32', 'lib', 'release'),
+ dst="llplugin"):
+ self.path("libeay32.dll")
+ self.path("qtcore4.dll")
+ self.path("qtgui4.dll")
+ self.path("qtnetwork4.dll")
+ self.path("qtopengl4.dll")
+ self.path("qtwebkit4.dll")
self.path("qtxmlpatterns4.dll")
- self.path("ssleay32.dll")
- self.end_prefix()
+ self.path("ssleay32.dll")
+
+ # For WebKit/Qt plugin runtimes (image format plugins)
+ if self.prefix(src="imageformats", dst="llplugin/imageformats"):
+ self.path("qgif4.dll")
+ self.path("qico4.dll")
+ self.path("qjpeg4.dll")
+ self.path("qmng4.dll")
+ self.path("qsvg4.dll")
+ self.path("qtiff4.dll")
+ self.end_prefix()
- # For WebKit/Qt plugin runtimes (image format plugins)
- if self.prefix(src="../../libraries/i686-win32/lib/release/imageformats", dst="llplugin/imageformats"):
- self.path("qgif4.dll")
- self.path("qico4.dll")
- self.path("qjpeg4.dll")
- self.path("qmng4.dll")
- self.path("qsvg4.dll")
- self.path("qtiff4.dll")
- self.end_prefix()
+ self.end_prefix()
self.disable_manifest_check()
@@ -347,6 +387,9 @@ class WindowsManifest(ViewerManifest):
self.path(src='../win_updater/%s/windows-updater.exe' % self.args['configuration'],
dst="updater.exe")
+ if not self.is_packaging_viewer():
+ self.package_file = "copied_deps"
+
def nsi_file_commands(self, install=True):
def wpath(path):
if path.endswith('/') or path.endswith(os.path.sep):