svn merge -r 56431:56560 svn+ssh://svn.lindenlab.com/svn/linden/branches/maintenance

master
Josh Bell 2007-01-08 21:43:30 +00:00
parent c618a55f76
commit fbf49910f3
11 changed files with 71 additions and 33 deletions

View File

@ -240,6 +240,17 @@ void LLFloaterBuyLand::updateEstateOwnerName(const std::string& name)
} }
} }
// static
BOOL LLFloaterBuyLand::isOpen()
{
LLFloaterBuyLandUI* floater = LLFloaterBuyLandUI::soleInstance(FALSE);
if (floater)
{
return floater->getVisible();
}
return FALSE;
}
// static // static
LLFloaterBuyLandUI* LLFloaterBuyLandUI::sInstance = NULL; LLFloaterBuyLandUI* LLFloaterBuyLandUI::sInstance = NULL;
@ -717,7 +728,8 @@ void LLFloaterBuyLandUI::runWebSitePrep(const std::string& password)
mParcelBuyInfo = gParcelMgr->setupParcelBuy(gAgent.getID(), gAgent.getSessionID(), mParcelBuyInfo = gParcelMgr->setupParcelBuy(gAgent.getID(), gAgent.getSessionID(),
gAgent.getGroupID(), mIsForGroup, mIsClaim, remove_contribution); gAgent.getGroupID(), mIsForGroup, mIsClaim, remove_contribution);
if (!mSiteMembershipUpgrade if (mParcelBuyInfo
&& !mSiteMembershipUpgrade
&& !mSiteLandUseUpgrade && !mSiteLandUseUpgrade
&& mCurrency.getAmount() == 0 && mCurrency.getAmount() == 0
&& mSiteConfirm != "password") && mSiteConfirm != "password")
@ -779,10 +791,12 @@ void LLFloaterBuyLandUI::finishWebSitePrep()
void LLFloaterBuyLandUI::sendBuyLand() void LLFloaterBuyLandUI::sendBuyLand()
{ {
if (mParcelBuyInfo)
{
gParcelMgr->sendParcelBuy(mParcelBuyInfo); gParcelMgr->sendParcelBuy(mParcelBuyInfo);
gParcelMgr->deleteParcelBuy(mParcelBuyInfo); gParcelMgr->deleteParcelBuy(mParcelBuyInfo);
mBought = true; mBought = true;
}
} }
void LLFloaterBuyLandUI::updateNames() void LLFloaterBuyLandUI::updateNames()

View File

@ -23,6 +23,7 @@ public:
static void updateEstateName(const std::string& name); static void updateEstateName(const std::string& name);
static void updateLastModified(const std::string& text); static void updateLastModified(const std::string& text);
static void updateEstateOwnerName(const std::string& name); static void updateEstateOwnerName(const std::string& name);
static BOOL isOpen();
}; };
#endif #endif

View File

