From 49f0f8e28f78a8600e7bf954137cfc5f32997a60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Fri, 7 Feb 2020 07:22:48 -0500 Subject: [PATCH] [XP Tools] Further UI beautification Refix all the panels that weren't good enough. Fix settingss and default rects Remove unused Fix toolbar prefs floater Use text editors for "URLs" we can't control, they resolve nicer anyway Fix Texture Ctrl on profile not popping out on click Fix Maturity string on profile not displaying Also update about floater credits according to modern data. --- indra/newview/app_settings/settings.xml | 28 +++- .../newview/app_settings/settings_ascent.xml | 11 -- indra/newview/llfloaterexperienceprofile.cpp | 63 +++------ indra/newview/llpanelexperiences.cpp | 1 + indra/newview/llviewermessage.cpp | 29 +--- .../icn_toolbar_experience_picker.tga | Bin 22 -> 0 bytes .../skins/default/xui/en-us/floater_about.xml | 4 +- .../xui/en-us/floater_experience_search.xml | 4 +- .../xui/en-us/floater_experienceprofile.xml | 132 +++++++++++------- .../default/xui/en-us/floater_region_info.xml | 4 +- .../xui/en-us/floater_toolbar_prefs.xml | 9 +- .../skins/default/xui/en-us/notifications.xml | 28 +--- .../en-us/panel_experience_list_editor.xml | 14 +- .../xui/en-us/panel_experience_search.xml | 21 ++- .../xui/en-us/panel_region_experiences.xml | 51 +++---- .../skins/default/xui/en-us/panel_toolbar.xml | 5 - 16 files changed, 185 insertions(+), 219 deletions(-) delete mode 100644 indra/newview/skins/default/textures/icn_toolbar_experience_picker.tga diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 6834adf9e..6b71a1183 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -7500,6 +7500,22 @@ This should be as low as possible, but too low may break functionality 0 + FloaterExperiencePickerRect + + Comment + Rectangle for experience picker floater + Persist + 1 + Type + Rect + Value + + 300 + 600 + 800 + 700 + + FloaterExperienceProfileRect Comment @@ -7510,9 +7526,9 @@ This should be as low as possible, but too low may break functionality Rect Value - 16 + 377 650 - 600 + 345 128 @@ -7526,10 +7542,10 @@ This should be as low as possible, but too low may break functionality Rect Value - 16 - 650 + 300 600 - 128 + 700 + 700 FloaterFindRect2 @@ -8289,7 +8305,7 @@ This should be as low as possible, but too low may break functionality 0 512 - 480 + 500 0 diff --git a/indra/newview/app_settings/settings_ascent.xml b/indra/newview/app_settings/settings_ascent.xml index 18c119aec..1dd1c091f 100644 --- a/indra/newview/app_settings/settings_ascent.xml +++ b/indra/newview/app_settings/settings_ascent.xml @@ -1633,17 +1633,6 @@ Changing this setting only affects new text. IsCOA 1 - ToolbarVisibleExperiencePicker - - Comment - Whether or not the button for the experience picker is on the toolbar - Persist - 1 - Type - Boolean - Value - 0 - ToolbarVisibleExperiences Comment diff --git a/indra/newview/llfloaterexperienceprofile.cpp b/indra/newview/llfloaterexperienceprofile.cpp index 5602f5c6e..ee77bde6b 100644 --- a/indra/newview/llfloaterexperienceprofile.cpp +++ b/indra/newview/llfloaterexperienceprofile.cpp @@ -192,25 +192,12 @@ BOOL LLFloaterExperienceProfile::postBuild() childSetCommitCallback(EDIT IMG_LOGO, boost::bind(&LLFloaterExperienceProfile::onFieldChanged, this), nullptr); - const LLColor4& link_color = gSavedSettings.getColor4("HTMLLinkColor"); - if (auto market = getChild(TF_MRKT)) + if (auto logo = findChild(IMG_LOGO)) { - market->setClickedCallback([market] { LLUrlAction::clickAction(market->getValue().asStringRef(), true); }); - market->setColor(link_color); - market->setFontStyle(LLFontGL::UNDERLINE); - } - - if (auto location = getChild(TF_SLURL)) - { - location->setClickedCallback([=] { LLUrlAction::clickAction(mLocationSLURL, true); }); - location->setColor(link_color); - location->setFontStyle(LLFontGL::UNDERLINE); - } - - if (auto logo = findChild(IMG_LOGO)) - { - void show_picture(const LLUUID& id, const std::string& name); - logo->setCommitCallback(boost::bind(show_picture, boost::bind(&LLTexturePicker::getImageAssetID, logo), "Experience Picture")); + void show_picture(const LLUUID& id, const std::string& name); + LLTextBox* name = getChild(TF_NAME); + std::function cb = [logo, name]() { show_picture(logo->getImageAssetID(), "Experience Picture: " + name->getText()); }; + logo->setMouseUpCallback(boost::bind(cb)); } getChild(EDIT TF_DESC)->setCommitOnFocusLost(TRUE); @@ -286,32 +273,24 @@ void LLFloaterExperienceProfile::onClickForget() bool LLFloaterExperienceProfile::setMaturityString( U8 maturity, LLTextBox* child, LLComboBox* combo ) { - /* Singu Note: Nope. - LLStyle::Params style; + //LLStyle::Params style; // Singu Note: Nope. std::string access; - */ if (maturity <= SIM_ACCESS_PG) { - /* Singu Note: Nope. - style.image(LLUI::getUIImage(getString("maturity_icon_general"))); + //style.image(LLUI::getUIImage(getString("maturity_icon_general"))); // Singu Note: Nope. access = LLTrans::getString("SIM_ACCESS_PG"); - */ combo->setCurrentByIndex(2); } else if (maturity <= SIM_ACCESS_MATURE) { - /* Singu Note: Nope. - style.image(LLUI::getUIImage(getString("maturity_icon_moderate"))); + //style.image(LLUI::getUIImage(getString("maturity_icon_moderate"))); // Singu Note: Nope. access = LLTrans::getString("SIM_ACCESS_MATURE"); - */ combo->setCurrentByIndex(1); } else if (maturity <= SIM_ACCESS_ADULT) { - /* Singu Note: Nope. - style.image(LLUI::getUIImage(getString("maturity_icon_adult"))); + //style.image(LLUI::getUIImage(getString("maturity_icon_adult"))); // Singu Note: Nope. access = LLTrans::getString("SIM_ACCESS_ADULT"); - */ combo->setCurrentByIndex(0); } else @@ -323,9 +302,8 @@ bool LLFloaterExperienceProfile::setMaturityString( U8 maturity, LLTextBox* chil child->setText(LLStringUtil::null); child->appendImageSegment(style); - - child->appendText(access, false); */ + child->setText(access); return true; } @@ -367,21 +345,21 @@ void LLFloaterExperienceProfile::refreshExperience( const LLSD& experience ) edit_child->setText(value); mLocationSLURL = experience[LLExperienceCache::SLURL].asString(); - child = getChild(TF_SLURL); + edit_child = getChild(TF_SLURL); bool has_slurl = !mLocationSLURL.empty() && mLocationSLURL != "last"; locationPanel->setVisible(has_slurl); if (has_slurl) mLocationSLURL = LLSLURL(mLocationSLURL).getSLURLString(); - child->setText(mLocationSLURL); + edit_child->setText(mLocationSLURL); - child = getChild(EDIT TF_SLURL); + edit_child = getChild(EDIT TF_SLURL); if (has_slurl) { - child->setText(mLocationSLURL); + edit_child->setText(mLocationSLURL); } else { - child->setText(getString("empty_slurl")); + edit_child->setText(getString("empty_slurl")); } setMaturityString((U8)(experience[LLExperienceCache::MATURITY].asInteger()), getChild(TF_MATURITY), getChild(EDIT TF_MATURITY)); @@ -457,8 +435,8 @@ void LLFloaterExperienceProfile::refreshExperience( const LLSD& experience ) { value=data[TF_MRKT].asString(); - child = getChild(TF_MRKT); - child->setText(value); + edit_child = getChild(TF_MRKT); + edit_child->setText(value); if(!value.empty()) { marketplacePanel->setVisible(TRUE); @@ -719,7 +697,7 @@ void LLFloaterExperienceProfile::onClickLocation() LLViewerRegion* region = gAgent.getRegion(); if (region) { - LLTextBox* child = getChild(EDIT TF_SLURL); + auto child = getChild(EDIT TF_SLURL); mLocationSLURL = LLSLURL(region->getName(), gAgent.getPositionGlobal()).getSLURLString(); child->setText(mLocationSLURL); onFieldChanged(); @@ -728,7 +706,7 @@ void LLFloaterExperienceProfile::onClickLocation() void LLFloaterExperienceProfile::onClickClear() { - LLTextBox* child = getChild(EDIT TF_SLURL); + auto child = getChild(EDIT TF_SLURL); mLocationSLURL.clear(); child->setText(getString("empty_slurl")); onFieldChanged(); @@ -877,8 +855,7 @@ void LLFloaterExperienceProfile::onPickGroup() void LLFloaterExperienceProfile::setEditGroup( LLUUID group_id ) { LLTextBox* child = getChild(EDIT TF_GROUP); - std::string value = LLSLURL("group", group_id, "inspect").getSLURLString(); - child->setText(value); + child->setValue(group_id); mPackage[LLExperienceCache::GROUP_ID] = group_id; onFieldChanged(); } diff --git a/indra/newview/llpanelexperiences.cpp b/indra/newview/llpanelexperiences.cpp index 45a11fea0..67b9f21cf 100644 --- a/indra/newview/llpanelexperiences.cpp +++ b/indra/newview/llpanelexperiences.cpp @@ -68,6 +68,7 @@ void addExperienceToList(const LLSD& experience, LLNameListCtrl* list) return; const auto& id = experience[LLExperienceCache::EXPERIENCE_ID]; + list->removeNameItem(id); // Don't add the same item twice, this can happen auto item = LLNameListCtrl::NameItem() .name(experience[LLExperienceCache::NAME].asString()) .target(LLNameListItem::EXPERIENCE); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 6a519263c..7b7330335 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -7204,17 +7204,6 @@ void notify_cautioned_script_question(const LLSD& notification, const LLSD& resp void script_question_mute(const LLUUID& item_id, const std::string& object_name); -bool unknown_script_question_cb(const LLSD& notification, const LLSD& response) -{ - // Only care if they muted the object here. - if ( response["Mute"] ) // mute - { - LLUUID task_id = notification["payload"]["task_id"].asUUID(); - script_question_mute(task_id,notification["payload"]["object_name"].asString()); - } - return false; -} - void experiencePermissionBlock(LLUUID experience, LLSD result) { LLSD permission; @@ -7332,8 +7321,7 @@ void script_question_mute(const LLUUID& task_id, const std::string& object_name) bool matches(const LLNotificationPtr notification) const override { if (notification->getName() == "ScriptQuestionCaution" - || notification->getName() == "ScriptQuestion" - || notification->getName() == "UnknownScriptQuestion") + || notification->getName() == "ScriptQuestion") { return (notification->getPayload()["task_id"].asUUID() == blocked_id); } @@ -7351,7 +7339,6 @@ void script_question_mute(const LLUUID& task_id, const std::string& object_name) static LLNotificationFunctorRegistration script_question_cb_reg_1("ScriptQuestion", script_question_cb); static LLNotificationFunctorRegistration script_question_cb_reg_2("ScriptQuestionCaution", script_question_cb); static LLNotificationFunctorRegistration script_question_cb_reg_3("ScriptQuestionExperience", script_question_cb); -static LLNotificationFunctorRegistration unknown_script_question_cb_reg("UnknownScriptQuestion", unknown_script_question_cb); void process_script_experience_details(const LLSD& experience_details, LLSD args, LLSD payload) { @@ -7475,14 +7462,12 @@ void process_script_question(LLMessageSystem *msg, void **user_data) args["QUESTIONS"] = script_question; if (known_questions != questions) - { // This is in addition to the normal dialog. - LLSD payload; - payload["task_id"] = taskid; - payload["item_id"] = itemid; - payload["object_name"] = object_name; - - args["DOWNLOADURL"] = LLTrans::getString("ViewerDownloadURL"); - LLNotificationsUtil::add("UnknownScriptQuestion", args, payload); + { + // This is in addition to the normal dialog. + // Viewer got a request for not supported/implemented permission + LL_WARNS("Messaging") << "Object \"" << object_name << "\" requested " << script_question + << " permission. Permission is unknown and can't be granted. Item id: " << itemid + << " taskid:" << taskid << LL_ENDL; } if (known_questions) diff --git a/indra/newview/skins/default/textures/icn_toolbar_experience_picker.tga b/indra/newview/skins/default/textures/icn_toolbar_experience_picker.tga deleted file mode 100644 index 0a1a235f352f836cc45efc94d8c745f1829bca07..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 22 XcmZQzU}As)Mg~R(1&;s!|1$sp3NHgH diff --git a/indra/newview/skins/default/xui/en-us/floater_about.xml b/indra/newview/skins/default/xui/en-us/floater_about.xml index 214e0e645..b836a06fd 100644 --- a/indra/newview/skins/default/xui/en-us/floater_about.xml +++ b/indra/newview/skins/default/xui/en-us/floater_about.xml @@ -12,8 +12,8 @@ -Singularity Viewer is developed and maintained by Siana Gearz, Shyotl Kuhr, Inusaito Kanya, Router Gray, Bittenbythedark and the Alchemy Viewer Team (specifically Sovereign Engineer), -with contributions by Cinder Roxley, Damian Zhaoying, Fractured Crystal, Franxisco Romano, Fritigern Gothly, Henri Beauchamp, Kadah Coba, Kitty Barnett, Knolan Falconer, Latif Khalifa, McCabe Maxsted, Mika Pyon, Narv Czervik, nhede Core, Nomade Zhao, Revolution Smythe, Selvone Franizzi, Sim Federal, Thickbrick Sleaford, Tigh MacFanatic, Wolfspirit Magic, Zauber Parecelsus and others. +Singularity Viewer is developed and maintained by Siana Gearz, Shyotl Kuhr, Inusaito Kanya, Router Gray and the Alchemy Viewer Team (specifically Sovereign Engineer), +with contributions by Bittenbythedark, Cinder Roxley, Damian Zhaoying, Fractured Crystal, Franxisco Romano, Fritigern Gothly, Henri Beauchamp, Kadah Coba, Kitty Barnett, Knolan Falconer, Latif Khalifa, McCabe Maxsted, Mika Pyon, Narv Czervik, nhede Core, Nomade Zhao, Revolution Smythe, Selvone Franizzi, Sim Federal, Thickbrick Sleaford, Tigh MacFanatic, Torric Rodas, Wolfspirit Magic, Zauber Parecelsus and others. Singularity is maintained in joint effort with the Alchemy Viewer Project. Singularity was forked from Ascent source code. Credits for Ascent include Hg Beeks, Charley Levenque, Hazim Gazov, Zwagoth Klaar, Qarl Fizz, and others. Ascent is based upon the Inertia source code. Singularity Viewer includes source code contributions of the following residents: Able Whitman, Adam Marker, Agathos Frascati, Aimee Trescothick, Alejandro Rosenthal, Aleric Inglewood, Alissa Sabre, Angus Boyd, Ann Congrejo, Argent Stonecutter, Asuka Neely, Balp Allen, Benja Kepler, Biancaluce Robbiani, Blakar Ogre, blino Nakamura, Boroondas Gupte, Bulli Schumann, bushing Spatula, Carjay McGinnis, Catherine Pfeffer, Celierra Darling, Cron Stardust, Dale Glass, Drewan Keats, Dylan Haskell, Dzonatas Sol, Eddy Stryker, EponymousDylan Ra, Eva Nowicka, Farallon Greyskin, Feep Larsson, Flemming Congrejo, Fluf Fredriksson, Fractured Crystal, Fremont Cunningham, Geneko Nemeth, Gigs Taggart, Ginko Bayliss, Grazer Kline, Gudmund Shepherd, Hamncheese Omlet, HappySmurf Papp, Henri Beauchamp, Hikkoshi Sakai, Hiro Sommambulist, Hoze Menges, Ian Kas, Irene Muni, Iskar Ariantho, Jacek Antonelli, JB Kraft, Joghert LeSabre, Kage Pixel, Ken March, Kerutsen Sellery, Khyota Wulluf, Kunnis Basiat, Lisa Lowe, Lockhart Cordoso, maciek marksman, Magnus Balczo, Malwina Dollinger, march Korda, Matthew Dowd, McCabe Maxsted, Michelle2 Zenovka, Mm Alder, Mr Greggan, Nicholaz Beresford, Nounouch Hapmouche, Patric Mills, Paul Churchill, Paula Innis, Peekay Semyorka, Peter Lameth, Pf Shan, princess niven, Renault Clio, Ringo Tuxing, Robin Cornelius, Ryozu Kojima, Salahzar Stenvaag, Sammy Frederix, Scrippy Scofield, Seg Baphomet, Sergen Davies, SignpostMarv Martin, Simon Nolan, SpacedOut Frye, Sporked Friis, Stevex Janus, Still Defiant, Strife Onizuka, Tayra Dagostino, TBBle Kurosawa, Teardrops Fall, tenebrous pau, Tharax Ferraris, Thickbrick Sleaford, Thraxis Epsilon, tiamat bingyi, TraductoresAnonimos Alter, Tue Torok, Vadim Bigbear, Vixen Heron, Whoops Babii, Wilton Lundquist, Zarkonnen Decosta, Zi Ree, and Zipherius Turas. diff --git a/indra/newview/skins/default/xui/en-us/floater_experience_search.xml b/indra/newview/skins/default/xui/en-us/floater_experience_search.xml index 395066a05..b6e0a7c4f 100644 --- a/indra/newview/skins/default/xui/en-us/floater_experience_search.xml +++ b/indra/newview/skins/default/xui/en-us/floater_experience_search.xml @@ -2,13 +2,15 @@ diff --git a/indra/newview/skins/default/xui/en-us/floater_experienceprofile.xml b/indra/newview/skins/default/xui/en-us/floater_experienceprofile.xml index cbff14d59..e531d21ab 100644 --- a/indra/newview/skins/default/xui/en-us/floater_experienceprofile.xml +++ b/indra/newview/skins/default/xui/en-us/floater_experienceprofile.xml @@ -52,7 +52,6 @@ width="348" name="tab_container"> - - -