diff options
42 files changed, 99 insertions, 115 deletions
| 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<LLObjectSelection>	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<LLButton>("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<LLObjectSelection> 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<LLTabContainer>("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<LLTabContainer>("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<LLPanel>("main_panel");				// get a pointer to the main panel in order to...  	mFileList = main_panel_tmp->getChild<LLScrollListCtrl>("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<std::string, std::pair<StringListPtr,StringListPtr> > 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<LLTabContainer>("maptab");  	if (!mTabs) return FALSE; @@ -255,7 +253,8 @@ LLFloaterWorldMap* LLFloaterWorldMap::getInstance()  	return LLFloaterReg::getTypedInstance<LLFloaterWorldMap>("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<LLLineEditor>("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<LLUICtrl>("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<LLMenuButton>("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 <algorithm> -  #include "llpreviewgesture.h" +#include <algorithm> +  // 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<std::string> 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<LLButton>("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()) | 
