diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 3369bca1b..1128bf71d 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -2,6 +2,204 @@ + AscentBuildAlwaysEnabled + + Comment + Show build option regardless of whether you can (May not mean you can actually build there) + Persist + 1 + Type + Boolean + Value + 1 + + AscentFlyAlwaysEnabled + + Comment + Always allow fly (Does actually always allow flight) + Persist + 1 + Type + Boolean + Value + 0 + + AscentCmdLine + + Comment + Would you like the chatbar to be able to be used for command line functions? + Persist + 1 + Type + Boolean + Value + 1 + + AscentCmdLineClearChat + + Comment + Clear chat history to stop lag from chat spam + Persist + 1 + Type + String + Value + clrchat + + AscentCmdLineHeight + + Comment + Teleport to height function command + Persist + 1 + Type + String + Value + gth + + AscentCmdLinePos + + Comment + Teleport to position function command + Persist + 1 + Type + String + Value + gtp + + AscentCmdLineGround + + Comment + Teleport to ground function command + Persist + 1 + Type + String + Value + flr + + AscentCmdLineTeleportHome + + Comment + Teleport to home function command + Persist + 1 + Type + String + Value + tph + + AscentCmdLineRezPlatform + + Comment + Rez a platform underneath you + Persist + 1 + Type + String + Value + rezplat + + AscentPlatformSize + + Comment + How wide the rezzed platform will appear to be. + Persist + 1 + Type + F32 + Value + 30 + + AscentCmdLineMapTo + + Comment + Teleport to a region by name rapidly + Persist + 1 + Type + String + Value + mapto + + AscentMapToKeepPos + + Comment + Attempt to arrive in the same location you were at. + Persist + 1 + Type + Boolean + Value + 0 + + AscentCmdLineDrawDistance + + Comment + Change draw distance quickly + Persist + 1 + Type + String + Value + dd + + AscentCmdTeleportToCam + + Comment + Teleport to your camera + Persist + 1 + Type + String + Value + tp2cam + + AscentCmdLineKeyToName + + Comment + Use a fast key to name querry + Persist + 1 + Type + String + Value + key2name + + AscentCmdLineOfferTp + + Comment + Offer a teleport to target avatar + Persist + 1 + Type + String + Value + offertp + + AscentCmdLineCalc + + Comment + Calculates an expression + Persist + 1 + Type + String + Value + calc + + AscentCmdLineTP2 + + Comment + Teleport to a person by name, partials work. + Persist + 1 + Type + String + Value + tp2 + OptionPlayTpSound Comment @@ -233,112 +431,10 @@ Value 0.1 - - - - AscentCmdLine + WoLfVerticalIMTabs Comment - Would you like the chatbar to be able to be used for command line functions? - Persist - 1 - Type - Boolean - Value - 1 - - AscentCmdLineClearChat - - Comment - Clear chat history to stop lag from chat spam - Persist - 1 - Type - String - Value - clrchat - - AscentCmdLineHeight - - Comment - Teleport to height function command - Persist - 1 - Type - String - Value - gth - - AscentCmdLinePos - - Comment - Teleport to position function command - Persist - 1 - Type - String - Value - gtp - - AscentCmdLineGround - - Comment - Teleport to ground function command - Persist - 1 - Type - String - Value - flr - - AscentCmdLineTeleportHome - - Comment - Teleport to home function command - Persist - 1 - Type - String - Value - tph - - AscentCmdLineRezPlatform - - Comment - Rez a platform underneath you - Persist - 1 - Type - String - Value - rezplat - - AscentPlatformSize - - Comment - How wide the rezzed platform will appear to be. - Persist - 1 - Type - F32 - Value - 30 - - AscentCmdLineMapTo - - Comment - Teleport to a region by name rapidly - Persist - 1 - Type - String - Value - mapto - - AscentMapToKeepPos - - Comment - Attempt to arrive in the same location you were at. + Vertical IM Tabs Persist 1 Type @@ -346,71 +442,19 @@ Value 0 - AscentCmdLineDrawDistance - - Comment - Change draw distance quickly - Persist - 1 - Type - String - Value - dd - - AscentCmdTeleportToCam + + + + AscentPowerfulWizard Comment - Teleport to your camera + User is a bad enough dude. Persist 1 Type - String + Boolean Value - tp2cam - - AscentCmdLineKeyToName - - Comment - Use a fast key to name querry - Persist - 1 - Type - String - Value - key2name - - AscentCmdLineOfferTp - - Comment - Offer a teleport to target avatar - Persist - 1 - Type - String - Value - offertp - - AscentCmdLineCalc - - Comment - Calculates an expression - Persist - 1 - Type - String - Value - calc - - AscentCmdLineTP2 - - Comment - Teleport to a person by name, partials work. - Persist - 1 - Type - String - Value - tp2 + 0 AscentUseCustomTag diff --git a/indra/newview/ascentuploadbrowser.cpp b/indra/newview/ascentuploadbrowser.cpp new file mode 100644 index 000000000..033e14605 --- /dev/null +++ b/indra/newview/ascentuploadbrowser.cpp @@ -0,0 +1,188 @@ +/** + * @file ascentuploadbrowser.h + * @Author Duncan Garrett + * Meant as a replacement to using Windows' file browser for uploads. + * + * Created August 27 2010 + * + * ALL SOURCE CODE IS PROVIDED "AS IS." THE CREATOR MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * k ilu bye + */ + +#include "llviewerprecompiledheaders.h" + +#include "ascentuploadbrowser.h" + +//UI Elements +#include "llbutton.h" //Buttons +#include "llcombobox.h" //Combo dropdowns +#include "llscrolllistctrl.h" //List box for filenames +#include "lluictrlfactory.h" //Loads the XUI + +// project includes +#include "llviewercontrol.h" +#include "llviewerwindow.h" +#include "llsdserialize.h" //XML Parsing - Probably not needed + +///---------------------------------------------------------------------------- +/// Local function declarations, constants, enums, and typedefs +///---------------------------------------------------------------------------- + +ASFloaterUploadBrowser* ASFloaterUploadBrowser::sInstance = NULL; + + +///---------------------------------------------------------------------------- +/// Class LLFloaterAbout +///---------------------------------------------------------------------------- + +// Default constructor +ASFloaterUploadBrowser::ASFloaterUploadBrowser() +: LLFloater(std::string("floater_upload_browser"), std::string("FloaterUploadRect"), LLStringUtil::null) +{ + mPathName = "C:\\Users\\Duncan\\Documents"+gDirUtilp->getDirDelimiter(); //(gDirUtilp->getSkinBaseDir()+gDirUtilp->getDirDelimiter()); + LLUICtrlFactory::getInstance()->buildFloater(this, "floater_upload_browser.xml"); + mFileList = getChild("file_list"); + childSetCommitCallback("file_list", onClickFile, this); + childSetDoubleClickCallback("file_list", onDoubleClick); + refresh(); + mFileList->sortByColumn(std::string("file_name"), TRUE); + mFileList->sortByColumn(std::string("file_type"), TRUE); +} + +// Destroys the object +ASFloaterUploadBrowser::~ASFloaterUploadBrowser() +{ + sInstance = NULL; +} + +void ASFloaterUploadBrowser::onClickFile(LLUICtrl* ctrl, void* user_data) +{ + ASFloaterUploadBrowser* panelp = (ASFloaterUploadBrowser*)user_data; + panelp->refreshUploadOptions(); +} + +void ASFloaterUploadBrowser::refreshUploadOptions() +{ + if (mFileList->getFirstSelected()->getColumn(LIST_FILE_TYPE)->getValue().asInteger() == LIST_TYPE_FILE) + { + if (mFileList->getAllSelected().size() > 1) + { + llinfos << "Selected multiple files." << llendl; + childSetValue("asset_name", "(Multiple)"); + } + else + { + llinfos << "Selected a file." << llendl; + std::string name = mFileList->getFirstSelected()->getColumn(LIST_FILE_NAME)->getValue().asString(); + childSetValue("asset_name", name); + } + } +} + +void ASFloaterUploadBrowser::onDoubleClick(void* user_data) +{ + ASFloaterUploadBrowser* panelp = (ASFloaterUploadBrowser*)user_data; + panelp->handleDoubleClick(); +} + +void ASFloaterUploadBrowser::handleDoubleClick() +{ + if (mFileList->getFirstSelected()->getColumn(LIST_FILE_TYPE)->getValue().asInteger() == LIST_TYPE_PARENT) + { + llinfos << "Double-clicked Parent." << llendl; + } + else if (mFileList->getFirstSelected()->getColumn(LIST_FILE_TYPE)->getValue().asInteger() == LIST_TYPE_FOLDER) + { + /*std::string newPath = (mFileList->getFirstSelected()->getColumn(LIST_FILE_NAME)->getValue().asString()+gDirUtilp->getDirDelimiter()); + newPath = (mPathName+newPath); + mPathName = newPath.c_str();*/ + llinfos << "Double-clicked Folder. Directory should change to " << mPathName << mFileList->getFirstSelected()->getColumn(LIST_FILE_NAME)->getValue().asString() << llendl; + //mPathName.append(mFileList->getFirstSelected()->getColumn(LIST_FILE_NAME)->getValue().asString().c_str() + gDirUtilp->getDirDelimiter()); + refresh(); + } +} + +void ASFloaterUploadBrowser::refresh() +{ + llinfos << "Emptying existing file list." << mPathName << llendl; + mFileList->deleteAllItems(); + llinfos << "Getting file listing at " << mPathName << llendl; + bool found = true; + while(found) + { + std::string filename; + found = gDirUtilp->getNextFileInDir(mPathName, "*.*", filename, false); + if(found) + { + + S32 periodIndex = filename.find_last_of("."); + std::string extension = filename.substr(periodIndex + 1, filename.length() - 1); + llinfos << extension << llendl; + LLSD element; + element["path"] = mPathName + filename; + + LLSD& filename_column = element["columns"][LIST_FILE_NAME]; + filename_column["column"] = "file_name"; + filename_column["font"] = "SANSSERIF"; + filename_column["font-style"] = "NORMAL"; + + LLSD& filetype_column = element["columns"][LIST_FILE_TYPE]; + filetype_column["column"] = "file_type"; + filetype_column["type"] = "number"; + + LLSD& invtype_column = element["columns"][LIST_INVENTORY_TYPE]; + invtype_column["column"] = "icon_inventory_type"; + invtype_column["type"] = "icon"; + invtype_column["value"] = "inv_folder_trash.tga"; + + if ((extension == "jpeg")||(extension == "jpg")||(extension == "tga") + ||(extension == "png")||(extension == "bmp")) + { + invtype_column["value"] = "inv_item_texture.tga"; + filename_column["value"] = filename.substr(0, periodIndex); + filetype_column["value"] = LIST_TYPE_FILE; + } + else if (extension == "wav") + { + invtype_column["value"] = "inv_item_sound.tga"; + filename_column["value"] = filename.substr(0, periodIndex); + filetype_column["value"] = LIST_TYPE_FILE; + } + else if ((extension == "bvh")||(extension == "anim")) + { + invtype_column["value"] = "inv_item_animation.tga"; + filename_column["value"] = filename.substr(0, periodIndex); + filetype_column["value"] = LIST_TYPE_FILE; + } + else if ((extension == filename.substr(0, filename.length() - 1))&&(filename != ".")) + { + invtype_column["value"] = "inv_folder_plain_closed.tga"; + filename_column["value"] = filename; + filetype_column["value"] = LIST_TYPE_FOLDER; + } + else if (filename == "..") + { + invtype_column["value"] = "inv_folder_plain_open.tga"; + filename_column["value"] = filename; + filetype_column["value"] = LIST_TYPE_PARENT; + } + if (invtype_column["value"].asString() != "inv_folder_trash.tga") + { + mFileList->addElement(element, ADD_BOTTOM); + } + } + } +} + +// static +void ASFloaterUploadBrowser::show(void*) +{ + if (!sInstance) + { + sInstance = new ASFloaterUploadBrowser(); + } + + sInstance->open(); /*Flawfinder: ignore*/ +} \ No newline at end of file diff --git a/indra/newview/ascentuploadbrowser.h b/indra/newview/ascentuploadbrowser.h new file mode 100644 index 000000000..9eefbc62e --- /dev/null +++ b/indra/newview/ascentuploadbrowser.h @@ -0,0 +1,56 @@ +/** + * @file ascentuploadbrowser.h + * @Author Duncan Garrett + * Meant as a replacement to using Windows' file browser for uploads. + * + * Created August 27 2010 + * + * ALL SOURCE CODE IS PROVIDED "AS IS." THE CREATOR MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * k ilu bye + */ + +#ifndef ASCENT_UPLOAD_BROWSER +#define ASCENT_UPLOAD_BROWSER + +#include "llfloater.h" + +class LLScrollListCtrl; + +class ASFloaterUploadBrowser : public LLFloater +{ +public: + ASFloaterUploadBrowser(); + virtual ~ASFloaterUploadBrowser(); + static void onClickFile(LLUICtrl* ctrl, void* user_data); + static void onDoubleClick(void* user_data); + + void refresh(); + void refreshUploadOptions(); + void handleDoubleClick(); + static void show(void*); + + std::vector datas; + +private: + static ASFloaterUploadBrowser* sInstance; + enum FILE_COLUMN_ORDER + { + LIST_FILE_TYPE, + LIST_INVENTORY_TYPE, + LIST_FILE_NAME, + LIST_DATA + }; + enum FILE_TYPE_ORDER + { + LIST_TYPE_PARENT, + LIST_TYPE_FOLDER, + LIST_TYPE_FILE + }; + LLScrollListCtrl* mFileList; + std::string mPathName; +}; + + +#endif // ASCENT_UPLOAD_BROWSER \ No newline at end of file diff --git a/indra/newview/llfloaterchatterbox.cpp b/indra/newview/llfloaterchatterbox.cpp index 0fa1aa15e..b8c5ec440 100644 --- a/indra/newview/llfloaterchatterbox.cpp +++ b/indra/newview/llfloaterchatterbox.cpp @@ -43,7 +43,7 @@ #include "llviewercontrol.h" #include "llimview.h" #include "llimpanel.h" - +#include "llstring.h" // // LLFloaterMyFriends // @@ -94,7 +94,18 @@ LLFloaterChatterBox::LLFloaterChatterBox(const LLSD& seed) : { mAutoResize = FALSE; - LLUICtrlFactory::getInstance()->buildFloater(this, "floater_chatterbox.xml", NULL, FALSE); + std::string chatterbox_layout; + if(gSavedSettings.getBOOL("WoLfVerticalIMTabs")) + { + chatterbox_layout = "floater_chatterbox_wolf.xml"; + } + else + { + chatterbox_layout = "floater_chatterbox.xml"; + } + LLUICtrlFactory::getInstance()->buildFloater(this, chatterbox_layout, NULL, FALSE); + /*childHide("chatterbox_tabs_horiz"); + childShow("chatterbox_tabs_vert");*/ if (gSavedSettings.getBOOL("ContactsTornOff")) { LLFloaterMyFriends* floater_contacts = LLFloaterMyFriends::getInstance(0); diff --git a/indra/newview/skins/default/xui/en-us/floater_chatterbox_wolf.xml b/indra/newview/skins/default/xui/en-us/floater_chatterbox_wolf.xml new file mode 100644 index 000000000..69c9283c1 --- /dev/null +++ b/indra/newview/skins/default/xui/en-us/floater_chatterbox_wolf.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/indra/newview/skins/default/xui/en-us/floater_upload_browser.xml b/indra/newview/skins/default/xui/en-us/floater_upload_browser.xml new file mode 100644 index 000000000..4038b9d98 --- /dev/null +++ b/indra/newview/skins/default/xui/en-us/floater_upload_browser.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + Name: + + + + Description: + + + +