From 0bf7917ae848388a3e1bc6ad13e300880fed12d0 Mon Sep 17 00:00:00 2001 From: "bea@american.lindenlab.com" Date: Wed, 9 Dec 2009 12:52:27 -0800 Subject: Added Doxygen comments --- indra/llplugin/llpluginsharedmemory.cpp | 12 +++++++- indra/llplugin/llpluginsharedmemory.h | 53 +++++++++++++++++++++++++++++++-- 2 files changed, 62 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/llplugin/llpluginsharedmemory.cpp b/indra/llplugin/llpluginsharedmemory.cpp index 3c69a69d28..9c18b410c7 100644 --- a/indra/llplugin/llpluginsharedmemory.cpp +++ b/indra/llplugin/llpluginsharedmemory.cpp @@ -1,6 +1,6 @@ /** * @file llpluginsharedmemory.cpp - * @brief LLPluginSharedMemory manages a shared memory segment for use by the LLPlugin API. + * LLPluginSharedMemory manages a shared memory segment for use by the LLPlugin API. * * @cond * $LicenseInfo:firstyear=2008&license=viewergpl$ @@ -96,6 +96,10 @@ std::string LLPluginSharedMemory::createName(void) return newname.str(); } +/** + * @brief LLPluginSharedMemoryImpl is the platform-dependent implementation of LLPluginSharedMemory. TODO:DOC is this necessary/sufficient? kinda obvious. + * + */ class LLPluginSharedMemoryPlatformImpl { public: @@ -112,6 +116,9 @@ public: }; +/** + * Constructor. Creates a shared memory segment. + */ LLPluginSharedMemory::LLPluginSharedMemory() { mSize = 0; @@ -121,6 +128,9 @@ LLPluginSharedMemory::LLPluginSharedMemory() mImpl = new LLPluginSharedMemoryPlatformImpl; } +/** + * Destructor. Uses destroy() and detach() to ensure shared memory segment is cleaned up. + */ LLPluginSharedMemory::~LLPluginSharedMemory() { if(mNeedsDestroy) diff --git a/indra/llplugin/llpluginsharedmemory.h b/indra/llplugin/llpluginsharedmemory.h index 4014620c52..00c54ef08c 100644 --- a/indra/llplugin/llpluginsharedmemory.h +++ b/indra/llplugin/llpluginsharedmemory.h @@ -1,6 +1,5 @@ /** * @file llpluginsharedmemory.h - * @brief LLPluginSharedMemory manages a shared memory segment for use by the LLPlugin API. * * @cond * $LicenseInfo:firstyear=2008&license=viewergpl$ @@ -36,6 +35,10 @@ class LLPluginSharedMemoryPlatformImpl; +/** + * @brief LLPluginSharedMemory manages a shared memory segment for use by the LLPlugin API. + * + */ class LLPluginSharedMemory { LOG_CLASS(LLPluginSharedMemory); @@ -46,16 +49,62 @@ public: // Parent will use create/destroy, child will use attach/detach. // Message transactions will ensure child attaches after parent creates and detaches before parent destroys. - // create() implicitly creates a name for the segment which is guaranteed to be unique on the host at the current time. + /** + * Creates a shared memory segment, with a name which is guaranteed to be unique on the host at the current time. Used by parent. + * Message transactions will (? TODO:DOC - should? must?) ensure child attaches after parent creates and detaches before parent destroys. + * + * @param[in] size Shared memory size in TODO:DOC units = bytes?. + * + * @return False for failure, true for success. + */ bool create(size_t size); + /** + * Destroys a shared memory segment. Used by parent. + * Message transactions will (? TODO:DOC - should? must?) ensure child attaches after parent creates and detaches before parent destroys. + * + * @return True. TODO:DOC - always returns true. Is this the intended behavior? + */ bool destroy(void); + /** + * Creates and attaches a name to a shared memory segment. TODO:DOC what's the difference between attach() and create()? + * + * @param[in] name Name to attach to memory segment + * @param[in] size Size of memory segment TODO:DOC in bytes? + * + * @return False on failure, true otherwise. + */ bool attach(const std::string &name, size_t size); + /** + * Detaches shared memory segment. + * + * @return False on failure, true otherwise. + */ bool detach(void); + /** + * Checks if shared memory is mapped to a non-null address. + * + * @return True if memory address is non-null, false otherwise. + */ bool isMapped(void) const { return (mMappedAddress != NULL); }; + /** + * Get pointer to shared memory. + * + * @return Pointer to shared memory. + */ void *getMappedAddress(void) const { return mMappedAddress; }; + /** + * Get size of shared memory. + * + * @return Size of shared memory in bytes. TODO:DOC are bytes the correct unit? + */ size_t getSize(void) const { return mSize; }; + /** + * Get name of shared memory. + * + * @return Name of shared memory. + */ std::string getName() const { return mName; }; private: -- cgit v1.2.3 From dc3cad90c1cd4490d8035832138579f9711f8549 Mon Sep 17 00:00:00 2001 From: callum Date: Wed, 9 Dec 2009 14:55:17 -0800 Subject: Bunch of simple UI changes: DEV-43885 EXT-3206: Number of media items UI in Nearby Media Floater clipped when there are a lot DEV-43884 EXT-3207: In Build Dialog, Under Texture Tab, should say "Media" and not "Media URL" DEV-43877 EXT-3221: Warning message about whitelists in Security Tab of Media settings floater appears incorrectly DEV-43875 EXT-3224: Media Text Box in the Build settings: Texture should be a label and not a text box DEV-43477 Popup for adding media to only one face is misleading Reviewed by Sam --- indra/newview/llfloatertools.cpp | 20 ++------------------ indra/newview/llpanelmediasettingsgeneral.cpp | 9 +++++++-- indra/newview/llpanelmediasettingsgeneral.h | 2 +- indra/newview/llpanelmediasettingssecurity.cpp | 3 +++ indra/newview/skins/default/xui/en/floater_tools.xml | 5 ++--- indra/newview/skins/default/xui/en/notifications.xml | 2 +- .../default/xui/en/panel_media_settings_general.xml | 2 +- 7 files changed, 17 insertions(+), 26 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index 6ba032c152..317399ad8b 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -1080,7 +1080,7 @@ void LLFloaterTools::getMediaState() { LLObjectSelectionHandle selected_objects =LLSelectMgr::getInstance()->getSelection(); LLViewerObject* first_object = selected_objects->getFirstObject(); - LLLineEditor* media_info = getChild("media_info"); + LLTextBox* media_info = getChild("media_info"); if( !(first_object && first_object->getPCode() == LL_PCODE_VOLUME @@ -1088,12 +1088,6 @@ void LLFloaterTools::getMediaState() )) { childSetEnabled("Add_Media", FALSE); -/* childSetEnabled("media_tex", FALSE); - childSetEnabled("add_media", FALSE); - childSetEnabled("delete_media", FALSE); - childSetEnabled("edit_media", FALSE); - childSetEnabled("media_info", FALSE); - media_info->setEnabled(FALSE);*/ media_info->clear(); clearMediaSettings(); return; @@ -1105,13 +1099,6 @@ void LLFloaterTools::getMediaState() if(!has_media_capability) { childSetEnabled("Add_Media", FALSE); - /* childSetEnabled("media_tex", FALSE); - childSetEnabled("add_media", FALSE); - childSetEnabled("delete_media", FALSE); - childSetEnabled("edit_media", FALSE); - childSetEnabled("media_info", FALSE); - media_info->setEnabled(FALSE); - media_info->clear();*/ LL_WARNS("LLFloaterTools: media") << "Media not enabled (no capability) in this region!" << LL_ENDL; clearMediaSettings(); return; @@ -1233,7 +1220,6 @@ void LLFloaterTools::getMediaState() childSetEnabled( "edit_media", bool_has_media & editable ); childSetEnabled( "delete_media", bool_has_media & editable ); childSetEnabled( "add_media", ( ! bool_has_media ) & editable ); - media_info->setEnabled(false); // TODO: display a list of all media on the face - use 'identical' flag } else // not all face has media but at least one does. @@ -1260,8 +1246,6 @@ void LLFloaterTools::getMediaState() } } - media_info->setEnabled(false); - media_info->setTentative(true); childSetEnabled("media_tex", TRUE); childSetEnabled( "edit_media", TRUE); childSetEnabled( "delete_media", TRUE); @@ -1392,7 +1376,7 @@ void LLFloaterTools::updateMediaTitle() if ( ! media_title.empty() ) { // update the UI widget - LLLineEditor* media_title_field = getChild("media_info"); + LLTextBox* media_title_field = getChild("media_info"); if ( media_title_field ) { media_title_field->setText( media_title ); diff --git a/indra/newview/llpanelmediasettingsgeneral.cpp b/indra/newview/llpanelmediasettingsgeneral.cpp index 3fa0e7bf8f..88eba14553 100644 --- a/indra/newview/llpanelmediasettingsgeneral.cpp +++ b/indra/newview/llpanelmediasettingsgeneral.cpp @@ -94,7 +94,7 @@ BOOL LLPanelMediaSettingsGeneral::postBuild() mAutoScale = getChild< LLCheckBoxCtrl >( LLMediaEntry::AUTO_SCALE_KEY ); mAutoZoom = getChild< LLCheckBoxCtrl >( LLMediaEntry::AUTO_ZOOM_KEY ); mControls = getChild< LLComboBox >( LLMediaEntry::CONTROLS_KEY ); - mCurrentURL = getChild< LLLineEditor >( LLMediaEntry::CURRENT_URL_KEY ); + mCurrentURL = getChild< LLTextBox >( LLMediaEntry::CURRENT_URL_KEY ); mFirstClick = getChild< LLCheckBoxCtrl >( LLMediaEntry::FIRST_CLICK_INTERACT_KEY ); mHeightPixels = getChild< LLSpinCtrl >( LLMediaEntry::HEIGHT_PIXELS_KEY ); mHomeURL = getChild< LLLineEditor >( LLMediaEntry::HOME_URL_KEY ); @@ -284,7 +284,7 @@ void LLPanelMediaSettingsGeneral::initValues( void* userdata, const LLSD& media_ { LLMediaEntry::AUTO_SCALE_KEY, self->mAutoScale, "LLCheckBoxCtrl" }, { LLMediaEntry::AUTO_ZOOM_KEY, self->mAutoZoom, "LLCheckBoxCtrl" }, { LLMediaEntry::CONTROLS_KEY, self->mControls, "LLComboBox" }, - { LLMediaEntry::CURRENT_URL_KEY, self->mCurrentURL, "LLLineEditor" }, + { LLMediaEntry::CURRENT_URL_KEY, self->mCurrentURL, "LLTextBox" }, { LLMediaEntry::HEIGHT_PIXELS_KEY, self->mHeightPixels, "LLSpinCtrl" }, { LLMediaEntry::HOME_URL_KEY, self->mHomeURL, "LLLineEditor" }, { LLMediaEntry::FIRST_CLICK_INTERACT_KEY, self->mFirstClick, "LLCheckBoxCtrl" }, @@ -518,4 +518,9 @@ void LLPanelMediaSettingsGeneral::updateCurrentUrl() bool identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func_current_url, value_str ); mCurrentURL->setText(value_str); mCurrentURL->setTentative(identical); + + if ( LLPanelMediaSettingsGeneral::isMultiple() ) + { + mCurrentURL->setText(LLTrans::getString("Multiple Media")); + } } diff --git a/indra/newview/llpanelmediasettingsgeneral.h b/indra/newview/llpanelmediasettingsgeneral.h index 7782b25d63..c6895b1dc9 100644 --- a/indra/newview/llpanelmediasettingsgeneral.h +++ b/indra/newview/llpanelmediasettingsgeneral.h @@ -99,7 +99,7 @@ private: LLSpinCtrl* mWidthPixels; LLSpinCtrl* mHeightPixels; LLLineEditor* mHomeURL; - LLLineEditor* mCurrentURL; + LLTextBox* mCurrentURL; LLMediaCtrl* mPreviewMedia; LLTextBox* mFailWhiteListText; }; diff --git a/indra/newview/llpanelmediasettingssecurity.cpp b/indra/newview/llpanelmediasettingssecurity.cpp index d87c7608d5..aea6b0aa3b 100644 --- a/indra/newview/llpanelmediasettingssecurity.cpp +++ b/indra/newview/llpanelmediasettingssecurity.cpp @@ -167,6 +167,9 @@ void LLPanelMediaSettingsSecurity::initValues( void* userdata, const LLSD& media data_set[ i ].ctrl_ptr->setTentative( media_settings[ tentative_key ].asBoolean() ); }; }; + + // initial update - hides/shows status messages etc. + self->updateWhitelistEnableStatus(); } //////////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index e3851de8e7..5e68850e30 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -2669,16 +2669,15 @@ even though the user gets a free copy. top_pad="5" name="media_tex" width="260"> - Media URL + Media -