diff options
author | Armin Weatherwax | 2009-07-09 17:50:25 +0200 |
---|---|---|
committer | Armin Weatherwax | 2009-07-11 13:45:59 +0200 |
commit | 29a0f7cfdd33e8d18ad5d932eefa67332d5b5ed3 (patch) | |
tree | b060e2e4849fca702a1cf27fabf5781d09ffa60e | |
parent | Broken: relog sometimes works once; fixed inventory and avatar not ruthed any... (diff) | |
download | meta-impy-29a0f7cfdd33e8d18ad5d932eefa67332d5b5ed3.zip meta-impy-29a0f7cfdd33e8d18ad5d932eefa67332d5b5ed3.tar.gz meta-impy-29a0f7cfdd33e8d18ad5d932eefa67332d5b5ed3.tar.bz2 meta-impy-29a0f7cfdd33e8d18ad5d932eefa67332d5b5ed3.tar.xz |
looks like working now
modified: linden/indra/newview/llchatbar.cpp
modified: linden/indra/newview/llviewerwindow.cpp
modified: linden/indra/newview/llvoavatar.cpp
-rw-r--r-- | linden/indra/newview/llchatbar.cpp | 1 | ||||
-rw-r--r-- | linden/indra/newview/llviewerwindow.cpp | 88 | ||||
-rw-r--r-- | linden/indra/newview/llvoavatar.cpp | 13 |
3 files changed, 61 insertions, 41 deletions
diff --git a/linden/indra/newview/llchatbar.cpp b/linden/indra/newview/llchatbar.cpp index 59aa572..02a62b6 100644 --- a/linden/indra/newview/llchatbar.cpp +++ b/linden/indra/newview/llchatbar.cpp | |||
@@ -115,6 +115,7 @@ LLChatBar::LLChatBar() | |||
115 | 115 | ||
116 | LLChatBar::~LLChatBar() | 116 | LLChatBar::~LLChatBar() |
117 | { | 117 | { |
118 | gGestureManager.removeObserver(mObserver); | ||
118 | delete mObserver; | 119 | delete mObserver; |
119 | mObserver = NULL; | 120 | mObserver = NULL; |
120 | // LLView destructor cleans up children | 121 | // LLView destructor cleans up children |
diff --git a/linden/indra/newview/llviewerwindow.cpp b/linden/indra/newview/llviewerwindow.cpp index 7e6c24f..1554075 100644 --- a/linden/indra/newview/llviewerwindow.cpp +++ b/linden/indra/newview/llviewerwindow.cpp | |||
@@ -1829,69 +1829,82 @@ void LLViewerWindow::initWorldUI() | |||
1829 | S32 width = mRootView->getRect().getWidth(); | 1829 | S32 width = mRootView->getRect().getWidth(); |
1830 | LLRect full_window(0, height, width, 0); | 1830 | LLRect full_window(0, height, width, 0); |
1831 | 1831 | ||
1832 | if ( gBottomPanel == NULL ) // Don't re-enter if objects are alreay created | 1832 | if (gBottomPanel) |
1833 | { | 1833 | mRootView->removeChild(gBottomPanel, TRUE); |
1834 | // panel containing chatbar, toolbar, and overlay, over floaters | 1834 | // panel containing chatbar, toolbar, and overlay, over floaters |
1835 | gBottomPanel = new LLBottomPanel(mRootView->getRect()); | 1835 | gBottomPanel = new LLBottomPanel(mRootView->getRect()); |
1836 | mRootView->addChild(gBottomPanel); | 1836 | mRootView->addChild(gBottomPanel); |
1837 | 1837 | ||
1838 | // View for hover information | 1838 | if (gHoverView) |
1839 | gHoverView = new LLHoverView(std::string("gHoverView"), full_window); | 1839 | mRootView->removeChild(gHoverView, TRUE); |
1840 | gHoverView->setVisible(TRUE); | 1840 | // View for hover information |
1841 | mRootView->addChild(gHoverView); | 1841 | gHoverView = new LLHoverView(std::string("gHoverView"), full_window); |
1842 | gHoverView->setVisible(TRUE); | ||
1843 | mRootView->addChild(gHoverView); | ||
1842 | 1844 | ||
1843 | gIMMgr = LLIMMgr::getInstance(); | 1845 | gIMMgr = LLIMMgr::getInstance(); |
1844 | 1846 | ||
1845 | if ( gSavedPerAccountSettings.getBOOL("LogShowHistory") ) | 1847 | if ( gSavedPerAccountSettings.getBOOL("LogShowHistory") ) |
1846 | { | 1848 | { |
1847 | LLFloaterChat::getInstance(LLSD())->loadHistory(); | 1849 | LLFloaterChat::getInstance(LLSD())->loadHistory(); |
1848 | } | 1850 | } |
1849 | 1851 | ||
1850 | LLRect morph_view_rect = full_window; | 1852 | LLRect morph_view_rect = full_window; |
1851 | morph_view_rect.stretch( -STATUS_BAR_HEIGHT ); | 1853 | morph_view_rect.stretch( -STATUS_BAR_HEIGHT ); |
1852 | morph_view_rect.mTop = full_window.mTop - 32; | 1854 | morph_view_rect.mTop = full_window.mTop - 32; |
1853 | gMorphView = new LLMorphView(std::string("gMorphView"), morph_view_rect ); | 1855 | if (gMorphView) |
1854 | mRootView->addChild(gMorphView); | 1856 | mRootView->removeChild(gMorphView, TRUE); |
1855 | gMorphView->setVisible(FALSE); | 1857 | |
1858 | gMorphView = new LLMorphView(std::string("gMorphView"), morph_view_rect ); | ||
1859 | mRootView->addChild(gMorphView); | ||
1860 | gMorphView->setVisible(FALSE); | ||
1856 | 1861 | ||
1857 | // *Note: this is where gFloaterMute used to be initialized. | 1862 | // *Note: this is where gFloaterMute used to be initialized. |
1858 | 1863 | ||
1859 | LLWorldMapView::initClass(); | 1864 | LLWorldMapView::initClass(); |
1860 | 1865 | ||
1861 | adjust_rect_centered_partial_zoom("FloaterWorldMapRect2", full_window); | 1866 | adjust_rect_centered_partial_zoom("FloaterWorldMapRect2", full_window); |
1862 | 1867 | ||
1868 | if (!gFloaterWorldMap) | ||
1869 | { | ||
1863 | gFloaterWorldMap = new LLFloaterWorldMap(); | 1870 | gFloaterWorldMap = new LLFloaterWorldMap(); |
1864 | gFloaterWorldMap->setVisible(FALSE); | 1871 | gFloaterWorldMap->setVisible(FALSE); |
1872 | } | ||
1865 | 1873 | ||
1866 | // | 1874 | // |
1867 | // Tools for building | 1875 | // Tools for building |
1868 | // | 1876 | // |
1869 | |||
1870 | // Toolbox floater | ||
1871 | init_menus(); | ||
1872 | 1877 | ||
1878 | // Toolbox floater | ||
1879 | init_menus(); | ||
1880 | if (!gFloaterTools) | ||
1881 | { | ||
1873 | gFloaterTools = new LLFloaterTools(); | 1882 | gFloaterTools = new LLFloaterTools(); |
1874 | gFloaterTools->setVisible(FALSE); | 1883 | gFloaterTools->setVisible(FALSE); |
1884 | } | ||
1875 | 1885 | ||
1886 | if (!gStatusBar) | ||
1887 | { | ||
1876 | // Status bar | 1888 | // Status bar |
1877 | S32 menu_bar_height = gMenuBarView->getRect().getHeight(); | 1889 | S32 menu_bar_height = gMenuBarView->getRect().getHeight(); |
1878 | LLRect root_rect = getRootView()->getRect(); | 1890 | LLRect root_rect = mRootView->getRect(); |
1879 | LLRect status_rect(0, root_rect.getHeight(), root_rect.getWidth(), root_rect.getHeight() - menu_bar_height); | 1891 | LLRect status_rect(0, root_rect.getHeight(), root_rect.getWidth(), root_rect.getHeight() - menu_bar_height); |
1880 | gStatusBar = new LLStatusBar(std::string("status"), status_rect); | 1892 | gStatusBar = new LLStatusBar(std::string("status"), status_rect); |
1881 | gStatusBar->setFollows(FOLLOWS_LEFT | FOLLOWS_RIGHT | FOLLOWS_TOP); | 1893 | gStatusBar->setFollows(FOLLOWS_LEFT | FOLLOWS_RIGHT | FOLLOWS_TOP); |
1882 | 1894 | ||
1883 | gStatusBar->reshape(root_rect.getWidth(), gStatusBar->getRect().getHeight(), TRUE); | 1895 | gStatusBar->reshape(root_rect.getWidth(), gStatusBar->getRect().getHeight(), TRUE); |
1884 | gStatusBar->translate(0, root_rect.getHeight() - gStatusBar->getRect().getHeight()); | 1896 | gStatusBar->translate(0, root_rect.getHeight() - gStatusBar->getRect().getHeight()); |
1885 | // sync bg color with menu bar | 1897 | // sync bg color with menu bar |
1886 | gStatusBar->setBackgroundColor( gMenuBarView->getBackgroundColor() ); | 1898 | gStatusBar->setBackgroundColor( gMenuBarView->getBackgroundColor() ); |
1899 | mRootView->addChild(gStatusBar); | ||
1900 | } | ||
1887 | 1901 | ||
1888 | LLFloaterChatterBox::createInstance(LLSD()); | 1902 | LLFloaterChatterBox::createInstance(LLSD()); |
1889 | 1903 | ||
1890 | getRootView()->addChild(gStatusBar); | ||
1891 | 1904 | ||
1892 | // menu holder appears on top to get first pass at all mouse events | 1905 | // menu holder appears on top to get first pass at all mouse events |
1893 | getRootView()->sendChildToFront(gMenuHolder); | 1906 | |
1894 | } | 1907 | mRootView->sendChildToFront(gMenuHolder); |
1895 | } | 1908 | } |
1896 | 1909 | ||
1897 | // Destroy the UI | 1910 | // Destroy the UI |
@@ -5136,7 +5149,6 @@ void LLBottomPanel::draw() | |||
5136 | 5149 | ||
5137 | void* LLBottomPanel::createHUD(void* data) | 5150 | void* LLBottomPanel::createHUD(void* data) |
5138 | { | 5151 | { |
5139 | delete gHUDView; | ||
5140 | gHUDView = new LLHUDView(); | 5152 | gHUDView = new LLHUDView(); |
5141 | return gHUDView; | 5153 | return gHUDView; |
5142 | } | 5154 | } |
@@ -5144,14 +5156,12 @@ void* LLBottomPanel::createHUD(void* data) | |||
5144 | 5156 | ||
5145 | void* LLBottomPanel::createOverlayBar(void* data) | 5157 | void* LLBottomPanel::createOverlayBar(void* data) |
5146 | { | 5158 | { |
5147 | delete gOverlayBar; | ||
5148 | gOverlayBar = new LLOverlayBar(); | 5159 | gOverlayBar = new LLOverlayBar(); |
5149 | return gOverlayBar; | 5160 | return gOverlayBar; |
5150 | } | 5161 | } |
5151 | 5162 | ||
5152 | void* LLBottomPanel::createToolBar(void* data) | 5163 | void* LLBottomPanel::createToolBar(void* data) |
5153 | { | 5164 | { |
5154 | delete gToolBar; | ||
5155 | gToolBar = new LLToolBar(); | 5165 | gToolBar = new LLToolBar(); |
5156 | return gToolBar; | 5166 | return gToolBar; |
5157 | } | 5167 | } |
diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp index 3d2523e..999a609 100644 --- a/linden/indra/newview/llvoavatar.cpp +++ b/linden/indra/newview/llvoavatar.cpp | |||
@@ -691,7 +691,11 @@ LLVOAvatar::LLVOAvatar( | |||
691 | mTexEyeColor( NULL ), | 691 | mTexEyeColor( NULL ), |
692 | mNeedsSkin(FALSE), | 692 | mNeedsSkin(FALSE), |
693 | mUpdatePeriod(1), | 693 | mUpdatePeriod(1), |
694 | mFullyLoadedInitialized(FALSE) | 694 | // mFullyLoadedInitialized(FALSE) |
695 | mPreviousFullyLoaded(FALSE), | ||
696 | mVisibleChat( FALSE ), | ||
697 | mFullyLoadedInitialized(FALSE), | ||
698 | mFullyLoaded(FALSE) | ||
695 | { | 699 | { |
696 | LLMemType mt(LLMemType::MTYPE_AVATAR); | 700 | LLMemType mt(LLMemType::MTYPE_AVATAR); |
697 | 701 | ||
@@ -1807,6 +1811,10 @@ BOOL LLVOAvatar::buildSkeleton(LLVOAvatarSkeletonInfo *info) | |||
1807 | { | 1811 | { |
1808 | LLMemType mt(LLMemType::MTYPE_AVATAR); | 1812 | LLMemType mt(LLMemType::MTYPE_AVATAR); |
1809 | 1813 | ||
1814 | //this can get called with null info on startup sometimes | ||
1815 | if (!info) | ||
1816 | return FALSE; | ||
1817 | |||
1810 | //------------------------------------------------------------------------- | 1818 | //------------------------------------------------------------------------- |
1811 | // allocate joints | 1819 | // allocate joints |
1812 | //------------------------------------------------------------------------- | 1820 | //------------------------------------------------------------------------- |
@@ -2174,9 +2182,10 @@ void LLVOAvatar::buildCharacter() | |||
2174 | LLMenuItemCallGL* item = new LLMenuItemCallGL(attachment->getName(), | 2182 | LLMenuItemCallGL* item = new LLMenuItemCallGL(attachment->getName(), |
2175 | NULL, &object_selected_and_point_valid, | 2183 | NULL, &object_selected_and_point_valid, |
2176 | &attach_label, attachment); | 2184 | &attach_label, attachment); |
2185 | if (item){ | ||
2177 | item->addListener(gMenuHolder->getListenerByName("Object.AttachToAvatar"), "on_click", curiter->first); | 2186 | item->addListener(gMenuHolder->getListenerByName("Object.AttachToAvatar"), "on_click", curiter->first); |
2178 | gAttachSubMenu->append(item); | 2187 | gAttachSubMenu->append(item); |
2179 | 2188 | } | |
2180 | gDetachSubMenu->append(new LLMenuItemCallGL(attachment->getName(), | 2189 | gDetachSubMenu->append(new LLMenuItemCallGL(attachment->getName(), |
2181 | &handle_detach_from_avatar, object_attached, &detach_label, attachment)); | 2190 | &handle_detach_from_avatar, object_attached, &detach_label, attachment)); |
2182 | 2191 | ||