Compare commits

..

14 Commits

Author SHA1 Message Date
Liru Færs
3fec94bb94 Clean up spell check entries properly, yikes.
Thanks for pointing this out, Torric!
2019-12-28 05:54:11 -05:00
Liru Færs
09926d12bb Fix compile, again, oops. 2019-12-28 04:10:21 -05:00
Liru Færs
19bcdae6ac LineEditor: Automatically hide spell check separator when it's not in use
That's the line that likes to linger beneath the menu, looking dumb
so now it won't, yay!
2019-12-28 04:09:35 -05:00
Liru Færs
36025384f4 Space change, remove excess check 2019-12-28 02:22:30 -05:00
Liru Færs
4bdbb89e6f TODONE: create accessor methods for mItems
Adds LLMenuGL::end, LLMenuGL::getItems
Changes LLMenuGL::find to a const function returning a const_iterator
2019-12-28 01:43:01 -05:00
Liru Færs
e94314dc95 LLMenuGL::getItemCount should be const and return size_type
Also put it in the header.
2019-12-28 01:21:33 -05:00
Liru Færs
5dd68a4055 Actually make use of the item_list_t typedef 2019-12-28 00:31:45 -05:00
Liru Færs
fff4e9b4b8 Add optional name parameter to addSeparator 2019-12-28 00:23:46 -05:00
Liru Færs
8a6f5b49a3 Merge branch 'master' of https://github.com/RouterGray/SingularityViewer 2019-12-27 20:19:49 -05:00
Router Gray
c8290b913e [CMake] Change remaining WORD_SIZE references to ADDDRESS_SIZE. 2019-12-27 06:16:59 -06:00
Liru Færs
e6e6d811c6 Updating crashpad 2019-12-25 21:33:51 -05:00
Router Gray
cdc35b3c32 [CMake] Remove add_dependency entries for items listed in target_link_libraries. Superfluous. (Alchemy sync)
Fixes Linux build errors.
2019-12-25 09:08:56 -06:00
Router Gray
c68e00730e [CMake Linux] Only include pthread and rt in target_link_libraries for ld.gold support (Alchemy sync)
Fixes CMake warnings on Linux
2019-12-25 09:08:48 -06:00
Router Gray
0496374328 [CMake] Use POSITION_INDEPENDENT_CODE property instead of manually setting -fPIC (Alchemy sync) 2019-12-25 09:08:40 -06:00
25 changed files with 133 additions and 222 deletions

View File

@@ -410,11 +410,11 @@
<key>archive</key>
<map>
<key>hash</key>
<string>849f515d4d77162c15614ebff8599c13</string>
<string>4614b29cc98021cf1770a8290171602b</string>
<key>hash_algorithm</key>
<string>md5</string>
<key>url</key>
<string>https://pkg.alchemyviewer.org/repository/autobuild-external/crashpad/windows/crashpad-365c520b.6-windows-6.tar.bz2</string>
<string>https://pkg.alchemyviewer.org/repository/autobuild-external/crashpad/windows/crashpad-ce32d093.7-windows-7.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
@@ -424,18 +424,18 @@
<key>archive</key>
<map>
<key>hash</key>
<string>7ea820b6a2cfa172f47d673c07dfa62c</string>
<string>d801461b7a6a40fffab828aa1e01e3e6</string>
<key>hash_algorithm</key>
<string>md5</string>
<key>url</key>
<string>https://pkg.alchemyviewer.org/repository/autobuild-external/crashpad/windows64/crashpad-365c520b.6-windows64-6.tar.bz2</string>
<string>https://pkg.alchemyviewer.org/repository/autobuild-external/crashpad/windows64/crashpad-ce32d093.7-windows64-7.tar.bz2</string>
</map>
<key>name</key>
<string>windows64</string>
</map>
</map>
<key>version</key>
<string>365c520b.6</string>
<string>ce32d093.7</string>
</map>
<key>curl</key>
<map>
@@ -2771,7 +2771,7 @@
<key>options</key>
<array>
<string>-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo</string>
<string>-DWORD_SIZE:STRING=$AUTOBUILD_ADDRSIZE</string>
<string>-DADDRESS_SIZE:STRING=$AUTOBUILD_ADDRSIZE</string>
<string>-DROOT_PROJECT_NAME:STRING=Singularity</string>
<string>-DINSTALL_PROPRIETARY=FALSE</string>
</array>
@@ -2792,7 +2792,7 @@
<key>options</key>
<array>
<string>-DCMAKE_BUILD_TYPE:STRING=Release</string>
<string>-DWORD_SIZE:STRING=$AUTOBUILD_ADDRSIZE</string>
<string>-DADDRESS_SIZE:STRING=$AUTOBUILD_ADDRSIZE</string>
<string>-DROOT_PROJECT_NAME:STRING=Singularity</string>
<string>-DINSTALL_PROPRIETARY=FALSE</string>
</array>
@@ -2943,7 +2943,7 @@
<array>
<string>-G</string>
<string>Ninja</string>
<string>-DWORD_SIZE:STRING=64</string>
<string>-DADDRESS_SIZE:STRING=64</string>
</array>
</map>
<key>default</key>
@@ -2968,7 +2968,7 @@
<array>
<string>-G</string>
<string>Ninja</string>
<string>-DWORD_SIZE:STRING=64</string>
<string>-DADDRESS_SIZE:STRING=64</string>
</array>
</map>
<key>name</key>
@@ -3068,7 +3068,7 @@
</map>
</map>
<key>name</key>
<string>windows64</string>
<string>windows</string>
</map>
</map>
<key>version_file</key>

