aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
authorAleric Inglewood2010-10-20 18:31:42 +0200
committerAleric Inglewood2010-10-20 18:31:42 +0200
commit2f4e17af336c9a399a0274b7836f40fc7ff56e21 (patch)
tree1c5c9d83bab4a602b58b439ffccd758ebca54836 /linden/indra/newview/llviewerwindow.cpp
parentUpdate WebKit Version in About floater. (diff)
downloadmeta-impy-2f4e17af336c9a399a0274b7836f40fc7ff56e21.zip
meta-impy-2f4e17af336c9a399a0274b7836f40fc7ff56e21.tar.gz
meta-impy-2f4e17af336c9a399a0274b7836f40fc7ff56e21.tar.bz2
meta-impy-2f4e17af336c9a399a0274b7836f40fc7ff56e21.tar.xz
LindenUserDir fixes.
The LindenUserDir (~/.imprudence/first_last/) cannot be initialized before the user logged in. However, several singletons (that only can be initialized once) depend on this directory for initialization. Therefore we have to take care not to instantiate those singletons until after the user logged in. With regard to webit, this fixes the browser_profile (cache and cookies) directory that the builtin browser uses.
Diffstat (limited to 'linden/indra/newview/llviewerwindow.cpp')
-rw-r--r--linden/indra/newview/llviewerwindow.cpp70
1 files changed, 38 insertions, 32 deletions
diff --git a/linden/indra/newview/llviewerwindow.cpp b/linden/indra/newview/llviewerwindow.cpp
index 5cd730a..07fef53 100644
--- a/linden/indra/newview/llviewerwindow.cpp
+++ b/linden/indra/newview/llviewerwindow.cpp
@@ -1652,7 +1652,7 @@ void LLViewerWindow::adjustControlRectanglesForFirstUse(const LLRect& window)
1652 adjust_rect_top_center("FloaterCameraRect3", window); 1652 adjust_rect_top_center("FloaterCameraRect3", window);
1653} 1653}
1654 1654
1655void LLViewerWindow::initWorldUI() 1655void LLViewerWindow::pre_initWorldUI()
1656{ 1656{
1657 pre_init_menus(); 1657 pre_init_menus();
1658 1658
@@ -1672,9 +1672,45 @@ void LLViewerWindow::initWorldUI()
1672 gHoverView = new LLHoverView(std::string("gHoverView"), full_window); 1672 gHoverView = new LLHoverView(std::string("gHoverView"), full_window);
1673 gHoverView->setVisible(TRUE); 1673 gHoverView->setVisible(TRUE);
1674 mRootView->addChild(gHoverView); 1674 mRootView->addChild(gHoverView);
1675 1675
1676 gIMMgr = LLIMMgr::getInstance(); 1676 gIMMgr = LLIMMgr::getInstance();
1677 1677
1678 // Make sure we only create menus once per session -- MC
1679 if (!gMenuHolder)
1680 {
1681 init_menus();
1682 }
1683
1684 if (!gFloaterTools)
1685 {
1686 gFloaterTools = new LLFloaterTools();
1687 gFloaterTools->setVisible(FALSE);
1688 }
1689
1690 // menu holder appears on top to get first pass at all mouse events
1691
1692 mRootView->sendChildToFront(gMenuHolder);
1693
1694 if ( gHUDView == NULL )
1695 {
1696 LLRect hud_rect = full_window;
1697 hud_rect.mBottom += 50;
1698 if (gMenuBarView)
1699 {
1700 hud_rect.mTop -= gMenuBarView->getRect().getHeight();
1701 }
1702 gHUDView = new LLHUDView(hud_rect);
1703 // put behind everything else in the UI
1704 mRootView->addChildAtEnd(gHUDView);
1705 }
1706}
1707
1708void LLViewerWindow::initWorldUI()
1709{
1710 S32 height = mRootView->getRect().getHeight();
1711 S32 width = mRootView->getRect().getWidth();
1712 LLRect full_window(0, height, width, 0);
1713
1678 if ( gSavedPerAccountSettings.getBOOL("LogShowHistory") ) 1714 if ( gSavedPerAccountSettings.getBOOL("LogShowHistory") )
1679 { 1715 {
1680 LLFloaterChat::getInstance(LLSD())->loadHistory(); 1716 LLFloaterChat::getInstance(LLSD())->loadHistory();
@@ -1715,18 +1751,6 @@ void LLViewerWindow::initWorldUI()
1715 1751
1716 // Toolbox floater 1752 // Toolbox floater
1717 1753
1718 // Make sure we only create menus once per session -- MC
1719 if (!gMenuHolder)
1720 {
1721 init_menus();
1722 }
1723
1724 if (!gFloaterTools)
1725 {
1726 gFloaterTools = new LLFloaterTools();
1727 gFloaterTools->setVisible(FALSE);
1728 }
1729
1730 if (!gStatusBar) 1754 if (!gStatusBar)
1731 { 1755 {
1732 // Status bar 1756 // Status bar
@@ -1744,24 +1768,6 @@ void LLViewerWindow::initWorldUI()
1744 } 1768 }
1745 1769
1746 LLFloaterChatterBox::createInstance(LLSD()); 1770 LLFloaterChatterBox::createInstance(LLSD());
1747
1748
1749 // menu holder appears on top to get first pass at all mouse events
1750
1751 mRootView->sendChildToFront(gMenuHolder);
1752
1753 if ( gHUDView == NULL )
1754 {
1755 LLRect hud_rect = full_window;
1756 hud_rect.mBottom += 50;
1757 if (gMenuBarView)
1758 {
1759 hud_rect.mTop -= gMenuBarView->getRect().getHeight();
1760 }
1761 gHUDView = new LLHUDView(hud_rect);
1762 // put behind everything else in the UI
1763 mRootView->addChildAtEnd(gHUDView);
1764 }
1765} 1771}
1766 1772
1767// Destroy the UI 1773// Destroy the UI