diff options
author | Oz Linden <oz@lindenlab.com> | 2011-10-31 11:02:24 -0700 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2011-10-31 11:02:24 -0700 |
commit | b39dd46bf3e1c1ccdffe9b4ac4e9ad68b0c3cd69 (patch) | |
tree | 46e20f39ef94514de3f93a98aba75ad627209e84 /indra/newview/llimview.cpp | |
parent | 5d99b221fa8ea75b128e3cc771ed91baa8b11311 (diff) | |
parent | e86adb53f4df0cb0b9d8ea9b6cc805782d9fcf71 (diff) |
merge changes for storm-1673
Diffstat (limited to 'indra/newview/llimview.cpp')
-rw-r--r-- | indra/newview/llimview.cpp | 37 |
1 files changed, 34 insertions, 3 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 6e9baed5f2..ed4bb727cd 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1679,13 +1679,44 @@ BOOL LLCallDialog::postBuild() { if (!LLDockableFloater::postBuild() || !gToolBarView) return FALSE; + + dockToToolbarButton("speak"); + + return TRUE; +} + +void LLCallDialog::dockToToolbarButton(const std::string& toolbarButtonName) +{ + LLDockControl::DocAt dock_pos = getDockControlPos(toolbarButtonName); + LLView *anchor_panel = gToolBarView->findChildView(toolbarButtonName); - LLView *anchor_panel = gToolBarView->findChildView("speak"); - setDockControl(new LLDockControl(anchor_panel, this, getDockTongue(), LLDockControl::TOP)); + setUseTongue(anchor_panel); - return TRUE; + setDockControl(new LLDockControl(anchor_panel, this, getDockTongue(dock_pos), dock_pos)); } +LLDockControl::DocAt LLCallDialog::getDockControlPos(const std::string& toolbarButtonName) +{ + LLCommandId command_id(toolbarButtonName); + S32 toolbar_loc = gToolBarView->hasCommand(command_id); + + LLDockControl::DocAt doc_at = LLDockControl::TOP; + + switch (toolbar_loc) + { + case LLToolBarView::TOOLBAR_LEFT: + doc_at = LLDockControl::RIGHT; + break; + + case LLToolBarView::TOOLBAR_RIGHT: + doc_at = LLDockControl::LEFT; + break; + } + + return doc_at; +} + + //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLOutgoingCallDialog //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |