Commits

Anonymous committed 0a438d3 Merge

merge from PE's viewer-release

Comments (0)

Files changed (23)

indra/llui/llaccordionctrl.cpp

 #include "llfocusmgr.h"
 #include "lllocalcliprect.h"
 
-#include "lltrans.h"
-
 #include "boost/bind.hpp"
 
 static const S32 DRAGGER_BAR_MARGIN = 4;
 {
 	initNoTabsWidget(params.no_matched_tabs_text);
 
-	mNoVisibleTabsOrigString = LLTrans::getString(params.no_visible_tabs_text.initial_value().asString());
 	mSingleExpansion = params.single_expansion;
 	if(mFitParent && !mSingleExpansion)
 	{
 {
 	LLTextBox::Params tp = tb_params;
 	tp.rect(getLocalRect());
-	mNoMatchedTabsOrigString = LLTrans::getString(tp.initial_value().asString());
+	mNoMatchedTabsOrigString = tp.initial_value().asString();
 	mNoVisibleTabsHelpText = LLUICtrlFactory::create<LLTextBox>(tp, this);
 }
 

indra/newview/app_settings/settings.xml

       <key>Value</key>
       <integer>1</integer>
     </map>
+    <key>TipToastMessageLineCount</key>
+    <map>
+      <key>Comment</key>
+      <string>Max line count of text message on tip toast.</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>S32</string>
+      <key>Value</key>
+      <integer>10</integer>
+    </map>
 </map>
 </llsd>

indra/newview/llappearancemgr.cpp

 	}
 	else
 	{
+		LLIsOfAssetType collector = LLIsOfAssetType(LLAssetType::AT_LINK);
+
 		LLInventoryModel::cat_array_t cof_cats;
 		LLInventoryModel::item_array_t cof_items;
-		gInventory.collectDescendents(cof, cof_cats, cof_items,
-									  LLInventoryModel::EXCLUDE_TRASH);
+		gInventory.collectDescendentsIf(cof, cof_cats, cof_items,
+									  LLInventoryModel::EXCLUDE_TRASH, collector);
 
 		LLInventoryModel::cat_array_t outfit_cats;
 		LLInventoryModel::item_array_t outfit_items;
-		gInventory.collectDescendents(base_outfit, outfit_cats, outfit_items,
-									  LLInventoryModel::EXCLUDE_TRASH);
+		gInventory.collectDescendentsIf(base_outfit, outfit_cats, outfit_items,
+									  LLInventoryModel::EXCLUDE_TRASH, collector);
 
-		if(outfit_items.count() != cof_items.count() -1)
+		if(outfit_items.count() != cof_items.count())
 		{
 			// Current outfit folder should have one more item than the outfit folder.
 			// this one item is the link back to the outfit folder itself.
 			return;
 		}
 
-		//getting rid of base outfit folder link to simplify comparison
-		for (LLInventoryModel::item_array_t::iterator it = cof_items.begin(); it != cof_items.end(); ++it)
-		{
-			if (*it == base_outfit_item)
-			{
-				cof_items.erase(it);
-				break;
-			}
-		}
-
 		//"dirty" - also means a difference in linked UUIDs and/or a difference in wearables order (links' descriptions)
 		std::sort(cof_items.begin(), cof_items.end(), sort_by_linked_uuid);
 		std::sort(outfit_items.begin(), outfit_items.end(), sort_by_linked_uuid);

indra/newview/llavatarlist.cpp

 void LLAvatarList::addAvalineItem(const LLUUID& item_id, const LLUUID& session_id, const std::string& item_name)
 {
 	LL_DEBUGS("Avaline") << "Adding avaline item into the list: " << item_name << "|" << item_id << ", session: " << session_id << LL_ENDL;
-	LLAvalineListItem* item = new LLAvalineListItem;
+	LLAvalineListItem* item = new LLAvalineListItem(/*hide_number=*/false);
 	item->setAvatarId(item_id, session_id, true, false);
 	item->setName(item_name);
 

indra/newview/llchiclet.cpp

 
 	if("end" == action)
 	{
-		LLScriptFloaterManager::instance().onRemoveNotification(getSessionId());
+		LLScriptFloaterManager::instance().removeNotification(getSessionId());
 	}
 }
 
 
 	if("end" == action)
 	{
-		LLScriptFloaterManager::instance().onRemoveNotification(getSessionId());
+		LLScriptFloaterManager::instance().removeNotification(getSessionId());
 	}
 }
 

indra/newview/llfolderview.h

 	BOOL needsAutoSelect() { return mNeedsAutoSelect && !mAutoSelectOverride; }
 	BOOL needsAutoRename() { return mNeedsAutoRename; }
 	void setNeedsAutoRename(BOOL val) { mNeedsAutoRename = val; }
+	void setAutoSelectOverride(BOOL val) { mAutoSelectOverride = val; }
 
 	void setCallbackRegistrar(LLUICtrl::CommitCallbackRegistry::ScopedRegistrar* registrar) { mCallbackRegistrar = registrar; }
 

indra/newview/llimview.cpp

 		}
 		else
 		{
+			// IM_SESSION_INVITE means that this is an Ad-hoc incoming chat
+			//		(it can be also Group chat but it is checked above)
+			// In this case mInitialTargetIDs contains Ad-hoc session ID and it should not be added
+			// to Recent People to prevent showing of an item with (???)(???). See EXT-8246.
+			// Concrete participants will be added into this list once they sent message in chat.
+			if (IM_SESSION_INVITE == dialog) return;
+
+			// implemented adding of all participants of an outgoing to Recent People List. See EXT-5694.
 			for(uuid_vec_t::iterator it = session->mInitialTargetIDs.begin();
 				it!=session->mInitialTargetIDs.end();++it)
 			{

indra/newview/llinventoryfunctions.cpp

 	return TRUE;
 }
 
+bool LLIsOfAssetType::operator()(LLInventoryCategory* cat, LLInventoryItem* item)
+{
+	if(mType == LLAssetType::AT_CATEGORY)
+	{
+		if(cat) return TRUE;
+	}
+	if(item)
+	{
+		if(item->getActualType() == mType) return TRUE;
+	}
+	return FALSE;
+}
+
 bool LLIsTypeWithPermissions::operator()(LLInventoryCategory* cat, LLInventoryItem* item)
 {
 	if(mType == LLAssetType::AT_CATEGORY)

indra/newview/llinventoryfunctions.h

 	LLAssetType::EType mType;
 };
 
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// Class LLIsOfAssetType
+//
+// Implementation of a LLInventoryCollectFunctor which returns TRUE if
+// the item or category is of asset type passed in during construction.
+// Link types are treated as links, not as the types they point to.
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+class LLIsOfAssetType : public LLInventoryCollectFunctor
+{
+public:
+	LLIsOfAssetType(LLAssetType::EType type) : mType(type) {}
+	virtual ~LLIsOfAssetType() {}
+	virtual bool operator()(LLInventoryCategory* cat,
+							LLInventoryItem* item);
+protected:
+	LLAssetType::EType mType;
+};
+
 class LLIsTypeWithPermissions : public LLInventoryCollectFunctor
 {
 public:

indra/newview/lllocationinputctrl.cpp

 		//needs unescaped one
 		LLSLURL slurl;
 		LLAgentUI::buildSLURL(slurl, false);
-		mTextEntry->setText(slurl.getSLURLString());
+		mTextEntry->setText(LLURI::unescape(slurl.getSLURLString()));
 		mTextEntry->selectAll();
 
 		mMaturityButton->setVisible(FALSE);

indra/newview/llpanelgenerictip.cpp

 
 #include "llpanelgenerictip.h"
 #include "llnotifications.h"
+#include "llviewercontrol.h" // for gSavedSettings
 
 
 LLPanelGenericTip::LLPanelGenericTip(
 
 	childSetValue("message", notification->getMessage());
 
-	// set line max count to 3 in case of a very long name
-	snapToMessageHeight(getChild<LLTextBox> ("message"), 3);
+
+	S32 max_line_count =  gSavedSettings.getS32("TipToastMessageLineCount");
+	snapToMessageHeight(getChild<LLTextBox> ("message"), max_line_count);
 }
 

indra/newview/llpanelonlinestatus.cpp

 
 #include "llnotifications.h"
 #include "llpanelonlinestatus.h"
+#include "llviewercontrol.h" // for gSavedSettings
 
 LLPanelOnlineStatus::LLPanelOnlineStatus(
 		const LLNotificationPtr& notification) :
 				notification, notification->getResponseTemplate()));
 	}
 
