diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/cmake/00-Common.cmake | 2 | ||||
-rw-r--r-- | indra/llrender/llfontregistry.cpp | 31 | ||||
-rw-r--r-- | indra/media_plugins/cef/media_plugin_cef.cpp | 14 | ||||
-rw-r--r-- | indra/newview/llagent.cpp | 7 | ||||
-rw-r--r-- | indra/newview/llagent.h | 2 | ||||
-rw-r--r-- | indra/newview/llinventorybridge.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llmachineid.cpp | 35 | ||||
-rw-r--r-- | indra/newview/llpreviewnotecard.h | 16 | ||||
-rw-r--r-- | indra/newview/llsearchableui.cpp | 19 | ||||
-rw-r--r-- | indra/newview/llsearchableui.h | 2 | ||||
-rw-r--r-- | indra/newview/llselectmgr.cpp | 40 | ||||
-rw-r--r-- | indra/newview/llselectmgr.h | 2 | ||||
-rw-r--r-- | indra/newview/lltoolcomp.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llviewerkeyboard.cpp | 10 | ||||
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/fonts.xml | 1 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_group_general.xml | 2 |
17 files changed, 129 insertions, 61 deletions
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 40fc706a99..03da30649a 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -151,6 +151,8 @@ endif (LINUX) if (DARWIN) + # Warnings should be fatal -- thanks, Nicky Perian, for spotting reversed default + set(CLANG_DISABLE_FATAL_WARNINGS OFF) set(CMAKE_CXX_LINK_FLAGS "-Wl,-headerpad_max_install_names,-search_paths_first") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_CXX_LINK_FLAGS}") set(DARWIN_extra_cstar_flags "-Wno-unused-local-typedef -Wno-deprecated-declarations") diff --git a/indra/llrender/llfontregistry.cpp b/indra/llrender/llfontregistry.cpp index 3c829596ce..10896ecb5d 100644 --- a/indra/llrender/llfontregistry.cpp +++ b/indra/llrender/llfontregistry.cpp @@ -44,6 +44,8 @@ using std::map; bool font_desc_init_from_xml(LLXMLNodePtr node, LLFontDescriptor& desc); bool init_from_xml(LLFontRegistry* registry, LLXMLNodePtr node); +const std::string MACOSX_FONT_PATH_LIBRARY = "/Library/Fonts/"; + LLFontDescriptor::LLFontDescriptor(): mStyle(0) { @@ -434,24 +436,35 @@ LLFontGL *LLFontRegistry::createFont(const LLFontDescriptor& desc) ++file_name_it) { LLFontGL *fontp = new LLFontGL; - std::string font_path = local_path + *file_name_it; + string_vec_t font_paths; + font_paths.push_back(local_path + *file_name_it); + font_paths.push_back(sys_path + *file_name_it); +#if LL_DARWIN + font_paths.push_back(MACOSX_FONT_PATH_LIBRARY + *file_name_it); +#endif // *HACK: Fallback fonts don't render, so we can use that to suppress // creation of OpenGL textures for test apps. JC BOOL is_fallback = !is_first_found || !mCreateGLTextures; F32 extra_scale = (is_fallback)?fallback_scale:1.0; - if (!fontp->loadFace(font_path, extra_scale * point_size, - LLFontGL::sVertDPI, LLFontGL::sHorizDPI, 2, is_fallback)) + F32 point_size_scale = extra_scale * point_size; + bool is_font_loaded = false; + for(string_vec_t::iterator font_paths_it = font_paths.begin(); + font_paths_it != font_paths.end(); + ++font_paths_it) { - font_path = sys_path + *file_name_it; - - if (!fontp->loadFace(font_path, extra_scale * point_size, + if (fontp->loadFace(*font_paths_it, point_size_scale, LLFontGL::sVertDPI, LLFontGL::sHorizDPI, 2, is_fallback)) { - LL_INFOS_ONCE("LLFontRegistry") << "Couldn't load font " << *file_name_it << " from path " << local_path << LL_ENDL; - delete fontp; - fontp = NULL; + is_font_loaded = true; + break; } } + if(!is_font_loaded) + { + LL_INFOS_ONCE("LLFontRegistry") << "Couldn't load font " << *file_name_it << LL_ENDL; + delete fontp; + fontp = NULL; + } if(fontp) { diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp index 2bd5526a86..802aa97086 100644 --- a/indra/media_plugins/cef/media_plugin_cef.cpp +++ b/indra/media_plugins/cef/media_plugin_cef.cpp @@ -530,7 +530,12 @@ void MediaPluginCEF::receiveMessage(const char* message_string) } // now we can set page zoom factor - mCEFLib->setPageZoom(message_in.getValueReal("factor")); + F32 factor = (F32)message_in.getValueReal("factor"); +#if LL_DARWIN + //temporary fix for SL-10473: issue with displaying checkboxes on Mojave + factor*=1.001; +#endif + mCEFLib->setPageZoom(factor); // Plugin gets to decide the texture parameters to use. mDepth = 4; @@ -735,6 +740,10 @@ void MediaPluginCEF::receiveMessage(const char* message_string) if (message_name == "set_page_zoom_factor") { F32 factor = (F32)message_in.getValueReal("factor"); +#if LL_DARWIN + //temporary fix for SL-10473: issue with displaying checkboxes on Mojave + factor*=1.001; +#endif mCEFLib->setPageZoom(factor); } if (message_name == "browse_stop") @@ -812,7 +821,8 @@ void MediaPluginCEF::keyEvent(dullahan::EKeyEvent key_event, LLSD native_key_dat // adding new code below in unicodeInput means we don't send ascii chars // here too or we get double key presses on a mac. bool esc_key = (event_umodchars == 27); - if (esc_key || ((unsigned char)event_chars < 0x10 || (unsigned char)event_chars >= 0x7f )) + bool tab_key_up = (event_umodchars == 9) && (key_event == dullahan::EKeyEvent::KE_KEY_UP); + if ((esc_key || ((unsigned char)event_chars < 0x10 || (unsigned char)event_chars >= 0x7f )) && !tab_key_up) { mCEFLib->nativeKeyboardEventOSX(key_event, event_modifiers, event_keycode, event_chars, diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index ba250fa471..4bd3ca9157 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -742,7 +742,7 @@ BOOL LLAgent::getFlying() const //----------------------------------------------------------------------------- // setFlying() //----------------------------------------------------------------------------- -void LLAgent::setFlying(BOOL fly) +void LLAgent::setFlying(BOOL fly, BOOL fail_sound) { if (isAgentAvatarValid()) { @@ -771,7 +771,10 @@ void LLAgent::setFlying(BOOL fly) // parcel doesn't let you start fly // gods can always fly // and it's OK if you're already flying - make_ui_sound("UISndBadKeystroke"); + if (fail_sound) + { + make_ui_sound("UISndBadKeystroke"); + } return; } if( !was_flying ) diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index b1b39b637e..ea6f68c482 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -337,7 +337,7 @@ private: //-------------------------------------------------------------------- public: BOOL getFlying() const; - void setFlying(BOOL fly); + void setFlying(BOOL fly, BOOL fail_sound = FALSE); static void toggleFlying(); static bool enableFlying(); BOOL canFly(); // Does this parcel allow you to fly? diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 00b7732ee9..938adf8a2a 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -7358,8 +7358,7 @@ bool LLFolderViewGroupedItemBridge::canWearSelected(uuid_vec_t item_ids) for (uuid_vec_t::const_iterator it = item_ids.begin(); it != item_ids.end(); ++it) { LLViewerInventoryItem* item = gInventory.getItem(*it); - LLAssetType::EType asset_type = item->getType(); - if (!item || (asset_type >= LLAssetType::AT_COUNT) || (asset_type <= LLAssetType::AT_NONE)) + if (!item || (item->getType() >= LLAssetType::AT_COUNT) || (item->getType() <= LLAssetType::AT_NONE)) { return false; } diff --git a/indra/newview/llmachineid.cpp b/indra/newview/llmachineid.cpp index b0ee8e7fcb..2001359e50 100644 --- a/indra/newview/llmachineid.cpp +++ b/indra/newview/llmachineid.cpp @@ -65,11 +65,11 @@ public: S32 LLMachineID::init() { - memset(static_unique_id,0,sizeof(static_unique_id)); + size_t len = sizeof(static_unique_id); + memset(static_unique_id, 0, len); S32 ret_code = 0; #if LL_WINDOWS # pragma comment(lib, "wbemuuid.lib") - size_t len = sizeof(static_unique_id); // algorithm to detect BIOS serial number found at: // http://msdn.microsoft.com/en-us/library/aa394077%28VS.85%29.aspx @@ -218,16 +218,19 @@ S32 LLMachineID::init() // Get the value of the Name property hr = pclsObj->Get(L"SerialNumber", 0, &vtProp, 0, 0); LL_INFOS("AppInit") << " Serial Number : " << vtProp.bstrVal << LL_ENDL; + // use characters in the returned Serial Number to create a byte array of size len BSTR serialNumber ( vtProp.bstrVal); + unsigned int serial_size = SysStringLen(serialNumber); unsigned int j = 0; - while( vtProp.bstrVal[j] != 0) + + while (j < serial_size) { for (unsigned int i = 0; i < len; i++) { - if (vtProp.bstrVal[j] == 0) + if (j >= serial_size) break; - + static_unique_id[i] = (unsigned int)(static_unique_id[i] + serialNumber[j]); j++; } @@ -254,16 +257,8 @@ S32 LLMachineID::init() ret_code = LLUUID::getNodeID(staticPtr); #endif has_static_unique_id = true; - return ret_code; -} - -S32 LLMachineID::getUniqueID(unsigned char *unique_id, size_t len) -{ - if (has_static_unique_id) - { - memcpy ( unique_id, &static_unique_id, len); - LL_INFOS_ONCE("AppInit") << "UniqueID: 0x"; + LL_INFOS("AppInit") << "UniqueID: 0x"; // Code between here and LL_ENDL is not executed unless the LL_DEBUGS // actually produces output for (size_t i = 0; i < len; ++i) @@ -271,11 +266,21 @@ S32 LLMachineID::getUniqueID(unsigned char *unique_id, size_t len) // Copy each char to unsigned int to hexify. Sending an unsigned // char to a std::ostream tries to represent it as a char, not // what we want here. - unsigned byte = unique_id[i]; + unsigned byte = static_unique_id[i]; LL_CONT << std::hex << std::setw(2) << std::setfill('0') << byte; } // Reset default output formatting to avoid nasty surprises! LL_CONT << std::dec << std::setw(0) << std::setfill(' ') << LL_ENDL; + + return ret_code; +} + + +S32 LLMachineID::getUniqueID(unsigned char *unique_id, size_t len) +{ + if (has_static_unique_id) + { + memcpy ( unique_id, &static_unique_id, len); return 1; } return 0; diff --git a/indra/newview/llpreviewnotecard.h b/indra/newview/llpreviewnotecard.h index 46a6d0ef50..8908078c63 100644 --- a/indra/newview/llpreviewnotecard.h +++ b/indra/newview/llpreviewnotecard.h @@ -47,18 +47,18 @@ public: virtual ~LLPreviewNotecard(); bool saveItem(); - void setObjectID(const LLUUID& object_id); + void setObjectID(const LLUUID& object_id) override; // llview - virtual void draw(); - virtual BOOL handleKeyHere(KEY key, MASK mask); - virtual void setEnabled( BOOL enabled ); + void draw() override; + BOOL handleKeyHere(KEY key, MASK mask) override; + void setEnabled( BOOL enabled ) override; // llfloater - virtual BOOL canClose(); + BOOL canClose() override; // llpanel - virtual BOOL postBuild(); + BOOL postBuild() override; // reach into the text editor, and grab the drag item const LLInventoryItem* getDragItem(); @@ -74,8 +74,8 @@ public: protected: - void updateTitleButtons(); - virtual void loadAsset(); + void updateTitleButtons() override; + void loadAsset() override; bool saveIfNeeded(LLInventoryItem* copyitem = NULL); void deleteNotecard(); diff --git a/indra/newview/llsearchableui.cpp b/indra/newview/llsearchableui.cpp index de90896548..93143eb33f 100644 --- a/indra/newview/llsearchableui.cpp +++ b/indra/newview/llsearchableui.cpp @@ -125,17 +125,13 @@ void ll::statusbar::SearchableItem::setNotHighlighted( ) } } -bool ll::statusbar::SearchableItem::hightlightAndHide( LLWString const &aFilter ) +bool ll::statusbar::SearchableItem::hightlightAndHide(LLWString const &aFilter, bool hide) { - if( mMenu && !mMenu->getVisible() && !mWasHiddenBySearch ) + if ((mMenu && !mMenu->getVisible() && !mWasHiddenBySearch) || dynamic_cast<LLMenuItemTearOffGL*>(mMenu)) return false; setNotHighlighted( ); - bool bVisible(false); - for( tSearchableItemList::iterator itr = mChildren.begin(); itr != mChildren.end(); ++itr ) - bVisible |= (*itr)->hightlightAndHide( aFilter ); - if( aFilter.empty() ) { if( mCtrl ) @@ -143,17 +139,22 @@ bool ll::statusbar::SearchableItem::hightlightAndHide( LLWString const &aFilter return true; } + bool bHighlighted(!hide); if( mLabel.find( aFilter ) != LLWString::npos ) { if( mCtrl ) mCtrl->setHighlighted( true ); - return true; + bHighlighted = true; } - if( mCtrl && !bVisible ) + bool bVisible(false); + for (tSearchableItemList::iterator itr = mChildren.begin(); itr != mChildren.end(); ++itr) + bVisible |= (*itr)->hightlightAndHide(aFilter, !bHighlighted); + + if (mCtrl && !bVisible && !bHighlighted) { mWasHiddenBySearch = true; mMenu->setVisible(FALSE); } - return bVisible; + return bVisible || bHighlighted; } diff --git a/indra/newview/llsearchableui.h b/indra/newview/llsearchableui.h index 42b2866fb6..9741557e49 100644 --- a/indra/newview/llsearchableui.h +++ b/indra/newview/llsearchableui.h @@ -107,7 +107,7 @@ namespace ll SearchableItem(); void setNotHighlighted( ); - bool hightlightAndHide( LLWString const &aFilter ); + bool hightlightAndHide( LLWString const &aFilter, bool hide = true ); }; struct SearchData diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 4a2d545b33..56be902254 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -3857,6 +3857,14 @@ BOOL LLSelectMgr::selectGetAggregateTexturePermissions(LLAggregatePermissions& r return TRUE; } +BOOL LLSelectMgr::isSelfAvatarSelected() +{ + if (mAllowSelectAvatar) + { + return (getSelection()->getObjectCount() == 1) && (getSelection()->getFirstRootObject() == gAgentAvatarp); + } + return FALSE; +} //-------------------------------------------------------------------- // Duplicate objects @@ -6796,8 +6804,28 @@ void LLSelectMgr::pauseAssociatedAvatars() mSelectedObjects->mSelectType = getSelectTypeForObject(object); + bool is_attached = false; if (mSelectedObjects->mSelectType == SELECT_TYPE_ATTACHMENT && - isAgentAvatarValid() && object->getParent() != NULL) + isAgentAvatarValid()) + { + // Selection can be obsolete, confirm that this is an attachment + LLViewerObject* parent = (LLViewerObject*)object->getParent(); + while (parent != NULL) + { + if (parent->isAvatar()) + { + is_attached = true; + break; + } + else + { + parent = (LLViewerObject*)parent->getParent(); + } + } + } + + + if (is_attached) { if (object->isAnimatedObject()) { @@ -6815,14 +6843,12 @@ void LLSelectMgr::pauseAssociatedAvatars() mPauseRequests.push_back(gAgentAvatarp->requestPause()); } } - else + else if (object && object->isAnimatedObject() && object->getControlAvatar()) { - if (object && object->isAnimatedObject() && object->getControlAvatar()) - { - // Is a non-attached animated object. Pause the control avatar. - mPauseRequests.push_back(object->getControlAvatar()->requestPause()); - } + // Is a non-attached animated object. Pause the control avatar. + mPauseRequests.push_back(object->getControlAvatar()->requestPause()); } + } } diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h index caf104178f..9f2ac857a5 100644 --- a/indra/newview/llselectmgr.h +++ b/indra/newview/llselectmgr.h @@ -709,6 +709,8 @@ public: LLPermissions* findObjectPermissions(const LLViewerObject* object); + BOOL isSelfAvatarSelected(); + void selectDelete(); // Delete on simulator void selectForceDelete(); // just delete, no into trash void selectDuplicate(const LLVector3& offset, BOOL select_copy); // Duplicate on simulator diff --git a/indra/newview/lltoolcomp.cpp b/indra/newview/lltoolcomp.cpp index 392c103d7c..f9c327b46e 100644 --- a/indra/newview/lltoolcomp.cpp +++ b/indra/newview/lltoolcomp.cpp @@ -267,7 +267,7 @@ BOOL LLToolCompTranslate::handleHover(S32 x, S32 y, MASK mask) BOOL LLToolCompTranslate::handleMouseDown(S32 x, S32 y, MASK mask) { mMouseDown = TRUE; - gViewerWindow->pickAsync(x, y, mask, pickCallback, /*BOOL pick_transparent*/ TRUE); + gViewerWindow->pickAsync(x, y, mask, pickCallback, /*BOOL pick_transparent*/ TRUE, LLFloaterReg::instanceVisible("build")); return TRUE; } diff --git a/indra/newview/llviewerkeyboard.cpp b/indra/newview/llviewerkeyboard.cpp index b89e1497a1..e930eb20d3 100644 --- a/indra/newview/llviewerkeyboard.cpp +++ b/indra/newview/llviewerkeyboard.cpp @@ -64,7 +64,12 @@ LLViewerKeyboard gViewerKeyboard; void agent_jump( EKeystate s ) { - if( KEYSTATE_UP == s ) return; + static BOOL first_fly_attempt(TRUE); + if (KEYSTATE_UP == s) + { + first_fly_attempt = TRUE; + return; + } F32 time = gKeyboard->getCurKeyElapsedTime(); S32 frame_count = ll_round(gKeyboard->getCurKeyElapsedFrameCount()); @@ -77,7 +82,8 @@ void agent_jump( EKeystate s ) } else { - gAgent.setFlying(TRUE); + gAgent.setFlying(TRUE, first_fly_attempt); + first_fly_attempt = FALSE; gAgent.moveUp(1); } } diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 43e803fe7a..0f086711d9 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -3848,7 +3848,7 @@ void LLViewerWindow::renderSelections( BOOL for_gl_pick, BOOL pick_parcel_walls, BOOL draw_handles = TRUE; - if (tool == LLToolCompTranslate::getInstance() && !all_selected_objects_move) + if (tool == LLToolCompTranslate::getInstance() && !all_selected_objects_move && !LLSelectMgr::getInstance()->isSelfAvatarSelected()) { draw_handles = FALSE; } diff --git a/indra/newview/skins/default/xui/en/fonts.xml b/indra/newview/skins/default/xui/en/fonts.xml index 8b1d50e58f..6ef7195ebf 100644 --- a/indra/newview/skins/default/xui/en/fonts.xml +++ b/indra/newview/skins/default/xui/en/fonts.xml @@ -21,6 +21,7 @@ <file>AppleSDGothicNeo-Regular.otf</file> <file>华文细黑.ttf</file> <file>PingFang.ttc</file> + <file>STIXGeneral.otf</file> </os> </font> diff --git a/indra/newview/skins/default/xui/en/panel_group_general.xml b/indra/newview/skins/default/xui/en/panel_group_general.xml index 26f54bacbc..e34335a2af 100644 --- a/indra/newview/skins/default/xui/en/panel_group_general.xml +++ b/indra/newview/skins/default/xui/en/panel_group_general.xml @@ -214,7 +214,7 @@ Hover your mouse over the options for more help. layout="topleft" left="10" name="group_mature_check" - tool_tip="Sets whether your group contains information rated as Moderate" + tool_tip="Maturity ratings designate the type of content and behavior allowed in a group" top_pad="4" width="190"> <combo_item name="select_mature" value="Select"> |