From a99449bea167ba4710d7cc32a3961d0499bf6e09 Mon Sep 17 00:00:00 2001 From: Jiao Li Date: Wed, 7 Oct 2009 08:18:51 +0000 Subject: DEV-40215, DEV-40829,DEV-40374 ,DEV-40197, DEV-40749, DEV-3877 -- reviewed by rick --- indra/newview/llpanelmediasettingsgeneral.cpp | 103 ++++++++++++-------------- 1 file changed, 47 insertions(+), 56 deletions(-) (limited to 'indra/newview/llpanelmediasettingsgeneral.cpp') diff --git a/indra/newview/llpanelmediasettingsgeneral.cpp b/indra/newview/llpanelmediasettingsgeneral.cpp index be40d6fb5f..1ae6b23b2d 100644 --- a/indra/newview/llpanelmediasettingsgeneral.cpp +++ b/indra/newview/llpanelmediasettingsgeneral.cpp @@ -49,6 +49,8 @@ #include "llpanelcontents.h" #include "llpluginclassmedia.h" #include "llfloatermediasettings.h" +#include "llfloatertools.h" +#include "lltrans.h" //////////////////////////////////////////////////////////////////////////////// // @@ -155,43 +157,11 @@ void LLPanelMediaSettingsGeneral::draw() }; // current URL can change over time. - updateCurrentURL(); +// updateCurrentURL(); // enable/disable RESRET button depending on permissions // since this is the same as a navigate action - U32 owner_mask_on; - U32 owner_mask_off; - U32 valid_owner_perms = LLSelectMgr::getInstance()->selectGetPerm( PERM_OWNER, - &owner_mask_on, &owner_mask_off ); - U32 group_mask_on; - U32 group_mask_off; - U32 valid_group_perms = LLSelectMgr::getInstance()->selectGetPerm( PERM_GROUP, - &group_mask_on, &group_mask_off ); - U32 everyone_mask_on; - U32 everyone_mask_off; - S32 valid_everyone_perms = LLSelectMgr::getInstance()->selectGetPerm( PERM_EVERYONE, - &everyone_mask_on, &everyone_mask_off ); - - bool user_can_press_reset = false; - - // if perms we got back are valid - if ( valid_owner_perms && - valid_group_perms && - valid_everyone_perms ) - { - // if user is allowed to press the RESET button - if ( ( owner_mask_on & PERM_MODIFY ) || - ( group_mask_on & PERM_MODIFY ) || - ( group_mask_on & PERM_MODIFY ) ) - { - user_can_press_reset = true; - } - else - // user is NOT allowed to press the RESET button - { - user_can_press_reset = false; - }; - }; + bool user_can_press_reset = gFloaterTools->selectedMediaEditable(); // several places modify this widget so we must collect states in one place if ( reset_button_is_active ) @@ -216,7 +186,7 @@ void LLPanelMediaSettingsGeneral::draw() //////////////////////////////////////////////////////////////////////////////// // static -void LLPanelMediaSettingsGeneral::clearValues( void* userdata ) +void LLPanelMediaSettingsGeneral::clearValues( void* userdata, bool editable) { LLPanelMediaSettingsGeneral *self =(LLPanelMediaSettingsGeneral *)userdata; self->mAltImageEnable ->clear(); @@ -230,12 +200,23 @@ void LLPanelMediaSettingsGeneral::clearValues( void* userdata ) self->mHeightPixels->clear(); self->mHomeURL->clear(); self->mWidthPixels->clear(); + self->mAltImageEnable ->setEnabled(editable); + self->mAutoLoop ->setEnabled(editable); + self->mAutoPlay ->setEnabled(editable); + self->mAutoScale ->setEnabled(editable); + self->mAutoZoom ->setEnabled(editable); + self->mControls ->setEnabled(editable); + self->mCurrentURL ->setEnabled(editable); + self->mFirstClick ->setEnabled(editable); + self->mHeightPixels ->setEnabled(editable); + self->mHomeURL ->setEnabled(editable); + self->mWidthPixels ->setEnabled(editable); self->mPreviewMedia->unloadMediaSource(); } //////////////////////////////////////////////////////////////////////////////// // static -void LLPanelMediaSettingsGeneral::initValues( void* userdata, const LLSD& media_settings ) +void LLPanelMediaSettingsGeneral::initValues( void* userdata, const LLSD& media_settings ,bool editable) { LLPanelMediaSettingsGeneral *self =(LLPanelMediaSettingsGeneral *)userdata; @@ -243,6 +224,29 @@ void LLPanelMediaSettingsGeneral::initValues( void* userdata, const LLSD& media_ //llinfos << ll_pretty_print_sd(media_settings) << llendl; //llinfos << "---------------" << llendl; + // IF all the faces have media (or all dont have media) + if ( LLFloaterMediaSettings::getInstance()->mIdenticalHasMediaInfo ) + { + if(LLFloaterMediaSettings::getInstance()->mMultipleMedia) + { + self->clearValues(self, editable); + // only show multiple + self->mHomeURL ->setText(LLTrans::getString("Multiple Media")); + return; + } + + } + else + { + if(LLFloaterMediaSettings::getInstance()->mMultipleValidMedia) + { + self->clearValues(self, editable); + // only show multiple + self->mHomeURL ->setText(LLTrans::getString("Multiple Media")); + return; + } + + } std::string base_key( "" ); std::string tentative_key( "" ); @@ -293,10 +297,11 @@ void LLPanelMediaSettingsGeneral::initValues( void* userdata, const LLSD& media_ static_cast< LLSpinCtrl* >( data_set[ i ].ctrl_ptr )-> setValue( media_settings[ base_key ].asInteger() ); + data_set[ i ].ctrl_ptr->setEnabled(editable); data_set[ i ].ctrl_ptr->setTentative( media_settings[ tentative_key ].asBoolean() ); }; }; - + // interrogates controls and updates widgets as required self->updateMediaPreview(); self->updateCurrentURL(); @@ -322,25 +327,11 @@ void LLPanelMediaSettingsGeneral::updateMediaPreview() // Helper to set current URL void LLPanelMediaSettingsGeneral::updateCurrentURL() { - if( mPreviewMedia ) + if( mCurrentURL->getText().empty() ) { - LLPluginClassMedia* media_plugin = mPreviewMedia->getMediaPlugin(); - if( media_plugin ) - { - // get current URL from plugin and display - std::string current_location = media_plugin->getLocation(); - if ( current_location.length() ) - { - childSetText( "current_url", current_location ); - } - else - // current location may be empty so we need to clear it - { - const std::string empty_string( "" ); - childSetText( "current_url", empty_string ); - }; - }; - }; + childSetText( "current_url", mHomeURL->getText() ); + } + } //////////////////////////////////////////////////////////////////////////////// @@ -374,7 +365,7 @@ void LLPanelMediaSettingsGeneral::onBtnResetCurrentUrl() void LLPanelMediaSettingsGeneral::apply( void* userdata ) { LLPanelMediaSettingsGeneral *self =(LLPanelMediaSettingsGeneral *)userdata; - + self->mHomeURL->onCommit(); // build LLSD Fragment LLSD media_data_general; self->getValues(media_data_general); -- cgit v1.3 From df48e66f7cc6711f1738e3a2817cf3b9a810c088 Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Wed, 7 Oct 2009 12:26:42 -0700 Subject: DEV-39168 - bounce back to the current URL (or, the home URL if current URL is "") if the server denies navigation This refactors some of the bounceBack code into LLVOVolume. It also changes an important rule: the edit panel now *will* send the current URL to the server when you hit "OK". This change was done so that if autoplay is on, we make sure the server gets the right data. --- indra/newview/llmediadataclient.cpp | 27 ++-------- indra/newview/llmediadataclient.h | 3 +- indra/newview/llpanelmediasettingsgeneral.cpp | 3 +- indra/newview/llvovolume.cpp | 73 ++++++++++++++++++++++++++- indra/newview/llvovolume.h | 13 ++++- 5 files changed, 91 insertions(+), 28 deletions(-) (limited to 'indra/newview/llpanelmediasettingsgeneral.cpp') diff --git a/indra/newview/llmediadataclient.cpp b/indra/newview/llmediadataclient.cpp index da5e68af71..4dde381e97 100644 --- a/indra/newview/llmediadataclient.cpp +++ b/indra/newview/llmediadataclient.cpp @@ -568,8 +568,10 @@ void LLObjectMediaNavigateClient::Responder::error(U32 status, const std::string } else { // bounce the face back - bounceBack(); LL_WARNS("LLMediaDataClient") << *(getRequest()) << " Error navigating: http code=" << status << LL_ENDL; + const LLSD &payload = getRequest()->getPayload(); + // bounce the face back + getRequest()->getObject()->mediaNavigateBounceBack((LLSD::Integer)payload[LLTextureEntry::TEXTURE_INDEX_KEY]); } } @@ -586,8 +588,9 @@ void LLObjectMediaNavigateClient::Responder::result(const LLSD& content) if (ERROR_PERMISSION_DENIED_CODE == error_code) { LL_WARNS("LLMediaDataClient") << *(getRequest()) << " Navigation denied: bounce back" << LL_ENDL; + const LLSD &payload = getRequest()->getPayload(); // bounce the face back - bounceBack(); + getRequest()->getObject()->mediaNavigateBounceBack((LLSD::Integer)payload[LLTextureEntry::TEXTURE_INDEX_KEY]); } else { LL_WARNS("LLMediaDataClient") << *(getRequest()) << " Error navigating: code=" << @@ -600,23 +603,3 @@ void LLObjectMediaNavigateClient::Responder::result(const LLSD& content) LLMediaDataClient::Responder::result(content); } } - - -void LLObjectMediaNavigateClient::Responder::bounceBack() -{ - const LLSD &payload = getRequest()->getPayload(); - U8 texture_index = (U8)(LLSD::Integer)payload[LLTextureEntry::TEXTURE_INDEX_KEY]; - viewer_media_t impl = getRequest()->getObject()->getMediaImpl(texture_index); - // Find the media entry for this navigate - LLMediaEntry* mep = NULL; - LLTextureEntry *te = getRequest()->getObject()->getTE(texture_index); - if(te) - { - mep = te->getMediaData(); - } - - if (mep && impl) - { -// impl->navigateTo(mep->getCurrentURL(), "", false, true); - } -} diff --git a/indra/newview/llmediadataclient.h b/indra/newview/llmediadataclient.h index 59c4334251..949e7239be 100644 --- a/indra/newview/llmediadataclient.h +++ b/indra/newview/llmediadataclient.h @@ -166,6 +166,7 @@ private: static F64 getObjectScore(const ll_vo_volume_ptr_t &obj); }; + // PriorityQueue class PriorityQueue : public std::priority_queue< request_ptr_t, std::vector, @@ -254,7 +255,7 @@ protected: virtual void error(U32 status, const std::string& reason); virtual void result(const LLSD &content); private: - void bounceBack(); + void mediaNavigateBounceBack(); }; }; diff --git a/indra/newview/llpanelmediasettingsgeneral.cpp b/indra/newview/llpanelmediasettingsgeneral.cpp index be40d6fb5f..725aa6327f 100644 --- a/indra/newview/llpanelmediasettingsgeneral.cpp +++ b/indra/newview/llpanelmediasettingsgeneral.cpp @@ -393,8 +393,7 @@ void LLPanelMediaSettingsGeneral::getValues( LLSD &fill_me_in ) fill_me_in[LLMediaEntry::AUTO_SCALE_KEY] = mAutoScale->getValue(); fill_me_in[LLMediaEntry::AUTO_ZOOM_KEY] = mAutoZoom->getValue(); fill_me_in[LLMediaEntry::CONTROLS_KEY] = mControls->getCurrentIndex(); - // XXX Don't send current URL! - //fill_me_in[LLMediaEntry::CURRENT_URL_KEY] = mCurrentURL->getValue(); + fill_me_in[LLMediaEntry::CURRENT_URL_KEY] = mCurrentURL->getValue(); fill_me_in[LLMediaEntry::HEIGHT_PIXELS_KEY] = mHeightPixels->getValue(); fill_me_in[LLMediaEntry::HOME_URL_KEY] = mHomeURL->getValue(); fill_me_in[LLMediaEntry::FIRST_CLICK_INTERACT_KEY] = mFirstClick->getValue(); diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 428de078de..83e65af054 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1713,6 +1713,72 @@ void LLVOVolume::syncMediaData(S32 texture_index, const LLSD &media_data, bool m // << ((NULL == te->getMediaData()) ? "NULL MEDIA DATA" : ll_pretty_print_sd(te->getMediaData()->asLLSD())) << llendl; } +void LLVOVolume::mediaNavigateBounceBack(U8 texture_index) +{ + // Find the media entry for this navigate + const LLMediaEntry* mep = NULL; + viewer_media_t impl = getMediaImpl(texture_index); + LLTextureEntry *te = getTE(texture_index); + if(te) + { + mep = te->getMediaData(); + } + + if (mep && impl) + { + std::string url = mep->getCurrentURL(); + if (url.empty()) + { + url = mep->getHomeURL(); + } + if (! url.empty()) + { + LL_INFOS("LLMediaDataClient") << "bouncing back to URL: " << url << LL_ENDL; + impl->navigateTo(url, "", false, true); + } + } +} + +bool LLVOVolume::hasNavigatePermission(const LLMediaEntry* media_entry) +{ + // NOTE: This logic duplicates the logic in the server (in particular, in llmediaservice.cpp). + if (NULL == media_entry ) return false; // XXX should we assert here? + + // The agent has permissions to navigate if: + // - agent has edit permissions, or + // - world permissions are on, or + // - group permissions are on, and agent_id is in the group, or + // - agent permissions are on, and agent_id is the owner + + if (permModify()) + { + return true; + } + + U8 media_perms = media_entry->getPermsInteract(); + + // World permissions + if (0 != (media_perms & LLMediaEntry::PERM_ANYONE)) + { + return true; + } + + // Group permissions + else if (0 != (media_perms & LLMediaEntry::PERM_GROUP) && permGroupOwner()) + { + return true; + } + + // Owner permissions + else if (0 != (media_perms & LLMediaEntry::PERM_OWNER) && permYouOwner()) + { + return true; + } + + return false; + +} + void LLVOVolume::mediaEvent(LLViewerMediaImpl *impl, LLPluginClassMedia* plugin, LLViewerMediaObserver::EMediaEvent event) { switch(event) @@ -1746,6 +1812,10 @@ void LLVOVolume::mediaEvent(LLViewerMediaImpl *impl, LLPluginClassMedia* plugin, { block_navigation = true; } + if (!block_navigation && !hasNavigatePermission(mep)) + { + block_navigation = true; + } } else { @@ -1757,8 +1827,7 @@ void LLVOVolume::mediaEvent(LLViewerMediaImpl *impl, LLPluginClassMedia* plugin, llinfos << "blocking navigate to URI " << new_location << llendl; // "bounce back" to the current URL from the media entry - // NOTE: the only way block_navigation can be true is if we found the media entry, so we're guaranteed here that mep is not NULL. - impl->navigateTo(mep->getCurrentURL()); + mediaNavigateBounceBack(face_index); } else { diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h index 250c3ed917..bb2b890000 100644 --- a/indra/newview/llvovolume.h +++ b/indra/newview/llvovolume.h @@ -233,7 +233,18 @@ public: BOOL canBeFlexible() const; BOOL setIsFlexible(BOOL is_flexible); - void updateObjectMediaData(const LLSD &media_data_duples); + // Functions that deal with media, or media navigation + + // Update this object's media data with the given media data array + // (typically this is only called upon a response from a server request) + void updateObjectMediaData(const LLSD &media_data_array); + + // Bounce back media at the given index to its current URL (or home URL, if current URL is empty) + void mediaNavigateBounceBack(U8 texture_index); + + // Returns whether or not this object has permission to navigate the given media entry + bool hasNavigatePermission(const LLMediaEntry* media_entry); + void mediaEvent(LLViewerMediaImpl *impl, LLPluginClassMedia* plugin, LLViewerMediaObserver::EMediaEvent event); // Sync the given media data with the impl and the given te -- cgit v1.3 From ec84b639ed71c1dac8457867148d8aea6d595685 Mon Sep 17 00:00:00 2001 From: James Cook Date: Wed, 7 Oct 2009 20:54:31 +0000 Subject: EXT-1339 Create onClose method in LLFloater, and remove most bindings to mCloseSignal. In the vast majority of cases, mCloseSignal is being bound to an onClose function. Just make it virtual and be done with it. Renamed a couple of LLPanel close methods to onClosePanel() to distinguish them. Reviewed with Richard. --- indra/llui/llfloater.cpp | 3 ++- indra/llui/llfloater.h | 13 ++++++++++--- indra/newview/llfloaterbuy.cpp | 5 ++--- indra/newview/llfloaterbuy.h | 2 +- indra/newview/llfloaterhelpbrowser.cpp | 7 +++---- indra/newview/llfloaterhelpbrowser.h | 2 +- indra/newview/llfloatermediabrowser.cpp | 2 ++ indra/newview/llfloatermediasettings.cpp | 6 ++---- indra/newview/llfloatermediasettings.h | 5 +++-- indra/newview/llfloateropenobject.h | 1 - indra/newview/llfloaterpay.cpp | 6 +++--- indra/newview/llfloaterpreference.cpp | 5 ++--- indra/newview/llfloaterpreference.h | 10 ++++------ indra/newview/llfloatersellland.cpp | 5 ++--- indra/newview/llfloatertools.cpp | 7 +++---- indra/newview/llfloatertools.h | 2 +- indra/newview/llfloateruipreview.cpp | 6 ++---- indra/newview/llfloateruipreview.h | 7 +++---- indra/newview/llfloatervoicedevicesettings.cpp | 7 ++++--- indra/newview/llfloatervoicedevicesettings.h | 7 +++---- indra/newview/llfloaterworldmap.cpp | 5 ++--- indra/newview/llfloaterworldmap.h | 5 ++--- indra/newview/llimfloater.cpp | 5 ++--- indra/newview/llimfloater.h | 5 +---- indra/newview/llimpanel.cpp | 5 ++--- indra/newview/llimpanel.h | 2 +- indra/newview/llinspectavatar.cpp | 7 +++---- indra/newview/llinspectobject.cpp | 7 +++---- indra/newview/llnearbychat.h | 6 ++---- indra/newview/llpanelavatar.h | 4 ++-- indra/newview/llpanelmediasettingsgeneral.cpp | 3 ++- indra/newview/llpanelmediasettingsgeneral.h | 6 +++--- indra/newview/llpanelpicks.cpp | 3 ++- indra/newview/llpanelpicks.h | 2 +- indra/newview/llpanelprofile.cpp | 2 +- indra/newview/llpreviewanim.cpp | 5 ++--- indra/newview/llpreviewanim.h | 2 +- indra/newview/llpreviewgesture.cpp | 8 ++++---- indra/newview/llpreviewgesture.h | 4 +--- indra/newview/llsyswellwindow.cpp | 4 ++-- indra/newview/llsyswellwindow.h | 2 +- indra/newview/lltexturectrl.cpp | 14 ++++++-------- 42 files changed, 99 insertions(+), 115 deletions(-) (limited to 'indra/newview/llpanelmediasettingsgeneral.cpp') diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 564e4d748f..b7a15a2b33 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -664,7 +664,8 @@ void LLFloater::closeFloater(bool app_quitting) dirtyRect(); - // Close callback + // Close callbacks + onClose(app_quitting); mCloseSignal(this, LLSD(app_quitting)); // Hide or Destroy diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index 1dc5177f81..17ffc94014 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -208,8 +208,8 @@ public: virtual BOOL handleMiddleMouseDown(S32 x, S32 y, MASK mask); virtual void draw(); - // *TODO: Eliminate this in favor of mOpenSignal virtual void onOpen(const LLSD& key) {} + virtual void onClose(bool app_quitting) {} // This cannot be "const" until all derived floater canClose() // methods are const as well. JC @@ -293,11 +293,18 @@ private: void addResizeCtrls(); void addDragHandle(); +public: + // Called when floater is opened, passes mKey + // Public so external views or floaters can watch for this floater opening + commit_signal_t mOpenSignal; + + // Called when floater is closed, passes app_qitting as LLSD() + // Public so external views or floaters can watch for this floater closing + commit_signal_t mCloseSignal; + protected: std::string mRectControl; std::string mVisibilityControl; - commit_signal_t mOpenSignal; // Called when floater is opened, passes mKey - commit_signal_t mCloseSignal; // Called when floater is closed, passes app_qitting as LLSD() LLSD mKey; // Key used for retrieving instances; set (for now) by LLFLoaterReg LLDragHandle* mDragHandle; diff --git a/indra/newview/llfloaterbuy.cpp b/indra/newview/llfloaterbuy.cpp index 473d5ce827..9d07362edc 100644 --- a/indra/newview/llfloaterbuy.cpp +++ b/indra/newview/llfloaterbuy.cpp @@ -74,8 +74,6 @@ BOOL LLFloaterBuy::postBuild() // mid-session and the saved rect is off-center. center(); - mCloseSignal.connect(boost::bind(&LLFloaterBuy::onClose, this)); - return TRUE; } @@ -310,7 +308,8 @@ void LLFloaterBuy::onClickCancel() closeFloater(); } -void LLFloaterBuy::onClose() +// virtual +void LLFloaterBuy::onClose(bool app_quitting) { mObjectSelection.clear(); } diff --git a/indra/newview/llfloaterbuy.h b/indra/newview/llfloaterbuy.h index 2ec66136b2..ab38e082dc 100644 --- a/indra/newview/llfloaterbuy.h +++ b/indra/newview/llfloaterbuy.h @@ -56,6 +56,7 @@ public: ~LLFloaterBuy(); /*virtual*/ BOOL postBuild(); + /*virtual*/ void onClose(bool app_quitting); static void show(const LLSaleInfo& sale_info); @@ -70,7 +71,6 @@ protected: void onClickBuy(); void onClickCancel(); - void onClose(); private: LLSafeHandle mObjectSelection; diff --git a/indra/newview/llfloaterhelpbrowser.cpp b/indra/newview/llfloaterhelpbrowser.cpp index 6b0b5ed5e0..2e0ae3265e 100644 --- a/indra/newview/llfloaterhelpbrowser.cpp +++ b/indra/newview/llfloaterhelpbrowser.cpp @@ -50,9 +50,6 @@ LLFloaterHelpBrowser::LLFloaterHelpBrowser(const LLSD& key) : LLFloater(key) { - // really really destroy the help browser when it's closed, it'll be recreated. - // *TODO: when onClose() is resurrected as a virtual, this bind can go away. - mCloseSignal.connect(boost::bind(&LLFloaterHelpBrowser::onClose, this)); } BOOL LLFloaterHelpBrowser::postBuild() @@ -79,8 +76,10 @@ void LLFloaterHelpBrowser::buildURLHistory() } } -void LLFloaterHelpBrowser::onClose() +//virtual +void LLFloaterHelpBrowser::onClose(bool app_quitting) { + // really really destroy the help browser when it's closed, it'll be recreated. destroy(); // really destroy this dialog on closure, it's relatively heavyweight. } diff --git a/indra/newview/llfloaterhelpbrowser.h b/indra/newview/llfloaterhelpbrowser.h index 14a276b428..b66a67c4d6 100644 --- a/indra/newview/llfloaterhelpbrowser.h +++ b/indra/newview/llfloaterhelpbrowser.h @@ -47,7 +47,7 @@ class LLFloaterHelpBrowser : LLFloaterHelpBrowser(const LLSD& key); /*virtual*/ BOOL postBuild(); - void onClose(); + /*virtual*/ void onClose(bool app_quitting); // inherited from LLViewerMediaObserver /*virtual*/ void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event); diff --git a/indra/newview/llfloatermediabrowser.cpp b/indra/newview/llfloatermediabrowser.cpp index 9b7f3305e5..5673550fbe 100644 --- a/indra/newview/llfloatermediabrowser.cpp +++ b/indra/newview/llfloatermediabrowser.cpp @@ -156,6 +156,8 @@ std::string LLFloaterMediaBrowser::getSupportURL() { return getString("support_page_url"); } + +//virtual void LLFloaterMediaBrowser::onClose(bool app_quitting) { //setVisible(FALSE); diff --git a/indra/newview/llfloatermediasettings.cpp b/indra/newview/llfloatermediasettings.cpp index f67d663772..aa457de2d8 100644 --- a/indra/newview/llfloatermediasettings.cpp +++ b/indra/newview/llfloatermediasettings.cpp @@ -89,8 +89,6 @@ LLFloaterMediaSettings::~LLFloaterMediaSettings() // BOOL LLFloaterMediaSettings::postBuild() { - mCloseSignal.connect(boost::bind(&LLFloaterMediaSettings::onClose, this)); - mApplyBtn = getChild("Apply"); mApplyBtn->setClickedCallback(onBtnApply, this); @@ -156,11 +154,11 @@ void LLFloaterMediaSettings::apply() } //////////////////////////////////////////////////////////////////////////////// -void LLFloaterMediaSettings::onClose() +void LLFloaterMediaSettings::onClose(bool app_quitting) { if(mPanelMediaSettingsGeneral) { - mPanelMediaSettingsGeneral->onClose(); + mPanelMediaSettingsGeneral->onClose(app_quitting); } LLFloaterReg::hideInstance("whitelist_entry"); } diff --git a/indra/newview/llfloatermediasettings.h b/indra/newview/llfloatermediasettings.h index 10dc31b4f9..e2683039cc 100644 --- a/indra/newview/llfloatermediasettings.h +++ b/indra/newview/llfloatermediasettings.h @@ -47,7 +47,9 @@ public: LLFloaterMediaSettings(const LLSD& key); ~LLFloaterMediaSettings(); - virtual BOOL postBuild(); + /*virtual*/ BOOL postBuild(); + /*virtual*/ void onClose(bool app_quitting); + static LLFloaterMediaSettings* getInstance(); static void apply(); static void initValues( const LLSD& media_settings , bool editable); @@ -70,7 +72,6 @@ protected: LLPanelMediaSettingsPermissions* mPanelMediaSettingsPermissions; - void onClose(); static void onBtnOK(void*); static void onBtnCancel(void*); static void onBtnApply(void*); diff --git a/indra/newview/llfloateropenobject.h b/indra/newview/llfloateropenobject.h index 0df3780ac4..a61cc04941 100644 --- a/indra/newview/llfloateropenobject.h +++ b/indra/newview/llfloateropenobject.h @@ -63,7 +63,6 @@ protected: void refresh(); void draw(); virtual void onOpen(const LLSD& key); -// virtual void onClose(); void moveToInventory(bool wear); diff --git a/indra/newview/llfloaterpay.cpp b/indra/newview/llfloaterpay.cpp index 8eaa4566ea..88811d06fe 100644 --- a/indra/newview/llfloaterpay.cpp +++ b/indra/newview/llfloaterpay.cpp @@ -85,10 +85,10 @@ public: LLFloaterPay(const LLSD& key); virtual ~LLFloaterPay(); /*virtual*/ BOOL postBuild(); + /*virtual*/ void onClose(bool app_quitting); void setCallback(money_callback callback) { mCallback = callback; } - void onClose(); static void payViaObject(money_callback callback, LLSafeHandle selection); @@ -137,7 +137,6 @@ LLFloaterPay::LLFloaterPay(const LLSD& key) mTargetUUID(key.asUUID()), mTargetIsGroup(FALSE) { - mCloseSignal.connect(boost::bind(&LLFloaterPay::onClose, this)); } // Destroys the object @@ -219,7 +218,8 @@ BOOL LLFloaterPay::postBuild() return TRUE; } -void LLFloaterPay::onClose() +// virtual +void LLFloaterPay::onClose(bool app_quitting) { // Deselect the objects mObjectSelection = NULL; diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 57c043a1e0..dbee9ea309 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -357,8 +357,6 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) BOOL LLFloaterPreference::postBuild() { - mCloseSignal.connect(boost::bind(&LLFloaterPreference::onClose, this)); - LLTabContainer* tabcontainer = getChild("pref core"); if (!tabcontainer->selectTab(gSavedSettings.getS32("LastPrefTab"))) tabcontainer->selectFirstTab(); @@ -566,7 +564,8 @@ void LLFloaterPreference::setHardwareDefaults() refreshEnabledGraphics(); } -void LLFloaterPreference::onClose() +//virtual +void LLFloaterPreference::onClose(bool app_quitting) { gSavedSettings.setS32("LastPrefTab", getChild("pref core")->getCurrentPanelIndex()); LLPanelLogin::setAlwaysRefresh(false); diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index ce31abcd9e..34723b8c7e 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -70,8 +70,9 @@ public: void apply(); void cancel(); /*virtual*/ void draw(); - virtual BOOL postBuild(); - virtual void onOpen(const LLSD& key); + /*virtual*/ BOOL postBuild(); + /*virtual*/ void onOpen(const LLSD& key); + /*virtual*/ void onClose(bool app_quitting); // static data update, called from message handler static void updateUserInfo(const std::string& visibility, bool im_via_email, const std::string& email); @@ -79,10 +80,7 @@ public: // refresh all the graphics preferences menus static void refreshEnabledGraphics(); -protected: - - void onClose(); - +protected: void onBtnOK(); void onBtnCancel(); void onBtnApply(); diff --git a/indra/newview/llfloatersellland.cpp b/indra/newview/llfloatersellland.cpp index 9e203c4269..43d31aa30a 100644 --- a/indra/newview/llfloatersellland.cpp +++ b/indra/newview/llfloatersellland.cpp @@ -58,7 +58,7 @@ class LLFloaterSellLandUI public: LLFloaterSellLandUI(const LLSD& key); virtual ~LLFloaterSellLandUI(); - void onClose(); + /*virtual*/ void onClose(bool app_quitting); private: class SelectionObserver : public LLParcelObserver @@ -131,7 +131,6 @@ LLFloaterSellLandUI::LLFloaterSellLandUI(const LLSD& key) mRegion(0) { LLViewerParcelMgr::getInstance()->addObserver(&mParcelSelectionObserver); - mCloseSignal.connect(boost::bind(&LLFloaterSellLandUI::onClose, this)); } LLFloaterSellLandUI::~LLFloaterSellLandUI() @@ -140,7 +139,7 @@ LLFloaterSellLandUI::~LLFloaterSellLandUI() } // Because we are single_instance, we are not destroyed on close. -void LLFloaterSellLandUI::onClose() +void LLFloaterSellLandUI::onClose(bool app_quitting) { // Must release parcel selection to allow land to deselect, see EXT-803 mParcelSelection = NULL; diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index 500dc1e50c..320647ff1a 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -200,9 +200,7 @@ LLPCode toolData[]={ LL_PCODE_LEGACY_GRASS}; BOOL LLFloaterTools::postBuild() -{ - mCloseSignal.connect(boost::bind(&LLFloaterTools::onClose, this)); - +{ // Hide until tool selected setVisible(FALSE); @@ -726,7 +724,8 @@ void LLFloaterTools::onOpen(const LLSD& key) //gMenuBarView->setItemVisible("BuildTools", TRUE); } -void LLFloaterTools::onClose() +// virtual +void LLFloaterTools::onClose(bool app_quitting) { mTab->setVisible(FALSE); diff --git a/indra/newview/llfloatertools.h b/indra/newview/llfloatertools.h index e5d1174044..ffccf93943 100644 --- a/indra/newview/llfloatertools.h +++ b/indra/newview/llfloatertools.h @@ -74,6 +74,7 @@ public: /*virtual*/ void onOpen(const LLSD& key); /*virtual*/ BOOL canClose(); + /*virtual*/ void onClose(bool app_quitting); /*virtual*/ void draw(); /*virtual*/ void onFocusReceived(); @@ -109,7 +110,6 @@ public: bool selectedMediaEditable(); private: - void onClose(); void refresh(); void refreshMedia(); void getMediaState(); diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp index 266252efea..98ca33c9cc 100644 --- a/indra/newview/llfloateruipreview.cpp +++ b/indra/newview/llfloateruipreview.cpp @@ -283,8 +283,6 @@ LLFloaterUIPreview::~LLFloaterUIPreview() // Perform post-build setup (defined in superclass) BOOL LLFloaterUIPreview::postBuild() { - mCloseSignal.connect(boost::bind(&LLFloaterUIPreview::onClose, this, _2)); - LLPanel* main_panel_tmp = getChild("main_panel"); // get a pointer to the main panel in order to... mFileList = main_panel_tmp->getChild("name_list"); // save pointer to file list // Double-click opens the floater, for convenience @@ -442,9 +440,9 @@ void LLFloaterUIPreview::onClickExportSchema() // Close click handler -- delete my displayed floater if it exists -void LLFloaterUIPreview::onClose(const LLSD& app_quitting) +void LLFloaterUIPreview::onClose(bool app_quitting) { - if(!app_quitting.asBoolean() && mDisplayedFloater) + if(!app_quitting && mDisplayedFloater) { onClickCloseDisplayedFloater(PRIMARY_FLOATER); onClickCloseDisplayedFloater(SECONDARY_FLOATER); diff --git a/indra/newview/llfloateruipreview.h b/indra/newview/llfloateruipreview.h index b8c378e2e9..2a98c90727 100644 --- a/indra/newview/llfloateruipreview.h +++ b/indra/newview/llfloateruipreview.h @@ -96,7 +96,9 @@ public: std::string getLocStr(S32 ID); // fetches the localization string based on what is selected in the drop-down menu void displayFloater(BOOL click, S32 ID, bool save = false); // needs to be public so live file can call it when it finds an update - BOOL postBuild(); // post-build setup (called by superclass' constructor) + /*virtual*/ BOOL postBuild(); + /*virtual*/ void onClose(bool app_quitting); + void refreshList(); // refresh list (empty it out and fill it up from scratch) void addFloaterEntry(const std::string& path); // add a single file's entry to the list of floaters @@ -116,9 +118,6 @@ public: typedef std::map > DiffMap; DiffMap mDiffsMap; // map, of filename to pair of list of changed element paths and list of errors -protected: - void onClose(const LLSD& app_quitting); - private: // XUI elements for this floater LLScrollListCtrl* mFileList; // scroll list control for file list diff --git a/indra/newview/llfloatervoicedevicesettings.cpp b/indra/newview/llfloatervoicedevicesettings.cpp index a7658d90e9..b64257b11d 100644 --- a/indra/newview/llfloatervoicedevicesettings.cpp +++ b/indra/newview/llfloatervoicedevicesettings.cpp @@ -293,11 +293,11 @@ LLFloaterVoiceDeviceSettings::LLFloaterVoiceDeviceSettings(const LLSD& seed) } BOOL LLFloaterVoiceDeviceSettings::postBuild() { - mCloseSignal.connect(boost::bind(&LLFloaterVoiceDeviceSettings::onClose, this)); - center(); return TRUE; } + +// virtual void LLFloaterVoiceDeviceSettings::onOpen(const LLSD& key) { if(mDevicePanel) @@ -306,7 +306,8 @@ void LLFloaterVoiceDeviceSettings::onOpen(const LLSD& key) } } -void LLFloaterVoiceDeviceSettings::onClose() +// virtual +void LLFloaterVoiceDeviceSettings::onClose(bool app_settings) { if(mDevicePanel) { diff --git a/indra/newview/llfloatervoicedevicesettings.h b/indra/newview/llfloatervoicedevicesettings.h index 2565bfad2b..f1603dc414 100644 --- a/indra/newview/llfloatervoicedevicesettings.h +++ b/indra/newview/llfloatervoicedevicesettings.h @@ -68,8 +68,9 @@ class LLFloaterVoiceDeviceSettings : public LLFloater public: - virtual BOOL postBuild(); + /*virtual*/ BOOL postBuild(); /*virtual*/ void onOpen(const LLSD& key); + /*virtual*/ void onClose(bool app_settings); /*virtual*/ void draw(); void apply(); void cancel(); @@ -78,9 +79,7 @@ private: protected: static void* createPanelVoiceDeviceSettings(void* user_data); - - void onClose(); - + protected: LLPanelVoiceDeviceSettings* mDevicePanel; }; diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index 098a5197df..d653d44f8c 100644 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -183,8 +183,6 @@ void* LLFloaterWorldMap::createWorldMapView(void* data) BOOL LLFloaterWorldMap::postBuild() { - mCloseSignal.connect(boost::bind(&LLFloaterWorldMap::onClose, this)); - mTabs = getChild("maptab"); if (!mTabs) return FALSE; @@ -255,7 +253,8 @@ LLFloaterWorldMap* LLFloaterWorldMap::getInstance() return LLFloaterReg::getTypedInstance("world_map"); } -void LLFloaterWorldMap::onClose() +// virtual +void LLFloaterWorldMap::onClose(bool app_quitting) { // While we're not visible, discard the overlay images we're using LLWorldMap::getInstance()->clearImageRefs(); diff --git a/indra/newview/llfloaterworldmap.h b/indra/newview/llfloaterworldmap.h index f117ea05af..6d5b7543d4 100644 --- a/indra/newview/llfloaterworldmap.h +++ b/indra/newview/llfloaterworldmap.h @@ -65,6 +65,7 @@ public: BOOL postBuild(); /*virtual*/ void onOpen(const LLSD& key); + /*virtual*/ void onClose(bool app_quitting); static void reloadIcons(void*); @@ -111,9 +112,7 @@ public: // teleport to the tracked item, if there is one void teleport(); -protected: - void onClose(); - +protected: void onGoHome(); void onLandmarkComboPrearrange(); diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index dde36ac25b..3e449e2c82 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -78,12 +78,11 @@ LLIMFloater::LLIMFloater(const LLUUID& session_id) } } - mCloseSignal.connect(boost::bind(&LLIMFloater::onClose, this)); - LLTransientFloaterMgr::getInstance()->registerTransientFloater(this); } -void LLIMFloater::onClose() +// virtual +void LLIMFloater::onClose(bool app_quitting) { LLIMModel::instance().sendLeaveSession(mSessionID, mOtherParticipantUUID); diff --git a/indra/newview/llimfloater.h b/indra/newview/llimfloater.h index a183212f04..f85a941be3 100644 --- a/indra/newview/llimfloater.h +++ b/indra/newview/llimfloater.h @@ -56,6 +56,7 @@ public: /*virtual*/ void setVisible(BOOL visible); // LLFloater overrides + /*virtual*/ void onClose(bool app_quitting); /*virtual*/ void setDocked(bool docked, bool pop_on_undock = true); // override LLFloater's minimization according to EXT-1216 /*virtual*/ void setMinimized(BOOL minimize); @@ -79,10 +80,6 @@ public: // called when docked floater's position has been set by chiclet void setPositioned(bool b) { mPositioned = b; }; - // handler for a CLOSE signal - void onClose(); - - private: static void onInputEditorFocusReceived( LLFocusableElement* caller, void* userdata ); diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index 89a885090c..4435bba0ed 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -1052,8 +1052,6 @@ LLFloaterIMPanel::~LLFloaterIMPanel() BOOL LLFloaterIMPanel::postBuild() { - mCloseSignal.connect(boost::bind(&LLFloaterIMPanel::onClose, this)); - mVisibleSignal.connect(boost::bind(&LLFloaterIMPanel::onVisibilityChange, this, _2)); mInputEditor = getChild("chat_editor"); @@ -1610,7 +1608,8 @@ void LLFloaterIMPanel::onInputEditorKeystroke(LLLineEditor* caller, void* userda } } -void LLFloaterIMPanel::onClose() +// virtual +void LLFloaterIMPanel::onClose(bool app_quitting) { setTyping(FALSE); diff --git a/indra/newview/llimpanel.h b/indra/newview/llimpanel.h index fb9b28ad16..57379b2c0d 100644 --- a/indra/newview/llimpanel.h +++ b/indra/newview/llimpanel.h @@ -198,7 +198,7 @@ public: // Check typing timeout timer. /*virtual*/ void draw(); - void onClose(); + /*virtual*/ void onClose(bool app_quitting); void onVisibilityChange(const LLSD& new_visibility); // add target ids to the session. diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index fd301505cd..4046c893c1 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -83,7 +83,7 @@ public: /*virtual*/ void onOpen(const LLSD& avatar_id); // When closing they should close their gear menu - /*virtual*/ void onClose(); + /*virtual*/ void onClose(bool app_quitting); // Inspectors close themselves when they lose focus /*virtual*/ void onFocusLost(); @@ -228,8 +228,6 @@ BOOL LLInspectAvatar::postBuild(void) getChild("volume_slider")->setCommitCallback( boost::bind(&LLInspectAvatar::onVolumeChange, this, _2)); - mCloseSignal.connect(boost::bind(&LLInspectAvatar::onClose, this)); - return TRUE; } @@ -294,7 +292,8 @@ void LLInspectAvatar::onOpen(const LLSD& data) updateVolumeSlider(); } -void LLInspectAvatar::onClose() +// virtual +void LLInspectAvatar::onClose(bool app_quitting) { getChild("gear_btn")->hideMenu(); } diff --git a/indra/newview/llinspectobject.cpp b/indra/newview/llinspectobject.cpp index 1a88bcb8f0..8c38e785e9 100644 --- a/indra/newview/llinspectobject.cpp +++ b/indra/newview/llinspectobject.cpp @@ -82,7 +82,7 @@ public: /*virtual*/ void onOpen(const LLSD& avatar_id); // Release the selection and do other cleanup - void onClose(); + /*virtual*/ void onClose(bool app_quitting); // Inspectors close themselves when they lose focus /*virtual*/ void onFocusLost(); @@ -176,8 +176,6 @@ BOOL LLInspectObject::postBuild(void) LLSelectMgr::getInstance()->mUpdateSignal.connect( boost::bind(&LLInspectObject::update, this) ); - mCloseSignal.connect( boost::bind(&LLInspectObject::onClose, this) ); - return TRUE; } @@ -251,7 +249,8 @@ void LLInspectObject::onOpen(const LLSD& data) } } -void LLInspectObject::onClose() +// virtual +void LLInspectObject::onClose(bool app_quitting) { // Release selection to deselect mObjectSelection = NULL; diff --git a/indra/newview/llnearbychat.h b/indra/newview/llnearbychat.h index 599e6b6859..7c8ffa3b94 100644 --- a/indra/newview/llnearbychat.h +++ b/indra/newview/llnearbychat.h @@ -72,11 +72,9 @@ public: void onNearbyChatContextMenuItemClicked(const LLSD& userdata); bool onNearbyChatCheckContextMenuItem(const LLSD& userdata); - virtual void onClose (bool app_quitting) { if(app_quitting) destroy(); else setVisible(false); } + /*virtual*/ void onOpen (const LLSD& key); - virtual void onOpen (const LLSD& key); - - virtual void draw (); + /*virtual*/ void draw (); private: void add_timestamped_line(const LLChat& chat, const LLColor4& color); diff --git a/indra/newview/llpanelavatar.h b/indra/newview/llpanelavatar.h index 1ed5fa4357..a03902caba 100644 --- a/indra/newview/llpanelavatar.h +++ b/indra/newview/llpanelavatar.h @@ -78,11 +78,11 @@ public: * Profile tabs should close any opened panels here. * * Called from LLPanelProfile::onOpen() before opening new profile. - * See LLPanelpicks::onClose for example. LLPanelPicks closes picture info panel + * See LLPanelPicks::onClosePanel for example. LLPanelPicks closes picture info panel * before new profile is displayed, otherwise new profile will * be hidden behind picture info panel. */ - virtual void onClose() {} + virtual void onClosePanel() {} /** * Resets controls visibility, state, etc. diff --git a/indra/newview/llpanelmediasettingsgeneral.cpp b/indra/newview/llpanelmediasettingsgeneral.cpp index 1ae6b23b2d..295415cb2d 100644 --- a/indra/newview/llpanelmediasettingsgeneral.cpp +++ b/indra/newview/llpanelmediasettingsgeneral.cpp @@ -336,7 +336,8 @@ void LLPanelMediaSettingsGeneral::updateCurrentURL() //////////////////////////////////////////////////////////////////////////////// -void LLPanelMediaSettingsGeneral::onClose() +// virtual +void LLPanelMediaSettingsGeneral::onClose(bool app_quitting) { if(mPreviewMedia) { diff --git a/indra/newview/llpanelmediasettingsgeneral.h b/indra/newview/llpanelmediasettingsgeneral.h index 527a6f5e3a..5acfa39181 100644 --- a/indra/newview/llpanelmediasettingsgeneral.h +++ b/indra/newview/llpanelmediasettingsgeneral.h @@ -48,7 +48,9 @@ class LLPanelMediaSettingsGeneral : public LLPanel { public: BOOL postBuild(); - virtual void draw(); + /*virtual*/ void draw(); + /*virtual*/ void onClose(bool app_quitting); + static void apply(void*); void getValues(LLSD &fill_me_in); @@ -62,8 +64,6 @@ public: void updateMediaPreview(); void updateCurrentURL(); - void onClose(); - protected: LLFloaterMediaSettings* mParent; diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp index e74afba25a..979e9618da 100644 --- a/indra/newview/llpanelpicks.cpp +++ b/indra/newview/llpanelpicks.cpp @@ -463,7 +463,8 @@ void LLPickItem::processProperties(void *data, EAvatarProcessorType type) LLAvatarPropertiesProcessor::instance().removeObserver(mCreatorID, this); } -void LLPanelPicks::onClose() +// virtual +void LLPanelPicks::onClosePanel() { // Toggle off Pick Info panel if it is visible. if(mPickPanel && mPickPanel->getVisible()) diff --git a/indra/newview/llpanelpicks.h b/indra/newview/llpanelpicks.h index 7ebdc3089c..18c571c735 100644 --- a/indra/newview/llpanelpicks.h +++ b/indra/newview/llpanelpicks.h @@ -77,7 +77,7 @@ public: /** * Closes LLPanelPick if it is visible. */ - /*virtual*/ void onClose(); + /*virtual*/ void onClosePanel(); private: void onClickDelete(); diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index 3bd2645be3..cda7942c1d 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -102,7 +102,7 @@ void LLPanelProfile::onOpen(const LLSD& key) { if (key.has("open_tab_name")) { - getTabContainer()[PANEL_PICKS]->onClose(); + getTabContainer()[PANEL_PICKS]->onClosePanel(); // onOpen from selected panel will be called from onTabSelected callback getTabCtrl()->selectTabByName(key["open_tab_name"]); diff --git a/indra/newview/llpreviewanim.cpp b/indra/newview/llpreviewanim.cpp index 3bda30e0c6..604faf8eb4 100644 --- a/indra/newview/llpreviewanim.cpp +++ b/indra/newview/llpreviewanim.cpp @@ -68,8 +68,6 @@ void LLPreviewAnim::endAnimCallback( void *userdata ) // virtual BOOL LLPreviewAnim::postBuild() { - mCloseSignal.connect(boost::bind(&LLPreviewAnim::onClose, this)); - const LLInventoryItem* item = getItem(); if(item) { @@ -181,7 +179,8 @@ void LLPreviewAnim::auditionAnim( void *userdata ) } } -void LLPreviewAnim::onClose() +// virtual +void LLPreviewAnim::onClose(bool app_quitting) { const LLInventoryItem *item = getItem(); diff --git a/indra/newview/llpreviewanim.h b/indra/newview/llpreviewanim.h index d24e624c32..616c5789ac 100644 --- a/indra/newview/llpreviewanim.h +++ b/indra/newview/llpreviewanim.h @@ -46,10 +46,10 @@ public: static void auditionAnim( void* userdata ); static void endAnimCallback( void *userdata ); /*virtual*/ BOOL postBuild(); + /*virtual*/ void onClose(bool app_quitting); void activate(e_activation_type type); protected: - void onClose(); LLAnimPauseRequest mPauseRequest; LLUUID mItemID; diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp index faca950963..32ed20bd56 100644 --- a/indra/newview/llpreviewgesture.cpp +++ b/indra/newview/llpreviewgesture.cpp @@ -32,10 +32,10 @@ #include "llviewerprecompiledheaders.h" -#include - #include "llpreviewgesture.h" +#include + // libraries #include "lldatapacker.h" #include "lldarray.h" @@ -260,7 +260,8 @@ BOOL LLPreviewGesture::canClose() } } -void LLPreviewGesture::onClose() +// virtual +void LLPreviewGesture::onClose(bool app_quitting) { LLGestureManager::instance().stopGesture(mPreviewGesture); } @@ -354,7 +355,6 @@ LLPreviewGesture::~LLPreviewGesture() BOOL LLPreviewGesture::postBuild() { - mCloseSignal.connect(boost::bind(&LLPreviewGesture::onClose, this)); mVisibleSignal.connect(boost::bind(&LLPreviewGesture::onVisibilityChange, this, _2)); LLLineEditor* edit; diff --git a/indra/newview/llpreviewgesture.h b/indra/newview/llpreviewgesture.h index 16ac935775..9d26539453 100644 --- a/indra/newview/llpreviewgesture.h +++ b/indra/newview/llpreviewgesture.h @@ -70,11 +70,10 @@ public: // LLFloater /*virtual*/ BOOL canClose(); + /*virtual*/ void onClose(bool app_quitting); /*virtual*/ void onUpdateSucceeded(); /*virtual*/ void refresh(); - - protected: // Populate various comboboxes void addModifiers(); @@ -108,7 +107,6 @@ protected: // "Sound", "Chat", or "Wait" LLScrollListItem* addStep(const enum EStepType step_type); - void onClose(); void onVisibilityChange ( const LLSD& new_visibility ); static std::string getLabel(std::vector labels); diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index 2bb1e80eb8..c5a92f52d0 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -522,7 +522,7 @@ LLSysWellWindow::RowPanel::RowPanel(const LLSysWellWindow* parent, const LLUUID& contactName->setValue(name); mCloseBtn = getChild("hide_btn"); - mCloseBtn->setCommitCallback(boost::bind(&LLSysWellWindow::RowPanel::onClose, this)); + mCloseBtn->setCommitCallback(boost::bind(&LLSysWellWindow::RowPanel::onClosePanel, this)); } //--------------------------------------------------------------------------------- @@ -531,7 +531,7 @@ LLSysWellWindow::RowPanel::~RowPanel() } //--------------------------------------------------------------------------------- -void LLSysWellWindow::RowPanel::onClose() +void LLSysWellWindow::RowPanel::onClosePanel() { gIMMgr->removeSession(mChiclet->getSessionId()); // This row panel will be removed from the list in LLSysWellWindow::sessionRemoved(). diff --git a/indra/newview/llsyswellwindow.h b/indra/newview/llsyswellwindow.h index 203b949715..0c3f4d0587 100644 --- a/indra/newview/llsyswellwindow.h +++ b/indra/newview/llsyswellwindow.h @@ -137,7 +137,7 @@ private: void onMouseLeave(S32 x, S32 y, MASK mask); BOOL handleMouseDown(S32 x, S32 y, MASK mask); private: - void onClose(); + void onClosePanel(); public: LLIMChiclet* mChiclet; private: diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 9fc91e2971..43f82e592b 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -102,15 +102,16 @@ public: virtual ~LLFloaterTexturePicker(); // LLView overrides - virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, + /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg); - virtual void draw(); - virtual BOOL handleKeyHere(KEY key, MASK mask); + /*virtual*/ void draw(); + /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask); // LLFloater overrides - virtual BOOL postBuild(); + /*virtual*/ BOOL postBuild(); + /*virtual*/ void onClose(bool app_settings); // New functions void setImageID( const LLUUID& image_asset_id); @@ -130,7 +131,6 @@ public: void commitIfImmediateSet(); void onFilterEdit(const std::string& search_string ); - void onClose(); static void onBtnSetToDefault( void* userdata ); static void onBtnSelect( void* userdata ); @@ -369,7 +369,7 @@ BOOL LLFloaterTexturePicker::handleKeyHere(KEY key, MASK mask) return LLFloater::handleKeyHere(key, mask); } -void LLFloaterTexturePicker::onClose() +void LLFloaterTexturePicker::onClose(bool app_quitting) { if (mOwner) { @@ -381,8 +381,6 @@ void LLFloaterTexturePicker::onClose() // virtual BOOL LLFloaterTexturePicker::postBuild() { - mCloseSignal.connect(boost::bind(&LLFloaterTexturePicker::onClose, this)); - LLFloater::postBuild(); if (!mLabel.empty()) -- cgit v1.3