diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/cmake/PNG.cmake | 2 | ||||
-rw-r--r-- | indra/llcommon/llstring.cpp | 2 | ||||
-rw-r--r-- | indra/llimage/llpngwrapper.cpp | 4 | ||||
-rw-r--r-- | indra/llimage/llpngwrapper.h | 2 | ||||
-rw-r--r-- | indra/newview/llappviewer.cpp | 3 | ||||
-rw-r--r-- | indra/newview/lloutfitslist.cpp | 24 | ||||
-rw-r--r-- | indra/newview/llpanellandmarks.cpp | 46 | ||||
-rw-r--r-- | indra/newview/llpanellandmarks.h | 4 | ||||
-rw-r--r-- | indra/newview/llsidetray.cpp | 5 |
9 files changed, 50 insertions, 42 deletions
diff --git a/indra/cmake/PNG.cmake b/indra/cmake/PNG.cmake index 4d0b7b2d8d..f6522d9e2f 100644 --- a/indra/cmake/PNG.cmake +++ b/indra/cmake/PNG.cmake @@ -9,5 +9,5 @@ if (STANDALONE) else (STANDALONE) use_prebuilt_binary(libpng) set(PNG_LIBRARIES png12) - set(PNG_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include) + set(PNG_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/libpng12) endif (STANDALONE) diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp index 33b55d843c..ae7e624a1a 100644 --- a/indra/llcommon/llstring.cpp +++ b/indra/llcommon/llstring.cpp @@ -1112,7 +1112,7 @@ bool LLStringUtil::formatDatetime(std::string& replacement, std::string token, else if(LLStringOps::sMonthList.size() == 12 && code == "%B") { struct tm * gmt = gmtime (&loc_seconds); - replacement = LLStringOps::sWeekDayList[gmt->tm_mon]; + replacement = LLStringOps::sMonthList[gmt->tm_mon]; } else if( !LLStringOps::sDayFormat.empty() && code == "%d" ) { diff --git a/indra/llimage/llpngwrapper.cpp b/indra/llimage/llpngwrapper.cpp index 02043586b2..fe737e2072 100644 --- a/indra/llimage/llpngwrapper.cpp +++ b/indra/llimage/llpngwrapper.cpp @@ -210,7 +210,7 @@ void LLPngWrapper::normalizeImage() } if (mColorType == PNG_COLOR_TYPE_GRAY && mBitDepth < 8) { - png_set_gray_1_2_4_to_8(mReadPngPtr); + png_set_expand_gray_1_2_4_to_8(mReadPngPtr); } if (mColorType == PNG_COLOR_TYPE_GRAY || mColorType == PNG_COLOR_TYPE_GRAY_ALPHA) @@ -358,7 +358,7 @@ void LLPngWrapper::releaseResources() { if (mReadPngPtr || mReadInfoPtr) { - png_destroy_read_struct(&mReadPngPtr, &mReadInfoPtr, png_infopp_NULL); + png_destroy_read_struct(&mReadPngPtr, &mReadInfoPtr, NULL); mReadPngPtr = NULL; mReadInfoPtr = NULL; } diff --git a/indra/llimage/llpngwrapper.h b/indra/llimage/llpngwrapper.h index 0721adea3b..47a4207d66 100644 --- a/indra/llimage/llpngwrapper.h +++ b/indra/llimage/llpngwrapper.h @@ -26,7 +26,7 @@ #ifndef LL_LLPNGWRAPPER_H #define LL_LLPNGWRAPPER_H -#include "libpng12/png.h" +#include "png.h" #include "llimage.h" class LLPngWrapper diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index fd6b8b739d..92a9b83bc5 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -928,8 +928,9 @@ bool LLAppViewer::init() //EXT-7013 - On windows for some locale (Japanese) standard //datetime formatting functions didn't support some parameters such as "weekday". + //Names for days and months localized in xml are also useful for Polish locale(STORM-107). std::string language = LLControlGroup::getInstance(sGlobalSettingsName)->getString("Language"); - if(language == "ja") + if(language == "ja" || language == "pl") { LLStringOps::setupWeekDaysNames(LLTrans::getString("dateTimeWeekdaysNames")); LLStringOps::setupWeekDaysShortNames(LLTrans::getString("dateTimeWeekdaysShortNames")); diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index 0d27abac17..c0f7fa4abf 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -155,27 +155,11 @@ private: void onTakeOff() { - // Take off selected items if there are any - if (mOutfitList->hasItemSelected()) - { - uuid_vec_t selected_uuids; - mOutfitList->getSelectedItemsUUIDs(selected_uuids); - - for (uuid_vec_t::const_iterator it=selected_uuids.begin(); it != selected_uuids.end(); ++it) - { - if (get_is_item_worn(*it)) - { - LLAppearanceMgr::instance().removeItemFromAvatar(*it); - } - } - } - else // or take off the whole selected outfit if no items specified. + // Take off selected outfit. + const LLUUID& selected_outfit_id = getSelectedOutfitID(); + if (selected_outfit_id.notNull()) { - const LLUUID& selected_outfit_id = getSelectedOutfitID(); - if (selected_outfit_id.notNull()) - { - LLAppearanceMgr::instance().takeOffOutfit(selected_outfit_id); - } + LLAppearanceMgr::instance().takeOffOutfit(selected_outfit_id); } } diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index ff15e3f08e..24bf67a000 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -965,12 +965,32 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const || "expand" == command_name ) { - return canSelectedBeModified(command_name); + if (!root_folder_view) return false; + + std::set<LLUUID> selected_uuids = root_folder_view->getSelectionList(); + + // Allow to execute the command only if it can be applied to all selected items. + for (std::set<LLUUID>::const_iterator iter = selected_uuids.begin(); iter != selected_uuids.end(); ++iter) + { + LLFolderViewItem* item = root_folder_view->getItemByID(*iter); + + // If no item is found it might be a folder id. + if (!item) + { + item = root_folder_view->getFolderByID(*iter); + } + if (!item) return false; + + if (!canItemBeModified(command_name, item)) return false; + } + + return true; } else if ( "teleport" == command_name || "more_info" == command_name || "show_on_map" == command_name || "copy_slurl" == command_name + || "rename" == command_name ) { // disable some commands for multi-selection. EXT-1757 @@ -994,13 +1014,16 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const // Disable "Show on Map" if landmark loading is in progress. return !gLandmarkList.isAssetInLoadedCallbackMap(asset_uuid); } + else if ("rename" == command_name) + { + LLFolderViewItem* selected_item = getCurSelectedItem(); + if (!selected_item) return false; + + return canItemBeModified(command_name, selected_item); + } return true; } - else if ("rename" == command_name) - { - return root_folder_view && root_folder_view->getSelectedCount() == 1 && canSelectedBeModified(command_name); - } else if("category" == command_name) { // we can add folder only in Landmarks Accordion @@ -1065,12 +1088,11 @@ Rules: 4. We can not paste folders from Clipboard (processed by LLFolderView::canPaste()) 5. Check LLFolderView/Inventory Bridges rules */ -bool LLLandmarksPanel::canSelectedBeModified(const std::string& command_name) const +bool LLLandmarksPanel::canItemBeModified(const std::string& command_name, LLFolderViewItem* item) const { // validate own rules first - LLFolderViewItem* selected = getCurSelectedItem(); - if (!selected) return false; + if (!item) return false; // nothing can be modified in Library if (mLibraryInventoryPanel == mCurrentSelectedList) return false; @@ -1078,7 +1100,7 @@ bool LLLandmarksPanel::canSelectedBeModified(const std::string& command_name) co bool can_be_modified = false; // landmarks can be modified in any other accordion... - if (isLandmarkSelected()) + if (item->getListener()->getInventoryType() == LLInventoryType::IT_LANDMARK) { can_be_modified = true; @@ -1107,16 +1129,16 @@ bool LLLandmarksPanel::canSelectedBeModified(const std::string& command_name) co } else if ("collapse" == command_name) { - return selected->isOpen(); + return item->isOpen(); } else if ("expand" == command_name) { - return !selected->isOpen(); + return !item->isOpen(); } if (can_be_modified) { - LLFolderViewEventListener* listenerp = selected->getListener(); + LLFolderViewEventListener* listenerp = item->getListener(); if ("cut" == command_name) { diff --git a/indra/newview/llpanellandmarks.h b/indra/newview/llpanellandmarks.h index 2b398decce..0d4402d8cb 100644 --- a/indra/newview/llpanellandmarks.h +++ b/indra/newview/llpanellandmarks.h @@ -127,12 +127,12 @@ private: void onCustomAction(const LLSD& command_name); /** - * Determines if selected item can be modified via context/gear menu. + * Determines if an item can be modified via context/gear menu. * * It validates Places Landmarks rules first. And then LLFolderView permissions. * For now it checks cut/rename/delete/paste actions. */ - bool canSelectedBeModified(const std::string& command_name) const; + bool canItemBeModified(const std::string& command_name, LLFolderViewItem* item) const; void onPickPanelExit( LLPanelPickEdit* pick_panel, LLView* owner, const LLSD& params); /** diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index b0914eee69..9ee504cc4c 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -568,8 +568,9 @@ void LLSideTray::toggleTabButton(LLSideTrayTab* tab) { LLButton* btn = it->second; bool new_state = !btn->getToggleState(); - btn->setToggleState(new_state); - btn->setImageOverlay( new_state ? tab->mImageSelected : tab->mImage ); + btn->setToggleState(new_state); + // Only highlight the tab if side tray is expanded (STORM-157). + btn->setImageOverlay( new_state && !getCollapsed() ? tab->mImageSelected : tab->mImage ); } } |