From 0cf16e6f8f57aa66a14247f5bb50bef6695173de Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Tue, 5 Aug 2014 11:20:58 -0400 Subject: [PATCH 01/19] Allow edit menu shortcuts to work while on login screen~ --- .../skins/default/xui/en-us/menu_login.xml | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/indra/newview/skins/default/xui/en-us/menu_login.xml b/indra/newview/skins/default/xui/en-us/menu_login.xml index 666cce9b4..441c2e0e8 100644 --- a/indra/newview/skins/default/xui/en-us/menu_login.xml +++ b/indra/newview/skins/default/xui/en-us/menu_login.xml @@ -13,6 +13,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + From ce7d0e81bd7d072a7415068bc40f9ffcf3e4741a Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Tue, 5 Aug 2014 12:48:28 -0400 Subject: [PATCH 02/19] Toggle control_name in 's like booleans for visibility, if they exist. Look out for this in the UI Overhaul merge, this is gonna clash big time. --- indra/llui/llfloater.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 16fb57c25..c8be07f43 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -571,6 +571,9 @@ void LLFloater::open() /* Flawfinder: ignore */ setVisibleAndFrontmost(mAutoFocus); } + if (!getControlName().empty()) + setControlValue(true); + onOpen(); } @@ -633,6 +636,9 @@ void LLFloater::close(bool app_quitting) } } + if (!app_quitting && !getControlName().empty()) + setControlValue(false); + // Let floater do cleanup. onClose(app_quitting); } From d3242393e03fd67f210df55da5552fbb120385ac Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Tue, 5 Aug 2014 13:35:42 -0400 Subject: [PATCH 03/19] Better default rect for those two new v3 floaters (destinations and avatar picker) from Latif. --- indra/newview/app_settings/settings.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 73f87037a..64861526c 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -253,10 +253,10 @@ Rect Value - 0 - 0 - 0 - 0 + 30 + 505 + 580 + 275 FloaterAvatarTextRect @@ -6106,10 +6106,10 @@ This should be as low as possible, but too low may break functionality Rect Value - 0 - 0 - 0 - 0 + 30 + 505 + 580 + 275 DestinationGuideShown From 8f8904ad0f2fb6da97c180deadd9d9ffa2607bca Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Tue, 5 Aug 2014 23:25:39 -0400 Subject: [PATCH 04/19] Feature Request: Autoselect the parcel you are on for about land floater when there's no active parcel selection. --- indra/newview/llfloaterland.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index ec1c5acb3..d76a43566 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -257,6 +257,8 @@ LLFloaterLand::~LLFloaterLand() // public void LLFloaterLand::refresh() { + if (LLViewerParcelMgr::getInstance()->selectionEmpty()) + LLViewerParcelMgr::getInstance()->selectParcelAt(gAgent.getPositionGlobal()); mPanelGeneral->refresh(); mPanelObjects->refresh(); mPanelOptions->refresh(); From 1cd0b7005548cbd562c193b3d6bd26eb301e27c3 Mon Sep 17 00:00:00 2001 From: Cinder Biscuits Date: Wed, 6 Aug 2014 09:48:07 -0600 Subject: [PATCH 05/19] Fix filling in MediaAlert notification. --- indra/newview/skins/default/xui/en-us/notifications.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en-us/notifications.xml b/indra/newview/skins/default/xui/en-us/notifications.xml index f9c7e608b..f1315772a 100644 --- a/indra/newview/skins/default/xui/en-us/notifications.xml +++ b/indra/newview/skins/default/xui/en-us/notifications.xml @@ -151,7 +151,7 @@ icon="alert.tga" name="MediaAlert" type="alert"> -The owner of this parcel has requested the following [TYPE] URL to be loaded by your viewer: +The owner of this parcel has requested the following [MEDIA_TYPE] URL to be loaded by your viewer: [URL] From a82443f2714d62043cac716efeedebe0d3f9a794 Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Wed, 6 Aug 2014 23:29:23 -0400 Subject: [PATCH 06/19] Make sure that we have a token when doing sscanf in llinventory.cpp and llviewerobject.cpp Guards against opensim grids that may leave new/blank lines of sorts after their message blocks --- indra/llinventory/llinventory.cpp | 16 ++++++++-------- indra/newview/llviewerobject.cpp | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp index deb25c74c..66a0f0278 100644 --- a/indra/llinventory/llinventory.cpp +++ b/indra/llinventory/llinventory.cpp @@ -178,7 +178,7 @@ BOOL LLInventoryObject::importLegacyStream(std::istream& input_stream) while(input_stream.good()) { input_stream.getline(buffer, MAX_STRING); - sscanf(buffer, " %254s %254s", keyword, valuestr); /* Flawfinder: ignore */ + if (sscanf(buffer, " %254s %254s", keyword, valuestr) < 1) continue; if(0 == strcmp("{",keyword)) { continue; @@ -610,7 +610,7 @@ BOOL LLInventoryItem::importFile(LLFILE* fp) buffer[0] = '\0'; } - sscanf(buffer, " %254s %254s", keyword, valuestr); /* Flawfinder: ignore */ + if (sscanf(buffer, " %254s %254s", keyword, valuestr) < 1) continue; if(0 == strcmp("{",keyword)) { continue; @@ -813,10 +813,10 @@ BOOL LLInventoryItem::importLegacyStream(std::istream& input_stream) while(success && input_stream.good()) { input_stream.getline(buffer, MAX_STRING); - sscanf( /* Flawfinder: ignore */ + if (sscanf( buffer, " %254s %254s", - keyword, valuestr); + keyword, valuestr) < 1) continue; if(0 == strcmp("{",keyword)) { continue; @@ -1489,10 +1489,10 @@ BOOL LLInventoryCategory::importFile(LLFILE* fp) buffer[0] = '\0'; } - sscanf( /* Flawfinder: ignore */ + if (sscanf( buffer, " %254s %254s", - keyword, valuestr); + keyword, valuestr) < 1) continue; if(0 == strcmp("{",keyword)) { continue; @@ -1568,10 +1568,10 @@ BOOL LLInventoryCategory::importLegacyStream(std::istream& input_stream) while(input_stream.good()) { input_stream.getline(buffer, MAX_STRING); - sscanf( /* Flawfinder: ignore */ + if (sscanf( buffer, " %254s %254s", - keyword, valuestr); + keyword, valuestr) < 1) continue; if(0 == strcmp("{",keyword)) { continue; diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 7faea5f98..9ea0c19d5 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -2903,7 +2903,7 @@ BOOL LLViewerObject::loadTaskInvFile(const std::string& filename) while(ifs.good()) { ifs.getline(buffer, MAX_STRING); - sscanf(buffer, " %254s", keyword); /* Flawfinder: ignore */ + if (sscanf(buffer, " %254s", keyword) < 1) continue; if(0 == strcmp("inv_item", keyword)) { LLPointer inv = new LLViewerInventoryItem; From 20ea0968da0c02c5736c8b7c0dd1592bd661c900 Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Thu, 7 Aug 2014 08:31:26 -0400 Subject: [PATCH 07/19] Feature Request from friti: Add a reset button to Depth of Field tab of graphics. Actually should've committed this last night. X3 --- indra/newview/llpaneldisplay.cpp | 13 +++++++++++++ .../xui/en-us/panel_preferences_graphics1.xml | 3 +++ 2 files changed, 16 insertions(+) diff --git a/indra/newview/llpaneldisplay.cpp b/indra/newview/llpaneldisplay.cpp index 43ebbcc34..93978162c 100644 --- a/indra/newview/llpaneldisplay.cpp +++ b/indra/newview/llpaneldisplay.cpp @@ -97,8 +97,21 @@ const F32 MIN_USER_FAR_CLIP = 64.f; const S32 ASPECT_RATIO_STR_LEN = 100; +void reset_all_to_default(const LLView* panel) +{ + LLView::child_list_const_iter_t end(panel->endChild()); + for (LLView::child_list_const_iter_t i = panel->beginChild(); i != end; ++i) + { + const std::string& control_name((*i)->getControlName()); + if (control_name.empty()) continue; + if (control_name == "RenderDepthOfField") continue; // Don't touch render settings *sigh* hack + LLUI::getControlControlGroup(control_name).getControl(control_name)->resetToDefault(true); + } +} + LLPanelDisplay::LLPanelDisplay() { + mCommitCallbackRegistrar.add("Graphics.ResetTab", boost::bind(reset_all_to_default, boost::bind(&LLView::getChildView, this, _2, true, false))); LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_graphics1.xml"); } diff --git a/indra/newview/skins/default/xui/en-us/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en-us/panel_preferences_graphics1.xml index 5e017ec8f..04f20c2be 100644 --- a/indra/newview/skins/default/xui/en-us/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/en-us/panel_preferences_graphics1.xml @@ -145,6 +145,9 @@ when the Atmospheric Shaders are enabled. + [RES_X] x [RES_Y] From 21d54edeb9a6bc4fbf147155e9d1024af8e78256 Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Thu, 7 Aug 2014 20:29:12 -0400 Subject: [PATCH 08/19] Per-slider reset buttons? Sure. Adds callback to registrar: "Prefs.Reset", pass debug setting name as parameter. --- indra/newview/llfloaterpreference.cpp | 6 +++++ indra/newview/llpaneldisplay.cpp | 3 ++- .../xui/en-us/panel_preferences_graphics1.xml | 25 +++++++++++++++---- 3 files changed, 28 insertions(+), 6 deletions(-) diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index a452d1368..403b04099 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -341,9 +341,15 @@ void LLPreferenceCore::setPersonalInfo(const std::string& visibility, bool im_vi ////////////////////////////////////////////// // LLFloaterPreference +void reset_to_default(const std::string& control) +{ + LLUI::getControlControlGroup(control).getControl(control)->resetToDefault(true); +} + LLFloaterPreference::LLFloaterPreference() { mExitWithoutSaving = false; + mCommitCallbackRegistrar.add("Prefs.Reset", boost::bind(reset_to_default, _2)); LLUICtrlFactory::getInstance()->buildFloater(this, "floater_preferences.xml"); } diff --git a/indra/newview/llpaneldisplay.cpp b/indra/newview/llpaneldisplay.cpp index 93978162c..1d4e23ded 100644 --- a/indra/newview/llpaneldisplay.cpp +++ b/indra/newview/llpaneldisplay.cpp @@ -97,6 +97,7 @@ const F32 MIN_USER_FAR_CLIP = 64.f; const S32 ASPECT_RATIO_STR_LEN = 100; +void reset_to_default(const std::string& control); void reset_all_to_default(const LLView* panel) { LLView::child_list_const_iter_t end(panel->endChild()); @@ -105,7 +106,7 @@ void reset_all_to_default(const LLView* panel) const std::string& control_name((*i)->getControlName()); if (control_name.empty()) continue; if (control_name == "RenderDepthOfField") continue; // Don't touch render settings *sigh* hack - LLUI::getControlControlGroup(control_name).getControl(control_name)->resetToDefault(true); + reset_to_default(control_name); } } diff --git a/indra/newview/skins/default/xui/en-us/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en-us/panel_preferences_graphics1.xml index 04f20c2be..a0c5551d4 100644 --- a/indra/newview/skins/default/xui/en-us/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/en-us/panel_preferences_graphics1.xml @@ -141,11 +141,26 @@ when the Atmospheric Shaders are enabled. - - - - - + + + + + + + + + From acb093c277d7c1e0771acab219a7c811159317a9 Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Thu, 7 Aug 2014 20:37:03 -0400 Subject: [PATCH 09/19] Media Filter code cleanup --- indra/newview/llfloatermediafilter.cpp | 2 +- indra/newview/llmediafilter.cpp | 157 ++++++++++--------------- 2 files changed, 61 insertions(+), 98 deletions(-) diff --git a/indra/newview/llfloatermediafilter.cpp b/indra/newview/llfloatermediafilter.cpp index 3384b05a9..3b636484b 100644 --- a/indra/newview/llfloatermediafilter.cpp +++ b/indra/newview/llfloatermediafilter.cpp @@ -74,7 +74,7 @@ void LLFloaterMediaFilter::updateLists(LLMediaFilter::EMediaList list_type) { bool white(list_type == LLMediaFilter::WHITELIST); const LLMediaFilter& inst(LLMediaFilter::instance()); - LLMediaFilter::string_list_t list = white ? inst.getWhiteList() : inst.getBlackList(); + const LLMediaFilter::string_list_t& list = white ? inst.getWhiteList() : inst.getBlackList(); LLScrollListCtrl* scroll(white ? mWhitelist : mBlacklist); scroll->clearRows(); for (LLMediaFilter::string_list_t::const_iterator itr = list.begin(); itr != list.end(); ++itr) diff --git a/indra/newview/llmediafilter.cpp b/indra/newview/llmediafilter.cpp index 9d5dacf1c..5521711d4 100644 --- a/indra/newview/llmediafilter.cpp +++ b/indra/newview/llmediafilter.cpp @@ -56,7 +56,7 @@ void LLMediaFilter::filterMediaUrl(LLParcel* parcel) const std::string domain = extractDomain(url); mCurrentParcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); - U32 enabled = gSavedSettings.getU32("MediaFilterEnable"); + U32 enabled = gSavedSettings.getU32("MediaFilterEnable"); if (enabled > 1 && (filter(domain, WHITELIST) || filter(url, WHITELIST))) { @@ -104,7 +104,7 @@ void LLMediaFilter::filterAudioUrl(const std::string& url) const std::string domain = extractDomain(url); mCurrentParcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); - U32 enabled = gSavedSettings.getU32("MediaFilterEnable"); + U32 enabled = gSavedSettings.getU32("MediaFilterEnable"); if (enabled > 1 && (filter(domain, WHITELIST) || filter(url, WHITELIST))) { @@ -141,7 +141,7 @@ void LLMediaFilter::filterAudioUrl(const std::string& url) bool LLMediaFilter::filter(const std::string& url, EMediaList list) { - const string_list_t p_list = (list == WHITELIST) ? mWhiteList : mBlackList; + const string_list_t& p_list = (list == WHITELIST) ? mWhiteList : mBlackList; string_list_t::const_iterator find_itr = std::find(p_list.begin(), p_list.end(), url); return (find_itr != p_list.end()); } @@ -149,60 +149,34 @@ bool LLMediaFilter::filter(const std::string& url, EMediaList list) // List bizznizz void LLMediaFilter::addToMediaList(const std::string& in_url, EMediaList list, bool extract) { - std::string url = extract ? extractDomain(in_url) : in_url; + const std::string url = extract ? extractDomain(in_url) : in_url; if (url.empty()) { LL_INFOS("MediaFilter") << "No url found. Can't add to list." << LL_ENDL; return; } - switch (list) + string_list_t& p_list(list == WHITELIST ? mWhiteList : mBlackList); + // Check for duplicates + for (string_list_t::const_iterator itr = p_list.begin(); itr != p_list.end(); ++itr) { - case WHITELIST: - // Check for duplicates - for (string_list_t::const_iterator itr = mWhiteList.begin(); itr != mWhiteList.end(); ++itr) - { - if (url == *itr) - { - LL_INFOS("MediaFilter") << "URL " << url << " already in list!" << LL_ENDL; - return; - } - } - mWhiteList.push_back(url); - mMediaListUpdate(WHITELIST); - break; - case BLACKLIST: - for (string_list_t::const_iterator itr = mBlackList.begin(); itr != mBlackList.end(); ++itr) - { - if (url == *itr) - { - LL_INFOS("MediaFilter") << "URL " << url << "already in list!" << LL_ENDL; - return; - } - } - mBlackList.push_back(url); - mMediaListUpdate(BLACKLIST); - break; + if (url == *itr) + { + LL_INFOS("MediaFilter") << "URL " << url << " already in list!" << LL_ENDL; + return; + } } + p_list.push_back(url); + mMediaListUpdate(list); saveMediaFilterToDisk(); } void LLMediaFilter::removeFromMediaList(string_vec_t domains, EMediaList list) { if (domains.empty()) return; - switch (list) - { - case WHITELIST: - for (string_vec_t::const_iterator itr = domains.begin(); itr != domains.end(); ++itr) - mWhiteList.remove(*itr); - mMediaListUpdate(WHITELIST); - break; - case BLACKLIST: - for (string_vec_t::const_iterator itr = domains.begin(); itr != domains.end(); ++itr) - mBlackList.remove(*itr); - mMediaListUpdate(BLACKLIST); - break; - } + for (string_vec_t::const_iterator itr = domains.begin(); itr != domains.end(); ++itr) + (list == WHITELIST ? mWhiteList : mBlackList).remove(*itr); + mMediaListUpdate(list); saveMediaFilterToDisk(); } @@ -242,25 +216,24 @@ void LLMediaFilter::loadMediaFilterFromDisk() } } +void medialist_to_llsd(const LLMediaFilter::string_list_t& list, LLSD& list_llsd, const LLSD& action) +{ + for (LLMediaFilter::string_list_t::const_iterator itr = list.begin(); itr != list.end(); ++itr) + { + LLSD item; + item["domain"] = *itr; + item["action"] = action; + list_llsd.append(item); + } +} + void LLMediaFilter::saveMediaFilterToDisk() const { const std::string medialist_filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, MEDIALIST_XML); LLSD medialist_llsd; - for (string_list_t::const_iterator itr = mWhiteList.begin(); itr != mWhiteList.end(); ++itr) - { - LLSD item; - item["domain"] = *itr; - item["action"] = "allow"; // <- $*#@()&%@ - medialist_llsd.append(item); - } - for (string_list_t::const_iterator itr = mBlackList.begin(); itr != mBlackList.end(); ++itr) - { - LLSD item; - item["domain"] = *itr; - item["action"] = "deny"; // sigh. - medialist_llsd.append(item); - } + medialist_to_llsd(mWhiteList, medialist_llsd, "allow"); // <- $*#@()&%@ + medialist_to_llsd(mBlackList, medialist_llsd, "deny"); // sigh. llofstream medialist; medialist.open(medialist_filename); @@ -268,6 +241,30 @@ void LLMediaFilter::saveMediaFilterToDisk() const medialist.close(); } +void perform_queued_command(LLMediaFilter& inst) +{ + if (U32 command = inst.getQueuedMediaCommand()) + { + if (command == PARCEL_MEDIA_COMMAND_STOP) + { + LLViewerParcelMedia::stop(); + } + else if (command == PARCEL_MEDIA_COMMAND_PAUSE) + { + LLViewerParcelMedia::pause(); + } + else if (command == PARCEL_MEDIA_COMMAND_UNLOAD) + { + LLViewerParcelMedia::stop(); + } + else if (command == PARCEL_MEDIA_COMMAND_TIME) + { + LLViewerParcelMedia::seek(LLViewerParcelMedia::sMediaCommandTime); + } + inst.setQueuedMediaCommand(0); + } +} + bool handle_audio_filter_callback(const LLSD& notification, const LLSD& response, const std::string& url) { LLMediaFilter& inst(LLMediaFilter::instance()); @@ -335,26 +332,9 @@ bool handle_audio_filter_callback(const LLSD& notification, const LLSD& response if (queued_media) inst.filterMediaUrl(queued_media); } - else if (inst.getQueuedMediaCommand()) + else { - U32 command = inst.getQueuedMediaCommand(); - if (command == PARCEL_MEDIA_COMMAND_STOP) - { - LLViewerParcelMedia::stop(); - } - else if (command == PARCEL_MEDIA_COMMAND_PAUSE) - { - LLViewerParcelMedia::pause(); - } - else if (command == PARCEL_MEDIA_COMMAND_UNLOAD) - { - LLViewerParcelMedia::stop(); - } - else if (command == PARCEL_MEDIA_COMMAND_TIME) - { - LLViewerParcelMedia::seek(LLViewerParcelMedia::sMediaCommandTime); - } - inst.setQueuedMediaCommand(0); + perform_queued_command(inst); } return false; @@ -365,7 +345,7 @@ bool handle_media_filter_callback(const LLSD& notification, const LLSD& response LLMediaFilter& inst(LLMediaFilter::instance()); inst.setAlertStatus(false); S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - const std::string url = notification["payload"].asString(); + const std::string& url = notification["payload"].asString(); LLParcel* queue = inst.getQueuedMedia(); switch(option) { @@ -403,26 +383,9 @@ bool handle_media_filter_callback(const LLSD& notification, const LLSD& response inst.clearQueuedAudio(); inst.filterAudioUrl(audio_queue); } - else if (inst.getQueuedMediaCommand()) + else { - U32 command = inst.getQueuedMediaCommand(); - if (command == PARCEL_MEDIA_COMMAND_STOP) - { - LLViewerParcelMedia::stop(); - } - else if (command == PARCEL_MEDIA_COMMAND_PAUSE) - { - LLViewerParcelMedia::pause(); - } - else if (command == PARCEL_MEDIA_COMMAND_UNLOAD) - { - LLViewerParcelMedia::stop(); - } - else if (command == PARCEL_MEDIA_COMMAND_TIME) - { - LLViewerParcelMedia::seek(LLViewerParcelMedia::sMediaCommandTime); - } - inst.setQueuedMediaCommand(0); + perform_queued_command(inst); } return false; @@ -471,6 +434,6 @@ std::string extractDomain(const std::string& in_url) // Now map the whole thing to lowercase, since domain names aren't // case sensitive. - std::transform(url.begin(), url.end(),url.begin(), ::tolower); + std::transform(url.begin(), url.end(), url.begin(), ::tolower); return url; } From 4754c1322d4d74d10121370a518f4afb44f4478a Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Thu, 7 Aug 2014 21:56:25 -0400 Subject: [PATCH 10/19] This should probably be a size_t, perhaps this fixes the win64 mediafilter bug. --- indra/newview/llmediafilter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llmediafilter.cpp b/indra/newview/llmediafilter.cpp index 5521711d4..f96bcb7da 100644 --- a/indra/newview/llmediafilter.cpp +++ b/indra/newview/llmediafilter.cpp @@ -418,7 +418,7 @@ std::string extractDomain(const std::string& in_url) if (pos != std::string::npos) { - S32 count = url.size()-pos+1; + size_t count = url.size()-pos+1; url = url.substr(pos+1, count); } From d7d06c823446404e1b5cd994b53983c20c759e39 Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Fri, 8 Aug 2014 07:07:51 -0400 Subject: [PATCH 11/19] Oh, and this one too, maybe it is fixed now? --- indra/newview/llmediafilter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llmediafilter.cpp b/indra/newview/llmediafilter.cpp index f96bcb7da..4d39b78bb 100644 --- a/indra/newview/llmediafilter.cpp +++ b/indra/newview/llmediafilter.cpp @@ -400,7 +400,7 @@ std::string extractDomain(const std::string& in_url) if (pos != std::string::npos) { - S32 count = url.size()-pos+2; + size_t count = url.size()-pos+2; url = url.substr(pos+2, count); } From 669fe29173c63ff71a8d7f64904f8b36ec1d6c3c Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Fri, 8 Aug 2014 08:26:48 -0400 Subject: [PATCH 12/19] Initialize members of LLMediaFilter, fixes win64 filter being broken. --- indra/newview/llmediafilter.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/indra/newview/llmediafilter.cpp b/indra/newview/llmediafilter.cpp index 4d39b78bb..56d01e422 100644 --- a/indra/newview/llmediafilter.cpp +++ b/indra/newview/llmediafilter.cpp @@ -41,6 +41,10 @@ bool handle_media_filter_callback(const LLSD& notification, const LLSD& response std::string extractDomain(const std::string& in_url); LLMediaFilter::LLMediaFilter() +: mMediaCommandQueue(0) +, mCurrentParcel(NULL) +, mMediaQueue(NULL) +, mAlertActive(false) { loadMediaFilterFromDisk(); } From 90c5219be97c213d125e1bb08354b2dae51d5911 Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Fri, 8 Aug 2014 08:43:24 -0400 Subject: [PATCH 13/19] Move Media Filter from the View menu to the Singularity menu. Moves Media Filter in all translations, no need for translators to worry~ Nomade, please translate the Singularity menu at your discretion.. in menu_viewer.xml --- indra/newview/skins/default/xui/de/menu_viewer.xml | 4 ++-- indra/newview/skins/default/xui/en-us/menu_viewer.xml | 9 ++++----- indra/newview/skins/default/xui/es/menu_viewer.xml | 6 +++--- indra/newview/skins/default/xui/fr/menu_viewer.xml | 4 +++- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/indra/newview/skins/default/xui/de/menu_viewer.xml b/indra/newview/skins/default/xui/de/menu_viewer.xml index 4841e56e3..ff86604f5 100644 --- a/indra/newview/skins/default/xui/de/menu_viewer.xml +++ b/indra/newview/skins/default/xui/de/menu_viewer.xml @@ -95,7 +95,6 @@ - @@ -259,7 +258,7 @@ - + @@ -271,6 +270,7 @@ + diff --git a/indra/newview/skins/default/xui/en-us/menu_viewer.xml b/indra/newview/skins/default/xui/en-us/menu_viewer.xml index 458bb96c8..a9115f61c 100644 --- a/indra/newview/skins/default/xui/en-us/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en-us/menu_viewer.xml @@ -357,11 +357,6 @@ - - - - + + + + diff --git a/indra/newview/skins/default/xui/es/menu_viewer.xml b/indra/newview/skins/default/xui/es/menu_viewer.xml index 24589cfe9..d4b53e57b 100644 --- a/indra/newview/skins/default/xui/es/menu_viewer.xml +++ b/indra/newview/skins/default/xui/es/menu_viewer.xml @@ -75,7 +75,6 @@ - @@ -215,7 +214,7 @@ - + @@ -224,9 +223,10 @@ + - + diff --git a/indra/newview/skins/default/xui/fr/menu_viewer.xml b/indra/newview/skins/default/xui/fr/menu_viewer.xml index dce04a84e..91b4c1b34 100644 --- a/indra/newview/skins/default/xui/fr/menu_viewer.xml +++ b/indra/newview/skins/default/xui/fr/menu_viewer.xml @@ -83,7 +83,6 @@ - @@ -243,4 +242,7 @@ + + + From 3b31fe91a65add978f8cd95fe729bfc46f27eacd Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Fri, 8 Aug 2014 14:52:52 -0400 Subject: [PATCH 14/19] Address Deltek's concern that the Open Attachment button wasn't changing text to just say save when the object is not the openable type. --- indra/newview/llpanelgroupnotices.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp index 74c591f1e..40e450dd7 100644 --- a/indra/newview/llpanelgroupnotices.cpp +++ b/indra/newview/llpanelgroupnotices.cpp @@ -53,6 +53,7 @@ #include "llscrolllistctrl.h" #include "llscrolllistitem.h" #include "lltextbox.h" +#include "lltrans.h" #include "roles_constants.h" #include "llviewerwindow.h" @@ -511,6 +512,7 @@ void LLPanelGroupNotices::onSelectNotice() lldebugs << "Item " << item->getUUID() << " selected." << llendl; } +bool is_openable(LLAssetType::EType type); void LLPanelGroupNotices::showNotice(const std::string& subject, const std::string& message, const bool& has_inventory, @@ -549,6 +551,7 @@ void LLPanelGroupNotices::showNotice(const std::string& subject, mViewInventoryName->setText(ss.str()); mBtnOpenAttachment->setEnabled(TRUE); + mBtnOpenAttachment->setLabel(LLTrans::getString(is_openable(inventory_offer->mType) ? "GroupNotifyOpenAttachment" : "GroupNotifySaveAttachment")); } else { From 54a6db146e5e736f7c77e7b7cbb85dfb576372a8 Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Fri, 8 Aug 2014 14:57:14 -0400 Subject: [PATCH 15/19] Upon further consideration and a bit of feedback, the new matching common characters behavior of gesture autocomplete is probably bad, I've commented it out and brought back the old code. --- indra/newview/llgesturemgr.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp index 1cae093dc..517266097 100644 --- a/indra/newview/llgesturemgr.cpp +++ b/indra/newview/llgesturemgr.cpp @@ -1358,8 +1358,10 @@ BOOL LLGestureMgr::matchPrefix(const std::string& in_str, std::string* out_str) { S32 in_len = in_str.length(); +#ifdef MATCH_COMMON_CHARS std::string rest_of_match = ""; std::string buf = ""; +#endif item_map_t::iterator it; for (it = mActive.begin(); it != mActive.end(); ++it) { @@ -1367,18 +1369,26 @@ BOOL LLGestureMgr::matchPrefix(const std::string& in_str, std::string* out_str) if (gesture) { const std::string& trigger = gesture->getTrigger(); +#ifdef MATCH_COMMON_CHARS //return whole trigger, if received text equals to it if (!LLStringUtil::compareInsensitive(in_str, trigger)) { *out_str = trigger; return TRUE; } +#else + if (in_len > (S32)trigger.length()) continue; // too short, bail out +#endif //return common chars, if more than one trigger matches the prefix std::string trigger_trunc = trigger; LLStringUtil::truncate(trigger_trunc, in_len); if (!LLStringUtil::compareInsensitive(in_str, trigger_trunc)) { +#ifndef MATCH_COMMON_CHARS + *out_str = trigger; + return TRUE; +#else if (rest_of_match.compare("") == 0) { rest_of_match = trigger.substr(in_str.size()); @@ -1411,16 +1421,18 @@ BOOL LLGestureMgr::matchPrefix(const std::string& in_str, std::string* out_str) { rest_of_match = buf; } - +#endif } } } +#ifdef MATCH_COMMON_CHARS if (!rest_of_match.empty()) { *out_str = in_str + rest_of_match; return TRUE; } +#endif return FALSE; } From 50d91d13be81ecde70e2e9d0432abb93a971be00 Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Fri, 8 Aug 2014 16:26:40 -0400 Subject: [PATCH 16/19] Allow dragging and dropping to attached objects There's now a guard serverside that'll prevent the situation that would cause things to break in the past, so there's no reason not to have this. --- indra/newview/lltooldraganddrop.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index c1ea44d7a..dfcee38e7 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -1604,7 +1604,7 @@ EAcceptance LLToolDragAndDrop::willObjectAcceptInventory(LLViewerObject* obj, LL transfer = TRUE; } BOOL volume = (LL_PCODE_VOLUME == obj->getPCode()); - BOOL attached = obj->isAttachment(); + BOOL attached = false; // No longer necessary. BOOL unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? TRUE : FALSE; // [RLVa:KB] - Checked: 2010-03-31 (RLVa-1.2.0c) | Modified: RLVa-1.0.0c From 69436a903230a2e0dd80f1dc38682b89882d25a2 Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Sat, 9 Aug 2014 10:50:24 -0400 Subject: [PATCH 17/19] Add french translation for connect to neighboring regions from Nomade Zhao --- .../skins/default/xui/fr/panel_preferences_ascent_vanity.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_ascent_vanity.xml b/indra/newview/skins/default/xui/fr/panel_preferences_ascent_vanity.xml index b5891495b..a00161142 100644 --- a/indra/newview/skins/default/xui/fr/panel_preferences_ascent_vanity.xml +++ b/indra/newview/skins/default/xui/fr/panel_preferences_ascent_vanity.xml @@ -14,6 +14,7 @@ + From a6ac8e1f7123eef1fd510f21bbd821d32c41ebfb Mon Sep 17 00:00:00 2001 From: Latif Khalifa Date: Sat, 9 Aug 2014 04:15:40 +0200 Subject: [PATCH 18/19] Workaround for clang bugs --- indra/llrender/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/indra/llrender/CMakeLists.txt b/indra/llrender/CMakeLists.txt index 38adb7dd0..b03111f7e 100644 --- a/indra/llrender/CMakeLists.txt +++ b/indra/llrender/CMakeLists.txt @@ -74,6 +74,11 @@ set(llrender_HEADER_FILES set_source_files_properties(${llrender_HEADER_FILES} PROPERTIES HEADER_FILE_ONLY TRUE) +# Workaround hack for clang bugs +if (DARWIN) + set_property(SOURCE llgl.cpp PROPERTY COMPILE_FLAGS -O1) +endif (DARWIN) + list(APPEND llrender_SOURCE_FILES ${llrender_HEADER_FILES}) add_library (llrender ${llrender_SOURCE_FILES}) From 2deba06212864f1d75ee851f22192fc703ca1261 Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Mon, 11 Aug 2014 14:36:37 -0400 Subject: [PATCH 19/19] Missed a spot with the date column for group bans I'm thinking of putting a setting here instead of hardcoding the date format, actually, but for now this is good enough. --- indra/newview/llpanelgrouproles.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index e66bad4eb..d9afd5b04 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -3048,7 +3048,7 @@ void LLPanelGroupBanListSubTab::populateBanList() ban_entry.columns.add().column("name").font/*.name*/("SANSSERIF_SMALL").font_style("NORMAL"); // Singu Note: We have special date columns, so our code is unique here - ban_entry.columns.add().column("ban_date").value(bd.mBanDate).format("%Y/%m%d").font/*.name*/("SANSSERIF_SMALL").font_style("NORMAL"); + ban_entry.columns.add().column("ban_date").value(bd.mBanDate).type("date").format("%Y/%m%d").font/*.name*/("SANSSERIF_SMALL").font_style("NORMAL"); mBanList->addNameItemRow(ban_entry); }