From 3b6e5fb59ec2d19eb189e25408f2dd12cd3bb263 Mon Sep 17 00:00:00 2001 From: angela Date: Mon, 2 Nov 2009 12:19:24 +0800 Subject: EXT-1738 [BSI] Manage Telehub... in Region/Estate floater silently fails when clicked --- indra/newview/llfloaterregioninfo.cpp | 15 ++++---- indra/newview/llfloaterregioninfo.h | 8 +++-- indra/newview/llpanelmediasettingssecurity.cpp | 40 ++++++++++------------ .../skins/default/xui/en/panel_region_general.xml | 10 +++--- .../default/xui/en/panel_region_general_layout.xml | 10 +++--- 5 files changed, 44 insertions(+), 39 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 11544f5b7b..17ddeb9d95 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -179,6 +179,8 @@ BOOL LLFloaterRegionInfo::postBuild() LLPanelRegionInfo* panel; panel = new LLPanelRegionGeneralInfo; mInfoPanels.push_back(panel); + panel->getCommitCallbackRegistrar().add("RegionInfo.ManageTelehub", boost::bind(&LLPanelRegionInfo::onClickManageTelehub, panel)); + LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_region_general.xml"); mTab->addTabPanel(LLTabContainer::TabPanelParams().panel(panel).select_tab(true)); @@ -554,6 +556,12 @@ void LLPanelRegionInfo::onClickHelp(std::string xml_alert) LLNotifications::instance().add(xml_alert); } +void LLPanelRegionInfo::onClickManageTelehub() +{ + LLFloaterReg::hideInstance("region_info"); + LLFloaterReg::showInstance("telehubs"); +} + ///////////////////////////////////////////////////////////////////////////// // LLPanelRegionGeneralInfo // @@ -604,7 +612,6 @@ BOOL LLPanelRegionGeneralInfo::postBuild() childSetAction("kick_all_btn", onClickKickAll, this); childSetAction("im_btn", onClickMessage, this); // childSetAction("manage_telehub_btn", onClickManageTelehub, this); - mCommitCallbackRegistrar.add("RegionInfo.Cancel", boost::bind(&LLPanelRegionGeneralInfo::onClickManageTelehub, this)); return LLPanelRegionInfo::postBuild(); } @@ -712,11 +719,7 @@ bool LLPanelRegionGeneralInfo::onMessageCommit(const LLSD& notification, const L return false; } -void LLPanelRegionGeneralInfo::onClickManageTelehub() -{ - LLFloaterReg::hideInstance("region_info"); - LLFloaterReg::showInstance("telehubs"); -} + // setregioninfo // strings[0] = 'Y' - block terraform, 'N' - not diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h index 95833af8a1..94fbbf9feb 100644 --- a/indra/newview/llfloaterregioninfo.h +++ b/indra/newview/llfloaterregioninfo.h @@ -123,10 +123,13 @@ public: void enableButton(const std::string& btn_name, BOOL enable = TRUE); void disableButton(const std::string& btn_name); + void onClickManageTelehub(); + protected: void initCtrl(const std::string& name); void initHelpBtn(const std::string& name, const std::string& xml_alert); + // Callback for all help buttons, data is name of XML alert to show. void onClickHelp(std::string xml_alert); @@ -152,6 +155,7 @@ protected: class LLPanelRegionGeneralInfo : public LLPanelRegionInfo { + public: LLPanelRegionGeneralInfo() : LLPanelRegionInfo() {} @@ -161,16 +165,16 @@ public: // LLPanel virtual BOOL postBuild(); + protected: virtual BOOL sendUpdate(); - static void onClickKick(void* userdata); static void onKickCommit(const std::vector& names, const std::vector& ids, void* userdata); static void onClickKickAll(void* userdata); bool onKickAllCommit(const LLSD& notification, const LLSD& response); static void onClickMessage(void* userdata); bool onMessageCommit(const LLSD& notification, const LLSD& response); - void onClickManageTelehub(); + }; ///////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llpanelmediasettingssecurity.cpp b/indra/newview/llpanelmediasettingssecurity.cpp index f5607aa287..33f0952f53 100644 --- a/indra/newview/llpanelmediasettingssecurity.cpp +++ b/indra/newview/llpanelmediasettingssecurity.cpp @@ -50,10 +50,11 @@ LLPanelMediaSettingsSecurity::LLPanelMediaSettingsSecurity() : mParent( NULL ) { - // build dialog from XML - LLUICtrlFactory::getInstance()->buildPanel(this, "panel_media_settings_security.xml"); mCommitCallbackRegistrar.add("Media.whitelistAdd", boost::bind(&LLPanelMediaSettingsSecurity::onBtnAdd, this)); mCommitCallbackRegistrar.add("Media.whitelistDelete", boost::bind(&LLPanelMediaSettingsSecurity::onBtnDel, this)); + // build dialog from XML + LLUICtrlFactory::getInstance()->buildPanel(this, "panel_media_settings_security.xml"); + } //////////////////////////////////////////////////////////////////////////////// @@ -62,10 +63,7 @@ BOOL LLPanelMediaSettingsSecurity::postBuild() { mEnableWhiteList = getChild< LLCheckBoxCtrl >( LLMediaEntry::WHITELIST_ENABLE_KEY ); mWhiteListList = getChild< LLScrollListCtrl >( LLMediaEntry::WHITELIST_KEY ); - - childSetAction("whitelist_add", onBtnAdd, this); - childSetAction("whitelist_del", onBtnDel, this); - + setDefaultBtn("whitelist_add"); return true; @@ -237,17 +235,17 @@ void LLPanelMediaSettingsSecurity::getValues( LLSD &fill_me_in ) const std::string LLPanelMediaSettingsSecurity::makeValidUrl( const std::string& src_url ) { // use LLURI to determine if we have a valid scheme - LLURI candidate_url( src_url ); - if ( candidate_url.scheme().empty() ) - { + LLURI candidate_url( src_url ); + if ( candidate_url.scheme().empty() ) + { // build a URL comprised of default scheme and the original fragment const std::string default_scheme( "http://" ); return default_scheme + src_url; - }; - - // we *could* test the "default scheme" + "original fragment" URL again - // using LLURI to see if it's valid but I think the outcome is the same - // in either case - our only option is to return the original URL + }; + + // we *could* test the "default scheme" + "original fragment" URL again + // using LLURI to see if it's valid but I think the outcome is the same + // in either case - our only option is to return the original URL // we *think* the original url passed in was valid return src_url; @@ -334,10 +332,10 @@ void LLPanelMediaSettingsSecurity::onBtnDel( void* userdata ) self->mWhiteListList->deleteSelectedItems(); } -//////////////////////////////////////////////////////////////////////////////// -// -void LLPanelMediaSettingsSecurity::setParent( LLFloaterMediaSettings* parent ) -{ - mParent = parent; -}; - +//////////////////////////////////////////////////////////////////////////////// +// +void LLPanelMediaSettingsSecurity::setParent( LLFloaterMediaSettings* parent ) +{ + mParent = parent; +}; + diff --git a/indra/newview/skins/default/xui/en/panel_region_general.xml b/indra/newview/skins/default/xui/en/panel_region_general.xml index 160ae96fc4..b6d13a0fdd 100644 --- a/indra/newview/skins/default/xui/en/panel_region_general.xml +++ b/indra/newview/skins/default/xui/en/panel_region_general.xml @@ -299,10 +299,7 @@ left="108" name="apply_btn" top="320" - width="100"> - - + width="100"/> diff --git a/indra/newview/skins/default/xui/en/panel_region_general_layout.xml b/indra/newview/skins/default/xui/en/panel_region_general_layout.xml index 9b9c62dbf9..42297cdc07 100644 --- a/indra/newview/skins/default/xui/en/panel_region_general_layout.xml +++ b/indra/newview/skins/default/xui/en/panel_region_general_layout.xml @@ -299,10 +299,7 @@ left="108" name="apply_btn" top="320" - width="100"> - - + width="100"/> -- cgit v1.2.3