diff --git a/indra/newview/llfloaterflickr.cpp b/indra/newview/llfloaterflickr.cpp index 6ea62ccad4..5fcb360937 100644 --- a/indra/newview/llfloaterflickr.cpp +++ b/indra/newview/llfloaterflickr.cpp @@ -54,6 +54,7 @@ #include #include "llspinctrl.h" +#include "llviewernetwork.h" #include "llnotificationsutil.h" #ifdef OPENSIM #include "exoflickr.h" @@ -66,8 +67,12 @@ static LLPanelInjector t_panel_photo("llflickrphotopanel"); static LLPanelInjector t_panel_account("llflickraccountpanel"); const std::string DEFAULT_PHOTO_QUERY_PARAMETERS = "?sourceid=slshare_photo&utm_source=flickr&utm_medium=photo&utm_campaign=slshare"; -const std::string DEFAULT_TAG_TEXT = "secondlife "; -const std::string FLICKR_MACHINE_TAGS_NAMESPACE = "secondlife"; +// Don't assume we're always in Second Life +//const std::string DEFAULT_TAG_TEXT = "secondlife "; +//const std::string FLICKR_MACHINE_TAGS_NAMESPACE = "secondlife"; +const std::string DEFAULT_TAG_TEXT = "Firestorm "; +static std::string FLICKR_MACHINE_TAGS_NAMESPACE = "secondlife"; +// /////////////////////////// //LLFlickrPhotoPanel/////// @@ -122,7 +127,10 @@ BOOL LLFlickrPhotoPanel::postBuild() mDescriptionTextBox = getChild("photo_description"); mLocationCheckbox = getChild("add_location_cb"); mTagsTextBox = getChild("photo_tags"); - mTagsTextBox->setValue(DEFAULT_TAG_TEXT); + // Don't assume we're always in Second Life + //mTagsTextBox->setValue(DEFAULT_TAG_TEXT); + mTagsTextBox->setValue(DEFAULT_TAG_TEXT + (LLGridManager::instance().isInSecondLife() ? "secondlife" : ("\"" + LLGridManager::instance().getGridId()) + "\"") + " "); + // mRatingComboBox = getChild("rating_combobox"); mPostButton = getChild("post_photo_btn"); mCancelButton = getChild("cancel_photo_btn"); @@ -391,7 +399,13 @@ void LLFlickrPhotoPanel::sendPhoto() std::string slurl_string = slurl.getSLURLString(); // Add query parameters so Google Analytics can track incoming clicks! - slurl_string += DEFAULT_PHOTO_QUERY_PARAMETERS; + // Don't assume we're always in Second Life + //slurl_string += DEFAULT_PHOTO_QUERY_PARAMETERS; + if (LLGridManager::instance().isInSecondLife()) + { + slurl_string += DEFAULT_PHOTO_QUERY_PARAMETERS; + } + // std::string photo_link_text = "Visit this location";// at [] in Second Life"; std::string parcel_name = LLViewerParcelMgr::getInstance()->getAgentParcelName(); @@ -404,7 +418,17 @@ void LLFlickrPhotoPanel::sendPhoto() photo_link_text += " at " + parcel_name; } } - photo_link_text += " in Second Life"; + // Don't assume we're always in Second Life + //photo_link_text += " in Second Life"; + if (LLGridManager::instance().isInSecondLife()) + { + photo_link_text += " in Second Life"; + } + else + { + photo_link_text += " in \"" + LLGridManager::instance().getGridLabel() + "\""; + } + // slurl_string = "" + photo_link_text + ""; @@ -427,6 +451,13 @@ void LLFlickrPhotoPanel::sendPhoto() std::string parcel_name = LLViewerParcelMgr::getInstance()->getAgentParcelName(); std::string region_name = region->getName(); + // Don't assume we're always in Second Life + if (!LLGridManager::instance().isInSecondLife()) + { + FLICKR_MACHINE_TAGS_NAMESPACE = LLGridManager::instance().getGridId(); + } + // + if (!region_name.empty()) { tags += llformat(" \"%s:region=%s\"", FLICKR_MACHINE_TAGS_NAMESPACE.c_str(), region_name.c_str()); diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 718ca45d5b..898799bd10 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -92,6 +92,7 @@