View File

@@ -39,9 +39,9 @@ if (WINDOWS)
"${CMAKE_C_FLAGS_RELEASE} ${LL_C_FLAGS} /O2 /Zi /MD /MP /fp:fast"
CACHE STRING "C compiler release options" FORCE)
if (WORD_SIZE EQUAL 32)
if (ADDRESS_SIZE EQUAL 32)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE")
endif (WORD_SIZE EQUAL 32)
endif (ADDRESS_SIZE EQUAL 32)
if (FULL_DEBUG_SYMS OR USE_CRASHPAD)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DEBUG:FULL")
@@ -103,9 +103,9 @@ if (WINDOWS)
)
endif (USE_LTO)
if (WORD_SIZE EQUAL 32)
if (ADDRESS_SIZE EQUAL 32)
add_compile_options(/arch:SSE2)
endif (WORD_SIZE EQUAL 32)
endif (ADDRESS_SIZE EQUAL 32)
if (NOT DISABLE_FATAL_WARNINGS)
add_definitions(/WX)
@@ -292,13 +292,13 @@ if (LINUX OR DARWIN)
set(CMAKE_C_FLAGS "${UNIX_WARNINGS} ${CMAKE_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${UNIX_CXX_WARNINGS} ${CMAKE_CXX_FLAGS}")
if (WORD_SIZE EQUAL 32)
if (ADDRESS_SIZE EQUAL 32)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
elseif (WORD_SIZE EQUAL 64)
elseif (ADDRESS_SIZE EQUAL 64)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64")
endif (WORD_SIZE EQUAL 32)
endif (ADDRESS_SIZE EQUAL 32)
endif (LINUX OR DARWIN)

View File

@@ -6,17 +6,17 @@ SET(DEBUG_PKG_CONFIG "YES")
IF("$ENV{PKG_CONFIG_LIBDIR}" STREQUAL "")
# Guess at architecture-specific system library paths.
if (WORD_SIZE EQUAL 32)
if (ADDRESS_SIZE EQUAL 32)
SET(PKG_CONFIG_NO_MULTI_GUESS /usr/lib32 /usr/lib)
SET(PKG_CONFIG_NO_MULTI_LOCAL_GUESS /usr/local/lib32 /usr/local/lib)
SET(PKG_CONFIG_MULTI_GUESS /usr/lib/i386-linux-gnu)
SET(PKG_CONFIG_MULTI_LOCAL_GUESS /usr/local/lib/i386-linux-gnu)
else (WORD_SIZE EQUAL 32)
else (ADDRESS_SIZE EQUAL 32)
SET(PKG_CONFIG_NO_MULTI_GUESS /usr/lib64 /usr/lib)
SET(PKG_CONFIG_NO_MULTI_LOCAL_GUESS /usr/local/lib64 /usr/local/lib)
SET(PKG_CONFIG_MULTI_GUESS /usr/lib/x86_64-linux-gnu)
SET(PKG_CONFIG_MULTI_LOCAL_GUESS /usr/local/lib/x86_64-linux-gnu)
endif (WORD_SIZE EQUAL 32)
endif (ADDRESS_SIZE EQUAL 32)
# Use DPKG architecture, if available.
IF (${DPKG_ARCH})

View File

