From 4f15cb449010bdbf2bf965b3025b1a421fd2de86 Mon Sep 17 00:00:00 2001 From: Hazim Gazov Date: Fri, 23 Apr 2010 10:52:43 -0300 Subject: [PATCH] that should mostly be it for local inventory --- indra/newview/dofloaterhex.cpp | 5 ++-- indra/newview/dohexeditor.cpp | 1 + indra/newview/hgfloatertexteditor.cpp | 6 ++-- indra/newview/llpanellogin.h | 4 +++ indra/newview/llstartup.cpp | 43 ++++++++++++++++++++++++--- 5 files changed, 49 insertions(+), 10 deletions(-) diff --git a/indra/newview/dofloaterhex.cpp b/indra/newview/dofloaterhex.cpp index b7a935338..3af60083b 100644 --- a/indra/newview/dofloaterhex.cpp +++ b/indra/newview/dofloaterhex.cpp @@ -238,10 +238,10 @@ void DOFloaterHex::assetCallback(LLVFS *vfs, } // Never enable save if it's a pretend item - /* if(gInventory.isObjectDescendentOf(item->getUUID(), gLocalInventoryRoot)) + if(gInventory.isObjectDescendentOf(item->getUUID(), gLocalInventoryRoot)) { floater->childSetEnabled("save_btn", false); - } */ + } } // static @@ -278,7 +278,6 @@ void DOFloaterHex::onClickUpload(void* user_data) if(item->getType() != LLAssetType::AT_GESTURE && item->getType() != LLAssetType::AT_LSL_TEXT && item->getType() != LLAssetType::AT_NOTECARD) { - //U32 const std::string &display_name, LLAssetStorage::LLStoreAssetCallback callback, S32 expected_upload_cost, void *userdata) upload_new_resource(transaction_id, item->getType(), item->getName(), diff --git a/indra/newview/dohexeditor.cpp b/indra/newview/dohexeditor.cpp index 56d51fbb4..7a59845ce 100644 --- a/indra/newview/dohexeditor.cpp +++ b/indra/newview/dohexeditor.cpp @@ -16,6 +16,7 @@ #include "llkeyboard.h" #include "llclipboard.h" #include "llwindow.h" // setCursor +#include "lllocalinventory.h" static LLRegisterWidget r("hex_editor"); diff --git a/indra/newview/hgfloatertexteditor.cpp b/indra/newview/hgfloatertexteditor.cpp index 71ec69f9b..9a9149dd3 100644 --- a/indra/newview/hgfloatertexteditor.cpp +++ b/indra/newview/hgfloatertexteditor.cpp @@ -23,6 +23,7 @@ #include "llinventorymodel.h" // gInventory.updateItem #include "llappviewer.h" // gLocalInventoryRoot #include "llfloaterperms.h" //get default perms +#include "lllocalinventory.h" std::list HGFloaterTextEditor::sInstances; S32 HGFloaterTextEditor::sUploadAmount = 10; @@ -224,10 +225,10 @@ void HGFloaterTextEditor::assetCallback(LLVFS *vfs, } // Never enable save if it's a pretend item - /* if(gInventory.isObjectDescendentOf(item->getUUID(), gLocalInventoryRoot)) + if(gInventory.isObjectDescendentOf(item->getUUID(), gLocalInventoryRoot)) { floater->childSetEnabled("save_btn", false); - } */ + } } // static @@ -264,7 +265,6 @@ void HGFloaterTextEditor::onClickUpload(void* user_data) if(item->getType() != LLAssetType::AT_GESTURE && item->getType() != LLAssetType::AT_LSL_TEXT && item->getType() != LLAssetType::AT_NOTECARD) { - //U32 const std::string &display_name, LLAssetStorage::LLStoreAssetCallback callback, S32 expected_upload_cost, void *userdata) upload_new_resource(transaction_id, item->getType(), item->getName(), diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h index f0dcbfc05..efae014fc 100644 --- a/indra/newview/llpanellogin.h +++ b/indra/newview/llpanellogin.h @@ -158,4 +158,8 @@ private: std::string load_password_from_disk(void); void save_password_to_disk(const char* hashed_password); +// +extern std::string gFullName; +// + #endif diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 088c25805..cc85fc30b 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -193,6 +193,14 @@ #include "llsocks5.h" #include "jcfloaterareasearch.h" +// +#include "llpanellogin.h" +//#include "llfloateravatars.h" +//#include "llactivation.h" +//#include "llao.h" +//#include "llcheats.h" +// + #if LL_WINDOWS #include "llwindebug.h" #include "lldxhardware.h" @@ -1105,6 +1113,9 @@ bool idle_startup() LLSD cmd_line_login = gSavedSettings.getLLSD("UserLoginInfo"); firstname = cmd_line_login[0].asString(); lastname = cmd_line_login[1].asString(); + // + gFullName = utf8str_tolower(firstname + " " + lastname); + // LLMD5 pass((unsigned char*)cmd_line_login[2].asString().c_str()); char md5pass[33]; /* Flawfinder: ignore */ @@ -1137,6 +1148,9 @@ bool idle_startup() // a valid grid is selected firstname = gSavedSettings.getString("FirstName"); lastname = gSavedSettings.getString("LastName"); + // + gFullName = utf8str_tolower(firstname + " " + lastname); + // password = LLStartUp::loadPasswordFromDisk(); show_connect_box = true; } @@ -1319,6 +1333,9 @@ bool idle_startup() { gSavedSettings.setString("FirstName", firstname); gSavedSettings.setString("LastName", lastname); + // + gFullName = utf8str_tolower(firstname + " " + lastname); + // if (!gSavedSettings.controlExists("RememberLogin")) gSavedSettings.declareBOOL("RememberLogin", false, "Remember login", false); gSavedSettings.setBOOL("RememberLogin", LLPanelLogin::getRememberLogin()); @@ -1439,8 +1456,10 @@ bool idle_startup() init_start_screen(agent_location_id); } - // Display the startup progress bar. - gViewerWindow->setShowProgress(TRUE); + // Display the startup progress bar. + // + //gViewerWindow->setShowProgress(TRUE); + // gViewerWindow->setProgressCancelButtonVisible(TRUE, std::string("Quit")); // *TODO: Translate // Poke the VFS, which could potentially block for a while if @@ -2877,7 +2896,20 @@ bool idle_startup() { LL_WARNS("AppInit") << "Problem loading inventory-skel-targets" << LL_ENDL; } - } + } + + // testing adding a local inventory folder... + LLViewerInventoryCategory* test_cat = new LLViewerInventoryCategory(gAgent.getID()); + test_cat->rename(std::string("Pretend Inventory")); + LLUUID test_cat_id; + test_cat_id.generate(); + test_cat->setUUID(test_cat_id); + gLocalInventoryRoot = test_cat_id; + test_cat->setParent(LLUUID::null); + test_cat->setPreferredType(LLAssetType::AT_NONE); + + gInventory.addCategory(test_cat); + // options.clear(); if(LLUserAuth::getInstance()->getOptions("buddy-list", options)) @@ -3813,7 +3845,10 @@ bool update_dialog_callback(const LLSD& notification, const LLSD& response) // *TODO change userserver to be grid on both viewer and sim, since // userserver no longer exists. query_map["userserver"] = LLViewerLogin::getInstance()->getGridLabel(); - query_map["channel"] = gSavedSettings.getString("VersionChannelName"); + // + //query_map["channel"] = gSavedSettings.getString("VersionChannelName"); + query_map["channel"] = gSavedSettings.getString("SpecifiedChannel"); + // // *TODO constantize this guy // *NOTE: This URL is also used in win_setup/lldownloader.cpp LLURI update_url = LLURI::buildHTTP("secondlife.com", 80, "update.php", query_map);