diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llfloaterbuyland.cpp | 30 | ||||
-rw-r--r-- | indra/newview/llfloaterbuyland.h | 1 | ||||
-rw-r--r-- | indra/newview/llfloatertos.cpp | 17 | ||||
-rw-r--r-- | indra/newview/llfloatertos.h | 4 | ||||
-rw-r--r-- | indra/newview/llimview.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llpanelavatar.cpp | 8 | ||||
-rw-r--r-- | indra/newview/llpanelavatar.h | 4 | ||||
-rw-r--r-- | indra/newview/llpanellogin.cpp | 8 | ||||
-rw-r--r-- | indra/newview/llviewermenu.cpp | 18 | ||||
-rw-r--r-- | indra/newview/llviewerparcelmgr.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 6 |
11 files changed, 71 insertions, 33 deletions
diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp index cf73a1104d..52ac981909 100644 --- a/indra/newview/llfloaterbuyland.cpp +++ b/indra/newview/llfloaterbuyland.cpp @@ -241,6 +241,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 LLFloaterBuyLandUI* LLFloaterBuyLandUI::sInstance = NULL; // static @@ -717,10 +728,11 @@ void LLFloaterBuyLandUI::runWebSitePrep(const std::string& password) mParcelBuyInfo = gParcelMgr->setupParcelBuy(gAgent.getID(), gAgent.getSessionID(), gAgent.getGroupID(), mIsForGroup, mIsClaim, remove_contribution); - if (!mSiteMembershipUpgrade - && !mSiteLandUseUpgrade - && mCurrency.getAmount() == 0 - && mSiteConfirm != "password") + if (mParcelBuyInfo + && !mSiteMembershipUpgrade + && !mSiteLandUseUpgrade + && mCurrency.getAmount() == 0 + && mSiteConfirm != "password") { sendBuyLand(); return; @@ -779,10 +791,12 @@ void LLFloaterBuyLandUI::finishWebSitePrep() void LLFloaterBuyLandUI::sendBuyLand() { - gParcelMgr->sendParcelBuy(mParcelBuyInfo); - gParcelMgr->deleteParcelBuy(mParcelBuyInfo); - - mBought = true; + if (mParcelBuyInfo) + { + gParcelMgr->sendParcelBuy(mParcelBuyInfo); + gParcelMgr->deleteParcelBuy(mParcelBuyInfo); + mBought = true; + } } void LLFloaterBuyLandUI::updateNames() diff --git a/indra/newview/llfloaterbuyland.h b/indra/newview/llfloaterbuyland.h index 092c95802a..22049d97a9 100644 --- a/indra/newview/llfloaterbuyland.h +++ b/indra/newview/llfloaterbuyland.h @@ -23,6 +23,7 @@ public: static void updateEstateName(const std::string& name); static void updateLastModified(const std::string& text); static void updateEstateOwnerName(const std::string& name); + static BOOL isOpen(); }; #endif diff --git a/indra/newview/llfloatertos.cpp b/indra/newview/llfloatertos.cpp index 149a585822..c9aa9edebd 100644 --- a/indra/newview/llfloatertos.cpp +++ b/indra/newview/llfloatertos.cpp @@ -25,7 +25,6 @@ #include "llui.h" #include "llhttpclient.h" #include "llradiogroup.h" -#include "llwebbrowserctrl.h" // static LLFloaterTOS* LLFloaterTOS::sInstance = NULL; @@ -133,12 +132,11 @@ BOOL LLFloaterTOS::postBuild() LLWebBrowserCtrl* web_browser = LLUICtrlFactory::getWebBrowserCtrlByName(this, "tos_html"); 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 - if ( mWebBrowserWindowId ) - LLMozLib::getInstance()->addObserver( mWebBrowserWindowId, this ); + if ( web_browser ) + { + web_browser->addObserver( this ); + }; gResponsePtr = LLIamHere::build( this ); LLHTTPClient::get( childGetValue( "real_url" ).asString(), gResponsePtr ); @@ -198,8 +196,11 @@ LLFloaterTOS::~LLFloaterTOS() { #if LL_LIBXUL_ENABLED // stop obsaerving events - if ( mWebBrowserWindowId ) - LLMozLib::getInstance()->addObserver( mWebBrowserWindowId, this ); + LLWebBrowserCtrl* web_browser = LLUICtrlFactory::getWebBrowserCtrlByName(this, "tos_html"); + if ( web_browser ) + { + web_browser->addObserver( this ); + }; #endif // LL_LIBXUL_ENABLED // tell the responder we're not here anymore diff --git a/indra/newview/llfloatertos.h b/indra/newview/llfloatertos.h index 1f504b4edb..b87ab3cad7 100644 --- a/indra/newview/llfloatertos.h +++ b/indra/newview/llfloatertos.h @@ -11,7 +11,7 @@ #include "llmodaldialog.h" #include "llassetstorage.h" -#include "llmozlib.h" +#include "llwebbrowserctrl.h" class LLButton; class LLRadioGroup; @@ -21,7 +21,7 @@ class LLUUID; class LLFloaterTOS : public LLModalDialog, - public LLEmbeddedBrowserWindowObserver + public LLWebBrowserCtrlObserver { public: virtual ~LLFloaterTOS(); diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index fb8438dc93..f333f7bb6c 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -55,7 +55,7 @@ static LLString sOfflineMessage; // // 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); } @@ -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 // 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; if (IM_SESSION_GROUP_START == dialog) @@ -95,6 +95,7 @@ LLUUID compute_session_id(EInstantMessage dialog, const LLUUID& other_participan LLFloaterIM::LLFloaterIM() { + gUICtrlFactory->buildFloater(this, "floater_im.xml"); } BOOL LLFloaterIM::postBuild() @@ -266,7 +267,6 @@ LLIMView::LLIMView(const std::string& name, const LLRect& rect) : LLAvatarTracker::instance().addObserver(mFriendObserver); mTalkFloater = new LLFloaterIM(); - gUICtrlFactory->buildFloater(mTalkFloater, "floater_im.xml"); // New IM Panel mNewIMFloater = new LLFloaterNewIM(); diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index 6f812e9e35..f671d63557 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -52,7 +52,6 @@ #include "llinventorymodel.h" #include "viewer.h" // for gUserServer #include "roles_constants.h" -#include "llwebbrowserctrl.h" #define kArraySize( _kArray ) ( sizeof( (_kArray) ) / sizeof( _kArray[0] ) ) @@ -449,7 +448,7 @@ BOOL LLPanelAvatarWeb::postBuild(void) mWebBrowser->setOpenInExternalBrowser( false ); // observe browser events - LLMozLib::getInstance()->addObserver( mWebBrowser->getEmbeddedBrowserWindowId(), this ); + mWebBrowser->addObserver( this ); #endif // LL_LIBXUL_ENABLED return TRUE; @@ -508,7 +507,10 @@ LLPanelAvatarWeb::~LLPanelAvatarWeb() { #if LL_LIBXUL_ENABLED // stop observing browser events - LLMozLib::getInstance()->remObserver( mWebBrowser->getEmbeddedBrowserWindowId(), this ); + if ( mWebBrowser ) + { + mWebBrowser->remObserver( this ); + }; #endif } diff --git a/indra/newview/llpanelavatar.h b/indra/newview/llpanelavatar.h index a17dc69cfc..0cdcdf938b 100644 --- a/indra/newview/llpanelavatar.h +++ b/indra/newview/llpanelavatar.h @@ -13,7 +13,7 @@ #include "v3dmath.h" #include "lluuid.h" #include "linked_lists.h" -#include "llmozlib.h" +#include "llwebbrowserctrl.h" class LLButton; class LLCheckBoxCtrl; @@ -89,7 +89,7 @@ protected: class LLPanelAvatarWeb : public LLPanel #if LL_LIBXUL_ENABLED - , public LLEmbeddedBrowserWindowObserver + , public LLWebBrowserCtrlObserver #endif { public: diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index e1ed7a0df7..dfaf872d92 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -9,6 +9,7 @@ #include "llviewerprecompiledheaders.h" #include "llpanellogin.h" +#include "llpanelgeneral.h" #include "indra_constants.h" // for key and mask constants #include "llfontgl.h" @@ -34,7 +35,6 @@ #include "llviewermenu.h" // for handle_preferences() #include "llviewernetwork.h" #include "llviewerwindow.h" // to link into child list -#include "llmozlib.h" #include "llnotify.h" #include "viewer.h" // for gHideLinks #include "llvieweruictrlfactory.h" @@ -170,6 +170,8 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, { combo->setCurrentByIndex( 0 ); } + + combo->setCommitCallback( &LLPanelGeneral::set_start_location ); } // Specific servers added later. @@ -228,9 +230,9 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, // make links open in external browser 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; - 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->reshape( htmlRect.getWidth(), htmlRect.getHeight(), TRUE ); reshape( mRect.getWidth(), mRect.getHeight(), 1 ); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 8eae25fa63..689dcee663 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -6479,7 +6479,14 @@ class LLShowFloater : public view_listener_t { if (gParcelMgr->selectionEmpty()) { - gParcelMgr->selectParcelAt(gAgent.getPositionGlobal()); + if (gLastHitPosGlobal.isExactlyZero()) + { + gParcelMgr->selectParcelAt(gAgent.getPositionGlobal()); + } + else + { + gParcelMgr->selectParcelAt( gLastHitPosGlobal ); + } } LLFloaterLand::show(); @@ -6488,7 +6495,14 @@ class LLShowFloater : public view_listener_t { if (gParcelMgr->selectionEmpty()) { - gParcelMgr->selectParcelAt(gAgent.getPositionGlobal()); + if (gLastHitPosGlobal.isExactlyZero()) + { + gParcelMgr->selectParcelAt(gAgent.getPositionGlobal()); + } + else + { + gParcelMgr->selectParcelAt( gLastHitPosGlobal ); + } } gParcelMgr->startBuyLand(); diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index b29b49b399..e3d462bb3b 100644 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -1949,7 +1949,7 @@ void LLViewerParcelMgr::processParcelAccessListReply(LLMessageSystem *msg, void if (parcel_id != parcel->getLocalID()) { llwarns << "processParcelAccessListReply for parcel " << parcel_id - << " which isn't the selected parcel" << llendl; + << " which isn't the selected parcel " << parcel->getLocalID()<< llendl; return; } diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 331502c28a..8920d09fa6 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -69,6 +69,7 @@ #include "llfilepicker.h" #include "llfloater.h" #include "llfloaterbuildoptions.h" +#include "llfloaterbuyland.h" #include "llfloaterchat.h" #include "llfloatercustomize.h" #include "llfloatereditui.h" // HACK JAMESDEBUG for ui editor @@ -2661,7 +2662,10 @@ BOOL LLViewerWindow::handlePerFrameHover() } // 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(); } |