@@ -2,16 +2,16 @@
include(Prebuilt)
if(WORD_SIZE EQUAL 64)
if(ADDRESS_SIZE EQUAL 64)
set(DISABLE_TCMALLOC TRUE)
endif(WORD_SIZE EQUAL 64)
endif(ADDRESS_SIZE EQUAL 64)
if (STANDALONE)
include(FindGooglePerfTools)
else (STANDALONE)
if (LINUX OR WINDOWS AND NOT WORD_SIZE EQUAL 64)
if (LINUX OR WINDOWS AND NOT ADDRESS_SIZE EQUAL 64)
use_prebuilt_binary(gperftools)
endif (LINUX OR WINDOWS AND NOT WORD_SIZE EQUAL 64)
endif (LINUX OR WINDOWS AND NOT ADDRESS_SIZE EQUAL 64)
if (WINDOWS AND NOT DISABLE_TCMALLOC)
set(TCMALLOC_LIBRARIES libtcmalloc_minimal.lib)
set(TCMALLOC_LINKER_FLAGS "/INCLUDE:\"__tcmalloc\"")

View File

@@ -10,7 +10,6 @@ if (DARWIN)
find_library(CORESERVICES_LIBRARY CoreServices)
endif (DARWIN)
set(LLCOMMON_INCLUDE_DIRS
${LIBS_OPEN_DIR}/cwdebug
${LIBS_OPEN_DIR}/llcommon
@@ -19,14 +18,7 @@ set(LLCOMMON_INCLUDE_DIRS
${Boost_INCLUDE_DIRS}
)
if (LINUX)
# In order to support using ld.gold on linux, we need to explicitely
# specify all libraries that llcommon uses.
# llcommon uses `clock_gettime' which is provided by librt on linux.
set(LLCOMMON_LIBRARIES llcommon rt)
else (LINUX)
set(LLCOMMON_LIBRARIES llcommon)
endif (LINUX)
set(LLCOMMON_LIBRARIES llcommon)
set(LLCOMMON_LINK_SHARED OFF CACHE BOOL "Build the llcommon target as a shared library.")
if(LLCOMMON_LINK_SHARED)

View File

@@ -5,10 +5,4 @@ set(LLPLUGIN_INCLUDE_DIRS
${LIBS_OPEN_DIR}/llplugin
)
if (LINUX)
# In order to support using ld.gold on linux, we need to explicitely
# specify all libraries that llplugin uses.
set(LLPLUGIN_LIBRARIES llplugin pthread)
else (LINUX)
set(LLPLUGIN_LIBRARIES llplugin)
endif (LINUX)
set(LLPLUGIN_LIBRARIES llplugin)

View File

@@ -5,11 +5,11 @@ include(Variables)
if (USE_NVAPI)
if (WINDOWS)
use_prebuilt_binary(nvapi)
if (WORD_SIZE EQUAL 32)
if (ADDRESS_SIZE EQUAL 32)
set(NVAPI_LIBRARY nvapi)
elseif (WORD_SIZE EQUAL 64)
elseif (ADDRESS_SIZE EQUAL 64)
set(NVAPI_LIBRARY nvapi64)
endif (WORD_SIZE EQUAL 32)
endif (ADDRESS_SIZE EQUAL 32)
else (WINDOWS)
set(NVAPI_LIBRARY "")
endif (WINDOWS)

View File

@@ -119,7 +119,6 @@ endif (NOT CMAKE_BUILD_TYPE)
# If someone has specified an address size, use that to determine the
# architecture. Otherwise, let the architecture specify the address size.
set(ADDRESS_SIZE ${WORD_SIZE})
if (ADDRESS_SIZE EQUAL 32)
#message(STATUS "ADDRESS_SIZE is 32")
set(ARCH i686)

View File

@@ -269,12 +269,6 @@ list(APPEND llcommon_SOURCE_FILES ${cwdebug_SOURCE_FILES})
list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES})
if(NOT WORD_SIZE EQUAL 32)
if(NOT WINDOWS)
add_definitions(-fPIC)
endif(NOT WINDOWS)
endif(NOT WORD_SIZE EQUAL 32)
if(LLCOMMON_LINK_SHARED)
add_library (llcommon SHARED ${llcommon_SOURCE_FILES})
if(WINDOWS)
@@ -286,6 +280,8 @@ else(LLCOMMON_LINK_SHARED)
add_library (llcommon ${llcommon_SOURCE_FILES})
endif(LLCOMMON_LINK_SHARED)
set_target_properties(llcommon PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
target_link_libraries(
llcommon
PUBLIC
@@ -304,6 +300,7 @@ target_link_libraries(
${Boost_SYSTEM_LIBRARY}
${CORESERVICES_LIBRARY}
${URIPARSER_LIBRARY}
${RT_LIBRARY}
)
if (DARWIN)

View File

@@ -227,7 +227,8 @@ target_link_libraries(
${OPENSSL_LIBRARIES}
${CRYPTO_LIBRARIES}
${XMLRPCEPI_LIBRARIES}
)
${PTHREAD_LIBRARY}
)
# tests
if (LL_TESTS)

View File

@@ -7,6 +7,7 @@ include(LLCommon)
include(LLMath)
include(LLMessage)
include(LLRender)
include(Boost)
include_directories(
${LLCOMMON_INCLUDE_DIRS}
@@ -46,14 +47,6 @@ set(llplugin_HEADER_FILES
set_source_files_properties(${llplugin_HEADER_FILES}
PROPERTIES HEADER_FILE_ONLY TRUE)
if(NOT WORD_SIZE EQUAL 32)
if(WINDOWS)
# add_definitions(/FIXED:NO)
else(WINDOWS) # not windows therefore gcc LINUX and DARWIN
add_definitions(-fPIC)
endif(WINDOWS)
endif (NOT WORD_SIZE EQUAL 32)
list(APPEND llplugin_SOURCE_FILES ${llplugin_HEADER_FILES})
add_library (llplugin ${llplugin_SOURCE_FILES})
@@ -67,6 +60,8 @@ else()
)
endif()
set_target_properties(llplugin PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
add_subdirectory(slplugin)
# # Add tests

View File

@@ -1,7 +1,6 @@
project(SLPlugin)
include(00-Common)
include(Linking)
include(LLCommon)
include(LLPlugin)
include(Linking)
@@ -69,12 +68,7 @@ target_link_libraries(SLPlugin
${LLCOMMON_LIBRARIES}
${APRUTIL_LIBRARIES}
${PLUGIN_API_WINDOWS_LIBRARIES}
)
add_dependencies(SLPlugin
${LLPLUGIN_LIBRARIES}
${LLMESSAGE_LIBRARIES}
${LLCOMMON_LIBRARIES}
${PTHREAD_LIBRARY}
)
if (DARWIN)

View File

@@ -181,7 +181,6 @@ LLLineEditor::LLLineEditor(const std::string& name, const LLRect& rect,
// make the popup menu available
LLMenuGL* menu = LLUICtrlFactory::getInstance()->buildMenu("menu_texteditor.xml", LLMenuGL::sMenuContainer);
menu->addSeparator();
//menu->setBackgroundColor(gColors.getColor("MenuPopupBgColor"));
menu->setCanTearOff(FALSE);
menu->setVisible(FALSE);
@@ -3006,54 +3005,48 @@ void LLLineEditor::showContextMenu(S32 x, S32 y)
{
gEditMenuHandler = this;
LLMenuGL* menu = (LLMenuGL*)mContextMenuHandle.get();
if (menu)
if(menu->isOpen())
{
if(menu->isOpen())
{
menu->setVisible(FALSE);
}
// spell_check="true" in xui
if (!mReadOnly && mSpellCheckable)
{
// search for word matches
S32 wordStart = 0;
S32 wordLen = 0;
S32 pos = calculateCursorFromMouse(x);
if (getWordBoundriesAt(pos, &wordStart, &wordLen))
{
const auto selectedWord = wstring_to_utf8str(getWText().substr(wordStart, wordLen));
if (!glggHunSpell->isSpelledRight(selectedWord))
{
//misspelled word here, and you have just right clicked on it!
for (const auto& word : glggHunSpell->getSuggestionList(selectedWord))
{
menu->addChild(new LLMenuItemCallGL(word, spell_correct, nullptr, this));
}
menu->addChild(new LLMenuItemCallGL("Add Word", spell_add, nullptr, this));
}
}
const std::string showstr("Show Misspellings"), hidestr("Hide Misspellings");
bool show = !glggHunSpell->getSpellCheckHighlight();
auto word = show ? showstr : hidestr;
if (!menu->hasChild(word))
{
menu->addChild(new LLMenuItemCallGL(word, spell_show, nullptr, show ? &show : nullptr));
if (auto child = menu->getChild<LLView>(show ? hidestr : showstr, false, false))
menu->removeChild(child);
}
}
mLastContextMenuX = x;
menu->buildDrawLabels();
menu->updateParent(LLMenuGL::sMenuContainer);
LLMenuGL::showPopup(this, menu, x, y);
menu->setVisible(FALSE);
}
// spell_check="true" in xui
if (!mReadOnly && mSpellCheckable)
{
constexpr auto spell_sep = "Spell Check Sep";
// Remove everything after the separator if we added it, because menus don't autodie yet.
for (auto menu_end = menu->end(), menu_it = menu->find(menu->findChild<LLMenuItemGL>(spell_sep)); menu_it != menu_end; ++menu_it)
menu->removeChild(*menu_it);
menu->addSeparator(spell_sep);
// search for word matches
S32 wordStart = 0;
S32 wordLen = 0;
S32 pos = calculateCursorFromMouse(x);
if (getWordBoundriesAt(pos, &wordStart, &wordLen))
{
const auto selectedWord = wstring_to_utf8str(getWText().substr(wordStart, wordLen));
if (!glggHunSpell->isSpelledRight(selectedWord))
{
//misspelled word here, and you have just right clicked on it!
for (const auto& word : glggHunSpell->getSuggestionList(selectedWord))
{
menu->addChild(new LLMenuItemCallGL(word, spell_correct, nullptr, this));
}
menu->addChild(new LLMenuItemCallGL("Add Word", spell_add, nullptr, this));
}
}
bool show = !glggHunSpell->getSpellCheckHighlight();
menu->addChild(new LLMenuItemCallGL(show ? "Show Misspellings" : "Hide Misspellings", spell_show, nullptr, show ? menu : nullptr));
}
mLastContextMenuX = x;
menu->buildDrawLabels();
menu->updateParent(LLMenuGL::sMenuContainer);
LLMenuGL::showPopup(this, menu, x, y);
}
}

View File

@@ -692,16 +692,17 @@ BOOL LLMenuItemSeparatorGL::handleHover(S32 x, S32 y, MASK mask)
// This class represents a vertical separator.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class LLMenuItemVerticalSeparatorGL
class LLMenuItemVerticalSeparatorGL final
: public LLMenuItemSeparatorGL
{
public:
LLMenuItemVerticalSeparatorGL( void );
LLMenuItemVerticalSeparatorGL(const std::string& name = LLStringUtil::null);
BOOL handleMouseDown(S32 x, S32 y, MASK mask) override { return FALSE; }
};
LLMenuItemVerticalSeparatorGL::LLMenuItemVerticalSeparatorGL( void )
LLMenuItemVerticalSeparatorGL::LLMenuItemVerticalSeparatorGL(const std::string& name)
: LLMenuItemSeparatorGL(name)
{
setLabel( VERTICAL_SEPARATOR_LABEL );
}
@@ -826,15 +827,15 @@ U32 LLMenuItemTearOffGL::getNominalHeight( void ) const
// This class represents a blank, non-functioning item.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class LLMenuItemBlankGL : public LLMenuItemGL
class LLMenuItemBlankGL final : public LLMenuItemGL
{
public:
LLMenuItemBlankGL( void ) : LLMenuItemGL( LLStringUtil::null, LLStringUtil::null )
LLMenuItemBlankGL(const std::string& name = LLStringUtil::null) : LLMenuItemGL(name, LLStringUtil::null)
{
setEnabled(FALSE);
}
virtual void onCommit( void ) {}
virtual void draw( void ) {}
void onCommit() override {}
void draw() override {}
};
@@ -3193,7 +3194,7 @@ void LLMenuGL::insert(S32 position, LLView* ctrl, bool arrange /*= true*/)
std::advance(position_iter, position);
insert(position_iter, item, arrange);
}
void LLMenuGL::insert(item_list_t::iterator position_iter, LLMenuItemGL* item, bool arrange /*= true*/)
void LLMenuGL::insert(item_list_t::const_iterator position_iter, LLMenuItemGL* item, bool arrange /*= true*/)
{
mItems.insert(position_iter, item);
LLUICtrl::addChild(item);
@@ -3243,9 +3244,9 @@ BOOL LLMenuGL::append( LLMenuItemGL* item )
}
// add a separator to this menu
BOOL LLMenuGL::addSeparator()
BOOL LLMenuGL::addSeparator(const std::string& name)
{
LLMenuItemGL* separator = new LLMenuItemSeparatorGL();
LLMenuItemGL* separator = new LLMenuItemSeparatorGL(name);
return addChild(separator);
}
@@ -3332,11 +3333,6 @@ void LLMenuGL::setTornOff(BOOL torn_off)
mTornOff = torn_off;
}
U32 LLMenuGL::getItemCount()
{
return mItems.size();
}
LLMenuItemGL* LLMenuGL::getItem(S32 number)
{
if (number >= 0 && number < (S32)mItems.size())
@@ -4197,10 +4193,10 @@ S32 LLMenuBarGL::getRightmostMenuEdge()
}
// add a vertical separator to this menu
BOOL LLMenuBarGL::addSeparator()
BOOL LLMenuBarGL::addSeparator(const std::string& name)
{
LLMenuItemGL* separator = new LLMenuItemVerticalSeparatorGL();
return append( separator );
LLMenuItemGL* separator = new LLMenuItemVerticalSeparatorGL(name);
return append(separator);
}
// add a menu - this will create a drop down menu.
@@ -5361,9 +5357,9 @@ BOOL LLPieMenu::append(LLMenuItemGL *item)
}
// virtual
BOOL LLPieMenu::addSeparator()
BOOL LLPieMenu::addSeparator(const std::string& name)
{
return append( new LLMenuItemBlankGL() );
return append(new LLMenuItemBlankGL(name));
}
// virtual

