diff options
author | Yuri Chebotarev <ychebotarev@productengine.com> | 2009-10-29 18:10:25 +0200 |
---|---|---|
committer | Yuri Chebotarev <ychebotarev@productengine.com> | 2009-10-29 18:10:25 +0200 |
commit | 7d64c6a226046d962bf5cd2b1e53df6fe33a730d (patch) | |
tree | 2bf46411604c735d6efb975806c03e695b516cab /indra | |
parent | 19e99af208f0dad118cf3029f409442bca5d3e21 (diff) | |
parent | 191547dcb232535d24091be0fb4169c6c7eb89ef (diff) |
merge
--HG--
branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llavatarlist.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llchiclet.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llimview.cpp | 7 | ||||
-rw-r--r-- | indra/newview/llmoveview.cpp | 8 | ||||
-rw-r--r-- | indra/newview/llmutelist.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llnavigationbar.cpp | 11 | ||||
-rw-r--r-- | indra/newview/llnavigationbar.h | 5 | ||||
-rw-r--r-- | indra/newview/llscreenchannel.cpp | 1 | ||||
-rw-r--r-- | indra/newview/lltoastimpanel.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llviewercontrol.cpp | 25 | ||||
-rw-r--r-- | indra/newview/llviewercontrol.h | 3 | ||||
-rw-r--r-- | indra/newview/llviewermessage.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 12 |
13 files changed, 53 insertions, 24 deletions
diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp index 05a1f75e01..65a2b8b5e6 100644 --- a/indra/newview/llavatarlist.cpp +++ b/indra/newview/llavatarlist.cpp @@ -106,7 +106,6 @@ LLAvatarList::LLAvatarList(const Params& p) LLAvatarList::~LLAvatarList() { delete mLITUpdateTimer; - mShowIcons = gSavedSettings.getBOOL(mIconParamName); } void LLAvatarList::setShowIcons(std::string param_name) diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 4ff360cd74..670f8717a2 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -37,7 +37,6 @@ #include "llbottomtray.h" #include "llgroupactions.h" #include "lliconctrl.h" -#include "llimpanel.h" // LLFloaterIMPanel #include "llimfloater.h" #include "llimview.h" #include "llfloaterreg.h" diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 8a55ab41b9..cc848e519f 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1360,14 +1360,9 @@ void LLIMMgr::addMessage( fixed_session_name = session_name; } - bool new_session = !hasSession(session_id); + bool new_session = !hasSession(new_session_id); if (new_session) { - // *NOTE dzaporozhan - // Workaround for critical bug EXT-1918 - - // *TODO - // Investigate cases when session_id == NULL and find solution to handle those cases LLIMModel::getInstance()->newSession(new_session_id, fixed_session_name, dialog, other_participant_id); } diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index 2b4e35208a..14da35594f 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -280,6 +280,14 @@ void LLFloaterMove::setMovementMode(const EMovementMode mode) mCurrentMode = mode; gAgent.setFlying(MM_FLY == mode); + // attempts to set avatar flying can not set it real flying in some cases. + // For ex. when avatar fell down & is standing up. + // So, no need to continue processing FLY mode. See EXT-1079 + if (MM_FLY == mode && !gAgent.getFlying()) + { + return; + } + switch (mode) { case MM_RUN: diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp index ff7f08bf97..36cf2c1aa8 100644 --- a/indra/newview/llmutelist.cpp +++ b/indra/newview/llmutelist.cpp @@ -65,7 +65,6 @@ #include "llworld.h" //for particle system banning #include "llchat.h" #include "llfloaterchat.h" -#include "llimpanel.h" #include "llimview.h" #include "llnotifications.h" #include "lluistring.h" diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index c32ef2f22b..9a05812847 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -164,8 +164,6 @@ TODO: - Load navbar height from saved settings (as it's done for status bar) or think of a better way. */ -S32 NAVIGATION_BAR_HEIGHT = 60; // *HACK, used in llviewerwindow.cpp - LLNavigationBar::LLNavigationBar() : mTeleportHistoryMenu(NULL), mBtnBack(NULL), @@ -545,6 +543,15 @@ void LLNavigationBar::clearHistoryCache() mPurgeTPHistoryItems= true; } +int LLNavigationBar::getDefNavBarHeight() +{ + return mDefaultNbRect.getHeight(); +} +int LLNavigationBar::getDefFavBarHeight() +{ + return mDefaultFpRect.getHeight(); +} + void LLNavigationBar::showNavigationPanel(BOOL visible) { bool fpVisible = gSavedSettings.getBOOL("ShowNavbarFavoritesPanel"); diff --git a/indra/newview/llnavigationbar.h b/indra/newview/llnavigationbar.h index f1a1b85a86..8b625e7fa6 100644 --- a/indra/newview/llnavigationbar.h +++ b/indra/newview/llnavigationbar.h @@ -35,8 +35,6 @@ #include "llpanel.h" -extern S32 NAVIGATION_BAR_HEIGHT; - class LLButton; class LLLocationInputCtrl; class LLMenuGL; @@ -63,6 +61,9 @@ public: void showNavigationPanel(BOOL visible); void showFavoritesPanel(BOOL visible); + + int getDefNavBarHeight(); + int getDefFavBarHeight(); private: diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index 73dcd1dd92..e4dbcbd219 100644 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -44,7 +44,6 @@ #include "lltrans.h" #include "lldockablefloater.h" -#include "llimpanel.h" #include "llsyswellwindow.h" #include "llimfloater.h" diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp index c2cd63900b..c02fd7a5ef 100644 --- a/indra/newview/lltoastimpanel.cpp +++ b/indra/newview/lltoastimpanel.cpp @@ -32,7 +32,6 @@ #include "llviewerprecompiledheaders.h" #include "lltoastimpanel.h" -#include "llimpanel.h" const S32 LLToastIMPanel::DEFAULT_MESSAGE_MAX_LINE_COUNT = 6; diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index b71291f834..35226a1632 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -511,13 +511,34 @@ bool toggle_show_snapshot_button(const LLSD& newvalue) bool toggle_show_navigation_panel(const LLSD& newvalue) { - LLNavigationBar::getInstance()->showNavigationPanel(newvalue.asBoolean()); + LLRect floater_view_rect = gFloaterView->getRect(); + LLRect notify_view_rect = gNotifyBoxView->getRect(); + LLNavigationBar* navbar = LLNavigationBar::getInstance(); + + //if newvalue contains 0 => navbar should turn invisible, so floater_view_rect should get higher, + //and to do this pm=1, else if navbar becomes visible pm=-1 so floater_view_rect gets lower. + int pm=newvalue.asBoolean()?-1:1; + floater_view_rect.mTop += pm*(navbar->getDefNavBarHeight()-navbar->getDefFavBarHeight()); + notify_view_rect.mTop += pm*(navbar->getDefNavBarHeight()-navbar->getDefFavBarHeight()); + gFloaterView->setRect(floater_view_rect); + floater_view_rect = gFloaterView->getRect(); + navbar->showNavigationPanel(newvalue.asBoolean()); return true; } bool toggle_show_favorites_panel(const LLSD& newvalue) { - LLNavigationBar::getInstance()->showFavoritesPanel(newvalue.asBoolean()); + LLRect floater_view_rect = gFloaterView->getRect(); + LLRect notify_view_rect = gNotifyBoxView->getRect(); + LLNavigationBar* navbar = LLNavigationBar::getInstance(); + + //if newvalue contains 0 => favbar should turn invisible, so floater_view_rect should get higher, + //and to do this pm=1, else if favbar becomes visible pm=-1 so floater_view_rect gets lower. + int pm=newvalue.asBoolean()?-1:1; + floater_view_rect.mTop += pm*navbar->getDefFavBarHeight(); + notify_view_rect.mTop += pm*navbar->getDefFavBarHeight(); + gFloaterView->setRect(floater_view_rect); + navbar->showFavoritesPanel(newvalue.asBoolean()); return true; } diff --git a/indra/newview/llviewercontrol.h b/indra/newview/llviewercontrol.h index b1f14eca7b..9b4e80cae0 100644 --- a/indra/newview/llviewercontrol.h +++ b/indra/newview/llviewercontrol.h @@ -43,6 +43,9 @@ extern BOOL gHackGodmode; #endif +bool toggle_show_navigation_panel(const LLSD& newvalue); +bool toggle_show_favorites_panel(const LLSD& newvalue); + // These functions found in llcontroldef.cpp *TODO: clean this up! //setting variables are declared in this function void settings_setup_listeners(); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 320f0f83ff..ec6ef92a54 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -88,7 +88,6 @@ #include "llhudeffect.h" #include "llhudeffecttrail.h" #include "llhudmanager.h" -#include "llimpanel.h" #include "llinventorymodel.h" #include "llfloaterinventory.h" #include "llmenugl.h" diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index b0b69fbae6..ba32e07464 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1518,11 +1518,12 @@ void LLViewerWindow::initWorldUI() getRootView()->addChild(gMorphView); // Make space for nav bar. + LLNavigationBar* navbar = LLNavigationBar::getInstance(); LLRect floater_view_rect = gFloaterView->getRect(); LLRect notify_view_rect = gNotifyBoxView->getRect(); - floater_view_rect.mTop -= NAVIGATION_BAR_HEIGHT; + floater_view_rect.mTop -= navbar->getDefNavBarHeight(); floater_view_rect.mBottom += LLBottomTray::getInstance()->getRect().getHeight(); - notify_view_rect.mTop -= NAVIGATION_BAR_HEIGHT; + notify_view_rect.mTop -= navbar->getDefNavBarHeight(); notify_view_rect.mBottom += LLBottomTray::getInstance()->getRect().getHeight(); gFloaterView->setRect(floater_view_rect); gNotifyBoxView->setRect(notify_view_rect); @@ -1549,20 +1550,19 @@ void LLViewerWindow::initWorldUI() gStatusBar->setBackgroundColor( gMenuBarView->getBackgroundColor().get() ); // Navigation bar - - LLNavigationBar* navbar = LLNavigationBar::getInstance(); navbar->reshape(root_rect.getWidth(), navbar->getRect().getHeight(), TRUE); // *TODO: redundant? navbar->translate(0, root_rect.getHeight() - menu_bar_height - navbar->getRect().getHeight()); // FIXME navbar->setBackgroundColor(gMenuBarView->getBackgroundColor().get()); + if (!gSavedSettings.getBOOL("ShowNavbarNavigationPanel")) { - navbar->showNavigationPanel(FALSE); + toggle_show_navigation_panel(LLSD(0)); } if (!gSavedSettings.getBOOL("ShowNavbarFavoritesPanel")) { - navbar->showFavoritesPanel(FALSE); + toggle_show_favorites_panel(LLSD(0)); } if (!gSavedSettings.getBOOL("ShowCameraButton")) |