From d01afc8a6a1af4df7208724c71f916b5c111da95 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 25 Mar 2011 16:24:56 -0700 Subject: SOCIAL-751 FIX Don't Quit button on 'Changing modes...' dialog gives the false impression that it does nothing combo box now changes back to previous label when selecting don't quit --- indra/newview/llpanellogin.cpp | 21 +++++++++++++-------- indra/newview/llpanellogin.h | 4 ++-- indra/newview/skins/default/xui/en/panel_login.xml | 1 - indra/newview/skins/minimal/xui/en/panel_login.xml | 1 - 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 903cf4780d..7820ac3ecd 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -214,7 +214,9 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, } updateLocationCombo(false); - gSavedSettings.getControl("SessionSettingsFile")->getSignal()->connect(boost::bind(&onModeChange)); + LLUICtrl& mode_combo = getChildRef("mode_combo"); + mode_combo.setValue(gSavedSettings.getString("SessionSettingsFile")); + mode_combo.setCommitCallback(boost::bind(&LLPanelLogin::onModeChange, this, getChild("mode_combo")->getValue(), _2)); LLComboBox* server_choice_combo = sInstance->getChild("server_combo"); server_choice_combo->setCommitCallback(onSelectServer, NULL); @@ -1159,23 +1161,26 @@ void LLPanelLogin::updateLoginPanelLinks() sInstance->getChildView("forgot_password_text")->setVisible( system_grid); } -//static -void LLPanelLogin::onModeChange() +void LLPanelLogin::onModeChange(const LLSD& original_value, const LLSD& new_value) { - LLNotificationsUtil::add("ModeChange", LLSD(), LLSD(), boost::bind(&onModeChangeConfirm, _1, _2)); + if (original_value.asString() != new_value.asString()) + { + LLNotificationsUtil::add("ModeChange", LLSD(), LLSD(), boost::bind(&LLPanelLogin::onModeChangeConfirm, this, original_value, new_value, _1, _2)); + } } -//static -void LLPanelLogin::onModeChangeConfirm(const LLSD& notification, const LLSD& response) +void LLPanelLogin::onModeChangeConfirm(const LLSD& original_value, const LLSD& new_value, const LLSD& notification, const LLSD& response) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); switch (option) { case 0: - LLAppViewer::instance()->requestQuit(); + gSavedSettings.getControl("SessionSettingsFile")->set(new_value); + LLAppViewer::instance()->forceQuit(); break; case 1: - // do nothing + // revert to original value + getChild("mode_combo")->setValue(original_value); break; default: break; diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h index 1430bec832..9cc5e3456a 100644 --- a/indra/newview/llpanellogin.h +++ b/indra/newview/llpanellogin.h @@ -98,8 +98,8 @@ private: static void onServerComboLostFocus(LLFocusableElement*); static void updateServerCombo(); static void updateStartSLURL(); - static void onModeChange(); - static void onModeChangeConfirm(const LLSD& notification, const LLSD& response); + void onModeChange(const LLSD& original_value, const LLSD& new_value); + void onModeChangeConfirm(const LLSD& original_value, const LLSD& new_value, const LLSD& notification, const LLSD& response); static void updateLoginPanelLinks(); diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml index 4c2faddfe4..8d0f1437e6 100644 --- a/indra/newview/skins/default/xui/en/panel_login.xml +++ b/indra/newview/skins/default/xui/en/panel_login.xml @@ -133,7 +133,6 @@ label="Remember password" max_chars="128" tool_tip="Select your mode. Choose Basic for fast, easy exploration and chat. Choose Advanced to access more features." top_pad="0" - control_name="SessionSettingsFile" name="mode_combo" width="110"> Date: Fri, 25 Mar 2011 19:13:32 -0700 Subject: SOCIAL-717 FIX Artwork for click to move hint updated resize logic for hint popups to accomodate image size --- indra/llui/lliconctrl.h | 1 + indra/newview/app_settings/settings.xml | 2 +- indra/newview/llfirstuse.cpp | 6 +++- indra/newview/llhints.cpp | 14 +++++++++ indra/newview/llnavigationbar.cpp | 3 ++ .../newview/skins/default/xui/en/notifications.xml | 8 +++-- indra/newview/skins/default/xui/en/panel_hint.xml | 2 +- .../skins/default/xui/en/panel_hint_image.xml | 34 +++++++++++++-------- .../skins/minimal/textures/click_to_move.png | Bin 0 -> 8188 bytes indra/newview/skins/minimal/textures/textures.xml | 1 + 10 files changed, 54 insertions(+), 17 deletions(-) create mode 100644 indra/newview/skins/minimal/textures/click_to_move.png diff --git a/indra/llui/lliconctrl.h b/indra/llui/lliconctrl.h index e9bdab2d47..669e126266 100644 --- a/indra/llui/lliconctrl.h +++ b/indra/llui/lliconctrl.h @@ -69,6 +69,7 @@ public: void setColor(const LLColor4& color) { mColor = color; } void setImage(LLPointer image) { mImagep = image; } + const LLPointer getImage() { return mImagep; } private: void setIconImageDrawSize() ; diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 04045585a0..b966447942 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -12364,7 +12364,7 @@ Type F32 Value - 120.0 + 1.0 DestinationGuideHintTimeout diff --git a/indra/newview/llfirstuse.cpp b/indra/newview/llfirstuse.cpp index e319418def..1c15360b09 100644 --- a/indra/newview/llfirstuse.cpp +++ b/indra/newview/llfirstuse.cpp @@ -115,7 +115,11 @@ void LLFirstUse::notMoving(bool enable) { // fire off 2 notifications and rely on filtering to select the relevant one firstUseNotification("FirstNotMoving", enable, "HintMove", LLSD(), LLSD().with("target", "move_btn").with("direction", "top")); - firstUseNotification("FirstNotMoving", enable, "HintMoveArrows", LLSD(), LLSD().with("target", "bottom_tray").with("direction", "top").with("hint_image", "arrow_keys.png").with("down_arrow", "")); + firstUseNotification("FirstNotMoving", enable, "HintMoveClick", LLSD(), LLSD() + .with("target", "nav_bar") + .with("direction", "bottom") + .with("hint_image", "click_to_move.png") + .with("up_arrow", "")); } // static diff --git a/indra/newview/llhints.cpp b/indra/newview/llhints.cpp index c4dcaf11f9..97f0e36a0c 100644 --- a/indra/newview/llhints.cpp +++ b/indra/newview/llhints.cpp @@ -191,6 +191,8 @@ BOOL LLHintPopup::postBuild() LLRect text_bounds = hint_text.getTextBoundingRect(); S32 delta_height = text_bounds.getHeight() - hint_text.getRect().getHeight(); reshape(getRect().getWidth(), getRect().getHeight() + delta_height); + hint_text.reshape(hint_text.getRect().getWidth(), hint_text.getRect().getHeight() + delta_height); + hint_text.translate(0, -delta_height); return TRUE; } @@ -211,6 +213,18 @@ void LLHintPopup::draw() alpha = clamp_rescale(mFadeTimer.getElapsedTimeF32(), 0.f, mFadeInTime, 0.f, 1.f); } + LLIconCtrl& hint_icon = getChildRef("hint_image"); + + LLUIImagePtr hint_image = hint_icon.getImage(); + S32 image_height = hint_image.isNull() ? 0 : hint_image->getHeight(); + S32 image_width = hint_image.isNull() ? 0 : hint_image->getWidth(); + + S32 delta_height = image_height - hint_icon.getRect().getHeight(); + hint_icon.getParent()->reshape(image_width, image_height); + + LLRect hint_rect = getLocalRect(); + reshape(hint_rect.getWidth(), hint_rect.getHeight() + delta_height); + { LLViewDrawContext context(alpha); if (mTarget.empty()) diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index 3b160ddc8e..b8832dfd8e 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -57,6 +57,7 @@ #include "llviewercontrol.h" #include "llfloatermediabrowser.h" #include "llweb.h" +#include "llhints.h" #include "llinventorymodel.h" #include "lllandmarkactions.h" @@ -324,6 +325,8 @@ BOOL LLNavigationBar::postBuild() LLTeleportHistory::getInstance()->setHistoryChangedCallback( boost::bind(&LLNavigationBar::onTeleportHistoryChanged, this)); + LLHints::registerHintTarget("nav_bar", LLView::getHandle()); + return TRUE; } diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 6ecaef1bf3..ad68e50e77 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -7034,11 +7034,15 @@ Mute everyone? - To walk, use the directional keys on your keyboard. You can run by pressing the Up arrow twice. +Click to Walk +Click anywhere on the ground to walk to that spot. + +Click and Drag to Rotate View +Click and drag anywhere on the world to rotate your view custom_skin diff --git a/indra/newview/skins/default/xui/en/panel_hint.xml b/indra/newview/skins/default/xui/en/panel_hint.xml index e2e9d0aef0..c883fd8a1d 100644 --- a/indra/newview/skins/default/xui/en/panel_hint.xml +++ b/indra/newview/skins/default/xui/en/panel_hint.xml @@ -16,7 +16,7 @@ right="197" top="26" bottom="92" - follows="all" + follows="left|right|bottom" text_color="Black" wrap="true"/>