From 2bb03e5edb5572de1ea31c66f439c8cde9cd2197 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Tue, 30 Mar 2010 16:30:31 -0700 Subject: EXT-6525 - drag threshold is very low for navbar favorites reviewed by Leyla --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/lltooldraganddrop.cpp | 9 ++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 73fb24e4eb..e62c4fbfc1 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -2564,6 +2564,17 @@ Value 0.10000000149 + DragAndDropDistanceThreshold + + Comment + Number of pixels that mouse should move before triggering drag and drop mode + Persist + 1 + Type + S32 + Value + 3 + DropShadowButton Comment diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 394f550f2e..f37efd778f 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -412,9 +412,12 @@ void LLToolDragAndDrop::setDragStart(S32 x, S32 y) BOOL LLToolDragAndDrop::isOverThreshold(S32 x,S32 y) { - const S32 MIN_MANHATTAN_DIST = 3; - S32 manhattan_dist = llabs( x - mDragStartX ) + llabs( y - mDragStartY ); - return manhattan_dist >= MIN_MANHATTAN_DIST; + static LLCachedControl drag_and_drop_threshold(gSavedSettings,"DragAndDropDistanceThreshold"); + + S32 mouse_delta_x = x - mDragStartX; + S32 mouse_delta_y = y - mDragStartY; + + return (mouse_delta_x * mouse_delta_x) + (mouse_delta_y * mouse_delta_y) > drag_and_drop_threshold * drag_and_drop_threshold; } void LLToolDragAndDrop::beginDrag(EDragAndDropType type, -- cgit v1.2.3 From 7b4046df83e4353bdade8fbc39387a7bbb3f498d Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Thu, 1 Apr 2010 11:47:21 -0700 Subject: EXT-3531 - Ctrl-P does not work reliably on login --- indra/newview/lllocationinputctrl.cpp | 1 - indra/newview/lltoastalertpanel.cpp | 3 - indra/newview/llurllineeditorctrl.cpp | 7 +- indra/newview/llurllineeditorctrl.h | 2 - indra/newview/llviewercontrol.cpp | 8 +++ indra/newview/llviewermenu.cpp | 7 +- indra/newview/llviewermenu.h | 1 + indra/newview/llviewerwindow.cpp | 129 ++++++++++------------------------ 8 files changed, 49 insertions(+), 109 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index ba50287ebd..ad2e594b49 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -227,7 +227,6 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p) params.default_text(LLStringUtil::null); params.max_length_bytes(p.max_chars); params.keystroke_callback(boost::bind(&LLComboBox::onTextEntry, this, _1)); - params.handle_edit_keys_directly(true); params.commit_on_focus_lost(false); params.follows.flags(FOLLOWS_ALL); mTextEntry = LLUICtrlFactory::create(params); diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp index c3ccb9380b..986ccdf19b 100644 --- a/indra/newview/lltoastalertpanel.cpp +++ b/indra/newview/lltoastalertpanel.cpp @@ -281,9 +281,6 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal mLineEditor->setText(edit_text_contents); mLineEditor->setMaxTextLength(STD_STRING_STR_LEN - 1); - // make sure all edit keys get handled properly (DEV-22396) - mLineEditor->setHandleEditKeysDirectly(TRUE); - LLToastPanel::addChild(mLineEditor); mLineEditor->setDrawAsterixes(is_password); diff --git a/indra/newview/llurllineeditorctrl.cpp b/indra/newview/llurllineeditorctrl.cpp index 258c3ddd75..1d2687a8c2 100644 --- a/indra/newview/llurllineeditorctrl.cpp +++ b/indra/newview/llurllineeditorctrl.cpp @@ -72,7 +72,7 @@ void LLURLLineEditor::cut() if( need_to_rollback ) { rollback.doRollback( this ); - reportBadKeystroke(); + LLUI::reportBadKeystroke(); } else if( mKeystrokeCallback ) @@ -96,8 +96,3 @@ void LLURLLineEditor::copyEscapedURLToClipboard() gClipboard.copyFromString( text_to_copy ); } -// Makes UISndBadKeystroke sound -void LLURLLineEditor::reportBadKeystroke() -{ - make_ui_sound("UISndBadKeystroke"); -} diff --git a/indra/newview/llurllineeditorctrl.h b/indra/newview/llurllineeditorctrl.h index 618f29dfbf..ebe417e855 100644 --- a/indra/newview/llurllineeditorctrl.h +++ b/indra/newview/llurllineeditorctrl.h @@ -55,8 +55,6 @@ protected: private: // util function to escape selected text and copy it to clipboard void copyEscapedURLToClipboard(); - // send a beep signal if keystroke is bad. As it is private at LLLineEditor we need own function - void reportBadKeystroke(); // Helper class to do rollback if needed class LLURLLineEditorRollback diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 23349ab916..b2b7e653e4 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -74,6 +74,7 @@ #include "llnavigationbar.h" #include "llfloatertools.h" #include "llpaneloutfitsinventory.h" +#include "llpanellogin.h" #ifdef TOGGLE_HACKED_GODLIKE_VIEWER BOOL gHackGodmode = FALSE; @@ -443,6 +444,12 @@ bool handleVelocityInterpolate(const LLSD& newvalue) return true; } +bool handleForceShowGrid(const LLSD& newvalue) +{ + LLPanelLogin::refreshLocation( false ); + return true; +} + bool toggle_agent_pause(const LLSD& newvalue) { if ( newvalue.asBoolean() ) @@ -648,6 +655,7 @@ void settings_setup_listeners() gSavedSettings.getControl("ShowNavbarFavoritesPanel")->getSignal()->connect(boost::bind(&toggle_show_favorites_panel, _2)); gSavedSettings.getControl("ShowDebugAppearanceEditor")->getSignal()->connect(boost::bind(&toggle_show_appearance_editor, _2)); gSavedSettings.getControl("ShowObjectRenderingCost")->getSignal()->connect(boost::bind(&toggle_show_object_render_cost, _2)); + gSavedSettings.getControl("ForceShowGrid")->getSignal()->connect(boost::bind(&handleForceShowGrid, _2)); } #if TEST_CACHED_CONTROL diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 3a6aed01ce..eae60b4d85 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -136,6 +136,7 @@ extern BOOL gDebugWindowProc; LLMenuBarGL *gMenuBarView = NULL; LLViewerMenuHolderGL *gMenuHolder = NULL; LLMenuGL *gPopupMenuView = NULL; +LLMenuGL *gEditMenu = NULL; LLMenuBarGL *gLoginMenuBarView = NULL; // Pie menus @@ -383,8 +384,10 @@ void init_menus() /// /// Context menus /// + const widget_registry_t& registry = LLViewerMenuHolderGL::child_registry_t::instance(); + gEditMenu = LLUICtrlFactory::createFromFile("menu_edit.xml", gMenuHolder, registry); gMenuAvatarSelf = LLUICtrlFactory::createFromFile( "menu_avatar_self.xml", gMenuHolder, registry); gMenuAvatarOther = LLUICtrlFactory::createFromFile( @@ -5182,10 +5185,6 @@ void toggle_debug_menus(void*) { BOOL visible = ! gSavedSettings.getBOOL("UseDebugMenus"); gSavedSettings.setBOOL("UseDebugMenus", visible); - if(visible) - { - //LLFirstUse::useDebugMenus(); - } show_debug_menus(); } diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h index d3c34f0de4..d72ea00077 100644 --- a/indra/newview/llviewermenu.h +++ b/indra/newview/llviewermenu.h @@ -157,6 +157,7 @@ extern const std::string SAVE_INTO_INVENTORY; extern LLMenuBarGL* gMenuBarView; //extern LLView* gMenuBarHolder; +extern LLMenuGL* gEditMenu; extern LLMenuGL* gPopupMenuView; extern LLViewerMenuHolderGL* gMenuHolder; extern LLMenuBarGL* gLoginMenuBarView; diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 85c961f34a..6fb1a054ed 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2145,12 +2145,14 @@ void LLViewerWindow::draw() // Takes a single keydown event, usually when UI is visible BOOL LLViewerWindow::handleKey(KEY key, MASK mask) { + // hide tooltips on keypress + LLToolTipMgr::instance().blockToolTips(); + if (gFocusMgr.getKeyboardFocus() && !(mask & (MASK_CONTROL | MASK_ALT)) && !gFocusMgr.getKeystrokesOnly()) { // We have keyboard focus, and it's not an accelerator - if (key < 0x80) { // Not a special key, so likely (we hope) to generate a character. Let it fall through to character handler first. @@ -2158,68 +2160,49 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) } } - // hide tooltips on keypress - LLToolTipMgr::instance().blockToolTips(); - - // Explicit hack for debug menu. - if ((MASK_ALT & mask) && - (MASK_CONTROL & mask) && - ('D' == key || 'd' == key)) + // let menus handle navigation keys for navigation + if ((gMenuBarView && gMenuBarView->handleKey(key, mask, TRUE)) + ||(gLoginMenuBarView && gLoginMenuBarView->handleKey(key, mask, TRUE)) + ||(gMenuHolder && gMenuHolder->handleKey(key, mask, TRUE))) { - toggle_debug_menus(NULL); + return TRUE; } - // Explicit hack for debug menu. - if ((mask == (MASK_SHIFT | MASK_CONTROL)) && - ('G' == key || 'g' == key)) + // give menus a chance to handle modified (Ctrl, Alt) shortcut keys before current focus + // as long as focus isn't locked + if (mask & (MASK_CONTROL | MASK_ALT) && !gFocusMgr.focusLocked()) { - if (LLStartUp::getStartupState() < STATE_LOGIN_CLEANUP) //on splash page + if ((gMenuBarView && gMenuBarView->handleAcceleratorKey(key, mask)) + ||(gLoginMenuBarView && gLoginMenuBarView->handleAcceleratorKey(key, mask))) { - BOOL visible = ! gSavedSettings.getBOOL("ForceShowGrid"); - gSavedSettings.setBOOL("ForceShowGrid", visible); - - // Initialize visibility (and don't force visibility - use prefs) - LLPanelLogin::refreshLocation( false ); + return TRUE; } } - // Debugging view for unified notifications: CTRL-SHIFT-5 - // *FIXME: Having this special-cased right here (just so this can be invoked from the login screen) sucks. - if ((MASK_SHIFT & mask) - && (!(MASK_ALT & mask)) - && (MASK_CONTROL & mask) - && ('5' == key)) + // give floaters first chance to handle TAB key + // so frontmost floater gets focus + // if nothing has focus, go to first or last UI element as appropriate + if (key == KEY_TAB && (mask & MASK_CONTROL || gFocusMgr.getKeyboardFocus() == NULL)) { - //LLFloaterNotificationConsole::showInstance(); - LLFloaterReg::showInstance("notifications_console"); - return TRUE; - } + if (gMenuHolder) gMenuHolder->hideMenus(); - // handle escape key - //if (key == KEY_ESCAPE && mask == MASK_NONE) - //{ + // if CTRL-tabbing (and not just TAB with no focus), go into window cycle mode + gFloaterView->setCycleMode((mask & MASK_CONTROL) != 0); - // *TODO: get this to play well with mouselook and hidden - // cursor modes, etc, and re-enable. - //if (gFocusMgr.getMouseCapture()) - //{ - // gFocusMgr.setMouseCapture(NULL); - // return TRUE; - //} - //} - - // let menus handle navigation keys - if (gMenuBarView && gMenuBarView->handleKey(key, mask, TRUE)) - { - return TRUE; - } - // let menus handle navigation keys - if (gLoginMenuBarView && gLoginMenuBarView->handleKey(key, mask, TRUE)) - { + // do CTRL-TAB and CTRL-SHIFT-TAB logic + if (mask & MASK_SHIFT) + { + mRootView->focusPrevRoot(); + } + else + { + mRootView->focusNextRoot(); + } return TRUE; } - //some of context menus use this container, let context menu handle navigation keys - if(gMenuHolder && gMenuHolder->handleKey(key, mask, TRUE)) + + // hidden edit menu for cut/copy/paste + if (gEditMenu && gEditMenu->handleAcceleratorKey(key, mask)) { return TRUE; } @@ -2284,50 +2267,10 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) return TRUE; } - // Topmost view gets a chance before the hierarchy - // *FIX: get rid of this? - //LLUICtrl* top_ctrl = gFocusMgr.getTopCtrl(); - //if (top_ctrl) - //{ - // if( top_ctrl->handleKey( key, mask, TRUE ) ) - // { - // return TRUE; - // } - //} - - // give floaters first chance to handle TAB key - // so frontmost floater gets focus - if (key == KEY_TAB) - { - // if nothing has focus, go to first or last UI element as appropriate - if (mask & MASK_CONTROL || gFocusMgr.getKeyboardFocus() == NULL) - { - if (gMenuHolder) gMenuHolder->hideMenus(); - - // if CTRL-tabbing (and not just TAB with no focus), go into window cycle mode - gFloaterView->setCycleMode((mask & MASK_CONTROL) != 0); - // do CTRL-TAB and CTRL-SHIFT-TAB logic - if (mask & MASK_SHIFT) - { - mRootView->focusPrevRoot(); - } - else - { - mRootView->focusNextRoot(); - } - return TRUE; - } - } - - // give menus a chance to handle keys - if (gMenuBarView && gMenuBarView->handleAcceleratorKey(key, mask)) - { - return TRUE; - } - - // give menus a chance to handle keys - if (gLoginMenuBarView && gLoginMenuBarView->handleAcceleratorKey(key, mask)) + // give menus a chance to handle unmodified accelerator keys + if ((gMenuBarView && gMenuBarView->handleAcceleratorKey(key, mask)) + ||(gLoginMenuBarView && gLoginMenuBarView->handleAcceleratorKey(key, mask))) { return TRUE; } -- cgit v1.2.3 From bb4c1384ac4113775cf69e2de521ad150733fa67 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Thu, 1 Apr 2010 12:05:17 -0700 Subject: EXT-3531 - Ctrl-P does not work reliably on login forgot menu_edit.xml --- indra/newview/skins/default/xui/en/menu_edit.xml | 89 ++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 indra/newview/skins/default/xui/en/menu_edit.xml (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/menu_edit.xml b/indra/newview/skins/default/xui/en/menu_edit.xml new file mode 100644 index 0000000000..68f3cb532c --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_edit.xml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file -- cgit v1.2.3 From e254aa6dc6dcd3ba7369de5231dec16a570701a8 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Thu, 1 Apr 2010 12:06:16 -0700 Subject: EXT-3531 - Ctrl-P does not work reliably on login deprecated handle_edit_keys_directly and moved edit menu out of menu_viewer and menu_login --- .../skins/default/xui/en/alert_line_editor.xml | 1 - .../skins/default/xui/en/floater_about_land.xml | 1 - .../skins/default/xui/en/floater_buy_land.xml | 1 - .../default/xui/en/floater_outfit_save_as.xml | 1 - .../default/xui/en/floater_preview_notecard.xml | 1 - .../skins/default/xui/en/floater_ui_preview.xml | 3 - .../default/xui/en/floater_wearable_save_as.xml | 1 - indra/newview/skins/default/xui/en/menu_login.xml | 135 ++--- indra/newview/skins/default/xui/en/menu_viewer.xml | 582 ++------------------- indra/newview/skins/default/xui/en/panel_login.xml | 3 - .../skins/default/xui/en/panel_place_profile.xml | 1 - .../default/xui/en/panel_preferences_setup.xml | 1 - .../skins/default/xui/en/panel_region_covenant.xml | 1 - .../skins/default/xui/en/panel_script_ed.xml | 1 - .../skins/default/xui/en/widgets/line_editor.xml | 1 - 15 files changed, 87 insertions(+), 647 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/alert_line_editor.xml b/indra/newview/skins/default/xui/en/alert_line_editor.xml index 97991153d8..82bf5fc8da 100644 --- a/indra/newview/skins/default/xui/en/alert_line_editor.xml +++ b/indra/newview/skins/default/xui/en/alert_line_editor.xml @@ -1,7 +1,6 @@ length="1" enabled="false" follows="all" - handle_edit_keys_directly="true" height="200" layout="topleft" left="10" diff --git a/indra/newview/skins/default/xui/en/floater_buy_land.xml b/indra/newview/skins/default/xui/en/floater_buy_land.xml index 125b080519..df44b61632 100644 --- a/indra/newview/skins/default/xui/en/floater_buy_land.xml +++ b/indra/newview/skins/default/xui/en/floater_buy_land.xml @@ -356,7 +356,6 @@ supports [AMOUNT2] objects length="1" enabled="false" follows="top|right" - handle_edit_keys_directly="false" height="237" layout="topleft" left="444" diff --git a/indra/newview/skins/default/xui/en/floater_outfit_save_as.xml b/indra/newview/skins/default/xui/en/floater_outfit_save_as.xml index a2938e8574..1d73d516d0 100644 --- a/indra/newview/skins/default/xui/en/floater_outfit_save_as.xml +++ b/indra/newview/skins/default/xui/en/floater_outfit_save_as.xml @@ -45,7 +45,6 @@ as a new Outfit: border_style="line" border_thickness="1" follows="left|top" - handle_edit_keys_directly="true" height="23" layout="topleft" left_delta="0" diff --git a/indra/newview/skins/default/xui/en/floater_preview_notecard.xml b/indra/newview/skins/default/xui/en/floater_preview_notecard.xml index e9099211a3..14c0081c0d 100644 --- a/indra/newview/skins/default/xui/en/floater_preview_notecard.xml +++ b/indra/newview/skins/default/xui/en/floater_preview_notecard.xml @@ -72,7 +72,6 @@ max_length="65536" name="Notecard Editor" allow_html="false" - handle_edit_keys_directly="true" tab_group="1" top="46" width="392" diff --git a/indra/newview/skins/default/xui/en/floater_ui_preview.xml b/indra/newview/skins/default/xui/en/floater_ui_preview.xml index 3a981adfdf..3b10a57c50 100644 --- a/indra/newview/skins/default/xui/en/floater_ui_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_ui_preview.xml @@ -238,7 +238,6 @@ border_thickness="1" follows="left|bottom" font="SansSerif" - handle_edit_keys_directly="true" height="20" layout="topleft" left_delta="100" @@ -278,7 +277,6 @@ border_thickness="1" follows="left|bottom" font="SansSerif" - handle_edit_keys_directly="true" height="20" layout="topleft" left_delta="100" @@ -320,7 +318,6 @@ border_thickness="1" follows="left|bottom" font="SansSerif" - handle_edit_keys_directly="true" height="20" layout="topleft" left_delta="65" diff --git a/indra/newview/skins/default/xui/en/floater_wearable_save_as.xml b/indra/newview/skins/default/xui/en/floater_wearable_save_as.xml index b4b57f2dbc..71812bd1a6 100644 --- a/indra/newview/skins/default/xui/en/floater_wearable_save_as.xml +++ b/indra/newview/skins/default/xui/en/floater_wearable_save_as.xml @@ -44,7 +44,6 @@ border_style="line" border_thickness="1" follows="left|top" - handle_edit_keys_directly="true" height="23" layout="topleft" left_delta="0" diff --git a/indra/newview/skins/default/xui/en/menu_login.xml b/indra/newview/skins/default/xui/en/menu_login.xml index ba74104594..4655fa8c46 100644 --- a/indra/newview/skins/default/xui/en/menu_login.xml +++ b/indra/newview/skins/default/xui/en/menu_login.xml @@ -29,14 +29,6 @@ function="File.Quit" /> - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -270,5 +181,27 @@ function="Advanced.WebBrowserTest" parameter="http://join.secondlife.com/"/> + + + + + + + + diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index a08bc16066..43f594ca5a 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -2,16 +2,13 @@ - + @@ -56,7 +48,6 @@ - + @@ -115,7 +100,6 @@ @@ -124,18 +108,15 @@ - + - + @@ -188,7 +163,6 @@ @@ -228,7 +199,6 @@ @@ -247,12 +216,10 @@ - + @@ -280,7 +244,6 @@ @@ -324,7 +283,6 @@ @@ -374,11 +330,9 @@ control="NavBarShowParcelProperties" /> - + @@ -397,7 +350,6 @@ - + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -687,11 +514,9 @@ - + - + @@ -732,7 +553,6 @@ @@ -743,7 +563,6 @@ @@ -752,7 +571,6 @@ @@ -761,7 +579,6 @@ @@ -772,12 +589,10 @@ - + - + @@ -867,7 +672,6 @@ @@ -877,18 +681,15 @@ - + @@ -897,7 +698,6 @@ @@ -906,7 +706,6 @@ @@ -914,11 +713,9 @@ function="ToggleControl" parameter="ShowSelectionBeam" /> - + - - + - + + + + + @@ -1101,7 +889,6 @@ - + - + - --> + @@ -1297,9 +1063,8 @@ - @@ -1850,11 +1557,9 @@ function="View.Fullscreen" /> - + + @@ -1901,7 +1603,6 @@ @@ -1914,7 +1615,6 @@ @@ -1960,7 +1657,6 @@ @@ -1971,11 +1667,9 @@ function="Advanced.ToggleConsole" parameter="memory view" /> - + - + - + - + - + - + - + @@ -2755,12 +2381,10 @@ @@ -2799,14 +2420,12 @@ @@ -2874,7 +2487,6 @@ @@ -2969,18 +2572,15 @@ @@ -3058,28 +2651,24 @@ - + - + @@ -3331,7 +2893,6 @@ @@ -3340,7 +2901,6 @@ @@ -3386,7 +2942,6 @@ @@ -3407,12 +2961,10 @@ @@ -3421,7 +2973,6 @@ @@ -3431,7 +2982,6 @@ - + There is no Covenant provided for this Estate. diff --git a/indra/newview/skins/default/xui/en/panel_script_ed.xml b/indra/newview/skins/default/xui/en/panel_script_ed.xml index d444420550..c5c66c04d5 100644 --- a/indra/newview/skins/default/xui/en/panel_script_ed.xml +++ b/indra/newview/skins/default/xui/en/panel_script_ed.xml @@ -143,7 +143,6 @@ name="Script Editor" width="487" show_line_numbers="true" - handle_edit_keys_directly="true" word_wrap="true"> Loading... diff --git a/indra/newview/skins/default/xui/en/widgets/line_editor.xml b/indra/newview/skins/default/xui/en/widgets/line_editor.xml index a21e3f2645..a054960bf8 100644 --- a/indra/newview/skins/default/xui/en/widgets/line_editor.xml +++ b/indra/newview/skins/default/xui/en/widgets/line_editor.xml @@ -3,7 +3,6 @@ background_image_disabled="TextField_Disabled" background_image_focused="TextField_Active" select_on_focus="false" - handle_edit_keys_directly="false" commit_on_focus_lost="true" ignore_tab="true" cursor_color="TextCursorColor" -- cgit v1.2.3 From 656a533fac6c039ae7b38a6d33f7a28bc763d053 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Thu, 1 Apr 2010 12:41:41 -0700 Subject: EXT-6431 - Avatar head doesn't correctly follow mouse when side panel is open --- indra/newview/llagentcamera.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index bb06255fd1..66f9e1117b 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -1122,9 +1122,9 @@ void LLAgentCamera::updateLookAt(const S32 mouse_x, const S32 mouse_y) { // range from -.5 to .5 F32 x_from_center = - ((F32) mouse_x / (F32) gViewerWindow->getWindowWidthScaled() ) - 0.5f; + ((F32) mouse_x / (F32) gViewerWindow->getWorldViewWidthScaled() ) - 0.5f; F32 y_from_center = - ((F32) mouse_y / (F32) gViewerWindow->getWindowHeightScaled() ) - 0.5f; + ((F32) mouse_y / (F32) gViewerWindow->getWorldViewHeightScaled() ) - 0.5f; frameCamera.yaw( - x_from_center * gSavedSettings.getF32("YawFromMousePosition") * DEG_TO_RAD); frameCamera.pitch( - y_from_center * gSavedSettings.getF32("PitchFromMousePosition") * DEG_TO_RAD); -- cgit v1.2.3 From df45c16169bd2be38c53fd39fd87aa7b00bb64c2 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Thu, 1 Apr 2010 12:49:23 -0700 Subject: removed unused textures reviewed by Erica --- .../default/textures/icons/Generic_Group_Large.png | Bin 2282 -> 0 bytes .../skins/default/textures/icons/Progress_1.png | Bin 464 -> 0 bytes .../skins/default/textures/icons/Progress_10.png | Bin 461 -> 0 bytes .../skins/default/textures/icons/Progress_11.png | Bin 471 -> 0 bytes .../skins/default/textures/icons/Progress_12.png | Bin 457 -> 0 bytes .../skins/default/textures/icons/Progress_2.png | Bin 461 -> 0 bytes .../skins/default/textures/icons/Progress_3.png | Bin 487 -> 0 bytes .../skins/default/textures/icons/Progress_4.png | Bin 466 -> 0 bytes .../skins/default/textures/icons/Progress_5.png | Bin 477 -> 0 bytes .../skins/default/textures/icons/Progress_6.png | Bin 460 -> 0 bytes .../skins/default/textures/icons/Progress_7.png | Bin 483 -> 0 bytes .../skins/default/textures/icons/Progress_8.png | Bin 467 -> 0 bytes .../skins/default/textures/icons/Progress_9.png | Bin 483 -> 0 bytes indra/newview/skins/default/textures/textures.xml | 183 +-------------------- 14 files changed, 1 insertion(+), 182 deletions(-) delete mode 100644 indra/newview/skins/default/textures/icons/Generic_Group_Large.png delete mode 100644 indra/newview/skins/default/textures/icons/Progress_1.png delete mode 100644 indra/newview/skins/default/textures/icons/Progress_10.png delete mode 100644 indra/newview/skins/default/textures/icons/Progress_11.png delete mode 100644 indra/newview/skins/default/textures/icons/Progress_12.png delete mode 100644 indra/newview/skins/default/textures/icons/Progress_2.png delete mode 100644 indra/newview/skins/default/textures/icons/Progress_3.png delete mode 100644 indra/newview/skins/default/textures/icons/Progress_4.png delete mode 100644 indra/newview/skins/default/textures/icons/Progress_5.png delete mode 100644 indra/newview/skins/default/textures/icons/Progress_6.png delete mode 100644 indra/newview/skins/default/textures/icons/Progress_7.png delete mode 100644 indra/newview/skins/default/textures/icons/Progress_8.png delete mode 100644 indra/newview/skins/default/textures/icons/Progress_9.png (limited to 'indra/newview') diff --git a/indra/newview/skins/default/textures/icons/Generic_Group_Large.png b/indra/newview/skins/default/textures/icons/Generic_Group_Large.png deleted file mode 100644 index 4d4f1e1bee..0000000000 Binary files a/indra/newview/skins/default/textures/icons/Generic_Group_Large.png and /dev/null differ diff --git a/indra/newview/skins/default/textures/icons/Progress_1.png b/indra/newview/skins/default/textures/icons/Progress_1.png deleted file mode 100644 index 58b56003c4..0000000000 Binary files a/indra/newview/skins/default/textures/icons/Progress_1.png and /dev/null differ diff --git a/indra/newview/skins/default/textures/icons/Progress_10.png b/indra/newview/skins/default/textures/icons/Progress_10.png deleted file mode 100644 index 07fe0be8a3..0000000000 Binary files a/indra/newview/skins/default/textures/icons/Progress_10.png and /dev/null differ diff --git a/indra/newview/skins/default/textures/icons/Progress_11.png b/indra/newview/skins/default/textures/icons/Progress_11.png deleted file mode 100644 index 215d68cc46..0000000000 Binary files a/indra/newview/skins/default/textures/icons/Progress_11.png and /dev/null differ diff --git a/indra/newview/skins/default/textures/icons/Progress_12.png b/indra/newview/skins/default/textures/icons/Progress_12.png deleted file mode 100644 index d755588621..0000000000 Binary files a/indra/newview/skins/default/textures/icons/Progress_12.png and /dev/null differ diff --git a/indra/newview/skins/default/textures/icons/Progress_2.png b/indra/newview/skins/default/textures/icons/Progress_2.png deleted file mode 100644 index 6640ee227b..0000000000 Binary files a/indra/newview/skins/default/textures/icons/Progress_2.png and /dev/null differ diff --git a/indra/newview/skins/default/textures/icons/Progress_3.png b/indra/newview/skins/default/textures/icons/Progress_3.png deleted file mode 100644 index 5decbe977e..0000000000 Binary files a/indra/newview/skins/default/textures/icons/Progress_3.png and /dev/null differ diff --git a/indra/newview/skins/default/textures/icons/Progress_4.png b/indra/newview/skins/default/textures/icons/Progress_4.png deleted file mode 100644 index 56e81c17aa..0000000000 Binary files a/indra/newview/skins/default/textures/icons/Progress_4.png and /dev/null differ diff --git a/indra/newview/skins/default/textures/icons/Progress_5.png b/indra/newview/skins/default/textures/icons/Progress_5.png deleted file mode 100644 index a89bf2ac62..0000000000 Binary files a/indra/newview/skins/default/textures/icons/Progress_5.png and /dev/null differ diff --git a/indra/newview/skins/default/textures/icons/Progress_6.png b/indra/newview/skins/default/textures/icons/Progress_6.png deleted file mode 100644 index 233c479540..0000000000 Binary files a/indra/newview/skins/default/textures/icons/Progress_6.png and /dev/null differ diff --git a/indra/newview/skins/default/textures/icons/Progress_7.png b/indra/newview/skins/default/textures/icons/Progress_7.png deleted file mode 100644 index 631d7a6819..0000000000 Binary files a/indra/newview/skins/default/textures/icons/Progress_7.png and /dev/null differ diff --git a/indra/newview/skins/default/textures/icons/Progress_8.png b/indra/newview/skins/default/textures/icons/Progress_8.png deleted file mode 100644 index ac0e3f13f7..0000000000 Binary files a/indra/newview/skins/default/textures/icons/Progress_8.png and /dev/null differ diff --git a/indra/newview/skins/default/textures/icons/Progress_9.png b/indra/newview/skins/default/textures/icons/Progress_9.png deleted file mode 100644 index 17fb4a0335..0000000000 Binary files a/indra/newview/skins/default/textures/icons/Progress_9.png and /dev/null differ diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index fed326c25e..41bcc62220 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -1,4 +1,4 @@ - @@ -64,49 +60,28 @@ with the same filename but different name - - - - - - - - - - - - - - - - - - - - - @@ -116,8 +91,6 @@ with the same filename but different name - - @@ -127,8 +100,6 @@ with the same filename but different name - - @@ -136,25 +107,18 @@ with the same filename but different name - - - - - - - @@ -162,8 +126,6 @@ with the same filename but different name - - @@ -174,22 +136,16 @@ with the same filename but different name - - - - - - @@ -206,7 +162,6 @@ with the same filename but different name - @@ -225,13 +180,11 @@ with the same filename but different name - - @@ -239,7 +192,6 @@ with the same filename but different name - @@ -259,7 +211,6 @@ with the same filename but different name - @@ -272,9 +223,7 @@ with the same filename but different name - - @@ -283,18 +232,9 @@ with the same filename but different name - - - - - - - - - @@ -311,10 +251,6 @@ with the same filename but different name - - - - @@ -356,27 +292,15 @@ with the same filename but different name - - - - - - - - - - - - @@ -388,22 +312,13 @@ with the same filename but different name - - - - - - - - - @@ -415,18 +330,6 @@ with the same filename but different name - - - - - - - - - - - - @@ -435,7 +338,6 @@ with the same filename but different name - @@ -448,12 +350,8 @@ with the same filename but different name - - - - @@ -470,11 +368,6 @@ with the same filename but different name - - - - - @@ -487,8 +380,6 @@ with the same filename but different name - - @@ -503,11 +394,7 @@ with the same filename but different name - - - - @@ -520,63 +407,35 @@ with the same filename but different name - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -585,8 +444,6 @@ with the same filename but different name - - @@ -595,7 +452,6 @@ with the same filename but different name - - - - - - - - - - @@ -635,7 +482,6 @@ with the same filename but different name - - - - @@ -667,17 +510,7 @@ with the same filename but different name - - - - - - - - - - @@ -687,7 +520,6 @@ with the same filename but different name - @@ -717,8 +549,6 @@ with the same filename but different name - - @@ -728,15 +558,11 @@ with the same filename but different name - - - - @@ -747,7 +573,6 @@ with the same filename but different name - @@ -756,15 +581,10 @@ with the same filename but different name - - - - - @@ -780,5 +600,4 @@ with the same filename but different name - -- cgit v1.2.3 From 09add95e314652bdb55200ad62a75c42326d69b4 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 1 Apr 2010 13:42:42 -0700 Subject: EXT-6307 World Map: field of view triangle rotates reviewed by Leyla --- indra/newview/llworldmapview.cpp | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index 7afe81b436..0c37bb6eb1 100644 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -886,28 +886,36 @@ void LLWorldMapView::drawFrustum() F32 half_width_meters = far_clip_meters * tan( horiz_fov / 2 ); F32 half_width_pixels = half_width_meters * meters_to_pixels; - F32 ctr_x = getRect().getWidth() * 0.5f + sPanX; - F32 ctr_y = getRect().getHeight() * 0.5f + sPanY; + F32 ctr_x = getLocalRect().getWidth() * 0.5f + sPanX; + F32 ctr_y = getLocalRect().getHeight() * 0.5f + sPanY; gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); // Since we don't rotate the map, we have to rotate the frustum. gGL.pushMatrix(); + { gGL.translatef( ctr_x, ctr_y, 0 ); - glRotatef( atan2( LLViewerCamera::getInstance()->getAtAxis().mV[VX], LLViewerCamera::getInstance()->getAtAxis().mV[VY] ) * RAD_TO_DEG, 0.f, 0.f, -1.f); // Draw triangle with more alpha in far pixels to make it // fade out in distance. gGL.begin( LLRender::TRIANGLES ); + { + LLVector2 cam_lookat(LLViewerCamera::instance().getAtAxis().mV[VX], LLViewerCamera::instance().getAtAxis().mV[VY]); + LLVector2 cam_left(LLViewerCamera::instance().getLeftAxis().mV[VX], LLViewerCamera::instance().getLeftAxis().mV[VY]); + gGL.color4f(1.f, 1.f, 1.f, 0.25f); gGL.vertex2f( 0, 0 ); gGL.color4f(1.f, 1.f, 1.f, 0.02f); - gGL.vertex2f( -half_width_pixels, far_clip_pixels ); + + LLVector2 vert = cam_lookat * far_clip_pixels + cam_left * half_width_pixels; + gGL.vertex2f(vert.mV[VX], vert.mV[VY]); - gGL.color4f(1.f, 1.f, 1.f, 0.02f); - gGL.vertex2f( half_width_pixels, far_clip_pixels ); + vert = cam_lookat * far_clip_pixels - cam_left * half_width_pixels; + gGL.vertex2f(vert.mV[VX], vert.mV[VY]); + } gGL.end(); + } gGL.popMatrix(); } -- cgit v1.2.3 From 2be2fdca5c334b787b8019d7226a48e1d5eaec91 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 1 Apr 2010 14:08:49 -0700 Subject: EXT-3606 - Script editor window: next line not indenting if current line wraps --- indra/newview/skins/default/xui/en/floater_test_text_editor.xml | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_test_text_editor.xml b/indra/newview/skins/default/xui/en/floater_test_text_editor.xml index b730f0e511..548e24efba 100644 --- a/indra/newview/skins/default/xui/en/floater_test_text_editor.xml +++ b/indra/newview/skins/default/xui/en/floater_test_text_editor.xml @@ -14,6 +14,7 @@ name="test_text_editor" tool_tip="text editor" top="25" + word_wrap="true" width="200"> Text Editor -- cgit v1.2.3 From 1d0f98f075471797605ed2b79fcbb9d79eb7291a Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Thu, 1 Apr 2010 15:08:17 -0700 Subject: EXT-5584 color picker swatches are missing pure red and many common shades reviewed by Richard cc#176 --- indra/newview/skins/default/colors.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml index fcf5cfadb2..bea610a909 100644 --- a/indra/newview/skins/default/colors.xml +++ b/indra/newview/skins/default/colors.xml @@ -61,7 +61,7 @@ value="0.26 0.345 0.263 1" /> + value="1 0 0 1" /> @@ -197,7 +197,7 @@ value="0.5 0.5 0.5 1" /> + value="0.5 0 0 1" /> @@ -239,7 +239,7 @@ reference="LtYellow" /> + reference="White" /> @@ -248,7 +248,7 @@ reference="Red" /> + reference="Yellow" /> -- cgit v1.2.3 From b6109c46451ab097ff4ce9d8d46ca596b0ab0ce0 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Thu, 1 Apr 2010 15:10:30 -0700 Subject: EXT-5168 prefs review: Remove "Small nametags" option reviewed by Richard cc#176 --- indra/newview/app_settings/settings.xml | 11 ----------- indra/newview/llfloaterpreference.cpp | 14 -------------- indra/newview/llvoavatar.cpp | 9 +-------- .../default/xui/en/panel_preferences_general.xml | 19 ++++--------------- 4 files changed, 5 insertions(+), 48 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 73fb24e4eb..f50eee27de 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -8653,17 +8653,6 @@ Value 1 - SmallAvatarNames - - Comment - Display avatar name text in smaller font - Persist - 1 - Type - Boolean - Value - 1 - SnapEnabled Comment diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 3487f52f35..764a0dc954 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -182,7 +182,6 @@ void LLVoiceSetKeyDialog::onCancel(void* user_data) // if creating/destroying these is too slow, we'll need to create // a static member and update all our static callbacks -void handleNameTagOptionChanged(const LLSD& newvalue); bool callback_clear_browser_cache(const LLSD& notification, const LLSD& response); //bool callback_skip_dialogs(const LLSD& notification, const LLSD& response, LLFloaterPreference* floater); @@ -218,15 +217,6 @@ bool callback_clear_browser_cache(const LLSD& notification, const LLSD& response return false; } -void handleNameTagOptionChanged(const LLSD& newvalue) -{ - S32 name_tag_option = S32(newvalue); - if(name_tag_option==2) - { - gSavedSettings.setBOOL("SmallAvatarNames", TRUE); - } -} - /*bool callback_skip_dialogs(const LLSD& notification, const LLSD& response, LLFloaterPreference* floater) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); @@ -319,8 +309,6 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) mCommitCallbackRegistrar.add("Pref.MaturitySettings", boost::bind(&LLFloaterPreference::onChangeMaturity, this)); sSkin = gSavedSettings.getString("SkinCurrent"); - - gSavedSettings.getControl("AvatarNameTagMode")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged, _2)); } BOOL LLFloaterPreference::postBuild() @@ -336,8 +324,6 @@ BOOL LLFloaterPreference::postBuild() LLTabContainer* tabcontainer = getChild("pref core"); if (!tabcontainer->selectTab(gSavedSettings.getS32("LastPrefTab"))) tabcontainer->selectFirstTab(); - S32 show_avatar_nametag_options = gSavedSettings.getS32("AvatarNameTagMode"); - handleNameTagOptionChanged(LLSD(show_avatar_nametag_options)); std::string cache_location = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, ""); childSetText("cache_location", cache_location); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index c400e8510e..0ce8894872 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2929,14 +2929,7 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) } else { - if (gSavedSettings.getBOOL("SmallAvatarNames")) - { - mNameText->setFont(LLFontGL::getFontSansSerif()); - } - else - { - mNameText->setFont(LLFontGL::getFontSansSerifBig()); - } + mNameText->setFont(LLFontGL::getFontSansSerif()); mNameText->setTextAlignment(LLHUDText::ALIGN_TEXT_CENTER); mNameText->setFadeDistance(CHAT_NORMAL_RADIUS, 5.f); mNameText->setVisibleOffScreen(FALSE); diff --git a/indra/newview/skins/default/xui/en/panel_preferences_general.xml b/indra/newview/skins/default/xui/en/panel_preferences_general.xml index e667fa9a2b..9eaabbe77b 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_general.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_general.xml @@ -177,7 +177,7 @@ layout="topleft" left="30" name="start_location_textbox" - top_pad="10" + top_pad="15" width="394"> Start location: @@ -256,26 +256,15 @@ left="50" name="show_my_name_checkbox1" width="300" /> - + width="200" /> Busy mode response: -- cgit v1.2.3 From 38c1bc9e9a533b6f9b2e1fc8258da482f25aec8b Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Thu, 1 Apr 2010 15:11:13 -0700 Subject: EXT-5179 In Prefs->Setup, move Other Devices to bottom of window or to advanced EXT-5170 prefs review: move UI size to advanced reviewed by Richard CC#176 --- .../default/xui/en/panel_preferences_advanced.xml | 43 +++++++++++++++++++++- .../default/xui/en/panel_preferences_graphics1.xml | 29 +-------------- .../default/xui/en/panel_preferences_setup.xml | 14 +------ 3 files changed, 43 insertions(+), 43 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml index e604e401f6..69e8e6fdcc 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml @@ -186,6 +186,32 @@ Automatic position for: function="Pref.applyUIColor" parameter="BackgroundChatColor" /> + + UI size + + - + diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml index c74de043e9..44c44f5f59 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml @@ -9,33 +9,6 @@ name="Display panel" top="1" width="517"> - - UI size: - - Quality and speed: diff --git a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml index 2123e62daa..8d7b40b386 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml @@ -9,18 +9,6 @@ name="Input panel" top="1" width="517"> - Mouselook: -- cgit v1.2.3 From 8a22ffa622912f21908b35335e5fdb21e0596a14 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Thu, 1 Apr 2010 15:12:20 -0700 Subject: EXT-5110 Save Outfit dialog is non-standard modal dialog (off-center placement, empty titlebar) reviewed by Richard CC#176 --- indra/newview/llpaneloutfitsinventory.cpp | 113 +++++++-------------- indra/newview/llpaneloutfitsinventory.h | 2 +- .../newview/skins/default/xui/en/notifications.xml | 22 ++++ 3 files changed, 61 insertions(+), 76 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index dd320f8328..7137022447 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -48,6 +48,7 @@ #include "lllandmark.h" #include "lllineeditor.h" #include "llmodaldialog.h" +#include "llnotificationsutil.h" #include "llsidepanelappearance.h" #include "llsidetray.h" #include "lltabcontainer.h" @@ -68,75 +69,13 @@ static const std::string COF_TAB_NAME = "cof_tab"; static LLRegisterPanelClassWrapper t_inventory("panel_outfits_inventory"); bool LLPanelOutfitsInventory::sShowDebugEditor = false; -class LLOutfitSaveAsDialog : public LLModalDialog -{ -private: - std::string mItemName; - std::string mTempItemName; - - boost::signals2::signal mSaveAsSignal; - -public: - LLOutfitSaveAsDialog( const LLSD& key ) - : LLModalDialog( key ), - mTempItemName(key.asString()) - { - } - - BOOL postBuild() - { - getChild("Save")->setCommitCallback(boost::bind(&LLOutfitSaveAsDialog::onSave, this )); - getChild("Cancel")->setCommitCallback(boost::bind(&LLOutfitSaveAsDialog::onCancel, this )); - - childSetTextArg("name ed", "[DESC]", mTempItemName); - return TRUE; - } - - void setSaveAsCommit( const boost::signals2::signal::slot_type& cb ) - { - mSaveAsSignal.connect(cb); - } - - virtual void onOpen(const LLSD& key) - { - LLLineEditor* edit = getChild("name ed"); - if (edit) - { - edit->setFocus(TRUE); - edit->selectAll(); - } - } - void onSave() - { - mItemName = childGetValue("name ed").asString(); - LLStringUtil::trim(mItemName); - if( !mItemName.empty() ) - { - mSaveAsSignal(mItemName); - closeFloater(); // destroys this object - } - } - - void onCancel() - { - closeFloater(); // destroys this object - } -}; - LLPanelOutfitsInventory::LLPanelOutfitsInventory() : mActivePanel(NULL), mParent(NULL) { mSavedFolderState = new LLSaveFolderState(); mSavedFolderState->setApply(FALSE); - - static bool registered_dialog = false; - if (!registered_dialog) - { - LLFloaterReg::add("outfit_save_as", "floater_outfit_save_as.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); - registered_dialog = true; - } } LLPanelOutfitsInventory::~LLPanelOutfitsInventory() @@ -268,6 +207,31 @@ void LLPanelOutfitsInventory::onEdit() { } +bool LLPanelOutfitsInventory::onSaveCommit(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if (0 == option) + { + std::string outfit_name = response["message"].asString(); + LLStringUtil::trim(outfit_name); + if( !outfit_name.empty() ) + { + LLUUID outfit_folder = gAgentWearables.makeNewOutfitLinks(outfit_name); + LLSD key; + LLSideTray::getInstance()->showPanel("panel_outfits_inventory", key); + + if (mAppearanceTabs) + { + mAppearanceTabs->selectTabByName(OUTFITS_TAB_NAME); + } + } + } + + return false; +} + + + void LLPanelOutfitsInventory::onSave() { std::string outfit_name; @@ -277,23 +241,22 @@ void LLPanelOutfitsInventory::onSave() outfit_name = LLViewerFolderType::lookupNewCategoryName(LLFolderType::FT_OUTFIT); } + LLSD args; + args["DESC"] = outfit_name; + + LLSD payload; + //payload["ids"].append(*it); + + LLNotificationsUtil::add("SaveOutfitAs", args, payload, boost::bind(&LLPanelOutfitsInventory::onSaveCommit, this, _1, _2)); + + //) + +/* LLOutfitSaveAsDialog* save_as_dialog = LLFloaterReg::showTypedInstance("outfit_save_as", LLSD(outfit_name), TRUE); if (save_as_dialog) { save_as_dialog->setSaveAsCommit(boost::bind(&LLPanelOutfitsInventory::onSaveCommit, this, _1 )); - } -} - -void LLPanelOutfitsInventory::onSaveCommit(const std::string& outfit_name) -{ - LLUUID outfit_folder = gAgentWearables.makeNewOutfitLinks(outfit_name); - LLSD key; - LLSideTray::getInstance()->showPanel("panel_outfits_inventory", key); - - if (mAppearanceTabs) - { - mAppearanceTabs->selectTabByName(OUTFITS_TAB_NAME); - } + }*/ } void LLPanelOutfitsInventory::onSelectionChange(const std::deque &items, BOOL user_action) diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h index ab25ef0a49..a4d38df740 100644 --- a/indra/newview/llpaneloutfitsinventory.h +++ b/indra/newview/llpaneloutfitsinventory.h @@ -61,7 +61,7 @@ public: void onEdit(); void onSave(); - void onSaveCommit(const std::string& item_name); + bool onSaveCommit(const LLSD& notification, const LLSD& response); void onSelectionChange(const std::deque &items, BOOL user_action); void onSelectorButtonClicked(); diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index c39a91281e..f52996724f 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -2023,6 +2023,28 @@ Would you be my friend? + + Save what I'm wearing as a new Outfit: +
+ + [DESC] (new) + +