diff options
Diffstat (limited to 'indra')
83 files changed, 1988 insertions, 1609 deletions
diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp index 70d770ef7e..1a382643da 100644 --- a/indra/llplugin/llpluginclassmedia.cpp +++ b/indra/llplugin/llpluginclassmedia.cpp @@ -63,14 +63,15 @@ LLPluginClassMedia::~LLPluginClassMedia() reset(); } -bool LLPluginClassMedia::init(const std::string &launcher_filename, const std::string &plugin_filename, bool debug) +bool LLPluginClassMedia::init(const std::string &launcher_filename, const std::string &plugin_filename, bool debug, const std::string &user_data_path) { LL_DEBUGS("Plugin") << "launcher: " << launcher_filename << LL_ENDL; LL_DEBUGS("Plugin") << "plugin: " << plugin_filename << LL_ENDL; + LL_DEBUGS("Plugin") << "user_data_path: " << user_data_path << LL_ENDL; mPlugin = new LLPluginProcessParent(this); mPlugin->setSleepTime(mSleepTime); - mPlugin->init(launcher_filename, plugin_filename, debug); + mPlugin->init(launcher_filename, plugin_filename, debug, user_data_path); return true; } diff --git a/indra/llplugin/llpluginclassmedia.h b/indra/llplugin/llpluginclassmedia.h index 6b64688718..b58067733b 100644 --- a/indra/llplugin/llpluginclassmedia.h +++ b/indra/llplugin/llpluginclassmedia.h @@ -49,7 +49,7 @@ public: virtual ~LLPluginClassMedia(); // local initialization, called by the media manager when creating a source - virtual bool init(const std::string &launcher_filename, const std::string &plugin_filename, bool debug = false); + virtual bool init(const std::string &launcher_filename, const std::string &plugin_filename, bool debug, const std::string &user_data_path); // undoes everything init() didm called by the media manager when destroying a source virtual void reset(); diff --git a/indra/llplugin/llpluginprocesschild.cpp b/indra/llplugin/llpluginprocesschild.cpp index 55cf11c620..ccf6dab942 100644 --- a/indra/llplugin/llpluginprocesschild.cpp +++ b/indra/llplugin/llpluginprocesschild.cpp @@ -145,8 +145,12 @@ void LLPluginProcessChild::idle(void) break; case STATE_PLUGIN_LOADED: - setState(STATE_PLUGIN_INITIALIZING); - sendMessageToPlugin(LLPluginMessage("base", "init")); + { + setState(STATE_PLUGIN_INITIALIZING); + LLPluginMessage message("base", "init"); + message.setValue("user_data_path", mUserDataPath); + sendMessageToPlugin(message); + } break; case STATE_PLUGIN_INITIALIZING: @@ -310,6 +314,7 @@ void LLPluginProcessChild::receiveMessageRaw(const std::string &message) if(message_name == "load_plugin") { mPluginFile = parsed.getValue("file"); + mUserDataPath = parsed.getValue("user_data_path"); } else if(message_name == "shm_add") { diff --git a/indra/llplugin/llpluginprocesschild.h b/indra/llplugin/llpluginprocesschild.h index f5c57c3d49..1cfd9dcaf9 100644 --- a/indra/llplugin/llpluginprocesschild.h +++ b/indra/llplugin/llpluginprocesschild.h @@ -96,6 +96,8 @@ private: LLSocket::ptr_t mSocket; std::string mPluginFile; + + std::string mUserDataPath; LLPluginInstance *mInstance; diff --git a/indra/llplugin/llpluginprocessparent.cpp b/indra/llplugin/llpluginprocessparent.cpp index 332ce288d7..f60838b1e7 100644 --- a/indra/llplugin/llpluginprocessparent.cpp +++ b/indra/llplugin/llpluginprocessparent.cpp @@ -99,12 +99,13 @@ void LLPluginProcessParent::errorState(void) setState(STATE_ERROR); } -void LLPluginProcessParent::init(const std::string &launcher_filename, const std::string &plugin_filename, bool debug) +void LLPluginProcessParent::init(const std::string &launcher_filename, const std::string &plugin_filename, bool debug, const std::string &user_data_path) { mProcess.setExecutable(launcher_filename); mPluginFile = plugin_filename; mCPUUsage = 0.0f; mDebug = debug; + mUserDataPath = user_data_path; setState(STATE_INITIALIZED); } @@ -362,6 +363,7 @@ void LLPluginProcessParent::idle(void) { LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_INTERNAL, "load_plugin"); message.setValue("file", mPluginFile); + message.setValue("user_data_path", mUserDataPath); sendMessage(message); } diff --git a/indra/llplugin/llpluginprocessparent.h b/indra/llplugin/llpluginprocessparent.h index 25669f5d78..6d661a6960 100644 --- a/indra/llplugin/llpluginprocessparent.h +++ b/indra/llplugin/llpluginprocessparent.h @@ -58,7 +58,7 @@ public: LLPluginProcessParent(LLPluginProcessParentOwner *owner); ~LLPluginProcessParent(); - void init(const std::string &launcher_filename, const std::string &plugin_filename, bool debug = false); + void init(const std::string &launcher_filename, const std::string &plugin_filename, bool debug, const std::string &user_data_path); void idle(void); // returns true if the plugin is on its way to steady state @@ -139,6 +139,8 @@ private: std::string mPluginFile; + std::string mUserDataPath; + LLPluginProcessParentOwner *mOwner; typedef std::map<std::string, LLPluginSharedMemory*> sharedMemoryRegionsType; diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 907f2352a0..fd5c2b7fef 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -761,7 +761,7 @@ void LLMenuItemCallGL::initFromParams(const Params& p) { if (p.on_visible.isProvided()) { - mVisibleSignal.connect(initVisibleCallback(p.on_visible)); + mVisibleSignal.connect(initEnableCallback(p.on_visible)); } if (p.on_enable.isProvided()) { diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h index cbb9b4d344..61e06f9e5f 100644 --- a/indra/llui/llmenugl.h +++ b/indra/llui/llmenugl.h @@ -175,9 +175,7 @@ protected: // This function appends the character string representation of // the current accelerator key and mask to the provided string. void appendAcceleratorString( std::string& st ) const; - - void initMenuEnableCallback(const EnableCallbackParam& cb, enable_signal_t& sig); - + protected: KEY mAcceleratorKey; MASK mAcceleratorMask; @@ -249,7 +247,7 @@ public: { Optional<EnableCallbackParam > on_enable; Optional<CommitCallbackParam > on_click; - Optional<VisibleCallbackParam > on_visible; + Optional<EnableCallbackParam > on_visible; Params() : on_enable("on_enable"), on_click("on_click"), @@ -284,15 +282,10 @@ public: { return mEnableSignal.connect(cb); } - - boost::signals2::connection setVisibleCallback( const visible_signal_t::slot_type& cb ) - { - return mVisibleSignal.connect(cb); - } - + private: enable_signal_t mEnableSignal; - visible_signal_t mVisibleSignal; + enable_signal_t mVisibleSignal; }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/indra/llui/llpanel.h b/indra/llui/llpanel.h index a8bd5fd5e5..d0986a06d3 100644 --- a/indra/llui/llpanel.h +++ b/indra/llui/llpanel.h @@ -249,7 +249,6 @@ protected: LLCallbackMap::map_t mFactoryMap; CommitCallbackRegistry::ScopedRegistrar mCommitCallbackRegistrar; EnableCallbackRegistry::ScopedRegistrar mEnableCallbackRegistrar; - VisibleCallbackRegistry::ScopedRegistrar mVisibleCallbackRegistrar; commit_signal_t* mVisibleSignal; // Called when visibility changes, passes new visibility as LLSD() diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 2a9515171a..e0503a0844 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -2080,6 +2080,8 @@ void LLTextBase::updateRects() } mContentsRect.mTop += mVPad; + // subtract a pixel off the bottom to deal with rounding errors in measuring font height + mContentsRect.mBottom -= 1; S32 delta_pos = -mContentsRect.mBottom; // move line segments to fit new document rect diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp index 706712ec5e..6044908ca7 100644 --- a/indra/llui/lluictrl.cpp +++ b/indra/llui/lluictrl.cpp @@ -232,11 +232,6 @@ bool default_enable_handler(LLUICtrl* ctrl, const LLSD& param) return true; } -bool default_visible_handler(LLUICtrl* ctrl, const LLSD& param) -{ - return true; -} - LLUICtrl::commit_signal_t::slot_type LLUICtrl::initCommitCallback(const CommitCallbackParam& cb) { @@ -290,30 +285,6 @@ LLUICtrl::enable_signal_t::slot_type LLUICtrl::initEnableCallback(const EnableCa return default_enable_handler; } -LLUICtrl::visible_signal_t::slot_type LLUICtrl::initVisibleCallback(const VisibleCallbackParam& cb) -{ - // Set the callback function - if (cb.function.isProvided()) - { - if (cb.parameter.isProvided()) - return boost::bind(cb.function(), this, cb.parameter); - else - return cb.function(); - } - else - { - visible_callback_t* func = (VisibleCallbackRegistry::getValue(cb.function_name)); - if (func) - { - if (cb.parameter.isProvided()) - return boost::bind((*func), this, cb.parameter); - else - return visible_signal_t::slot_type(*func); - } - } - return default_visible_handler; -} - // virtual void LLUICtrl::onMouseEnter(S32 x, S32 y, MASK mask) { diff --git a/indra/llui/lluictrl.h b/indra/llui/lluictrl.h index b20ff5d798..b9a4f61e15 100644 --- a/indra/llui/lluictrl.h +++ b/indra/llui/lluictrl.h @@ -63,9 +63,6 @@ public: typedef boost::function<bool (LLUICtrl* ctrl, const LLSD& param)> enable_callback_t; typedef boost::signals2::signal<bool (LLUICtrl* ctrl, const LLSD& param), boost_boolean_combiner> enable_signal_t; - typedef boost::function<bool (LLUICtrl* ctrl, const LLSD& param)> visible_callback_t; - typedef boost::signals2::signal<bool (LLUICtrl* ctrl, const LLSD& param), boost_boolean_combiner> visible_signal_t; - struct CallbackParam : public LLInitParam::Block<CallbackParam> { Ignored name; @@ -83,16 +80,12 @@ public: Optional<commit_callback_t> function; }; + // also used for visible callbacks struct EnableCallbackParam : public LLInitParam::Block<EnableCallbackParam, CallbackParam > { Optional<enable_callback_t> function; }; - - struct VisibleCallbackParam : public LLInitParam::Block<VisibleCallbackParam, CallbackParam > - { - Optional<visible_callback_t> function; - }; - + struct EnableControls : public LLInitParam::Choice<EnableControls> { Alternative<std::string> enabled; @@ -148,7 +141,6 @@ protected: commit_signal_t::slot_type initCommitCallback(const CommitCallbackParam& cb); enable_signal_t::slot_type initEnableCallback(const EnableCallbackParam& cb); - visible_signal_t::slot_type initVisibleCallback(const VisibleCallbackParam& cb); // We need this virtual so we can override it with derived versions virtual LLViewModel* getViewModel() const; @@ -269,10 +261,9 @@ public: {}; class CommitCallbackRegistry : public CallbackRegistry<commit_callback_t, CommitCallbackRegistry>{}; + // the enable callback registry is also used for visiblity callbacks class EnableCallbackRegistry : public CallbackRegistry<enable_callback_t, EnableCallbackRegistry>{}; - class VisibleCallbackRegistry : public CallbackRegistry<visible_callback_t, VisibleCallbackRegistry>{}; - - + protected: static bool controlListener(const LLSD& newvalue, LLHandle<LLUICtrl> handle, std::string type); diff --git a/indra/llvfs/lldir.cpp b/indra/llvfs/lldir.cpp index c0c6e592d5..b2b17fdd56 100644 --- a/indra/llvfs/lldir.cpp +++ b/indra/llvfs/lldir.cpp @@ -394,12 +394,6 @@ std::string LLDir::getExpandedFilename(ELLPath location, const std::string& subd prefix += "local_assets"; break; - case LL_PATH_MOZILLA_PROFILE: - prefix = getOSUserAppDir(); - prefix += mDirDelimiter; - prefix += "browser_profile"; - break; - case LL_PATH_EXECUTABLE: prefix = getExecutableDir(); break; diff --git a/indra/llvfs/lldir.h b/indra/llvfs/lldir.h index 07c814769e..206e3223e3 100644 --- a/indra/llvfs/lldir.h +++ b/indra/llvfs/lldir.h @@ -38,7 +38,7 @@ #define MAX_PATH MAXPATHLEN #endif -// these numbers *may* get serialized, so we need to be explicit +// these numbers *may* get serialized (really??), so we need to be explicit typedef enum ELLPath { LL_PATH_NONE = 0, @@ -54,10 +54,8 @@ typedef enum ELLPath LL_PATH_TOP_SKIN = 10, LL_PATH_CHAT_LOGS = 11, LL_PATH_PER_ACCOUNT_CHAT_LOGS = 12, - LL_PATH_MOZILLA_PROFILE = 13, LL_PATH_USER_SKIN = 14, LL_PATH_LOCAL_ASSETS = 15, -// LL_PATH_HTML = 16, LL_PATH_EXECUTABLE = 16, LL_PATH_DEFAULT_SKIN = 17, LL_PATH_FONTS = 18, diff --git a/indra/llvfs/lldir_linux.cpp b/indra/llvfs/lldir_linux.cpp index 08c993ed2a..ee902d1de7 100644 --- a/indra/llvfs/lldir_linux.cpp +++ b/indra/llvfs/lldir_linux.cpp @@ -225,15 +225,6 @@ void LLDir_Linux::initAppDirs(const std::string &app_name, } } - res = LLFile::mkdir(getExpandedFilename(LL_PATH_MOZILLA_PROFILE,"")); - if (res == -1) - { - if (errno != EEXIST) - { - llwarns << "Couldn't create LL_PATH_MOZILLA_PROFILE dir " << getExpandedFilename(LL_PATH_MOZILLA_PROFILE,"") << llendl; - } - } - mCAFile = getExpandedFilename(LL_PATH_APP_SETTINGS, "CA.pem"); } diff --git a/indra/llvfs/lldir_solaris.cpp b/indra/llvfs/lldir_solaris.cpp index a21f3ca0ab..a8fad8e5bd 100644 --- a/indra/llvfs/lldir_solaris.cpp +++ b/indra/llvfs/lldir_solaris.cpp @@ -244,15 +244,6 @@ void LLDir_Solaris::initAppDirs(const std::string &app_name, } } - res = LLFile::mkdir(getExpandedFilename(LL_PATH_MOZILLA_PROFILE,"")); - if (res == -1) - { - if (errno != EEXIST) - { - llwarns << "Couldn't create LL_PATH_MOZILLA_PROFILE dir " << getExpandedFilename(LL_PATH_MOZILLA_PROFILE,"") << llendl; - } - } - mCAFile = getExpandedFilename(LL_PATH_APP_SETTINGS, "CA.pem"); } diff --git a/indra/llvfs/lldir_win32.cpp b/indra/llvfs/lldir_win32.cpp index 4c376f11a5..4eb10c842b 100644 --- a/indra/llvfs/lldir_win32.cpp +++ b/indra/llvfs/lldir_win32.cpp @@ -212,14 +212,6 @@ void LLDir_Win32::initAppDirs(const std::string &app_name, } } - res = LLFile::mkdir(getExpandedFilename(LL_PATH_MOZILLA_PROFILE,"")); - if (res == -1) - { - if (errno != EEXIST) - { - llwarns << "Couldn't create LL_PATH_MOZILLA_PROFILE dir " << getExpandedFilename(LL_PATH_MOZILLA_PROFILE,"") << llendl; - } - } res = LLFile::mkdir(getExpandedFilename(LL_PATH_USER_SKIN,"")); if (res == -1) { diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp index 25f4c8720a..276ad39dfb 100644 --- a/indra/media_plugins/webkit/media_plugin_webkit.cpp +++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp @@ -76,6 +76,8 @@ public: private: + std::string mProfileDir; + enum { INIT_STATE_UNINITIALIZED, // Browser instance hasn't been set up yet @@ -187,7 +189,6 @@ private: #else std::string component_dir = application_dir; #endif - std::string profileDir = application_dir + "/" + "browser_profile"; // cross platform? // window handle - needed on Windows and must be app window. #if LL_WINDOWS @@ -199,7 +200,7 @@ private: #endif // main browser initialization - bool result = LLQtWebKit::getInstance()->init( application_dir, component_dir, profileDir, native_window_handle ); + bool result = LLQtWebKit::getInstance()->init( application_dir, component_dir, mProfileDir, native_window_handle ); if ( result ) { // create single browser window @@ -587,6 +588,9 @@ void MediaPluginWebKit::receiveMessage(const char *message_string) { if(message_name == "init") { + std::string user_data_path = message_in.getValue("user_data_path"); // n.b. always has trailing platform-specific dir-delimiter + mProfileDir = user_data_path + "browser_profile"; + LLPluginMessage message("base", "init_response"); LLSD versions = LLSD::emptyMap(); versions[LLPLUGIN_MESSAGE_CLASS_BASE] = LLPLUGIN_MESSAGE_CLASS_BASE_VERSION; diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 57d67bd560..be6bce8054 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -389,6 +389,7 @@ set(viewer_SOURCE_FILES llsplitbutton.cpp llsprite.cpp llstartup.cpp + llstartuplistener.cpp llstatusbar.cpp llstylemap.cpp llsurface.cpp @@ -892,6 +893,7 @@ set(viewer_HEADER_FILES llsplitbutton.h llsprite.h llstartup.h + llstartuplistener.h llstatusbar.h llstylemap.h llsurface.h diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 5e2c6554d2..289e900eaf 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -4974,7 +4974,6 @@ <key>Value</key> <integer>1</integer> </map> - <key>StartUpToastLifeTime</key> <key>NearbyToastFadingTime</key> <map> <key>Comment</key> @@ -9922,6 +9921,28 @@ <key>Value</key> <integer>0</integer> </map> + <key>UseCircuitCodeMaxRetries</key> + <map> + <key>Comment</key> + <string>Max timeout count for the initial UseCircuitCode message</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>S32</string> + <key>Value</key> + <real>3</real> + </map> + <key>UseCircuitCodeTimeout</key> + <map> + <key>Comment</key> + <string>Timeout duration in seconds for the initial UseCircuitCode message</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>F32</string> + <key>Value</key> + <real>5.0</real> + </map> <key>UseDebugLogin</key> <map> <key>Comment</key> diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index d91b9d7ea4..c06098689d 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -574,29 +574,32 @@ void LLAppearanceManager::updateCOF(const LLUUID& category, bool append) linkAll(cof, obj_items, link_waiter); linkAll(cof, gest_items, link_waiter); - LLSidepanelAppearance* panel_appearance = dynamic_cast<LLSidepanelAppearance *>(LLSideTray::getInstance()->getPanel("sidepanel_appearance")); // Add link to outfit if category is an outfit. LLViewerInventoryCategory* catp = gInventory.getCategory(category); - if (!append && catp && catp->getPreferredType() == LLFolderType::FT_OUTFIT) + if (!append) { - link_inventory_item(gAgent.getID(), category, cof, catp->getName(), - LLAssetType::AT_LINK_FOLDER, link_waiter); - - // Update the current outfit name of the appearance sidepanel. - if (panel_appearance) + std::string new_outfit_name = ""; + if (catp && catp->getPreferredType() == LLFolderType::FT_OUTFIT) { - panel_appearance->refreshCurrentOutfitName(catp->getName()); + link_inventory_item(gAgent.getID(), category, cof, catp->getName(), + LLAssetType::AT_LINK_FOLDER, link_waiter); + new_outfit_name = catp->getName(); } + updatePanelOutfitName(new_outfit_name); } - else +} + +void LLAppearanceManager::updatePanelOutfitName(const std::string& name) +{ + LLSidepanelAppearance* panel_appearance = + dynamic_cast<LLSidepanelAppearance *>(LLSideTray::getInstance()->getPanel("sidepanel_appearance")); + if (panel_appearance) { - if (panel_appearance) - { - panel_appearance->refreshCurrentOutfitName(""); - } + panel_appearance->refreshCurrentOutfitName(name); } } + void LLAppearanceManager::updateAgentWearables(LLWearableHoldingPattern* holder, bool append) { lldebugs << "updateAgentWearables()" << llendl; diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 7038d1a35b..b625d42a50 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -64,6 +64,9 @@ public: // Finds the folder link to the currently worn outfit const LLViewerInventoryItem *getCurrentOutfitLink(); + // Update the displayed outfit name in UI. + void updatePanelOutfitName(const std::string& name); + void updateAgentWearables(LLWearableHoldingPattern* holder, bool append); // For debugging - could be moved elsewhere. diff --git a/indra/newview/llcolorswatch.cpp b/indra/newview/llcolorswatch.cpp index 442e9ab27b..b2399d238b 100644 --- a/indra/newview/llcolorswatch.cpp +++ b/indra/newview/llcolorswatch.cpp @@ -306,6 +306,18 @@ void LLColorSwatchCtrl::onColorChanged ( void* data, EColorPickOp pick_op ) } } +void LLColorSwatchCtrl::onFloaterClose() +{ + LLFloaterColorPicker* pickerp = (LLFloaterColorPicker*)mPickerHandle.get(); + + if (pickerp) + { + pickerp->setSwatch(NULL); + } + + mPickerHandle.markDead(); +} + void LLColorSwatchCtrl::setValid(BOOL valid ) { mValid = valid; @@ -323,7 +335,7 @@ void LLColorSwatchCtrl::showPicker(BOOL take_focus) if (!pickerp) { pickerp = new LLFloaterColorPicker(this, mCanApplyImmediately); - gFloaterView->getParentFloater(this)->addDependentFloater(pickerp); + //gFloaterView->getParentFloater(this)->addDependentFloater(pickerp); mPickerHandle = pickerp->getHandle(); } diff --git a/indra/newview/llcolorswatch.h b/indra/newview/llcolorswatch.h index e3e267f831..2f6aec85e8 100644 --- a/indra/newview/llcolorswatch.h +++ b/indra/newview/llcolorswatch.h @@ -105,6 +105,7 @@ public: /*virtual*/ void setEnabled( BOOL enabled ); static void onColorChanged ( void* data, EColorPickOp pick_op = COLOR_CHANGE ); + void onFloaterClose(); protected: BOOL mValid; diff --git a/indra/newview/llfloatercolorpicker.cpp b/indra/newview/llfloatercolorpicker.cpp index 73b79d8e13..56b56dc3d2 100644 --- a/indra/newview/llfloatercolorpicker.cpp +++ b/indra/newview/llfloatercolorpicker.cpp @@ -241,6 +241,16 @@ BOOL LLFloaterColorPicker::postBuild() return TRUE; } +/*virtual*/ +void LLFloaterColorPicker::onClose(bool app_settings) +{ + if (mSwatch) + { + mSwatch->onFloaterClose(); + } + stopUsingPipette(); +} + ////////////////////////////////////////////////////////////////////////////// // void LLFloaterColorPicker::initUI ( F32 rValIn, F32 gValIn, F32 bValIn ) diff --git a/indra/newview/llfloatercolorpicker.h b/indra/newview/llfloatercolorpicker.h index a16cde7f10..b381740acd 100644 --- a/indra/newview/llfloatercolorpicker.h +++ b/indra/newview/llfloatercolorpicker.h @@ -56,6 +56,7 @@ class LLFloaterColorPicker // overrides virtual BOOL postBuild (); + virtual void onClose(bool app_settings); virtual void draw (); virtual BOOL handleMouseDown ( S32 x, S32 y, MASK mask ); virtual BOOL handleMouseUp ( S32 x, S32 y, MASK mask ); @@ -69,6 +70,7 @@ class LLFloaterColorPicker void destroyUI (); void cancelSelection (); LLColorSwatchCtrl* getSwatch () { return mSwatch; }; + void setSwatch( LLColorSwatchCtrl* swatch) { mSwatch = swatch; } // mutator / accessor for original RGB value void setOrigRgb ( F32 origRIn, F32 origGIn, F32 origBIn ); diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 4e77b42187..1c5d7ae9b9 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -357,6 +357,16 @@ void LLFolderView::openFolder(const std::string& foldername) } } +void LLFolderView::openTopLevelFolders() +{ + for (folders_t::iterator iter = mFolders.begin(); + iter != mFolders.end();) + { + folders_t::iterator fit = iter++; + (*fit)->setOpen(TRUE); + } +} + void LLFolderView::setOpenArrangeRecursively(BOOL openitem, ERecurseType recurse) { // call base class to do proper recursion @@ -890,7 +900,7 @@ void LLFolderView::draw() } else { - mStatusText = LLTrans::getString("InventoryNoMatchingItems"); + mStatusText = LLTrans::getString(getFilter()->getEmptyLookupMessage()); font->renderUTF8(mStatusText, 0, 2, 1, sSearchStatusColor, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE ); } } diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h index 4adf6c2fbf..d18ba385d8 100644 --- a/indra/newview/llfolderview.h +++ b/indra/newview/llfolderview.h @@ -127,6 +127,7 @@ public: // Close all folders in the view void closeAllFolders(); void openFolder(const std::string& foldername); + void openTopLevelFolders(); virtual void toggleOpen() {}; virtual void setOpenArrangeRecursively(BOOL openitem, ERecurseType recurse); diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index 83beae29c1..39114d64b4 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -42,10 +42,12 @@ #include "lldateutil.h" #include "llfloaterreporter.h" #include "llfloaterworldmap.h" +#include "llimview.h" #include "llinspect.h" #include "llmutelist.h" #include "llpanelblockedlist.h" #include "llstartup.h" +#include "llspeakers.h" #include "llviewermenu.h" #include "llvoiceclient.h" #include "llviewerobjectlist.h" @@ -99,6 +101,12 @@ private: // Set the volume slider to this user's current client-side volume setting, // hiding/disabling if the user is not nearby. void updateVolumeSlider(); + + // Shows/hides moderator panel depending on voice state + void updateModeratorPanel(); + + // Moderator ability to enable/disable voice chat for avatar + void toggleSelectedVoice(bool enabled); // Button callbacks void onClickAddFriend(); @@ -205,10 +213,12 @@ LLInspectAvatar::LLInspectAvatar(const LLSD& sd) mCommitCallbackRegistrar.add("InspectAvatar.Report", boost::bind(&LLInspectAvatar::onClickReport, this)); mCommitCallbackRegistrar.add("InspectAvatar.FindOnMap", boost::bind(&LLInspectAvatar::onClickFindOnMap, this)); mCommitCallbackRegistrar.add("InspectAvatar.ZoomIn", boost::bind(&LLInspectAvatar::onClickZoomIn, this)); - mVisibleCallbackRegistrar.add("InspectAvatar.VisibleFindOnMap", boost::bind(&LLInspectAvatar::onVisibleFindOnMap, this)); - mVisibleCallbackRegistrar.add("InspectAvatar.VisibleFreezeEject", + mCommitCallbackRegistrar.add("InspectAvatar.DisableVoice", boost::bind(&LLInspectAvatar::toggleSelectedVoice, this, false)); + mCommitCallbackRegistrar.add("InspectAvatar.EnableVoice", boost::bind(&LLInspectAvatar::toggleSelectedVoice, this, true)); + mEnableCallbackRegistrar.add("InspectAvatar.VisibleFindOnMap", boost::bind(&LLInspectAvatar::onVisibleFindOnMap, this)); + mEnableCallbackRegistrar.add("InspectAvatar.VisibleFreezeEject", boost::bind(&LLInspectAvatar::onVisibleFreezeEject, this)); - mVisibleCallbackRegistrar.add("InspectAvatar.VisibleZoomIn", + mEnableCallbackRegistrar.add("InspectAvatar.VisibleZoomIn", boost::bind(&LLInspectAvatar::onVisibleZoomIn, this)); mEnableCallbackRegistrar.add("InspectAvatar.Gear.Enable", boost::bind(&LLInspectAvatar::isNotFriend, this)); @@ -277,6 +287,8 @@ void LLInspectAvatar::onOpen(const LLSD& data) requestUpdate(); updateVolumeSlider(); + + updateModeratorPanel(); } // virtual @@ -366,6 +378,119 @@ void LLInspectAvatar::processAvatarData(LLAvatarData* data) mPropertiesRequest = NULL; } +void LLInspectAvatar::updateModeratorPanel() +{ + bool enable_moderator_panel = false; + + if (LLVoiceChannel::getCurrentVoiceChannel()) + { + LLUUID session_id = LLVoiceChannel::getCurrentVoiceChannel()->getSessionID(); + + if (session_id != LLUUID::null) + { + LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(session_id); + + if (speaker_mgr) + { + LLPointer<LLSpeaker> self_speakerp = speaker_mgr->findSpeaker(gAgent.getID()); + LLPointer<LLSpeaker> selected_speakerp = speaker_mgr->findSpeaker(mAvatarID); + + if(speaker_mgr->isVoiceActive() && selected_speakerp && + ((self_speakerp && self_speakerp->mIsModerator) || gAgent.isGodlike())) + { + getChild<LLUICtrl>("enable_voice")->setVisible(selected_speakerp->mModeratorMutedVoice); + getChild<LLUICtrl>("disable_voice")->setVisible(!selected_speakerp->mModeratorMutedVoice); + + enable_moderator_panel = true; + } + } + } + } + + if (enable_moderator_panel) + { + if (!getChild<LLUICtrl>("moderator_panel")->getVisible()) + { + getChild<LLUICtrl>("moderator_panel")->setVisible(true); + // stretch the floater so it can accommodate the moderator panel + reshape(getRect().getWidth(), getRect().getHeight() + getChild<LLUICtrl>("moderator_panel")->getRect().getHeight()); + } + } + else if (getChild<LLUICtrl>("moderator_panel")->getVisible()) + { + getChild<LLUICtrl>("moderator_panel")->setVisible(false); + // shrink the inspector floater back to original size + reshape(getRect().getWidth(), getRect().getHeight() - getChild<LLUICtrl>("moderator_panel")->getRect().getHeight()); + } +} + +void LLInspectAvatar::toggleSelectedVoice(bool enabled) +{ + LLUUID session_id = LLVoiceChannel::getCurrentVoiceChannel()->getSessionID(); + LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(session_id); + + if (speaker_mgr) + { + if (!gAgent.getRegion()) + return; + + std::string url = gAgent.getRegion()->getCapability("ChatSessionRequest"); + LLSD data; + data["method"] = "mute update"; + data["session-id"] = session_id; + data["params"] = LLSD::emptyMap(); + data["params"]["agent_id"] = mAvatarID; + data["params"]["mute_info"] = LLSD::emptyMap(); + // ctrl value represents ability to type, so invert + data["params"]["mute_info"]["voice"] = !enabled; + + class MuteVoiceResponder : public LLHTTPClient::Responder + { + public: + MuteVoiceResponder(const LLUUID& session_id) + { + mSessionID = session_id; + } + + virtual void error(U32 status, const std::string& reason) + { + llwarns << status << ": " << reason << llendl; + + if ( gIMMgr ) + { + //403 == you're not a mod + //should be disabled if you're not a moderator + if ( 403 == status ) + { + gIMMgr->showSessionEventError( + "mute", + "not_a_moderator", + mSessionID); + } + else + { + gIMMgr->showSessionEventError( + "mute", + "generic", + mSessionID); + } + } + } + + private: + LLUUID mSessionID; + }; + + LLHTTPClient::post( + url, + data, + new MuteVoiceResponder(speaker_mgr->getSessionID())); + } + + closeFloater(); + +} + void LLInspectAvatar::updateVolumeSlider() { // By convention, we only display and toggle voice mutes, not all mutes diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 4c28d5e2df..3746e9cfeb 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -714,20 +714,20 @@ BOOL LLInvFVBridge::isItemPermissive() const // static void LLInvFVBridge::changeItemParent(LLInventoryModel* model, LLViewerInventoryItem* item, - const LLUUID& new_parent, + const LLUUID& new_parent_id, BOOL restamp) { - if(item->getParentUUID() != new_parent) + if(item->getParentUUID() != new_parent_id) { LLInventoryModel::update_list_t update; LLInventoryModel::LLCategoryUpdate old_folder(item->getParentUUID(),-1); update.push_back(old_folder); - LLInventoryModel::LLCategoryUpdate new_folder(new_parent, 1); + LLInventoryModel::LLCategoryUpdate new_folder(new_parent_id, 1); update.push_back(new_folder); gInventory.accountForUpdate(update); LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item); - new_item->setParent(new_parent); + new_item->setParent(new_parent_id); new_item->updateParentOnServer(restamp); model->updateItem(new_item); model->notifyObservers(); @@ -737,24 +737,27 @@ void LLInvFVBridge::changeItemParent(LLInventoryModel* model, // static void LLInvFVBridge::changeCategoryParent(LLInventoryModel* model, LLViewerInventoryCategory* cat, - const LLUUID& new_parent, + const LLUUID& new_parent_id, BOOL restamp) { - if(cat->getParentUUID() != new_parent) + // Can't move a folder into a child of itself. + if (model->isObjectDescendentOf(new_parent_id, cat->getUUID())) { - LLInventoryModel::update_list_t update; - LLInventoryModel::LLCategoryUpdate old_folder(cat->getParentUUID(), -1); - update.push_back(old_folder); - LLInventoryModel::LLCategoryUpdate new_folder(new_parent, 1); - update.push_back(new_folder); - gInventory.accountForUpdate(update); - - LLPointer<LLViewerInventoryCategory> new_cat = new LLViewerInventoryCategory(cat); - new_cat->setParent(new_parent); - new_cat->updateParentOnServer(restamp); - model->updateCategory(new_cat); - model->notifyObservers(); + return; } + + LLInventoryModel::update_list_t update; + LLInventoryModel::LLCategoryUpdate old_folder(cat->getParentUUID(), -1); + update.push_back(old_folder); + LLInventoryModel::LLCategoryUpdate new_folder(new_parent_id, 1); + update.push_back(new_folder); + model->accountForUpdate(update); + + LLPointer<LLViewerInventoryCategory> new_cat = new LLViewerInventoryCategory(cat); + new_cat->setParent(new_parent_id); + new_cat->updateParentOnServer(restamp); + model->updateCategory(new_cat); + model->notifyObservers(); } @@ -2243,11 +2246,6 @@ BOOL LLFolderBridge::removeItem() LLNotification::Params params("ConfirmDeleteProtectedCategory"); params.payload(payload).substitutions(args).functor.function(boost::bind(&LLFolderBridge::removeItemResponse, this, _1, _2)); - //params.functor.function(boost::bind(&LLFolderBridge::removeItemResponse, this, _1, _2)); - /* - LLNotification::Params params("ChangeLindenEstate"); - params.functor.function(boost::bind(&LLPanelEstateInfo::callbackChangeLindenEstate, this, _1, _2)); - */ if (LLFolderType::lookupIsProtectedType(cat->getPreferredType())) { LLNotifications::instance().add(params); @@ -2278,14 +2276,16 @@ bool LLFolderBridge::removeItemResponse(const LLSD& notification, const LLSD& re LLInventoryModel::item_array_t descendent_items; gInventory.collectDescendents( mUUID, descendent_categories, descendent_items, FALSE ); - S32 i; - for (i = 0; i < descendent_items.count(); i++) + for (LLInventoryModel::item_array_t::const_iterator iter = descendent_items.begin(); + iter != descendent_items.end(); + ++iter) { - LLInventoryItem* item = descendent_items[i]; + const LLViewerInventoryItem* item = (*iter); + const LLUUID& item_id = item->getUUID(); if (item->getType() == LLAssetType::AT_GESTURE - && LLGestureManager::instance().isGestureActive(item->getUUID())) + && LLGestureManager::instance().isGestureActive(item_id)) { - LLGestureManager::instance().deactivateGesture(item->getUUID()); + LLGestureManager::instance().deactivateGesture(item_id); } } @@ -2306,14 +2306,16 @@ void LLFolderBridge::pasteFromClipboard() LLInventoryModel* model = getInventoryModel(); if(model && isClipboardPasteable()) { - LLInventoryItem* item = NULL; + const LLUUID parent_id(mUUID); + LLDynamicArray<LLUUID> objects; LLInventoryClipboard::instance().retrieve(objects); - S32 count = objects.count(); - const LLUUID parent_id(mUUID); - for(S32 i = 0; i < count; i++) + for (LLDynamicArray<LLUUID>::const_iterator iter = objects.begin(); + iter != objects.end(); + ++iter) { - item = model->getItem(objects.get(i)); + const LLUUID& item_id = (*iter); + LLInventoryItem *item = model->getItem(item_id); if (item) { if(LLInventoryClipboard::instance().isCutMode()) @@ -2342,13 +2344,15 @@ void LLFolderBridge::pasteLinkFromClipboard() const LLInventoryModel* model = getInventoryModel(); if(model) { + const LLUUID parent_id(mUUID); + LLDynamicArray<LLUUID> objects; LLInventoryClipboard::instance().retrieve(objects); - S32 count = objects.count(); - LLUUID parent_id(mUUID); - for(S32 i = 0; i < count; i++) + for (LLDynamicArray<LLUUID>::const_iterator iter = objects.begin(); + iter != objects.end(); + ++iter) { - const LLUUID &object_id = objects.get(i); + const LLUUID &object_id = (*iter); #if SUPPORT_ENSEMBLES if (LLInventoryCategory *cat = model->getCategory(object_id)) { @@ -2455,6 +2459,8 @@ void LLFolderBridge::folderOptionsMenu() mItems.push_back(std::string("Wear As Ensemble")); } mItems.push_back(std::string("Remove From Outfit")); + if (is_sidepanel) + mItems.push_back(std::string("Outfit Separator")); } hide_context_entries(*mMenu, mItems, disabled_items); diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index 4c5e4d5607..81b10f5a62 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -63,7 +63,8 @@ LLInventoryFilter::FilterOps::FilterOps() : LLInventoryFilter::LLInventoryFilter(const std::string& name) : mName(name), mModified(FALSE), - mNeedTextRebuild(TRUE) + mNeedTextRebuild(TRUE), + mEmptyLookupMessage("InventoryNoMatchingItems") { mOrder = SO_FOLDERS_BY_NAME; // This gets overridden by a pref immediately @@ -95,26 +96,14 @@ BOOL LLInventoryFilter::check(const LLFolderViewItem* item) return TRUE; } - const U16 HOURS_TO_SECONDS = 3600; - time_t earliest = time_corrected() - mFilterOps.mHoursAgo * HOURS_TO_SECONDS; - if (mFilterOps.mMinDate > time_min() && mFilterOps.mMinDate < earliest) - { - earliest = mFilterOps.mMinDate; - } - else if (!mFilterOps.mHoursAgo) - { - earliest = 0; - } - const LLFolderViewEventListener* listener = item->getListener(); mSubStringMatchOffset = mFilterSubString.size() ? item->getSearchableLabel().find(mFilterSubString) : std::string::npos; const BOOL passed_filtertype = checkAgainstFilterType(item); const BOOL passed = passed_filtertype && (mFilterSubString.size() == 0 || mSubStringMatchOffset != std::string::npos) && - ((listener->getPermissionMask() & mFilterOps.mPermissions) == mFilterOps.mPermissions) && - (listener->getCreationDate() >= earliest && listener->getCreationDate() <= mFilterOps.mMaxDate); - + ((listener->getPermissionMask() & mFilterOps.mPermissions) == mFilterOps.mPermissions); + return passed; } @@ -127,27 +116,38 @@ BOOL LLInventoryFilter::checkAgainstFilterType(const LLFolderViewItem* item) const LLUUID object_id = listener->getUUID(); const LLInventoryObject *object = gInventory.getObject(object_id); - if (!object) return FALSE; - const U32 filterTypes = mFilterOps.mFilterTypes; + //////////////////////////////////////////////////////////////////////////////// + // FILTERTYPE_OBJECT // Pass if this item's type is of the correct filter type if (filterTypes & FILTERTYPE_OBJECT) { // If it has no type, pass it, unless it's a link. if (object_type == LLInventoryType::IT_NONE) { - if (object->getIsLinkType()) + if (object && object->getIsLinkType()) return FALSE; } - if ((1LL << object_type & mFilterOps.mFilterObjectTypes) == U64(0)) + else if ((1LL << object_type & mFilterOps.mFilterObjectTypes) == U64(0)) + { return FALSE; + } } + // + //////////////////////////////////////////////////////////////////////////////// + + //////////////////////////////////////////////////////////////////////////////// + // FILTERTYPE_CATEGORY // Pass if this item is a category of the filter type, or // if its parent is a category of the filter type. if (filterTypes & FILTERTYPE_CATEGORY) { + // Can only filter categories for items in your inventory + // (e.g. versus in-world object contents). + if (!object) return FALSE; + LLUUID cat_id = object_id; if (listener->getInventoryType() != LLInventoryType::IT_CATEGORY) { @@ -159,13 +159,45 @@ BOOL LLInventoryFilter::checkAgainstFilterType(const LLFolderViewItem* item) if ((1LL << cat->getPreferredType() & mFilterOps.mFilterCategoryTypes) == U64(0)) return FALSE; } + // + //////////////////////////////////////////////////////////////////////////////// + + //////////////////////////////////////////////////////////////////////////////// + // FILTERTYPE_UUID // Pass if this item is the target UUID or if it links to the target UUID if (filterTypes & FILTERTYPE_UUID) { + if (!object) return FALSE; + if (object->getLinkedUUID() != mFilterOps.mFilterUUID) return FALSE; } + // + //////////////////////////////////////////////////////////////////////////////// + + + //////////////////////////////////////////////////////////////////////////////// + // FILTERTYPE_DATE + // Pass if this item is within the date range. + if (filterTypes & FILTERTYPE_DATE) + { + const U16 HOURS_TO_SECONDS = 3600; + time_t earliest = time_corrected() - mFilterOps.mHoursAgo * HOURS_TO_SECONDS; + if (mFilterOps.mMinDate > time_min() && mFilterOps.mMinDate < earliest) + { + earliest = mFilterOps.mMinDate; + } + else if (!mFilterOps.mHoursAgo) + { + earliest = 0; + } + if (listener->getCreationDate() < earliest || + listener->getCreationDate() > mFilterOps.mMaxDate) + return FALSE; + } + // + //////////////////////////////////////////////////////////////////////////////// return TRUE; } @@ -359,6 +391,7 @@ void LLInventoryFilter::setDateRange(time_t min_date, time_t max_date) mFilterOps.mMaxDate = llmax(mFilterOps.mMinDate, max_date); setModified(); } + mFilterOps.mFilterTypes |= FILTERTYPE_DATE; } void LLInventoryFilter::setDateRangeLastLogoff(BOOL sl) @@ -373,12 +406,14 @@ void LLInventoryFilter::setDateRangeLastLogoff(BOOL sl) setDateRange(0, time_max()); setModified(); } + mFilterOps.mFilterTypes |= FILTERTYPE_DATE; } BOOL LLInventoryFilter::isSinceLogoff() const { return (mFilterOps.mMinDate == (time_t)mLastLogoff) && - (mFilterOps.mMaxDate == time_max()); + (mFilterOps.mMaxDate == time_max()) && + (mFilterOps.mFilterTypes & FILTERTYPE_DATE); } void LLInventoryFilter::clearModified() @@ -410,7 +445,9 @@ void LLInventoryFilter::setHoursAgo(U32 hours) setModified(FILTER_RESTART); } } + mFilterOps.mFilterTypes |= FILTERTYPE_DATE; } + void LLInventoryFilter::setShowFolderState(EFolderShow state) { if (mFilterOps.mShowFolderState != state) @@ -825,3 +862,14 @@ S32 LLInventoryFilter::getMustPassGeneration() const { return mMustPassGeneration; } + +void LLInventoryFilter::setEmptyLookupMessage(const std::string& message) +{ + mEmptyLookupMessage = message; +} + +const std::string& LLInventoryFilter::getEmptyLookupMessage() const +{ + return mEmptyLookupMessage; + +} diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h index d65fb8f27c..5ca77cb26a 100644 --- a/indra/newview/llinventoryfilter.h +++ b/indra/newview/llinventoryfilter.h @@ -61,7 +61,8 @@ public: FILTERTYPE_NONE = 0, FILTERTYPE_OBJECT = 1, // normal default search-by-object-type FILTERTYPE_CATEGORY = 2, // search by folder type - FILTERTYPE_UUID = 4 // find the object with UUID and any links to it + FILTERTYPE_UUID = 4, // find the object with UUID and any links to it + FILTERTYPE_DATE = 8 // search by date range }; // REFACTOR: Change this to an enum. @@ -73,13 +74,6 @@ public: virtual ~LLInventoryFilter(); // +-------------------------------------------------------------------+ - // + Execution And Results - // +-------------------------------------------------------------------+ - BOOL check(const LLFolderViewItem* item); - BOOL checkAgainstFilterType(const LLFolderViewItem* item); - std::string::size_type getStringMatchOffset() const; - - // +-------------------------------------------------------------------+ // + Parameters // +-------------------------------------------------------------------+ void setFilterObjectTypes(U64 types); @@ -103,12 +97,25 @@ public: void setHoursAgo(U32 hours); U32 getHoursAgo() const; + // +-------------------------------------------------------------------+ + // + Execution And Results + // +-------------------------------------------------------------------+ + BOOL check(const LLFolderViewItem* item); + BOOL checkAgainstFilterType(const LLFolderViewItem* item); + std::string::size_type getStringMatchOffset() const; + + // +-------------------------------------------------------------------+ + // + Presentation + // +-------------------------------------------------------------------+ void setShowFolderState( EFolderShow state); EFolderShow getShowFolderState() const; void setSortOrder(U32 order); U32 getSortOrder() const; + void setEmptyLookupMessage(const std::string& message); + const std::string& getEmptyLookupMessage() const; + // +-------------------------------------------------------------------+ // + Status // +-------------------------------------------------------------------+ @@ -187,6 +194,7 @@ private: BOOL mModified; BOOL mNeedTextRebuild; std::string mFilterText; + std::string mEmptyLookupMessage; }; #endif diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index fb9be1e04f..5d8a8805b5 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -192,6 +192,8 @@ void LLInventoryModel::cleanupInventory() BOOL LLInventoryModel::isObjectDescendentOf(const LLUUID& obj_id, const LLUUID& cat_id) const { + if (obj_id == cat_id) return TRUE; + const LLInventoryObject* obj = getObject(obj_id); while(obj) { diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index cbbd433c1d..4f7f0a79f6 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -192,6 +192,7 @@ protected: public: BOOL getIsViewsInitialized() const { return mViewsInitialized; } const LLUUID& getStartFolderID() const { return mStartFolderID; } + const std::string& getStartFolderString() { return mStartFolderString; } protected: // Builds the UI. Call this once the inventory is usable. void initializeViews(); diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index 9797c01371..08bc1fac8b 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -127,7 +127,6 @@ LLTeleportHistoryMenuItem::LLTeleportHistoryMenuItem(const Params& p) if (p.item_type == TYPE_BACKWARD) { setFont( p.back_item_font ); - setLabel(std::string(" ") + std::string(p.label)); } else if (p.item_type == TYPE_CURRENT) { @@ -136,7 +135,6 @@ LLTeleportHistoryMenuItem::LLTeleportHistoryMenuItem(const Params& p) else { setFont( p.forward_item_font ); - setLabel(std::string(" ") + std::string(p.label)); } LLIconCtrl::Params icon_params; diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 65056b00d6..32c9faa688 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -366,7 +366,7 @@ void LLLandmarksPanel::initFavoritesInventoryPanel() mFavoritesInventoryPanel = getChild<LLInventorySubTreePanel>("favorites_list"); initLandmarksPanel(mFavoritesInventoryPanel); - + mFavoritesInventoryPanel->getFilter()->setEmptyLookupMessage("FavoritesNoMatchingItems"); initAccordion("tab_favorites", mFavoritesInventoryPanel); } @@ -428,10 +428,6 @@ void LLLandmarksPanel::initLandmarksPanel(LLInventorySubTreePanel* inventory_lis } root_folder->setParentLandmarksPanel(this); - - // save initial folder state to avoid incorrect work while switching between Landmarks & Teleport History tabs - // See EXT-1609. - inventory_list->saveFolderState(); } void LLLandmarksPanel::initAccordion(const std::string& accordion_tab_name, LLInventorySubTreePanel* inventory_list) @@ -1034,30 +1030,24 @@ void LLLandmarksPanel::doCreatePick(LLLandmark* landmark) ////////////////////////////////////////////////////////////////////////// static void filter_list(LLInventorySubTreePanel* inventory_list, const std::string& string) { + // Open the immediate children of the root folder, since those + // are invisible in the UI and thus must always be open. + inventory_list->getRootFolder()->openTopLevelFolders(); + if (string == "") { inventory_list->setFilterSubString(LLStringUtil::null); - - // re-open folders that were initially open - inventory_list->restoreFolderState(); } - gInventory.startBackgroundFetch(); - if (inventory_list->getFilterSubString().empty() && string.empty()) { // current filter and new filter empty, do nothing return; } - // save current folder open state if no filter currently applied - if (inventory_list->getRootFolder()->getFilterSubString().empty()) - { - inventory_list->saveFolderState(); - } - - // set new filter string + // Set new filter string inventory_list->setFilterSubString(string); + } static void save_folder_state_if_no_filter(LLInventorySubTreePanel* inventory_list) @@ -1065,7 +1055,7 @@ static void save_folder_state_if_no_filter(LLInventorySubTreePanel* inventory_li // save current folder open state if no filter currently applied if (inventory_list->getRootFolder() && inventory_list->getRootFolder()->getFilterSubString().empty()) { - inventory_list->saveFolderState(); + // inventory_list->saveFolderState(); // *TODO: commented out to fix build } } // EOF diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 9fd92725dc..21627e84ff 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -1020,6 +1020,7 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata) can_delete = TRUE; std::set<LLUUID> selection_set; folder->getSelectionList(selection_set); + if (selection_set.empty()) return FALSE; for (std::set<LLUUID>::iterator iter = selection_set.begin(); iter != selection_set.end(); ++iter) diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 4f8aff6f78..9d38dab26e 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -1697,7 +1697,7 @@ void LLPanelObjectInventory::updateInventory() mFolders->requestArrange(); mInventoryNeedsUpdate = FALSE; - LLEditMenuHandler::gEditMenuHandler = mFolders; + // Edit menu handler is set in onFocusReceived } // *FIX: This is currently a very expensive operation, because we have diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index 6aba8c0ebb..4511bca23a 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -136,6 +136,24 @@ void LLPanelOutfitsInventory::onWear() } } +void LLPanelOutfitsInventory::onAdd() +{ + LLFolderViewEventListener* listenerp = getCorrectListenerForAction(); + if (listenerp) + { + listenerp->performAction(NULL, NULL,"addtooutfit"); + } +} + +void LLPanelOutfitsInventory::onRemove() +{ + LLFolderViewEventListener* listenerp = getCorrectListenerForAction(); + if (listenerp) + { + listenerp->performAction(NULL, NULL,"removefromoutfit"); + } +} + void LLPanelOutfitsInventory::onEdit() { } @@ -224,8 +242,10 @@ void LLPanelOutfitsInventory::initListCommandsHandlers() , _7 // EAcceptance* accept )); - mCommitCallbackRegistrar.add("panel_outfits_inventory_gear_default.Custom.Action", boost::bind(&LLPanelOutfitsInventory::onCustomAction, this, _2)); - mEnableCallbackRegistrar.add("panel_outfits_inventory_gear_default.Enable", boost::bind(&LLPanelOutfitsInventory::isActionEnabled, this, _2)); + mCommitCallbackRegistrar.add("panel_outfits_inventory_gear_default.Custom.Action", + boost::bind(&LLPanelOutfitsInventory::onCustomAction, this, _2)); + mEnableCallbackRegistrar.add("panel_outfits_inventory_gear_default.Enable", + boost::bind(&LLPanelOutfitsInventory::isActionEnabled, this, _2)); mMenuGearDefault = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("panel_outfits_inventory_gear_default.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); } @@ -290,6 +310,22 @@ void LLPanelOutfitsInventory::onCustomAction(const LLSD& userdata) { onWear(); } + if (command_name == "add") + { + onAdd(); + } + if (command_name == "remove") + { + onRemove(); + } + if (command_name == "rename") + { + onClipboardAction("rename"); + } + if (command_name == "remove_link") + { + onClipboardAction("delete"); + } if (command_name == "delete") { onClipboardAction("delete"); @@ -320,8 +356,33 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata) } return FALSE; } + if (command_name == "remove_link") + { + BOOL can_delete = FALSE; + LLFolderView *folder = getActivePanel()->getRootFolder(); + if (folder) + { + can_delete = TRUE; + std::set<LLUUID> selection_set; + folder->getSelectionList(selection_set); + for (std::set<LLUUID>::iterator iter = selection_set.begin(); + iter != selection_set.end(); + ++iter) + { + const LLUUID &item_id = (*iter); + LLViewerInventoryItem *item = gInventory.getItem(item_id); + if (!item || !item->getIsLinkType()) + return FALSE; + } + return can_delete; + } + return FALSE; + } if (command_name == "edit" || - command_name == "wear") + command_name == "wear" || + command_name == "add" || + command_name == "remove" + ) { return (getCorrectListenerForAction() != NULL); } diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h index aa0ab4efbc..afeaef485d 100644 --- a/indra/newview/llpaneloutfitsinventory.h +++ b/indra/newview/llpaneloutfitsinventory.h @@ -55,6 +55,8 @@ public: void onSearchEdit(const std::string& string); void onWear(); + void onAdd(); + void onRemove(); void onEdit(); void onNew(); diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp index 6a29d76aad..8b8b1bed37 100644 --- a/indra/newview/llpanelpermissions.cpp +++ b/indra/newview/llpanelpermissions.cpp @@ -181,6 +181,85 @@ LLPanelPermissions::~LLPanelPermissions() } +void LLPanelPermissions::disableAll() +{ + childSetEnabled("perm_modify", FALSE); + childSetText("perm_modify", LLStringUtil::null); + + childSetEnabled("Creator:", FALSE); + childSetText("Creator Name", LLStringUtil::null); + childSetEnabled("Creator Name", FALSE); + + childSetEnabled("Owner:", FALSE); + childSetText("Owner Name", LLStringUtil::null); + childSetEnabled("Owner Name", FALSE); + + childSetEnabled("Group:", FALSE); + childSetText("Group Name", LLStringUtil::null); + childSetEnabled("Group Name", FALSE); + childSetEnabled("button set group", FALSE); + + childSetText("Object Name", LLStringUtil::null); + childSetEnabled("Object Name", FALSE); + childSetEnabled("Name:", FALSE); + childSetText("Group Name", LLStringUtil::null); + childSetEnabled("Group Name", FALSE); + childSetEnabled("Description:", FALSE); + childSetText("Object Description", LLStringUtil::null); + childSetEnabled("Object Description", FALSE); + + childSetEnabled("Permissions:", FALSE); + + childSetValue("checkbox share with group", FALSE); + childSetEnabled("checkbox share with group", FALSE); + childSetEnabled("button deed", FALSE); + + childSetValue("checkbox allow everyone move", FALSE); + childSetEnabled("checkbox allow everyone move", FALSE); + childSetValue("checkbox allow everyone copy", FALSE); + childSetEnabled("checkbox allow everyone copy", FALSE); + + //Next owner can: + childSetEnabled("Next owner can:", FALSE); + childSetValue("checkbox next owner can modify", FALSE); + childSetEnabled("checkbox next owner can modify", FALSE); + childSetValue("checkbox next owner can copy", FALSE); + childSetEnabled("checkbox next owner can copy", FALSE); + childSetValue("checkbox next owner can transfer", FALSE); + childSetEnabled("checkbox next owner can transfer", FALSE); + + //checkbox for sale + childSetValue("checkbox for sale", FALSE); + childSetEnabled("checkbox for sale", FALSE); + + //checkbox include in search + childSetValue("search_check", FALSE); + childSetEnabled("search_check", FALSE); + + LLComboBox* combo_sale_type = getChild<LLComboBox>("sale type"); + combo_sale_type->setValue(LLSaleInfo::FS_COPY); + combo_sale_type->setEnabled(FALSE); + + childSetEnabled("Cost", FALSE); + childSetText("Cost", getString("Cost Default")); + childSetText("Edit Cost", LLStringUtil::null); + childSetEnabled("Edit Cost", FALSE); + + childSetEnabled("label click action", FALSE); + LLComboBox* combo_click_action = getChild<LLComboBox>("clickaction"); + if (combo_click_action) + { + combo_click_action->setEnabled(FALSE); + combo_click_action->clear(); + } + childSetVisible("B:", FALSE); + childSetVisible("O:", FALSE); + childSetVisible("G:", FALSE); + childSetVisible("E:", FALSE); + childSetVisible("N:", FALSE); + childSetVisible("F:", FALSE); +} + void LLPanelPermissions::refresh() { LLButton* BtnDeedToGroup = getChild<LLButton>("button deed"); @@ -215,136 +294,58 @@ void LLPanelPermissions::refresh() if(!nodep || !objectp)// || attachment_selected) { // ...nothing selected - childSetEnabled("perm_modify",false); - childSetText("perm_modify",LLStringUtil::null); - - childSetEnabled("Creator:",false); - childSetText("Creator Name",LLStringUtil::null); - childSetEnabled("Creator Name",false); - - childSetEnabled("Owner:",false); - childSetText("Owner Name",LLStringUtil::null); - childSetEnabled("Owner Name",false); - - childSetEnabled("Group:",false); - childSetText("Group Name",LLStringUtil::null); - childSetEnabled("Group Name",false); - childSetEnabled("button set group",false); - - childSetText("Object Name",LLStringUtil::null); - childSetEnabled("Object Name",false); - childSetEnabled("Name:",false); - childSetText("Group Name",LLStringUtil::null); - childSetEnabled("Group Name",false); - childSetEnabled("Description:",false); - childSetText("Object Description",LLStringUtil::null); - childSetEnabled("Object Description",false); - - childSetEnabled("Permissions:",false); - - childSetValue("checkbox share with group",FALSE); - childSetEnabled("checkbox share with group",false); - childSetEnabled("button deed",false); - - childSetValue("checkbox allow everyone move",FALSE); - childSetEnabled("checkbox allow everyone move",false); - childSetValue("checkbox allow everyone copy",FALSE); - childSetEnabled("checkbox allow everyone copy",false); - - //Next owner can: - childSetEnabled("Next owner can:",false); - childSetValue("checkbox next owner can modify",FALSE); - childSetEnabled("checkbox next owner can modify",false); - childSetValue("checkbox next owner can copy",FALSE); - childSetEnabled("checkbox next owner can copy",false); - childSetValue("checkbox next owner can transfer",FALSE); - childSetEnabled("checkbox next owner can transfer",false); - - //checkbox for sale - childSetValue("checkbox for sale",FALSE); - childSetEnabled("checkbox for sale",false); - - //checkbox include in search - childSetValue("search_check", FALSE); - childSetEnabled("search_check", false); - - LLComboBox* combo_sale_type = getChild<LLComboBox>("sale type"); - combo_sale_type->setValue(LLSaleInfo::FS_COPY); - combo_sale_type->setEnabled(FALSE); - - childSetEnabled("Cost",false); - childSetText("Cost",getString("Cost Default")); - childSetText("Edit Cost",LLStringUtil::null); - childSetEnabled("Edit Cost",false); - - childSetEnabled("label click action",false); - LLComboBox* ComboClickAction = getChild<LLComboBox>("clickaction"); - if(ComboClickAction) - { - ComboClickAction->setEnabled(FALSE); - ComboClickAction->clear(); - } - childSetVisible("B:",false); - childSetVisible("O:",false); - childSetVisible("G:",false); - childSetVisible("E:",false); - childSetVisible("N:",false); - childSetVisible("F:",false); - + disableAll(); return; } // figure out a few variables - BOOL is_one_object = (object_count == 1); - + const BOOL is_one_object = (object_count == 1); + // BUG: fails if a root and non-root are both single-selected. BOOL is_perm_modify = (LLSelectMgr::getInstance()->getSelection()->getFirstRootNode() - && LLSelectMgr::getInstance()->selectGetRootsModify()) - || LLSelectMgr::getInstance()->selectGetModify(); + && LLSelectMgr::getInstance()->selectGetRootsModify()) + || LLSelectMgr::getInstance()->selectGetModify(); const LLFocusableElement* keyboard_focus_view = gFocusMgr.getKeyboardFocus(); + S32 string_index = 0; std::string MODIFY_INFO_STRINGS[] = - { - getString("text modify info 1"), - getString("text modify info 2"), - getString("text modify info 3"), - getString("text modify info 4") - }; - if(!is_perm_modify) + { + getString("text modify info 1"), + getString("text modify info 2"), + getString("text modify info 3"), + getString("text modify info 4") + }; + if (!is_perm_modify) { string_index += 2; } - if(!is_one_object) + if (!is_one_object) { ++string_index; } - childSetEnabled("perm_modify",true); - childSetText("perm_modify",MODIFY_INFO_STRINGS[string_index]); + childSetEnabled("perm_modify", TRUE); + childSetText("perm_modify", MODIFY_INFO_STRINGS[string_index]); - childSetEnabled("Permissions:",true); + childSetEnabled("Permissions:", TRUE); // Update creator text field - childSetEnabled("Creator:",true); + childSetEnabled("Creator:", TRUE); BOOL creators_identical; std::string creator_name; creators_identical = LLSelectMgr::getInstance()->selectGetCreator(mCreatorID, - creator_name); + creator_name); - childSetText("Creator Name",creator_name); - childSetEnabled("Creator Name",TRUE); + childSetText("Creator Name", creator_name); + childSetEnabled("Creator Name", TRUE); // Update owner text field - childSetEnabled("Owner:",true); + childSetEnabled("Owner:", TRUE); - BOOL owners_identical; std::string owner_name; - owners_identical = LLSelectMgr::getInstance()->selectGetOwner(mOwnerID, owner_name); - -// llinfos << "owners_identical " << (owners_identical ? "TRUE": "FALSE") << llendl; - + const BOOL owners_identical = LLSelectMgr::getInstance()->selectGetOwner(mOwnerID, owner_name); if (mOwnerID.isNull()) { - if(LLSelectMgr::getInstance()->selectIsGroupOwned()) + if (LLSelectMgr::getInstance()->selectIsGroupOwned()) { // Group owned already displayed by selectGetOwner } @@ -359,61 +360,53 @@ void LLPanelPermissions::refresh() if (!mLastOwnerID.isNull() && !last_owner_name.empty()) { owner_name.append(", last "); - owner_name.append( last_owner_name ); + owner_name.append(last_owner_name); } } } - - childSetText("Owner Name",owner_name); - childSetEnabled("Owner Name",TRUE); + childSetText("Owner Name", owner_name); + childSetEnabled("Owner Name", TRUE); // update group text field - childSetEnabled("Group:",true); - childSetText("Group Name",LLStringUtil::null); + childSetEnabled("Group:", TRUE); + childSetText("Group Name", LLStringUtil::null); LLUUID group_id; BOOL groups_identical = LLSelectMgr::getInstance()->selectGetGroup(group_id); if (groups_identical) { - if(mLabelGroupName) + if (mLabelGroupName) { - mLabelGroupName->setNameID(group_id, TRUE); + mLabelGroupName->setNameID(group_id,TRUE); mLabelGroupName->setEnabled(TRUE); } } else { - if(mLabelGroupName) + if (mLabelGroupName) { mLabelGroupName->setNameID(LLUUID::null, TRUE); - mLabelGroupName->refresh(LLUUID::null, LLStringUtil::null, LLStringUtil::null, TRUE); + mLabelGroupName->refresh(LLUUID::null,LLStringUtil::null, LLStringUtil::null, TRUE); mLabelGroupName->setEnabled(FALSE); } } - childSetEnabled("button set group",owners_identical && (mOwnerID == gAgent.getID())); - - // figure out the contents of the name, description, & category - BOOL edit_name_desc = FALSE; - if(is_one_object && objectp->permModify()) - { - edit_name_desc = TRUE; - } + childSetEnabled("button set group", owners_identical && (mOwnerID == gAgent.getID())); - childSetEnabled("Name:",true); + childSetEnabled("Name:", TRUE); LLLineEditor* LineEditorObjectName = getChild<LLLineEditor>("Object Name"); - childSetEnabled("Description:",true); - LLLineEditor* LineEditorObjectDesc = getChild<LLLineEditor>("Object Description"); + childSetEnabled("Description:", TRUE); + LLLineEditor* LineEditorObjectDesc = getChild<LLLineEditor>("Object Description"); - if(is_one_object) + if (is_one_object) { - if(keyboard_focus_view != LineEditorObjectName) + if (keyboard_focus_view != LineEditorObjectName) { childSetText("Object Name",nodep->mName); } - if(LineEditorObjectDesc) + if (LineEditorObjectDesc) { - if(keyboard_focus_view != LineEditorObjectDesc) + if (keyboard_focus_view != LineEditorObjectDesc) { LineEditorObjectDesc->setText(nodep->mDescription); } @@ -421,19 +414,25 @@ void LLPanelPermissions::refresh() } else { - childSetText("Object Name",LLStringUtil::null); + childSetText("Object Name", LLStringUtil::null); LineEditorObjectDesc->setText(LLStringUtil::null); } - if(edit_name_desc) + // figure out the contents of the name, description, & category + BOOL edit_name_desc = FALSE; + if (is_one_object && objectp->permModify()) { - childSetEnabled("Object Name",true); - childSetEnabled("Object Description",true); + edit_name_desc = TRUE; + } + if (edit_name_desc) + { + childSetEnabled("Object Name", TRUE); + childSetEnabled("Object Description", TRUE); } else { - childSetEnabled("Object Name",false); - childSetEnabled("Object Description",false); + childSetEnabled("Object Name", FALSE); + childSetEnabled("Object Description", FALSE); } S32 total_sale_price = 0; @@ -442,10 +441,10 @@ void LLPanelPermissions::refresh() BOOL is_sale_price_mixed = FALSE; U32 num_for_sale = FALSE; LLSelectMgr::getInstance()->selectGetAggregateSaleInfo(num_for_sale, - is_for_sale_mixed, - is_sale_price_mixed, - total_sale_price, - individual_sale_price); + is_for_sale_mixed, + is_sale_price_mixed, + total_sale_price, + individual_sale_price); const BOOL self_owned = (gAgent.getID() == mOwnerID); const BOOL group_owned = LLSelectMgr::getInstance()->selectIsGroupOwned() ; @@ -453,35 +452,35 @@ void LLPanelPermissions::refresh() const BOOL can_transfer = LLSelectMgr::getInstance()->selectGetRootsTransfer(); const BOOL can_copy = LLSelectMgr::getInstance()->selectGetRootsCopy(); - if(!owners_identical) + if (!owners_identical) { - childSetEnabled("Cost",false); - childSetText("Edit Cost",LLStringUtil::null); - childSetEnabled("Edit Cost",false); + childSetEnabled("Cost", FALSE); + childSetText("Edit Cost", LLStringUtil::null); + childSetEnabled("Edit Cost", FALSE); } // You own these objects. - else if(self_owned || (group_owned && gAgent.hasPowerInGroup(group_id,GP_OBJECT_SET_SALE))) + else if (self_owned || (group_owned && gAgent.hasPowerInGroup(group_id,GP_OBJECT_SET_SALE))) { // If there are multiple items for sale then set text to PRICE PER UNIT. if (num_for_sale > 1) { - childSetText("Cost",getString("Cost Per Unit")); + childSetText("Cost", getString("Cost Per Unit")); } else { - childSetText("Cost",getString("Cost Default")); + childSetText("Cost", getString("Cost Default")); } LLSpinCtrl *edit_price = getChild<LLSpinCtrl>("Edit Cost"); - if(!edit_price->hasFocus()) + if (!edit_price->hasFocus()) { // If the sale price is mixed then set the cost to MIXED, otherwise // set to the actual cost. - if (num_for_sale > 0 && is_for_sale_mixed) + if ((num_for_sale > 0) && is_for_sale_mixed) { edit_price->setTentative(TRUE); } - else if (num_for_sale > 0 && is_sale_price_mixed) + else if ((num_for_sale > 0) && is_sale_price_mixed) { edit_price->setTentative(TRUE); } @@ -492,303 +491,279 @@ void LLPanelPermissions::refresh() } // The edit fields are only enabled if you can sell this object // and the sale price is not mixed. - bool enable_edit = (num_for_sale && can_transfer) ? !is_for_sale_mixed : false; - childSetEnabled("Cost",enable_edit); - childSetEnabled("Edit Cost",enable_edit); + BOOL enable_edit = (num_for_sale && can_transfer) ? !is_for_sale_mixed : FALSE; + childSetEnabled("Cost", enable_edit); + childSetEnabled("Edit Cost", enable_edit); } // Someone, not you, owns these objects. - else if(!public_owned) + else if (!public_owned) { - childSetEnabled("Cost",false); - childSetEnabled("Edit Cost",false); + childSetEnabled("Cost", FALSE); + childSetEnabled("Edit Cost", FALSE); // Don't show a price if none of the items are for sale. if (num_for_sale) - childSetText("Edit Cost",llformat("%d",total_sale_price)); + childSetText("Edit Cost", llformat("%d",total_sale_price)); else - childSetText("Edit Cost",LLStringUtil::null); + childSetText("Edit Cost", LLStringUtil::null); // If multiple items are for sale, set text to TOTAL PRICE. if (num_for_sale > 1) - childSetText("Cost",getString("Cost Total")); + childSetText("Cost", getString("Cost Total")); else - childSetText("Cost",getString("Cost Default")); + childSetText("Cost", getString("Cost Default")); } // This is a public object. else { - childSetEnabled("Cost",false); - childSetText("Cost",getString("Cost Default")); + childSetEnabled("Cost", FALSE); + childSetText("Cost", getString("Cost Default")); - childSetText("Edit Cost",LLStringUtil::null); - childSetEnabled("Edit Cost",false); + childSetText("Edit Cost", LLStringUtil::null); + childSetEnabled("Edit Cost", FALSE); } // Enable and disable the permissions checkboxes // based on who owns the object. // TODO: Creator permissions - BOOL valid_base_perms = FALSE; - BOOL valid_owner_perms = FALSE; - BOOL valid_group_perms = FALSE; - BOOL valid_everyone_perms = FALSE; - BOOL valid_next_perms = FALSE; - - U32 base_mask_on; - U32 base_mask_off; - U32 owner_mask_on; - U32 owner_mask_off; - U32 group_mask_on; - U32 group_mask_off; - U32 everyone_mask_on; - U32 everyone_mask_off; - U32 next_owner_mask_on = 0; - U32 next_owner_mask_off = 0; - - valid_base_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_BASE, - &base_mask_on, - &base_mask_off); - - valid_owner_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_OWNER, - &owner_mask_on, - &owner_mask_off); - - valid_group_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_GROUP, - &group_mask_on, - &group_mask_off); + U32 base_mask_on = 0; + U32 base_mask_off = 0; + U32 owner_mask_off = 0; + U32 owner_mask_on = 0; + U32 group_mask_on = 0; + U32 group_mask_off = 0; + U32 everyone_mask_on = 0; + U32 everyone_mask_off = 0; + U32 next_owner_mask_on = 0; + U32 next_owner_mask_off = 0; + + BOOL valid_base_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_BASE, + &base_mask_on, + &base_mask_off); + //BOOL valid_owner_perms =// + LLSelectMgr::getInstance()->selectGetPerm(PERM_OWNER, + &owner_mask_on, + &owner_mask_off); + BOOL valid_group_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_GROUP, + &group_mask_on, + &group_mask_off); - valid_everyone_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_EVERYONE, - &everyone_mask_on, - &everyone_mask_off); + BOOL valid_everyone_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_EVERYONE, + &everyone_mask_on, + &everyone_mask_off); - valid_next_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_NEXT_OWNER, - &next_owner_mask_on, - &next_owner_mask_off); + BOOL valid_next_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_NEXT_OWNER, + &next_owner_mask_on, + &next_owner_mask_off); - if( gSavedSettings.getBOOL("DebugPermissions") ) + if (gSavedSettings.getBOOL("DebugPermissions") ) { - std::string perm_string; if (valid_base_perms) { - perm_string = "B: "; - perm_string += mask_to_string(base_mask_on); - childSetText("B:",perm_string); - childSetVisible("B:",true); + childSetText("B:", "B: " + mask_to_string(base_mask_on)); + childSetVisible("B:", TRUE); - perm_string = "O: "; - perm_string += mask_to_string(owner_mask_on); - childSetText("O:",perm_string); - childSetVisible("O:",true); + childSetText("O:", "O: " + mask_to_string(owner_mask_on)); + childSetVisible("O:", TRUE); - perm_string = "G: "; - perm_string += mask_to_string(group_mask_on); - childSetText("G:",perm_string); - childSetVisible("G:",true); + childSetText("G:", "G: " + mask_to_string(group_mask_on)); + childSetVisible("G:", TRUE); - perm_string = "E: "; - perm_string += mask_to_string(everyone_mask_on); - childSetText("E:",perm_string); - childSetVisible("E:",true); + childSetText("E:", "E: " + mask_to_string(everyone_mask_on)); + childSetVisible("E:", TRUE); - perm_string = "N: "; - perm_string += mask_to_string(next_owner_mask_on); - childSetText("N:",perm_string); - childSetVisible("N:",true); + childSetText("N:", "N: " + mask_to_string(next_owner_mask_on)); + childSetVisible("N:", TRUE); } - perm_string = "F: "; + U32 flag_mask = 0x0; - if (objectp->permMove()) - flag_mask |= PERM_MOVE; - if (objectp->permModify()) - flag_mask |= PERM_MODIFY; - if (objectp->permCopy()) - flag_mask |= PERM_COPY; - if (objectp->permTransfer()) - flag_mask |= PERM_TRANSFER; - perm_string += mask_to_string(flag_mask); - childSetText("F:",perm_string); - childSetVisible("F:",true); + if (objectp->permMove()) flag_mask |= PERM_MOVE; + if (objectp->permModify()) flag_mask |= PERM_MODIFY; + if (objectp->permCopy()) flag_mask |= PERM_COPY; + if (objectp->permTransfer()) flag_mask |= PERM_TRANSFER; + + childSetText("F:", "F:" + mask_to_string(flag_mask)); + childSetVisible("F:", TRUE); } else { - childSetVisible("B:",false); - childSetVisible("O:",false); - childSetVisible("G:",false); - childSetVisible("E:",false); - childSetVisible("N:",false); - childSetVisible("F:",false); + childSetVisible("B:", FALSE); + childSetVisible("O:", FALSE); + childSetVisible("G:", FALSE); + childSetVisible("E:", FALSE); + childSetVisible("N:", FALSE); + childSetVisible("F:", FALSE); } - bool has_change_perm_ability = false; - bool has_change_sale_ability = false; + BOOL has_change_perm_ability = FALSE; + BOOL has_change_sale_ability = FALSE; - if(valid_base_perms - && (self_owned - || (group_owned && gAgent.hasPowerInGroup(group_id, GP_OBJECT_MANIPULATE)))) + if (valid_base_perms && + (self_owned || (group_owned && gAgent.hasPowerInGroup(group_id, GP_OBJECT_MANIPULATE)))) { - has_change_perm_ability = true; + has_change_perm_ability = TRUE; } - if(valid_base_perms - && (self_owned - || (group_owned && gAgent.hasPowerInGroup(group_id, GP_OBJECT_SET_SALE)))) + if (valid_base_perms && + (self_owned || (group_owned && gAgent.hasPowerInGroup(group_id, GP_OBJECT_SET_SALE)))) { - has_change_sale_ability = true; + has_change_sale_ability = TRUE; } if (!has_change_perm_ability && !has_change_sale_ability && !root_selected) { // ...must select root to choose permissions - childSetValue("perm_modify", getString("text modify warning")); + childSetValue("perm_modify", getString("text modify warning")); } if (has_change_perm_ability) { - childSetEnabled("checkbox share with group",true); - childSetEnabled("checkbox allow everyone move",owner_mask_on & PERM_MOVE); - childSetEnabled("checkbox allow everyone copy",owner_mask_on & PERM_COPY && owner_mask_on & PERM_TRANSFER); + childSetEnabled("checkbox share with group", TRUE); + childSetEnabled("checkbox allow everyone move", owner_mask_on & PERM_MOVE); + childSetEnabled("checkbox allow everyone copy", owner_mask_on & PERM_COPY && owner_mask_on & PERM_TRANSFER); } else { - childSetEnabled("checkbox share with group", FALSE); - childSetEnabled("checkbox allow everyone move", FALSE); - childSetEnabled("checkbox allow everyone copy", FALSE); + childSetEnabled("checkbox share with group", FALSE); + childSetEnabled("checkbox allow everyone move", FALSE); + childSetEnabled("checkbox allow everyone copy", FALSE); } if (has_change_sale_ability && (owner_mask_on & PERM_TRANSFER)) { - childSetEnabled("checkbox for sale", can_transfer || (!can_transfer && num_for_sale)); + childSetEnabled("checkbox for sale", can_transfer || (!can_transfer && num_for_sale)); // Set the checkbox to tentative if the prices of each object selected // are not the same. - childSetTentative("checkbox for sale", is_for_sale_mixed); - childSetEnabled("sale type",num_for_sale && can_transfer && !is_sale_price_mixed); + childSetTentative("checkbox for sale", is_for_sale_mixed); + childSetEnabled("sale type", num_for_sale && can_transfer && !is_sale_price_mixed); - childSetEnabled("Next owner can:", TRUE); - childSetEnabled("checkbox next owner can modify",base_mask_on & PERM_MODIFY); - childSetEnabled("checkbox next owner can copy",base_mask_on & PERM_COPY); - childSetEnabled("checkbox next owner can transfer",next_owner_mask_on & PERM_COPY); + childSetEnabled("Next owner can:", TRUE); + childSetEnabled("checkbox next owner can modify", base_mask_on & PERM_MODIFY); + childSetEnabled("checkbox next owner can copy", base_mask_on & PERM_COPY); + childSetEnabled("checkbox next owner can transfer", next_owner_mask_on & PERM_COPY); } else { - childSetEnabled("checkbox for sale",FALSE); - childSetEnabled("sale type",FALSE); + childSetEnabled("checkbox for sale", FALSE); + childSetEnabled("sale type", FALSE); - childSetEnabled("Next owner can:",FALSE); - childSetEnabled("checkbox next owner can modify",FALSE); - childSetEnabled("checkbox next owner can copy",FALSE); - childSetEnabled("checkbox next owner can transfer",FALSE); + childSetEnabled("Next owner can:", FALSE); + childSetEnabled("checkbox next owner can modify", FALSE); + childSetEnabled("checkbox next owner can copy", FALSE); + childSetEnabled("checkbox next owner can transfer", FALSE); } - if(valid_group_perms) + if (valid_group_perms) { - if((group_mask_on & PERM_COPY) && (group_mask_on & PERM_MODIFY) && (group_mask_on & PERM_MOVE)) + if ((group_mask_on & PERM_COPY) && (group_mask_on & PERM_MODIFY) && (group_mask_on & PERM_MOVE)) { - childSetValue("checkbox share with group",TRUE); - childSetTentative("checkbox share with group",FALSE); - childSetEnabled("button deed",gAgent.hasPowerInGroup(group_id, GP_OBJECT_DEED) && (owner_mask_on & PERM_TRANSFER) && !group_owned && can_transfer); + childSetValue("checkbox share with group", TRUE); + childSetTentative("checkbox share with group", FALSE); + childSetEnabled("button deed", gAgent.hasPowerInGroup(group_id, GP_OBJECT_DEED) && (owner_mask_on & PERM_TRANSFER) && !group_owned && can_transfer); } - else if((group_mask_off & PERM_COPY) && (group_mask_off & PERM_MODIFY) && (group_mask_off & PERM_MOVE)) + else if ((group_mask_off & PERM_COPY) && (group_mask_off & PERM_MODIFY) && (group_mask_off & PERM_MOVE)) { - childSetValue("checkbox share with group",FALSE); - childSetTentative("checkbox share with group",false); - childSetEnabled("button deed",false); + childSetValue("checkbox share with group", FALSE); + childSetTentative("checkbox share with group", FALSE); + childSetEnabled("button deed", FALSE); } else { - childSetValue("checkbox share with group",TRUE); - childSetTentative("checkbox share with group",true); - childSetEnabled("button deed",gAgent.hasPowerInGroup(group_id, GP_OBJECT_DEED) && (group_mask_on & PERM_MOVE) && (owner_mask_on & PERM_TRANSFER) && !group_owned && can_transfer); + childSetValue("checkbox share with group", TRUE); + childSetTentative("checkbox share with group", TRUE); + childSetEnabled("button deed", gAgent.hasPowerInGroup(group_id, GP_OBJECT_DEED) && (group_mask_on & PERM_MOVE) && (owner_mask_on & PERM_TRANSFER) && !group_owned && can_transfer); } } - if(valid_everyone_perms) + if (valid_everyone_perms) { // Move - if(everyone_mask_on & PERM_MOVE) + if (everyone_mask_on & PERM_MOVE) { - childSetValue("checkbox allow everyone move",TRUE); - childSetTentative("checkbox allow everyone move",false); + childSetValue("checkbox allow everyone move", TRUE); + childSetTentative("checkbox allow everyone move", FALSE); } - else if(everyone_mask_off & PERM_MOVE) + else if (everyone_mask_off & PERM_MOVE) { - childSetValue("checkbox allow everyone move",FALSE); - childSetTentative("checkbox allow everyone move",false); + childSetValue("checkbox allow everyone move", FALSE); + childSetTentative("checkbox allow everyone move", FALSE); } else { - childSetValue("checkbox allow everyone move",TRUE); - childSetTentative("checkbox allow everyone move",true); + childSetValue("checkbox allow everyone move", TRUE); + childSetTentative("checkbox allow everyone move", TRUE); } // Copy == everyone can't copy - if(everyone_mask_on & PERM_COPY) + if (everyone_mask_on & PERM_COPY) { - childSetValue("checkbox allow everyone copy",TRUE); - childSetTentative("checkbox allow everyone copy",!can_copy || !can_transfer); + childSetValue("checkbox allow everyone copy", TRUE); + childSetTentative("checkbox allow everyone copy", !can_copy || !can_transfer); } - else if(everyone_mask_off & PERM_COPY) + else if (everyone_mask_off & PERM_COPY) { - childSetValue("checkbox allow everyone copy",FALSE); - childSetTentative("checkbox allow everyone copy",false); + childSetValue("checkbox allow everyone copy", FALSE); + childSetTentative("checkbox allow everyone copy", FALSE); } else { - childSetValue("checkbox allow everyone copy",TRUE); - childSetTentative("checkbox allow everyone copy",true); + childSetValue("checkbox allow everyone copy", TRUE); + childSetTentative("checkbox allow everyone copy", TRUE); } } - if(valid_next_perms) + if (valid_next_perms) { // Modify == next owner canot modify - if(next_owner_mask_on & PERM_MODIFY) + if (next_owner_mask_on & PERM_MODIFY) { - childSetValue("checkbox next owner can modify",TRUE); - childSetTentative("checkbox next owner can modify",false); + childSetValue("checkbox next owner can modify", TRUE); + childSetTentative("checkbox next owner can modify", FALSE); } - else if(next_owner_mask_off & PERM_MODIFY) + else if (next_owner_mask_off & PERM_MODIFY) { - childSetValue("checkbox next owner can modify",FALSE); - childSetTentative("checkbox next owner can modify",false); + childSetValue("checkbox next owner can modify", FALSE); + childSetTentative("checkbox next owner can modify", FALSE); } else { - childSetValue("checkbox next owner can modify",TRUE); - childSetTentative("checkbox next owner can modify",true); + childSetValue("checkbox next owner can modify", TRUE); + childSetTentative("checkbox next owner can modify", TRUE); } // Copy == next owner cannot copy - if(next_owner_mask_on & PERM_COPY) + if (next_owner_mask_on & PERM_COPY) { - childSetValue("checkbox next owner can copy",TRUE); - childSetTentative("checkbox next owner can copy",!can_copy); + childSetValue("checkbox next owner can copy", TRUE); + childSetTentative("checkbox next owner can copy", !can_copy); } - else if(next_owner_mask_off & PERM_COPY) + else if (next_owner_mask_off & PERM_COPY) { - childSetValue("checkbox next owner can copy",FALSE); - childSetTentative("checkbox next owner can copy",FALSE); + childSetValue("checkbox next owner can copy", FALSE); + childSetTentative("checkbox next owner can copy", FALSE); } else { - childSetValue("checkbox next owner can copy",TRUE); - childSetTentative("checkbox next owner can copy",TRUE); + childSetValue("checkbox next owner can copy", TRUE); + childSetTentative("checkbox next owner can copy", TRUE); } // Transfer == next owner cannot transfer - if(next_owner_mask_on & PERM_TRANSFER) + if (next_owner_mask_on & PERM_TRANSFER) { - childSetValue("checkbox next owner can transfer",TRUE); - childSetTentative("checkbox next owner can transfer",!can_transfer); + childSetValue("checkbox next owner can transfer", TRUE); + childSetTentative("checkbox next owner can transfer", !can_transfer); } - else if(next_owner_mask_off & PERM_TRANSFER) + else if (next_owner_mask_off & PERM_TRANSFER) { - childSetValue("checkbox next owner can transfer",FALSE); - childSetTentative("checkbox next owner can transfer",FALSE); + childSetValue("checkbox next owner can transfer", FALSE); + childSetTentative("checkbox next owner can transfer", FALSE); } else { - childSetValue("checkbox next owner can transfer",TRUE); - childSetTentative("checkbox next owner can transfer",TRUE); + childSetValue("checkbox next owner can transfer", TRUE); + childSetTentative("checkbox next owner can transfer", TRUE); } } @@ -800,48 +775,51 @@ void LLPanelPermissions::refresh() LLComboBox* combo_sale_type = getChild<LLComboBox>("sale type"); if (valid_sale_info) { - combo_sale_type->setValue(sale_type == LLSaleInfo::FS_NOT ? LLSaleInfo::FS_COPY : sale_type); - combo_sale_type->setTentative(FALSE); // unfortunately this doesn't do anything at the moment. + combo_sale_type->setValue( sale_type == LLSaleInfo::FS_NOT ? LLSaleInfo::FS_COPY : sale_type); + combo_sale_type->setTentative( FALSE); // unfortunately this doesn't do anything at the moment. } else { // default option is sell copy, determined to be safest - combo_sale_type->setValue(LLSaleInfo::FS_COPY); - combo_sale_type->setTentative(TRUE); // unfortunately this doesn't do anything at the moment. + combo_sale_type->setValue( LLSaleInfo::FS_COPY); + combo_sale_type->setTentative( TRUE); // unfortunately this doesn't do anything at the moment. } - childSetValue("checkbox for sale", num_for_sale != 0); + childSetValue("checkbox for sale", (num_for_sale != 0)); // HACK: There are some old objects in world that are set for sale, // but are no-transfer. We need to let users turn for-sale off, but only // if for-sale is set. bool cannot_actually_sell = !can_transfer || (!can_copy && sale_type == LLSaleInfo::FS_COPY); - if (num_for_sale && has_change_sale_ability && cannot_actually_sell) + if (cannot_actually_sell) { - childSetEnabled("checkbox for sale", true); + if (num_for_sale && has_change_sale_ability) + { + childSetEnabled("checkbox for sale", true); + } } - + // Check search status of objects - BOOL all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ); + const BOOL all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ); bool include_in_search; - bool all_include_in_search = LLSelectMgr::getInstance()->selectionGetIncludeInSearch(&include_in_search); - childSetEnabled("search_check", has_change_sale_ability && all_volume); - childSetValue("search_check", include_in_search); - childSetTentative("search_check", ! all_include_in_search); + const BOOL all_include_in_search = LLSelectMgr::getInstance()->selectionGetIncludeInSearch(&include_in_search); + childSetEnabled("search_check", has_change_sale_ability && all_volume); + childSetValue("search_check", include_in_search); + childSetTentative("search_check", !all_include_in_search); // Click action (touch, sit, buy) U8 click_action = 0; if (LLSelectMgr::getInstance()->selectionGetClickAction(&click_action)) { - LLComboBox* ComboClickAction = getChild<LLComboBox>("clickaction"); - if(ComboClickAction) + LLComboBox* combo_click_action = getChild<LLComboBox>("clickaction"); + if(combo_click_action) { - std::string combo_value = click_action_to_string_value(click_action); - ComboClickAction->setValue(LLSD(combo_value)); + const std::string combo_value = click_action_to_string_value(click_action); + combo_click_action->setValue(LLSD(combo_value)); } } - childSetEnabled("label click action",is_perm_modify && all_volume); - childSetEnabled("clickaction",is_perm_modify && all_volume); + childSetEnabled("label click action", is_perm_modify && all_volume); + childSetEnabled("clickaction", is_perm_modify && all_volume); } diff --git a/indra/newview/llpanelpermissions.h b/indra/newview/llpanelpermissions.h index 805a4dbe97..38d3be532f 100644 --- a/indra/newview/llpanelpermissions.h +++ b/indra/newview/llpanelpermissions.h @@ -84,6 +84,9 @@ protected: static void onCommitIncludeInSearch(LLUICtrl* ctrl, void*); protected: + void disableAll(); + +private: LLNameBox* mLabelGroupName; // group name LLUUID mCreatorID; diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 1605838b94..4d6c19157a 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -104,6 +104,7 @@ const F32 SILHOUETTE_UPDATE_THRESHOLD_SQUARED = 0.02f; const S32 MAX_ACTION_QUEUE_SIZE = 20; const S32 MAX_SILS_PER_FRAME = 50; const S32 MAX_OBJECTS_PER_PACKET = 254; +const S32 TE_SELECT_MASK_ALL = 0xFFFFFFFF; // // Globals @@ -5110,7 +5111,7 @@ LLSelectNode::~LLSelectNode() void LLSelectNode::selectAllTEs(BOOL b) { - mTESelectMask = b ? 0xFFFFFFFF : 0x0; + mTESelectMask = b ? TE_SELECT_MASK_ALL : 0x0; mLastTESelected = 0; } @@ -5753,8 +5754,22 @@ void LLSelectMgr::redo() //----------------------------------------------------------------------------- BOOL LLSelectMgr::canDoDelete() const { - // Note: Can only delete root objects (see getFirstDeleteableObject() for more info) - return const_cast<LLSelectMgr*>(this)->mSelectedObjects->getFirstDeleteableObject() != NULL; // HACK: casting away constness - MG + bool can_delete = false;
+ // This function is "logically const" - it does not change state in
+ // a way visible outside the selection manager.
+ LLSelectMgr* self = const_cast<LLSelectMgr*>(this);
+ LLViewerObject* obj = self->mSelectedObjects->getFirstDeleteableObject();
+ // Note: Can only delete root objects (see getFirstDeleteableObject() for more info)
+ if (obj!= NULL)
+ {
+ // all the faces needs to be selected
+ if(self->mSelectedObjects->contains(obj,SELECT_ALL_TES ))
+ {
+ can_delete = true;
+ }
+ }
+
+ return can_delete; } //----------------------------------------------------------------------------- @@ -6189,8 +6204,14 @@ BOOL LLObjectSelection::contains(LLViewerObject* object, S32 te) LLSelectNode* nodep = *iter; if (nodep->getObject() == object) { + // Optimization + if (nodep->getTESelectMask() == TE_SELECT_MASK_ALL) + { + return TRUE; + } + BOOL all_selected = TRUE; - for (S32 i = 0; i < SELECT_MAX_TES; i++) + for (S32 i = 0; i < object->getNumTEs(); i++) { all_selected = all_selected && nodep->isTESelected(i); } diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index d5f01418c6..eb3695a371 100644 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -67,6 +67,26 @@ private: LLSidepanelAppearance *mPanel; }; +class LLWatchForOutfitRenameObserver : public LLInventoryObserver +{ +public: + LLWatchForOutfitRenameObserver(LLSidepanelAppearance *panel) : + mPanel(panel) + {} + virtual void changed(U32 mask); + +private: + LLSidepanelAppearance *mPanel; +}; + +void LLWatchForOutfitRenameObserver::changed(U32 mask) +{ + if (mask & LABEL) + { + mPanel->refreshCurrentOutfitName(); + } +} + LLSidepanelAppearance::LLSidepanelAppearance() : LLPanel(), mFilterSubString(LLStringUtil::null), @@ -76,6 +96,8 @@ LLSidepanelAppearance::LLSidepanelAppearance() : { //LLUICtrlFactory::getInstance()->buildPanel(this, "panel_appearance.xml"); // Called from LLRegisterPanelClass::defaultPanelClassBuilder() mFetchWorn = new LLCurrentlyWornFetchObserver(this); + + mOutfitRenameWatcher = new LLWatchForOutfitRenameObserver(this); } LLSidepanelAppearance::~LLSidepanelAppearance() @@ -135,6 +157,8 @@ BOOL LLSidepanelAppearance::postBuild() mCurrOutfitPanel = getChild<LLPanel>("panel_currentlook"); + gInventory.addObserver(mOutfitRenameWatcher); + return TRUE; } @@ -299,7 +323,7 @@ void LLSidepanelAppearance::updateVerbs() } } -void LLSidepanelAppearance::refreshCurrentOutfitName(const std::string name) +void LLSidepanelAppearance::refreshCurrentOutfitName(const std::string& name) { if (name == "") { diff --git a/indra/newview/llsidepanelappearance.h b/indra/newview/llsidepanelappearance.h index b335fd910d..9c870f631a 100644 --- a/indra/newview/llsidepanelappearance.h +++ b/indra/newview/llsidepanelappearance.h @@ -40,6 +40,7 @@ class LLFilterEditor; class LLCurrentlyWornFetchObserver; +class LLWatchForOutfitRenameObserver; class LLPanelEditWearable; class LLWearable; class LLPanelOutfitsInventory; @@ -53,7 +54,7 @@ public: /*virtual*/ BOOL postBuild(); /*virtual*/ void onOpen(const LLSD& key); - void refreshCurrentOutfitName(const std::string name = ""); + void refreshCurrentOutfitName(const std::string& name = ""); static void editWearable(LLWearable *wearable, void *data); @@ -91,6 +92,9 @@ private: // Used to make sure the user's inventory is in memory. LLCurrentlyWornFetchObserver* mFetchWorn; + // Used to update title when currently worn outfit gets renamed. + LLWatchForOutfitRenameObserver* mOutfitRenameWatcher; + // Search string for filtering landmarks and teleport // history locations std::string mFilterSubString; diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp index 09e067b5f9..464546cc77 100644 --- a/indra/newview/llsidepaneltaskinfo.cpp +++ b/indra/newview/llsidepaneltaskinfo.cpp @@ -104,11 +104,10 @@ BOOL LLSidepanelTaskInfo::postBuild() childSetPrevalidate("Object Name",LLLineEditor::prevalidateASCIIPrintableNoPipe); childSetPrevalidate("Object Description",LLLineEditor::prevalidateASCIIPrintableNoPipe); -// getChild<LLUICtrl>("button set group")->setCommitCallback(boost::bind(&LLSidepanelTaskInfo::onClickGroup,this)); -// childSetAction("button deed",LLSidepanelTaskInfo::onClickDeedToGroup,this); - mLabelGroupName = getChild<LLNameBox>("Group Name Proxy"); + childSetCommitCallback("checkbox for sale",onClickForSale,this); + return TRUE; } @@ -119,6 +118,7 @@ void LLSidepanelTaskInfo::setVisible(BOOL visible) if (visible) { sActivePanel = this; + mObject = getFirstSelectedObject(); } else { @@ -126,10 +126,89 @@ void LLSidepanelTaskInfo::setVisible(BOOL visible) } } +void LLSidepanelTaskInfo::disableAll() +{ + childSetEnabled("perm_modify", FALSE); + childSetText("perm_modify", LLStringUtil::null); + + childSetEnabled("Creator:", FALSE); + childSetText("Creator Name", LLStringUtil::null); + childSetEnabled("Creator Name", FALSE); + + childSetEnabled("Owner:", FALSE); + childSetText("Owner Name", LLStringUtil::null); + childSetEnabled("Owner Name", FALSE); + + childSetEnabled("Group:", FALSE); + childSetText("Group Name", LLStringUtil::null); + childSetEnabled("Group Name", FALSE); + childSetEnabled("button set group", FALSE); + + childSetText("Object Name", LLStringUtil::null); + childSetEnabled("Object Name", FALSE); + childSetEnabled("Name:", FALSE); + childSetText("Group Name", LLStringUtil::null); + childSetEnabled("Group Name", FALSE); + childSetEnabled("Description:", FALSE); + childSetText("Object Description", LLStringUtil::null); + childSetEnabled("Object Description", FALSE); + + childSetEnabled("Permissions:", FALSE); + + childSetValue("checkbox share with group", FALSE); + childSetEnabled("checkbox share with group", FALSE); + childSetEnabled("button deed", FALSE); + + childSetValue("checkbox allow everyone move", FALSE); + childSetEnabled("checkbox allow everyone move", FALSE); + childSetValue("checkbox allow everyone copy", FALSE); + childSetEnabled("checkbox allow everyone copy", FALSE); + + //Next owner can: + childSetEnabled("Next owner can:", FALSE); + childSetValue("checkbox next owner can modify", FALSE); + childSetEnabled("checkbox next owner can modify", FALSE); + childSetValue("checkbox next owner can copy", FALSE); + childSetEnabled("checkbox next owner can copy", FALSE); + childSetValue("checkbox next owner can transfer", FALSE); + childSetEnabled("checkbox next owner can transfer", FALSE); + + //checkbox for sale + childSetValue("checkbox for sale", FALSE); + childSetEnabled("checkbox for sale", FALSE); + + //checkbox include in search + childSetValue("search_check", FALSE); + childSetEnabled("search_check", FALSE); + + LLComboBox* combo_sale_type = getChild<LLComboBox>("sale type"); + combo_sale_type->setValue(LLSaleInfo::FS_COPY); + combo_sale_type->setEnabled(FALSE); + + childSetEnabled("Cost", FALSE); + childSetText("Cost", getString("Cost Default")); + childSetText("Edit Cost", LLStringUtil::null); + childSetEnabled("Edit Cost", FALSE); + + childSetEnabled("label click action", FALSE); + LLComboBox* combo_click_action = getChild<LLComboBox>("clickaction"); + if (combo_click_action) + { + combo_click_action->setEnabled(FALSE); + combo_click_action->clear(); + } + childSetVisible("B:", FALSE); + childSetVisible("O:", FALSE); + childSetVisible("G:", FALSE); + childSetVisible("E:", FALSE); + childSetVisible("N:", FALSE); + childSetVisible("F:", FALSE); +} + void LLSidepanelTaskInfo::refresh() { - LLButton* BtnDeedToGroup = getChild<LLButton>("button deed"); - if(BtnDeedToGroup) + LLButton* btn_deed_to_group = getChild<LLButton>("button deed"); + if (btn_deed_to_group) { std::string deedText; if (gWarningSettings.getBOOL("DeedObject")) @@ -140,156 +219,80 @@ void LLSidepanelTaskInfo::refresh() { deedText = getString("text deed"); } - BtnDeedToGroup->setLabelSelected(deedText); - BtnDeedToGroup->setLabelUnselected(deedText); + btn_deed_to_group->setLabelSelected(deedText); + btn_deed_to_group->setLabelUnselected(deedText); } + BOOL root_selected = TRUE; LLSelectNode* nodep = mObjectSelection->getFirstRootNode(); S32 object_count = mObjectSelection->getRootObjectCount(); - if(!nodep || 0 == object_count) + if (!nodep || (object_count == 0)) { nodep = mObjectSelection->getFirstNode(); object_count = mObjectSelection->getObjectCount(); root_selected = FALSE; } - //BOOL attachment_selected = mObjectSelection->isAttachment(); - //attachment_selected = false; LLViewerObject* objectp = NULL; - if(nodep) objectp = nodep->getObject(); - if(!nodep || !objectp)// || attachment_selected) + if (nodep) { - // ...nothing selected - childSetEnabled("perm_modify",false); - childSetText("perm_modify",LLStringUtil::null); - - childSetEnabled("Creator:",false); - childSetText("Creator Name",LLStringUtil::null); - childSetEnabled("Creator Name",false); - - childSetEnabled("Owner:",false); - childSetText("Owner Name",LLStringUtil::null); - childSetEnabled("Owner Name",false); - - childSetEnabled("Group:",false); - childSetText("Group Name",LLStringUtil::null); - childSetEnabled("Group Name",false); - childSetEnabled("button set group",false); - - childSetText("Object Name",LLStringUtil::null); - childSetEnabled("Object Name",false); - childSetEnabled("Name:",false); - childSetText("Group Name",LLStringUtil::null); - childSetEnabled("Group Name",false); - childSetEnabled("Description:",false); - childSetText("Object Description",LLStringUtil::null); - childSetEnabled("Object Description",false); - - childSetEnabled("Permissions:",false); - - childSetValue("checkbox share with group",FALSE); - childSetEnabled("checkbox share with group",false); - childSetEnabled("button deed",false); - - childSetValue("checkbox allow everyone move",FALSE); - childSetEnabled("checkbox allow everyone move",false); - childSetValue("checkbox allow everyone copy",FALSE); - childSetEnabled("checkbox allow everyone copy",false); - - //Next owner can: - childSetEnabled("Next owner can:",false); - childSetValue("checkbox next owner can modify",FALSE); - childSetEnabled("checkbox next owner can modify",false); - childSetValue("checkbox next owner can copy",FALSE); - childSetEnabled("checkbox next owner can copy",false); - childSetValue("checkbox next owner can transfer",FALSE); - childSetEnabled("checkbox next owner can transfer",false); - - //checkbox for sale - childSetValue("checkbox for sale",FALSE); - childSetEnabled("checkbox for sale",false); - - //checkbox include in search - childSetValue("search_check", FALSE); - childSetEnabled("search_check", false); - - LLComboBox* combo_sale_type = getChild<LLComboBox>("sale type"); - combo_sale_type->setValue(LLSaleInfo::FS_COPY); - combo_sale_type->setEnabled(FALSE); - - childSetEnabled("Cost",false); - childSetText("Cost",getString("Cost Default")); - childSetText("Edit Cost",LLStringUtil::null); - childSetEnabled("Edit Cost",false); - - childSetEnabled("label click action",false); - LLComboBox* ComboClickAction = getChild<LLComboBox>("clickaction"); - if(ComboClickAction) - { - ComboClickAction->setEnabled(FALSE); - ComboClickAction->clear(); - } - childSetVisible("B:",false); - childSetVisible("O:",false); - childSetVisible("G:",false); - childSetVisible("E:",false); - childSetVisible("N:",false); - childSetVisible("F:",false); + objectp = nodep->getObject(); + } + // ...nothing selected + if (!nodep || !objectp) + { + disableAll(); return; } // figure out a few variables - BOOL is_one_object = (object_count == 1); - + const BOOL is_one_object = (object_count == 1); + // BUG: fails if a root and non-root are both single-selected. - BOOL is_perm_modify = (mObjectSelection->getFirstRootNode() - && LLSelectMgr::getInstance()->selectGetRootsModify()) - || LLSelectMgr::getInstance()->selectGetModify(); + const BOOL is_perm_modify = (mObjectSelection->getFirstRootNode() && LLSelectMgr::getInstance()->selectGetRootsModify()) || + LLSelectMgr::getInstance()->selectGetModify(); const LLFocusableElement* keyboard_focus_view = gFocusMgr.getKeyboardFocus(); + S32 string_index = 0; std::string MODIFY_INFO_STRINGS[] = - { - getString("text modify info 1"), - getString("text modify info 2"), - getString("text modify info 3"), - getString("text modify info 4") - }; - if(!is_perm_modify) + { + getString("text modify info 1"), + getString("text modify info 2"), + getString("text modify info 3"), + getString("text modify info 4") + }; + if (!is_perm_modify) { string_index += 2; } - if(!is_one_object) + if (!is_one_object) { ++string_index; } - childSetEnabled("perm_modify",true); - childSetText("perm_modify",MODIFY_INFO_STRINGS[string_index]); + childSetEnabled("perm_modify", TRUE); + childSetText("perm_modify", MODIFY_INFO_STRINGS[string_index]); - childSetEnabled("Permissions:",true); + childSetEnabled("Permissions:", TRUE); // Update creator text field - childSetEnabled("Creator:",true); + childSetEnabled("Creator:", TRUE); BOOL creators_identical; std::string creator_name; creators_identical = LLSelectMgr::getInstance()->selectGetCreator(mCreatorID, - creator_name); + creator_name); - childSetText("Creator Name",creator_name); - childSetEnabled("Creator Name",TRUE); + childSetText("Creator Name", creator_name); + childSetEnabled("Creator Name", TRUE); // Update owner text field - childSetEnabled("Owner:",true); + childSetEnabled("Owner:", TRUE); - BOOL owners_identical; std::string owner_name; - owners_identical = LLSelectMgr::getInstance()->selectGetOwner(mOwnerID, owner_name); - -// llinfos << "owners_identical " << (owners_identical ? "TRUE": "FALSE") << llendl; - + const BOOL owners_identical = LLSelectMgr::getInstance()->selectGetOwner(mOwnerID, owner_name); if (mOwnerID.isNull()) { - if(LLSelectMgr::getInstance()->selectIsGroupOwned()) + if (LLSelectMgr::getInstance()->selectIsGroupOwned()) { // Group owned already displayed by selectGetOwner } @@ -304,61 +307,53 @@ void LLSidepanelTaskInfo::refresh() if (!mLastOwnerID.isNull() && !last_owner_name.empty()) { owner_name.append(", last "); - owner_name.append( last_owner_name ); + owner_name.append(last_owner_name); } } } - - childSetText("Owner Name",owner_name); - childSetEnabled("Owner Name",TRUE); + childSetText("Owner Name", owner_name); + childSetEnabled("Owner Name", TRUE); // update group text field - childSetEnabled("Group:",true); - childSetText("Group Name",LLStringUtil::null); + childSetEnabled("Group:", TRUE); + childSetText("Group Name", LLStringUtil::null); LLUUID group_id; BOOL groups_identical = LLSelectMgr::getInstance()->selectGetGroup(group_id); if (groups_identical) { - if(mLabelGroupName) + if (mLabelGroupName) { - mLabelGroupName->setNameID(group_id, TRUE); + mLabelGroupName->setNameID(group_id,TRUE); mLabelGroupName->setEnabled(TRUE); } } else { - if(mLabelGroupName) + if (mLabelGroupName) { mLabelGroupName->setNameID(LLUUID::null, TRUE); - mLabelGroupName->refresh(LLUUID::null, LLStringUtil::null, LLStringUtil::null, TRUE); + mLabelGroupName->refresh(LLUUID::null,LLStringUtil::null, LLStringUtil::null, TRUE); mLabelGroupName->setEnabled(FALSE); } } - childSetEnabled("button set group",owners_identical && (mOwnerID == gAgent.getID())); + childSetEnabled("button set group", owners_identical && (mOwnerID == gAgent.getID())); - // figure out the contents of the name, description, & category - BOOL edit_name_desc = FALSE; - if(is_one_object && objectp->permModify()) - { - edit_name_desc = TRUE; - } - - childSetEnabled("Name:",true); + childSetEnabled("Name:", TRUE); LLLineEditor* LineEditorObjectName = getChild<LLLineEditor>("Object Name"); - childSetEnabled("Description:",true); - LLLineEditor* LineEditorObjectDesc = getChild<LLLineEditor>("Object Description"); + childSetEnabled("Description:", TRUE); + LLLineEditor* LineEditorObjectDesc = getChild<LLLineEditor>("Object Description"); - if(is_one_object) + if (is_one_object) { - if(keyboard_focus_view != LineEditorObjectName) + if (keyboard_focus_view != LineEditorObjectName) { childSetText("Object Name",nodep->mName); } - if(LineEditorObjectDesc) + if (LineEditorObjectDesc) { - if(keyboard_focus_view != LineEditorObjectDesc) + if (keyboard_focus_view != LineEditorObjectDesc) { LineEditorObjectDesc->setText(nodep->mDescription); } @@ -366,19 +361,25 @@ void LLSidepanelTaskInfo::refresh() } else { - childSetText("Object Name",LLStringUtil::null); + childSetText("Object Name", LLStringUtil::null); LineEditorObjectDesc->setText(LLStringUtil::null); } - if(edit_name_desc) + // figure out the contents of the name, description, & category + BOOL edit_name_desc = FALSE; + if (is_one_object && objectp->permModify()) { - childSetEnabled("Object Name",true); - childSetEnabled("Object Description",true); + edit_name_desc = TRUE; + } + if (edit_name_desc) + { + childSetEnabled("Object Name", TRUE); + childSetEnabled("Object Description", TRUE); } else { - childSetEnabled("Object Name",false); - childSetEnabled("Object Description",false); + childSetEnabled("Object Name", FALSE); + childSetEnabled("Object Description", FALSE); } S32 total_sale_price = 0; @@ -387,10 +388,10 @@ void LLSidepanelTaskInfo::refresh() BOOL is_sale_price_mixed = FALSE; U32 num_for_sale = FALSE; LLSelectMgr::getInstance()->selectGetAggregateSaleInfo(num_for_sale, - is_for_sale_mixed, - is_sale_price_mixed, - total_sale_price, - individual_sale_price); + is_for_sale_mixed, + is_sale_price_mixed, + total_sale_price, + individual_sale_price); const BOOL self_owned = (gAgent.getID() == mOwnerID); const BOOL group_owned = LLSelectMgr::getInstance()->selectIsGroupOwned() ; @@ -398,35 +399,35 @@ void LLSidepanelTaskInfo::refresh() const BOOL can_transfer = LLSelectMgr::getInstance()->selectGetRootsTransfer(); const BOOL can_copy = LLSelectMgr::getInstance()->selectGetRootsCopy(); - if(!owners_identical) + if (!owners_identical) { - childSetEnabled("Cost",false); - childSetText("Edit Cost",LLStringUtil::null); - childSetEnabled("Edit Cost",false); + childSetEnabled("Cost", FALSE); + childSetText("Edit Cost", LLStringUtil::null); + childSetEnabled("Edit Cost", FALSE); } // You own these objects. - else if(self_owned || (group_owned && gAgent.hasPowerInGroup(group_id,GP_OBJECT_SET_SALE))) + else if (self_owned || (group_owned && gAgent.hasPowerInGroup(group_id,GP_OBJECT_SET_SALE))) { // If there are multiple items for sale then set text to PRICE PER UNIT. if (num_for_sale > 1) { - childSetText("Cost",getString("Cost Per Unit")); + childSetText("Cost", getString("Cost Per Unit")); } else { - childSetText("Cost",getString("Cost Default")); + childSetText("Cost", getString("Cost Default")); } LLSpinCtrl *edit_price = getChild<LLSpinCtrl>("Edit Cost"); - if(!edit_price->hasFocus()) + if (!edit_price->hasFocus()) { // If the sale price is mixed then set the cost to MIXED, otherwise // set to the actual cost. - if (num_for_sale > 0 && is_for_sale_mixed) + if ((num_for_sale > 0) && is_for_sale_mixed) { edit_price->setTentative(TRUE); } - else if (num_for_sale > 0 && is_sale_price_mixed) + else if ((num_for_sale > 0) && is_sale_price_mixed) { edit_price->setTentative(TRUE); } @@ -437,303 +438,279 @@ void LLSidepanelTaskInfo::refresh() } // The edit fields are only enabled if you can sell this object // and the sale price is not mixed. - bool enable_edit = (num_for_sale && can_transfer) ? !is_for_sale_mixed : false; - childSetEnabled("Cost",enable_edit); - childSetEnabled("Edit Cost",enable_edit); + BOOL enable_edit = (num_for_sale && can_transfer) ? !is_for_sale_mixed : FALSE; + childSetEnabled("Cost", enable_edit); + childSetEnabled("Edit Cost", enable_edit); } // Someone, not you, owns these objects. - else if(!public_owned) + else if (!public_owned) { - childSetEnabled("Cost",false); - childSetEnabled("Edit Cost",false); + childSetEnabled("Cost", FALSE); + childSetEnabled("Edit Cost", FALSE); // Don't show a price if none of the items are for sale. if (num_for_sale) - childSetText("Edit Cost",llformat("%d",total_sale_price)); + childSetText("Edit Cost", llformat("%d",total_sale_price)); else - childSetText("Edit Cost",LLStringUtil::null); + childSetText("Edit Cost", LLStringUtil::null); // If multiple items are for sale, set text to TOTAL PRICE. if (num_for_sale > 1) - childSetText("Cost",getString("Cost Total")); + childSetText("Cost", getString("Cost Total")); else - childSetText("Cost",getString("Cost Default")); + childSetText("Cost", getString("Cost Default")); } // This is a public object. else { - childSetEnabled("Cost",false); - childSetText("Cost",getString("Cost Default")); + childSetEnabled("Cost", FALSE); + childSetText("Cost", getString("Cost Default")); - childSetText("Edit Cost",LLStringUtil::null); - childSetEnabled("Edit Cost",false); + childSetText("Edit Cost", LLStringUtil::null); + childSetEnabled("Edit Cost", FALSE); } // Enable and disable the permissions checkboxes // based on who owns the object. // TODO: Creator permissions - BOOL valid_base_perms = FALSE; - BOOL valid_owner_perms = FALSE; - BOOL valid_group_perms = FALSE; - BOOL valid_everyone_perms = FALSE; - BOOL valid_next_perms = FALSE; - - U32 base_mask_on; - U32 base_mask_off; - U32 owner_mask_on; - U32 owner_mask_off; - U32 group_mask_on; - U32 group_mask_off; - U32 everyone_mask_on; - U32 everyone_mask_off; - U32 next_owner_mask_on = 0; - U32 next_owner_mask_off = 0; - - valid_base_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_BASE, - &base_mask_on, - &base_mask_off); - - valid_owner_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_OWNER, - &owner_mask_on, - &owner_mask_off); - - valid_group_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_GROUP, - &group_mask_on, - &group_mask_off); + U32 base_mask_on = 0; + U32 base_mask_off = 0; + U32 owner_mask_off = 0; + U32 owner_mask_on = 0; + U32 group_mask_on = 0; + U32 group_mask_off = 0; + U32 everyone_mask_on = 0; + U32 everyone_mask_off = 0; + U32 next_owner_mask_on = 0; + U32 next_owner_mask_off = 0; + + BOOL valid_base_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_BASE, + &base_mask_on, + &base_mask_off); + //BOOL valid_owner_perms =// + LLSelectMgr::getInstance()->selectGetPerm(PERM_OWNER, + &owner_mask_on, + &owner_mask_off); + BOOL valid_group_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_GROUP, + &group_mask_on, + &group_mask_off); - valid_everyone_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_EVERYONE, - &everyone_mask_on, - &everyone_mask_off); + BOOL valid_everyone_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_EVERYONE, + &everyone_mask_on, + &everyone_mask_off); - valid_next_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_NEXT_OWNER, - &next_owner_mask_on, - &next_owner_mask_off); + BOOL valid_next_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_NEXT_OWNER, + &next_owner_mask_on, + &next_owner_mask_off); - if( gSavedSettings.getBOOL("DebugPermissions") ) + if (gSavedSettings.getBOOL("DebugPermissions") ) { - std::string perm_string; if (valid_base_perms) { - perm_string = "B: "; - perm_string += mask_to_string(base_mask_on); - childSetText("B:",perm_string); - childSetVisible("B:",true); + childSetText("B:", "B: " + mask_to_string(base_mask_on)); + childSetVisible("B:", TRUE); - perm_string = "O: "; - perm_string += mask_to_string(owner_mask_on); - childSetText("O:",perm_string); - childSetVisible("O:",true); + childSetText("O:", "O: " + mask_to_string(owner_mask_on)); + childSetVisible("O:", TRUE); - perm_string = "G: "; - perm_string += mask_to_string(group_mask_on); - childSetText("G:",perm_string); - childSetVisible("G:",true); + childSetText("G:", "G: " + mask_to_string(group_mask_on)); + childSetVisible("G:", TRUE); - perm_string = "E: "; - perm_string += mask_to_string(everyone_mask_on); - childSetText("E:",perm_string); - childSetVisible("E:",true); + childSetText("E:", "E: " + mask_to_string(everyone_mask_on)); + childSetVisible("E:", TRUE); - perm_string = "N: "; - perm_string += mask_to_string(next_owner_mask_on); - childSetText("N:",perm_string); - childSetVisible("N:",true); + childSetText("N:", "N: " + mask_to_string(next_owner_mask_on)); + childSetVisible("N:", TRUE); } - perm_string = "F: "; + U32 flag_mask = 0x0; - if (objectp->permMove()) - flag_mask |= PERM_MOVE; - if (objectp->permModify()) - flag_mask |= PERM_MODIFY; - if (objectp->permCopy()) - flag_mask |= PERM_COPY; - if (objectp->permTransfer()) - flag_mask |= PERM_TRANSFER; - perm_string += mask_to_string(flag_mask); - childSetText("F:",perm_string); - childSetVisible("F:",true); + if (objectp->permMove()) flag_mask |= PERM_MOVE; + if (objectp->permModify()) flag_mask |= PERM_MODIFY; + if (objectp->permCopy()) flag_mask |= PERM_COPY; + if (objectp->permTransfer()) flag_mask |= PERM_TRANSFER; + + childSetText("F:", "F:" + mask_to_string(flag_mask)); + childSetVisible("F:", TRUE); } else { - childSetVisible("B:",false); - childSetVisible("O:",false); - childSetVisible("G:",false); - childSetVisible("E:",false); - childSetVisible("N:",false); - childSetVisible("F:",false); + childSetVisible("B:", FALSE); + childSetVisible("O:", FALSE); + childSetVisible("G:", FALSE); + childSetVisible("E:", FALSE); + childSetVisible("N:", FALSE); + childSetVisible("F:", FALSE); } - bool has_change_perm_ability = false; - bool has_change_sale_ability = false; + BOOL has_change_perm_ability = FALSE; + BOOL has_change_sale_ability = FALSE; - if(valid_base_perms - && (self_owned - || (group_owned && gAgent.hasPowerInGroup(group_id, GP_OBJECT_MANIPULATE)))) + if (valid_base_perms && + (self_owned || (group_owned && gAgent.hasPowerInGroup(group_id, GP_OBJECT_MANIPULATE)))) { - has_change_perm_ability = true; + has_change_perm_ability = TRUE; } - if(valid_base_perms - && (self_owned - || (group_owned && gAgent.hasPowerInGroup(group_id, GP_OBJECT_SET_SALE)))) + if (valid_base_perms && + (self_owned || (group_owned && gAgent.hasPowerInGroup(group_id, GP_OBJECT_SET_SALE)))) { - has_change_sale_ability = true; + has_change_sale_ability = TRUE; } if (!has_change_perm_ability && !has_change_sale_ability && !root_selected) { // ...must select root to choose permissions - childSetValue("perm_modify", getString("text modify warning")); + childSetValue("perm_modify", getString("text modify warning")); } if (has_change_perm_ability) { - childSetEnabled("checkbox share with group",true); - childSetEnabled("checkbox allow everyone move",owner_mask_on & PERM_MOVE); - childSetEnabled("checkbox allow everyone copy",owner_mask_on & PERM_COPY && owner_mask_on & PERM_TRANSFER); + childSetEnabled("checkbox share with group", TRUE); + childSetEnabled("checkbox allow everyone move", owner_mask_on & PERM_MOVE); + childSetEnabled("checkbox allow everyone copy", owner_mask_on & PERM_COPY && owner_mask_on & PERM_TRANSFER); } else { - childSetEnabled("checkbox share with group", FALSE); - childSetEnabled("checkbox allow everyone move", FALSE); - childSetEnabled("checkbox allow everyone copy", FALSE); + childSetEnabled("checkbox share with group", FALSE); + childSetEnabled("checkbox allow everyone move", FALSE); + childSetEnabled("checkbox allow everyone copy", FALSE); } if (has_change_sale_ability && (owner_mask_on & PERM_TRANSFER)) { - childSetEnabled("checkbox for sale", can_transfer || (!can_transfer && num_for_sale)); + childSetEnabled("checkbox for sale", can_transfer || (!can_transfer && num_for_sale)); // Set the checkbox to tentative if the prices of each object selected // are not the same. - childSetTentative("checkbox for sale", is_for_sale_mixed); - childSetEnabled("sale type",num_for_sale && can_transfer && !is_sale_price_mixed); + childSetTentative("checkbox for sale", is_for_sale_mixed); + childSetEnabled("sale type", num_for_sale && can_transfer && !is_sale_price_mixed); - childSetEnabled("Next owner can:", TRUE); - childSetEnabled("checkbox next owner can modify",base_mask_on & PERM_MODIFY); - childSetEnabled("checkbox next owner can copy",base_mask_on & PERM_COPY); - childSetEnabled("checkbox next owner can transfer",next_owner_mask_on & PERM_COPY); + childSetEnabled("Next owner can:", TRUE); + childSetEnabled("checkbox next owner can modify", base_mask_on & PERM_MODIFY); + childSetEnabled("checkbox next owner can copy", base_mask_on & PERM_COPY); + childSetEnabled("checkbox next owner can transfer", next_owner_mask_on & PERM_COPY); } else { - childSetEnabled("checkbox for sale",FALSE); - childSetEnabled("sale type",FALSE); + childSetEnabled("checkbox for sale", FALSE); + childSetEnabled("sale type", FALSE); - childSetEnabled("Next owner can:",FALSE); - childSetEnabled("checkbox next owner can modify",FALSE); - childSetEnabled("checkbox next owner can copy",FALSE); - childSetEnabled("checkbox next owner can transfer",FALSE); + childSetEnabled("Next owner can:", FALSE); + childSetEnabled("checkbox next owner can modify", FALSE); + childSetEnabled("checkbox next owner can copy", FALSE); + childSetEnabled("checkbox next owner can transfer", FALSE); } - if(valid_group_perms) + if (valid_group_perms) { - if((group_mask_on & PERM_COPY) && (group_mask_on & PERM_MODIFY) && (group_mask_on & PERM_MOVE)) + if ((group_mask_on & PERM_COPY) && (group_mask_on & PERM_MODIFY) && (group_mask_on & PERM_MOVE)) { - childSetValue("checkbox share with group",TRUE); - childSetTentative("checkbox share with group",FALSE); - childSetEnabled("button deed",gAgent.hasPowerInGroup(group_id, GP_OBJECT_DEED) && (owner_mask_on & PERM_TRANSFER) && !group_owned && can_transfer); + childSetValue("checkbox share with group", TRUE); + childSetTentative("checkbox share with group", FALSE); + childSetEnabled("button deed", gAgent.hasPowerInGroup(group_id, GP_OBJECT_DEED) && (owner_mask_on & PERM_TRANSFER) && !group_owned && can_transfer); } - else if((group_mask_off & PERM_COPY) && (group_mask_off & PERM_MODIFY) && (group_mask_off & PERM_MOVE)) + else if ((group_mask_off & PERM_COPY) && (group_mask_off & PERM_MODIFY) && (group_mask_off & PERM_MOVE)) { - childSetValue("checkbox share with group",FALSE); - childSetTentative("checkbox share with group",false); - childSetEnabled("button deed",false); + childSetValue("checkbox share with group", FALSE); + childSetTentative("checkbox share with group", FALSE); + childSetEnabled("button deed", FALSE); } else { - childSetValue("checkbox share with group",TRUE); - childSetTentative("checkbox share with group",true); - childSetEnabled("button deed",gAgent.hasPowerInGroup(group_id, GP_OBJECT_DEED) && (group_mask_on & PERM_MOVE) && (owner_mask_on & PERM_TRANSFER) && !group_owned && can_transfer); + childSetValue("checkbox share with group", TRUE); + childSetTentative("checkbox share with group", TRUE); + childSetEnabled("button deed", gAgent.hasPowerInGroup(group_id, GP_OBJECT_DEED) && (group_mask_on & PERM_MOVE) && (owner_mask_on & PERM_TRANSFER) && !group_owned && can_transfer); } } - if(valid_everyone_perms) + if (valid_everyone_perms) { // Move - if(everyone_mask_on & PERM_MOVE) + if (everyone_mask_on & PERM_MOVE) { - childSetValue("checkbox allow everyone move",TRUE); - childSetTentative("checkbox allow everyone move",false); + childSetValue("checkbox allow everyone move", TRUE); + childSetTentative("checkbox allow everyone move", FALSE); } - else if(everyone_mask_off & PERM_MOVE) + else if (everyone_mask_off & PERM_MOVE) { - childSetValue("checkbox allow everyone move",FALSE); - childSetTentative("checkbox allow everyone move",false); + childSetValue("checkbox allow everyone move", FALSE); + childSetTentative("checkbox allow everyone move", FALSE); } else { - childSetValue("checkbox allow everyone move",TRUE); - childSetTentative("checkbox allow everyone move",true); + childSetValue("checkbox allow everyone move", TRUE); + childSetTentative("checkbox allow everyone move", TRUE); } // Copy == everyone can't copy - if(everyone_mask_on & PERM_COPY) + if (everyone_mask_on & PERM_COPY) { - childSetValue("checkbox allow everyone copy",TRUE); - childSetTentative("checkbox allow everyone copy",!can_copy || !can_transfer); + childSetValue("checkbox allow everyone copy", TRUE); + childSetTentative("checkbox allow everyone copy", !can_copy || !can_transfer); } - else if(everyone_mask_off & PERM_COPY) + else if (everyone_mask_off & PERM_COPY) { - childSetValue("checkbox allow everyone copy",FALSE); - childSetTentative("checkbox allow everyone copy",false); + childSetValue("checkbox allow everyone copy", FALSE); + childSetTentative("checkbox allow everyone copy", FALSE); } else { - childSetValue("checkbox allow everyone copy",TRUE); - childSetTentative("checkbox allow everyone copy",true); + childSetValue("checkbox allow everyone copy", TRUE); + childSetTentative("checkbox allow everyone copy", TRUE); } } - if(valid_next_perms) + if (valid_next_perms) { // Modify == next owner canot modify - if(next_owner_mask_on & PERM_MODIFY) + if (next_owner_mask_on & PERM_MODIFY) { - childSetValue("checkbox next owner can modify",TRUE); - childSetTentative("checkbox next owner can modify",false); + childSetValue("checkbox next owner can modify", TRUE); + childSetTentative("checkbox next owner can modify", FALSE); } - else if(next_owner_mask_off & PERM_MODIFY) + else if (next_owner_mask_off & PERM_MODIFY) { - childSetValue("checkbox next owner can modify",FALSE); - childSetTentative("checkbox next owner can modify",false); + childSetValue("checkbox next owner can modify", FALSE); + childSetTentative("checkbox next owner can modify", FALSE); } else { - childSetValue("checkbox next owner can modify",TRUE); - childSetTentative("checkbox next owner can modify",true); + childSetValue("checkbox next owner can modify", TRUE); + childSetTentative("checkbox next owner can modify", TRUE); } // Copy == next owner cannot copy - if(next_owner_mask_on & PERM_COPY) + if (next_owner_mask_on & PERM_COPY) { - childSetValue("checkbox next owner can copy",TRUE); - childSetTentative("checkbox next owner can copy",!can_copy); + childSetValue("checkbox next owner can copy", TRUE); + childSetTentative("checkbox next owner can copy", !can_copy); } - else if(next_owner_mask_off & PERM_COPY) + else if (next_owner_mask_off & PERM_COPY) { - childSetValue("checkbox next owner can copy",FALSE); - childSetTentative("checkbox next owner can copy",FALSE); + childSetValue("checkbox next owner can copy", FALSE); + childSetTentative("checkbox next owner can copy", FALSE); } else { - childSetValue("checkbox next owner can copy",TRUE); - childSetTentative("checkbox next owner can copy",TRUE); + childSetValue("checkbox next owner can copy", TRUE); + childSetTentative("checkbox next owner can copy", TRUE); } // Transfer == next owner cannot transfer - if(next_owner_mask_on & PERM_TRANSFER) + if (next_owner_mask_on & PERM_TRANSFER) { - childSetValue("checkbox next owner can transfer",TRUE); - childSetTentative("checkbox next owner can transfer",!can_transfer); + childSetValue("checkbox next owner can transfer", TRUE); + childSetTentative("checkbox next owner can transfer", !can_transfer); } - else if(next_owner_mask_off & PERM_TRANSFER) + else if (next_owner_mask_off & PERM_TRANSFER) { - childSetValue("checkbox next owner can transfer",FALSE); - childSetTentative("checkbox next owner can transfer",FALSE); + childSetValue("checkbox next owner can transfer", FALSE); + childSetTentative("checkbox next owner can transfer", FALSE); } else { - childSetValue("checkbox next owner can transfer",TRUE); - childSetTentative("checkbox next owner can transfer",TRUE); + childSetValue("checkbox next owner can transfer", TRUE); + childSetTentative("checkbox next owner can transfer", TRUE); } } @@ -745,72 +722,76 @@ void LLSidepanelTaskInfo::refresh() LLComboBox* combo_sale_type = getChild<LLComboBox>("sale type"); if (valid_sale_info) { - combo_sale_type->setValue(sale_type == LLSaleInfo::FS_NOT ? LLSaleInfo::FS_COPY : sale_type); - combo_sale_type->setTentative(FALSE); // unfortunately this doesn't do anything at the moment. + combo_sale_type->setValue( sale_type == LLSaleInfo::FS_NOT ? LLSaleInfo::FS_COPY : sale_type); + combo_sale_type->setTentative( FALSE); // unfortunately this doesn't do anything at the moment. } else { // default option is sell copy, determined to be safest - combo_sale_type->setValue(LLSaleInfo::FS_COPY); - combo_sale_type->setTentative(TRUE); // unfortunately this doesn't do anything at the moment. + combo_sale_type->setValue( LLSaleInfo::FS_COPY); + combo_sale_type->setTentative( TRUE); // unfortunately this doesn't do anything at the moment. } - childSetValue("checkbox for sale", num_for_sale != 0); + childSetValue("checkbox for sale", (num_for_sale != 0)); // HACK: There are some old objects in world that are set for sale, // but are no-transfer. We need to let users turn for-sale off, but only // if for-sale is set. bool cannot_actually_sell = !can_transfer || (!can_copy && sale_type == LLSaleInfo::FS_COPY); - if (num_for_sale && has_change_sale_ability && cannot_actually_sell) + if (cannot_actually_sell) { - childSetEnabled("checkbox for sale", true); + if (num_for_sale && has_change_sale_ability) + { + childSetEnabled("checkbox for sale", true); + } } - + // Check search status of objects - BOOL all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ); + const BOOL all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ); bool include_in_search; - bool all_include_in_search = LLSelectMgr::getInstance()->selectionGetIncludeInSearch(&include_in_search); - childSetEnabled("search_check", has_change_sale_ability && all_volume); - childSetValue("search_check", include_in_search); - childSetTentative("search_check", ! all_include_in_search); + const BOOL all_include_in_search = LLSelectMgr::getInstance()->selectionGetIncludeInSearch(&include_in_search); + childSetEnabled("search_check", has_change_sale_ability && all_volume); + childSetValue("search_check", include_in_search); + childSetTentative("search_check", !all_include_in_search); // Click action (touch, sit, buy) U8 click_action = 0; if (LLSelectMgr::getInstance()->selectionGetClickAction(&click_action)) { LLComboBox* ComboClickAction = getChild<LLComboBox>("clickaction"); - if(ComboClickAction) + if (ComboClickAction) { ComboClickAction->setCurrentByIndex((S32)click_action); } } - childSetEnabled("label click action",is_perm_modify && all_volume); - childSetEnabled("clickaction",is_perm_modify && all_volume); + childSetEnabled("label click action", is_perm_modify && all_volume); + childSetEnabled("clickaction", is_perm_modify && all_volume); if (!getIsEditing()) { - const std::string no_item_names[]={ - "Object Name", - "Object Description", - "button set group", - "checkbox share with group", - "button deed", - "checkbox allow everyone move", - "checkbox allow everyone copy", - "checkbox for sale", - "sale type", - "Edit Cost", - "checkbox next owner can modify", - "checkbox next owner can copy", - "checkbox next owner can transfer", - "clickaction", - "search_check", - "perm_modify", - "Group Name", - }; - for(size_t t=0; t<LL_ARRAY_SIZE(no_item_names); ++t) + const std::string no_item_names[] = + { + "Object Name", + "Object Description", + "button set group", + "checkbox share with group", + "button deed", + "checkbox allow everyone move", + "checkbox allow everyone copy", + "checkbox for sale", + "sale type", + "Edit Cost", + "checkbox next owner can modify", + "checkbox next owner can copy", + "checkbox next owner can transfer", + "clickaction", + "search_check", + "perm_modify", + "Group Name", + }; + for (size_t t=0; t<LL_ARRAY_SIZE(no_item_names); ++t) { - childSetEnabled(no_item_names[t],false); + childSetEnabled(no_item_names[t], FALSE); } } updateVerbs(); @@ -838,13 +819,12 @@ void LLSidepanelTaskInfo::onClickGroup() BOOL owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, name); LLFloater* parent_floater = gFloaterView->getParentFloater(this); - if(owners_identical && (owner_id == gAgent.getID())) + if (owners_identical && (owner_id == gAgent.getID())) { - LLFloaterGroupPicker* fg = LLFloaterReg::showTypedInstance<LLFloaterGroupPicker>("group_picker", LLSD(gAgent.getID())); + LLFloaterGroupPicker* fg = LLFloaterReg::showTypedInstance<LLFloaterGroupPicker>("group_picker", LLSD(gAgent.getID())); if (fg) { fg->setSelectGroupCallback( boost::bind(&LLSidepanelTaskInfo::cbGroupID, this, _1) ); - if (parent_floater) { LLRect new_rect = gFloaterView->findNeighboringPosition(parent_floater, fg); @@ -857,7 +837,7 @@ void LLSidepanelTaskInfo::onClickGroup() void LLSidepanelTaskInfo::cbGroupID(LLUUID group_id) { - if(mLabelGroupName) + if (mLabelGroupName) { mLabelGroupName->setNameID(group_id, TRUE); } @@ -866,23 +846,23 @@ void LLSidepanelTaskInfo::cbGroupID(LLUUID group_id) static bool callback_deed_to_group(const LLSD& notification, const LLSD& response) { - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - if (0 == option) + const S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if (option == 0) { LLUUID group_id; - BOOL groups_identical = LLSelectMgr::getInstance()->selectGetGroup(group_id); - if(group_id.notNull() && groups_identical && (gAgent.hasPowerInGroup(group_id, GP_OBJECT_DEED))) + const BOOL groups_identical = LLSelectMgr::getInstance()->selectGetGroup(group_id); + if (group_id.notNull() && groups_identical && (gAgent.hasPowerInGroup(group_id, GP_OBJECT_DEED))) { LLSelectMgr::getInstance()->sendOwner(LLUUID::null, group_id, FALSE); // LLViewerStats::getInstance()->incStat(LLViewerStats::ST_RELEASE_COUNT); } } - return false; + return FALSE; } void LLSidepanelTaskInfo::onClickDeedToGroup() { - LLNotificationsUtil::add( "DeedObjectToGroup", LLSD(), LLSD(), callback_deed_to_group); + LLNotificationsUtil::add("DeedObjectToGroup", LLSD(), LLSD(), callback_deed_to_group); } ///---------------------------------------------------------------------------- @@ -891,8 +871,8 @@ void LLSidepanelTaskInfo::onClickDeedToGroup() void LLSidepanelTaskInfo::onCommitPerm(LLCheckBoxCtrl *ctrl, U8 field, U32 perm) { - LLViewerObject* object = mObjectSelection->getFirstRootObject(); - if(!object) return; + const LLViewerObject* object = mObjectSelection->getFirstRootObject(); + if (!object) return; BOOL new_state = ctrl->get(); LLSelectMgr::getInstance()->selectionSetObjectPermissions(field, new_state, perm); @@ -960,28 +940,24 @@ void LLSidepanelTaskInfo::onCommitSaleType() void LLSidepanelTaskInfo::setAllSaleInfo() { llinfos << "LLSidepanelTaskInfo::setAllSaleInfo()" << llendl; - LLSaleInfo::EForSale sale_type = LLSaleInfo::FS_NOT; + LLSaleInfo::EForSale sale_type = LLSaleInfo::FS_NOT; LLCheckBoxCtrl *checkPurchase = getChild<LLCheckBoxCtrl>("checkbox for sale"); - // Set the sale type if the object(s) are for sale. - if(checkPurchase && checkPurchase->get()) + if (checkPurchase && checkPurchase->get()) { sale_type = static_cast<LLSaleInfo::EForSale>(getChild<LLComboBox>("sale type")->getValue().asInteger()); } S32 price = -1; - - LLSpinCtrl *edit_price = getChild<LLSpinCtrl>("Edit Cost"); + const LLSpinCtrl *edit_price = getChild<LLSpinCtrl>("Edit Cost"); price = (edit_price->getTentative()) ? DEFAULT_PRICE : edit_price->getValue().asInteger(); - // If somehow an invalid price, turn the sale off. if (price < 0) sale_type = LLSaleInfo::FS_NOT; - LLSaleInfo sale_info(sale_type, price); LLSelectMgr::getInstance()->selectionSetObjectSaleInfo(sale_info); - + // If turned off for-sale, make sure click-action buy is turned // off as well if (sale_type == LLSaleInfo::FS_NOT) @@ -995,14 +971,29 @@ void LLSidepanelTaskInfo::setAllSaleInfo() } } +// static +void LLSidepanelTaskInfo::onClickForSale(LLUICtrl* ctrl, void* data) +{ + LLSidepanelTaskInfo* self = (LLSidepanelTaskInfo*)data; + self->updateUIFromSaleInfo(); +} + +void LLSidepanelTaskInfo::updateUIFromSaleInfo() +{ + /* + TODO: Update sale button enable/disable state and default + sale button settings when this sale button is enabled/disabled. + */ +} + struct LLSelectionPayable : public LLSelectedObjectFunctor { virtual bool apply(LLViewerObject* obj) { // can pay if you or your parent has money() event in script LLViewerObject* parent = (LLViewerObject*)obj->getParent(); - return (obj->flagTakesMoney() - || (parent && parent->flagTakesMoney())); + return (obj->flagTakesMoney() || + (parent && parent->flagTakesMoney())); } }; @@ -1029,7 +1020,7 @@ void LLSidepanelTaskInfo::onCommitClickAction(U8 click_action) { // Verify object has script with money() handler LLSelectionPayable payable; - bool can_pay = mObjectSelection->applyToObjects(&payable); + const BOOL can_pay = mObjectSelection->applyToObjects(&payable); if (!can_pay) { // Warn, but do it anyway. @@ -1104,6 +1095,13 @@ LLSidepanelTaskInfo* LLSidepanelTaskInfo::getActivePanel() return sActivePanel; } +LLViewerObject* LLSidepanelTaskInfo::getObject() +{ + if (!mObject->isDead()) + return mObject; + return NULL; +} + LLViewerObject* LLSidepanelTaskInfo::getFirstSelectedObject() { LLSelectNode *node = mObjectSelection->getFirstRootNode(); diff --git a/indra/newview/llsidepaneltaskinfo.h b/indra/newview/llsidepaneltaskinfo.h index b6dd4dfb2c..7c6d9983ae 100644 --- a/indra/newview/llsidepaneltaskinfo.h +++ b/indra/newview/llsidepaneltaskinfo.h @@ -91,6 +91,11 @@ protected: void setAllSaleInfo(); + static void onClickForSale(LLUICtrl* ctrl, void *data); + void updateUIFromSaleInfo(); + + void disableAll(); + private: LLNameBox* mLabelGroupName; // group name @@ -107,6 +112,10 @@ private: LLButton* mPayBtn; LLButton* mBuyBtn; +protected: + LLViewerObject* getObject(); +private: + LLViewerObject* mObject; LLObjectSelectionHandle mObjectSelection; static LLSidepanelTaskInfo* sActivePanel; }; diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index be0c92a76d..d8d1760c38 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -193,6 +193,7 @@ #include "lllogin.h" #include "llevents.h" +#include "llstartuplistener.h" #if LL_WINDOWS #include "llwindebug.h" @@ -241,7 +242,8 @@ static std::string gFirstSimSeedCap; static LLVector3 gAgentStartLookAt(1.0f, 0.f, 0.f); static std::string gAgentStartLocation = "safe"; -static LLEventStream sStartupStateWatcher("StartupState"); +boost::scoped_ptr<LLEventPump> LLStartUp::sStateWatcher(new LLEventStream("StartupState")); +boost::scoped_ptr<LLStartupListener> LLStartUp::sListener(new LLStartupListener()); // // local function declaration @@ -367,8 +369,6 @@ bool idle_startup() LLMemType mt1(LLMemType::MTYPE_STARTUP); const F32 PRECACHING_DELAY = gSavedSettings.getF32("PrecachingDelay"); - const F32 TIMEOUT_SECONDS = 5.f; - const S32 MAX_TIMEOUT_COUNT = 3; static LLTimer timeout; static S32 timeout_count = 0; @@ -1436,9 +1436,9 @@ bool idle_startup() msg->addUUIDFast(_PREHASH_ID, gAgent.getID()); msg->sendReliable( gFirstSim, - MAX_TIMEOUT_COUNT, + gSavedSettings.getS32("UseCircuitCodeMaxRetries"), FALSE, - TIMEOUT_SECONDS, + gSavedSettings.getF32("UseCircuitCodeTimeout"), use_circuit_callback, NULL); @@ -2725,15 +2725,23 @@ void LLStartUp::setStartupState( EStartupState state ) getStartupStateString() << " to " << startupStateToString(state) << LL_ENDL; gStartupState = state; + postStartupState(); +} + +void LLStartUp::postStartupState() +{ LLSD stateInfo; stateInfo["str"] = getStartupStateString(); - stateInfo["enum"] = state; - sStartupStateWatcher.post(stateInfo); + stateInfo["enum"] = gStartupState; + sStateWatcher->post(stateInfo); } void reset_login() { + gAgent.cleanup(); + LLWorld::getInstance()->destroyClass(); + LLStartUp::setStartupState( STATE_LOGIN_SHOW ); if ( gViewerWindow ) diff --git a/indra/newview/llstartup.h b/indra/newview/llstartup.h index 7f869d014f..ab11b42e74 100644 --- a/indra/newview/llstartup.h +++ b/indra/newview/llstartup.h @@ -33,7 +33,11 @@ #ifndef LL_LLSTARTUP_H #define LL_LLSTARTUP_H +#include <boost/scoped_ptr.hpp> + class LLViewerTexture ; +class LLEventPump; +class LLStartupListener; // functions bool idle_startup(); @@ -113,9 +117,13 @@ public: // *HACK: On startup, if we were passed a secondlife://app/do/foo // command URL, store it for later processing. + static void postStartupState(); + private: static std::string startupStateToString(EStartupState state); static EStartupState gStartupState; // Do not set directly, use LLStartup::setStartupState + static boost::scoped_ptr<LLEventPump> sStateWatcher; + static boost::scoped_ptr<LLStartupListener> sListener; }; diff --git a/indra/newview/llstartuplistener.cpp b/indra/newview/llstartuplistener.cpp new file mode 100644 index 0000000000..5a76a297c7 --- /dev/null +++ b/indra/newview/llstartuplistener.cpp @@ -0,0 +1,34 @@ +/** + * @file llstartuplistener.cpp + * @author Nat Goodspeed + * @date 2009-12-08 + * @brief Implementation for llstartuplistener. + * + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * Copyright (c) 2009, Linden Research, Inc. + * $/LicenseInfo$ + */ + +// Precompiled header +#include "llviewerprecompiledheaders.h" +// associated header +#include "llstartuplistener.h" +// STL headers +// std headers +// external library headers +// other Linden headers +#include "llstartup.h" + + +LLStartupListener::LLStartupListener(/* LLStartUp* instance */): + LLEventAPI("LLStartUp", "Access e.g. LLStartup::postStartupState()") /* , + mStartup(instance) */ +{ + add("postStartupState", "Refresh \"StartupState\" listeners with current startup state", + &LLStartupListener::postStartupState); +} + +void LLStartupListener::postStartupState(const LLSD&) const +{ + LLStartUp::postStartupState(); +} diff --git a/indra/newview/llstartuplistener.h b/indra/newview/llstartuplistener.h new file mode 100644 index 0000000000..a2a4d3a08e --- /dev/null +++ b/indra/newview/llstartuplistener.h @@ -0,0 +1,30 @@ +/** + * @file llstartuplistener.h + * @author Nat Goodspeed + * @date 2009-12-07 + * @brief Event API to provide access to LLStartUp + * + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * Copyright (c) 2009, Linden Research, Inc. + * $/LicenseInfo$ + */ + +#if ! defined(LL_LLSTARTUPLISTENER_H) +#define LL_LLSTARTUPLISTENER_H + +#include "lleventapi.h" +class LLStartUp; +class LLSD; + +class LLStartupListener: public LLEventAPI +{ +public: + LLStartupListener(/* LLStartUp* instance */); // all static members! + +private: + void postStartupState(const LLSD&) const; + + //LLStartup* mStartup; +}; + +#endif /* ! defined(LL_LLSTARTUPLISTENER_H) */ diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index ef49d7f057..67007629c0 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -1630,6 +1630,16 @@ S32 LLTextureFetch::update(U32 max_time_ms) { sendRequestListToSimulators(); } + + if (!mThreaded) + { + // Update Curl on same thread as mCurlGetRequest was constructed + S32 processed = mCurlGetRequest->process(); + if (processed > 0) + { + lldebugs << "processed: " << processed << " messages." << llendl; + } + } return res; } diff --git a/indra/newview/llviewerfoldertype.cpp b/indra/newview/llviewerfoldertype.cpp index db54a79610..033d35d80a 100644 --- a/indra/newview/llviewerfoldertype.cpp +++ b/indra/newview/llviewerfoldertype.cpp @@ -121,7 +121,7 @@ LLViewerFolderDictionary::LLViewerFolderDictionary() addEntry(LLFolderType::FT_LOST_AND_FOUND, new ViewerFolderEntry("Lost And Found", "inv_folder_lostandfound.tga", TRUE)); addEntry(LLFolderType::FT_ANIMATION, new ViewerFolderEntry("Animations", "inv_folder_animation.tga", FALSE)); addEntry(LLFolderType::FT_GESTURE, new ViewerFolderEntry("Gestures", "inv_folder_gesture.tga", FALSE)); - addEntry(LLFolderType::FT_FAVORITE, new ViewerFolderEntry("Favorite", "inv_folder_plain_closed.tga", FALSE)); + addEntry(LLFolderType::FT_FAVORITE, new ViewerFolderEntry("Favorites", "inv_folder_plain_closed.tga", FALSE)); addEntry(LLFolderType::FT_CURRENT_OUTFIT, new ViewerFolderEntry("Current Outfit", "inv_folder_current_outfit.tga",TRUE)); addEntry(LLFolderType::FT_OUTFIT, new ViewerFolderEntry("New Outfit", "inv_folder_outfit.tga", TRUE)); diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 4482683400..9856cb2b7f 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -1095,72 +1095,22 @@ void menu_create_inventory_item(LLFolderView* folder, LLFolderBridge *bridge, co LLInventoryType::IT_GESTURE, PERM_ALL); } - else if ("shirt" == type_name) - { - const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING); - LLFolderBridge::createWearable(parent_id, WT_SHIRT); - } - else if ("pants" == type_name) - { - const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING); - LLFolderBridge::createWearable(parent_id, WT_PANTS); - } - else if ("shoes" == type_name) - { - const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING); - LLFolderBridge::createWearable(parent_id, WT_SHOES); - } - else if ("socks" == type_name) - { - const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING); - LLFolderBridge::createWearable(parent_id, WT_SOCKS); - } - else if ("jacket" == type_name) - { - const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING); - LLFolderBridge::createWearable(parent_id, WT_JACKET); - } - else if ("skirt" == type_name) - { - const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING); - LLFolderBridge::createWearable(parent_id, WT_SKIRT); - } - else if ("gloves" == type_name) - { - const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING); - LLFolderBridge::createWearable(parent_id, WT_GLOVES); - } - else if ("undershirt" == type_name) - { - const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING); - LLFolderBridge::createWearable(parent_id, WT_UNDERSHIRT); - } - else if ("underpants" == type_name) - { - const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING); - LLFolderBridge::createWearable(parent_id, WT_UNDERPANTS); - } - else if ("shape" == type_name) - { - const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLFolderType::FT_BODYPART); - LLFolderBridge::createWearable(parent_id, WT_SHAPE); - } - else if ("skin" == type_name) - { - const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLFolderType::FT_BODYPART); - LLFolderBridge::createWearable(parent_id, WT_SKIN); - } - else if ("hair" == type_name) - { - const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLFolderType::FT_BODYPART); - LLFolderBridge::createWearable(parent_id, WT_HAIR); - } - else if ("eyes" == type_name) + else { - const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(LLFolderType::FT_BODYPART); - LLFolderBridge::createWearable(parent_id, WT_EYES); + // Use for all clothing and body parts. Adding new wearable types requires updating LLWearableDictionary. + EWearableType wearable_type = LLWearableDictionary::typeNameToType(type_name); + if (wearable_type >= WT_SHAPE && wearable_type < WT_COUNT) + { + LLAssetType::EType asset_type = LLWearableDictionary::getAssetType(wearable_type); + LLFolderType::EType folder_type = LLFolderType::assetTypeToFolderType(asset_type); + const LLUUID parent_id = bridge ? bridge->getUUID() : gInventory.findCategoryUUIDForType(folder_type); + LLFolderBridge::createWearable(parent_id, wearable_type); + } + else + { + llwarns << "Can't create unrecognized type " << type_name << llendl; + } } - folder->setNeedsAutoRename(TRUE); } diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 952de00272..ef8f63484e 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -988,11 +988,10 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_ } else { - std::string plugins_path = gDirUtilp->getLLPluginDir(); - plugins_path += gDirUtilp->getDirDelimiter(); - std::string launcher_name = gDirUtilp->getLLPluginLauncher(); std::string plugin_name = gDirUtilp->getLLPluginFilename(plugin_basename); + std::string user_data_path = gDirUtilp->getOSUserAppDir(); + user_data_path += gDirUtilp->getDirDelimiter(); // See if the plugin executable exists llstat s; @@ -1008,7 +1007,7 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_ { LLPluginClassMedia* media_source = new LLPluginClassMedia(owner); media_source->setSize(default_width, default_height); - if (media_source->init(launcher_name, plugin_name, gSavedSettings.getBOOL("PluginAttachDebuggerToPlugins"))) + if (media_source->init(launcher_name, plugin_name, gSavedSettings.getBOOL("PluginAttachDebuggerToPlugins"), user_data_path)) { return media_source; } diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 431b4d3c0a..78322dda75 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -2698,20 +2698,24 @@ BOOL enable_has_attachments(void*) bool enable_object_mute() { LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); - bool new_value = (object != NULL); - if (new_value) + if (!object) return false; + + LLVOAvatar* avatar = find_avatar_from_object(object); + if (avatar) { - LLVOAvatar* avatar = find_avatar_from_object(object); - if (avatar) - { - // It's an avatar - LLNameValue *lastname = avatar->getNVPair("LastName"); - BOOL is_linden = lastname && !LLStringUtil::compareStrings(lastname->getString(), "Linden"); - BOOL is_self = avatar->isSelf(); - new_value = !is_linden && !is_self; - } + // It's an avatar + LLNameValue *lastname = avatar->getNVPair("LastName"); + bool is_linden = + lastname && !LLStringUtil::compareStrings(lastname->getString(), "Linden"); + bool is_self = avatar->isSelf(); + return !is_linden && !is_self; + } + else + { + // Just a regular object + return LLSelectMgr::getInstance()->getSelection()-> + contains( object, SELECT_ALL_TES ); } - return new_value; } class LLObjectMute : public view_listener_t @@ -7558,12 +7562,11 @@ void initialize_menus() LLUICtrl::EnableCallbackRegistry::Registrar& enable = LLUICtrl::EnableCallbackRegistry::currentRegistrar(); LLUICtrl::CommitCallbackRegistry::Registrar& commit = LLUICtrl::CommitCallbackRegistry::currentRegistrar(); - LLUICtrl::VisibleCallbackRegistry::Registrar& visible = LLUICtrl::VisibleCallbackRegistry::currentRegistrar(); // Generic enable and visible // Don't prepend MenuName.Foo because these can be used in any menu. enable.add("IsGodCustomerService", boost::bind(&is_god_customer_service)); - visible.add("IsGodCustomerService", boost::bind(&is_god_customer_service)); + enable.add("IsGodCustomerService", boost::bind(&is_god_customer_service)); // Agent commit.add("Agent.toggleFlying", boost::bind(&LLAgent::toggleFlying)); @@ -7670,7 +7673,6 @@ void initialize_menus() view_listener_t::addMenu(new LLToolsEnableLink(), "Tools.EnableLink"); view_listener_t::addMenu(new LLToolsEnableUnlink(), "Tools.EnableUnlink"); view_listener_t::addMenu(new LLToolsEnableBuyOrTake(), "Tools.EnableBuyOrTake"); - visible.add("Tools.VisibleTakeCopy", boost::bind(&enable_object_take_copy)); enable.add("Tools.EnableTakeCopy", boost::bind(&enable_object_take_copy)); view_listener_t::addMenu(new LLToolsEnableSaveToInventory(), "Tools.EnableSaveToInventory"); view_listener_t::addMenu(new LLToolsEnableSaveToObjectInventory(), "Tools.EnableSaveToObjectInventory"); @@ -7846,7 +7848,6 @@ void initialize_menus() view_listener_t::addMenu(new LLSelfStandUp(), "Self.StandUp"); view_listener_t::addMenu(new LLSelfRemoveAllAttachments(), "Self.RemoveAllAttachments"); - visible.add("Self.VisibleStandUp", boost::bind(&enable_standup_self)); enable.add("Self.EnableStandUp", boost::bind(&enable_standup_self)); view_listener_t::addMenu(new LLSelfEnableRemoveAllAttachments(), "Self.EnableRemoveAllAttachments"); @@ -7869,59 +7870,42 @@ void initialize_menus() view_listener_t::addMenu(new LLAvatarEnableAddFriend(), "Avatar.EnableAddFriend"); enable.add("Avatar.EnableFreezeEject", boost::bind(&enable_freeze_eject, _2)); - visible.add("Avatar.EnableFreezeEject", boost::bind(&enable_freeze_eject, _2)); + enable.add("Avatar.EnableFreezeEject", boost::bind(&enable_freeze_eject, _2)); // Object pie menu view_listener_t::addMenu(new LLObjectBuild(), "Object.Build"); commit.add("Object.Touch", boost::bind(&handle_object_touch)); commit.add("Object.SitOrStand", boost::bind(&handle_object_sit_or_stand)); - visible.add("Object.EnableSit", boost::bind(&enable_sit_object)); + enable.add("Object.EnableSit", boost::bind(&enable_sit_object)); commit.add("Object.Delete", boost::bind(&handle_object_delete)); view_listener_t::addMenu(new LLObjectAttachToAvatar(), "Object.AttachToAvatar"); view_listener_t::addMenu(new LLObjectReturn(), "Object.Return"); view_listener_t::addMenu(new LLObjectReportAbuse(), "Object.ReportAbuse"); view_listener_t::addMenu(new LLObjectMute(), "Object.Mute"); - visible.add("Object.VisibleTake", boost::bind(&visible_take_object)); - visible.add("Object.VisibleBuy", boost::bind(&visible_buy_object)); + enable.add("Object.VisibleTake", boost::bind(&visible_take_object)); + enable.add("Object.VisibleBuy", boost::bind(&visible_buy_object)); commit.add("Object.Buy", boost::bind(&handle_buy)); commit.add("Object.Edit", boost::bind(&handle_object_edit)); commit.add("Object.Inspect", boost::bind(&handle_object_inspect)); commit.add("Object.Open", boost::bind(&handle_object_open)); - commit.add("Object.Take", boost::bind(&handle_take)); - enable.add("Object.EnableOpen", boost::bind(&enable_object_open)); - visible.add("Object.VisibleOpen", boost::bind(&enable_object_open)); - enable.add("Object.EnableTouch", boost::bind(&enable_object_touch)); - visible.add("Object.VisibleTouch", boost::bind(&enable_object_touch)); - view_listener_t::addMenu(new LLObjectEnableTouch(), "Object.EnableTouch"); view_listener_t::addMenu(new LLObjectEnableSitOrStand(), "Object.EnableSitOrStand"); - enable.add("Object.EnableDelete", boost::bind(&enable_object_delete)); - visible.add("Object.VisibleDelete", boost::bind(&enable_object_delete)); - enable.add("Object.EnableWear", boost::bind(&object_selected_and_point_valid)); - visible.add("Object.VisibleWear", boost::bind(&object_selected_and_point_valid)); view_listener_t::addMenu(new LLObjectEnableReturn(), "Object.EnableReturn"); view_listener_t::addMenu(new LLObjectEnableReportAbuse(), "Object.EnableReportAbuse"); enable.add("Avatar.EnableMute", boost::bind(&enable_object_mute)); enable.add("Object.EnableMute", boost::bind(&enable_object_mute)); - visible.add("Object.VisibleMute", boost::bind(&enable_object_mute)); enable.add("Object.EnableBuy", boost::bind(&enable_buy_object)); - /*view_listener_t::addMenu(new LLObjectVisibleTouch(), "Object.VisibleTouch"); - view_listener_t::addMenu(new LLObjectVisibleCustomTouch(), "Object.VisibleCustomTouch"); - view_listener_t::addMenu(new LLObjectVisibleStandUp(), "Object.VisibleStandUp"); - view_listener_t::addMenu(new LLObjectVisibleSitHere(), "Object.VisibleSitHere"); - view_listener_t::addMenu(new LLObjectVisibleCustomSit(), "Object.VisibleCustomSit");*/ - // Attachment pie menu enable.add("Attachment.Label", boost::bind(&onEnableAttachmentLabel, _1, _2)); view_listener_t::addMenu(new LLAttachmentDrop(), "Attachment.Drop"); @@ -7950,12 +7934,9 @@ void initialize_menus() commit.add("PayObject", boost::bind(&handle_give_money_dialog)); enable.add("EnablePayObject", boost::bind(&enable_pay_object)); - visible.add("VisiblePayObject", boost::bind(&enable_pay_object)); enable.add("EnablePayAvatar", boost::bind(&enable_pay_avatar)); enable.add("EnableEdit", boost::bind(&enable_object_edit)); - visible.add("VisibleBuild", boost::bind(&enable_object_build)); - visible.add("VisibleEdit", boost::bind(&enable_object_edit)); - visible.add("Object.VisibleEdit", boost::bind(&enable_object_edit)); + enable.add("VisibleBuild", boost::bind(&enable_object_build)); view_listener_t::addMenu(new LLFloaterVisible(), "FloaterVisible"); view_listener_t::addMenu(new LLShowSidetrayPanel(), "ShowSidetrayPanel"); diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 7d6401acde..b4c45c23d4 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -1067,19 +1067,6 @@ BOOL LLVOAvatarSelf::detachObject(LLViewerObject *viewer_object) return FALSE; } -void LLVOAvatarSelf::getAllAttachmentsArray(LLDynamicArray<S32>& attachments) -{ - for (LLVOAvatar::attachment_map_t::const_iterator iter = mAttachmentPoints.begin(); - iter != mAttachmentPoints.end(); ++iter) - { - LLViewerJointAttachment* attachment = iter->second; - if ( attachment && (attachment->getNumObjects() > 0)) - { - attachments.push_back(iter->first); - } - } -} - U32 LLVOAvatarSelf::getNumWearables(LLVOAvatarDefines::ETextureIndex i) const { EWearableType type = LLVOAvatarDictionary::getInstance()->getTEWearableType(i); diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h index 6bf4ef5496..c7bd4eaadc 100644 --- a/indra/newview/llvoavatarself.h +++ b/indra/newview/llvoavatarself.h @@ -284,7 +284,6 @@ public: const std::string getAttachedPointName(const LLUUID& inv_item_id) const; /*virtual*/ const LLViewerJointAttachment *attachObject(LLViewerObject *viewer_object); /*virtual*/ BOOL detachObject(LLViewerObject *viewer_object); - void getAllAttachmentsArray(LLDynamicArray<S32>& attachments); //-------------------------------------------------------------------- // HUDs diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 5c6fc2cf21..118d7f8d08 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -118,6 +118,7 @@ LLWorld::LLWorld() : void LLWorld::destroyClass() { + mHoleWaterObjects.clear(); gObjectList.destroy(); for(region_list_t::iterator region_it = mRegionList.begin(); region_it != mRegionList.end(); ) { diff --git a/indra/newview/skins/default/xui/en/floater_preferences.xml b/indra/newview/skins/default/xui/en/floater_preferences.xml index d182cdc6bb..15655a920e 100644 --- a/indra/newview/skins/default/xui/en/floater_preferences.xml +++ b/indra/newview/skins/default/xui/en/floater_preferences.xml @@ -86,7 +86,7 @@ <panel class="panel_preference" filename="panel_preferences_alerts.xml" - label="Alerts" + label="Notifications" layout="topleft" help_topic="preferences_msgs_tab" name="msgs" /> diff --git a/indra/newview/skins/default/xui/en/inspect_avatar.xml b/indra/newview/skins/default/xui/en/inspect_avatar.xml index 8349f594d9..996d0f1b72 100644 --- a/indra/newview/skins/default/xui/en/inspect_avatar.xml +++ b/indra/newview/skins/default/xui/en/inspect_avatar.xml @@ -33,7 +33,7 @@ [SL_PROFILE] </string> <text - follows="all" + follows="top|left" font="SansSerifLarge" height="16" left="8" @@ -44,7 +44,7 @@ value="Grumpity ProductEngine" width="175" /> <text - follows="all" + follows="top|left" height="16" left="8" name="user_subtitle" @@ -76,7 +76,7 @@ value="0.5" width="195" /> <button - follows="all" + follows="top|left" height="16" image_disabled="Audio_Off" image_disabled_selected="AudioMute_Off" @@ -89,7 +89,7 @@ name="mute_btn" width="16" /> <avatar_icon - follows="all" + follows="top|left" height="38" right="-10" bevel_style="in" @@ -102,7 +102,7 @@ llinspectavatar.cpp makes visible the most likely default action --> <button - follows="bottom|left" + follows="top|left" height="20" label="Add Friend" left="8" @@ -110,7 +110,7 @@ name="add_friend_btn" width="90" /> <button - follows="bottom|left" + follows="top|left" height="20" label="IM" left_delta="0" @@ -129,7 +129,8 @@ tab_stop="false" width="80" /> <!-- gear buttons here --> - <menu_button + <menu_button + follows="top|left" height="20" layout="topleft" image_overlay="OptionsMenu_Off" @@ -147,4 +148,33 @@ right="-5" top_delta="0" width="35" /> + <panel + follows="top|left" + top="148" + left="0" + height="60" + width="228" + visible="false" + background_visible="true" + name="moderator_panel" + background_opaque="true" + bg_opaque_color="MouseGray"> + <button + name="disable_voice" + label="Disable Voice" + top="20" + width="95" + height="20" + left="10" + commit_callback.function="InspectAvatar.DisableVoice"/> + <button + name="enable_voice" + label="Enable Voice" + top="20" + width="95" + height="20" + left="10" + visible="false" + commit_callback.function="InspectAvatar.EnableVoice"/> + </panel> </floater> diff --git a/indra/newview/skins/default/xui/en/menu_inspect_object_gear.xml b/indra/newview/skins/default/xui/en/menu_inspect_object_gear.xml index 04a247fd54..22df02cd7e 100644 --- a/indra/newview/skins/default/xui/en/menu_inspect_object_gear.xml +++ b/indra/newview/skins/default/xui/en/menu_inspect_object_gear.xml @@ -13,7 +13,7 @@ <menu_item_call.on_click function="InspectObject.Touch"/> <menu_item_call.on_visible - function="Object.VisibleTouch" /> + function="Object.EnableTouch" /> </menu_item_call> <menu_item_call label="Sit" @@ -31,7 +31,7 @@ <menu_item_call.on_click function="InspectObject.Pay"/> <menu_item_call.on_visible - function="VisiblePayObject" /> + function="EnablePayObject" /> </menu_item_call> <menu_item_call label="Buy" @@ -59,7 +59,7 @@ <menu_item_call.on_click function="InspectObject.TakeFreeCopy"/> <menu_item_call.on_visible - function="Tools.VisibleTakeCopy"/> + function="Tools.EnableTakeCopy"/> </menu_item_call> <menu_item_call label="Open" @@ -68,7 +68,7 @@ <menu_item_call.on_click function="InspectObject.Open"/> <menu_item_call.on_visible - function="Object.VisibleOpen" /> + function="Object.EnableOpen" /> </menu_item_call> <menu_item_call label="Edit" @@ -77,7 +77,7 @@ <menu_item_call.on_click function="Object.Edit" /> <menu_item_call.on_enable - function="Object.VisibleEdit"/> + function="EnableEdit"/> </menu_item_call> <menu_item_call label="Wear" @@ -86,7 +86,7 @@ <menu_item_call.on_click function="Object.AttachToAvatar" /> <menu_item_call.on_visible - function="Object.VisibleWear" /> + function="Object.EnableWear" /> </menu_item_call> <menu_item_call label="Report" @@ -102,7 +102,7 @@ <menu_item_call.on_click function="Object.Mute" /> <menu_item_call.on_visible - function="Object.VisibleMute" /> + function="Object.EnableMute" /> </menu_item_call> <menu_item_call label="Zoom In" @@ -118,7 +118,7 @@ <menu_item_call.on_click function="Object.Delete" /> <menu_item_call.on_visible - function="Object.VisibleDelete" /> + function="Object.EnableDelete" /> </menu_item_call> <menu_item_call label="More Info" diff --git a/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml b/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml index 3d65878cf8..9894a01701 100644 --- a/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml +++ b/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml @@ -13,7 +13,7 @@ function="Self.StandUp" parameter="" /> <menu_item_call.on_visible - function="Self.VisibleStandUp" /> + function="Self.EnableStandUp" /> </menu_item_call> <menu_item_call label="My Appearance" diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml index b65a49eaed..a36bfb8ec1 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory.xml @@ -340,6 +340,33 @@ parameter="open" /> </menu_item_call> <menu_item_call + label="Replace Current Outfit" + layout="topleft" + name="Replace Outfit"> + <menu_item_call.on_click + function="Inventory.DoToSelected" + parameter="replaceoutfit" /> + </menu_item_call> + <menu_item_call + label="Add To Current Outfit" + layout="topleft" + name="Add To Outfit"> + <menu_item_call.on_click + function="Inventory.DoToSelected" + parameter="addtooutfit" /> + </menu_item_call> + <menu_item_call + label="Remove From Current Outfit" + layout="topleft" + name="Remove From Outfit"> + <menu_item_call.on_click + function="Inventory.DoToSelected" + parameter="removefromoutfit" /> + </menu_item_call> + <menu_item_separator + layout="topleft" + name="Outfit Separator" /> + <menu_item_call label="Purge Item" layout="topleft" name="Purge Item"> @@ -433,30 +460,6 @@ </menu_item_call> <menu_item_separator layout="topleft" /> - <menu_item_call - label="Remove From Outfit" - layout="topleft" - name="Remove From Outfit"> - <menu_item_call.on_click - function="Inventory.DoToSelected" - parameter="removefromoutfit" /> - </menu_item_call> - <menu_item_call - label="Add To Outfit" - layout="topleft" - name="Add To Outfit"> - <menu_item_call.on_click - function="Inventory.DoToSelected" - parameter="addtooutfit" /> - </menu_item_call> - <menu_item_call - label="Replace Outfit" - layout="topleft" - name="Replace Outfit"> - <menu_item_call.on_click - function="Inventory.DoToSelected" - parameter="replaceoutfit" /> - </menu_item_call> <menu_item_separator layout="topleft" /> <menu_item_call diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index a69cf4c8d0..a6ed1f4c86 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -100,11 +100,11 @@ functor="GenericAcknowledge" icon="alertmodal.tga" name="MissingAlert" - label="Unknown Alert Message" + label="Unknown Notification Message" type="alertmodal"> -Your version of [APP_NAME] does not know how to display the alert it just received. Please verify that you have the latest Viewer installed. +Your version of [APP_NAME] does not know how to display the notification it just received. Please verify that you have the latest Viewer installed. -Error details: The alert called '[_NAME]' was not found in notifications.xml. +Error details: The notification called '[_NAME]' was not found in notifications.xml. <usetemplate name="okbutton" yestext="OK"/> @@ -1688,7 +1688,7 @@ This location can play streaming media. Streaming media requires a fast Internet connection. Play streaming media when available? -(You can change this option later under Preferences > Audio & Video.) +(You can change this option later under Preferences > Privacy.) <usetemplate name="okcancelbuttons" notext="Disable" diff --git a/indra/newview/skins/default/xui/en/panel_landmarks.xml b/indra/newview/skins/default/xui/en/panel_landmarks.xml index c52b0c83d0..1f211c0fed 100644 --- a/indra/newview/skins/default/xui/en/panel_landmarks.xml +++ b/indra/newview/skins/default/xui/en/panel_landmarks.xml @@ -32,7 +32,7 @@ left="0" mouse_opaque="true" name="favorites_list" - start_folder="Favorite" + start_folder="Favorites" width="380"/> </accordion_tab> <accordion_tab diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml index 22977b2274..c9db75b5d8 100644 --- a/indra/newview/skins/default/xui/en/panel_login.xml +++ b/indra/newview/skins/default/xui/en/panel_login.xml @@ -1,211 +1,212 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel - follows="all" - height="600" - layout="topleft" - left="0" - name="panel_login" - top="600" +follows="all" +height="600" +layout="topleft" +left="0" +name="panel_login" +top="600" width="996"> - <panel.string +<panel.string name="create_account_url"> - http://join.secondlife.com/ - </panel.string> - <panel.string + http://join.secondlife.com/ +</panel.string> +<panel.string name="real_url"> - http://secondlife.com/app/login/ - </panel.string> + http://secondlife.com/app/login/ +</panel.string> <string name="reg_in_client_url"> - http://secondlife.eniac15.lindenlab.com/reg-in-client/ - </string> - <panel.string + http://secondlife.eniac15.lindenlab.com/reg-in-client/ +</string> +<panel.string name="forgot_password_url"> - http://secondlife.com/account/request.php - </panel.string> - <!-- *NOTE: Custom resize logic for login_html in llpanellogin.cpp --> - <web_browser - border_visible="false" - bottom="600" - follows="all" - hide_loading="true" - left="0" - name="login_html" - start_url="" - top="0" - height="600" + http://secondlife.com/account/request.php +</panel.string> +<!-- *NOTE: Custom resize logic for login_html in llpanellogin.cpp --> +<web_browser +border_visible="false" +bottom="600" +follows="all" +hide_loading="true" +left="0" +name="login_html" +start_url="" +top="0" +height="600" width="996" /> - <panel - follows="left|bottom|right" - name="login_widgets" - layout="topleft" - top="519" - width="996" +<panel +follows="left|bottom|right" +name="login_widgets" +layout="topleft" +top="519" +width="996" height="80"> - <text - follows="left|bottom" - font="SansSerifSmall" - height="16" - left="20" - name="first_name_text" - top="20" - width="150"> - Name: - </text> - <line_editor - follows="left|bottom" - handle_edit_keys_directly="true" - height="22" - label="First" - left_delta="0" - max_length="31" - name="first_name_edit" - select_on_focus="true" - tool_tip="[SECOND_LIFE] First Name" - top_pad="0" - width="135" /> - <line_editor - follows="left|bottom" - handle_edit_keys_directly="true" - height="22" - label="Last" - left_pad="8" - max_length="31" - name="last_name_edit" - select_on_focus="true" - tool_tip="[SECOND_LIFE] Last Name" - top_delta="0" - width="135" /> - <text - follows="left|bottom" - font="SansSerifSmall" - height="15" - left_pad="8" - name="password_text" - top="20" - width="150"> - Password: - </text> - <line_editor - follows="left|bottom" - handle_edit_keys_directly="true" - height="22" - left="304" - max_length="16" - name="password_edit" - select_on_focus="true" - top_pad="1" - width="135" /> - <check_box - control_name="RememberPassword" - follows="left|bottom" - font="SansSerifSmall" - height="16" - label="Remember" - left_pad="20" - top="20" - name="remember_check" - width="150" /> - <button - follows="left|bottom" - height="23" - image_unselected="PushButton_On" - image_selected="PushButton_On_Selected" - label="Log In" - label_color="White" - layout="topleft" - left="462" - name="connect_btn" - top="35" - width="90" /> - <text - follows="right|bottom" - font="SansSerifSmall" - height="15" - halign="right" - left_pad="10" - right="-240" - name="start_location_text" - top="20" - width="130"> - Starting location: - </text> - <combo_box - allow_text_entry="true" - control_name="LoginLocation" - follows="right|bottom" - height="23" - max_chars="128" - top_pad="0" - name="start_location_combo" +<text +follows="left|bottom" +font="SansSerifSmall" +height="16" +left="20" +name="first_name_text" +top="20" +width="150"> +First name: +</text> +<line_editor +follows="left|bottom" +handle_edit_keys_directly="true" +height="22" +label="First" +left_delta="0" +max_length="31" +name="first_name_edit" +select_on_focus="true" +tool_tip="[SECOND_LIFE] First Name" +top_pad="0" + width="135" /> + <text + follows="left|bottom" + font="SansSerifSmall" + height="16" + left_pad="8" + name="last_name_text" + top="20" + width="150"> + Last name: </text> +<line_editor +follows="left|bottom" +handle_edit_keys_directly="true" +height="22" +label="Last" +max_length="31" +name="last_name_edit" +select_on_focus="true" +tool_tip="[SECOND_LIFE] Last Name" + top_pad="0" + width="135" /> +<text +follows="left|bottom" +font="SansSerifSmall" +height="15" +left_pad="8" +name="password_text" +top="20" + width="150"> + Password: +</text> +<line_editor +follows="left|bottom" +handle_edit_keys_directly="true" + height="22" + max_length="16" +name="password_edit" +select_on_focus="true" + top_pad="0" + width="135" /> + <check_box +control_name="RememberPassword" +follows="left|bottom" +font="SansSerifSmall" +height="16" +label="Remember" + top_pad="3" + name="remember_check" + width="135" /> + <text + follows="left|bottom" + font="SansSerifSmall" + height="15" + left_pad="8" + name="start_location_text" +top="20" + width="130"> + Start at: + </text> +<combo_box +allow_text_entry="true" +control_name="LoginLocation" + follows="left|bottom" + height="23" +max_chars="128" +top_pad="0" +name="start_location_combo" width="135"> - <combo_box.item - label="My last location" - name="MyLastLocation" +<combo_box.item +label="My last location" +name="MyLastLocation" value="last" /> - <combo_box.item - label="My home" - name="MyHome" +<combo_box.item +label="My home" +name="MyHome" value="home" /> - <combo_box.item - label="<Type region name>" - name="Typeregionname" - value="" /> - </combo_box> - <combo_box - allow_text_entry="true" - font="SansSerifSmall" - follows="right|bottom" - height="23" - layout="topleft" - top_pad="2" - name="server_combo" - width="135" - visible="false" /> - <text - follows="right|bottom" - font="SansSerifSmall" - text_color="EmphasisColor" - halign="right" - height="16" - top="12" - left_pad="5" - right="-10" - name="create_new_account_text" - width="180"> - Sign up for account - </text> - <text - follows="right|bottom" - font="SansSerifSmall" - text_color="EmphasisColor" - halign="right" - height="16" - name="forgot_password_text" - top_pad="2" - width="180"> - Forgot your name or password? - </text> - <text - follows="right|bottom" - font="SansSerifSmall" - text_color="EmphasisColor" - halign="right" - height="16" - name="login_help" - top_pad="2" - width="180"> - Need help logging in? - </text> - <text - follows="right|bottom" - font="SansSerifSmall" - halign="right" - height="28" - top_pad="2" - name="channel_text" - width="180" - word_wrap="true"> - [VERSION] - </text> - </panel> +<combo_box.item +label="<Type region name>" +name="Typeregionname" value="" /> +</combo_box> +<combo_box +allow_text_entry="true" +font="SansSerifSmall" + follows="left|bottom" + height="23" +layout="topleft" +top_pad="2" +name="server_combo" +width="135" + visible="false" /> +<button + follows="left|bottom" + height="23" + image_unselected="PushButton_On" + image_selected="PushButton_On_Selected" + label="Log In" + label_color="White" + layout="topleft" + left_pad="15" + name="connect_btn" + top="35" + width="90" /> + <text +follows="right|bottom" +font="SansSerifSmall" +text_color="EmphasisColor" +halign="right" +height="16" +top="12" +left_pad="5" +right="-10" +name="create_new_account_text" + width="180"> + Sign up + </text> +<text +follows="right|bottom" +font="SansSerifSmall" +text_color="EmphasisColor" +halign="right" +height="16" +name="forgot_password_text" top_pad="12" + width="180"> + Forgot your name or password? +</text> +<text +follows="right|bottom" +font="SansSerifSmall" +text_color="EmphasisColor" +halign="right" +height="16" +name="login_help" +top_pad="2" + width="180"> + Need help logging in? </text> +<!-- <text + follows="right|bottom" + font="SansSerifSmall" + halign="right" + height="28" + top_pad="2" + name="channel_text" + width="180" + word_wrap="true"> + [VERSION] + </text>--> +</panel> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_main_inventory.xml b/indra/newview/skins/default/xui/en/panel_main_inventory.xml index aeb28e4c60..9990215dfd 100644 --- a/indra/newview/skins/default/xui/en/panel_main_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_main_inventory.xml @@ -16,43 +16,44 @@ <filter_editor text_pad_left="14" follows="left|top|right" - font="SanSerif" - height="20" + height="23" label="Filter" layout="topleft" left="15" +max_length="300" name="inventory search editor" - top="34" - width="300" /> + top="26" + width="303" /> <tab_container - follows="left|top|right|bottom" +follows="all" +halign="center" height="300" layout="topleft" left_delta="-4" name="inventory filter tabs" - tab_min_width="70" tab_height="30" tab_position="top" - top_pad="10" - halign="center" + tab_min_width="100" + top_pad="4" width="305"> <inventory_panel - follows="left|top|right|bottom" + border="false" + follows="all" height="295" - label="ALL ITEMS" + label="MY INVENTORY" layout="topleft" - left="1" + left="0" name="All Items" top="16" width="290" /> <inventory_panel - follows="left|top|right|bottom" + border="false" + follows="all" height="295" - label="RECENT ITEMS" + label="RECENT" layout="topleft" left_delta="0" name="Recent Items" - top_delta="0" width="290" /> </tab_container> @@ -109,12 +110,12 @@ <menu_bar bg_visible="false" follows="left|top|right" - height="18" + height="20" layout="topleft" - left_delta="0" + left="10" mouse_opaque="false" name="Inventory Menu" - top="15" + top="0" visible="true" width="290"> <menu diff --git a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml index 0567d722d5..db95d01b43 100644 --- a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml @@ -1,46 +1,48 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel name="Outfits" - follows="all" -border="false"> + height="510" + width="333" + follows="top|left" + left="0" + top_pad="0"> <accordion single_expansion="true" - follows="top|left|bottom" - height="460" - layout="topleft" - left="0" + height="510" + layout="topleft" + left="0" + follows="top|left" name="outfits_accordion" - top="0" - width="333"> + top_pad="0" + width="333"> <accordion_tab - layout="topleft" + expanded="false" + layout="topleft" name="tab_cof" title="Current Outfit"> <inventory_panel - allow_multi_select="true" - border="false" - bottom="0" - follows="all" - height="416" - left="0" + allow_multi_select="true" + border="false" + height="460" + left="0" + top="0" mouse_opaque="true" name="cof_accordionpanel" - width="333" start_folder="Current Outfit" /> </accordion_tab> <accordion_tab - layout="topleft" + expanded="true" + layout="topleft" name="tab_outfits" title="My Outfits"> <inventory_panel allow_multi_select="true" border="false" - bottom="0" follows="all" - height="415" left="0" + top="0" + height="460" mouse_opaque="true" name="outfitslist_accordionpanel" - width="333" start_folder="My Outfits" /> </accordion_tab> </accordion> diff --git a/indra/newview/skins/default/xui/en/panel_outfits_inventory_gear_default.xml b/indra/newview/skins/default/xui/en/panel_outfits_inventory_gear_default.xml index c8c79f8761..7b88fca7c3 100644 --- a/indra/newview/skins/default/xui/en/panel_outfits_inventory_gear_default.xml +++ b/indra/newview/skins/default/xui/en/panel_outfits_inventory_gear_default.xml @@ -7,29 +7,65 @@ name="menu_gear_default" visible="false"> <menu_item_call - label="New Outfit" + label="Replace Current Outfit" layout="topleft" - name="new"> + name="wear"> <on_click function="panel_outfits_inventory_gear_default.Custom.Action" - parameter="new" /> + parameter="wear" /> <on_enable function="panel_outfits_inventory_gear_default.Enable" - parameter="new" /> + parameter="wear" /> </menu_item_call> <menu_item_call - label="Wear Outfit" + label="Add To Current Outfit" layout="topleft" - name="wear"> + name="add"> <on_click function="panel_outfits_inventory_gear_default.Custom.Action" - parameter="wear" /> + parameter="add" /> <on_enable function="panel_outfits_inventory_gear_default.Enable" - parameter="wear" /> + parameter="add" /> + </menu_item_call> + <menu_item_call + label="Remove From Current Outfit" + layout="topleft" + name="remove"> + <on_click + function="panel_outfits_inventory_gear_default.Custom.Action" + parameter="remove" /> + <on_enable + function="panel_outfits_inventory_gear_default.Enable" + parameter="remove" /> + </menu_item_call> + <menu_item_separator + layout="topleft" + name="Outfits Gear Separator" /> + <menu_item_call + label="Rename" + layout="topleft" + name="rename"> + <on_click + function="panel_outfits_inventory_gear_default.Custom.Action" + parameter="rename" /> + <on_enable + function="panel_outfits_inventory_gear_default.Enable" + parameter="rename" /> + </menu_item_call> + <menu_item_call + label="Remove" + layout="topleft" + name="remove_link"> + <on_click + function="panel_outfits_inventory_gear_default.Custom.Action" + parameter="remove_link" /> + <on_enable + function="panel_outfits_inventory_gear_default.Enable" + parameter="remove_link" /> </menu_item_call> <menu_item_call - label="Delete Outfit" + label="Delete" layout="topleft" name="delete"> <on_click diff --git a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml index 6a61953319..78b90eefcc 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml @@ -70,7 +70,7 @@ </text> <combo_box allow_text_entry="true" - height="20" + height="23" follows="left|top" layout="topleft" left_pad="0" @@ -306,7 +306,7 @@ Avatars: <button follows="top|left" enabled_control="EnableVoiceChat" - height="20" + height="23" label="Set Key" left_delta="0" name="set_voice_hotkey_button" @@ -320,7 +320,7 @@ Avatars: enabled_control="EnableVoiceChat" follows="left" halign="center" - height="20" + height="23" label="Middle Mouse Button" left_delta="120" mouse_opaque="true" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_alerts.xml b/indra/newview/skins/default/xui/en/panel_preferences_alerts.xml index a94df4150d..18d0f8acab 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_alerts.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_alerts.xml @@ -50,7 +50,7 @@ name="show_label" top_pad="14" width="450"> - Always show these alerts: + Always show these notifications: </text> <scroll_list follows="top|left" @@ -63,7 +63,7 @@ <button enabled_control="FirstSelectedDisabledPopups" follows="top|left" - height="20" + height="23" image_disabled="PushButton_Disabled" image_disabled_selected="PushButton_Disabled" image_overlay="Arrow_Up" @@ -81,7 +81,7 @@ <button enabled_control="FirstSelectedEnabledPopups" follows="top|left" - height="20" + height="23" image_disabled="PushButton_Disabled" image_disabled_selected="PushButton_Disabled" image_overlay="Arrow_Down" @@ -107,7 +107,7 @@ name="dont_show_label" top_pad="10" width="450"> - Never show these alerts: + Never show these notifications: </text> <scroll_list follows="top|left" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_general.xml b/indra/newview/skins/default/xui/en/panel_preferences_general.xml index ee9bfbae93..8aba8b9dd1 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_general.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_general.xml @@ -24,7 +24,7 @@ <combo_box control_name="Language" follows="left|bottom" - height="18" + height="23" layout="topleft" left_delta="50" max_chars="135" @@ -136,7 +136,7 @@ <combo_box control_name="PreferredMaturity" follows="left|bottom" - height="18" + height="23" layout="topleft" left_delta="-10" name="maturity_desired_combobox" @@ -170,7 +170,7 @@ <combo_box control_name="LoginLocation" follows="left|bottom" - height="18" + height="23" layout="topleft" left_delta="50" name="start_location_combo" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml index eb00b9b79a..04985d0fa9 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml @@ -708,7 +708,7 @@ </panel> <button follows="left|bottom" - height="20" + height="23" label="Apply" label_selected="Apply" layout="topleft" @@ -721,7 +721,7 @@ </button> <button follows="left|bottom" - height="20" + height="23" label="Reset" layout="topleft" left_pad="3" @@ -734,7 +734,7 @@ <button control_name="ShowAdvancedGraphicsSettings" follows="right|bottom" - height="20" + height="23" is_toggle="true" label="Advanced" layout="topleft" @@ -744,7 +744,7 @@ width="115" /> <button follows="right|bottom" - height="20" + height="23" label="Hardware" label_selected="Hardware" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml index 29e9b476eb..25d7ba0903 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml @@ -15,7 +15,7 @@ </panel.string> <button follows="left|bottom" - height="20" + height="23" label="Clear History" layout="topleft" left="30" @@ -160,7 +160,7 @@ <button enabled="false" follows="right|bottom" - height="20" + height="23" label="Browse" label_selected="Browse" layout="topleft" @@ -173,7 +173,7 @@ </button> <button follows="left|bottom" - height="20" + height="23" label="Block list" layout="topleft" left="30" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml index 5cabae5fa0..a7def5306e 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml @@ -10,7 +10,7 @@ top="1" width="517"> <button - height="20" + height="23" label="Other Devices" layout="topleft" left="30" @@ -138,7 +138,7 @@ enabled_control="BrowserProxyEnabled" decimal_digits="0" follows="left|top" - height="16" + height="23" increment="1" initial_value="80" label="Port number:" @@ -208,7 +208,7 @@ width="205" /> <button follows="left|top" - height="22" + height="23" label="Browse" label_selected="Browse" layout="topleft" @@ -221,7 +221,7 @@ </button> <button follows="left|top" - height="22" + height="23" label="Reset" label_selected="Set" layout="topleft" @@ -314,7 +314,7 @@ width="200" /> <button follows="left|top" - height="22" + height="23" enabled="false" label="Browse" label_selected="Browse" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml index 854227619b..102a53ad90 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml @@ -343,7 +343,7 @@ <button control_name="ShowDeviceSettings" follows="left|top" - height="19" + height="23" is_toggle="true" label="Input/Output devices" layout="topleft" @@ -391,7 +391,7 @@ Input </text> <combo_box - height="19" + height="23" control_name="VoiceInputAudioDevice" layout="topleft" left="165" @@ -505,7 +505,7 @@ </text> <combo_box control_name="VoiceOutputAudioDevice" - height="19" + height="23" layout="topleft" left="165" max_chars="128" diff --git a/indra/newview/skins/default/xui/en/role_actions.xml b/indra/newview/skins/default/xui/en/role_actions.xml index b89a975430..a6036f8b78 100644 --- a/indra/newview/skins/default/xui/en/role_actions.xml +++ b/indra/newview/skins/default/xui/en/role_actions.xml @@ -4,39 +4,39 @@ description="These Abilities include powers to add and remove group Members, and allow new Members to join without an invitation." name="Membership"> <action description="Invite People to this Group" - longdescription="Invite People to this Group using the 'Invite New Person...' button in the Members & Roles tab > Members sub-tab." + longdescription="Invite People to this Group using the 'Invite' button in the Roles section > Members tab." name="member invite" value="1" /> <action description="Eject Members from this Group" - longdescription="Eject Members from this Group using the 'Eject From Group' button in the Members & Roles tab > Members sub-tab. An Owner can eject anyone except another Owner. If you're not an Owner, a Member can be ejected from a group if, and only if, they're only in the Everyone Role, and NO other Roles. To remove Members from Roles, you need to have the 'Remove Members from Roles' Ability." + longdescription="Eject Members from this Group using the 'Eject' button in the Roles section > Members tab. An Owner can eject anyone except another Owner. If you're not an Owner, a Member can be ejected from a group if, and only if, they're only in the Everyone Role, and NO other Roles. To remove Members from Roles, you need to have the 'Remove Members from Roles' Ability." name="member eject" value="2" /> <action - description="Toggle 'Open Enrollment' and change 'Signup Fee'" - longdescription="Toggle 'Open Enrollment' to let new Members join without an invitation, and change 'Signup Fee' in the Group Preferences section of the General tab." + description="Toggle 'Open Enrollment' and change 'Enrollment fee'" + longdescription="Toggle 'Open Enrollment' to let new Members join without an invitation, and change the 'Enrollment fee' in the General section." name="member options" value="3" /> </action_set> <action_set description="These Abilities include powers to add, remove, and change group Roles, add and remove Members in Roles, and assign Abilities to Roles." name="Roles"> <action description="Create new Roles" - longdescription="Create new Roles in the Members & Roles tab > Roles sub-tab." + longdescription="Create new Roles in the Roles section > Roles tab." name="role create" value="4" /> <action description="Delete Roles" - longdescription="Delete Roles in the Members & Roles tab > Roles sub-tab." + longdescription="Delete Roles in the Roles section > Roles tab." name="role delete" value="5" /> - <action description="Change Role names, titles, descriptions, and whether Role members are publicly visible" - longdescription="Change Role names, titles, descriptions, and whether Role members are publicly visible. This is done at the bottom of the the Members & Roles tab > Roles sub-tab after selecting a Role." + <action description="Change Role names, titles, descriptions, and whether Role members are publicly revealed" + longdescription="Change Role names, titles, descriptions, and whether Role members are publicly revealed. This is done at the bottom of the the Roles section > Roles tab after selecting a Role." name="role properties" value="6" /> <action description="Assign Members to Assigner's Roles" - longdescription="Assign Members to Roles in the Assigned Roles section of the Members & Roles tab > Members sub-tab. A Member with this Ability can only add Members to a Role the assigner is already in." + longdescription="Assign Members to Roles in the list of Assigned Roles (Roles section > Members tab). A Member with this Ability can only add Members to a Role that the assigner is already in." name="role assign member limited" value="7" /> <action description="Assign Members to Any Role" - longdescription="Assign Members to Any Role in the Assigned Roles section of the Members & Roles tab > Members sub-tab. *WARNING* Any Member in a Role with this Ability can assign themselves--and any other non-Owner Member--to Roles that have more powers than they currently have, potentially elevating themselves to near-Owner power. Be sure you know what you're doing before assigning this Ability." + longdescription="Assign Members to Any Role in the list of Assigned Roles (Roles section > Members tab). *WARNING* Any Member in a Role with this Ability can assign themselves--and any other non-Owner Member--to Roles that have more powers than they currently have, potentially elevating themselves to near-Owner power. Be sure you know what you're doing before assigning this Ability." name="role assign member" value="8" /> <action description="Remove Members from Roles" - longdescription="Remove Members from Roles in the Assigned Roles section of the Members & Roles tab > Members sub-tab. Owners can't be removed." + longdescription="Remove Members from Roles in the list of Assigned Roles (Roles section > Members tab). Owners can't be removed." name="role remove member" value="9" /> <action description="Assign and Remove Abilities in Roles" - longdescription="Assign and Remove Abilities in Roles in the Allowed Abilities section of the Members & Roles tab > Roles sub-tab. *WARNING* Any Member in a Role with this Ability can assign themselves--and any other non-Owner Member--all Abilities, potentially elevating themselves to near-Owner power. Be sure you know what you're doing before assigning this Ability." + longdescription="Assign and Remove Abilities for each Role in the list of Allowed Abilities (Roles section > Roles tab). *WARNING* Any Member in a Role with this Ability can assign themselves--and any other non-Owner Member--all Abilities, potentially elevating themselves to near-Owner power. Be sure you know what you're doing before assigning this Ability." name="role change actions" value="10" /> </action_set> <action_set @@ -44,11 +44,11 @@ name="Group Identity"> <action description="Change Charter, Insignia, and 'Show in search'" - longdescription="Change Charter, Insignia, and 'Show in search'. This is done in the General tab." + longdescription="Change Charter, Insignia, and 'Show in search'. This is done in the General section." name="group change identity" value="11" /> </action_set> <action_set - description="These Abilities include powers to deed, modify, and sell land in this group's land holdings. To get to the About Land window, right-click the ground and select 'About Land...', or click the parcel info in the menu bar." + description="These Abilities include powers to deed, modify, and sell land in this group's land holdings. To get to the About Land window, right-click the ground and select 'About Land', or click the 'i' icon in the Navigation Bar." name="Parcel Management"> <action description="Deed land and buy land for group" longdescription="Deed land and buy land for group. This is done in About Land > General tab." @@ -60,18 +60,18 @@ longdescription="Set land for sale info. *WARNING* Any Member in a Role with this Ability can sell group-owned land in About Land > General tab as they wish! Be sure you know what you're doing before assigning this Ability." name="land set sale info" value="14" /> <action description="Subdivide and join parcels" - longdescription="Subdivide and join parcels. This is done by right-clicking the ground, 'Edit Terrain', and dragging your mouse on the land to make a selection. To subdivide, select what you want to split and click 'Subdivide...'. To join, select two or more contiguous parcels and click 'Join...'. " + longdescription="Subdivide and join parcels. This is done by right-clicking the ground, 'Edit Terrain', and dragging your mouse on the land to make a selection. To subdivide, select what you want to split and click 'Subdivide'. To join, select two or more contiguous parcels and click 'Join'. " name="land divide join" value="15" /> </action_set> <action_set description="These Abilities include powers to change the parcel name and publish settings, Find directory visibility, and landing point & TP routing options." name="Parcel Identity"> - <action description="Toggle 'Show in Find Places' and set category" - longdescription="Toggle 'Show in Find Places' and setting a parcel's category in About Land > Options tab." + <action description="Toggle 'Show Place in Search' and set category" + longdescription="Toggle 'Show Place in Search' and setting a parcel's category in About Land > Options tab." name="land find places" value="17" /> <action - description="Change parcel name, description, and 'Show in search' settings" - longdescription="Change parcel name, description, and 'Show in search' settings. This is done in About Land > Options tab." + description="Change parcel name, description, and 'Show Place in Search' settings" + longdescription="Change parcel name, description, and 'Show Place in Search' settings. This is done in About Land > Options tab." name="land change identity" value="18" /> <action description="Set landing point and set teleport routing" longdescription="On a group-owned parcel, Members in a Role with this Ability can set a landing point to specify where incoming teleports arrive, and also set teleport routing for further control. This is done in About Land > Options tab." @@ -87,7 +87,7 @@ longdescription="Toggle 'Edit Terrain'. *WARNING* About Land > Options tab > Edit Terrain allows anyone to terraform your land's shape, and place and move Linden plants. Be sure you know what you're doing before assigning this Ability. Editing terrain is toggled in About Land > Options tab." name="land edit" value="21" /> <action description="Toggle various About Land > Options settings" - longdescription="Toggle 'Safe (no damage)', 'Fly', and allow other Residents to: 'Create Objects', 'Edit Terrain', 'Create Landmarks', and 'Run Scripts' on group-owned land in About Land > Options tab." + longdescription="Toggle 'Safe (no damage)', 'Fly', and allow other Residents to: 'Edit Terrain', 'Build', 'Create Landmarks', and 'Run Scripts' on group-owned land in About Land > Options tab." name="land options" value="22" /> </action_set> <action_set @@ -106,7 +106,7 @@ longdescription="Members in a Role with this Ability can landmark a group-owned parcel, even if it's turned off in About Land > Options tab." name="land allow landmark" value="26" /> <action description="Allow 'Set Home to Here' on group land" - longdescription="Members in a Role with this Ability can use World menu > Set Home to Here on a parcel deeded to this group." + longdescription="Members in a Role with this Ability can use World menu > Landmarks > Set Home to Here on a parcel deeded to this group." name="land allow set home" value="28" /> </action_set> <action_set @@ -116,13 +116,13 @@ longdescription="Manage parcel Access lists in About Land > Access tab." name="land manage allowed" value="29" /> <action description="Manage parcel Ban lists" - longdescription="Manage parcel Ban lists in About Land > Ban tab." + longdescription="Manage parcel Ban lists in About Land > Access tab." name="land manage banned" value="30" /> - <action description="Change parcel 'Sell passes...' settings" - longdescription="Change parcel 'Sell passes...' settings in About Land > Access tab." + <action description="Change parcel 'Sell passes to' settings" + longdescription="Change parcel 'Sell passes to' settings in About Land > Access tab." name="land manage passes" value="31" /> <action description="Eject and freeze Residents on parcels" - longdescription="Members in a Role with this Ability can handle an unwelcome Resident on a group-owned parcel by right-clicking them, More >, and selecting 'Eject...' or 'Freeze...'." + longdescription="Members in a Role with this Ability can handle an unwelcome Resident on a group-owned parcel by right-clicking them, then selecting 'Eject' or 'Freeze'." name="land admin" value="32" /> </action_set> <action_set @@ -138,20 +138,20 @@ longdescription="Return objects on group-owned parcels that are non-group in About Land > Objects tab." name="land return non group" value="34" /> <action description="Landscaping using Linden plants" - longdescription="Landscaping ability to place and move Linden trees, plants, and grasses. These items can be found in your inventory's Library > Objects folder or they can be created via the Build button." + longdescription="Landscaping ability to place and move Linden trees, plants, and grasses. These items can be found in your inventory's Library > Objects folder, or they can be created via the Build menu." name="land gardening" value="35" /> </action_set> <action_set - description="These Abilities include powers to deed, modify, and sell group-owned objects. These changes are done in the Edit Tools > General Tab. Right-click an object and Edit to see its settings. " + description="These Abilities include powers to deed, modify, and sell group-owned objects. These changes are done in the Build Tools > General tab. Right-click an object and Edit to see its settings. " name="Object Management"> <action description="Deed objects to group" - longdescription="Deed objects to group in the Edit Tools > General Tab." + longdescription="Deed objects to group in the Build Tools > General tab." name="object deed" value="36" /> <action description="Manipulate (move, copy, modify) group-owned objects" - longdescription="Manipulate (move, copy, modify) group-owned objects in the Edit Tools > General Tab." + longdescription="Manipulate (move, copy, modify) group-owned objects in the Build Tools > General tab." name="object manipulate" value="38" /> <action description="Set group-owned objects for sale" - longdescription="Set group-owned objects for sale in the Edit Tools > General tab." + longdescription="Set group-owned objects for sale in the Build Tools > General tab." name="object set sale" value="39" /> </action_set> <action_set @@ -165,10 +165,10 @@ description="These Abilities include powers to allow Members to send, receive, and view group Notices." name="Notices"> <action description="Send Notices" - longdescription="Members in a Role with this Ability can send Notices in Group Information > Notices tab." + longdescription="Members in a Role with this Ability can send Notices via the Group > Notices section." name="notices send" value="42" /> <action description="Receive Notices and view past Notices" - longdescription="Members in a Role with this Ability can receive Notices and view past Notices in Group Information > Notices tab." + longdescription="Members in a Role with this Ability can receive Notices and view past Notices in Group > Notices section." name="notices receive" value="43" /> </action_set> <action_set diff --git a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml index 886887c2b5..3dac1a9614 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml @@ -1,177 +1,170 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel background_visible="true" - follows="all" - height="570" - label="My Appearance" - layout="topleft" - min_height="350" - name="appearance panel" - width="333"> - <string -name="No Outfit" -value="No Outfit" /> -<panel - left="0" - top="0" - follows="top|left" +follows="all" +height="635" +label="Outfits" layout="topleft" - width="333" - height="45" - background_visible="true" - background_opaque="false" - bg_alpha_color="MouseGray" - name="panel_currentlook" - > -<button - follows="left|top" - top="0" width="1" height="1" - layout="topleft" - left="0" - name="editappearance_btn" /> - <button - follows="left|top" - top="0" width="1" height="1" - layout="topleft" - left="3" - name="openoutfit_btn" /> -<icon - follows="top|left" - height="30" - image_name="TabIcon_Appearance_Off" - name="outfit_icon" - mouse_opaque="false" - visible="true" - left="5" - top="0" - width="30" /> -<text - width="292" - height="22" -follows="top|left" - layout="topleft" - left_pad="5" -font="SansSerifLarge" -font.style="BOLD" -word_wrap="false" -use_ellipses="true" -mouse_opaque="false" - text_color="white" - name="currentlook_name"> -MyOutfit With a really Long Name like MOOSE - </text> - <text -width="290" -left="40" -height="1" -follows="top|left" - layout="topleft" - top_pad="-2" -mouse_opaque="false" - name="currentlook_title" > -(now wearing) - </text> -</panel> - <filter_editor - follows="top|left" - height="23" - layout="topleft" - left="15" - label="Filter" - max_length="300" - name="Filter" - top_pad="7" - width="303" /> - <panel - follows="top|left" - halign="center" - height="500" - layout="topleft" - class="panel_outfits_inventory" - filename="panel_outfits_inventory.xml" - name="panel_outfits_inventory" - min_height="300" +min_height="460" +name="appearance panel" +top="0" +left="0" + width="333"> + <string + name="No Outfit" + value="No Outfit" /> + <panel + left="0" + top="0" + follows="left|top|right" + layout="topleft" + width="333" + height="33" + name="panel_currentlook" + > + <button + follows="left|top" + top="0" width="1" height="1" + layout="topleft" + left="0" + name="editappearance_btn" /> + <button + follows="left|top" + top="0" width="1" height="1" + layout="topleft" left="0" - top_pad="3" - width="333" - /> + name="openoutfit_btn" /> + <icon + follows="top|left" + height="30" + image_name="TabIcon_Appearance_Off" + name="outfit_icon" + mouse_opaque="false" + visible="true" + left="5" + top="0" + width="30" /> + <text + font="SansSerifHuge" + height="20" + left_pad="5" + text_color="white" + top="3" + use_ellipses="true" + width="290" + follows="top|left" + word_wrap="true" + mouse_opaque="false" + name="currentlook_name"> + MyOutfit With a really Long Name like MOOSE + </text> + <!-- <text + text_color="LtGray_50" + width="290" + left="40" + height="1" + follows="top|left" + layout="topleft" + top_pad="-2" + mouse_opaque="false" + name="currentlook_title" > + (current outfit) + </text>--> + </panel> + <filter_editor + height="23" + follows="left|top|right" + layout="topleft" + left="15" + label="Filter Outfits" + max_length="300" + name="Filter" + top_pad="0" + width="303" /> <panel - background_visible="true" - follows="top|left" - height="19" - layout="topleft" - left="0" - visible="true" - name="bottom_panel" - width="333"> - <button - follows="bottom|left" - tool_tip="Show additional options" - height="18" - image_disabled="OptionsMenu_Disabled" - image_selected="OptionsMenu_Press" - image_unselected="OptionsMenu_Off" - layout="topleft" - left="10" - name="options_gear_btn" - top="6" - width="18" /> - <button - follows="bottom|left" - height="18" - image_selected="AddItem_Press" - image_unselected="AddItem_Off" - image_disabled="AddItem_Disabled" - layout="topleft" - left_pad="5" - name="add_btn" - tool_tip="Add new item" - width="18" /> - <dnd_button - follows="bottom|left" - height="18" - image_selected="TrashItem_Press" - image_unselected="TrashItem_Off" - layout="topleft" - right="-5" - name="trash_btn" - tool_tip="Remove selected item" - top="6" - width="18" /> - <button - follows="top|left" - height="23" - label="Wear" + class="panel_outfits_inventory" + filename="panel_outfits_inventory.xml" + name="panel_outfits_inventory" + height="510" + min_height="510" + width="333" + top_pad="0" + follows="top|left" + /> + <panel + visible="true" + name="bottom_panel" + height="50" + left="0" + top_pad="3" + follows="bottom|left" + width="333"> + <button + follows="bottom|left" + tool_tip="Show additional options" + height="18" + image_disabled="OptionsMenu_Disabled" + image_selected="OptionsMenu_Press" + image_unselected="OptionsMenu_Off" layout="topleft" - name="wear_btn" - right="-5" - top_pad="0" - width="90" /> - </panel> - <!-- <button - follows="bottom|left" - height="23" - label="New outfit" + left="10" + name="options_gear_btn" + top="6" + width="18" /> + <button + follows="bottom|left" + height="18" + image_selected="AddItem_Press" + image_unselected="AddItem_Off" + image_disabled="AddItem_Disabled" layout="topleft" left_pad="5" - right="-10" - name="newlook_btn" - width="100" />--> -<panel - class="panel_look_info" - filename="panel_look_info.xml" - follows="all" - layout="topleft" - left="0" - name="panel_look_info" - visible="false" /> -<panel - class="panel_edit_wearable" - filename="panel_edit_wearable.xml" - follows="all" - layout="topleft" - left="0" - name="panel_edit_wearable" - visible="false" - width="333" /> -</panel> + name="newlook_btn" + tool_tip="Add new outfit" + width="18" /> + <dnd_button + follows="bottom|left" + height="18" + image_selected="TrashItem_Press" + image_unselected="TrashItem_Off" + layout="topleft" + right="-5" + name="trash_btn" + tool_tip="Remove selected item" + top="6" + width="18" /> + <button + follows="bottom|left" + height="23" + label="Wear" + layout="topleft" + name="wear_btn" + right="-5" + top_pad="0" + width="90" /> + </panel> + <!-- <button + follows="bottom|left" + height="23" + label="New outfit" + layout="topleft" + left_pad="5" + right="-10" + width="100" />--> + <panel + class="panel_look_info" + filename="panel_look_info.xml" + follows="all" + layout="topleft" + left="0" + name="panel_look_info" + visible="false" /> + <panel + class="panel_edit_wearable" + filename="panel_edit_wearable.xml" + follows="all" + layout="topleft" + left="0" + name="panel_edit_wearable" + visible="false" /> +</panel>
\ No newline at end of file diff --git a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml index 33a6a52f5c..b738e72423 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml @@ -41,47 +41,47 @@ <button enabled="true" follows="bottom|left" - height="25" - label="Info" + height="23" + label="Profile" layout="topleft" left="0" name="info_btn" top="0" - width="60" /> + width="100" /> <button enabled="false" follows="bottom|left" - height="25" + height="23" label="Wear" layout="topleft" left="130" name="wear_btn" top="0" - width="60" /> + width="100" /> <button enabled="false" follows="bottom|left" - height="25" + height="23" label="Play" layout="topleft" name="play_btn" left="130" top="0" - width="50" /> + width="80" /> <button enabled="false" follows="bottom|left" - height="25" + height="23" label="Teleport" layout="topleft" left="130" name="teleport_btn" top="0" - width="77" /> + width="100" /> </panel> </panel> - <panel +<panel follows="all" layout="topleft" left="0" @@ -95,7 +95,7 @@ width="330"> </panel> - <panel +<panel follows="all" layout="topleft" left="0" @@ -108,5 +108,4 @@ visible="false" width="330"> </panel> - </panel> diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 9703373c7f..c3650c71c3 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -1807,6 +1807,7 @@ Clears (deletes) the media and all params from the given face. <!-- inventory --> <string name="InventoryNoMatchingItems">No matching items found in inventory.</string> + <string name="FavoritesNoMatchingItems">Drag and drop a landmark here to add to your favorites.</string> <string name="InventoryNoTexture"> You do not have a copy of this texture in your inventory @@ -2215,7 +2216,7 @@ If this message persists, restart your computer. [APP_NAME] appears to have frozen or crashed on the previous run. Would you like to send a crash report? </string> - <string name="MBAlert">Alert</string> + <string name="MBAlert">Notification</string> <string name="MBNoDirectX"> [APP_NAME] is unable to detect DirectX 9.0b or greater. [APP_NAME] uses DirectX to detect hardware and/or outdated drivers that can cause stability problems, poor performance and crashes. While you can run [APP_NAME] without it, we highly recommend running with DirectX 9.0b. diff --git a/indra/newview/skins/default/xui/en/widgets/teleport_history_menu_item.xml b/indra/newview/skins/default/xui/en/widgets/teleport_history_menu_item.xml index eaa68f5690..6c559aa185 100644 --- a/indra/newview/skins/default/xui/en/widgets/teleport_history_menu_item.xml +++ b/indra/newview/skins/default/xui/en/widgets/teleport_history_menu_item.xml @@ -3,10 +3,6 @@ Based on menu_item_call.xml --> <teleport_history_menu_item back_item_font="SansSerif" - current_item_font="SansSerifBold" + current_item_font="SansSerif" forward_item_font="SansSerif" - back_item_image="teleport_history_backward.tga" - forward_item_image="teleport_history_forward.tga" - image_hpad="1" - image_vpad="0" /> diff --git a/indra/test_apps/llplugintest/llmediaplugintest.cpp b/indra/test_apps/llplugintest/llmediaplugintest.cpp index 27cb52a507..30d338292e 100644 --- a/indra/test_apps/llplugintest/llmediaplugintest.cpp +++ b/indra/test_apps/llplugintest/llmediaplugintest.cpp @@ -1529,7 +1529,21 @@ void LLMediaPluginTest::addMediaPanel( std::string url ) #elif LL_WINDOWS std::string launcher_name( "SLPlugin.exe" ); #endif - media_source->init( launcher_name, plugin_name ); + + // for this test app, use the cwd as the user data path (ugh). +#if LL_WINDOWS + std::string user_data_path = ".\\"; +#else + char cwd[ FILENAME_MAX ]; + if (NULL == getcwd( cwd, FILENAME_MAX - 1 )) + { + std::cerr << "Couldn't get cwd - probably too long - failing to init." << llendl; + return; + } + std::string user_data_path = std::string( cwd ) + "/"; +#endif + + media_source->init( launcher_name, plugin_name, false, user_data_path ); media_source->setDisableTimeout(mDisableTimeout); // make a new panel and save parameters @@ -1752,7 +1766,21 @@ void LLMediaPluginTest::replaceMediaPanel( mediaPanel* panel, std::string url ) #elif LL_WINDOWS std::string launcher_name( "SLPlugin.exe" ); #endif - media_source->init( launcher_name, plugin_name ); + + // for this test app, use the cwd as the user data path (ugh). +#if LL_WINDOWS + std::string user_data_path = ".\\"; +#else + char cwd[ FILENAME_MAX ]; + if (NULL == getcwd( cwd, FILENAME_MAX - 1 )) + { + std::cerr << "Couldn't get cwd - probably too long - failing to init." << llendl; + return; + } + std::string user_data_path = std::string( cwd ) + "/"; +#endif + + media_source->init( launcher_name, plugin_name, false, user_data_path ); media_source->setDisableTimeout(mDisableTimeout); // make a new panel and save parameters |