-	// set line max count to 3 in case of a very long name
-	snapToMessageHeight(getChild<LLTextBox> ("message"), 3);
+	S32 max_line_count =  gSavedSettings.getS32("TipToastMessageLineCount");
+	snapToMessageHeight(getChild<LLTextBox> ("message"), max_line_count);
 
 }

indra/newview/llparticipantlist.cpp

 	else
 	{
 		std::string display_name = LLVoiceClient::getInstance()->getDisplayName(avatar_id);
-		mAvatarList->addAvalineItem(avatar_id, mSpeakerMgr->getSessionID(), display_name.empty() ? display_name : LLTrans::getString("AvatarNameWaiting"));
+		mAvatarList->addAvalineItem(avatar_id, mSpeakerMgr->getSessionID(), display_name.empty() ? LLTrans::getString("AvatarNameWaiting") : display_name);
 		mAvalineUpdater->watchAvalineCaller(avatar_id);
 	}
 	adjustParticipant(avatar_id);

indra/newview/llscriptfloater.cpp

 
 	if(getNotificationId().notNull())
 	{
-		LLScriptFloaterManager::getInstance()->onRemoveNotification(getNotificationId());
+		// we shouldn't kill notification on exit since it may be used as persistent.
+		if (app_quitting)
+		{
+			LLScriptFloaterManager::getInstance()->onRemoveNotification(getNotificationId());
+		}
+		else
+		{
+			LLScriptFloaterManager::getInstance()->removeNotification(getNotificationId());
+		}
 	}
 }
 
 				set_new_message |= !floater->hasFocus();
 			}
 