View File

@@ -490,7 +490,7 @@ public:
void setCanTearOff(BOOL tear_off);
// add a separator to this menu
virtual BOOL addSeparator();
virtual BOOL addSeparator(const std::string& name = LLStringUtil::null);
// for branching menu items, bring sub menus up to root level of menu hierarchy
virtual void updateParent( LLView* parentp );
@@ -530,13 +530,22 @@ public:
// add new item at position
void insert(S32 begin, LLView* ctrl, bool arrange = true);
void insert(std::list<LLMenuItemGL*>::iterator position_iter, LLMenuItemGL* item, bool arrange = true);
typedef std::list<LLMenuItemGL*> item_list_t;
void insert(item_list_t::const_iterator position_iter, LLMenuItemGL* item, bool arrange = true);
// find an item's position
std::list<LLMenuItemGL*>::iterator find(LLMenuItemGL* item) { return std::find(mItems.begin(), mItems.end(), item); }
item_list_t::const_iterator find(LLMenuItemGL* item) const { return std::find(mItems.begin(), mItems.end(), item); }
// end of items, for use with other members that return an iterator
item_list_t::const_iterator end() const { return mItems.cend(); }
// get list of items
const item_list_t& getItems() const { return mItems; }
// number of menu items
item_list_t::size_type LLMenuGL::getItemCount() const { return mItems.size(); }
void setItemLastSelected(LLMenuItemGL* item); // must be in menu
U32 getItemCount(); // number of menu items
LLMenuItemGL* getItem(S32 number); // 0 = first item
LLMenuItemGL* getHighlightedItem();
@@ -591,9 +600,8 @@ public:
virtual BOOL appendMenu( LLMenuGL* menu );
protected:
// TODO: create accessor methods for these?
typedef std::list< LLMenuItemGL* > item_list_t;
item_list_t mItems;
// TODO: create accessor methods for these?
LLMenuItemGL*mFirstVisibleItem;
LLMenuItemGL *mArrowUpItem, *mArrowDownItem;
@@ -764,7 +772,7 @@ public:
private:
virtual BOOL append(LLMenuItemGL* item);
public:
virtual BOOL addSeparator();
virtual BOOL addSeparator(const std::string& name = LLStringUtil::null) override final;
virtual void arrange( void );
@@ -844,7 +852,7 @@ public:
/*virtual*/ BOOL jumpKeysActive();
// add a vertical separator to this menu
virtual BOOL addSeparator();
virtual BOOL addSeparator(const std::string& name = LLStringUtil::null) override final;
// LLView Functionality
virtual BOOL handleHover( S32 x, S32 y, MASK mask );

