void LLFloaterNearbyMedia::onOpen() { //Mess around with control rect to not change unless the user actually tweaked it.. LLRect rect = gSavedSettings.getRect("FloaterNearbyMediaRect"); if(!rect.isEmpty()) { setRectControl("FloaterNearbyMediaRect"); applyRectControl(); } else { const LLRect media_rect = gOverlayBar->mMediaRemote->calcScreenRect(); setOrigin(media_rect.mLeft - getRect().getWidth(), media_rect.mBottom + gOverlayBar->mChatBar->getRect().getHeight()); } gSavedSettings.setBOOL("ShowNearbyMediaFloater", true); }
BOOL LLFloaterSearch::postBuild() { LLFloaterWebContent::postBuild(); mWebBrowser->addObserver(this); // Singu Note: Initialize ui and browser now mWebBrowser->setTrustedContent(true); mWebBrowser->setFocus(true); getChild<LLPanel>("status_bar")->setVisible(true); getChild<LLPanel>("nav_controls")->setVisible(true); getChildView("address")->setEnabled(false); getChildView("popexternal")->setEnabled(false); setRectControl("FloaterSearchRect"); applyRectControl(); search(SearchQuery(), mWebBrowser); gSavedSettings.getControl("SearchURL")->getSignal()->connect(boost::bind(LLFloaterSearch::search, SearchQuery(), mWebBrowser)); return TRUE; }
void LLFloaterWebContent::open_media(const Params& p) { // Specifying a mime type of text/html here causes the plugin system to skip the MIME type probe and just open a browser plugin. LLViewerMedia::proxyWindowOpened(p.target(), p.id()); mWebBrowser->setHomePageUrl(p.url, p.initial_mime_type); mWebBrowser->setTarget(p.target); mWebBrowser->navigateTo(p.url, p.initial_mime_type); set_current_url(p.url); getChild<LLPanel>("status_bar")->setVisible(p.show_chrome); getChild<LLPanel>("nav_controls")->setVisible(p.show_chrome); bool address_entry_enabled = p.allow_address_entry && !p.trusted_content; getChildView("address")->setEnabled(address_entry_enabled); getChildView("popexternal")->setEnabled(address_entry_enabled); if (!address_entry_enabled) { mWebBrowser->setFocus(TRUE); } if (!p.show_chrome) { setResizeLimits(100, 100); } else { // Singu Note: currently only true with normal browser floater, if this changes, this workaround breaks setRectControl("FloaterMediaRect"); applyRectControl(); } if (!p.preferred_media_size().isEmpty()) { getChild<LLLayoutStack>("stack1")->updateLayout(); LLRect browser_rect = mWebBrowser->calcScreenRect(); LLCoordWindow window_size; getWindow()->getSize(&window_size); geometryChanged(browser_rect.mLeft, window_size.mY - browser_rect.mTop, p.preferred_media_size().getWidth(), p.preferred_media_size().getHeight()); } }