-			onRemoveNotification(it->first);
+			removeNotification(it->first);
 		}
 	}
 
 	toggleScriptFloater(notification_id, set_new_message);
 }
 
+void LLScriptFloaterManager::removeNotification(const LLUUID& notification_id)
+{
+	LLNotificationPtr notification = LLNotifications::instance().find(notification_id);
+	if (notification != NULL && !notification->isCancelled())
+	{
+		LLNotificationsUtil::cancel(notification);
+	}
+
+	onRemoveNotification(notification_id);
+}
+
 void LLScriptFloaterManager::onRemoveNotification(const LLUUID& notification_id)
 {
 	if(notification_id.isNull())
 
 	LLIMWellWindow::getInstance()->removeObjectRow(notification_id);
 
+	mNotifications.erase(notification_id);
+
 	// close floater
 	LLScriptFloater* floater = LLFloaterReg::findTypedInstance<LLScriptFloater>("script_floater", notification_id);
 	if(floater)
 		floater->setNotificationId(LLUUID::null);
 		floater->closeFloater();
 	}
-
-	mNotifications.erase(notification_id);
 }
 
 void LLScriptFloaterManager::toggleScriptFloater(const LLUUID& notification_id, bool set_new_message)

indra/newview/llscriptfloater.h

 	void onAddNotification(const LLUUID& notification_id);
 
 	/**
+	 * Removes notification.
+	 */
+	void removeNotification(const LLUUID& notification_id);
+
+	/**
 	 * Handles notification removal.
 	 * Removes script notification toast, removes script chiclet, closes script floater
 	 */

indra/newview/llsyswellwindow.cpp

 //---------------------------------------------------------------------------------
 void LLIMWellWindow::ObjectRowPanel::onClosePanel()
 {
-	LLScriptFloaterManager::getInstance()->onRemoveNotification(mChiclet->getSessionId());
+	LLScriptFloaterManager::getInstance()->removeNotification(mChiclet->getSessionId());
 }
 
 void LLIMWellWindow::ObjectRowPanel::initChiclet(const LLUUID& notification_id, bool new_message/* = false*/)
 		ObjectRowPanel* obj_panel = dynamic_cast <ObjectRowPanel*> (panel);
 		if (obj_panel)
 		{
-			LLScriptFloaterManager::instance().onRemoveNotification(*iter);
+			LLScriptFloaterManager::instance().removeNotification(*iter);
 		}
 	}
 }

indra/newview/lltexturectrl.cpp

 		mInventoryPanel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
 		mInventoryPanel->setAllowMultiSelect(FALSE);
 
+		// Disable auto selecting first filtered item because it takes away
+		// selection from the item set by LLTextureCtrl owning this floater.
+		mInventoryPanel->getRootFolder()->setAutoSelectOverride(TRUE);
+
 		// Commented out to scroll to currently selected texture. See EXT-5403.
 		// // store this filter as the default one
 		// mInventoryPanel->getRootFolder()->getFilter()->markDefault();