View File

@@ -1532,18 +1532,18 @@ if (WINDOWS)
endif (ADDRESS_SIZE EQUAL 64)
if (USE_FMODSTUDIO)
if (WORD_SIZE EQUAL 64)
if (ADDRESS_SIZE EQUAL 64)
list(APPEND COPY_INPUT_DEPENDENCIES
${SHARED_LIB_STAGING_DIR}/Release/fmod64.dll
${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/fmod64.dll
${SHARED_LIB_STAGING_DIR}/Debug/fmodL64.dll
)
else (WORD_SIZE EQUAL 64)
else (ADDRESS_SIZE EQUAL 64)
list(APPEND COPY_INPUT_DEPENDENCIES
${SHARED_LIB_STAGING_DIR}/Release/fmod.dll
${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/fmod.dll
)
endif (WORD_SIZE EQUAL 64)
endif (ADDRESS_SIZE EQUAL 64)
endif (USE_FMODSTUDIO)
if(MSVC_IDE)

View File

@@ -10009,7 +10009,7 @@ void parse_simulator_features()
LLMenuGL* menu = dynamic_cast<LLMenuGL*>(marker->getParent());
if (!menu) continue;
std::list<LLMenuItemGL*>::iterator it = menu->find(marker);
auto it = menu->find(marker);
for (LLSD::map_iterator j = i->second.beginMap(); j != i->second.endMap(); ++j)
{

View File

@@ -1,5 +1,7 @@
# -*- cmake -*-
include(Variables)
add_subdirectory(base_basic)
add_subdirectory(base_media)
add_subdirectory(filepicker)

View File

@@ -15,14 +15,6 @@ include_directories(
### basic_plugin_base
if(NOT WORD_SIZE EQUAL 32)
if(WINDOWS)
# add_definitions(/FIXED:NO)
else(WINDOWS) # not windows therefore gcc LINUX and DARWIN
add_definitions(-fPIC)
endif(WINDOWS)
endif (NOT WORD_SIZE EQUAL 32)
set(basic_plugin_base_SOURCE_FILES
basic_plugin_base.cpp
)
@@ -42,6 +34,8 @@ add_library(basic_plugin_base
${basic_plugin_base_SOURCE_FILES}
)
set_target_properties(basic_plugin_base PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
target_link_libraries(basic_plugin_base
PUBLIC
llcommon

View File

@@ -29,14 +29,6 @@ include_directories(
### media_plugin_base
if(NOT WORD_SIZE EQUAL 32)
if(WINDOWS)
# add_definitions(/FIXED:NO)
else(WINDOWS) # not windows therefore gcc LINUX and DARWIN
add_definitions(-fPIC)
endif(WINDOWS)
endif (NOT WORD_SIZE EQUAL 32)
set(media_plugin_base_SOURCE_FILES
media_plugin_base.cpp
)
@@ -56,6 +48,8 @@ add_library(media_plugin_base
${media_plugin_base_SOURCE_FILES}
)
set_target_properties(media_plugin_base PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
target_link_libraries(media_plugin_base
PUBLIC
llcommon

View File

@@ -2,6 +2,7 @@
project(media_plugin_cef)
include(Boost)
include(00-Common)
include(LLCommon)
include(LLImage)
@@ -14,6 +15,7 @@ include(PluginAPI)
include(MediaPluginBase)
include(OpenGL)
include(PulseAudio)
include(UI)
include(CEFPlugin)
@@ -35,12 +37,6 @@ include_directories(SYSTEM
### media_plugin_cef
if(NOT WORD_SIZE EQUAL 32)
if(NOT WINDOWS) # not windows therefore gcc LINUX and DARWIN
add_definitions(-fPIC)
endif(NOT WINDOWS)
endif(NOT WORD_SIZE EQUAL 32)
set(media_plugin_cef_SOURCE_FILES
media_plugin_cef.cpp
)
@@ -52,11 +48,10 @@ set(media_plugin_cef_HEADER_FILES
set (media_plugin_cef_LINK_LIBRARIES
${LLPLUGIN_LIBRARIES}
${MEDIA_PLUGIN_BASE_LIBRARIES}
${LLCOMMON_LIBRARIES}
${CEF_PLUGIN_LIBRARIES}
${LLCOMMON_LIBRARIES}
${PLUGIN_API_WINDOWS_LIBRARIES})
# Select which VolumeCatcher implementation to use
if (LINUX)
if (PULSEAUDIO_FOUND)
@@ -89,11 +84,7 @@ add_library(media_plugin_cef
${media_plugin_cef_SOURCE_FILES}
)
add_dependencies(media_plugin_cef
${LLPLUGIN_LIBRARIES}
${MEDIA_PLUGIN_BASE_LIBRARIES}
${LLCOMMON_LIBRARIES}
)
set_target_properties(media_plugin_cef PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
target_link_libraries(media_plugin_cef
${media_plugin_cef_LINK_LIBRARIES}

View File

@@ -17,14 +17,6 @@ include_directories(
### basic_plugin_example
if(NOT WORD_SIZE EQUAL 32)
if(WINDOWS)
# add_definitions(/FIXED:NO)
else(WINDOWS) # not windows therefore gcc LINUX and DARWIN
add_definitions(-fPIC)
endif(WINDOWS)
endif (NOT WORD_SIZE EQUAL 32)
set(basic_plugin_example_SOURCE_FILES
basic_plugin_example.cpp
)
@@ -34,13 +26,9 @@ add_library(basic_plugin_example
${basic_plugin_example_SOURCE_FILES}
)
target_link_libraries(basic_plugin_example
${LLPLUGIN_LIBRARIES}
${LLCOMMON_LIBRARIES}
${BASIC_PLUGIN_BASE_LIBRARIES}
)
set_target_properties(basic_plugin_example PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
add_dependencies(basic_plugin_example
target_link_libraries(basic_plugin_example
${LLPLUGIN_LIBRARIES}
${LLCOMMON_LIBRARIES}
${BASIC_PLUGIN_BASE_LIBRARIES}

View File

@@ -28,14 +28,6 @@ include_directories(
### media_plugin_example
if(NOT WORD_SIZE EQUAL 32)
if(WINDOWS)
# add_definitions(/FIXED:NO)
else(WINDOWS) # not windows therefore gcc LINUX and DARWIN
add_definitions(-fPIC)
endif(WINDOWS)
endif (NOT WORD_SIZE EQUAL 32)
set(media_plugin_example_SOURCE_FILES
media_plugin_example.cpp
)
@@ -45,6 +37,8 @@ add_library(media_plugin_example
${media_plugin_example_SOURCE_FILES}
)
set_target_properties(media_plugin_example PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
target_link_libraries(media_plugin_example
${LLPLUGIN_LIBRARIES}
${MEDIA_PLUGIN_BASE_LIBRARIES}
@@ -53,12 +47,6 @@ target_link_libraries(media_plugin_example
${PLUGIN_API_WINDOWS_LIBRARIES}
)
add_dependencies(media_plugin_example
${LLPLUGIN_LIBRARIES}
${MEDIA_PLUGIN_BASE_LIBRARIES}
${LLCOMMON_LIBRARIES}
)
if (WINDOWS)
set_target_properties(
media_plugin_example

View File

@@ -23,14 +23,6 @@ include_directories(
### basic_plugin_filepicker
if(NOT WORD_SIZE EQUAL 32)
if(WINDOWS)
# add_definitions(/FIXED:NO)
else(WINDOWS) # not windows therefore gcc LINUX and DARWIN
add_definitions(-fPIC)
endif(WINDOWS)
endif (NOT WORD_SIZE EQUAL 32)
set(basic_plugin_filepicker_SOURCE_FILES
basic_plugin_filepicker.cpp
legacy.cpp
@@ -71,6 +63,8 @@ if (DARWIN)
set(OSX_FILE_LIBRARIES ${APPKIT_LIBRARY} ${CARBON_LIBRARY} ${IOKIT_LIBRARY})
endif (DARWIN)
set_target_properties(basic_plugin_filepicker PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
target_link_libraries(basic_plugin_filepicker
${LLPLUGIN_LIBRARIES}
${LLCOMMON_LIBRARIES}
@@ -80,12 +74,6 @@ target_link_libraries(basic_plugin_filepicker
${OSX_FILE_LIBRARIES}
)
add_dependencies(basic_plugin_filepicker
${LLPLUGIN_LIBRARIES}
${LLCOMMON_LIBRARIES}
${BASIC_PLUGIN_BASE_LIBRARIES}
)
if (WINDOWS)
set_target_properties(
basic_plugin_filepicker

View File

@@ -13,6 +13,7 @@ include(Linking)
include(PluginAPI)
include(MediaPluginBase)
include(FindOpenGL)
include(Boost)
include(GStreamer010Plugin)
@@ -45,6 +46,8 @@ add_library(media_plugin_gstreamer010
${media_plugin_gstreamer010_SOURCE_FILES}
)
set_target_properties(media_plugin_gstreamer010 PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
target_link_libraries(media_plugin_gstreamer010
${LLPLUGIN_LIBRARIES}
${MEDIA_PLUGIN_BASE_LIBRARIES}
@@ -53,9 +56,3 @@ target_link_libraries(media_plugin_gstreamer010
${GSTREAMER010_LIBRARIES}
)
add_dependencies(media_plugin_gstreamer010
${LLPLUGIN_LIBRARIES}
${MEDIA_PLUGIN_BASE_LIBRARIES}
${LLCOMMON_LIBRARIES}
)