From b04ca1b069108292d79f47b5ce855028bb5394e0 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Tue, 22 Jun 2010 10:49:22 +0100 Subject: fix java-esque build error in llstartup change. --- indra/newview/llstartup.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llstartup.h b/indra/newview/llstartup.h index 5aa46686e8..cf3c030f08 100644 --- a/indra/newview/llstartup.h +++ b/indra/newview/llstartup.h @@ -93,7 +93,7 @@ public: // Load default fonts not already loaded at start screen static void fontInit(); - static void LLStartUp::copyLibraryGestures(const std::string& same_gender_gestures); + static void copyLibraryGestures(const std::string& same_gender_gestures); // outfit_folder_name can be a folder anywhere in your inventory, // but the name must be a case-sensitive exact match. -- cgit v1.2.3 From 7295e1ee034b3163b2f1c9f4aa11695beb7db8b0 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Tue, 22 Jun 2010 11:07:35 +0100 Subject: EXT-7889 PARTIAL Linux fails to load splash screen and side panel home tab. Start to restore manual glib handling. Backed out changeset ff86a9f5b917 --- indra/llwindow/llwindowsdl.cpp | 2 +- indra/media_plugins/webkit/CMakeLists.txt | 11 +++++++++- indra/media_plugins/webkit/media_plugin_webkit.cpp | 24 ++++++++++++++++++---- 3 files changed, 31 insertions(+), 6 deletions(-) (limited to 'indra') diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index bfdf1147a1..f9c3694459 100644 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -1617,7 +1617,7 @@ void LLWindowSDL::processMiscNativeEvents() pump_timer.setTimerExpirySec(1.0f / 15.0f); do { // Always do at least one non-blocking pump - gtk_main_iteration_do(0); + gtk_main_iteration_do(FALSE); } while (gtk_events_pending() && !pump_timer.hasExpired()); diff --git a/indra/media_plugins/webkit/CMakeLists.txt b/indra/media_plugins/webkit/CMakeLists.txt index 5bccd589d8..812760a116 100644 --- a/indra/media_plugins/webkit/CMakeLists.txt +++ b/indra/media_plugins/webkit/CMakeLists.txt @@ -9,6 +9,7 @@ include(LLPlugin) include(LLMath) include(LLRender) include(LLWindow) +include(UI) include(Linking) include(PluginAPI) include(MediaPluginBase) @@ -38,7 +39,7 @@ add_library(media_plugin_webkit ${media_plugin_webkit_SOURCE_FILES} ) -target_link_libraries(media_plugin_webkit +set(media_plugin_webkit_LINK_LIBRARIES ${LLPLUGIN_LIBRARIES} ${MEDIA_PLUGIN_BASE_LIBRARIES} ${LLCOMMON_LIBRARIES} @@ -46,6 +47,14 @@ target_link_libraries(media_plugin_webkit ${PLUGIN_API_WINDOWS_LIBRARIES} ) +if (LINUX) + list(APPEND media_plugin_webkit_LINK_LIBRARIES + ${UI_LIBRARIES} # for glib/GTK + ) +endif (LINUX) + +target_link_libraries(media_plugin_webkit ${media_plugin_webkit_LINK_LIBRARIES}) + add_dependencies(media_plugin_webkit ${LLPLUGIN_LIBRARIES} ${MEDIA_PLUGIN_BASE_LIBRARIES} diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp index 3c24b4ed22..b607d2f66a 100644 --- a/indra/media_plugins/webkit/media_plugin_webkit.cpp +++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp @@ -43,15 +43,21 @@ #include "llpluginmessageclasses.h" #include "media_plugin_base.h" +#if LL_LINUX +extern "C" { +# include +} +#endif // LL_LINUX + #if LL_WINDOWS -#include +# include #else -#include -#include +# include +# include #endif #if LL_WINDOWS - // *NOTE:Mani - This captures the module handle fo rthe dll. This is used below + // *NOTE:Mani - This captures the module handle for the dll. This is used below // to get the path to this dll for webkit initialization. // I don't know how/if this can be done with apr... namespace { HMODULE gModuleHandle;}; @@ -112,6 +118,16 @@ private: // void update(int milliseconds) { +#if LL_LINUX + // pump glib generously, as Linux browser plugins are on the + // glib main loop, even if the browser itself isn't - ugh + //*TODO: shouldn't this be transparent if Qt was compiled with + // glib mainloop integration? investigate. + GMainContext *mainc = g_main_context_default(); + while(g_main_context_iteration(mainc, FALSE)); +#endif // LL_LINUX + + // pump qt LLQtWebKit::getInstance()->pump( milliseconds ); checkEditState(); -- cgit v1.2.3 From 68c5a7f25cf92c896a6c6a3e431ab4917a14915d Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Tue, 22 Jun 2010 12:20:45 +0100 Subject: EXT-7889 FIXED Linux fails to load splash screen and side panel home tab. --- indra/media_plugins/webkit/linux_volume_catcher.cpp | 5 +++++ indra/media_plugins/webkit/media_plugin_webkit.cpp | 17 +++++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/media_plugins/webkit/linux_volume_catcher.cpp b/indra/media_plugins/webkit/linux_volume_catcher.cpp index 2e7fda865e..5eaef0e1c3 100644 --- a/indra/media_plugins/webkit/linux_volume_catcher.cpp +++ b/indra/media_plugins/webkit/linux_volume_catcher.cpp @@ -47,6 +47,7 @@ extern "C" { #include +#include #include #include @@ -220,6 +221,10 @@ void VolumeCatcherImpl::init() mGotSyms = loadsyms("libpulse-mainloop-glib.so.0"); if (!mGotSyms) return; + // better make double-sure glib itself is initialized properly. + if (!g_thread_supported ()) g_thread_init (NULL); + g_type_init(); + mMainloop = llpa_glib_mainloop_new(g_main_context_default()); if (mMainloop) { diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp index a9ff7bf752..3b00edec4e 100644 --- a/indra/media_plugins/webkit/media_plugin_webkit.cpp +++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp @@ -48,6 +48,7 @@ # define LL_QTWEBKIT_USES_PIXMAPS 0 extern "C" { # include +# include } #else # define LL_QTWEBKIT_USES_PIXMAPS 0 @@ -132,14 +133,14 @@ private: // void update(int milliseconds) { -#if LL_LINUX +#if LL_QTLINUX_DOESNT_HAVE_GLIB // pump glib generously, as Linux browser plugins are on the // glib main loop, even if the browser itself isn't - ugh - //*TODO: shouldn't this be transparent if Qt was compiled with - // glib mainloop integration? investigate. + // This is NOT NEEDED if Qt itself was built with glib + // mainloop integration. GMainContext *mainc = g_main_context_default(); while(g_main_context_iteration(mainc, FALSE)); -#endif // LL_LINUX +#endif // LL_QTLINUX_DOESNT_HAVE_GLIB // pump qt LLQtWebKit::getInstance()->pump( milliseconds ); @@ -213,6 +214,14 @@ private: } std::string application_dir = std::string( cwd ); +#if LL_LINUX + // take care to initialize glib properly, because some + // versions of Qt don't, and we indirectly need it for (some + // versions of) Flash to not crash the browser. + if (!g_thread_supported ()) g_thread_init (NULL); + g_type_init(); +#endif + #if LL_DARWIN // When running under the Xcode debugger, there's a setting called "Break on Debugger()/DebugStr()" which defaults to being turned on. // This causes the environment variable USERBREAK to be set to 1, which causes these legacy calls to break into the debugger. -- cgit v1.2.3 From 4c31f60bba890e5c320c4bc6fd0ca1c5ce741830 Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Tue, 22 Jun 2010 18:33:39 +0100 Subject: EXT-7926 FIXED Fixed crash opening About for non-English locales. Calling std::locale("fr_FR.UTF-8") crashes on Linux and Mac. Or rather, it throws an exception when it doesn't know the locale and we didn't handle the exception. I now catch the exception and output an error rather than crash. Note, this happened because of change 703f3bcf7069, which made us actually pass a real locale string instead of just "C". So, we were never actually supporting a locale for LLStringUtil::formatNumber(). There is therefore an open task of making formatNumber() actually respect the locale. I'll report a separate JIRA to capture that task. --- indra/llcommon/llstring.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp index f14d947734..f5eb552d99 100644 --- a/indra/llcommon/llstring.cpp +++ b/indra/llcommon/llstring.cpp @@ -994,7 +994,14 @@ void LLStringUtil::formatNumber(std::string& numStr, std::string decimals) convertToS32 (decimals, intDecimals); if (!sLocale.empty()) { - strStream.imbue (std::locale(sLocale.c_str())); + // imbue() throws if the locale is unknown! (EXT-7926) + try + { + strStream.imbue(std::locale(sLocale.c_str())); + } catch (const std::exception &e) + { + LL_WARNS_ONCE("Locale") << "Cannot set locale to " << sLocale << LL_ENDL; + } } if (!intDecimals) -- cgit v1.2.3 From ccad528d5fb5889e9826ca045de5e7315be5942e Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Tue, 22 Jun 2010 18:55:04 +0100 Subject: EXT-7926 FIXED Minor typo correction. --- indra/llcommon/llstring.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp index f5eb552d99..ffdac5d411 100644 --- a/indra/llcommon/llstring.cpp +++ b/indra/llcommon/llstring.cpp @@ -994,7 +994,7 @@ void LLStringUtil::formatNumber(std::string& numStr, std::string decimals) convertToS32 (decimals, intDecimals); if (!sLocale.empty()) { - // imbue() throws if the locale is unknown! (EXT-7926) + // std::locale() throws if the locale is unknown! (EXT-7926) try { strStream.imbue(std::locale(sLocale.c_str())); -- cgit v1.2.3 From dfc20a824944d372c6978ca7b89289ec542554a9 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 22 Jun 2010 14:59:34 -0400 Subject: EXT-7926: Remove unreferenced catch-clause variable (MSVC error). --- indra/llcommon/llstring.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp index ffdac5d411..1561bda201 100644 --- a/indra/llcommon/llstring.cpp +++ b/indra/llcommon/llstring.cpp @@ -998,7 +998,7 @@ void LLStringUtil::formatNumber(std::string& numStr, std::string decimals) try { strStream.imbue(std::locale(sLocale.c_str())); - } catch (const std::exception &e) + } catch (const std::exception &) { LL_WARNS_ONCE("Locale") << "Cannot set locale to " << sLocale << LL_ENDL; } -- cgit v1.2.3 From f388efa49a75206223137c328f2a1fe0853d02a7 Mon Sep 17 00:00:00 2001 From: palange Date: Tue, 22 Jun 2010 13:03:56 -0700 Subject: EXT-7925 FIX Added NSTreatUnknownArgumentsAsOpen to setupCocoa() to prevent pop-ups --- indra/llwindow/llwindowmacosx-objc.mm | 5 ++++ indra/newview/Info-SecondLife.plist | 48 +++++++++++++++++------------------ 2 files changed, 29 insertions(+), 24 deletions(-) (limited to 'indra') diff --git a/indra/llwindow/llwindowmacosx-objc.mm b/indra/llwindow/llwindowmacosx-objc.mm index 59b25e1726..3a822a93a6 100644 --- a/indra/llwindow/llwindowmacosx-objc.mm +++ b/indra/llwindow/llwindowmacosx-objc.mm @@ -49,6 +49,11 @@ void setupCocoa() { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + // The following prevents the Cocoa command line parser from trying to open 'unknown' arguements as documents. + // ie. running './secondlife -set Language fr' would cause a pop-up saying can't open document 'fr' + // when init'ing the Cocoa App window. + [[NSUserDefaults standardUserDefaults] setObject:@"NO" forKey:@"NSTreatUnknownArgumentsAsOpen"]; + // This is a bit of voodoo taken from the Apple sample code "CarbonCocoa_PictureCursor": // http://developer.apple.com/samplecode/CarbonCocoa_PictureCursor/index.html diff --git a/indra/newview/Info-SecondLife.plist b/indra/newview/Info-SecondLife.plist index 97e24a0bd5..9bc95f9b95 100644 --- a/indra/newview/Info-SecondLife.plist +++ b/indra/newview/Info-SecondLife.plist @@ -1,5 +1,5 @@ - + CFBundleDevelopmentRegion @@ -18,33 +18,33 @@ APPL CFBundleSignature ???? - CFBundleDocumentTypes - - - CFBundleTypeExtensions - - slurl - - CFBundleTypeIconFile - seconlife - CFBundleTypeMIMETypes - - application/x-grid-location-info - - CFBundleTypeName - Secondlife SLURL + CFBundleDocumentTypes + + + CFBundleTypeExtensions + + slurl + + CFBundleTypeIconFile + seconlife + CFBundleTypeMIMETypes + + application/x-grid-location-info + + CFBundleTypeName + Secondlife SLURL CFBundleTypeOSTypes - SLRL + SLRL - CFBundleTypeRole - Viewer - LSTypeIsPackage + CFBundleTypeRole + Viewer + LSTypeIsPackage - NSDocumentClass - SecondLifeSLURL - - + NSDocumentClass + SecondLifeSLURL + + CFBundleURLTypes -- cgit v1.2.3 From 449de8e6085c1ddb7a4bd9dcd835aecbf45a7d11 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 22 Jun 2010 16:34:31 -0400 Subject: EXT-3616 FIX - avoid bailing out of outfit population too soon. --- indra/newview/llagentwearablesfetch.cpp | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llagentwearablesfetch.cpp b/indra/newview/llagentwearablesfetch.cpp index 931aba1d41..0a2f0e9399 100644 --- a/indra/newview/llagentwearablesfetch.cpp +++ b/indra/newview/llagentwearablesfetch.cpp @@ -48,6 +48,12 @@ public: virtual ~LLOrderMyOutfitsOnDestroy() { + if (LLApp::isExiting()) + { + llwarns << "called during shutdown, skipping" << llendl; + return; + } + const LLUUID& my_outfits_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); if (my_outfits_id.isNull()) return; @@ -241,6 +247,8 @@ LLLibraryOutfitsFetch::LLLibraryOutfitsFetch(const LLUUID& my_outfits_id) : mCurrFetchStep(LOFS_FOLDER), mOutfitsPopulated(false) { + llinfos << "created" << llendl; + mMyOutfitsID = LLUUID::null; mClothingID = LLUUID::null; mLibraryClothingID = LLUUID::null; @@ -250,10 +258,13 @@ LLLibraryOutfitsFetch::LLLibraryOutfitsFetch(const LLUUID& my_outfits_id) : LLLibraryOutfitsFetch::~LLLibraryOutfitsFetch() { + llinfos << "destroyed" << llendl; } void LLLibraryOutfitsFetch::done() { + llinfos << "start" << llendl; + // Delay this until idle() routine, since it's a heavy operation and // we also can't have it run within notifyObservers. doOnIdleOneTime(boost::bind(&LLLibraryOutfitsFetch::doneIdle,this)); @@ -262,6 +273,8 @@ void LLLibraryOutfitsFetch::done() void LLLibraryOutfitsFetch::doneIdle() { + llinfos << "start" << llendl; + gInventory.addObserver(this); // Add this back in since it was taken out during ::done() switch (mCurrFetchStep) @@ -302,6 +315,8 @@ void LLLibraryOutfitsFetch::doneIdle() void LLLibraryOutfitsFetch::folderDone() { + llinfos << "start" << llendl; + LLInventoryModel::cat_array_t cat_array; LLInventoryModel::item_array_t wearable_array; gInventory.collectDescendents(mMyOutfitsID, cat_array, wearable_array, @@ -309,8 +324,7 @@ void LLLibraryOutfitsFetch::folderDone() // Early out if we already have items in My Outfits // except the case when My Outfits contains just initial outfit - if (cat_array.count() > 1 || - cat_array.count() == 1 && cat_array[0]->getUUID() != LLAppearanceMgr::getInstance()->getBaseOutfitUUID()) + if (cat_array.count() > 1) { mOutfitsPopulated = true; return; @@ -348,6 +362,8 @@ void LLLibraryOutfitsFetch::folderDone() void LLLibraryOutfitsFetch::outfitsDone() { + llinfos << "start" << llendl; + LLInventoryModel::cat_array_t cat_array; LLInventoryModel::item_array_t wearable_array; uuid_vec_t folders; @@ -425,6 +441,8 @@ private: // Copy the clothing folders from the library into the imported clothing folder void LLLibraryOutfitsFetch::libraryDone() { + llinfos << "start" << llendl; + if (mImportedClothingID != LLUUID::null) { // Skip straight to fetching the contents of the imported folder @@ -480,6 +498,8 @@ void LLLibraryOutfitsFetch::libraryDone() void LLLibraryOutfitsFetch::importedFolderFetch() { + llinfos << "start" << llendl; + // Fetch the contents of the Imported Clothing Folder uuid_vec_t folders; folders.push_back(mImportedClothingID); @@ -495,6 +515,8 @@ void LLLibraryOutfitsFetch::importedFolderFetch() void LLLibraryOutfitsFetch::importedFolderDone() { + llinfos << "start" << llendl; + LLInventoryModel::cat_array_t cat_array; LLInventoryModel::item_array_t wearable_array; uuid_vec_t folders; @@ -525,6 +547,8 @@ void LLLibraryOutfitsFetch::importedFolderDone() void LLLibraryOutfitsFetch::contentsDone() { + llinfos << "start" << llendl; + LLInventoryModel::cat_array_t cat_array; LLInventoryModel::item_array_t wearable_array; -- cgit v1.2.3 From 056bd69be23f5d3aed9dc3e7fee5650f5309f349 Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Tue, 22 Jun 2010 18:19:27 -0400 Subject: EXT-7781 FIX labels on wearable editor previews are unreadable. Changed text color to white as requested. Verified results are acceptable XUI reviewed by Erica --- indra/newview/skins/default/xui/en/panel_scrolling_param.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/panel_scrolling_param.xml b/indra/newview/skins/default/xui/en/panel_scrolling_param.xml index 78d64620a5..a8cd380f20 100644 --- a/indra/newview/skins/default/xui/en/panel_scrolling_param.xml +++ b/indra/newview/skins/default/xui/en/panel_scrolling_param.xml @@ -12,7 +12,7 @@ layout="topleft" left="12" name="min param text" - text_color="EmphasisColor" + text_color="White" font_shadow="hard" top="120" width="120" /> @@ -22,7 +22,7 @@ layout="topleft" left="155" name="max param text" - text_color="EmphasisColor" + text_color="White" font_shadow="hard" top_delta="0" width="120" /> -- cgit v1.2.3 From 25de07a379aaacfc7eb37dd91f33005acd3791ae Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Tue, 22 Jun 2010 16:14:22 -0700 Subject: EXT-7980 Double-clicking no longer selects contents of number fields reviewed by Richard --- indra/llui/llbutton.cpp | 7 +++++++ indra/llui/llbutton.h | 1 + indra/llui/llspinctrl.cpp | 5 ----- indra/llui/llspinctrl.h | 1 - 4 files changed, 8 insertions(+), 6 deletions(-) (limited to 'indra') diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index 34f3049f2e..c678d78eb5 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -1162,3 +1162,10 @@ void LLButton::resetMouseDownTimer() mMouseDownTimer.stop(); mMouseDownTimer.reset(); } + + +BOOL LLButton::handleDoubleClick(S32 x, S32 y, MASK mask) +{ + // just treat a double click as a second click + return handleMouseDown(x, y, mask); +} \ No newline at end of file diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h index 9bd566d3c9..d7ab030a47 100644 --- a/indra/llui/llbutton.h +++ b/indra/llui/llbutton.h @@ -152,6 +152,7 @@ public: virtual BOOL handleHover(S32 x, S32 y, MASK mask); virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); virtual BOOL handleRightMouseUp(S32 x, S32 y, MASK mask); + virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask); virtual void draw(); /*virtual*/ BOOL postBuild(); diff --git a/indra/llui/llspinctrl.cpp b/indra/llui/llspinctrl.cpp index c0d02fa8e9..ac0c9c3e45 100644 --- a/indra/llui/llspinctrl.cpp +++ b/indra/llui/llspinctrl.cpp @@ -466,8 +466,3 @@ BOOL LLSpinCtrl::handleKeyHere(KEY key, MASK mask) return FALSE; } -BOOL LLSpinCtrl::handleDoubleClick(S32 x, S32 y, MASK mask) -{ - // just treat a double click as a second click - return handleMouseDown(x, y, mask); -} diff --git a/indra/llui/llspinctrl.h b/indra/llui/llspinctrl.h index 06201255d2..00d6f86f83 100644 --- a/indra/llui/llspinctrl.h +++ b/indra/llui/llspinctrl.h @@ -94,7 +94,6 @@ public: virtual BOOL handleScrollWheel(S32 x,S32 y,S32 clicks); virtual BOOL handleKeyHere(KEY key, MASK mask); - virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask); void onEditorCommit(const LLSD& data); static void onEditorGainFocus(LLFocusableElement* caller, void *userdata); -- cgit v1.2.3 From 11ec720a063b73fc042e8b06338b9526835dbb6b Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Tue, 22 Jun 2010 16:55:08 -0700 Subject: adding eol --- indra/llui/llbutton.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index c678d78eb5..39e46a7ccb 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -1168,4 +1168,4 @@ BOOL LLButton::handleDoubleClick(S32 x, S32 y, MASK mask) { // just treat a double click as a second click return handleMouseDown(x, y, mask); -} \ No newline at end of file +} -- cgit v1.2.3