@ -25,7 +25,6 @@
#include "llui.h" #include "llui.h"
#include "llhttpclient.h" #include "llhttpclient.h"
#include "llradiogroup.h" #include "llradiogroup.h"
#include "llwebbrowserctrl.h"
// static // static
LLFloaterTOS* LLFloaterTOS::sInstance = NULL; LLFloaterTOS* LLFloaterTOS::sInstance = NULL;
@ -133,12 +132,11 @@ BOOL LLFloaterTOS::postBuild()
LLWebBrowserCtrl* web_browser = LLUICtrlFactory::getWebBrowserCtrlByName(this, "tos_html"); LLWebBrowserCtrl* web_browser = LLUICtrlFactory::getWebBrowserCtrlByName(this, "tos_html");
if ( web_browser ) if ( web_browser )
{ {
// save the window id for this web browser widget
mWebBrowserWindowId = web_browser->getEmbeddedBrowserWindowId();
// start to observe it so we see navigate complete events // start to observe it so we see navigate complete events
if ( mWebBrowserWindowId ) if ( web_browser )
LLMozLib::getInstance()->addObserver( mWebBrowserWindowId, this ); {
web_browser->addObserver( this );
};
gResponsePtr = LLIamHere::build( this ); gResponsePtr = LLIamHere::build( this );
LLHTTPClient::get( childGetValue( "real_url" ).asString(), gResponsePtr ); LLHTTPClient::get( childGetValue( "real_url" ).asString(), gResponsePtr );
@ -198,8 +196,11 @@ LLFloaterTOS::~LLFloaterTOS()
{ {
#if LL_LIBXUL_ENABLED #if LL_LIBXUL_ENABLED
// stop obsaerving events // stop obsaerving events
if ( mWebBrowserWindowId ) LLWebBrowserCtrl* web_browser = LLUICtrlFactory::getWebBrowserCtrlByName(this, "tos_html");
LLMozLib::getInstance()->addObserver( mWebBrowserWindowId, this ); if ( web_browser )
{
web_browser->addObserver( this );
};
#endif // LL_LIBXUL_ENABLED #endif // LL_LIBXUL_ENABLED
// tell the responder we're not here anymore // tell the responder we're not here anymore

View File

@ -11,7 +11,7 @@
#include "llmodaldialog.h" #include "llmodaldialog.h"
#include "llassetstorage.h" #include "llassetstorage.h"
#include "llmozlib.h" #include "llwebbrowserctrl.h"
class LLButton; class LLButton;
class LLRadioGroup; class LLRadioGroup;
@ -21,7 +21,7 @@ class LLUUID;
class LLFloaterTOS : class LLFloaterTOS :
public LLModalDialog, public LLModalDialog,
public LLEmbeddedBrowserWindowObserver public LLWebBrowserCtrlObserver
{ {
public: public:
virtual ~LLFloaterTOS(); virtual ~LLFloaterTOS();

View File

@ -55,7 +55,7 @@ static LLString sOfflineMessage;
// //
// returns true if a should appear before b // returns true if a should appear before b
BOOL group_dictionary_sort( LLGroupData* a, LLGroupData* b ) static BOOL group_dictionary_sort( LLGroupData* a, LLGroupData* b )
{ {
return (LLString::compareDict( a->mName, b->mName ) < 0); return (LLString::compareDict( a->mName, b->mName ) < 0);
} }
@ -63,7 +63,7 @@ BOOL group_dictionary_sort( LLGroupData* a, LLGroupData* b )
// the other_participant_id is either an agent_id, a group_id, or an inventory // the other_participant_id is either an agent_id, a group_id, or an inventory
// folder item_id (collection of calling cards) // folder item_id (collection of calling cards)
LLUUID compute_session_id(EInstantMessage dialog, const LLUUID& other_participant_id) static LLUUID compute_session_id(EInstantMessage dialog, const LLUUID& other_participant_id)
{ {
LLUUID session_id; LLUUID session_id;
if (IM_SESSION_GROUP_START == dialog) if (IM_SESSION_GROUP_START == dialog)
@ -95,6 +95,7 @@ LLUUID compute_session_id(EInstantMessage dialog, const LLUUID& other_participan
LLFloaterIM::LLFloaterIM() LLFloaterIM::LLFloaterIM()
{ {
gUICtrlFactory->buildFloater(this, "floater_im.xml");
} }
BOOL LLFloaterIM::postBuild() BOOL LLFloaterIM::postBuild()
@ -266,7 +267,6 @@ LLIMView::LLIMView(const std::string& name, const LLRect& rect) :
LLAvatarTracker::instance().addObserver(mFriendObserver); LLAvatarTracker::instance().addObserver(mFriendObserver);
mTalkFloater = new LLFloaterIM(); mTalkFloater = new LLFloaterIM();
gUICtrlFactory->buildFloater(mTalkFloater, "floater_im.xml");
// New IM Panel // New IM Panel
mNewIMFloater = new LLFloaterNewIM(); mNewIMFloater = new LLFloaterNewIM();

View File

@ -52,7 +52,6 @@
#include "llinventorymodel.h" #include "llinventorymodel.h"
#include "viewer.h" // for gUserServer #include "viewer.h" // for gUserServer
#include "roles_constants.h" #include "roles_constants.h"
#include "llwebbrowserctrl.h"
#define kArraySize( _kArray ) ( sizeof( (_kArray) ) / sizeof( _kArray[0] ) ) #define kArraySize( _kArray ) ( sizeof( (_kArray) ) / sizeof( _kArray[0] ) )
@ -449,7 +448,7 @@ BOOL LLPanelAvatarWeb::postBuild(void)
mWebBrowser->setOpenInExternalBrowser( false ); mWebBrowser->setOpenInExternalBrowser( false );
// observe browser events // observe browser events
LLMozLib::getInstance()->addObserver( mWebBrowser->getEmbeddedBrowserWindowId(), this ); mWebBrowser->addObserver( this );
#endif // LL_LIBXUL_ENABLED #endif // LL_LIBXUL_ENABLED
return TRUE; return TRUE;
@ -508,7 +507,10 @@ LLPanelAvatarWeb::~LLPanelAvatarWeb()
{ {
#if LL_LIBXUL_ENABLED #if LL_LIBXUL_ENABLED
// stop observing browser events // stop observing browser events
LLMozLib::getInstance()->remObserver( mWebBrowser->getEmbeddedBrowserWindowId(), this ); if ( mWebBrowser )
{
mWebBrowser->remObserver( this );
};
#endif #endif
} }

View File

@ -13,7 +13,7 @@
#include "v3dmath.h" #include "v3dmath.h"
#include "lluuid.h" #include "lluuid.h"
#include "linked_lists.h" #include "linked_lists.h"
#include "llmozlib.h" #include "llwebbrowserctrl.h"
class LLButton; class LLButton;
class LLCheckBoxCtrl; class LLCheckBoxCtrl;
@ -89,7 +89,7 @@ protected:
class LLPanelAvatarWeb : class LLPanelAvatarWeb :
public LLPanel public LLPanel
#if LL_LIBXUL_ENABLED #if LL_LIBXUL_ENABLED
, public LLEmbeddedBrowserWindowObserver , public LLWebBrowserCtrlObserver
#endif #endif
{ {
public: public:

View File

@ -9,6 +9,7 @@
#include "llviewerprecompiledheaders.h" #include "llviewerprecompiledheaders.h"
#include "llpanellogin.h" #include "llpanellogin.h"
#include "llpanelgeneral.h"
#include "indra_constants.h" // for key and mask constants #include "indra_constants.h" // for key and mask constants
#include "llfontgl.h" #include "llfontgl.h"
@ -34,7 +35,6 @@
#include "llviewermenu.h" // for handle_preferences() #include "llviewermenu.h" // for handle_preferences()
#include "llviewernetwork.h" #include "llviewernetwork.h"
#include "llviewerwindow.h" // to link into child list #include "llviewerwindow.h" // to link into child list
#include "llmozlib.h"
#include "llnotify.h" #include "llnotify.h"
#include "viewer.h" // for gHideLinks #include "viewer.h" // for gHideLinks
#include "llvieweruictrlfactory.h" #include "llvieweruictrlfactory.h"
@ -170,6 +170,8 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
{ {
combo->setCurrentByIndex( 0 ); combo->setCurrentByIndex( 0 );
} }
combo->setCommitCallback( &LLPanelGeneral::set_start_location );
} }
// Specific servers added later. // Specific servers added later.
@ -228,9 +230,9 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
// make links open in external browser // make links open in external browser
web_browser->setOpenInExternalBrowser( true ); web_browser->setOpenInExternalBrowser( true );
// force the size to be correct (XML doesn't seem to be sufficient to do this) // force the size to be correct (XML doesn't seem to be sufficient to do this) (with some padding so the other login screen doesn't show through)
LLRect htmlRect = mRect; LLRect htmlRect = mRect;
htmlRect.setCenterAndSize( mRect.getCenterX(), mRect.getCenterY() + 40, mRect.getWidth(), mRect.getHeight() - 80 ); htmlRect.setCenterAndSize( mRect.getCenterX() - 2, mRect.getCenterY() + 40, mRect.getWidth() + 6, mRect.getHeight() - 78 );
web_browser->setRect( htmlRect ); web_browser->setRect( htmlRect );
web_browser->reshape( htmlRect.getWidth(), htmlRect.getHeight(), TRUE ); web_browser->reshape( htmlRect.getWidth(), htmlRect.getHeight(), TRUE );
reshape( mRect.getWidth(), mRect.getHeight(), 1 ); reshape( mRect.getWidth(), mRect.getHeight(), 1 );

View File

@ -6478,18 +6478,32 @@ class LLShowFloater : public view_listener_t
else if (floater_name == "about land") else if (floater_name == "about land")
{ {
if (gParcelMgr->selectionEmpty()) if (gParcelMgr->selectionEmpty())
{
if (gLastHitPosGlobal.isExactlyZero())
{ {
gParcelMgr->selectParcelAt(gAgent.getPositionGlobal()); gParcelMgr->selectParcelAt(gAgent.getPositionGlobal());
} }
else
{
gParcelMgr->selectParcelAt( gLastHitPosGlobal );
}
}
LLFloaterLand::show(); LLFloaterLand::show();
} }
else if (floater_name == "buy land") else if (floater_name == "buy land")
{ {
if (gParcelMgr->selectionEmpty()) if (gParcelMgr->selectionEmpty())
{
if (gLastHitPosGlobal.isExactlyZero())
{ {
gParcelMgr->selectParcelAt(gAgent.getPositionGlobal()); gParcelMgr->selectParcelAt(gAgent.getPositionGlobal());
} }
else
{
gParcelMgr->selectParcelAt( gLastHitPosGlobal );
}
}
gParcelMgr->startBuyLand(); gParcelMgr->startBuyLand();
} }

View File

@ -1949,7 +1949,7 @@ void LLViewerParcelMgr::processParcelAccessListReply(LLMessageSystem *msg, void
if (parcel_id != parcel->getLocalID()) if (parcel_id != parcel->getLocalID())
{ {
llwarns << "processParcelAccessListReply for parcel " << parcel_id llwarns << "processParcelAccessListReply for parcel " << parcel_id
<< " which isn't the selected parcel" << llendl; << " which isn't the selected parcel " << parcel->getLocalID()<< llendl;
return; return;
} }

View File

@ -69,6 +69,7 @@
#include "llfilepicker.h" #include "llfilepicker.h"
#include "llfloater.h" #include "llfloater.h"
#include "llfloaterbuildoptions.h" #include "llfloaterbuildoptions.h"
#include "llfloaterbuyland.h"
#include "llfloaterchat.h" #include "llfloaterchat.h"
#include "llfloatercustomize.h" #include "llfloatercustomize.h"
#include "llfloatereditui.h" // HACK JAMESDEBUG for ui editor #include "llfloatereditui.h" // HACK JAMESDEBUG for ui editor
@ -2661,7 +2662,10 @@ BOOL LLViewerWindow::handlePerFrameHover()
} }
// sync land selection with edit and about land dialogs // sync land selection with edit and about land dialogs
if (gParcelMgr && !LLFloaterLand::floaterVisible() && (!gFloaterTools || !gFloaterTools->getVisible())) if (gParcelMgr
&& !LLFloaterLand::floaterVisible()
&& !LLFloaterBuyLand::isOpen()
&& (!gFloaterTools || !gFloaterTools->getVisible()))
{ {
gParcelMgr->deselectLand(); gParcelMgr->deselectLand();
} }