From 606311b508c5b13cd995a98d16660e61a58fa3f7 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Mon, 5 Oct 2009 20:53:51 +0000 Subject: text boxes are now *not* mouse_opaque by default fixed some textbox and text editor layout problems (getWidth called with wrong index) EXT-1302 - rewrite LLExpandableTextBox to use new LLTextBase functionality (using custom LLExpanderSegment) reviewed by James --- indra/newview/llexpandabletextbox.cpp | 322 ++++++--------------- indra/newview/llexpandabletextbox.h | 36 +-- .../skins/default/xui/en/floater_test_widgets.xml | 5 +- .../newview/skins/default/xui/en/panel_profile.xml | 8 +- .../default/xui/en/widgets/expandable_text.xml | 10 - .../newview/skins/default/xui/en/widgets/text.xml | 1 + 6 files changed, 108 insertions(+), 274 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llexpandabletextbox.cpp b/indra/newview/llexpandabletextbox.cpp index f8f5db9d7e..28c124d1c6 100644 --- a/indra/newview/llexpandabletextbox.cpp +++ b/indra/newview/llexpandabletextbox.cpp @@ -34,253 +34,121 @@ #include "llexpandabletextbox.h" #include "llscrollcontainer.h" +#include "llwindow.h" static LLDefaultChildRegistry::Register t1("expandable_text"); -LLExpandableTextBox::LLTextBoxEx::Params::Params() -: expand_textbox("expand_textbox") +class LLExpanderSegment : public LLTextSegment { -} +public: + LLExpanderSegment(const LLStyleSP& style, S32 start, S32 end, const std::string& more_text, LLTextBase& editor ) + : LLTextSegment(start, end), + mEditor(editor), + mStyle(style), + mMoreText(more_text) + {} + + /*virtual*/ S32 getWidth(S32 first_char, S32 num_chars) const + { + // more label always spans width of text box + return mEditor.getTextRect().getWidth(); + } + /*virtual*/ S32 getOffset(S32 segment_local_x_coord, S32 start_offset, S32 num_chars, bool round) const + { + return start_offset; + } + /*virtual*/ S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const { return getEnd() - getStart(); } + /*virtual*/ F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect) + { + F32 right_x; + mStyle->getFont()->renderUTF8(mMoreText, start, draw_rect.mRight, draw_rect.mTop, mStyle->getColor(), LLFontGL::RIGHT, LLFontGL::TOP, 0, mStyle->getShadowType(), end - start, draw_rect.getWidth(), &right_x, mEditor.getUseEllipses()); + return right_x; + } + /*virtual*/ S32 getMaxHeight() const { return llceil(mStyle->getFont()->getLineHeight()); } + /*virtual*/ bool canEdit() const { return false; } + /*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask) { mEditor.onCommit(); return TRUE; } + /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask) + { + LLUI::getWindow()->setCursor(UI_CURSOR_HAND); + return TRUE; + } +private: + LLTextBase& mEditor; + LLStyleSP mStyle; + std::string mMoreText; +}; + + LLExpandableTextBox::LLTextBoxEx::LLTextBoxEx(const Params& p) -: LLTextBox(p) +: LLTextBox(p), + mExpanded(false) { setIsChrome(TRUE); - LLTextBox::Params params = p.expand_textbox; - mExpandTextBox = LLUICtrlFactory::create(params); - addChild(mExpandTextBox); - - LLRect rc = getLocalRect(); - rc.mRight -= getHPad(); - rc.mLeft = rc.mRight - mExpandTextBox->getTextPixelWidth(); - rc.mTop = mExpandTextBox->getTextPixelHeight(); - mExpandTextBox->setRect(rc); } -BOOL LLExpandableTextBox::LLTextBoxEx::handleMouseUp(S32 x, S32 y, MASK mask) +void LLExpandableTextBox::LLTextBoxEx::reshape(S32 width, S32 height, BOOL called_from_parent) { - BOOL ret = LLTextBox::handleMouseUp(x, y, mask); + LLTextBox::reshape(width, height, called_from_parent); - if(mExpandTextBox->getRect().pointInRect(x, y)) + if (getTextPixelHeight() > getRect().getHeight()) { - onCommit(); + showExpandText(); + } + else + { + hideExpandText(); } - - return ret; } -void LLExpandableTextBox::LLTextBoxEx::draw() +void LLExpandableTextBox::LLTextBoxEx::setValue(const LLSD& value) { - // draw text box - LLTextBox::draw(); - // force text box to draw children - LLUICtrl::draw(); -} - -/* LLTextBox has been rewritten, the variables referenced in this code -no longer exist. + LLTextBox::setValue(value); -void LLExpandableTextBox::LLTextBoxEx::drawText( S32 x, S32 y, const LLWString &text, const LLColor4& color ) -{ - // *NOTE:dzaporozhan: - // Copy/paste from LLTextBox::drawText in order to modify last - // line width if needed and who "More" link - F32 alpha = getDrawContext().mAlpha; - if (mSegments.size() > 1) + if (getTextPixelHeight() > getRect().getHeight()) { - // we have Urls (or other multi-styled segments) - drawTextSegments(x, y, text); - } - else if( mLineLengthList.empty() ) - { - // simple case of 1 line of text in one style - mDefaultFont->render(text, 0, (F32)x, (F32)y, color % alpha, - mHAlign, mVAlign, - 0, - mShadowType, - S32_MAX, getRect().getWidth(), NULL, mUseEllipses); - - mExpandTextBox->setVisible(FALSE); + showExpandText(); } else { - // simple case of multiple lines of text, all in the same style - S32 cur_pos = 0; - for (std::vector::iterator iter = mLineLengthList.begin(); - iter != mLineLengthList.end(); ++iter) - { - S32 line_length = *iter; - S32 line_height = llfloor(mDefaultFont->getLineHeight()) + mLineSpacing; - S32 max_pixels = getRect().getWidth(); - - if(iter + 1 != mLineLengthList.end() - && y - line_height < line_height) - { - max_pixels = getCropTextWidth(); - } - - mDefaultFont->render(text, cur_pos, (F32)x, (F32)y, color % alpha, - mHAlign, mVAlign, - 0, - mShadowType, - line_length, max_pixels, NULL, mUseEllipses ); - - cur_pos += line_length + 1; - - y -= line_height; - if(y < line_height) - { - if( mLineLengthList.end() != iter + 1 ) - { - showExpandText(y); - } - else - { - hideExpandText(); - } - break; - } - } + hideExpandText(); } } -*/ -void LLExpandableTextBox::LLTextBoxEx::showExpandText(S32 y) -{ - LLRect rc = mExpandTextBox->getRect(); - rc.mTop = y + mExpandTextBox->getTextPixelHeight(); - rc.mBottom = y; - mExpandTextBox->setRect(rc); - mExpandTextBox->setVisible(TRUE); -} -void LLExpandableTextBox::LLTextBoxEx::hideExpandText() -{ - mExpandTextBox->setVisible(FALSE); -} - -S32 LLExpandableTextBox::LLTextBoxEx::getCropTextWidth() -{ - return mExpandTextBox->getRect().mLeft - getHPad() * 2; -} - -/* -// *NOTE:James: -// LLTextBox::drawText() has been completely rewritten, as it now handles -// arbitrarily styled segments of text. This needs to be rebuilt. - -void LLExpandableTextBox::LLTextBoxEx::drawTextSegments(S32 init_x, S32 init_y, const LLWString &text) +void LLExpandableTextBox::LLTextBoxEx::showExpandText() { - - // *NOTE:dzaporozhan: - // Copy/paste from LLTextBox::drawTextSegments in order to modify last - // line width if needed and who "More" link - F32 alpha = getDrawContext().mAlpha; - - const S32 text_len = text.length(); - if (text_len <= 0) + if (!mExpanded) { - return; + // get fully visible lines + std::pair visible_lines = getVisibleLines(true); + S32 last_line = visible_lines.second - 1; + + LLStyle::Params expander_style = getDefaultStyle(); + expander_style.font.name.setIfNotProvided(LLFontGL::nameFromFont(expander_style.font)); + expander_style.font.style = "UNDERLINE"; + expander_style.color = LLUIColorTable::instance().getColor("HTMLLinkColor"); + LLExpanderSegment* expanderp = new LLExpanderSegment(new LLStyle(expander_style), getLineStart(last_line), getLength() + 1, "More", *this); + insertSegment(expanderp); + mExpanded = true; } - S32 cur_line = 0; - S32 num_lines = getLineCount(); - S32 line_start = getLineStart(cur_line); - S32 line_height = llround( mDefaultFont->getLineHeight() ) + mLineSpacing; - F32 text_y = (F32) init_y; - segment_set_t::iterator cur_seg = mSegments.begin(); +} - // render a line of text at a time - const LLRect textRect = getLocalRect(); - while((textRect.mBottom <= text_y) && (cur_line < num_lines)) +//NOTE: obliterates existing styles (including hyperlinks) +void LLExpandableTextBox::LLTextBoxEx::hideExpandText() +{ + if (mExpanded) { - S32 next_start = -1; - S32 line_end = text_len; - - if ((cur_line + 1) < num_lines) - { - next_start = getLineStart(cur_line + 1); - line_end = next_start; - } - if ( text[line_end-1] == '\n' ) - { - --line_end; - } - - // render all segments on this line - F32 text_x = init_x; - S32 seg_start = line_start; - while (seg_start < line_end && cur_seg != mSegments.end()) - { - // move to the next segment (or continue the previous one) - LLTextSegment *cur_segment = *cur_seg; - while (cur_segment->getEnd() <= seg_start) - { - if (++cur_seg == mSegments.end()) - { - return; - } - cur_segment = *cur_seg; - } - - // Draw a segment within the line - S32 clipped_end = llmin( line_end, cur_segment->getEnd() ); - S32 clipped_len = clipped_end - seg_start; - if( clipped_len > 0 ) - { - LLStyleSP style = cur_segment->getStyle(); - if (style && style->isVisible()) - { - // work out the color for the segment - LLColor4 color ; - if (getEnabled()) - { - color = style->isLink() ? mLinkColor.get() : mTextColor.get(); - } - else - { - color = mDisabledColor.get(); - } - color = color % alpha; - - S32 max_pixels = textRect.getWidth(); - - if(cur_line + 1 < num_lines - && text_y - line_height < line_height) - { - max_pixels = getCropTextWidth(); - } - - // render a single line worth for this segment - mDefaultFont->render(text, seg_start, text_x, text_y, color, - mHAlign, mVAlign, 0, mShadowType, clipped_len, - max_pixels, &text_x, mUseEllipses); - } - - seg_start += clipped_len; - } - } - - // move down one line - text_y -= (F32)line_height; - line_start = next_start; - cur_line++; - if(text_y < line_height) - { - if( cur_line < num_lines ) - { - showExpandText((S32)text_y); - } - else - { - hideExpandText(); - } - break; - } + // this will overwrite the expander segment and all text styling with a single style + LLNormalTextSegment* segmentp = new LLNormalTextSegment( + new LLStyle(getDefaultStyle()), 0, getLength() + 1, *this); + insertSegment(segmentp); + + mExpanded = false; } } -*/ S32 LLExpandableTextBox::LLTextBoxEx::getVerticalTextDelta() { @@ -295,24 +163,24 @@ S32 LLExpandableTextBox::LLTextBoxEx::getVerticalTextDelta() ////////////////////////////////////////////////////////////////////////// LLExpandableTextBox::Params::Params() -: textbox("textbox") -, scroll("scroll") -, max_height("max_height", 0) -, bg_visible("bg_visible", false) -, expanded_bg_visible("expanded_bg_visible", true) -, bg_color("bg_color", LLColor4::black) -, expanded_bg_color("expanded_bg_color", LLColor4::black) +: textbox("textbox"), + scroll("scroll"), + max_height("max_height", 0), + bg_visible("bg_visible", false), + expanded_bg_visible("expanded_bg_visible", true), + bg_color("bg_color", LLColor4::black), + expanded_bg_color("expanded_bg_color", LLColor4::black) { } LLExpandableTextBox::LLExpandableTextBox(const Params& p) -: LLUICtrl(p) -, mMaxHeight(p.max_height) -, mBGVisible(p.bg_visible) -, mExpandedBGVisible(p.expanded_bg_visible) -, mBGColor(p.bg_color) -, mExpandedBGColor(p.expanded_bg_color) -, mExpanded(false) +: LLUICtrl(p), + mMaxHeight(p.max_height), + mBGVisible(p.bg_visible), + mExpandedBGVisible(p.expanded_bg_visible), + mBGColor(p.bg_color), + mExpandedBGColor(p.expanded_bg_color), + mExpanded(false) { LLRect rc = getLocalRect(); @@ -474,8 +342,6 @@ void LLExpandableTextBox::collapseTextBox() updateTextBoxRect(); - // Should be handled automatically in reshape above. JC - //mTextBox->setWrappedText(mText); if(gFocusMgr.getTopCtrl() == this) { gFocusMgr.setTopCtrl(NULL); diff --git a/indra/newview/llexpandabletextbox.h b/indra/newview/llexpandabletextbox.h index 0b9c3f7258..b78a4dc674 100644 --- a/indra/newview/llexpandabletextbox.h +++ b/indra/newview/llexpandabletextbox.h @@ -54,27 +54,11 @@ protected: public: struct Params : public LLInitParam::Block { - Optional expand_textbox; - - Params(); }; - /** - * Draw text box and "More" link - */ - /*virtual*/ void draw(); - -// /** -// * Draws simple text(no urls) line by line, will show or hide "More" link -// * if needed. -// */ -// /*virtual*/ void drawText( S32 x, S32 y, const LLWString &text, const LLColor4& color ); -// -// /** -// * Draws segmented text(with urls) line by line. Will show or hide "More" link -// * if needed -// */ -// void drawTextSegments(S32 x, S32 y, const LLWString &text); + // adds or removes "More" link as needed + /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + /*virtual*/ void setValue(const LLSD& value); /** * Returns difference between text box height and text height. @@ -92,11 +76,6 @@ protected: */ virtual S32 getHPad() { return mHPad; } - /** - * Broadcasts "commit" signal if user clicked "More" link - */ - /*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask); - protected: LLTextBoxEx(const Params& p); @@ -105,21 +84,16 @@ protected: /** * Shows "More" link */ - void showExpandText(S32 y); + void showExpandText(); /** * Hides "More" link */ void hideExpandText(); - /** - * Returns cropped line width - */ - S32 getCropTextWidth(); - private: - LLTextBox* mExpandTextBox; + bool mExpanded; }; public: diff --git a/indra/newview/skins/default/xui/en/floater_test_widgets.xml b/indra/newview/skins/default/xui/en/floater_test_widgets.xml index 5a29c6a319..8ed2047a27 100644 --- a/indra/newview/skins/default/xui/en/floater_test_widgets.xml +++ b/indra/newview/skins/default/xui/en/floater_test_widgets.xml @@ -316,13 +316,16 @@ height="40" follows="top|left|bottom" layout="topleft" - name="test_text_editor" + name="test_text_box" tool_tip="text box" top_pad="5" width="200"> Text box with multiple lines +and too +many +line to actually fit diff --git a/indra/newview/skins/default/xui/en/panel_profile.xml b/indra/newview/skins/default/xui/en/panel_profile.xml index b4212aaa34..9cf699ad46 100644 --- a/indra/newview/skins/default/xui/en/panel_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_profile.xml @@ -43,7 +43,7 @@ layout="topleft" top="0" left="0" - width="284" + width="300" height="700"> + width="285"> + width="285"> Lorem ipsum dolor sit amet, consectetur adlkjpiscing elit moose moose. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet. adipiscing elit. Aenean rigviverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet sorbet ipsum. adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum. diff --git a/indra/newview/skins/default/xui/en/widgets/expandable_text.xml b/indra/newview/skins/default/xui/en/widgets/expandable_text.xml index bcfc2f6472..e470f42d36 100644 --- a/indra/newview/skins/default/xui/en/widgets/expandable_text.xml +++ b/indra/newview/skins/default/xui/en/widgets/expandable_text.xml @@ -9,16 +9,6 @@ tab_stop="true" v_pad="2" h_pad="3" > - Date: Mon, 5 Oct 2009 21:16:35 +0000 Subject: Back out revisions 135028,134955,134953,134939 * Revert Vivox SDK update --- indra/newview/viewer_manifest.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 036fa4923f..d3b0a2e47e 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -249,12 +249,10 @@ class WindowsManifest(ViewerManifest): # Vivox runtimes if self.prefix(src="vivox-runtime/i686-win32", dst=""): self.path("SLVoice.exe") - self.path("libsndfile-1.dll") - self.path("zlib1.dll") + self.path("alut.dll") self.path("vivoxsdk.dll") - self.path("vivoxplatform.dll") self.path("ortp.dll") - self.path("vivoxoal.dll") + self.path("wrap_oal.dll") self.end_prefix() # pull in the crash logger and updater from other projects @@ -464,11 +462,10 @@ class DarwinManifest(ViewerManifest): self.path("zh-Hans.lproj") # SLVoice and vivox lols - self.path("vivox-runtime/universal-darwin/libsndfile.dylib", "libsndfile.dylib") - self.path("vivox-runtime/universal-darwin/libvivoxoal.dylib", "libvivoxoal.dylib") + self.path("vivox-runtime/universal-darwin/libalut.dylib", "libalut.dylib") + self.path("vivox-runtime/universal-darwin/libopenal.dylib", "libopenal.dylib") self.path("vivox-runtime/universal-darwin/libortp.dylib", "libortp.dylib") self.path("vivox-runtime/universal-darwin/libvivoxsdk.dylib", "libvivoxsdk.dylib") - self.path("vivox-runtime/universal-darwin/libvivoxplatform.dylib", "libvivoxplatform.dylib") self.path("vivox-runtime/universal-darwin/SLVoice", "SLVoice") # need to get the kdu dll from any of the build directories as well @@ -721,10 +718,7 @@ class Linux_i686Manifest(LinuxManifest): self.end_prefix() if self.prefix(src="vivox-runtime/i686-linux", dst="lib"): self.path("libortp.so") - self.path("libsndfile.so.1") - self.path("libvivoxoal.so.1") self.path("libvivoxsdk.so") - self.path("libvivoxplatform.so") self.end_prefix("lib") class Linux_x86_64Manifest(LinuxManifest): -- cgit v1.2.3 From e65a78427fc6527088e98ef7e84e1eabafae0d88 Mon Sep 17 00:00:00 2001 From: James Cook Date: Mon, 5 Oct 2009 22:10:01 +0000 Subject: Fixed typo in URL. --- indra/newview/skins/default/xui/en/notifications.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 829c2e02d8..f141a909a8 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -761,7 +761,7 @@ You need an account to enter [SECOND_LIFE]. Would you like to create one now? name="url" openexternally = "1"> - http://join/secondlife.com/ + http://join.secondlife.com/ Date: Mon, 5 Oct 2009 22:24:44 +0000 Subject: EXT-1303 - notification text is truncated reviewed by Leyla --- indra/newview/skins/default/xui/en/widgets/text.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/widgets/text.xml b/indra/newview/skins/default/xui/en/widgets/text.xml index f0127a9d5a..5914c21b2b 100644 --- a/indra/newview/skins/default/xui/en/widgets/text.xml +++ b/indra/newview/skins/default/xui/en/widgets/text.xml @@ -18,4 +18,5 @@ border_visible="false" hover="false" text_color="LabelTextColor" - v_pad="-1"/> + v_pad="-1" + max_length="4096"/> -- cgit v1.2.3 From 87d8b4c11b7f850ceae11082c40c975b90ecdfc1 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Mon, 5 Oct 2009 22:45:32 +0000 Subject: * EXT-1301 - Fixed showstopper by eliminating the notification that was blocking testing (by getting triggered every frame on a failed media plugin load) --- indra/newview/llviewermedia.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 100a34291b..2b972614f1 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1378,7 +1378,8 @@ void LLViewerMediaImpl::handleMediaEvent(LLPluginClassMedia* plugin, LLPluginCla { LLSD args; args["PLUGIN"] = LLMIMETypes::implType(mMimeType); - LLNotifications::instance().add("MediaPluginFailed", args); + // SJB: This is getting called every frame if the plugin fails to load, continuously respawining the alert! + //LLNotifications::instance().add("MediaPluginFailed", args); } break; -- cgit v1.2.3 From 0e753a281ec3c3f100c057d3ee9de479005511ef Mon Sep 17 00:00:00 2001 From: Martin Reddy Date: Mon, 5 Oct 2009 23:31:55 +0000 Subject: DEV-39998: Fixed the width of the side tray tab caption so that the help button, "?", is right justified. XUI-only update. --- indra/newview/skins/default/xui/en/panel_side_tray_tab_caption.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_side_tray_tab_caption.xml b/indra/newview/skins/default/xui/en/panel_side_tray_tab_caption.xml index 3b1b049ff2..9845a9eb78 100644 --- a/indra/newview/skins/default/xui/en/panel_side_tray_tab_caption.xml +++ b/indra/newview/skins/default/xui/en/panel_side_tray_tab_caption.xml @@ -4,7 +4,7 @@ bottom="0" follows="left|top|right" height="30" - width="305" + width="333" layout="topleft" left="0" name="sidetray_tab_panel"> -- cgit v1.2.3 From 5749dd152b84488606ff70572a5cf825954835ec Mon Sep 17 00:00:00 2001 From: James Cook Date: Mon, 5 Oct 2009 23:41:22 +0000 Subject: EXT-670 Kill Calling Cards tab in "Resident chooser". Reviewed with Kelly. --- indra/newview/llfloateravatarpicker.cpp | 60 +--------------------- indra/newview/llfloateravatarpicker.h | 6 --- .../skins/default/xui/en/floater_avatar_picker.xml | 33 +----------- 3 files changed, 3 insertions(+), 96 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp index 91b9bcfe72..890d863db7 100644 --- a/indra/newview/llfloateravatarpicker.cpp +++ b/indra/newview/llfloateravatarpicker.cpp @@ -37,20 +37,15 @@ #include "llagent.h" #include "llfocusmgr.h" #include "llfloaterreg.h" -#include "llfloaterinventory.h" -#include "llfoldervieweventlistener.h" -#include "llinventorymodel.h" #include "llviewercontrol.h" #include "llworld.h" // Linden libraries -#include "llbutton.h" #include "lllineeditor.h" #include "llscrolllistctrl.h" #include "llscrolllistitem.h" #include "llscrolllistcell.h" #include "lltabcontainer.h" -#include "lltextbox.h" #include "lluictrlfactory.h" #include "message.h" @@ -117,13 +112,6 @@ BOOL LLFloaterAvatarPicker::postBuild() getChild("SearchResults")->setCommentText(getString("no_results")); - LLInventoryPanel* inventory_panel = getChild("InventoryPanel"); - inventory_panel->setFilterTypes(0x1 << LLInventoryType::IT_CALLINGCARD); - inventory_panel->setFollowsAll(); - inventory_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); - inventory_panel->openDefaultFolderForType(LLAssetType::AT_CALLINGCARD); - inventory_panel->setSelectCallback(boost::bind(&LLFloaterAvatarPicker::doCallingCardSelectionChange, this, _1, _2)); - getChild("ResidentChooserTabs")->setCommitCallback( boost::bind(&LLFloaterAvatarPicker::onTabChanged, this)); @@ -173,11 +161,7 @@ void LLFloaterAvatarPicker::onBtnSelect(void* userdata) { LLPanel* active_panel = self->childGetVisibleTab("ResidentChooserTabs"); - if(active_panel == self->getChild("CallingCardsPanel")) - { - self->mCallback(self->mSelectedInventoryAvatarNames, self->mSelectedInventoryAvatarIDs, self->mCallbackUserdata); - } - else if(active_panel == self->getChild("SearchPanel")) + if(active_panel == self->getChild("SearchPanel")) { std::vector avatar_names; std::vector avatar_ids; @@ -192,7 +176,6 @@ void LLFloaterAvatarPicker::onBtnSelect(void* userdata) self->mCallback(avatar_names, avatar_ids, self->mCallbackUserdata); } } - self->getChild("InventoryPanel")->setSelection(LLUUID::null, FALSE); self->getChild("SearchResults")->deselectAllItems(TRUE); self->getChild("NearMe")->deselectAllItems(TRUE); if(self->mCloseOnSelect) @@ -235,40 +218,6 @@ void LLFloaterAvatarPicker::onList(LLUICtrl* ctrl, void* userdata) } } -// Callback for inventory picker (select from calling cards) -void LLFloaterAvatarPicker::doCallingCardSelectionChange(const std::deque &items, BOOL user_action) -{ - bool panel_active = (childGetVisibleTab("ResidentChooserTabs") == getChild("CallingCardsPanel")); - - mSelectedInventoryAvatarIDs.clear(); - mSelectedInventoryAvatarNames.clear(); - - if (panel_active) - { - childSetEnabled("Select", FALSE); - } - - std::deque::const_iterator item_it; - for (item_it = items.begin(); item_it != items.end(); ++item_it) - { - LLFolderViewEventListener* listenerp = (*item_it)->getListener(); - if (listenerp->getInventoryType() == LLInventoryType::IT_CALLINGCARD) - { - LLInventoryItem* item = gInventory.getItem(listenerp->getUUID()); - if (item) - { - mSelectedInventoryAvatarIDs.push_back(item->getCreatorUUID()); - mSelectedInventoryAvatarNames.push_back(listenerp->getName()); - } - } - } - - if (panel_active) - { - childSetEnabled("Select", visibleItemsSelected()); - } -} - void LLFloaterAvatarPicker::populateNearMe() { BOOL all_loaded = TRUE; @@ -336,10 +285,6 @@ BOOL LLFloaterAvatarPicker::visibleItemsSelected() const { return getChild("SearchResults")->getFirstSelectedIndex() >= 0; } - else if(active_panel == getChild("CallingCardsPanel")) - { - return mSelectedInventoryAvatarIDs.size() > 0; - } else if(active_panel == getChild("NearMePanel")) { return getChild("NearMe")->getFirstSelectedIndex() >= 0; @@ -349,7 +294,7 @@ BOOL LLFloaterAvatarPicker::visibleItemsSelected() const void LLFloaterAvatarPicker::find() { - const std::string& text = childGetValue("Edit").asString(); + std::string text = childGetValue("Edit").asString(); mQueryID.generate(); @@ -375,7 +320,6 @@ void LLFloaterAvatarPicker::find() void LLFloaterAvatarPicker::setAllowMultiple(BOOL allow_multiple) { getChild("SearchResults")->setAllowMultipleSelection(allow_multiple); - getChild("InventoryPanel")->setAllowMultiSelect(allow_multiple); getChild("NearMe")->setAllowMultipleSelection(allow_multiple); } diff --git a/indra/newview/llfloateravatarpicker.h b/indra/newview/llfloateravatarpicker.h index 63896bef9f..f3b9aefb9c 100644 --- a/indra/newview/llfloateravatarpicker.h +++ b/indra/newview/llfloateravatarpicker.h @@ -37,7 +37,6 @@ #include - class LLFloaterAvatarPicker : public LLFloater { public: @@ -57,7 +56,6 @@ public: static void processAvatarPickerReply(class LLMessageSystem* msg, void**); private: - static void editKeystroke(class LLLineEditor* caller, void* user_data); static void onBtnFind(void* userdata); @@ -68,8 +66,6 @@ private: static void onList(class LLUICtrl* ctrl, void* userdata); void onTabChanged(); - void doCallingCardSelectionChange(const std::deque &items, BOOL user_action); - void populateNearMe(); BOOL visibleItemsSelected() const; // Returns true if any items in the current tab are selected. @@ -79,8 +75,6 @@ private: virtual void draw(); virtual BOOL handleKeyHere(KEY key, MASK mask); - std::vector mSelectedInventoryAvatarIDs; - std::vector mSelectedInventoryAvatarNames; LLUUID mQueryID; BOOL mResultsReturned; BOOL mNearMeListComplete; diff --git a/indra/newview/skins/default/xui/en/floater_avatar_picker.xml b/indra/newview/skins/default/xui/en/floater_avatar_picker.xml index f76e4acbc9..e1f8011cbe 100644 --- a/indra/newview/skins/default/xui/en/floater_avatar_picker.xml +++ b/indra/newview/skins/default/xui/en/floater_avatar_picker.xml @@ -84,38 +84,7 @@ top="52" width="132" /> - - - Select a calling card: - - - + Date: Mon, 5 Oct 2009 23:42:37 +0000 Subject: Added comments and stub plural noun keys to English to explain how we do translation for languages with more complex pluralization rules than English (like Russian, Arabic). Reviewed with Ramzi. --- indra/newview/skins/default/xui/en/language_settings.xml | 8 +++++++- indra/newview/skins/default/xui/en/strings.xml | 11 +++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/language_settings.xml b/indra/newview/skins/default/xui/en/language_settings.xml index 71418d446a..c523185034 100644 --- a/indra/newview/skins/default/xui/en/language_settings.xml +++ b/indra/newview/skins/default/xui/en/language_settings.xml @@ -6,7 +6,13 @@ english C C - + + + [COUNT] year [COUNT] years + [COUNT] years [COUNT] month [COUNT] months + [COUNT] months [COUNT] week [COUNT] weeks + [COUNT] weeks [COUNT] day [COUNT] days + [COUNT] days Resident -- cgit v1.2.3 From e3d9c7d7bfa7722e22df9380baa4f044ac1be80f Mon Sep 17 00:00:00 2001 From: Martin Reddy Date: Mon, 5 Oct 2009 23:50:37 +0000 Subject: DEV-40819: Remove the "Debug > Consoles > Memory" menu entry when this feature is disabled (the default) otherwise selecting it does nothing. --- indra/newview/llviewermenu.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index d95992412f..3ecae2829d 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -567,6 +567,15 @@ void init_menus() gAttachSubMenu = gMenuBarView->findChildMenuByName("Attach Object", TRUE); gDetachSubMenu = gMenuBarView->findChildMenuByName("Detach Object", TRUE); +#if !MEM_TRACK_MEM + // Don't display the Memory console menu if the feature is turned off + LLMenuItemCheckGL *memoryMenu = gMenuBarView->getChild("Memory", TRUE); + if (memoryMenu) + { + memoryMenu->setVisible(FALSE); + } +#endif + gMenuBarView->createJumpKeys(); // Let land based option enable when parcel changes -- cgit v1.2.3 From 14d06ebe953da7e50b5c9086eee3f048578438ba Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Tue, 6 Oct 2009 01:25:47 +0000 Subject: made "more" link in LLExpandableTextBox localizable fixed logic for showing/hiding "more" link in LLExpandableTextBox fixed invisible background on combobox popup list reviewed by Leyla --- indra/newview/llexpandabletextbox.cpp | 37 ++++++++++++++++------ indra/newview/llexpandabletextbox.h | 15 +++++---- .../skins/default/xui/en/widgets/combo_box.xml | 4 ++- .../default/xui/en/widgets/expandable_text.xml | 1 + 4 files changed, 40 insertions(+), 17 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llexpandabletextbox.cpp b/indra/newview/llexpandabletextbox.cpp index 28c124d1c6..2467356018 100644 --- a/indra/newview/llexpandabletextbox.cpp +++ b/indra/newview/llexpandabletextbox.cpp @@ -45,7 +45,7 @@ public: : LLTextSegment(start, end), mEditor(editor), mStyle(style), - mMoreText(more_text) + mExpanderLabel(more_text) {} /*virtual*/ S32 getWidth(S32 first_char, S32 num_chars) const @@ -61,7 +61,15 @@ public: /*virtual*/ F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect) { F32 right_x; - mStyle->getFont()->renderUTF8(mMoreText, start, draw_rect.mRight, draw_rect.mTop, mStyle->getColor(), LLFontGL::RIGHT, LLFontGL::TOP, 0, mStyle->getShadowType(), end - start, draw_rect.getWidth(), &right_x, mEditor.getUseEllipses()); + mStyle->getFont()->renderUTF8(mExpanderLabel, start, + draw_rect.mRight, draw_rect.mTop, + mStyle->getColor(), + LLFontGL::RIGHT, LLFontGL::TOP, + 0, + mStyle->getShadowType(), + end - start, draw_rect.getWidth(), + &right_x, + mEditor.getUseEllipses()); return right_x; } /*virtual*/ S32 getMaxHeight() const { return llceil(mStyle->getFont()->getLineHeight()); } @@ -75,14 +83,17 @@ public: private: LLTextBase& mEditor; LLStyleSP mStyle; - std::string mMoreText; + std::string mExpanderLabel; }; - +LLExpandableTextBox::LLTextBoxEx::Params::Params() +: more_label("more_label") +{} LLExpandableTextBox::LLTextBoxEx::LLTextBoxEx(const Params& p) : LLTextBox(p), - mExpanded(false) + mExpanderLabel(p.more_label), + mExpanderVisible(false) { setIsChrome(TRUE); @@ -106,6 +117,9 @@ void LLExpandableTextBox::LLTextBoxEx::setValue(const LLSD& value) { LLTextBox::setValue(value); + // text contents have changed, segments are cleared out + // so hide the expander and determine if we need it + //mExpanderVisible = false; if (getTextPixelHeight() > getRect().getHeight()) { showExpandText(); @@ -119,7 +133,7 @@ void LLExpandableTextBox::LLTextBoxEx::setValue(const LLSD& value) void LLExpandableTextBox::LLTextBoxEx::showExpandText() { - if (!mExpanded) + if (!mExpanderVisible) { // get fully visible lines std::pair visible_lines = getVisibleLines(true); @@ -129,9 +143,9 @@ void LLExpandableTextBox::LLTextBoxEx::showExpandText() expander_style.font.name.setIfNotProvided(LLFontGL::nameFromFont(expander_style.font)); expander_style.font.style = "UNDERLINE"; expander_style.color = LLUIColorTable::instance().getColor("HTMLLinkColor"); - LLExpanderSegment* expanderp = new LLExpanderSegment(new LLStyle(expander_style), getLineStart(last_line), getLength() + 1, "More", *this); + LLExpanderSegment* expanderp = new LLExpanderSegment(new LLStyle(expander_style), getLineStart(last_line), getLength() + 1, mExpanderLabel, *this); insertSegment(expanderp); - mExpanded = true; + mExpanderVisible = true; } } @@ -139,14 +153,14 @@ void LLExpandableTextBox::LLTextBoxEx::showExpandText() //NOTE: obliterates existing styles (including hyperlinks) void LLExpandableTextBox::LLTextBoxEx::hideExpandText() { - if (mExpanded) + if (mExpanderVisible) { // this will overwrite the expander segment and all text styling with a single style LLNormalTextSegment* segmentp = new LLNormalTextSegment( new LLStyle(getDefaultStyle()), 0, getLength() + 1, *this); insertSegment(segmentp); - mExpanded = false; + mExpanderVisible = false; } } @@ -275,6 +289,9 @@ S32 LLExpandableTextBox::recalculateTextDelta(S32 text_delta) void LLExpandableTextBox::expandTextBox() { + // hide "more" link, and show full text contents + mTextBox->hideExpandText(); + S32 text_delta = mTextBox->getVerticalTextDelta(); text_delta += mTextBox->getVPad() * 2 + mScroll->getBorderWidth() * 2; // no need to expand diff --git a/indra/newview/llexpandabletextbox.h b/indra/newview/llexpandabletextbox.h index b78a4dc674..d6401e224f 100644 --- a/indra/newview/llexpandabletextbox.h +++ b/indra/newview/llexpandabletextbox.h @@ -54,6 +54,8 @@ protected: public: struct Params : public LLInitParam::Block { + Mandatory more_label; + Params(); }; // adds or removes "More" link as needed @@ -76,11 +78,6 @@ protected: */ virtual S32 getHPad() { return mHPad; } - protected: - - LLTextBoxEx(const Params& p); - friend class LLUICtrlFactory; - /** * Shows "More" link */ @@ -91,9 +88,15 @@ protected: */ void hideExpandText(); + protected: + + LLTextBoxEx(const Params& p); + friend class LLUICtrlFactory; + private: + std::string mExpanderLabel; - bool mExpanded; + bool mExpanderVisible; }; public: diff --git a/indra/newview/skins/default/xui/en/widgets/combo_box.xml b/indra/newview/skins/default/xui/en/widgets/combo_box.xml index d7369d0726..0dbca318b6 100644 --- a/indra/newview/skins/default/xui/en/widgets/combo_box.xml +++ b/indra/newview/skins/default/xui/en/widgets/combo_box.xml @@ -20,7 +20,9 @@ image_unselected="DropDown_Off" image_selected="DropDown_Selected" image_disabled="DropDown_Disabled" /> - + diff --git a/indra/newview/skins/default/xui/en/widgets/expandable_text.xml b/indra/newview/skins/default/xui/en/widgets/expandable_text.xml index e470f42d36..6381dce1d6 100644 --- a/indra/newview/skins/default/xui/en/widgets/expandable_text.xml +++ b/indra/newview/skins/default/xui/en/widgets/expandable_text.xml @@ -2,6 +2,7 @@ Date: Tue, 6 Oct 2009 08:30:29 +0000 Subject: DEV-39245 cannot tab through the MoaP Media Settings UI --- indra/newview/llmediactrl.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index b996c15a7d..4fa7f62c68 100644 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -68,7 +68,9 @@ LLMediaCtrl::Params::Params() texture_width("texture_width", 1024), texture_height("texture_height", 1024), caret_color("caret_color") -{} +{ + tab_stop(false); +} LLMediaCtrl::LLMediaCtrl( const Params& p) : LLPanel( p ), -- cgit v1.2.3 From ff56ff81638f5fde4199f60be9e52d0af8cad3d8 Mon Sep 17 00:00:00 2001 From: James Cook Date: Tue, 6 Oct 2009 17:14:30 +0000 Subject: EXT-1335 Enable hover glow for interactive objects. Tied to Develop > Rendering > Hover Highlight Objects and off by default for now, pending a fix to EXT-1336, a problem with Low graphics settings. Reviewed with Leyla. --- indra/newview/app_settings/settings.xml | 12 +++++++++ indra/newview/lltoolpie.cpp | 18 ++++++++++++- indra/newview/skins/default/xui/en/menu_viewer.xml | 30 ++++++++++------------ 3 files changed, 42 insertions(+), 18 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 7f96e0761e..806f96a654 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -6117,6 +6117,18 @@ 1.0 + RenderHighlightEnable + + Comment + Show glow effect when hovering on interactive objects. + Persist + 1 + Type + Boolean + Value + 0 + + RenderHighlightFadeTime Comment diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 5525c359fc..aa55d54dbb 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -70,6 +70,7 @@ #include "llworld.h" #include "llui.h" #include "llweb.h" +#include "pipeline.h" // setHighlightObject extern BOOL gDebugClicks; @@ -472,7 +473,9 @@ void LLToolPie::selectionPropertiesReceived() BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask) { mHoverPick = gViewerWindow->pickImmediate(x, y, FALSE); - + + // Show screen-space highlight glow effect + bool show_highlight = false; LLViewerObject *parent = NULL; LLViewerObject *object = mHoverPick.getObject(); @@ -483,24 +486,28 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask) if (object && useClickAction(mask, object, parent)) { + show_highlight = true; ECursorType cursor = cursor_from_object(object); gViewerWindow->setCursor(cursor); lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolPie (inactive)" << llendl; } else if (handleMediaHover(mHoverPick)) { + show_highlight = true; // cursor set by media object lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolPie (inactive)" << llendl; } else if ((object && !object->isAvatar() && object->usePhysics()) || (parent && !parent->isAvatar() && parent->usePhysics())) { + show_highlight = true; gViewerWindow->setCursor(UI_CURSOR_TOOLGRAB); lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolPie (inactive)" << llendl; } else if ( (object && object->flagHandleTouch()) || (parent && parent->flagHandleTouch())) { + show_highlight = true; gViewerWindow->setCursor(UI_CURSOR_HAND); lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolPie (inactive)" << llendl; } @@ -519,6 +526,15 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask) } } + static LLCachedControl enable_highlight( + gSavedSettings, "RenderHighlightEnable", false); + LLDrawable* drawable = NULL; + if (enable_highlight && show_highlight && object) + { + drawable = object->mDrawable; + } + gPipeline.setHighlightObject(drawable); + return TRUE; } diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 2c77f61da6..7612fa6367 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -2503,7 +2503,6 @@ tear_off="true"> - + + + + + + + Date: Tue, 6 Oct 2009 19:01:06 +0000 Subject: Fix broken Mac package build due to running out of room in temp .sparseimage --- indra/newview/viewer_manifest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index d3b0a2e47e..545fa29675 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -538,7 +538,7 @@ class DarwinManifest(ViewerManifest): # make sure we don't have stale files laying about self.remove(sparsename, finalname) - self.run_command('hdiutil create "%(sparse)s" -volname "%(vol)s" -fs HFS+ -type SPARSE -megabytes 400 -layout SPUD' % { + self.run_command('hdiutil create "%(sparse)s" -volname "%(vol)s" -fs HFS+ -type SPARSE -megabytes 500 -layout SPUD' % { 'sparse':sparsename, 'vol':volname}) -- cgit v1.2.3 From ea9b1de0271c093f2d16f56878989d867d192b61 Mon Sep 17 00:00:00 2001 From: Lisabeth Pardi Date: Tue, 6 Oct 2009 20:22:36 +0000 Subject: Remove Search from Top Menu > World EXT-1246 --- indra/newview/skins/default/xui/en/menu_viewer.xml | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 7612fa6367..b0839ce255 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -360,18 +360,6 @@ function="World.EnableTeleportHome" /> - - - - + + + + Date: Tue, 6 Oct 2009 21:50:48 +0000 Subject: EXT-1144 Unable to pay objects. LLFloaterPay was not taking object selection handle properly. Made LLFloaterPay::payViaObject() take a selection handle as a parameter, got rid of mTargetIsObject and cleaned up selection handle on close. Reviewed with Leyla. --- indra/newview/llselectmgr.h | 2 ++ indra/newview/llviewermenu.cpp | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h index 26ac95060f..c60d37a999 100644 --- a/indra/newview/llselectmgr.h +++ b/indra/newview/llselectmgr.h @@ -273,6 +273,8 @@ public: LLViewerObject* getFirstCopyableObject(BOOL get_parent = FALSE); LLViewerObject* getFirstDeleteableObject(); LLViewerObject* getFirstMoveableObject(BOOL get_parent = FALSE); + + /// Return the object that lead to this selection, possible a child LLViewerObject* getPrimaryObject() { return mPrimaryObject; } // iterate through texture entries diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 3ecae2829d..4c6abd7edb 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -5414,7 +5414,7 @@ class LLAvatarAddContact : public view_listener_t } }; -bool complete_give_money(const LLSD& notification, const LLSD& response, LLObjectSelectionHandle handle) +bool complete_give_money(const LLSD& notification, const LLSD& response, LLObjectSelectionHandle selection) { S32 option = LLNotification::getSelectedOption(notification, response); if (option == 0) @@ -5422,7 +5422,7 @@ bool complete_give_money(const LLSD& notification, const LLSD& response, LLObjec gAgent.clearBusy(); } - LLViewerObject* objectp = handle->getPrimaryObject(); + LLViewerObject* objectp = selection->getPrimaryObject(); // Show avatar's name if paying attachment if (objectp && objectp->isAttachment()) @@ -5444,7 +5444,7 @@ bool complete_give_money(const LLSD& notification, const LLSD& response, LLObjec } else { - LLFloaterPay::payViaObject(&give_money, objectp->getID()); + LLFloaterPay::payViaObject(&give_money, selection); } } return false; -- cgit v1.2.3 From d4b468cd7065be4f3530079efa2a78d9083e7726 Mon Sep 17 00:00:00 2001 From: James Cook Date: Tue, 6 Oct 2009 22:14:50 +0000 Subject: Renamed llgivemoney.h/cpp to llfloaterpay.h/cpp, the class it contains. Not reviewed. --- indra/newview/CMakeLists.txt | 4 +- indra/newview/llavataractions.cpp | 2 +- indra/newview/llfloaterpay.cpp | 498 +++++++++++++++++++++++++++++++++++ indra/newview/llfloaterpay.h | 103 ++++++++ indra/newview/llviewerfloaterreg.cpp | 2 +- indra/newview/llviewermenu.cpp | 2 +- 6 files changed, 606 insertions(+), 5 deletions(-) create mode 100644 indra/newview/llfloaterpay.cpp create mode 100644 indra/newview/llfloaterpay.h (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index d368dd5497..747eb5d19b 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -187,6 +187,7 @@ set(viewer_SOURCE_FILES llfloaternotificationsconsole.cpp llfloateropenobject.cpp llfloaterparcel.cpp + llfloaterpay.cpp llfloaterperms.cpp llfloaterpostcard.cpp llfloaterpostprocess.cpp @@ -218,7 +219,6 @@ set(viewer_SOURCE_FILES llfollowcam.cpp llfriendcard.cpp llgesturemgr.cpp - llgivemoney.cpp llglsandbox.cpp llgroupactions.cpp llgrouplist.cpp @@ -658,6 +658,7 @@ set(viewer_HEADER_FILES llfloaternotificationsconsole.h llfloateropenobject.h llfloaterparcel.h + llfloaterpay.h llfloaterpostcard.h llfloaterpostprocess.h llfloaterpreference.h @@ -690,7 +691,6 @@ set(viewer_HEADER_FILES llfollowcam.h llfriendcard.h llgesturemgr.h - llgivemoney.h llgroupactions.h llgrouplist.h llgroupmgr.h diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 92b2768f39..f020ff4704 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -48,7 +48,7 @@ #include "llfloatergroupinvite.h" #include "llfloatergroups.h" #include "llfloaterreg.h" -#include "llgivemoney.h" +#include "llfloaterpay.h" #include "llinventorymodel.h" // for gInventory.findCategoryUUIDForType #include "llimview.h" // for gIMMgr #include "llmutelist.h" diff --git a/indra/newview/llfloaterpay.cpp b/indra/newview/llfloaterpay.cpp new file mode 100644 index 0000000000..1c1e8445ad --- /dev/null +++ b/indra/newview/llfloaterpay.cpp @@ -0,0 +1,498 @@ +/** + * @file llfloaterpay.cpp + * @author Aaron Brashears, Kelly Washington, James Cook + * @brief Implementation of the LLFloaterPay class. + * + * $LicenseInfo:firstyear=2002&license=viewergpl$ + * + * Copyright (c) 2002-2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llfloaterpay.h" + +#include "message.h" + +#include "llagent.h" +#include "llfloaterreg.h" +#include "llresmgr.h" +#include "lltextbox.h" +#include "lllineeditor.h" +#include "llmutelist.h" +#include "llfloaterreporter.h" +#include "llviewerobject.h" +#include "llviewerobjectlist.h" +#include "llviewerregion.h" +#include "llviewerwindow.h" +#include "llbutton.h" +#include "llselectmgr.h" +#include "lltransactiontypes.h" +#include "lluictrlfactory.h" + +///---------------------------------------------------------------------------- +/// Local function declarations, constants, enums, and typedefs +///---------------------------------------------------------------------------- + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Class LLGiveMoneyInfo +// +// A small class used to track callback information +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +struct LLGiveMoneyInfo +{ + LLFloaterPay* mFloater; + S32 mAmount; + LLGiveMoneyInfo(LLFloaterPay* floater, S32 amount) : + mFloater(floater), mAmount(amount){} +}; + +///---------------------------------------------------------------------------- +/// Class LLFloaterPay +///---------------------------------------------------------------------------- + +S32 LLFloaterPay::sLastAmount = 0; +const S32 MAX_AMOUNT_LENGTH = 10; +const S32 FASTPAY_BUTTON_WIDTH = 80; + +LLFloaterPay::LLFloaterPay(const LLSD& key) + : LLFloater(key), + mCallbackData(), + mCallback(NULL), + mObjectNameText(NULL), + mTargetUUID(key.asUUID()), + mTargetIsGroup(FALSE) +{ + mCloseSignal.connect(boost::bind(&LLFloaterPay::onClose, this)); +} + +// Destroys the object +LLFloaterPay::~LLFloaterPay() +{ + std::for_each(mCallbackData.begin(), mCallbackData.end(), DeletePointer()); + // Name callbacks will be automatically disconnected since LLFloater is trackable +} + +BOOL LLFloaterPay::postBuild() +{ + S32 i = 0; + + LLGiveMoneyInfo* info = new LLGiveMoneyInfo(this, PAY_BUTTON_DEFAULT_0); + mCallbackData.push_back(info); + + childSetAction("fastpay 1",&LLFloaterPay::onGive,info); + childSetVisible("fastpay 1", FALSE); + + mQuickPayButton[i] = getChild("fastpay 1"); + mQuickPayInfo[i] = info; + ++i; + + info = new LLGiveMoneyInfo(this, PAY_BUTTON_DEFAULT_1); + mCallbackData.push_back(info); + + childSetAction("fastpay 5",&LLFloaterPay::onGive,info); + childSetVisible("fastpay 5", FALSE); + + mQuickPayButton[i] = getChild("fastpay 5"); + mQuickPayInfo[i] = info; + ++i; + + info = new LLGiveMoneyInfo(this, PAY_BUTTON_DEFAULT_2); + mCallbackData.push_back(info); + + childSetAction("fastpay 10",&LLFloaterPay::onGive,info); + childSetVisible("fastpay 10", FALSE); + + mQuickPayButton[i] = getChild("fastpay 10"); + mQuickPayInfo[i] = info; + ++i; + + info = new LLGiveMoneyInfo(this, PAY_BUTTON_DEFAULT_3); + mCallbackData.push_back(info); + + childSetAction("fastpay 20",&LLFloaterPay::onGive,info); + childSetVisible("fastpay 20", FALSE); + + mQuickPayButton[i] = getChild("fastpay 20"); + mQuickPayInfo[i] = info; + ++i; + + + childSetVisible("amount text", FALSE); + + std::string last_amount; + if(sLastAmount > 0) + { + last_amount = llformat("%d", sLastAmount); + } + + childSetVisible("amount", FALSE); + + getChild("amount")->setKeystrokeCallback(&LLFloaterPay::onKeystroke, this); + childSetText("amount", last_amount); + childSetPrevalidate("amount", LLLineEditor::prevalidateNonNegativeS32); + + info = new LLGiveMoneyInfo(this, 0); + mCallbackData.push_back(info); + + childSetAction("pay btn",&LLFloaterPay::onGive,info); + setDefaultBtn("pay btn"); + childSetVisible("pay btn", FALSE); + childSetEnabled("pay btn", (sLastAmount > 0)); + + childSetAction("cancel btn",&LLFloaterPay::onCancel,this); + + return TRUE; +} + +void LLFloaterPay::onClose() +{ + // Deselect the objects + mObjectSelection = NULL; +} + +// static +void LLFloaterPay::processPayPriceReply(LLMessageSystem* msg, void **userdata) +{ + LLFloaterPay* self = (LLFloaterPay*)userdata; + if (self) + { + S32 price; + LLUUID target; + + msg->getUUIDFast(_PREHASH_ObjectData,_PREHASH_ObjectID,target); + if (target != self->mTargetUUID) + { + // This is a message for a different object's pay info + return; + } + + msg->getS32Fast(_PREHASH_ObjectData,_PREHASH_DefaultPayPrice,price); + + if (PAY_PRICE_HIDE == price) + { + self->childSetVisible("amount", FALSE); + self->childSetVisible("pay btn", FALSE); + self->childSetVisible("amount text", FALSE); + } + else if (PAY_PRICE_DEFAULT == price) + { + self->childSetVisible("amount", TRUE); + self->childSetVisible("pay btn", TRUE); + self->childSetVisible("amount text", TRUE); + } + else + { + // PAY_PRICE_HIDE and PAY_PRICE_DEFAULT are negative values + // So we take the absolute value here after we have checked for those cases + + self->childSetVisible("amount", TRUE); + self->childSetVisible("pay btn", TRUE); + self->childSetEnabled("pay btn", TRUE); + self->childSetVisible("amount text", TRUE); + + self->childSetText("amount", llformat("%d", llabs(price))); + } + + S32 num_blocks = msg->getNumberOfBlocksFast(_PREHASH_ButtonData); + S32 i = 0; + if (num_blocks > MAX_PAY_BUTTONS) num_blocks = MAX_PAY_BUTTONS; + + S32 max_pay_amount = 0; + S32 padding_required = 0; + + for (i=0;igetS32Fast(_PREHASH_ButtonData,_PREHASH_PayButton,pay_button,i); + if (pay_button > 0) + { + std::string button_str = "L$"; + button_str += LLResMgr::getInstance()->getMonetaryString( pay_button ); + + self->mQuickPayButton[i]->setLabelSelected(button_str); + self->mQuickPayButton[i]->setLabelUnselected(button_str); + self->mQuickPayButton[i]->setVisible(TRUE); + self->mQuickPayInfo[i]->mAmount = pay_button; + self->childSetVisible("fastpay text",TRUE); + + if ( pay_button > max_pay_amount ) + { + max_pay_amount = pay_button; + } + } + else + { + self->mQuickPayButton[i]->setVisible(FALSE); + } + } + + // build a string containing the maximum value and calc nerw button width from it. + std::string balance_str = "L$"; + balance_str += LLResMgr::getInstance()->getMonetaryString( max_pay_amount ); + const LLFontGL* font = LLFontGL::getFontSansSerif(); + S32 new_button_width = font->getWidth( std::string(balance_str)); + new_button_width += ( 12 + 12 ); // padding + + // dialong is sized for 2 digit pay amounts - larger pay values need to be scaled + const S32 threshold = 100000; + if ( max_pay_amount >= threshold ) + { + S32 num_digits_threshold = (S32)log10((double)threshold) + 1; + S32 num_digits_max = (S32)log10((double)max_pay_amount) + 1; + + // calculate the extra width required by 2 buttons with max amount and some commas + padding_required = ( num_digits_max - num_digits_threshold + ( num_digits_max / 3 ) ) * font->getWidth( std::string("0") ); + }; + + // change in button width + S32 button_delta = new_button_width - FASTPAY_BUTTON_WIDTH; + if ( button_delta < 0 ) + button_delta = 0; + + // now we know the maximum amount, we can resize all the buttons to be + for (i=0;imQuickPayButton[i]->getRect(); + + // RHS button colum needs to move further because LHS changed too + if ( i % 2 ) + { + r.setCenterAndSize( r.getCenterX() + ( button_delta * 3 ) / 2 , + r.getCenterY(), + r.getWidth() + button_delta, + r.getHeight() ); + } + else + { + r.setCenterAndSize( r.getCenterX() + button_delta / 2, + r.getCenterY(), + r.getWidth() + button_delta, + r.getHeight() ); + } + self->mQuickPayButton[i]->setRect( r ); + } + + for (i=num_blocks;imQuickPayButton[i]->setVisible(FALSE); + } + + self->reshape( self->getRect().getWidth() + padding_required, self->getRect().getHeight(), FALSE ); + } + msg->setHandlerFunc("PayPriceReply",NULL,NULL); +} + +// static +void LLFloaterPay::payViaObject(money_callback callback, LLSafeHandle selection) +{ + // Object that lead to the selection, may be child + LLViewerObject* object = selection->getPrimaryObject(); + if (!object) + return; + + LLFloaterPay *floater = LLFloaterReg::showTypedInstance("pay_object", LLSD(object->getID())); + if (!floater) + return; + + floater->setCallback(callback); + // Hold onto the selection until we close + floater->mObjectSelection = selection; + + LLSelectNode* node = selection->getFirstRootNode(); + if (!node) + { + //FIXME: notify user object no longer exists + floater->closeFloater(); + return; + } + + LLHost target_region = object->getRegion()->getHost(); + + LLMessageSystem* msg = gMessageSystem; + msg->newMessageFast(_PREHASH_RequestPayPrice); + msg->nextBlockFast(_PREHASH_ObjectData); + msg->addUUIDFast(_PREHASH_ObjectID, object->getID()); + msg->sendReliable(target_region); + msg->setHandlerFuncFast(_PREHASH_PayPriceReply, processPayPriceReply,(void **)floater); + + LLUUID owner_id; + BOOL is_group = FALSE; + node->mPermissions->getOwnership(owner_id, is_group); + + floater->childSetText("object_name_text",node->mName); + + floater->finishPayUI(owner_id, is_group); +} + +void LLFloaterPay::payDirectly(money_callback callback, + const LLUUID& target_id, + BOOL is_group) +{ + LLFloaterPay *floater = LLFloaterReg::showTypedInstance("pay_resident", LLSD(target_id)); + if (!floater) + return; + + floater->setCallback(callback); + floater->mObjectSelection = NULL; + + floater->childSetVisible("amount", TRUE); + floater->childSetVisible("pay btn", TRUE); + floater->childSetVisible("amount text", TRUE); + + floater->childSetVisible("fastpay text",TRUE); + for(S32 i=0;imQuickPayButton[i]->setVisible(TRUE); + } + + floater->finishPayUI(target_id, is_group); +} + +void LLFloaterPay::finishPayUI(const LLUUID& target_id, BOOL is_group) +{ + gCacheName->get(target_id, is_group, boost::bind(&LLFloaterPay::onCacheOwnerName, this, _1, _2, _3, _4)); + + // Make sure the amount field has focus + + childSetFocus("amount", TRUE); + + LLLineEditor* amount = getChild("amount"); + amount->selectAll(); + mTargetIsGroup = is_group; +} + +void LLFloaterPay::onCacheOwnerName(const LLUUID& owner_id, + const std::string& firstname, + const std::string& lastname, + BOOL is_group) +{ + if (is_group) + { + childSetVisible("payee_group",true); + childSetVisible("payee_resident",false); + } + else + { + childSetVisible("payee_group",false); + childSetVisible("payee_resident",true); + } + + childSetTextArg("payee_name", "[FIRST]", firstname); + childSetTextArg("payee_name", "[LAST]", lastname); +} + +// static +void LLFloaterPay::onCancel(void* data) +{ + LLFloaterPay* self = reinterpret_cast(data); + if(self) + { + self->closeFloater(); + } +} + +// static +void LLFloaterPay::onKeystroke(LLLineEditor*, void* data) +{ + LLFloaterPay* self = reinterpret_cast(data); + if(self) + { + // enable the Pay button when amount is non-empty and positive, disable otherwise + std::string amtstr = self->childGetText("amount"); + self->childSetEnabled("pay btn", !amtstr.empty() && atoi(amtstr.c_str()) > 0); + } +} + +// static +void LLFloaterPay::onGive(void* data) +{ + LLGiveMoneyInfo* info = reinterpret_cast(data); + if(info && info->mFloater) + { + info->mFloater->give(info->mAmount); + info->mFloater->closeFloater(); + } +} + +void LLFloaterPay::give(S32 amount) +{ + if(mCallback) + { + // if the amount is 0, that menas that we should use the + // text field. + if(amount == 0) + { + amount = atoi(childGetText("amount").c_str()); + } + sLastAmount = amount; + + // Try to pay an object. + if (mObjectSelection.notNull()) + { + LLViewerObject* dest_object = gObjectList.findObject(mTargetUUID); + if(dest_object) + { + LLViewerRegion* region = dest_object->getRegion(); + if (region) + { + // Find the name of the root object + LLSelectNode* node = mObjectSelection->getFirstRootNode(); + std::string object_name; + if (node) + { + object_name = node->mName; + } + S32 tx_type = TRANS_PAY_OBJECT; + if(dest_object->isAvatar()) tx_type = TRANS_GIFT; + mCallback(mTargetUUID, region, amount, FALSE, tx_type, object_name); + mObjectSelection = NULL; + + // request the object owner in order to check if the owner needs to be unmuted + LLMessageSystem* msg = gMessageSystem; + msg->newMessageFast(_PREHASH_RequestObjectPropertiesFamily); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + msg->nextBlockFast(_PREHASH_ObjectData); + msg->addU32Fast(_PREHASH_RequestFlags, OBJECT_PAY_REQUEST ); + msg->addUUIDFast(_PREHASH_ObjectID, mTargetUUID); + msg->sendReliable( region->getHost() ); + } + } + } + else + { + // just transfer the L$ + mCallback(mTargetUUID, gAgent.getRegion(), amount, mTargetIsGroup, TRANS_GIFT, LLStringUtil::null); + + // check if the payee needs to be unmuted + LLMuteList::getInstance()->autoRemove(mTargetUUID, LLMuteList::AR_MONEY); + } + } +} diff --git a/indra/newview/llfloaterpay.h b/indra/newview/llfloaterpay.h new file mode 100644 index 0000000000..c6ce595186 --- /dev/null +++ b/indra/newview/llfloaterpay.h @@ -0,0 +1,103 @@ +/** + * @file llfloaterpay.h + * + * $LicenseInfo:firstyear=2002&license=viewergpl$ + * + * Copyright (c) 2002-2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LLFLOATERPAY_H +#define LLFLOATERPAY_H + +#include "lluuid.h" +#include "llfloater.h" +#include "lllslconstants.h" + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Class LLFloaterPay +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +class LLViewerRegion; +class LLLineEditor; +class LLTextBox; +class LLButton; +class LLObjectSelection; +struct LLGiveMoneyInfo; + +typedef void (*money_callback)(const LLUUID&, LLViewerRegion*,S32,BOOL,S32,const std::string&); + +class LLFloaterPay : public LLFloater +{ +public: + LLFloaterPay(const LLSD& key); + virtual ~LLFloaterPay(); + /*virtual*/ BOOL postBuild(); + + void setCallback(money_callback callback) { mCallback = callback; } + + void onClose(); + + // Pay into an in-world object, which will trigger scripts and eventually + // transfer the L$ to the resident or group that owns the object. + // Object must be selected. It may be a child. + static void payViaObject(money_callback callback, LLSafeHandle selection); + + // Pay an avatar or group directly, not via an object in the world. + // Scripts are not notified, L$ can be direcly transferred. + static void payDirectly(money_callback callback, + const LLUUID& target_id, + BOOL is_group); + +private: + static void onCancel(void* data); + static void onKeystroke(LLLineEditor* editor, void* data); + static void onGive(void* data); + void give(S32 amount); + static void processPayPriceReply(LLMessageSystem* msg, void **userdata); + void onCacheOwnerName(const LLUUID& owner_id, + const std::string& firstname, + const std::string& lastname, + BOOL is_group); + void finishPayUI(const LLUUID& target_id, BOOL is_group); + +protected: + std::vector mCallbackData; + money_callback mCallback; + LLTextBox* mObjectNameText; + LLUUID mTargetUUID; + BOOL mTargetIsGroup; + BOOL mHaveName; + + LLButton* mQuickPayButton[MAX_PAY_BUTTONS]; + LLGiveMoneyInfo* mQuickPayInfo[MAX_PAY_BUTTONS]; + + LLSafeHandle mObjectSelection; + + static S32 sLastAmount; +}; + + +#endif // LLFLOATERPAY_H diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 0b21f3565d..ab29311aaf 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -83,7 +83,7 @@ #include "llfloaternamedesc.h" #include "llfloaternotificationsconsole.h" #include "llfloateropenobject.h" -#include "llgivemoney.h" +#include "llfloaterpay.h" #include "llfloaterparcel.h" #include "llfloaterperms.h" #include "llfloaterpostcard.h" diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 4c6abd7edb..3e036f4978 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -111,6 +111,7 @@ #include "llfloaterlandholdings.h" #include "llfloatermap.h" #include "llfloateropenobject.h" +#include "llfloaterpay.h" #include "llfloaterperms.h" #include "llfloaterpostprocess.h" #include "llfloaterpreference.h" @@ -129,7 +130,6 @@ #include "llavataractions.h" #include "lllandmarkactions.h" #include "llmemoryview.h" -#include "llgivemoney.h" #include "llgroupmgr.h" #include "lltooltip.h" #include "llhudeffecttrail.h" -- cgit v1.2.3 From 5c51eb5a345f0e5f95d1cab1bfc214022ebf517e Mon Sep 17 00:00:00 2001 From: James Cook Date: Tue, 6 Oct 2009 22:44:38 +0000 Subject: Moved LLFloaterPay implementation to .cpp file so header file is just lightweight interface. Not reviewed. --- indra/newview/llavataractions.cpp | 2 +- indra/newview/llfloaterpay.cpp | 77 ++++++++++++++++++++++++++++++++++- indra/newview/llfloaterpay.h | 78 +++++++++--------------------------- indra/newview/llviewerfloaterreg.cpp | 3 +- indra/newview/llviewermenu.cpp | 6 +-- 5 files changed, 99 insertions(+), 67 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index f020ff4704..2b5e2369bb 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -306,7 +306,7 @@ bool LLAvatarActions::handlePay(const LLSD& notification, const LLSD& response, gAgent.clearBusy(); } - LLFloaterPay::payDirectly(&give_money, avatar_id, /*is_group=*/FALSE); + LLFloaterPayUtil::payDirectly(&give_money, avatar_id, /*is_group=*/false); return false; } diff --git a/indra/newview/llfloaterpay.cpp b/indra/newview/llfloaterpay.cpp index 1c1e8445ad..8eaa4566ea 100644 --- a/indra/newview/llfloaterpay.cpp +++ b/indra/newview/llfloaterpay.cpp @@ -36,6 +36,9 @@ #include "llfloaterpay.h" #include "message.h" +#include "llfloater.h" +#include "lllslconstants.h" // MAX_PAY_BUTTONS +#include "lluuid.h" #include "llagent.h" #include "llfloaterreg.h" @@ -62,6 +65,7 @@ // // A small class used to track callback information //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +class LLFloaterPay; struct LLGiveMoneyInfo { @@ -75,6 +79,52 @@ struct LLGiveMoneyInfo /// Class LLFloaterPay ///---------------------------------------------------------------------------- +class LLFloaterPay : public LLFloater +{ +public: + LLFloaterPay(const LLSD& key); + virtual ~LLFloaterPay(); + /*virtual*/ BOOL postBuild(); + + void setCallback(money_callback callback) { mCallback = callback; } + + void onClose(); + + static void payViaObject(money_callback callback, LLSafeHandle selection); + + static void payDirectly(money_callback callback, + const LLUUID& target_id, + bool is_group); + +private: + static void onCancel(void* data); + static void onKeystroke(LLLineEditor* editor, void* data); + static void onGive(void* data); + void give(S32 amount); + static void processPayPriceReply(LLMessageSystem* msg, void **userdata); + void onCacheOwnerName(const LLUUID& owner_id, + const std::string& firstname, + const std::string& lastname, + BOOL is_group); + void finishPayUI(const LLUUID& target_id, BOOL is_group); + +protected: + std::vector mCallbackData; + money_callback mCallback; + LLTextBox* mObjectNameText; + LLUUID mTargetUUID; + BOOL mTargetIsGroup; + BOOL mHaveName; + + LLButton* mQuickPayButton[MAX_PAY_BUTTONS]; + LLGiveMoneyInfo* mQuickPayInfo[MAX_PAY_BUTTONS]; + + LLSafeHandle mObjectSelection; + + static S32 sLastAmount; +}; + + S32 LLFloaterPay::sLastAmount = 0; const S32 MAX_AMOUNT_LENGTH = 10; const S32 FASTPAY_BUTTON_WIDTH = 80; @@ -352,7 +402,7 @@ void LLFloaterPay::payViaObject(money_callback callback, LLSafeHandle("pay_resident", LLSD(target_id)); if (!floater) @@ -496,3 +546,28 @@ void LLFloaterPay::give(S32 amount) } } } + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Namespace LLFloaterPayUtil +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +void LLFloaterPayUtil::registerFloater() +{ + // Sneaky, use same code but different XML for dialogs + LLFloaterReg::add("pay_resident", "floater_pay.xml", + &LLFloaterReg::build); + LLFloaterReg::add("pay_object", "floater_pay_object.xml", + &LLFloaterReg::build); +} + +void LLFloaterPayUtil::payViaObject(money_callback callback, + LLSafeHandle selection) +{ + LLFloaterPay::payViaObject(callback, selection); +} + +void LLFloaterPayUtil::payDirectly(money_callback callback, + const LLUUID& target_id, + bool is_group) +{ + LLFloaterPay::payDirectly(callback, target_id, is_group); +} diff --git a/indra/newview/llfloaterpay.h b/indra/newview/llfloaterpay.h index c6ce595186..161ed78acb 100644 --- a/indra/newview/llfloaterpay.h +++ b/indra/newview/llfloaterpay.h @@ -32,72 +32,30 @@ #ifndef LLFLOATERPAY_H #define LLFLOATERPAY_H -#include "lluuid.h" -#include "llfloater.h" -#include "lllslconstants.h" +#include "llsafehandle.h" -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Class LLFloaterPay -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -class LLViewerRegion; -class LLLineEditor; -class LLTextBox; -class LLButton; class LLObjectSelection; -struct LLGiveMoneyInfo; +class LLUUID; +class LLViewerRegion; typedef void (*money_callback)(const LLUUID&, LLViewerRegion*,S32,BOOL,S32,const std::string&); -class LLFloaterPay : public LLFloater +namespace LLFloaterPayUtil { -public: - LLFloaterPay(const LLSD& key); - virtual ~LLFloaterPay(); - /*virtual*/ BOOL postBuild(); - - void setCallback(money_callback callback) { mCallback = callback; } - - void onClose(); - - // Pay into an in-world object, which will trigger scripts and eventually - // transfer the L$ to the resident or group that owns the object. - // Object must be selected. It may be a child. - static void payViaObject(money_callback callback, LLSafeHandle selection); + /// Register with LLFloaterReg + void registerFloater(); + + /// Pay into an in-world object, which will trigger scripts and eventually + /// transfer the L$ to the resident or group that owns the object. + /// Objects must be selected. Recipient (primary) object may be a child. + void payViaObject(money_callback callback, + LLSafeHandle selection); - // Pay an avatar or group directly, not via an object in the world. - // Scripts are not notified, L$ can be direcly transferred. - static void payDirectly(money_callback callback, - const LLUUID& target_id, - BOOL is_group); - -private: - static void onCancel(void* data); - static void onKeystroke(LLLineEditor* editor, void* data); - static void onGive(void* data); - void give(S32 amount); - static void processPayPriceReply(LLMessageSystem* msg, void **userdata); - void onCacheOwnerName(const LLUUID& owner_id, - const std::string& firstname, - const std::string& lastname, - BOOL is_group); - void finishPayUI(const LLUUID& target_id, BOOL is_group); - -protected: - std::vector mCallbackData; - money_callback mCallback; - LLTextBox* mObjectNameText; - LLUUID mTargetUUID; - BOOL mTargetIsGroup; - BOOL mHaveName; - - LLButton* mQuickPayButton[MAX_PAY_BUTTONS]; - LLGiveMoneyInfo* mQuickPayInfo[MAX_PAY_BUTTONS]; - - LLSafeHandle mObjectSelection; - - static S32 sLastAmount; -}; - + /// Pay an avatar or group directly, not via an object in the world. + /// Scripts are not notified, L$ can be direcly transferred. + void payDirectly(money_callback callback, + const LLUUID& target_id, + bool is_group); +} #endif // LLFLOATERPAY_H diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index ab29311aaf..8c46949d70 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -195,8 +195,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("openobject", "floater_openobject.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("parcel_info", "floater_preview_url.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); - LLFloaterReg::add("pay_resident", "floater_pay.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); - LLFloaterReg::add("pay_object", "floater_pay_object.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + LLFloaterPayUtil::registerFloater(); LLFloaterReg::add("postcard", "floater_postcard.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("preferences", "floater_preferences.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 3e036f4978..dde7b1c7ee 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -5437,14 +5437,14 @@ bool complete_give_money(const LLSD& notification, const LLSD& response, LLObjec { if (objectp->isAvatar()) { - const BOOL is_group = FALSE; - LLFloaterPay::payDirectly(&give_money, + const bool is_group = false; + LLFloaterPayUtil::payDirectly(&give_money, objectp->getID(), is_group); } else { - LLFloaterPay::payViaObject(&give_money, selection); + LLFloaterPayUtil::payViaObject(&give_money, selection); } } return false; -- cgit v1.2.3 From 8086923d663cbca32a9b147973f912adcbd4a08a Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Tue, 6 Oct 2009 22:55:01 +0000 Subject: EXT-1283 [Inspectors] Avatar gear menu does not dismiss when selecting another AV reviewed by James --- indra/newview/llinspectavatar.cpp | 11 +++++++++++ indra/newview/llinspectobject.cpp | 3 +++ 2 files changed, 14 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index 9b75c15597..fd301505cd 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -51,6 +51,7 @@ #include "llcontrol.h" // LLCachedControl #include "llfloater.h" #include "llfloaterreg.h" +#include "llmenubutton.h" #include "lltooltip.h" // positionViewNearMouse() #include "lluictrl.h" @@ -80,6 +81,9 @@ public: // Because floater is single instance, need to re-parse data on each spawn // (for example, inspector about same avatar but in different position) /*virtual*/ void onOpen(const LLSD& avatar_id); + + // When closing they should close their gear menu + /*virtual*/ void onClose(); // Inspectors close themselves when they lose focus /*virtual*/ void onFocusLost(); @@ -224,6 +228,8 @@ BOOL LLInspectAvatar::postBuild(void) getChild("volume_slider")->setCommitCallback( boost::bind(&LLInspectAvatar::onVolumeChange, this, _2)); + mCloseSignal.connect(boost::bind(&LLInspectAvatar::onClose, this)); + return TRUE; } @@ -288,6 +294,11 @@ void LLInspectAvatar::onOpen(const LLSD& data) updateVolumeSlider(); } +void LLInspectAvatar::onClose() +{ + getChild("gear_btn")->hideMenu(); +} + //virtual void LLInspectAvatar::onFocusLost() { diff --git a/indra/newview/llinspectobject.cpp b/indra/newview/llinspectobject.cpp index b0e6273c41..1a88bcb8f0 100644 --- a/indra/newview/llinspectobject.cpp +++ b/indra/newview/llinspectobject.cpp @@ -46,6 +46,7 @@ #include "llcontrol.h" // LLCachedControl #include "llfloater.h" #include "llfloaterreg.h" +#include "llmenubutton.h" #include "llresmgr.h" // getMonetaryString #include "llsafehandle.h" #include "lltextbox.h" // for description truncation @@ -254,6 +255,8 @@ void LLInspectObject::onClose() { // Release selection to deselect mObjectSelection = NULL; + + getChild("gear_btn")->hideMenu(); } //virtual -- cgit v1.2.3 From da07b6e8fb2c481ef38031e402e664ba338ae3ed Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Tue, 6 Oct 2009 23:06:39 +0000 Subject: fixed texture scaling on filter_editor and search_editor --- indra/newview/skins/default/textures/textures.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index f106796cd9..27d61f9e27 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -384,12 +384,12 @@ - - - - - - + + + + + + -- cgit v1.2.3 From 750f94ca6931acc6ceb6dfd97c9200418326f28d Mon Sep 17 00:00:00 2001 From: James Cook Date: Wed, 7 Oct 2009 00:15:11 +0000 Subject: EXT-1141 Remove one-click cursor icons from art directories. Cursor is now a hand for all one-click actions, at Erica's request. Deleted art files for Win/Mac/Linux, including repackaging the SDL binary download package. Reviewed with Kelly. --- indra/newview/CMakeLists.txt | 4 ---- indra/newview/cursors_mac/UI_CURSOR_TOOLBUY.tif | Bin 14776 -> 0 bytes indra/newview/cursors_mac/UI_CURSOR_TOOLOPEN.tif | Bin 15144 -> 0 bytes indra/newview/cursors_mac/UI_CURSOR_TOOLSIT.tif | Bin 15176 -> 0 bytes indra/newview/lltoolpie.cpp | 8 ++++---- indra/newview/res/toolbuy.cur | Bin 2238 -> 0 bytes indra/newview/res/toolopen.cur | Bin 2238 -> 0 bytes indra/newview/res/toolsit.cur | Bin 2238 -> 0 bytes 8 files changed, 4 insertions(+), 8 deletions(-) delete mode 100644 indra/newview/cursors_mac/UI_CURSOR_TOOLBUY.tif delete mode 100644 indra/newview/cursors_mac/UI_CURSOR_TOOLOPEN.tif delete mode 100644 indra/newview/cursors_mac/UI_CURSOR_TOOLSIT.tif delete mode 100644 indra/newview/res/toolbuy.cur delete mode 100644 indra/newview/res/toolopen.cur delete mode 100644 indra/newview/res/toolsit.cur (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 747eb5d19b..87c31c600e 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1103,14 +1103,10 @@ if (WINDOWS) res/ll_icon.BMP res/ll_icon.ico res/resource.h - res/toolbuy.cur - res/toolopen.cur - res/toolpay.cur res/toolpickobject.cur res/toolpickobject2.cur res/toolpickobject3.cur res/toolpipette.cur - res/toolsit.cur ) set_source_files_properties(${viewer_RESOURCE_FILES} diff --git a/indra/newview/cursors_mac/UI_CURSOR_TOOLBUY.tif b/indra/newview/cursors_mac/UI_CURSOR_TOOLBUY.tif deleted file mode 100644 index 39d89987aa..0000000000 Binary files a/indra/newview/cursors_mac/UI_CURSOR_TOOLBUY.tif and /dev/null differ diff --git a/indra/newview/cursors_mac/UI_CURSOR_TOOLOPEN.tif b/indra/newview/cursors_mac/UI_CURSOR_TOOLOPEN.tif deleted file mode 100644 index 864c8dee7a..0000000000 Binary files a/indra/newview/cursors_mac/UI_CURSOR_TOOLOPEN.tif and /dev/null differ diff --git a/indra/newview/cursors_mac/UI_CURSOR_TOOLSIT.tif b/indra/newview/cursors_mac/UI_CURSOR_TOOLSIT.tif deleted file mode 100644 index d6d835a90b..0000000000 Binary files a/indra/newview/cursors_mac/UI_CURSOR_TOOLSIT.tif and /dev/null differ diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index aa55d54dbb..beb16c267e 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -392,24 +392,24 @@ ECursorType cursor_from_object(LLViewerObject* object) case CLICK_ACTION_SIT: if ((gAgent.getAvatarObject() != NULL) && (!gAgent.getAvatarObject()->isSitting())) // not already sitting? { - cursor = UI_CURSOR_TOOLSIT; + cursor = UI_CURSOR_HAND; } break; case CLICK_ACTION_BUY: - cursor = UI_CURSOR_TOOLBUY; + cursor = UI_CURSOR_HAND; break; case CLICK_ACTION_OPEN: // Open always opens the parent. if (parent && parent->allowOpen()) { - cursor = UI_CURSOR_TOOLOPEN; + cursor = UI_CURSOR_HAND; } break; case CLICK_ACTION_PAY: if ((object && object->flagTakesMoney()) || (parent && parent->flagTakesMoney())) { - cursor = UI_CURSOR_TOOLPAY; + cursor = UI_CURSOR_HAND; } break; case CLICK_ACTION_PLAY: diff --git a/indra/newview/res/toolbuy.cur b/indra/newview/res/toolbuy.cur deleted file mode 100644 index c61cd76bef..0000000000 Binary files a/indra/newview/res/toolbuy.cur and /dev/null differ diff --git a/indra/newview/res/toolopen.cur b/indra/newview/res/toolopen.cur deleted file mode 100644 index 8408f7c7eb..0000000000 Binary files a/indra/newview/res/toolopen.cur and /dev/null differ diff --git a/indra/newview/res/toolsit.cur b/indra/newview/res/toolsit.cur deleted file mode 100644 index 60b0e773e5..0000000000 Binary files a/indra/newview/res/toolsit.cur and /dev/null differ -- cgit v1.2.3 From 2b42eeb570e2db021ecae92459b53803ceed46e3 Mon Sep 17 00:00:00 2001 From: Ramzi Ramey Date: Wed, 7 Oct 2009 01:40:26 +0000 Subject: DEV-38453 (part5) Modernize the foreign language versions of floater_camera.xml, floater_color_picker.xml, floater_land_holdings.xml, panel_avatar.xml NO CHANGES TO ENGLISH --- .../newview/skins/default/xui/da/floater_camera.xml | 18 +++++++++++------- .../skins/default/xui/da/floater_color_picker.xml | 2 +- .../newview/skins/default/xui/de/floater_camera.xml | 18 +++++++++++------- .../skins/default/xui/de/floater_color_picker.xml | 2 +- .../newview/skins/default/xui/es/floater_camera.xml | 20 ++++++++++++-------- .../skins/default/xui/es/floater_color_picker.xml | 2 +- .../newview/skins/default/xui/fr/floater_camera.xml | 18 +++++++++++------- .../skins/default/xui/fr/floater_color_picker.xml | 2 +- .../newview/skins/default/xui/it/floater_camera.xml | 18 +++++++++++------- .../skins/default/xui/it/floater_color_picker.xml | 2 +- .../newview/skins/default/xui/ja/floater_camera.xml | 18 +++++++++++------- .../newview/skins/default/xui/nl/floater_camera.xml | 18 +++++++++++------- .../skins/default/xui/nl/floater_color_picker.xml | 2 +- .../newview/skins/default/xui/pl/floater_camera.xml | 18 +++++++++++------- .../skins/default/xui/pl/floater_color_picker.xml | 2 +- .../newview/skins/default/xui/pt/floater_camera.xml | 20 ++++++++++++-------- .../skins/default/xui/pt/floater_color_picker.xml | 2 +- 17 files changed, 109 insertions(+), 73 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/da/floater_camera.xml b/indra/newview/skins/default/xui/da/floater_camera.xml index 0eb090d2e4..c52f7ab832 100644 --- a/indra/newview/skins/default/xui/da/floater_camera.xml +++ b/indra/newview/skins/default/xui/da/floater_camera.xml @@ -1,12 +1,16 @@ - - + + Roter kamera omkring fokus - - + + Zoom kamera mod fokus - - + + Flyt kamera op og ned, til venstre og højre - + + + + + diff --git a/indra/newview/skins/default/xui/da/floater_color_picker.xml b/indra/newview/skins/default/xui/da/floater_color_picker.xml index e6cc5774ed..c8e1fc813b 100644 --- a/indra/newview/skins/default/xui/da/floater_color_picker.xml +++ b/indra/newview/skins/default/xui/da/floater_color_picker.xml @@ -26,6 +26,6 @@ Nuværende Farve: - (Træk ned og gem.) + (Træk ned og gem) diff --git a/indra/newview/skins/default/xui/de/floater_camera.xml b/indra/newview/skins/default/xui/de/floater_camera.xml index 198b5b07f2..f44db713d8 100644 --- a/indra/newview/skins/default/xui/de/floater_camera.xml +++ b/indra/newview/skins/default/xui/de/floater_camera.xml @@ -1,12 +1,16 @@ - - + + Kamera um Fokus drehen - - + + Kamera auf Fokus zoomen - - + + Kamera nach oben, unten, links und rechts bewegen - + + + + + diff --git a/indra/newview/skins/default/xui/de/floater_color_picker.xml b/indra/newview/skins/default/xui/de/floater_color_picker.xml index f53a1135dc..fa2f616249 100644 --- a/indra/newview/skins/default/xui/de/floater_color_picker.xml +++ b/indra/newview/skins/default/xui/de/floater_color_picker.xml @@ -27,6 +27,6 @@ (Nach unten ziehen, - um zu speichern.) + um zu speichern) diff --git a/indra/newview/skins/default/xui/es/floater_camera.xml b/indra/newview/skins/default/xui/es/floater_camera.xml index 0246f0d440..3aeb4e5771 100644 --- a/indra/newview/skins/default/xui/es/floater_camera.xml +++ b/indra/newview/skins/default/xui/es/floater_camera.xml @@ -1,12 +1,16 @@ - - + + Girar la cámara alrededor de lo enfocado - - + + Hacer zoom con la cámara en lo enfocado - - - Mover la cámara arriba y abajo, izquierda y derecha. - + + + Mover la cámara arriba y abajo, izquierda y derecha + + + + + diff --git a/indra/newview/skins/default/xui/es/floater_color_picker.xml b/indra/newview/skins/default/xui/es/floater_color_picker.xml index c220c48cb0..616c373d18 100644 --- a/indra/newview/skins/default/xui/es/floater_color_picker.xml +++ b/indra/newview/skins/default/xui/es/floater_color_picker.xml @@ -26,6 +26,6 @@ (Arrástrelo abajo - para guardarlo.) + para guardarlo) diff --git a/indra/newview/skins/default/xui/fr/floater_camera.xml b/indra/newview/skins/default/xui/fr/floater_camera.xml index 9f280b7265..8ea640853f 100644 --- a/indra/newview/skins/default/xui/fr/floater_camera.xml +++ b/indra/newview/skins/default/xui/fr/floater_camera.xml @@ -1,12 +1,16 @@ - - + + Faire tourner la caméra autour du point central - - + + Zoomer en direction du point central - - + + Déplacer la caméra vers le haut et le bas, la gauche et la droite - + + + + + diff --git a/indra/newview/skins/default/xui/fr/floater_color_picker.xml b/indra/newview/skins/default/xui/fr/floater_color_picker.xml index adab86dac0..94bcad070e 100644 --- a/indra/newview/skins/default/xui/fr/floater_color_picker.xml +++ b/indra/newview/skins/default/xui/fr/floater_color_picker.xml @@ -27,6 +27,6 @@ (Faire glisser dessous -pour enregistrer.) +pour enregistrer) diff --git a/indra/newview/skins/default/xui/it/floater_camera.xml b/indra/newview/skins/default/xui/it/floater_camera.xml index 9655ed2211..823be8f4a1 100644 --- a/indra/newview/skins/default/xui/it/floater_camera.xml +++ b/indra/newview/skins/default/xui/it/floater_camera.xml @@ -1,12 +1,16 @@ - - + + Ruota la telecamera Intorno all'Inquadratura - - + + Avvicina la telecamera nell'inquadratura - - + + Muovi la telecamera su e giù e a sinistra e destra - + + + + + diff --git a/indra/newview/skins/default/xui/it/floater_color_picker.xml b/indra/newview/skins/default/xui/it/floater_color_picker.xml index 93188c29ac..1e6d7bc3f0 100644 --- a/indra/newview/skins/default/xui/it/floater_color_picker.xml +++ b/indra/newview/skins/default/xui/it/floater_color_picker.xml @@ -33,6 +33,6 @@ (Trascina qui sotto - per salvare.) + per salvare) diff --git a/indra/newview/skins/default/xui/ja/floater_camera.xml b/indra/newview/skins/default/xui/ja/floater_camera.xml index 46e7b1990d..bb87b194a4 100644 --- a/indra/newview/skins/default/xui/ja/floater_camera.xml +++ b/indra/newview/skins/default/xui/ja/floater_camera.xml @@ -1,12 +1,16 @@ - - + + フォーカスを中心にカメラを回転 - - + + フォーカスに向けてカメラをズーム - - + + カメラを上下左右に移動 - + + + + + diff --git a/indra/newview/skins/default/xui/nl/floater_camera.xml b/indra/newview/skins/default/xui/nl/floater_camera.xml index a6b843a0a2..81a3ed8a58 100644 --- a/indra/newview/skins/default/xui/nl/floater_camera.xml +++ b/indra/newview/skins/default/xui/nl/floater_camera.xml @@ -1,12 +1,16 @@ - - + + Roteer camera rond focus - - + + Zoom camera naar focus - - + + Beweeg camera omhoog en omlaag, links en rechts - + + + + + diff --git a/indra/newview/skins/default/xui/nl/floater_color_picker.xml b/indra/newview/skins/default/xui/nl/floater_color_picker.xml index 25294e17e2..a357e874f7 100644 --- a/indra/newview/skins/default/xui/nl/floater_color_picker.xml +++ b/indra/newview/skins/default/xui/nl/floater_color_picker.xml @@ -26,6 +26,6 @@ (Sleep naar beneden - om op te slaan.) + om op te slaan) diff --git a/indra/newview/skins/default/xui/pl/floater_camera.xml b/indra/newview/skins/default/xui/pl/floater_camera.xml index 24da91c081..5957018144 100755 --- a/indra/newview/skins/default/xui/pl/floater_camera.xml +++ b/indra/newview/skins/default/xui/pl/floater_camera.xml @@ -1,12 +1,16 @@ - - + + Obracaj kamerę wokół obiektu - - + + Najedź kamerą w kierunku obiektu - - + + Poruszaj kamerą w dół/górę oraz w prawo/lewo - + + + + + diff --git a/indra/newview/skins/default/xui/pl/floater_color_picker.xml b/indra/newview/skins/default/xui/pl/floater_color_picker.xml index a380423cdf..d6ffe1837a 100755 --- a/indra/newview/skins/default/xui/pl/floater_color_picker.xml +++ b/indra/newview/skins/default/xui/pl/floater_color_picker.xml @@ -26,6 +26,6 @@ Obecny Kolor: - (Przeciągnij tutaj.) + (Przeciągnij tutaj) diff --git a/indra/newview/skins/default/xui/pt/floater_camera.xml b/indra/newview/skins/default/xui/pt/floater_camera.xml index 4dc6997606..b61e261148 100644 --- a/indra/newview/skins/default/xui/pt/floater_camera.xml +++ b/indra/newview/skins/default/xui/pt/floater_camera.xml @@ -1,12 +1,16 @@ - - + + Girar a Câmera ao redor do Foco - - + + Aproximar a Câmera in direção ao Foco - - - Mover a Câmera Para Cima e Para Baixo, Para a Esquerda e Para a Direita - + + + Mover a Câmera para Cima e para Baixo, para a Esquerda e para a Direita + + + + + diff --git a/indra/newview/skins/default/xui/pt/floater_color_picker.xml b/indra/newview/skins/default/xui/pt/floater_color_picker.xml index 95dd53ccd4..76da972b5d 100644 --- a/indra/newview/skins/default/xui/pt/floater_color_picker.xml +++ b/indra/newview/skins/default/xui/pt/floater_color_picker.xml @@ -27,6 +27,6 @@ (Arraste abaixo - para salvar.) + para salvar) -- cgit v1.2.3 From cec9edea1e09e9bae2949b61770a9e4016670427 Mon Sep 17 00:00:00 2001 From: Erica Olsen Date: Wed, 7 Oct 2009 03:14:50 +0000 Subject: EXT-1384 Apply style guide to inspectors, test with live data, adjust layout as needed --- .../skins/default/xui/en/inspect_avatar.xml | 159 +++++++++++---------- .../skins/default/xui/en/inspect_object.xml | 89 ++++++------ 2 files changed, 131 insertions(+), 117 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/inspect_avatar.xml b/indra/newview/skins/default/xui/en/inspect_avatar.xml index b44acebbcf..1af07c35be 100644 --- a/indra/newview/skins/default/xui/en/inspect_avatar.xml +++ b/indra/newview/skins/default/xui/en/inspect_avatar.xml @@ -5,16 +5,16 @@ --> + width="245"> + top_pad="0" + width="170" + use_ellipses="true" + word_wrap="false" /> + - + top_pad="8" + width="240" + use_ellipses="true" + word_wrap="false" /> + width="150" />