Merge branch 'master' of github.com:Beeks/Ascent
This commit is contained in:
@@ -38,6 +38,8 @@
|
|||||||
#include "llvoavatar.h"
|
#include "llvoavatar.h"
|
||||||
#include "llhudeffectlookat.h"
|
#include "llhudeffectlookat.h"
|
||||||
#include "llagent.h"
|
#include "llagent.h"
|
||||||
|
#include "llaudioengine.h" //For POWER USER affirmation.
|
||||||
|
#include "llfloaterchat.h" //For POWER USER affirmation.
|
||||||
#include "llstartup.h"
|
#include "llstartup.h"
|
||||||
#include "llviewercontrol.h"
|
#include "llviewercontrol.h"
|
||||||
#include "lluictrlfactory.h"
|
#include "lluictrlfactory.h"
|
||||||
@@ -74,6 +76,7 @@ private:
|
|||||||
//always show Build
|
//always show Build
|
||||||
BOOL mAlwaysShowFly;
|
BOOL mAlwaysShowFly;
|
||||||
//Disable camera minimum distance
|
//Disable camera minimum distance
|
||||||
|
BOOL mPowerUser;
|
||||||
//Chat/IM -----------------------------------------------------------------------------
|
//Chat/IM -----------------------------------------------------------------------------
|
||||||
BOOL mHideNotificationsInChat;
|
BOOL mHideNotificationsInChat;
|
||||||
BOOL mPlayTypingSound;
|
BOOL mPlayTypingSound;
|
||||||
@@ -152,6 +155,7 @@ void LLPrefsAscentSysImpl::refreshValues()
|
|||||||
//always show Build
|
//always show Build
|
||||||
mAlwaysShowFly = gSavedSettings.getBOOL("AscentFlyAlwaysEnabled");
|
mAlwaysShowFly = gSavedSettings.getBOOL("AscentFlyAlwaysEnabled");
|
||||||
//Disable camera minimum distance
|
//Disable camera minimum distance
|
||||||
|
mPowerUser = gSavedSettings.getBOOL("AscentPowerfulWizard");
|
||||||
//Chat/IMs ----------------------------------------------------------------------------
|
//Chat/IMs ----------------------------------------------------------------------------
|
||||||
mHideNotificationsInChat = gSavedSettings.getBOOL("HideNotificationsInChat");
|
mHideNotificationsInChat = gSavedSettings.getBOOL("HideNotificationsInChat");
|
||||||
mHideTypingNotification = gSavedSettings.getBOOL("AscentHideTypingNotification");
|
mHideTypingNotification = gSavedSettings.getBOOL("AscentHideTypingNotification");
|
||||||
@@ -199,6 +203,8 @@ void LLPrefsAscentSysImpl::refresh()
|
|||||||
//always show Build
|
//always show Build
|
||||||
childSetValue("always_fly_check", mAlwaysShowFly);
|
childSetValue("always_fly_check", mAlwaysShowFly);
|
||||||
//Disable camera minimum distance
|
//Disable camera minimum distance
|
||||||
|
childSetValue("power_user_check", mPowerUser);
|
||||||
|
childSetValue("power_user_confirm_check", mPowerUser);
|
||||||
//Chat --------------------------------------------------------------------------------
|
//Chat --------------------------------------------------------------------------------
|
||||||
childSetValue("hide_notifications_in_chat_check", mHideNotificationsInChat);
|
childSetValue("hide_notifications_in_chat_check", mHideNotificationsInChat);
|
||||||
childSetValue("play_typing_sound_check", mPlayTypingSound);
|
childSetValue("play_typing_sound_check", mPlayTypingSound);
|
||||||
@@ -341,7 +347,17 @@ void LLPrefsAscentSysImpl::apply()
|
|||||||
//always show Build
|
//always show Build
|
||||||
gSavedSettings.setBOOL("AscentFlyAlwaysEnabled", childGetValue("always_fly_check"));
|
gSavedSettings.setBOOL("AscentFlyAlwaysEnabled", childGetValue("always_fly_check"));
|
||||||
//Disable camera minimum distance
|
//Disable camera minimum distance
|
||||||
|
gSavedSettings.setBOOL("AscentPowerfulWizard", (childGetValue("power_user_check") && childGetValue("power_user_confirm_check")));
|
||||||
|
if (gSavedSettings.getBOOL("AscentPowerfulWizard") && !mPowerUser)
|
||||||
|
{
|
||||||
|
LLVector3d lpos_global = gAgent.getPositionGlobal();
|
||||||
|
gAudiop->triggerSound(LLUUID("58a38e89-44c6-c52b-deb8-9f1ddc527319"), gAgent.getID(), 1.0f, LLAudioEngine::AUDIO_TYPE_UI, lpos_global);
|
||||||
|
LLChat chat;
|
||||||
|
chat.mSourceType = CHAT_SOURCE_SYSTEM;
|
||||||
|
chat.mText = llformat("You are bestowed with powers beyond mortal comprehension.\nUse your newfound abilities wisely.\nUnlocked:\n- Animation Priority up to 7 - Meant for animations that should override anything and everything at all times. DO NOT USE THIS FOR GENERAL ANIMATIONS.\n- Right click > Destroy objects - Permanently deletes an object immediately, when you don't feel like waiting for the server to respond.\n- Right Click > Explode objects - Turns and object physical, temporary, and delinks it.");
|
||||||
|
LLFloaterChat::addChat(chat);
|
||||||
|
}
|
||||||
|
//
|
||||||
//Chat/IM ------------------------------------------------------------------------------
|
//Chat/IM ------------------------------------------------------------------------------
|
||||||
//Use Vertical IMs
|
//Use Vertical IMs
|
||||||
//Script count
|
//Script count
|
||||||
@@ -438,6 +454,7 @@ void LLPrefsAscentSysImpl::apply()
|
|||||||
gSavedSettings.setBOOL("RevokePermsOnStandUp", childGetValue("revoke_perms_on_stand_up_check"));
|
gSavedSettings.setBOOL("RevokePermsOnStandUp", childGetValue("revoke_perms_on_stand_up_check"));
|
||||||
|
|
||||||
refreshValues();
|
refreshValues();
|
||||||
|
refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @file ascentuploadbrowser.h
|
* @file ascentuploadbrowser.h
|
||||||
* @Author Duncan Garrett
|
* @Author Duncan Garrett (Hg Beeks)
|
||||||
* Meant as a replacement to using Windows' file browser for uploads.
|
* Meant as a replacement to using a system file browser for uploads.
|
||||||
*
|
*
|
||||||
* Created August 27 2010
|
* Created August 27 2010
|
||||||
*
|
*
|
||||||
@@ -42,10 +42,12 @@ ASFloaterUploadBrowser::ASFloaterUploadBrowser()
|
|||||||
: LLFloater(std::string("floater_upload_browser"), std::string("FloaterUploadRect"), LLStringUtil::null)
|
: LLFloater(std::string("floater_upload_browser"), std::string("FloaterUploadRect"), LLStringUtil::null)
|
||||||
{
|
{
|
||||||
mPathName = "C:\\Users\\Duncan\\Documents"+gDirUtilp->getDirDelimiter(); //(gDirUtilp->getSkinBaseDir()+gDirUtilp->getDirDelimiter());
|
mPathName = "C:\\Users\\Duncan\\Documents"+gDirUtilp->getDirDelimiter(); //(gDirUtilp->getSkinBaseDir()+gDirUtilp->getDirDelimiter());
|
||||||
|
mFilterType = "None";
|
||||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_upload_browser.xml");
|
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_upload_browser.xml");
|
||||||
mFileList = getChild<LLScrollListCtrl>("file_list");
|
mFileList = getChild<LLScrollListCtrl>("file_list");
|
||||||
childSetCommitCallback("file_list", onClickFile, this);
|
childSetCommitCallback("file_list", onClickFile, this);
|
||||||
childSetDoubleClickCallback("file_list", onDoubleClick);
|
childSetDoubleClickCallback("file_list", onDoubleClick);
|
||||||
|
childSetCommitCallback("file_filter_combo", onUpdateFilter, this);
|
||||||
refresh();
|
refresh();
|
||||||
mFileList->sortByColumn(std::string("file_name"), TRUE);
|
mFileList->sortByColumn(std::string("file_name"), TRUE);
|
||||||
mFileList->sortByColumn(std::string("file_type"), TRUE);
|
mFileList->sortByColumn(std::string("file_type"), TRUE);
|
||||||
@@ -63,6 +65,20 @@ void ASFloaterUploadBrowser::onClickFile(LLUICtrl* ctrl, void* user_data)
|
|||||||
panelp->refreshUploadOptions();
|
panelp->refreshUploadOptions();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ASFloaterUploadBrowser::onUpdateFilter(LLUICtrl* ctrl, void* user_data)
|
||||||
|
{
|
||||||
|
llinfos << "Filter change triggered." << llendl;
|
||||||
|
ASFloaterUploadBrowser* panelp = (ASFloaterUploadBrowser*)user_data;
|
||||||
|
LLComboBox* combo = panelp->getChild<LLComboBox>("file_filter_combo");
|
||||||
|
if (combo->getSelectedValue().asString() != panelp->mFilterType)
|
||||||
|
{
|
||||||
|
llinfos << "Selection is new, rebuilding file list." << llendl;
|
||||||
|
panelp->mFilterType.clear();
|
||||||
|
panelp->mFilterType = combo->getSelectedValue().asString().c_str();
|
||||||
|
panelp->refreshUploadOptions();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void ASFloaterUploadBrowser::refreshUploadOptions()
|
void ASFloaterUploadBrowser::refreshUploadOptions()
|
||||||
{
|
{
|
||||||
if (mFileList->getFirstSelected()->getColumn(LIST_FILE_TYPE)->getValue().asInteger() == LIST_TYPE_FILE)
|
if (mFileList->getFirstSelected()->getColumn(LIST_FILE_TYPE)->getValue().asInteger() == LIST_TYPE_FILE)
|
||||||
@@ -95,10 +111,10 @@ void ASFloaterUploadBrowser::handleDoubleClick()
|
|||||||
}
|
}
|
||||||
else if (mFileList->getFirstSelected()->getColumn(LIST_FILE_TYPE)->getValue().asInteger() == LIST_TYPE_FOLDER)
|
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());
|
std::string newPath = (mFileList->getFirstSelected()->getColumn(LIST_FILE_NAME)->getValue().asString()+gDirUtilp->getDirDelimiter());
|
||||||
newPath = (mPathName+newPath);
|
/*newPath = (mPathName+newPath);
|
||||||
mPathName = newPath.c_str();*/
|
mPathName = newPath.c_str();*/
|
||||||
llinfos << "Double-clicked Folder. Directory should change to " << mPathName << mFileList->getFirstSelected()->getColumn(LIST_FILE_NAME)->getValue().asString() << llendl;
|
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());
|
//mPathName.append(mFileList->getFirstSelected()->getColumn(LIST_FILE_NAME)->getValue().asString().c_str() + gDirUtilp->getDirDelimiter());
|
||||||
refresh();
|
refresh();
|
||||||
}
|
}
|
||||||
@@ -110,16 +126,17 @@ void ASFloaterUploadBrowser::refresh()
|
|||||||
mFileList->deleteAllItems();
|
mFileList->deleteAllItems();
|
||||||
llinfos << "Getting file listing at " << mPathName << llendl;
|
llinfos << "Getting file listing at " << mPathName << llendl;
|
||||||
bool found = true;
|
bool found = true;
|
||||||
|
U32 fileCount = gDirUtilp->countFilesInDir(mPathName, "*.*");
|
||||||
while(found)
|
while(found)
|
||||||
{
|
{
|
||||||
std::string filename;
|
std::string filename;
|
||||||
found = gDirUtilp->getNextFileInDir(mPathName, "*.*", filename, false);
|
found = gDirUtilp->getNextFileInDir(mPathName, "*.*", filename, false);
|
||||||
|
fileCount++;
|
||||||
|
//llinfo
|
||||||
if(found)
|
if(found)
|
||||||
{
|
{
|
||||||
|
|
||||||
S32 periodIndex = filename.find_last_of(".");
|
S32 periodIndex = filename.find_last_of(".");
|
||||||
std::string extension = filename.substr(periodIndex + 1, filename.length() - 1);
|
std::string extension = filename.substr(periodIndex + 1, filename.length() - 1);
|
||||||
llinfos << extension << llendl;
|
|
||||||
LLSD element;
|
LLSD element;
|
||||||
element["path"] = mPathName + filename;
|
element["path"] = mPathName + filename;
|
||||||
|
|
||||||
@@ -137,20 +154,20 @@ void ASFloaterUploadBrowser::refresh()
|
|||||||
invtype_column["type"] = "icon";
|
invtype_column["type"] = "icon";
|
||||||
invtype_column["value"] = "inv_folder_trash.tga";
|
invtype_column["value"] = "inv_folder_trash.tga";
|
||||||
|
|
||||||
if ((extension == "jpeg")||(extension == "jpg")||(extension == "tga")
|
if (((extension == "jpeg")||(extension == "jpg")||(extension == "tga")
|
||||||
||(extension == "png")||(extension == "bmp"))
|
||(extension == "png")||(extension == "bmp"))&&((mFilterType == "None")||(mFilterType == "Texture")))
|
||||||
{
|
{
|
||||||
invtype_column["value"] = "inv_item_texture.tga";
|
invtype_column["value"] = "inv_item_texture.tga";
|
||||||
filename_column["value"] = filename.substr(0, periodIndex);
|
filename_column["value"] = filename.substr(0, periodIndex);
|
||||||
filetype_column["value"] = LIST_TYPE_FILE;
|
filetype_column["value"] = LIST_TYPE_FILE;
|
||||||
}
|
}
|
||||||
else if (extension == "wav")
|
else if ((extension == "wav")&&((mFilterType == "None")||(mFilterType == "Sound")))
|
||||||
{
|
{
|
||||||
invtype_column["value"] = "inv_item_sound.tga";
|
invtype_column["value"] = "inv_item_sound.tga";
|
||||||
filename_column["value"] = filename.substr(0, periodIndex);
|
filename_column["value"] = filename.substr(0, periodIndex);
|
||||||
filetype_column["value"] = LIST_TYPE_FILE;
|
filetype_column["value"] = LIST_TYPE_FILE;
|
||||||
}
|
}
|
||||||
else if ((extension == "bvh")||(extension == "anim"))
|
else if (((extension == "bvh")||(extension == "anim"))&&((mFilterType == "None")||(mFilterType == "Animation")))
|
||||||
{
|
{
|
||||||
invtype_column["value"] = "inv_item_animation.tga";
|
invtype_column["value"] = "inv_item_animation.tga";
|
||||||
filename_column["value"] = filename.substr(0, periodIndex);
|
filename_column["value"] = filename.substr(0, periodIndex);
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ public:
|
|||||||
ASFloaterUploadBrowser();
|
ASFloaterUploadBrowser();
|
||||||
virtual ~ASFloaterUploadBrowser();
|
virtual ~ASFloaterUploadBrowser();
|
||||||
static void onClickFile(LLUICtrl* ctrl, void* user_data);
|
static void onClickFile(LLUICtrl* ctrl, void* user_data);
|
||||||
|
static void onUpdateFilter(LLUICtrl* ctrl, void* user_data);
|
||||||
static void onDoubleClick(void* user_data);
|
static void onDoubleClick(void* user_data);
|
||||||
|
|
||||||
void refresh();
|
void refresh();
|
||||||
@@ -50,6 +51,7 @@ private:
|
|||||||
};
|
};
|
||||||
LLScrollListCtrl* mFileList;
|
LLScrollListCtrl* mFileList;
|
||||||
std::string mPathName;
|
std::string mPathName;
|
||||||
|
std::string mFilterType;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -189,6 +189,11 @@ BOOL LLFloaterAnimPreview::postBuild()
|
|||||||
|
|
||||||
childSetCommitCallback("name_form", onCommitName, this);
|
childSetCommitCallback("name_form", onCommitName, this);
|
||||||
|
|
||||||
|
if (gSavedSettings.getBOOL("AscentPowerfulWizard"))
|
||||||
|
{
|
||||||
|
childSetMaxValue("priority", 7);
|
||||||
|
}
|
||||||
|
|
||||||
childSetLabelArg("ok_btn", "[AMOUNT]", llformat("%d",sUploadAmount));
|
childSetLabelArg("ok_btn", "[AMOUNT]", llformat("%d",sUploadAmount));
|
||||||
childSetAction("ok_btn", onBtnOK, this);
|
childSetAction("ok_btn", onBtnOK, this);
|
||||||
setDefaultBtn();
|
setDefaultBtn();
|
||||||
|
|||||||
@@ -462,9 +462,47 @@ void LLFloaterTools::refresh()
|
|||||||
|
|
||||||
// Refresh object and prim count labels
|
// Refresh object and prim count labels
|
||||||
LLLocale locale(LLLocale::USER_LOCALE);
|
LLLocale locale(LLLocale::USER_LOCALE);
|
||||||
std::string obj_count_string;
|
// Added in Link Num value -HgB
|
||||||
LLResMgr::getInstance()->getIntegerString(obj_count_string, LLSelectMgr::getInstance()->getSelection()->getRootObjectCount());
|
S32 object_count = LLSelectMgr::getInstance()->getSelection()->getRootObjectCount();
|
||||||
childSetTextArg("obj_count", "[COUNT]", obj_count_string);
|
S32 prim_count = LLSelectMgr::getInstance()->getEditSelection()->getObjectCount();
|
||||||
|
std::string value_string;
|
||||||
|
std::string desc_string;
|
||||||
|
if ((gSavedSettings.getBOOL("EditLinkedParts"))&&(prim_count == 1)) //Selecting a single prim in "Edit Linked" mode, show link number
|
||||||
|
{
|
||||||
|
desc_string = "Link number:";
|
||||||
|
|
||||||
|
LLViewerObject* selected = LLSelectMgr::getInstance()->getSelection()->getFirstObject();
|
||||||
|
if (selected && selected->getRootEdit())
|
||||||
|
{
|
||||||
|
LLViewerObject::child_list_t children = selected->getRootEdit()->getChildren();
|
||||||
|
if (children.empty())
|
||||||
|
{
|
||||||
|
value_string = "0"; // An unlinked prim is "link 0".
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
children.push_front(selected->getRootEdit()); // need root in the list too
|
||||||
|
S32 index = 0;
|
||||||
|
for (LLViewerObject::child_list_t::iterator iter = children.begin(); iter != children.end(); ++iter)
|
||||||
|
{
|
||||||
|
index++;
|
||||||
|
if ((*iter)->isSelected())
|
||||||
|
{
|
||||||
|
LLResMgr::getInstance()->getIntegerString(value_string, index);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
desc_string = "Selected objects:";
|
||||||
|
LLResMgr::getInstance()->getIntegerString(value_string, object_count);
|
||||||
|
}
|
||||||
|
childSetTextArg("link_num_obj_count", "[DESC]", desc_string);
|
||||||
|
childSetTextArg("link_num_obj_count", "[NUM]", value_string);
|
||||||
|
|
||||||
std::string prim_count_string;
|
std::string prim_count_string;
|
||||||
LLResMgr::getInstance()->getIntegerString(prim_count_string, LLSelectMgr::getInstance()->getSelection()->getObjectCount());
|
LLResMgr::getInstance()->getIntegerString(prim_count_string, LLSelectMgr::getInstance()->getSelection()->getObjectCount());
|
||||||
childSetTextArg("prim_count", "[COUNT]", prim_count_string);
|
childSetTextArg("prim_count", "[COUNT]", prim_count_string);
|
||||||
@@ -746,8 +784,8 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
|
|||||||
mSliderDozerForce ->setVisible( land_visible );
|
mSliderDozerForce ->setVisible( land_visible );
|
||||||
childSetVisible("Strength:", land_visible);
|
childSetVisible("Strength:", land_visible);
|
||||||
}
|
}
|
||||||
|
|
||||||
childSetVisible("obj_count", !land_visible);
|
childSetVisible("link_num_obj_count", !land_visible);
|
||||||
childSetVisible("prim_count", !land_visible);
|
childSetVisible("prim_count", !land_visible);
|
||||||
mTab->setVisible(!land_visible);
|
mTab->setVisible(!land_visible);
|
||||||
mPanelLandInfo->setVisible(land_visible);
|
mPanelLandInfo->setVisible(land_visible);
|
||||||
|
|||||||
@@ -498,13 +498,14 @@ void LLInventoryView::init(LLInventoryModel* inventory)
|
|||||||
addBoolControl("Inventory.FoldersAlwaysByName", sort_folders_by_name );
|
addBoolControl("Inventory.FoldersAlwaysByName", sort_folders_by_name );
|
||||||
addBoolControl("Inventory.SystemFoldersToTop", sort_system_folders_to_top );
|
addBoolControl("Inventory.SystemFoldersToTop", sort_system_folders_to_top );
|
||||||
|
|
||||||
|
//Search Controls - RKeast
|
||||||
U32 search_type = gSavedPerAccountSettings.getU32("rkeastInventorySearchType");
|
U32 search_type = gSavedPerAccountSettings.getU32("rkeastInventorySearchType");
|
||||||
BOOL search_by_name = (search_type == 0);
|
BOOL search_by_name = (search_type == 0);
|
||||||
|
|
||||||
addBoolControl("Inventory.SearchByName", search_by_name);
|
addBoolControl("Inventory.SearchByName", search_by_name);
|
||||||
addBoolControl("Inventory.SearchByCreator", !search_by_name);
|
addBoolControl("Inventory.SearchByCreator", !search_by_name);
|
||||||
addBoolControl("Inventory.SearchByDesc", !search_by_name);
|
addBoolControl("Inventory.SearchByDesc", !search_by_name);
|
||||||
|
addBoolControl("Inventory.SearchByUUID", !search_by_name);
|
||||||
|
|
||||||
addBoolControl("Inventory.SearchByAll", !search_by_name);
|
addBoolControl("Inventory.SearchByAll", !search_by_name);
|
||||||
|
|
||||||
@@ -608,6 +609,9 @@ BOOL LLInventoryView::postBuild()
|
|||||||
childSetTabChangeCallback("inventory filter tabs", "Recent Items", onFilterSelected, this);
|
childSetTabChangeCallback("inventory filter tabs", "Recent Items", onFilterSelected, this);
|
||||||
childSetTabChangeCallback("inventory filter tabs", "Worn Items", onFilterSelected, this);
|
childSetTabChangeCallback("inventory filter tabs", "Worn Items", onFilterSelected, this);
|
||||||
|
|
||||||
|
childSetAction("Inventory.ResetAll",onResetAll,this);
|
||||||
|
childSetAction("Inventory.ExpandAll",onExpandAll,this);
|
||||||
|
|
||||||
//panel->getFilter()->markDefault();
|
//panel->getFilter()->markDefault();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@@ -832,7 +836,7 @@ void LLInventoryView::changed(U32 mask)
|
|||||||
std::string item_count_string;
|
std::string item_count_string;
|
||||||
LLResMgr::getInstance()->getIntegerString(item_count_string, gInventory.getItemCount());
|
LLResMgr::getInstance()->getIntegerString(item_count_string, gInventory.getItemCount());
|
||||||
|
|
||||||
//Displays a progress indication for loading the inventory, but not if it hasn't been loaded before on this PC, or we load more than expected - rkeast
|
//Displays a progress indication for loading the inventory, but not if it hasn't been loaded before on this PC, or we load more than expected - rkeast
|
||||||
if(mItemCount == -1)
|
if(mItemCount == -1)
|
||||||
{
|
{
|
||||||
title << " (Fetched " << item_count_string << " items...)";
|
title << " (Fetched " << item_count_string << " items...)";
|
||||||
@@ -1340,6 +1344,38 @@ void LLInventoryView::refreshQuickFilter(LLUICtrl* ctrl)
|
|||||||
// return FALSE;
|
// return FALSE;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
//static
|
||||||
|
void LLInventoryView::onResetAll(void* userdata)
|
||||||
|
{
|
||||||
|
LLInventoryView* self = (LLInventoryView*) userdata;
|
||||||
|
self->mActivePanel = (LLInventoryPanel*)self->childGetVisibleTab("inventory filter tabs");
|
||||||
|
|
||||||
|
if (!self->mActivePanel)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (self->mActivePanel && self->mSearchEditor)
|
||||||
|
{
|
||||||
|
self->mSearchEditor->setText(LLStringUtil::null);
|
||||||
|
}
|
||||||
|
self->onSearchEdit("",userdata);
|
||||||
|
self->mActivePanel->closeAllFolders();
|
||||||
|
}
|
||||||
|
|
||||||
|
//static
|
||||||
|
void LLInventoryView::onExpandAll(void* userdata)
|
||||||
|
{
|
||||||
|
LLInventoryView* self = (LLInventoryView*) userdata;
|
||||||
|
self->mActivePanel = (LLInventoryPanel*)self->childGetVisibleTab("inventory filter tabs");
|
||||||
|
|
||||||
|
if (!self->mActivePanel)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
self->mActivePanel->openAllFolders();
|
||||||
|
}
|
||||||
|
|
||||||
//static
|
//static
|
||||||
void LLInventoryView::onFilterSelected(void* userdata, bool from_click)
|
void LLInventoryView::onFilterSelected(void* userdata, bool from_click)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -293,6 +293,8 @@ public:
|
|||||||
static void refreshQuickFilter(LLUICtrl* ctrl);
|
static void refreshQuickFilter(LLUICtrl* ctrl);
|
||||||
|
|
||||||
static void onFilterSelected(void* userdata, bool from_click);
|
static void onFilterSelected(void* userdata, bool from_click);
|
||||||
|
static void onResetAll(void* userdata);
|
||||||
|
static void onExpandAll(void* userdata);
|
||||||
static void onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action, void* data);
|
static void onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action, void* data);
|
||||||
|
|
||||||
const std::string getFilterSubString() { return mActivePanel->getFilterSubString(); }
|
const std::string getFilterSubString() { return mActivePanel->getFilterSubString(); }
|
||||||
|
|||||||
@@ -2080,7 +2080,7 @@ void LLPanelAvatar::processAvatarPropertiesReply(LLMessageSystem *msg, void**)
|
|||||||
args["[PAYMENTINFO]"] = self->mPanelSecondLife->getString(payment_text);
|
args["[PAYMENTINFO]"] = self->mPanelSecondLife->getString(payment_text);
|
||||||
std::string age_text = age_verified ? "AgeVerified" : "NotAgeVerified";
|
std::string age_text = age_verified ? "AgeVerified" : "NotAgeVerified";
|
||||||
// Do not display age verification status at this time
|
// Do not display age verification status at this time
|
||||||
//args["[[AGEVERIFICATION]]"] = self->mPanelSecondLife->getString(age_text);
|
args["[[AGEVERIFICATION]]"] = self->mPanelSecondLife->getString(age_text);
|
||||||
args["[AGEVERIFICATION]"] = " ";
|
args["[AGEVERIFICATION]"] = " ";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -751,10 +751,7 @@ BOOL LLTaskCategoryBridge::renameItem(const std::string& new_name)
|
|||||||
|
|
||||||
BOOL LLTaskCategoryBridge::isItemRemovable()
|
BOOL LLTaskCategoryBridge::isItemRemovable()
|
||||||
{
|
{
|
||||||
// <edit>
|
return FALSE;
|
||||||
//return FALSE;
|
|
||||||
return TRUE;
|
|
||||||
// </edit>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLTaskCategoryBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
|
void LLTaskCategoryBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
|
||||||
@@ -825,19 +822,19 @@ BOOL LLTaskCategoryBridge::dragOrDrop(MASK mask, BOOL drop,
|
|||||||
case DAD_BODYPART:
|
case DAD_BODYPART:
|
||||||
case DAD_ANIMATION:
|
case DAD_ANIMATION:
|
||||||
case DAD_GESTURE:
|
case DAD_GESTURE:
|
||||||
// <edit>
|
// <edit>
|
||||||
case DAD_CALLINGCARD:
|
case DAD_CALLINGCARD:
|
||||||
// </edit>
|
// </edit>
|
||||||
// *HACK: In order to resolve SL-22177, we need to block
|
// *HACK: In order to resolve SL-22177, we need to block
|
||||||
// drags from notecards and objects onto other
|
// drags from notecards and objects onto other
|
||||||
// objects. uncomment the simpler version when we have
|
// objects. uncomment the simpler version when we have
|
||||||
// that right.
|
// that right.
|
||||||
accept = LLToolDragAndDrop::isInventoryDropAcceptable(object, (LLViewerInventoryItem*)cargo_data);
|
accept = LLToolDragAndDrop::isInventoryDropAcceptable(object, (LLViewerInventoryItem*)cargo_data);
|
||||||
// <edit> testzone
|
// <edit> testzone
|
||||||
//if(LLToolDragAndDrop::isInventoryDropAcceptable(
|
//if(LLToolDragAndDrop::isInventoryDropAcceptable(
|
||||||
// object, (LLViewerInventoryItem*)cargo_data)
|
// object, (LLViewerInventoryItem*)cargo_data)
|
||||||
if(object->permModify()
|
if(object->permModify()
|
||||||
// </edit>
|
// </edit>
|
||||||
&& (LLToolDragAndDrop::SOURCE_WORLD != LLToolDragAndDrop::getInstance()->getSource())
|
&& (LLToolDragAndDrop::SOURCE_WORLD != LLToolDragAndDrop::getInstance()->getSource())
|
||||||
&& (LLToolDragAndDrop::SOURCE_NOTECARD != LLToolDragAndDrop::getInstance()->getSource()))
|
&& (LLToolDragAndDrop::SOURCE_NOTECARD != LLToolDragAndDrop::getInstance()->getSource()))
|
||||||
{
|
{
|
||||||
@@ -875,9 +872,9 @@ BOOL LLTaskCategoryBridge::dragOrDrop(MASK mask, BOOL drop,
|
|||||||
LLToolDragAndDrop::getInstance()->getSourceID());
|
LLToolDragAndDrop::getInstance()->getSourceID());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
// <edit>
|
// <edit>
|
||||||
//case DAD_CALLINGCARD:
|
//case DAD_CALLINGCARD:
|
||||||
// </edit>
|
// </edit>
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,6 +50,8 @@
|
|||||||
#include "lluictrlfactory.h"
|
#include "lluictrlfactory.h"
|
||||||
#include "llviewerwindow.h"
|
#include "llviewerwindow.h"
|
||||||
#include "lllineeditor.h"
|
#include "lllineeditor.h"
|
||||||
|
#include "llfloateravatarinfo.h"
|
||||||
|
|
||||||
|
|
||||||
const S32 PREVIEW_TEXTURE_MIN_WIDTH = 300;
|
const S32 PREVIEW_TEXTURE_MIN_WIDTH = 300;
|
||||||
const S32 PREVIEW_TEXTURE_MIN_HEIGHT = 120;
|
const S32 PREVIEW_TEXTURE_MIN_HEIGHT = 120;
|
||||||
@@ -61,6 +63,7 @@ const S32 CLIENT_RECT_VPAD = 4;
|
|||||||
|
|
||||||
const F32 SECONDS_TO_SHOW_FILE_SAVED_MSG = 8.f;
|
const F32 SECONDS_TO_SHOW_FILE_SAVED_MSG = 8.f;
|
||||||
|
|
||||||
|
LLPreviewTexture * LLPreviewTexture::sInstance;
|
||||||
LLPreviewTexture::LLPreviewTexture(const std::string& name,
|
LLPreviewTexture::LLPreviewTexture(const std::string& name,
|
||||||
const LLRect& rect,
|
const LLRect& rect,
|
||||||
const std::string& title,
|
const std::string& title,
|
||||||
@@ -74,7 +77,8 @@ LLPreviewTexture::LLPreviewTexture(const std::string& name,
|
|||||||
mIsCopyable(FALSE),
|
mIsCopyable(FALSE),
|
||||||
mLastHeight(0),
|
mLastHeight(0),
|
||||||
mLastWidth(0),
|
mLastWidth(0),
|
||||||
mAspectRatio(0.f)
|
mAspectRatio(0.f),
|
||||||
|
mCreatorKey(LLUUID())
|
||||||
{
|
{
|
||||||
const LLInventoryItem *item = getItem();
|
const LLInventoryItem *item = getItem();
|
||||||
if(item)
|
if(item)
|
||||||
@@ -117,7 +121,8 @@ LLPreviewTexture::LLPreviewTexture(
|
|||||||
const LLRect& rect,
|
const LLRect& rect,
|
||||||
const std::string& title,
|
const std::string& title,
|
||||||
const LLUUID& asset_id,
|
const LLUUID& asset_id,
|
||||||
BOOL copy_to_inv)
|
BOOL copy_to_inv,
|
||||||
|
BOOL copyable)
|
||||||
:
|
:
|
||||||
LLPreview(
|
LLPreview(
|
||||||
name,
|
name,
|
||||||
@@ -132,7 +137,7 @@ LLPreviewTexture::LLPreviewTexture(
|
|||||||
mLoadingFullImage( FALSE ),
|
mLoadingFullImage( FALSE ),
|
||||||
mShowKeepDiscard(FALSE),
|
mShowKeepDiscard(FALSE),
|
||||||
mCopyToInv(copy_to_inv),
|
mCopyToInv(copy_to_inv),
|
||||||
mIsCopyable(copy_to_inv),
|
mIsCopyable(copyable),
|
||||||
mLastHeight(0),
|
mLastHeight(0),
|
||||||
mLastWidth(0),
|
mLastWidth(0),
|
||||||
mAspectRatio(0.f)
|
mAspectRatio(0.f)
|
||||||
@@ -141,7 +146,6 @@ LLPreviewTexture::LLPreviewTexture(
|
|||||||
init();
|
init();
|
||||||
|
|
||||||
setTitle(title);
|
setTitle(title);
|
||||||
|
|
||||||
LLRect curRect = getRect();
|
LLRect curRect = getRect();
|
||||||
translate(curRect.mLeft - rect.mLeft, curRect.mTop - rect.mTop);
|
translate(curRect.mLeft - rect.mLeft, curRect.mTop - rect.mTop);
|
||||||
|
|
||||||
@@ -155,53 +159,41 @@ LLPreviewTexture::~LLPreviewTexture()
|
|||||||
getWindow()->decBusyCount();
|
getWindow()->decBusyCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(mImage.notNull())
|
||||||
|
{
|
||||||
|
mImage->destroySavedRawImage() ;
|
||||||
|
}
|
||||||
mImage = NULL;
|
mImage = NULL;
|
||||||
|
sInstance = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void LLPreviewTexture::init()
|
void LLPreviewTexture::init()
|
||||||
{
|
{
|
||||||
|
sInstance = this;
|
||||||
|
LLUICtrlFactory::getInstance()->buildFloater(sInstance,"floater_preview_texture.xml");
|
||||||
|
|
||||||
|
childSetVisible("desc", !mCopyToInv); // Hide description field for embedded textures
|
||||||
/*if (mCopyToInv)
|
childSetVisible("desc txt", !mCopyToInv);
|
||||||
{
|
childSetVisible("Copy To Inventory", mCopyToInv);
|
||||||
llinfos << "Loading embedded" << llendl;
|
childSetVisible("Keep", mShowKeepDiscard);
|
||||||
LLUICtrlFactory::getInstance()->buildFloater(this,"floater_preview_embedded_texture.xml");
|
childSetVisible("Discard", mShowKeepDiscard);
|
||||||
|
childSetAction("openprofile", onClickProfile, this);
|
||||||
|
|
||||||
|
llinfos << "Image has alpha :" << mImage->getIsAlphaMask() << llendl;
|
||||||
|
if (mCopyToInv)
|
||||||
|
{
|
||||||
childSetAction("Copy To Inventory",LLPreview::onBtnCopyToInv,this);
|
childSetAction("Copy To Inventory",LLPreview::onBtnCopyToInv,this);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (mShowKeepDiscard)
|
else if (mShowKeepDiscard)
|
||||||
{
|
{
|
||||||
llinfos << "Loading Keep/Discard" << llendl;
|
|
||||||
LLUICtrlFactory::getInstance()->buildFloater(this,"floater_preview_texture_keep_discard.xml");
|
|
||||||
|
|
||||||
childSetAction("Keep",onKeepBtn,this);
|
childSetAction("Keep",onKeepBtn,this);
|
||||||
childSetAction("Discard",onDiscardBtn,this);
|
childSetAction("Discard",onDiscardBtn,this);
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{*/
|
|
||||||
LLUICtrlFactory::getInstance()->buildFloater(this,"floater_preview_texture.xml");
|
|
||||||
childSetVisible("Copy To Inventory", mCopyToInv);
|
|
||||||
childSetVisible("Keep", mShowKeepDiscard);
|
|
||||||
childSetVisible("Discard", mShowKeepDiscard);
|
|
||||||
llinfos << "Image has alpha :" << mImage->getIsAlphaMask() << llendl;
|
|
||||||
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
|
||||||
if (!mCopyToInv)
|
|
||||||
{
|
{
|
||||||
const LLInventoryItem* item = getItem();
|
|
||||||
|
|
||||||
if (item)
|
|
||||||
{
|
|
||||||
childSetCommitCallback("desc", LLPreview::onText, this);
|
|
||||||
childSetText("desc", item->getDescription());
|
|
||||||
childSetPrevalidate("desc", &LLLineEditor::prevalidatePrintableNotPipe);
|
|
||||||
}
|
|
||||||
|
|
||||||
// If the buttons are hidden move stuff down to use the space.
|
// If the buttons are hidden move stuff down to use the space.
|
||||||
|
|
||||||
LLRect keep_rect, old_rect, new_rect;
|
LLRect keep_rect, old_rect, new_rect;
|
||||||
@@ -212,30 +204,51 @@ void LLPreviewTexture::init()
|
|||||||
|
|
||||||
diff = old_rect.mBottom - keep_rect.mBottom;
|
diff = old_rect.mBottom - keep_rect.mBottom;
|
||||||
|
|
||||||
new_rect.setOriginAndSize(old_rect.mLeft, old_rect.mBottom - diff - 3,
|
new_rect.setOriginAndSize(old_rect.mLeft, old_rect.mBottom - diff,
|
||||||
old_rect.getWidth(), old_rect.getHeight());
|
old_rect.getWidth(), old_rect.getHeight());
|
||||||
childSetRect("combo_aspect_ratio", new_rect);
|
childSetRect("combo_aspect_ratio", new_rect);
|
||||||
|
|
||||||
childGetRect("aspect_ratio", old_rect);
|
childGetRect("aspect_ratio", old_rect);
|
||||||
new_rect.setOriginAndSize(old_rect.mLeft, old_rect.mBottom - diff - 3,
|
new_rect.setOriginAndSize(old_rect.mLeft, old_rect.mBottom - diff,
|
||||||
old_rect.getWidth(), old_rect.getHeight());
|
old_rect.getWidth(), old_rect.getHeight());
|
||||||
childSetRect("aspect_ratio", new_rect);
|
childSetRect("aspect_ratio", new_rect);
|
||||||
|
|
||||||
childGetRect("dimensions", old_rect);
|
childGetRect("dimensions", old_rect);
|
||||||
new_rect.setOriginAndSize(old_rect.mLeft, old_rect.mBottom - diff - 3,
|
new_rect.setOriginAndSize(old_rect.mLeft, old_rect.mBottom - diff,
|
||||||
old_rect.getWidth(), old_rect.getHeight());
|
old_rect.getWidth(), old_rect.getHeight());
|
||||||
childSetRect("dimensions", new_rect);
|
childSetRect("dimensions", new_rect);
|
||||||
}
|
}
|
||||||
childSetText("uuid", getItemID().asString());
|
|
||||||
childSetText("uploader", getItemCreatorName());
|
|
||||||
childSetText("uploadtime", getItemCreationDate());
|
|
||||||
|
|
||||||
|
|
||||||
|
if (!mCopyToInv)
|
||||||
|
{
|
||||||
|
const LLInventoryItem* item = getItem();
|
||||||
|
|
||||||
|
if (item)
|
||||||
|
{
|
||||||
|
mCreatorKey = item->getCreatorUUID();
|
||||||
|
childSetCommitCallback("desc", LLPreview::onText, this);
|
||||||
|
childSetText("desc", item->getDescription());
|
||||||
|
childSetPrevalidate("desc", &LLLineEditor::prevalidatePrintableNotPipe);
|
||||||
|
childSetText("uuid", getItemID().asString());
|
||||||
|
childSetText("uploader", getItemCreatorName());
|
||||||
|
childSetText("uploadtime", getItemCreationDate());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
childSetCommitCallback("combo_aspect_ratio", onAspectRatioCommit, this);
|
childSetCommitCallback("combo_aspect_ratio", onAspectRatioCommit, this);
|
||||||
LLComboBox* combo = getChild<LLComboBox>("combo_aspect_ratio");
|
LLComboBox* combo = getChild<LLComboBox>("combo_aspect_ratio");
|
||||||
combo->setCurrentByIndex(0);
|
combo->setCurrentByIndex(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LLPreviewTexture::callbackLoadAvatarName(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group, void* data)
|
||||||
|
{
|
||||||
|
if (!sInstance) return;
|
||||||
|
std::ostringstream fullname;
|
||||||
|
fullname << first << " " << last;
|
||||||
|
sInstance->childSetText("uploader", fullname.str());
|
||||||
|
}
|
||||||
|
|
||||||
void LLPreviewTexture::draw()
|
void LLPreviewTexture::draw()
|
||||||
{
|
{
|
||||||
updateDimensions();
|
updateDimensions();
|
||||||
@@ -268,7 +281,11 @@ void LLPreviewTexture::draw()
|
|||||||
// Pump the texture priority
|
// Pump the texture priority
|
||||||
F32 pixel_area = mLoadingFullImage ? (F32)MAX_IMAGE_AREA : (F32)(interior.getWidth() * interior.getHeight() );
|
F32 pixel_area = mLoadingFullImage ? (F32)MAX_IMAGE_AREA : (F32)(interior.getWidth() * interior.getHeight() );
|
||||||
mImage->addTextureStats( pixel_area );
|
mImage->addTextureStats( pixel_area );
|
||||||
|
if(pixel_area > 0.f)
|
||||||
|
{
|
||||||
|
//boost the previewed image priority to the highest to make it to get loaded first.
|
||||||
|
mImage->setAdditionalDecodePriority(1.0f) ;
|
||||||
|
}
|
||||||
// Don't bother decoding more than we can display, unless
|
// Don't bother decoding more than we can display, unless
|
||||||
// we're loading the full image.
|
// we're loading the full image.
|
||||||
if (!mLoadingFullImage)
|
if (!mLoadingFullImage)
|
||||||
@@ -319,7 +336,7 @@ void LLPreviewTexture::draw()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if( !mSavedFileTimer.hasExpired() )
|
else if(!mSavedFileTimer.hasExpired())
|
||||||
{
|
{
|
||||||
// *TODO: Translate
|
// *TODO: Translate
|
||||||
LLFontGL::getFontSansSerif()->renderUTF8(std::string("File Saved"), 0,
|
LLFontGL::getFontSansSerif()->renderUTF8(std::string("File Saved"), 0,
|
||||||
@@ -448,6 +465,7 @@ std::string LLPreviewTexture::getItemCreatorName()
|
|||||||
{
|
{
|
||||||
std::string name;
|
std::string name;
|
||||||
gCacheName->getFullName(item->getCreatorUUID(), name);
|
gCacheName->getFullName(item->getCreatorUUID(), name);
|
||||||
|
mCreatorKey = item->getCreatorUUID();
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
return "Unknown";
|
return "Unknown";
|
||||||
@@ -470,12 +488,11 @@ void LLPreviewTexture::updateDimensions()
|
|||||||
S32 vert_pad = PREVIEW_HEADER_SIZE + 2 * CLIENT_RECT_VPAD + LLPANEL_BORDER_WIDTH;
|
S32 vert_pad = PREVIEW_HEADER_SIZE + 2 * CLIENT_RECT_VPAD + LLPANEL_BORDER_WIDTH;
|
||||||
S32 max_client_width = gViewerWindow->getWindowWidth() - horiz_pad;
|
S32 max_client_width = gViewerWindow->getWindowWidth() - horiz_pad;
|
||||||
S32 max_client_height = gViewerWindow->getWindowHeight() - vert_pad;
|
S32 max_client_height = gViewerWindow->getWindowHeight() - vert_pad;
|
||||||
|
|
||||||
if (mAspectRatio > 0.f)
|
if (mAspectRatio > 0.f) client_height = llceil((F32)client_width / mAspectRatio);
|
||||||
client_height = llceil((F32)client_width / mAspectRatio);
|
|
||||||
|
|
||||||
while ((client_width > max_client_width) ||
|
while ((client_width > max_client_width) ||
|
||||||
(client_height > max_client_height ) )
|
(client_height > max_client_height ))
|
||||||
{
|
{
|
||||||
client_width /= 2;
|
client_width /= 2;
|
||||||
client_height /= 2;
|
client_height /= 2;
|
||||||
@@ -603,6 +620,13 @@ bool LLPreviewTexture::setAspectRatio(const F32 width, const F32 height)
|
|||||||
return (ratio == mAspectRatio);
|
return (ratio == mAspectRatio);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LLPreviewTexture::onClickProfile(void* userdata)
|
||||||
|
{
|
||||||
|
LLPreviewTexture* self = (LLPreviewTexture*) userdata;
|
||||||
|
LLUUID key = self->mCreatorKey;
|
||||||
|
if (!key.isNull()) LLFloaterAvatarInfo::showFromDirectory(key);
|
||||||
|
}
|
||||||
|
|
||||||
void LLPreviewTexture::onAspectRatioCommit(LLUICtrl* ctrl, void* userdata)
|
void LLPreviewTexture::onAspectRatioCommit(LLUICtrl* ctrl, void* userdata)
|
||||||
{
|
{
|
||||||
LLPreviewTexture* self = (LLPreviewTexture*) userdata;
|
LLPreviewTexture* self = (LLPreviewTexture*) userdata;
|
||||||
@@ -630,6 +654,7 @@ void LLPreviewTexture::loadAsset()
|
|||||||
{
|
{
|
||||||
mImage = gImageList.getImage(mImageID, MIPMAP_TRUE, FALSE);
|
mImage = gImageList.getImage(mImageID, MIPMAP_TRUE, FALSE);
|
||||||
mImage->setBoostLevel(LLViewerImageBoostLevel::BOOST_PREVIEW);
|
mImage->setBoostLevel(LLViewerImageBoostLevel::BOOST_PREVIEW);
|
||||||
|
mImage->forceToSaveRawImage(0) ;
|
||||||
mAssetStatus = PREVIEW_ASSET_LOADING;
|
mAssetStatus = PREVIEW_ASSET_LOADING;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,7 @@
|
|||||||
#include "llframetimer.h"
|
#include "llframetimer.h"
|
||||||
#include "llviewerimage.h"
|
#include "llviewerimage.h"
|
||||||
|
|
||||||
|
class LLComboBox;
|
||||||
class LLImageRaw;
|
class LLImageRaw;
|
||||||
|
|
||||||
class LLPreviewTexture : public LLPreview
|
class LLPreviewTexture : public LLPreview
|
||||||
@@ -55,7 +56,8 @@ public:
|
|||||||
const LLRect& rect,
|
const LLRect& rect,
|
||||||
const std::string& title,
|
const std::string& title,
|
||||||
const LLUUID& asset_id,
|
const LLUUID& asset_id,
|
||||||
BOOL copy_to_inv = FALSE);
|
BOOL copy_to_inv = FALSE,
|
||||||
|
BOOL copyable = TRUE);
|
||||||
~LLPreviewTexture();
|
~LLPreviewTexture();
|
||||||
|
|
||||||
virtual void draw();
|
virtual void draw();
|
||||||
@@ -77,7 +79,8 @@ public:
|
|||||||
S32 discard_level,
|
S32 discard_level,
|
||||||
BOOL final,
|
BOOL final,
|
||||||
void* userdata );
|
void* userdata );
|
||||||
|
static LLPreviewTexture* getInstance(){ return sInstance; }
|
||||||
|
LLUUID mCreatorKey;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void init();
|
void init();
|
||||||
@@ -95,6 +98,10 @@ private:
|
|||||||
LLFrameTimer mSavedFileTimer;
|
LLFrameTimer mSavedFileTimer;
|
||||||
BOOL mShowKeepDiscard;
|
BOOL mShowKeepDiscard;
|
||||||
BOOL mCopyToInv;
|
BOOL mCopyToInv;
|
||||||
|
|
||||||
|
static LLPreviewTexture* sInstance;
|
||||||
|
static void onClickProfile(void* userdata);
|
||||||
|
static void callbackLoadAvatarName(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group, void* data);
|
||||||
|
|
||||||
// This is stored off in a member variable, because the save-as
|
// This is stored off in a member variable, because the save-as
|
||||||
// button and drag and drop functionality need to know.
|
// button and drag and drop functionality need to know.
|
||||||
@@ -102,7 +109,7 @@ private:
|
|||||||
|
|
||||||
S32 mLastHeight;
|
S32 mLastHeight;
|
||||||
S32 mLastWidth;
|
S32 mLastWidth;
|
||||||
F32 mAspectRatio;
|
F32 mAspectRatio; // 0 = Unconstrained
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -756,10 +756,11 @@ void init_menus()
|
|||||||
menu->append(new LLMenuItemCallGL( "Toggle IM Typing Notification", &handle_hide_typing_notification, NULL));
|
menu->append(new LLMenuItemCallGL( "Toggle IM Typing Notification", &handle_hide_typing_notification, NULL));
|
||||||
menu->append(new LLMenuItemCallGL( "Close All Dialogs",
|
menu->append(new LLMenuItemCallGL( "Close All Dialogs",
|
||||||
&handle_close_all_notifications, NULL, NULL, 'D', MASK_CONTROL | MASK_ALT | MASK_SHIFT));
|
&handle_close_all_notifications, NULL, NULL, 'D', MASK_CONTROL | MASK_ALT | MASK_SHIFT));
|
||||||
|
if (gSavedSettings.getBOOL("AscentPowerfulWizard"))
|
||||||
menu->append(new LLMenuItemCallGL( "Message Log", &handle_open_message_log, NULL));
|
{
|
||||||
menu->append(new LLMenuItemCallGL( "Message Builder", &handle_open_message_builder, NULL));
|
menu->append(new LLMenuItemCallGL( "Message Log", &handle_open_message_log, NULL));
|
||||||
|
menu->append(new LLMenuItemCallGL( "Message Builder", &handle_open_message_builder, NULL));
|
||||||
|
}
|
||||||
menu->append(new LLMenuItemCallGL( "Sound Explorer",
|
menu->append(new LLMenuItemCallGL( "Sound Explorer",
|
||||||
&handle_sounds_explorer, NULL));
|
&handle_sounds_explorer, NULL));
|
||||||
menu->append(new LLMenuItemCallGL( "Asset Blacklist",
|
menu->append(new LLMenuItemCallGL( "Asset Blacklist",
|
||||||
@@ -2437,7 +2438,7 @@ class LLCanIHasKillEmAll : public view_listener_t
|
|||||||
bool new_value = false;
|
bool new_value = false;
|
||||||
if(objpos)
|
if(objpos)
|
||||||
{
|
{
|
||||||
if (!objpos->permYouOwner())
|
if (!objpos->permYouOwner()||!gSavedSettings.getBOOL("AscentPowerfulWizard"))
|
||||||
new_value = false; // Don't give guns to retarded children.
|
new_value = false; // Don't give guns to retarded children.
|
||||||
else new_value = true;
|
else new_value = true;
|
||||||
}
|
}
|
||||||
@@ -2455,9 +2456,10 @@ class LLOHGOD : public view_listener_t
|
|||||||
bool new_value = false;
|
bool new_value = false;
|
||||||
if(objpos)
|
if(objpos)
|
||||||
{
|
{
|
||||||
if (!objpos->permYouOwner())
|
if (!objpos->permYouOwner()||!gSavedSettings.getBOOL("AscentPowerfulWizard"))
|
||||||
new_value = false; // Don't give guns to retarded children.
|
new_value = false; // Don't give guns to retarded children.
|
||||||
else new_value = true;
|
else
|
||||||
|
new_value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
|
gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
|
||||||
@@ -2494,6 +2496,7 @@ class LLPowerfulWizard : public view_listener_t
|
|||||||
LLSelectMgr::getInstance()->selectionUpdateTemporary(1);//set temp to TRUE
|
LLSelectMgr::getInstance()->selectionUpdateTemporary(1);//set temp to TRUE
|
||||||
LLSelectMgr::getInstance()->selectionUpdatePhysics(1);
|
LLSelectMgr::getInstance()->selectionUpdatePhysics(1);
|
||||||
LLSelectMgr::getInstance()->sendDelink();
|
LLSelectMgr::getInstance()->sendDelink();
|
||||||
|
LLSelectMgr::getInstance()->deselectAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
max_length="254" name="description_form" right="-10" />
|
max_length="254" name="description_form" right="-10" />
|
||||||
<pad height="0" />
|
<pad height="0" />
|
||||||
<spinner decimal_digits="0" follows="left|top" height="18" increment="1" initial_val="0"
|
<spinner decimal_digits="0" follows="left|top" height="18" increment="1" initial_val="0"
|
||||||
label="Priority" label_width="50" left="10" max_val="7" min_val="0"
|
label="Priority" label_width="50" left="10" max_val="5" min_val="0"
|
||||||
name="priority"
|
name="priority"
|
||||||
tool_tip="Controls which other animations can be overridden by this animation."
|
tool_tip="Controls which other animations can be overridden by this animation."
|
||||||
width="90" />
|
width="90" />
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
follows="left|top|right" font="SansSerifSmall" handle_edit_keys_directly="false" height="17" left="93"
|
follows="left|top|right" font="SansSerifSmall" handle_edit_keys_directly="false" height="17" left="93"
|
||||||
max_length="127" mouse_opaque="true" name="desc" select_all_on_focus_received="false" select_on_focus="false"
|
max_length="127" mouse_opaque="true" name="desc" select_all_on_focus_received="false" select_on_focus="false"
|
||||||
width="229" />
|
width="229" />
|
||||||
<!--<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||||
bottom_delta="-20" drop_shadow_visible="true" enabled="true" follows="left|top" font="SansSerifSmall" h_pad="0"
|
bottom_delta="-20" drop_shadow_visible="true" enabled="true" follows="left|top" font="SansSerifSmall" h_pad="0"
|
||||||
halign="left" height="16" left="13" mouse_opaque="true" name="uuid txt" v_pad="0" width="80">
|
halign="left" height="16" left="13" mouse_opaque="true" name="uuid txt" v_pad="0" width="80">
|
||||||
UUID:
|
UUID:
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0" enabled="false"
|
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0" enabled="false"
|
||||||
follows="left|top|right" font="SansSerifSmall" handle_edit_keys_directly="false" height="16" left="93"
|
follows="left|top|right" font="SansSerifSmall" handle_edit_keys_directly="false" height="16" left="93"
|
||||||
right="-80" max_length="127" mouse_opaque="true" name="uploadtime" select_all_on_focus_received="false"
|
right="-80" max_length="127" mouse_opaque="true" name="uploadtime" select_all_on_focus_received="false"
|
||||||
select_on_focus="false" width="420" />-->
|
select_on_focus="false" width="420" />
|
||||||
<button bottom="8" enabled="true" follows="left|bottom" font="SansSerif" halign="center" height="20"
|
<button bottom="8" enabled="true" follows="left|bottom" font="SansSerif" halign="center" height="20"
|
||||||
label="Keep" label_selected="Keep" left="9" mouse_opaque="true" name="Keep" scale_image="true" width="100" />
|
label="Keep" label_selected="Keep" left="9" mouse_opaque="true" name="Keep" scale_image="true" width="100" />
|
||||||
<button bottom="8" enabled="true" follows="left|bottom" font="SansSerif" halign="center" height="20"
|
<button bottom="8" enabled="true" follows="left|bottom" font="SansSerif" halign="center" height="20"
|
||||||
|
|||||||
@@ -300,9 +300,9 @@
|
|||||||
mouse_opaque="true" name="slider force" width="80" />
|
mouse_opaque="true" name="slider force" width="80" />
|
||||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||||
bottom="-151" left="118" drop_shadow_visible="true" follows="left|top"
|
bottom="-151" left="118" drop_shadow_visible="true" follows="left|top"
|
||||||
font="SansSerifSmall" h_pad="0" halign="right" height="16"
|
font="SansSerifSmall" h_pad="0" halign="right" height="16" visible="false"
|
||||||
mouse_opaque="true" name="obj_count" v_pad="0" width="143">
|
mouse_opaque="true" name="link_num_obj_count" v_pad="0" width="143">
|
||||||
Selected objects: [COUNT]
|
[DESC] [NUM]
|
||||||
</text>
|
</text>
|
||||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||||
bottom="-163" left="118" drop_shadow_visible="true" follows="left|top"
|
bottom="-163" left="118" drop_shadow_visible="true" follows="left|top"
|
||||||
|
|||||||
@@ -1,53 +1,68 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||||
<floater can_close="true" can_drag_on_left="false" can_minimize="true" can_resize="true"
|
<floater can_close="true" can_drag_on_left="false" can_minimize="true" can_resize="true"
|
||||||
width="650" height="340" min_width="650" min_height="340" max_width="650"
|
width="650" height="340" min_width="600" min_height="340" max_width="600"
|
||||||
name="browser" title="Upload Browser" control_name="UploadBrowserFloater">
|
name="browser" title="Upload Browser" control_name="UploadBrowserFloater">
|
||||||
<tab_container bottom="0" follows="left|right|top|bottom" height="320" left="4"
|
<text type="string" length="50" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||||
name="FilesAndFolders" tab_position="top" tab_width="80" width="600">
|
bottom="-35" drop_shadow_visible="true" enabled="true" follows="left|top"
|
||||||
<panel bottom="0" label="Files" left="0" name="file_panel" width="370">
|
font="SansSerifSmall" h_pad="0" halign="left" height="12" left="10"
|
||||||
<scroll_list bottom="10" can_resize="true" column_padding="0" draw_heading="true"
|
mouse_opaque="true" name="filter_label" v_pad="0" width="128">
|
||||||
follows="left|top|bottom" left="5" multi_select="true"
|
Filter:
|
||||||
name="file_list" width="340" search_column="1"
|
</text>
|
||||||
tool_tip="Hold shift or control while clicking to select multiple friends"
|
<combo_box allow_text_entry="false" bottom_delta="-5" follows="top|left" height="18" left_delta="40" max_chars="20"
|
||||||
top="-10">
|
mouse_opaque="true" enabled="true" width="108" name="file_filter_combo" tool_tip="Preview at a fixed aspect ratio">
|
||||||
<column name="file_type" width="0" />
|
<combo_item name="None" value="None">
|
||||||
<column image="ff_edit_mine_button.tga" name="icon_inventory_type"
|
None
|
||||||
tool_tip="Inventory Type" width="20" />
|
</combo_item>
|
||||||
<column dynamicwidth="true" label="Filename" name="file_name" tool_tip="Filename" />
|
<combo_item name="Animation" value="Animation" tool_tip="BVH">
|
||||||
</scroll_list>
|
Animation
|
||||||
<text type="string" length="50" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
</combo_item>
|
||||||
bottom="-23" drop_shadow_visible="true" enabled="true" follows="left|top"
|
<combo_item name="Sound" value="Sound" tool_tip="WAV">
|
||||||
font="SansSerifSmall" h_pad="0" halign="left" height="12" left="352"
|
Sound
|
||||||
mouse_opaque="true" name="name_label" v_pad="0" width="128">
|
</combo_item>
|
||||||
Name:
|
<combo_item name="Texture" value="Texture" tool_tip="BMP, JPG, PNG, TGA">
|
||||||
</text>
|
Texture
|
||||||
<line_editor bottom_delta="-4" follows="left|top" font="SansSerifSmall" height="18" max_length="255"
|
</combo_item>
|
||||||
width="214" name="asset_name" left_delta="70" select_all_on_focus_received="true" select_on_focus="true"/>
|
</combo_box>
|
||||||
<text type="string" length="50" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
<text type="string" length="50" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||||
bottom_delta="-20" drop_shadow_visible="true" enabled="true" follows="left|top"
|
bottom="-35" drop_shadow_visible="true" enabled="true" follows="left|top"
|
||||||
font="SansSerifSmall" h_pad="0" halign="left" height="12" left="352"
|
font="SansSerifSmall" h_pad="0" halign="right" height="12" left="155"
|
||||||
mouse_opaque="true" name="name_label" v_pad="0" width="128">
|
mouse_opaque="true" name="result_label" v_pad="0" width="128">
|
||||||
Description:
|
Files: [COUNT]
|
||||||
</text>
|
</text>
|
||||||
<line_editor bottom_delta="-4" follows="left|top" font="SansSerifSmall" height="18" max_length="255"
|
<scroll_list bottom="10" can_resize="true" column_padding="0" draw_heading="true"
|
||||||
width="214" name="asset_desc" left_delta="70" select_all_on_focus_received="true" select_on_focus="true"/>
|
follows="left|top|bottom" left="5" multi_select="true"
|
||||||
<slider bottom_delta="0" can_edit_text="false" enabled="false" width="185" height="16" mouse_opaque="true"
|
name="file_list" width="280" search_column="1"
|
||||||
decimal_digits="0" increment="1" initial_val="16" left="30" min_val="1.0" max_val="16.0"
|
tool_tip="Hold shift or control while clicking to select multiple files"
|
||||||
name="timeline" show_text="false" value="1" control_name="AnimationTimelineScrubber"/>
|
top="-46">
|
||||||
<button bottom="9" follows="bottom|left" height="22" label="Upload (L$10)"
|
<column name="file_type" width="0" />
|
||||||
left="375" name="upload_button" tool_tip="Standard upload (L$10)"
|
<column image="ff_edit_mine_button.tga" name="icon_inventory_type"
|
||||||
width="120" />
|
tool_tip="Inventory Type" width="20" />
|
||||||
<button bottom_delta="0" follows="bottom|left" height="22" label="Temp Upload"
|
<column dynamicwidth="true" label="Filename" name="file_name" tool_tip="Filename" />
|
||||||
left_delta="125" name="upload_button" tool_tip="Uploads a temporary version of the texture. It's free, but has a limited lifespan and area it can be used."
|
</scroll_list>
|
||||||
width="120" />
|
<text type="string" length="50" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||||
</panel>
|
bottom="-35" drop_shadow_visible="true" enabled="true" follows="left|top"
|
||||||
<panel bottom="0" label="Folders" left="0" name="folder_panel" width="370">
|
font="SansSerifSmall" h_pad="0" halign="left" height="12" left="302"
|
||||||
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
mouse_opaque="true" name="name_label" v_pad="0" width="128">
|
||||||
bottom_delta="-30" drop_shadow_visible="true" enabled="true" follows="left|top"
|
Name:
|
||||||
font="SansSerifSmall" h_pad="0" halign="left" height="12" left="5"
|
</text>
|
||||||
mouse_opaque="true" name="amountofawesomelabel" v_pad="0" width="170">
|
<line_editor bottom_delta="-4" follows="left|top" font="SansSerifSmall" height="18" max_length="255"
|
||||||
Oh god this needs to be finished
|
width="214" name="asset_name" left_delta="70" select_all_on_focus_received="true" select_on_focus="true"/>
|
||||||
</text>
|
<text type="string" length="50" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||||
</panel>
|
bottom_delta="-20" drop_shadow_visible="true" enabled="true" follows="left|top"
|
||||||
|
font="SansSerifSmall" h_pad="0" halign="left" height="12" left="302"
|
||||||
|
mouse_opaque="true" name="name_label" v_pad="0" width="128">
|
||||||
|
Description:
|
||||||
|
</text>
|
||||||
|
<line_editor bottom_delta="-4" follows="left|top" font="SansSerifSmall" height="18" max_length="255"
|
||||||
|
width="214" name="asset_desc" left_delta="70" select_all_on_focus_received="true" select_on_focus="true"/>
|
||||||
|
<slider bottom_delta="0" can_edit_text="false" enabled="false" width="185" height="16" mouse_opaque="true"
|
||||||
|
decimal_digits="0" increment="1" initial_val="16" left="30" min_val="1.0" max_val="16.0" visible="false"
|
||||||
|
name="timeline" show_text="false" value="1" control_name="AnimationTimelineScrubber"/>
|
||||||
|
<button bottom="9" follows="bottom|left" height="22" label="Upload (L$10)"
|
||||||
|
left="325" name="upload_button" tool_tip="Standard upload (L$10)"
|
||||||
|
width="120" />
|
||||||
|
<button bottom_delta="0" follows="bottom|left" height="22" label="Temp Upload"
|
||||||
|
left_delta="125" name="upload_button" tool_tip="Uploads a temporary version of the texture. It's free, but has a limited lifespan and area it can be used."
|
||||||
|
width="120" />
|
||||||
</tab_container>
|
</tab_container>
|
||||||
</floater>
|
</floater>
|
||||||
|
|||||||
@@ -71,12 +71,18 @@
|
|||||||
tool_tip="Allows the camera to get reeeaaally close to things."
|
tool_tip="Allows the camera to get reeeaaally close to things."
|
||||||
mouse_opaque="true" name="disable_camera_zoom_check" radio_style="false"
|
mouse_opaque="true" name="disable_camera_zoom_check" radio_style="false"
|
||||||
width="400" />
|
width="400" />
|
||||||
<!--<check_box bottom_delta="-20" control_name="AscentPowerfulWizard" enabled="true"
|
<check_box bottom_delta="-20" control_name="AscentPowerfulWizardCheck1" enabled="true"
|
||||||
follows="left|top" font="SansSerifSmall" height="16" initial_value="true"
|
follows="left|top" font="SansSerifSmall" height="16" initial_value="true"
|
||||||
label="Enable Power User functionality" left="10"
|
label="Enable Power User functionality" left="10"
|
||||||
tool_tip="Adds features deemed too dangerous for normal use. These features can wreak havoc or do bad things if misused - Mostly to yourself. Turn this on at your own risk, and use any features it enables responsibly. Ascent devs will not replace anything you break if you ruin something important."
|
tool_tip="Adds features deemed too dangerous for normal use. These features can wreak havoc or do bad things if misused - Mostly to yourself or your belongings. If you're sure, activate the checkbox below as well."
|
||||||
mouse_opaque="true" name="always_fly_check" radio_style="false"
|
mouse_opaque="true" name="power_user_check" radio_style="false"
|
||||||
width="400" />-->
|
width="400" />
|
||||||
|
<check_box bottom_delta="-20" control_name="AscentPowerfulWizardCheck1" enabled="true"
|
||||||
|
follows="left|top" font="SansSerifSmall" height="16" initial_value="true"
|
||||||
|
label="Confirm Power User functionality" left="10"
|
||||||
|
tool_tip="Confirms Power User activation. Turn this on at your own risk, and use any features it enables responsibly. Ascent devs will not replace anything you break if you ruin something important. Unlike most checkboxes, you must apply/ok changes before this will activate."
|
||||||
|
mouse_opaque="true" name="power_user_confirm_check" radio_style="false"
|
||||||
|
width="400" />
|
||||||
</panel>
|
</panel>
|
||||||
<panel border="true" left="1" bottom="-408" height="408" width="500" mouse_opaque="true"
|
<panel border="true" left="1" bottom="-408" height="408" width="500" mouse_opaque="true"
|
||||||
follows="left|top|right|bottom" label="Chat/IM" name="Chat/IM">
|
follows="left|top|right|bottom" label="Chat/IM" name="Chat/IM">
|
||||||
|
|||||||
Reference in New Issue
Block a user