diff options
author | Alexei Arabadji <aarabadji@productengine.com> | 2010-03-18 20:06:32 +0200 |
---|---|---|
committer | Alexei Arabadji <aarabadji@productengine.com> | 2010-03-18 20:06:32 +0200 |
commit | 1944f64107be98f344824045a19e113966591340 (patch) | |
tree | d6b199092d07abc44fdf57deeaf8a332f010610f | |
parent | 1bf989705cf33fa27e404743108c6920cf33a7f2 (diff) | |
parent | c74f87015118a6da7036623d026fc512f46af9d5 (diff) |
manual merge -r 10503
40 files changed, 173 insertions, 494 deletions
diff --git a/indra/llcommon/llsys.h b/indra/llcommon/llsys.h index f1dda1b2e2..c2c45bec9a 100644 --- a/indra/llcommon/llsys.h +++ b/indra/llcommon/llsys.h @@ -122,6 +122,7 @@ public: U32 getPhysicalMemoryClamped() const; ///< Memory size in clamped bytes }; + LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLOSInfo& info); LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLCPUInfo& info); LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLMemoryInfo& info); diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp index c1d512e148..3a8efadaa4 100644 --- a/indra/llui/llcombobox.cpp +++ b/indra/llui/llcombobox.cpp @@ -706,14 +706,17 @@ void LLComboBox::onListMouseUp() void LLComboBox::onItemSelected(const LLSD& data) { - setValue(data); - - if (mAllowTextEntry && mLastSelectedIndex != -1) + mLastSelectedIndex = getCurrentIndex(); + if (mLastSelectedIndex != -1) { - gFocusMgr.setKeyboardFocus(mTextEntry); - mTextEntry->selectAll(); - } + setLabel(getSelectedItemLabel()); + if (mAllowTextEntry) + { + gFocusMgr.setKeyboardFocus(mTextEntry); + mTextEntry->selectAll(); + } + } // hiding the list reasserts the old value stored in the text editor/dropdown button hideList(); @@ -1080,24 +1083,6 @@ LLIconsComboBox::LLIconsComboBox(const LLIconsComboBox::Params& p) mLabelColumnIndex(p.label_column) {} -void LLIconsComboBox::setValue(const LLSD& value) -{ - BOOL found = mList->selectByValue(value); - if (found) - { - LLScrollListItem* item = mList->getFirstSelected(); - if (item) - { - setLabel(getSelectedItemLabel()); - } - mLastSelectedIndex = mList->getFirstSelectedIndex(); - } - else - { - mLastSelectedIndex = -1; - } -} - const std::string LLIconsComboBox::getSelectedItemLabel(S32 column) const { mButton->setImageOverlay(LLComboBox::getSelectedItemLabel(mIconColumnIndex), mButton->getImageOverlayHAlign()); diff --git a/indra/llui/llcombobox.h b/indra/llui/llcombobox.h index 965061ead2..f0bd432f3a 100644 --- a/indra/llui/llcombobox.h +++ b/indra/llui/llcombobox.h @@ -221,7 +221,6 @@ protected: LLPointer<LLUIImage> mArrowImage; LLUIString mLabel; BOOL mHasAutocompletedText; - S32 mLastSelectedIndex; private: BOOL mAllowTextEntry; @@ -232,6 +231,7 @@ private: commit_callback_t mTextEntryCallback; commit_callback_t mSelectionCallback; boost::signals2::connection mTopLostSignalConnection; + S32 mLastSelectedIndex; }; // A combo box with icons for the list of items. @@ -247,7 +247,6 @@ public: Params(); }; - /*virtual*/ void setValue(const LLSD& value); /*virtual*/ const std::string getSelectedItemLabel(S32 column = 0) const; private: diff --git a/indra/llui/llsearcheditor.h b/indra/llui/llsearcheditor.h index 714aca9337..785d0633dc 100644 --- a/indra/llui/llsearcheditor.h +++ b/indra/llui/llsearcheditor.h @@ -66,6 +66,8 @@ public: } }; + void setCommitOnFocusLost(BOOL b) { if (mSearchEditor) mSearchEditor->setCommitOnFocusLost(b); } + protected: LLSearchEditor(const Params&); friend class LLUICtrlFactory; diff --git a/indra/llwindow/llwindow.cpp b/indra/llwindow/llwindow.cpp index b77deb003f..1c6c9e6e9d 100644 --- a/indra/llwindow/llwindow.cpp +++ b/indra/llwindow/llwindow.cpp @@ -407,30 +407,3 @@ BOOL LLWindowManager::isWindowValid(LLWindow *window) { return sWindowList.find(window) != sWindowList.end(); } - -S32 LLDisplayInfo::getDisplayWidth() const -{ -#if LL_WINDOWS - return LLWindowWin32::getDisplayWidth(); -#elif LL_DARWIN - return LLWindowMacOSX::getDisplayWidth(); -#elif LL_SDL - return LLWindowSDL::getDisplayWidth(); -#else - return 1024; //*FIXME -#endif -} - -S32 LLDisplayInfo::getDisplayHeight() const -{ -#if LL_WINDOWS - return LLWindowWin32::getDisplayHeight(); -#elif LL_DARWIN - return LLWindowMacOSX::getDisplayHeight(); -#elif LL_SDL - return LLWindowSDL::getDisplayHeight(); -#else - return 768; //*FIXME -#endif -} - diff --git a/indra/llwindow/llwindow.h b/indra/llwindow/llwindow.h index b769f5071b..55b221e716 100644 --- a/indra/llwindow/llwindow.h +++ b/indra/llwindow/llwindow.h @@ -281,19 +281,4 @@ extern const std::string gURLProtocolWhitelistHandler[]; void simpleEscapeString ( std::string& stringIn ); -//============================================================================= -// -// CLASS LLDisplayInfo -class LLDisplayInfo - -/*! @brief Class to query the information about some display settings -*/ -{ -public: - LLDisplayInfo(){}; ///< Default constructor - - S32 getDisplayWidth() const; ///< display width - S32 getDisplayHeight() const; ///< display height -}; - #endif // _LL_window_h_ diff --git a/indra/llwindow/llwindowmacosx-objc.h b/indra/llwindow/llwindowmacosx-objc.h index ed8c874dcb..ed5d7b1e74 100644 --- a/indra/llwindow/llwindowmacosx-objc.h +++ b/indra/llwindow/llwindowmacosx-objc.h @@ -40,5 +40,4 @@ void setupCocoa(); CursorRef createImageCursor(const char *fullpath, int hotspotX, int hotspotY); OSErr releaseImageCursor(CursorRef ref); OSErr setImageCursor(CursorRef ref); -void getScreenSize(int* width, int* height); -void getVisibleScreen(int *x, int *y, int* width, int* height); + diff --git a/indra/llwindow/llwindowmacosx-objc.mm b/indra/llwindow/llwindowmacosx-objc.mm index 5cab2619fd..59b25e1726 100644 --- a/indra/llwindow/llwindowmacosx-objc.mm +++ b/indra/llwindow/llwindowmacosx-objc.mm @@ -116,22 +116,3 @@ OSErr setImageCursor(CursorRef ref) return noErr; } -void getScreenSize(int* width, int* height) -{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - NSRect screen_rect = [[NSScreen mainScreen] frame]; - if (width) *width = (int)(screen_rect.size.width); - if (height) *height = (int)(screen_rect.size.height); - [pool release]; -} - -void getVisibleScreen(int *x, int *y, int* width, int* height) -{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - NSRect visible_rect = [[NSScreen mainScreen] visibleFrame]; - if (width) *width = (int)(visible_rect.size.width); - if (height) *height = (int)(visible_rect.size.height); - if (x) *x = (int)(visible_rect.origin.x); - if (y) *y = (int)(visible_rect.origin.y); - [pool release]; -} diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index 224314a490..022b97f481 100644 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -1122,33 +1122,7 @@ BOOL LLWindowMacOSX::getMaximized() BOOL LLWindowMacOSX::maximize() { - if (mWindow) - { - // *HACK: Because Mac OSX doesn't have a concept of a "maximized" window, we just - // stretch it out to the visible screen size. - Rect win_rect; - - int visible_x; - int visible_y; - int visible_width; - int visible_height; - int screen_width; - int screen_height; - - getScreenSize(&screen_width, &screen_height); - getVisibleScreen(&visible_x, &visible_y, &visible_width, &visible_height); - - int mac_os_menu_bar_height = screen_height - (visible_height + visible_y); - ::SetRect(&win_rect, - visible_x, - mac_os_menu_bar_height, - visible_width + visible_x, - visible_height + mac_os_menu_bar_height); - - ::SetWindowBounds(mWindow, kWindowStructureRgn, &win_rect); - - return TRUE; - } + // TODO return FALSE; } @@ -3499,26 +3473,6 @@ MASK LLWindowMacOSX::modifiersToMask(SInt16 modifiers) return mask; } -// static -S32 LLWindowMacOSX::getDisplayWidth() -{ - S32 width = 1024; - // Need to invoke cocoa before use getScreenSize() - setupCocoa(); - getScreenSize(&width, NULL); - return width; -} - -// static -S32 LLWindowMacOSX::getDisplayHeight() -{ - S32 height = 768; - // Need to invoke cocoa before use getScreenSize() - setupCocoa(); - getScreenSize(NULL, &height); - return height; -} - #if LL_OS_DRAGDROP_ENABLED OSErr LLWindowMacOSX::dragTrackingHandler(DragTrackingMessage message, WindowRef theWindow, diff --git a/indra/llwindow/llwindowmacosx.h b/indra/llwindow/llwindowmacosx.h index 86036a261c..7c6b324029 100644 --- a/indra/llwindow/llwindowmacosx.h +++ b/indra/llwindow/llwindowmacosx.h @@ -123,8 +123,6 @@ public: // Provide native key event data /*virtual*/ LLSD getNativeKeyData(); - static S32 getDisplayWidth(); - static S32 getDisplayHeight(); protected: LLWindowMacOSX(LLWindowCallbacks* callbacks, diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index cb4e04511c..1f705f9e60 100644 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -187,47 +187,6 @@ Display* LLWindowSDL::get_SDL_Display(void) } #endif // LL_X11 -// static -S32 LLWindowSDL::getDisplayWidth() -{ -#if LL_GTK - if (LLWindowSDL::ll_try_gtk_init()) - { - return gdk_screen_width(); - } -#endif // LL_GTK - -#if LL_X11 - Display *display = XOpenDisplay(NULL); - int screen_num = DefaultScreen(display); - S32 width = DisplayWidth(display, screen_num); - XCloseDisplay(display); - return width; -#endif //LL_X11 - - return 1024; -} - -// static -S32 LLWindowSDL::getDisplayHeight() -{ -#if LL_GTK - if (LLWindowSDL::ll_try_gtk_init()) - { - return gdk_screen_height(); - } -#endif // LL_GTK - -#if LL_X11 - Display *display = XOpenDisplay(NULL); - int screen_num = DefaultScreen(display); - S32 height = DisplayHeight(display, screen_num); - XCloseDisplay(display); - return height; -#endif //LL_X11 - - return 768; -} LLWindowSDL::LLWindowSDL(LLWindowCallbacks* callbacks, const std::string& title, S32 x, S32 y, S32 width, @@ -950,68 +909,7 @@ BOOL LLWindowSDL::getMaximized() if (mWindow) { -#if LL_X11 - if (mSDL_Display) - { - maybe_lock_display(); - - // Return data in the specified format, XA_ATOM. - U8* prop; - // Actual format of the property. - int format; - // Actual number of items stored in the prop return data. - unsigned long nitems; - // Number of bytes remaining to be read in the property if a partial read was performed. - unsigned long bytes_after; - // Atom identifier that defines the actual type of the property. - Atom type; - - // Atom used to obtain list of hints describing the window state. - Atom wm_state = XInternAtom(mSDL_Display, "_NET_WM_STATE", False); - - // Atoms indicates that the window is vertically/horizontally maximized. - Atom max_vert = XInternAtom(mSDL_Display, "_NET_WM_STATE_MAXIMIZED_VERT", False); - Atom max_horz = XInternAtom(mSDL_Display, "_NET_WM_STATE_MAXIMIZED_HORZ", False); - - // How many atoms in which we interested are present in list of hints. - U32 pass = 0; - - do - { - nitems = 0; - bytes_after = 0; - type = None; - if ( (XGetWindowProperty (mSDL_Display, - mSDL_XWindowID, - wm_state, - 0, UINT_MAX, - False, XA_ATOM, - &type, &format, - &nitems, &bytes_after, - &prop) == Success) - && type != None ) - { - Atom *atoms = (Atom *)prop; - for (unsigned long i=0; i<nitems; ++i) - { - if (atoms[i] == max_horz) - ++pass; - else if (atoms[i] == max_vert) - ++pass; - } - XFree (atoms); - } - else - { - break; - } - } while (bytes_after > 0); - - result = (pass == 2); - - maybe_unlock_display(); - } -#endif // LL_X11 + // TODO } return(result); @@ -1019,103 +917,7 @@ BOOL LLWindowSDL::getMaximized() BOOL LLWindowSDL::maximize() { -#if LL_X11 - if (mSDL_Display && !mFullscreen) - { - maybe_lock_display(); - - BOOL is_maximize_allowed = FALSE; - - // Check if maximize is allowed - { - // Return data in the specified format, XA_ATOM. - U8* prop; - // Actual format of the property. - int format; - // Actual number of items stored in the prop return data. - unsigned long nitems; - // Number of bytes remaining to be read in the property if a partial read was performed. - unsigned long bytes_after; - // Atom identifier that defines the actual type of the property. - Atom type; - - // Atom used to obtain a list of atoms indicating user operations that the Window Manager supports for this window. - Atom allowed_act = XInternAtom(mSDL_Display, "_NET_WM_ALLOWED_ACTIONS", False); - - // Atoms that indicates that the window may be vertically/horizontally maximized. - Atom max_vert_act = XInternAtom(mSDL_Display, "_NET_WM_ACTION_MAXIMIZE_HORZ", False); - Atom max_horz_act = XInternAtom(mSDL_Display, "_NET_WM_ACTION_MAXIMIZE_VERT", False); - - // How many atoms in which we interested are present in list of hints. - U32 pass = 0; - - do - { - nitems = 0; - bytes_after = 0; - type = None; - if ( (XGetWindowProperty (mSDL_Display, - mSDL_XWindowID, - allowed_act, - 0, UINT_MAX, - False, XA_ATOM, - &type, &format, - &nitems, &bytes_after, - &prop) == Success) - && type != None ) - { - Atom *atoms = (Atom *)prop; - for (unsigned long i=0; i<nitems; ++i) - { - if (atoms[i] == max_vert_act) - ++pass; - else if (atoms[i] == max_horz_act) - ++pass; - } - XFree (atoms); - } - else - { - break; - } - } while (bytes_after > 0); - - is_maximize_allowed = (pass == 2); - } - - // Send maximize event to X11 system - if (is_maximize_allowed) - { - XEvent xev; - - // Atom describing the window state. - Atom wm_state = XInternAtom(mSDL_Display, "_NET_WM_STATE", False); - - // Atoms indicates that the window is vertically/horizontally maximized. - Atom max_vert = XInternAtom(mSDL_Display, "_NET_WM_STATE_MAXIMIZED_VERT", False); - Atom max_horz = XInternAtom(mSDL_Display, "_NET_WM_STATE_MAXIMIZED_HORZ", False); - - memset(&xev, 0, sizeof(xev)); - xev.type = ClientMessage; - xev.xclient.window = mSDL_XWindowID; - xev.xclient.message_type = wm_state; - xev.xclient.format = 32; - xev.xclient.data.l[0] = 1; // add/set property - xev.xclient.data.l[1] = max_vert; - xev.xclient.data.l[2] = max_horz; - xev.xclient.data.l[3] = 0; - xev.xclient.data.l[4] = 0; - - XSendEvent(mSDL_Display, - DefaultRootWindow(mSDL_Display), - False, - SubstructureNotifyMask, &xev); - } - - maybe_unlock_display(); - return is_maximize_allowed; - } -#endif // LL_X11 + // TODO return FALSE; } diff --git a/indra/llwindow/llwindowsdl.h b/indra/llwindow/llwindowsdl.h index 2311a361fa..e6bdd46a77 100644 --- a/indra/llwindow/llwindowsdl.h +++ b/indra/llwindow/llwindowsdl.h @@ -148,9 +148,6 @@ public: static Display* get_SDL_Display(void); #endif // LL_X11 - static S32 getDisplayWidth(); - static S32 getDisplayHeight(); - protected: LLWindowSDL(LLWindowCallbacks* callbacks, const std::string& title, int x, int y, int width, int height, U32 flags, diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 5f778d6208..8df9dad581 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -3720,16 +3720,5 @@ std::vector<std::string> LLWindowWin32::getDynamicFallbackFontList() return std::vector<std::string>(); } -// static -S32 LLWindowWin32::getDisplayWidth() -{ - return ::GetSystemMetrics(SM_CXVIRTUALSCREEN); -} - -// static -S32 LLWindowWin32::getDisplayHeight() -{ - return ::GetSystemMetrics(SM_CYVIRTUALSCREEN); -} #endif // LL_WINDOWS diff --git a/indra/llwindow/llwindowwin32.h b/indra/llwindow/llwindowwin32.h index c221ec0192..9d57735772 100644 --- a/indra/llwindow/llwindowwin32.h +++ b/indra/llwindow/llwindowwin32.h @@ -120,9 +120,6 @@ public: static std::vector<std::string> getDynamicFallbackFontList(); - static S32 getDisplayWidth(); - static S32 getDisplayHeight(); - protected: LLWindowWin32(LLWindowCallbacks* callbacks, const std::string& title, const std::string& name, int x, int y, int width, int height, U32 flags, diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 8edf766132..ab01eabf73 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -10655,7 +10655,7 @@ <key>Type</key> <string>S32</string> <key>Value</key> - <integer>700</integer> + <integer>738</integer> </map> <key>WindowMaximized</key> <map> @@ -10677,7 +10677,7 @@ <key>Type</key> <string>S32</string> <key>Value</key> - <integer>1000</integer> + <integer>1024</integer> </map> <key>WindowX</key> <map> diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 2384e6c5ba..11c252406a 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -304,10 +304,7 @@ static std::string gLaunchFileOnQuit; // Used on Win32 for other apps to identify our window (eg, win_setup) const char* const VIEWER_WINDOW_CLASSNAME = "Second Life"; -static const S32 FIRST_RUN_WINDOW_WIDTH = 1024; -//should account for Windows task bar -static const S32 FIRST_RUN_WINDOW_HIGHT = 738; //---------------------------------------------------------------------------- // List of entries from strings.xml to always replace @@ -2374,35 +2371,12 @@ bool LLAppViewer::initWindow() // store setting in a global for easy access and modification gNoRender = gSavedSettings.getBOOL("DisableRendering"); - S32 window_x = gSavedSettings.getS32("WindowX"); - S32 window_y = gSavedSettings.getS32("WindowY"); - S32 window_width = gSavedSettings.getS32("WindowWidth"); - S32 window_height = gSavedSettings.getS32("WindowHeight"); - - bool show_maximized = gSavedSettings.getBOOL("WindowMaximized"); - - bool first_run = gSavedSettings.getBOOL("FirstLoginThisInstall"); - - if (first_run)//for first login - { - window_width = FIRST_RUN_WINDOW_WIDTH;//yep hardcoded - window_height = FIRST_RUN_WINDOW_HIGHT; - - //if screen resolution is lower then first run width/height then show maximized - LLDisplayInfo display_info; - if(display_info.getDisplayWidth() <= FIRST_RUN_WINDOW_WIDTH - || display_info.getDisplayHeight()<=FIRST_RUN_WINDOW_HIGHT) - { - show_maximized = true; - } - } - // always start windowed BOOL ignorePixelDepth = gSavedSettings.getBOOL("IgnorePixelDepth"); gViewerWindow = new LLViewerWindow(gWindowTitle, VIEWER_WINDOW_CLASSNAME, - window_x, window_y, - window_width, window_height, + gSavedSettings.getS32("WindowX"), gSavedSettings.getS32("WindowY"), + gSavedSettings.getS32("WindowWidth"), gSavedSettings.getS32("WindowHeight"), FALSE, ignorePixelDepth); LLNotificationsUI::LLNotificationManager::getInstance(); @@ -2413,7 +2387,7 @@ bool LLAppViewer::initWindow() gViewerWindow->toggleFullscreen(FALSE); } - if (show_maximized) + if (gSavedSettings.getBOOL("WindowMaximized")) { gViewerWindow->mWindow->maximize(); gViewerWindow->getWindow()->setNativeAspectRatio(gSavedSettings.getF32("FullScreenAspectRatio")); diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp index 80cf8f1d61..8441796219 100644 --- a/indra/newview/llassetuploadresponders.cpp +++ b/indra/newview/llassetuploadresponders.cpp @@ -182,7 +182,10 @@ void LLAssetUploadResponder::uploadFailure(const LLSD& content) // deal with L$ errors if (reason == "insufficient funds") { - LLFloaterBuyCurrency::buyCurrency(LLTrans::getString("uploading_costs"), LLGlobalEconomy::Singleton::getInstance()->getPriceUpload()); + S32 price = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); + LLStringUtil::format_map_t args; + args["AMOUNT"] = llformat("%d", price); + LLFloaterBuyCurrency::buyCurrency(LLTrans::getString("uploading_costs", args), price); } else { diff --git a/indra/newview/llfloaterbuy.cpp b/indra/newview/llfloaterbuy.cpp index fba557c656..589f570d96 100644 --- a/indra/newview/llfloaterbuy.cpp +++ b/indra/newview/llfloaterbuy.cpp @@ -246,7 +246,8 @@ void LLFloaterBuy::inventoryChanged(LLViewerObject* obj, // Compute icon for this item BOOL item_is_multi = FALSE; - if ( inv_item->getFlags() & LLInventoryItem::II_FLAGS_LANDMARK_VISITED ) + if ( inv_item->getFlags() & LLInventoryItem::II_FLAGS_LANDMARK_VISITED + || inv_item->getFlags() & LLInventoryItem::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS) { item_is_multi = TRUE; } diff --git a/indra/newview/llfloaterbuycurrency.cpp b/indra/newview/llfloaterbuycurrency.cpp index 1642e6725e..7fddd1fc5f 100644 --- a/indra/newview/llfloaterbuycurrency.cpp +++ b/indra/newview/llfloaterbuycurrency.cpp @@ -234,8 +234,7 @@ void LLFloaterBuyCurrencyUI::updateUI() if (mHasTarget) { childSetVisible("buy_action", true); - childSetTextArg("buy_action", "[NAME]", mTargetName); - childSetTextArg("buy_action", "[PRICE]", llformat("%d",mTargetPrice)); + childSetTextArg("buy_action", "[ACTION]", mTargetName); } } diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index 0f3c176cea..42a7eeff26 100644 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -84,6 +84,8 @@ #include "llassetuploadresponders.h" #include "llagentui.h" +#include "lltrans.h" + const U32 INCLUDE_SCREENSHOT = 0x01 << 0; //----------------------------------------------------------------------------- @@ -372,8 +374,7 @@ void LLFloaterReporter::onClickSend(void *userdata) return; } - - LLUploadDialog::modalUploadDialog("Uploading...\n\nReport"); + LLUploadDialog::modalUploadDialog(LLTrans::getString("uploading_abuse_report")); // *TODO don't upload image if checkbox isn't checked std::string url = gAgent.getRegion()->getCapability("SendUserReport"); std::string sshot_url = gAgent.getRegion()->getCapability("SendUserReportWithScreenshot"); diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 1f918c72ea..6fedd9ac4d 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -103,7 +103,7 @@ std::string ICON_NAME[ICON_NAME_COUNT] = "Inv_Script", "Inv_Clothing", "Inv_Object", - "Inv_Object", + "Inv_Object_Multi", "Inv_Notecard", "Inv_Skin", "Inv_Snapshot", @@ -5358,7 +5358,10 @@ LLUIImagePtr LLLinkItemBridge::getIcon() const { if (LLViewerInventoryItem *item = getItem()) { - return get_item_icon(item->getActualType(), item->getInventoryType(), 0, FALSE); + U32 attachment_point = (item->getFlags() & 0xff); // low byte of inventory flags + bool is_multi = LLInventoryItem::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS & item->getFlags(); + + return get_item_icon(item->getActualType(), item->getInventoryType(), attachment_point, is_multi); } return get_item_icon(LLAssetType::AT_LINK, LLInventoryType::IT_NONE, 0, FALSE); } diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp index 2fb8aea4e9..62c2d80609 100644 --- a/indra/newview/llinventoryobserver.cpp +++ b/indra/newview/llinventoryobserver.cpp @@ -54,7 +54,6 @@ #include "llappviewer.h" #include "lldbstrings.h" #include "llviewerstats.h" -#include "llmutelist.h" #include "llnotificationsutil.h" #include "llcallbacklist.h" #include "llpreview.h" diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp index 2d3c4b187e..95094f6b52 100644 --- a/indra/newview/llmutelist.cpp +++ b/indra/newview/llmutelist.cpp @@ -128,68 +128,26 @@ LLMute::LLMute(const LLUUID& id, const std::string& name, EType type, U32 flags) } -std::string LLMute::getDisplayName() const +std::string LLMute::getDisplayType() const { - std::string name_with_suffix = mName; switch (mType) { case BY_NAME: default: - name_with_suffix += " " + LLTrans::getString("MuteByName"); + return LLTrans::getString("MuteByName"); break; case AGENT: - name_with_suffix += " " + LLTrans::getString("MuteAgent"); + return LLTrans::getString("MuteAgent"); break; case OBJECT: - name_with_suffix += " " + LLTrans::getString("MuteObject"); + return LLTrans::getString("MuteObject"); break; case GROUP: - name_with_suffix += " " + LLTrans::getString("MuteGroup"); + return LLTrans::getString("MuteGroup"); break; } - return name_with_suffix; } -void LLMute::setFromDisplayName(const std::string& display_name) -{ - size_t pos = 0; - mName = display_name; - - pos = mName.rfind(" " + LLTrans::getString("MuteGroup")); - if (pos != std::string::npos) - { - mName.erase(pos); - mType = GROUP; - return; - } - - pos = mName.rfind(" " + LLTrans::getString("MuteObject")); - if (pos != std::string::npos) - { - mName.erase(pos); - mType = OBJECT; - return; - } - - pos = mName.rfind(" " + LLTrans::getString("MuteAgent")); - if (pos != std::string::npos) - { - mName.erase(pos); - mType = AGENT; - return; - } - - pos = mName.rfind(" " + LLTrans::getString("MuteByName")); - if (pos != std::string::npos) - { - mName.erase(pos); - mType = BY_NAME; - return; - } - - llwarns << "Unable to set mute from display name " << display_name << llendl; - return; -} /* static */ LLMuteList* LLMuteList::getInstance() diff --git a/indra/newview/llmutelist.h b/indra/newview/llmutelist.h index e1e81a24b4..7cb11e6031 100644 --- a/indra/newview/llmutelist.h +++ b/indra/newview/llmutelist.h @@ -63,14 +63,8 @@ public: LLMute(const LLUUID& id, const std::string& name = std::string(), EType type = BY_NAME, U32 flags = 0); - // Returns name + suffix based on type - // For example: "James Tester (resident)" - std::string getDisplayName() const; - - // Converts a UI name into just the agent or object name - // For example: "James Tester (resident)" sets the name to "James Tester" - // and the type to AGENT. - void setFromDisplayName(const std::string& display_name); + // Returns localized type name of muted item + std::string getDisplayType() const; public: LLUUID mID; // agent or object id diff --git a/indra/newview/llpanelblockedlist.cpp b/indra/newview/llpanelblockedlist.cpp index 362657a458..a186bc926c 100644 --- a/indra/newview/llpanelblockedlist.cpp +++ b/indra/newview/llpanelblockedlist.cpp @@ -119,8 +119,13 @@ void LLPanelBlockedList::refreshBlockedList() std::vector<LLMute>::iterator it; for (it = mutes.begin(); it != mutes.end(); ++it) { - std::string display_name = it->getDisplayName(); - mBlockedList->addStringUUIDItem(display_name, it->mID, ADD_BOTTOM, TRUE); + LLScrollListItem::Params item_p; + item_p.enabled(TRUE); + item_p.value(it->mID); // link UUID of blocked item with ScrollListItem + item_p.columns.add().column("item_name").value(it->mName);//.type("text"); + item_p.columns.add().column("item_type").value(it->getDisplayType());//.type("text").width(111); + + mBlockedList->addRow(item_p, ADD_BOTTOM); } } @@ -145,9 +150,7 @@ void LLPanelBlockedList::onRemoveBtnClick() { std::string name = mBlockedList->getSelectedItemLabel(); LLUUID id = mBlockedList->getStringUUIDSelectedItem(); - LLMute mute(id); - mute.setFromDisplayName(name); - // now mute.mName has the suffix trimmed off + LLMute mute(id, name); S32 last_selected = mBlockedList->getFirstSelectedIndex(); if (LLMuteList::getInstance()->remove(mute)) diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp index 021e1f5159..70a7bf644b 100644 --- a/indra/newview/llpanelclassified.cpp +++ b/indra/newview/llpanelclassified.cpp @@ -1893,7 +1893,7 @@ void LLPanelClassifiedEdit::resetControls() LLPanelClassifiedInfo::resetControls(); getChild<LLComboBox>("category")->setCurrentByIndex(0); - getChild<LLIconsComboBox>("content_type")->setCurrentByIndex(0); + getChild<LLComboBox>("content_type")->setCurrentByIndex(0); childSetValue("auto_renew", false); childSetValue("price_for_listing", MINIMUM_PRICE_FOR_LISTING); childSetEnabled("price_for_listing", TRUE); @@ -1928,7 +1928,7 @@ U32 LLPanelClassifiedEdit::getContentType() void LLPanelClassifiedEdit::setContentType(U32 content_type) { - LLIconsComboBox* ct_cb = getChild<LLIconsComboBox>("content_type"); + LLComboBox* ct_cb = getChild<LLComboBox>("content_type"); ct_cb->setCurrentByIndex(content_type); ct_cb->resetDirty(); } @@ -1988,7 +1988,7 @@ U8 LLPanelClassifiedEdit::getFlags() { bool auto_renew = childGetValue("auto_renew").asBoolean(); - LLComboBox* content_cb = getChild<LLIconsComboBox>("content_type"); + LLComboBox* content_cb = getChild<LLComboBox>("content_type"); bool mature = content_cb->getCurrentIndex() == CB_ITEM_MATURE; return pack_classified_flags_request(auto_renew, false, mature, false); diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 7505581904..c43cbf5819 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -609,7 +609,9 @@ void LLTaskInvFVBridge::performAction(LLFolderView* folder, LLInventoryModel* mo { if (price > 0 && price > gStatusBar->getBalance()) { - LLFloaterBuyCurrency::buyCurrency(LLTrans::getString("this_costs"), price); + LLStringUtil::format_map_t args; + args["AMOUNT"] = llformat("%d", price); + LLFloaterBuyCurrency::buyCurrency(LLTrans::getString("this_costs", args), price); } else { @@ -1188,7 +1190,8 @@ public: LLTaskObjectBridge( LLPanelObjectInventory* panel, const LLUUID& uuid, - const std::string& name); + const std::string& name, + U32 flags = 0); virtual LLUIImagePtr getIcon() const; }; @@ -1196,8 +1199,9 @@ public: LLTaskObjectBridge::LLTaskObjectBridge( LLPanelObjectInventory* panel, const LLUUID& uuid, - const std::string& name) : - LLTaskInvFVBridge(panel, uuid, name) + const std::string& name, + U32 flags) : + LLTaskInvFVBridge(panel, uuid, name, flags) { } @@ -1442,9 +1446,15 @@ LLTaskInvFVBridge* LLTaskInvFVBridge::createObjectBridge(LLPanelObjectInventory* // object->getName()); break; case LLAssetType::AT_OBJECT: + { + item = dynamic_cast<LLInventoryItem*>(object); + U32 flags = ( NULL == item ? 0 : item->getFlags() ); + new_bridge = new LLTaskObjectBridge(panel, object->getUUID(), - object->getName()); + object->getName(), + flags); + } break; case LLAssetType::AT_NOTECARD: new_bridge = new LLTaskNotecardBridge(panel, diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp index cdd79b1559..1a1650c38b 100644 --- a/indra/newview/llpanelplaceprofile.cpp +++ b/indra/newview/llpanelplaceprofile.cpp @@ -567,9 +567,13 @@ void LLPanelPlaceProfile::onForSaleBannerClick() if(parcel->getLocalID() == mSelectedParcelID && mLastSelectedRegionID ==selected_region->getRegionID()) { - if(parcel->getSalePrice() - gStatusBar->getBalance() > 0) + S32 price = parcel->getSalePrice(); + + if(price - gStatusBar->getBalance() > 0) { - LLFloaterBuyCurrency::buyCurrency(LLTrans::getString("buying_selected_land"), parcel->getSalePrice()); + LLStringUtil::format_map_t args; + args["AMOUNT"] = llformat("%d", price); + LLFloaterBuyCurrency::buyCurrency(LLTrans::getString("buying_selected_land", args), price); } else { diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 26b57c003b..f9ba6f625d 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -278,6 +278,11 @@ BOOL LLPanelPlaces::postBuild() mFilterEditor = getChild<LLFilterEditor>("Filter"); if (mFilterEditor) { + //when list item is being clicked the filter editor looses focus + //committing on focus lost leads to detaching list items + //BUT a detached list item cannot be made selected and must not be clicked onto + mFilterEditor->setCommitOnFocusLost(false); + mFilterEditor->setCommitCallback(boost::bind(&LLPanelPlaces::onFilterEdit, this, _2, false)); } diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index 717a8bda1e..6cf9c6b95d 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -37,7 +37,6 @@ #include "llagent.h" #include "llappviewer.h" #include "llimview.h" -#include "llmutelist.h" #include "llsdutil.h" #include "lluicolortable.h" #include "llviewerobjectlist.h" diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 5c40d02f8d..dc8185c770 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -3274,7 +3274,9 @@ void handle_buy_object(LLSaleInfo sale_info) if (price > 0 && price > gStatusBar->getBalance()) { - LLFloaterBuyCurrency::buyCurrency(LLTrans::getString("this_object_costs"), price); + LLStringUtil::format_map_t args; + args["AMOUNT"] = llformat("%d", price); + LLFloaterBuyCurrency::buyCurrency(LLTrans::getString("this_object_costs", args), price); return; } @@ -4404,8 +4406,10 @@ void handle_buy_or_take() } else { + LLStringUtil::format_map_t args; + args["AMOUNT"] = llformat("%d", total_price); LLFloaterBuyCurrency::buyCurrency( - "Buying this costs", total_price); + LLTrans::getString("BuyingCosts", args), total_price); } } else diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 00762894cd..dfde9a9d1d 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -811,10 +811,10 @@ void upload_done_callback(const LLUUID& uuid, void* user_data, S32 result, LLExt if(!(can_afford_transaction(expected_upload_cost))) { - LLFloaterBuyCurrency::buyCurrency( - llformat(LLTrans::getString("UploadingCosts").c_str(), - data->mAssetInfo.getName().c_str()), - expected_upload_cost); + LLStringUtil::format_map_t args; + args["NAME"] = data->mAssetInfo.getName(); + args["AMOUNT"] = llformat("%d", expected_upload_cost); + LLFloaterBuyCurrency::buyCurrency(LLTrans::getString("UploadingCosts", args), expected_upload_cost); is_balance_sufficient = FALSE; } else if(region) @@ -1001,7 +1001,9 @@ void upload_new_resource(const LLTransactionID &tid, LLAssetType::EType asset_ty if (balance < expected_upload_cost) { // insufficient funds, bail on this upload - LLFloaterBuyCurrency::buyCurrency(LLTrans::getString("uploading_costs"), expected_upload_cost); + LLStringUtil::format_map_t args; + args["AMOUNT"] = llformat("%d", expected_upload_cost); + LLFloaterBuyCurrency::buyCurrency(LLTrans::getString("uploading_costs", args), expected_upload_cost); return; } } diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index bd0012057c..210557f68f 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -272,7 +272,9 @@ void give_money(const LLUUID& uuid, LLViewerRegion* region, S32 amount, BOOL is_ } else { - LLFloaterBuyCurrency::buyCurrency(LLTrans::getString("giving"), amount); + LLStringUtil::format_map_t args; + args["AMOUNT"] = llformat("%d", amount); + LLFloaterBuyCurrency::buyCurrency(LLTrans::getString("giving", args), amount); } } diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index ea8af223c3..c9b3886fef 100644 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -524,7 +524,10 @@ LLUIImagePtr LLEmbeddedItems::getItemImage(llwchar ext_char) const break; case LLAssetType::AT_SOUND: img_name = "Inv_Sound"; break; case LLAssetType::AT_CLOTHING: img_name = "Inv_Clothing"; break; - case LLAssetType::AT_OBJECT: img_name = "Inv_Object"; break; + case LLAssetType::AT_OBJECT: + img_name = LLInventoryItem::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS & item->getFlags() ? + "Inv_Object_Multi" : "Inv_Object"; + break; case LLAssetType::AT_CALLINGCARD: img_name = "Inv_CallingCard"; break; case LLAssetType::AT_LANDMARK: img_name = "Inv_Landmark"; break; case LLAssetType::AT_NOTECARD: img_name = "Inv_Notecard"; break; diff --git a/indra/newview/skins/default/textures/icons/Inv_Object_Multi.png b/indra/newview/skins/default/textures/icons/Inv_Object_Multi.png Binary files differnew file mode 100644 index 0000000000..11f4871ad8 --- /dev/null +++ b/indra/newview/skins/default/textures/icons/Inv_Object_Multi.png diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index b1594816b2..a3e5361e76 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -247,6 +247,7 @@ with the same filename but different name <texture name="Inv_Landmark" file_name="icons/Inv_Landmark.png" preload="false" /> <texture name="Inv_Notecard" file_name="icons/Inv_Notecard.png" preload="false" /> <texture name="Inv_Object" file_name="icons/Inv_Object.png" preload="false" /> + <texture name="Inv_Object_Multi" file_name="icons/Inv_Object_Multi.png" preload="false" /> <texture name="Inv_Pants" file_name="icons/Inv_Pants.png" preload="false" /> <texture name="Inv_Script" file_name="icons/Inv_Script.png" preload="false" /> <texture name="Inv_Shirt" file_name="icons/Inv_Shirt.png" preload="false" /> diff --git a/indra/newview/skins/default/xui/en/floater_buy_currency.xml b/indra/newview/skins/default/xui/en/floater_buy_currency.xml index 961bd6b5e4..e02d32596a 100644 --- a/indra/newview/skins/default/xui/en/floater_buy_currency.xml +++ b/indra/newview/skins/default/xui/en/floater_buy_currency.xml @@ -182,7 +182,7 @@ width="180" layout="topleft" name="buy_action"> - [NAME] L$ [PRICE] + [ACTION] </text> <text type="string" diff --git a/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml b/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml index 072ea882e6..d3f6695375 100644 --- a/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml +++ b/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml @@ -39,7 +39,13 @@ name="blocked" tool_tip="List of currently blocked Residents" top="30" - width="270" /> + width="270"> + <scroll_list.columns + name="item_name" /> + <scroll_list.columns + name="item_type" + width="96" /> + </scroll_list> <button follows="left|bottom" height="23" diff --git a/indra/newview/skins/default/xui/en/panel_profile.xml b/indra/newview/skins/default/xui/en/panel_profile.xml index 412485e03f..9fcabc7722 100644 --- a/indra/newview/skins/default/xui/en/panel_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_profile.xml @@ -311,12 +311,15 @@ height="23" label="Add Friend" layout="topleft" - left="2" + left="1" mouse_opaque="false" name="add_friend" + pad_left="1" + pad_right="1" tool_tip="Offer friendship to the Resident" top="5" - width="80" /> + use_ellipses="true" + width="105" /> <button follows="bottom|left" height="23" @@ -325,8 +328,8 @@ name="im" tool_tip="Open instant message session" top="5" - left_pad="3" - width="39" /> + left_pad="0" + width="19" /> <button follows="bottom|left" height="23" @@ -334,9 +337,12 @@ layout="topleft" name="call" tool_tip="Call this Resident" - left_pad="3" + left_pad="0" + pad_left="1" + pad_right="1" top="5" - width="43" /> + use_ellipses="true" + width="48" /> <button enabled="false" follows="bottom|left" @@ -344,10 +350,13 @@ label="Map" layout="topleft" name="show_on_map_btn" + pad_left="1" + pad_right="1" tool_tip="Show the Resident on the map" top="5" - left_pad="3" - width="41" /> + left_pad="0" + use_ellipses="true" + width="33" /> <button follows="bottom|left" height="23" @@ -355,9 +364,12 @@ layout="topleft" name="teleport" tool_tip="Offer teleport" - left_pad="3" + left_pad="0" + pad_left="1" + pad_right="1" top="5" - width="69" /> + use_ellipses="true" + width="81" /> <button follows="bottom|right" height="23" @@ -367,7 +379,6 @@ tool_tip="Pay money to or share inventory with the Resident" right="-1" top="5" - left_pad="3" width="23" /> </layout_panel> <layout_panel diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 3a766bb798..47386bd332 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2202,7 +2202,8 @@ Clears (deletes) the media and all params from the given face. <!-- Viewer menu --> <string name="AcquiredItems">Acquired Items</string> <string name="Cancel">Cancel</string> - <string name="UploadingCosts">Uploading %s costs</string> + <string name="UploadingCosts">Uploading [NAME] costs L$ [AMOUNT]</string> + <string name="BuyingCosts">Buying this costs L$ [AMOUNT]</string> <string name="UnknownFileExtension"> Unknown file extension .%s Expected .wav, .tga, .bmp, .jpg, .jpeg, or .bvh @@ -3050,14 +3051,48 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <!-- Financial operations strings --> <string name="paid_you_ldollars">[NAME] paid you L$[AMOUNT]</string> - <string name="giving">Giving</string> - <string name="uploading_costs">Uploading costs</string> - <string name="this_costs">This costs</string> - <string name="buying_selected_land">Buying selected land</string> - <string name="this_object_costs">This object costs"</string> + <string name="you_paid_ldollars">You paid [NAME] L$[AMOUNT] [REASON].</string> + <string name="you_paid_ldollars_no_reason">You paid [NAME] L$[AMOUNT].</string> + <string name="you_paid_ldollars_no_name">You paid L$[AMOUNT] [REASON].</string> + <string name="for a parcel of land">for a parcel of land</string> + <string name="for a land access pass">for a land access pass</string> + <string name="for deeding land">for deeding land</string> + <string name="to create a group">to create a group</string> + <string name="to join a group">to join a group</string> + <string name="to upload">to upload</string> + + <string name="giving">Giving L$ [AMOUNT]</string> + <string name="uploading_costs">Uploading costs L$ [AMOUNT]</string> + <string name="this_costs">This costs L$ [AMOUNT]</string> + <string name="buying_selected_land">Buying selected land L$ [AMOUNT]</string> + <string name="this_object_costs">This object costs L$ [AMOUNT]</string> <string name="group_role_everyone">Everyone</string> <string name="group_role_officers">Officers</string> <string name="group_role_owners">Owners</string> + <string name="uploading_abuse_report">Uploading... + +Abuse Report</string> + + <!-- names for new inventory items--> + <string name="New Shape">New Shape</string> + <string name="New Skin">New Skin</string> + <string name="New Hair">New Hair</string> + <string name="New Eyes">New Eyes</string> + <string name="New Shirt">New Shirt</string> + <string name="New Pants">New Pants</string> + <string name="New Shoes">New Shoes</string> + <string name="New Socks">New Socks</string> + <string name="New Jacket">New Jacket</string> + <string name="New Gloves">New Gloves</string> + <string name="New Undershirt">New Undershirt</string> + <string name="New Underpants">New Underpants</string> + <string name="New Skirt">New Skirt</string> + <string name="New Alpha">New Alpha</string> + <string name="New Tattoo">New Tattoo</string> + <string name="Invalid Wearable">Invalid Wearable</string> + <string name="New Script">New Script</string> + <string name="New Folder">New Folder</string> + <string name="Contents">Contents</string> </strings> |