diff --git a/indra/newview/llappviewerlinux.cpp b/indra/newview/llappviewerlinux.cpp index da5c1b80b..bb9d61394 100644 --- a/indra/newview/llappviewerlinux.cpp +++ b/indra/newview/llappviewerlinux.cpp @@ -732,8 +732,26 @@ std::string LLAppViewerLinux::generateSerialNumber() { char serial_md5[MD5HEX_STR_SIZE]; serial_md5[0] = 0; + std::string best; + std::string uuiddir("/dev/disk/by-uuid/"); - // TODO + // trawl /dev/disk/by-uuid looking for a good-looking UUID to grab + std::string this_name; + BOOL wrap = FALSE; + while (gDirUtilp->getNextFileInDir(uuiddir, "*", this_name, wrap)) + { + if (this_name.length() > best.length() || + (this_name.length() == best.length() && + this_name > best)) + { + // longest (and secondarily alphabetically last) so far + best = this_name; + } + } + + // we don't return the actual serial number, just a hash of it. + LLMD5 md5( reinterpret_cast(best.c_str()) ); + md5.hex_digest(serial_md5); return serial_md5; } diff --git a/indra/newview/llfloatertos.cpp b/indra/newview/llfloatertos.cpp index 6bb19cdbb..2dedc79af 100644 --- a/indra/newview/llfloatertos.cpp +++ b/indra/newview/llfloatertos.cpp @@ -155,10 +155,7 @@ BOOL LLFloaterTOS::postBuild() // disable Agree to TOS radio button until the page has fully loaded LLCheckBoxCtrl* tos_agreement = getChild("agree_chk"); - // - // UHHHH NO :> - tos_agreement->setEnabled( true ); - // + tos_agreement->setEnabled( false ); // hide the SL text widget if we're displaying TOS with using a browser widget. LLTextEditor *editor = getChild("tos_text"); diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 00c5a0940..a3d790f26 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -51,6 +51,7 @@ #include "llcombobox.h" #include "lldrawpoolbump.h" #include "llface.h" +#include "llinventorymodel.h" //Perms check for texture params #include "lllineeditor.h" #include "llresmgr.h" #include "llselectmgr.h" @@ -1183,8 +1184,22 @@ void LLPanelFace::onClickCopy(void* userdata) textures.clear(); for (S32 i = 0; i < te_count; i++) { + LLSD tex_params = objectp->getTE(i)->asLLSD(); + LLInventoryItem* itemp = gInventory.getItem(objectp->getTE(i)->getID()); + LLUUID tex = tex_params["imageid"]; + tex_params["imageid"] = LLUUID::null; + gSavedPerAccountSettings.setLLSD("Image.Settings", tex_params); + if (itemp) + { + LLPermissions perms = itemp->getPermissions(); + //full perms + if (perms.getMaskOwner() & PERM_ITEM_UNRESTRICTED) + { + tex_params["imageid"] = tex; + } + } llinfos << "Copying params on face " << i << "." << llendl; - textures.append(objectp->getTE(i)->asLLSD()); + textures.append(tex_params); } } @@ -1215,6 +1230,9 @@ void LLPanelFace::onClickPaste(void* userdata) for (int i = 0; i < textures.size(); i++) { llinfos << "Pasting params on face " << i << "." << llendl; + LLSD cur_tex = objectp->getTE(i)->asLLSD(); + if (textures[i]["imageid"].asUUID() == LLUUID::null) + textures[i]["imageid"] = cur_tex["imageid"]; LLTextureEntry tex; tex.fromLLSD(textures[i]); obj.setTE(U8(i), tex);