indra/newview/llurllineeditorctrl.cpp

 
 	const std::string unescaped_text = wstring_to_utf8str(mText.getWString().substr(left_pos, length));
 	LLWString text_to_copy;
-	if (LLSLURL(unescaped_text).isValid())
+	// *HACK: Because LLSLURL is currently broken we cannot use it to check if unescaped_text is a valid SLURL (see EXT-8335).
+	if (LLStringUtil::startsWith(unescaped_text, "http://")) // SLURL
 		text_to_copy = utf8str_to_wstring(LLWeb::escapeURL(unescaped_text));
-	else
+	else // human-readable location
 		text_to_copy = utf8str_to_wstring(unescaped_text);
 		
 	gClipboard.copyFromString( text_to_copy );

indra/newview/skins/default/xui/en/menu_inventory_add.xml

                      function="File.UploadBulk"
                      parameter="" />
                 </menu_item_call>
-                <menu_item_separator
-                 layout="topleft" />
+	            <menu_item_call
+	             label="Set Default Upload Permissions"
+	             name="perm prefs">
+	                <menu_item_call.on_click
+	                 function="Floater.Toggle"
+	                 parameter="perm_prefs" />
+	            </menu_item_call>
             </menu>
 
             <menu_item_call

indra/newview/skins/default/xui/en/menu_viewer.xml

          label="Options"
          name="Options"
          tear_off="true">
-            <menu_item_call
-             label="Set Default Upload Permissions"
-             name="perm prefs">
-                <menu_item_call.on_click
-                 function="Floater.Toggle"
-                 parameter="perm_prefs" />
-            </menu_item_call>
 	   <menu_item_check
 	       label="Show Advanced Permissions"
 	       name="DebugPermissions">
                  function="File.UploadBulk"
                  parameter="" />
             </menu_item_call>
-            <menu_item_separator
-             layout="topleft" />
+            <menu_item_call
+             label="Set Default Upload Permissions"
+             name="perm prefs">
+                <menu_item_call.on_click
+                 function="Floater.Toggle"
+                 parameter="perm_prefs" />
+            </menu_item_call>
         </menu>
     </menu>
     <menu

indra/newview/skins/default/xui/en/panel_nearby_media.xml

 		follows="top|left"
 		font="SansSerif"
 		left="10"
+		name="nearby_media_title"
 		width="100">
 	  Nearby Media
 	</text>
 		font="SansSerif"
 		top_pad="15"
 		left="10"
+		name="show_text"
 		width="40">
 	  Show:
 	</text>

indra/newview/skins/default/xui/en/panel_outfits_list.xml

      background_visible="true"
      bg_alpha_color="DkGray2"
      bg_opaque_color="DkGray2"
-     no_matched_tabs_text.value="NoOutfitsTabsMatched"
+     no_matched_tabs_text.value="Didn't find what you're looking for? Try [secondlife:///app/search/all/[SEARCH_TERM] Search]."
      no_matched_tabs_text.v_pad="10"
-     no_visible_tabs_text.value="NoOutfits"
+     no_visible_tabs_text.value="You don't have any outfits yet. Try [secondlife:///app/search/all/ Search]"
      follows="all"
      height="400"
      layout="topleft"

indra/newview/skins/default/xui/en/strings.xml

 	<string name="InvFolder Animations">Animations</string>
 	<string name="InvFolder Gestures">Gestures</string>
 	<string name="InvFolder Favorite">Favorites</string>
+  <!-- historically default name of the Favorites folder can start from either "f" or "F" letter.
+  We should localize both of them with the same value -->
+	<string name="InvFolder favorite">Favorites</string>
 	<string name="InvFolder Current Outfit">Current Outfit</string>
 	<string name="InvFolder My Outfits">My Outfits</string>
 	<string name="InvFolder Accessories">Accessories</string>
   <!-- panel preferences general -->
   <string name="BusyModeResponseDefault">The Resident you messaged is in &apos;busy mode&apos; which means they have requested not to be disturbed.  Your message will still be shown in their IM panel for later viewing.</string>
 
-	<!-- Outfits Panel -->
-	<string name="NoOutfits">You don't have any outfits yet. Try [secondlife:///app/search/all/ Search]</string>
-	<string name="NoOutfitsTabsMatched">Didn't find what you're looking for? Try [secondlife:///app/search/all/[SEARCH_TERM] Search].</string>
-
 	<!-- Mute -->
 	<string name="MuteByName">(By name)</string>
 	<string name="MuteAgent">(Resident)</string>