From f6a7883a6f56c5c9dfaf888cbfd80f681f8cb968 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sun, 5 Mar 2017 20:27:31 +0100 Subject: [PATCH] Remove "Importing old Value" script dialog position option that isn't needed anymore and fix enabled state of "Animate Script Dialogs" option --- indra/newview/app_settings/settings.xml | 17 +------ .../app_settings/settings_firestorm.xml | 12 ----- .../newview/app_settings/settings_hybrid.xml | 12 ----- .../newview/app_settings/settings_phoenix.xml | 24 --------- indra/newview/app_settings/settings_text.xml | 12 ----- indra/newview/app_settings/settings_v3.xml | 8 +-- indra/newview/llfloaterpreference.cpp | 12 +++++ indra/newview/llfloaterpreference.h | 3 ++ indra/newview/llscriptfloater.cpp | 50 +------------------ indra/newview/llscriptfloater.h | 3 +- .../default/xui/de/panel_preferences_UI.xml | 1 - .../default/xui/en/panel_preferences_UI.xml | 5 -- .../default/xui/es/panel_preferences_UI.xml | 1 - .../default/xui/fr/panel_preferences_UI.xml | 1 - .../default/xui/ja/panel_preferences_UI.xml | 1 - .../default/xui/pl/panel_preferences_UI.xml | 1 - .../default/xui/ru/panel_preferences_UI.xml | 1 - 17 files changed, 23 insertions(+), 141 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index bc0e9590c1..c49a8ba5bd 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -702,13 +702,13 @@ ScriptDialogsPosition Comment - Holds the position where script llDialog floaters will show up. 1 = docked to chiclet, 2 = top left, 3 = top right, 4 = bottom left, 5 = bottom right, 0 = follow legacy ShowScriptDialogsTopRight + Holds the position where script llDialog floaters will show up. 1 = docked to chiclet, 2 = top left, 3 = top right, 4 = bottom left, 5 = bottom right Persist 1 Type S32 Value - 0 + 3 DialogStackIconVisible @@ -723,19 +723,6 @@ 0 - - ShowScriptDialogsTopRight - - Comment - Show script llDialog floaters always in the top right corner of the screen (OBSOLETE, see ScriptDialogsPosition). - Persist - 1 - Type - Boolean - Value - 1 - - ShowGroupNoticesTopRight Comment diff --git a/indra/newview/app_settings/settings_firestorm.xml b/indra/newview/app_settings/settings_firestorm.xml index c99234c98f..7155de5791 100644 --- a/indra/newview/app_settings/settings_firestorm.xml +++ b/indra/newview/app_settings/settings_firestorm.xml @@ -183,18 +183,6 @@ 1 - ShowScriptDialogsTopRight - - Comment - Show script llDialog floaters always in the top right corner of the screen. - Persist - 1 - Type - Boolean - Value - 1 - - EnableGroupChatPopups Comment diff --git a/indra/newview/app_settings/settings_hybrid.xml b/indra/newview/app_settings/settings_hybrid.xml index c7bc2f0c79..d276eea8ae 100644 --- a/indra/newview/app_settings/settings_hybrid.xml +++ b/indra/newview/app_settings/settings_hybrid.xml @@ -159,18 +159,6 @@ 1 - ShowScriptDialogsTopRight - - Comment - Show script llDialog floaters always in the top right corner of the screen. - Persist - 1 - Type - Boolean - Value - 1 - - EnableGroupChatPopups Comment diff --git a/indra/newview/app_settings/settings_phoenix.xml b/indra/newview/app_settings/settings_phoenix.xml index b94bfc33b3..08180920ef 100644 --- a/indra/newview/app_settings/settings_phoenix.xml +++ b/indra/newview/app_settings/settings_phoenix.xml @@ -171,18 +171,6 @@ 1 - ShowScriptDialogsTopRight - - Comment - Show script llDialog floaters always in the top right corner of the screen. - Persist - 1 - Type - Boolean - Value - 1 - - EnableGroupChatPopups Comment @@ -483,18 +471,6 @@ 1 - ScriptDialogsPosition - - Comment - Holds the position where script llDialog floaters will show up. 1 = docked to chiclet, 2 = top left, 3 = top right, 4 = bottom left, 5 = bottom right, 0 = follow legacy ShowScriptDialogsTopRight - Persist - 1 - Type - S32 - Value - 3 - - FSUseLegacyCursors Comment diff --git a/indra/newview/app_settings/settings_text.xml b/indra/newview/app_settings/settings_text.xml index 1e679b1016..6b50b6ee55 100644 --- a/indra/newview/app_settings/settings_text.xml +++ b/indra/newview/app_settings/settings_text.xml @@ -147,18 +147,6 @@ 1 - ShowScriptDialogsTopRight - - Comment - Show script llDialog floaters always in the top right corner of the screen. - Persist - 1 - Type - Boolean - Value - 1 - - EnableGroupChatPopups Comment diff --git a/indra/newview/app_settings/settings_v3.xml b/indra/newview/app_settings/settings_v3.xml index 0a2adc77b1..6c89031e12 100644 --- a/indra/newview/app_settings/settings_v3.xml +++ b/indra/newview/app_settings/settings_v3.xml @@ -183,16 +183,16 @@ 0 - ShowScriptDialogsTopRight + ScriptDialogsPosition Comment - Show script llDialog floaters always in the top right corner of the screen. + Holds the position where script llDialog floaters will show up. 1 = docked to chiclet, 2 = top left, 3 = top right, 4 = bottom left, 5 = bottom right Persist 1 Type - Boolean + S32 Value - 0 + 1 EnableGroupChatPopups diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 11ce64e426..6906fae26a 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -770,6 +770,10 @@ BOOL LLFloaterPreference::postBuild() onAvatarTagSettingsChanged(); // + // Correct enabled state of Animated Script Dialogs option + gSavedSettings.getControl("ScriptDialogsPosition")->getCommitSignal()->connect(boost::bind(&LLFloaterPreference::updateAnimatedScriptDialogs, this)); + updateAnimatedScriptDialogs(); + // Set max. UI scaling factor depending on max. supported OS scaling factor #if LL_WINDOWS if (IsWindowsVersionOrGreater(10, 0, 0)) @@ -3440,6 +3444,14 @@ void LLFloaterPreference::onAvatarTagSettingsChanged() } // +// Correct enabled state of Animated Script Dialogs option +void LLFloaterPreference::updateAnimatedScriptDialogs() +{ + S32 position = gSavedSettings.getS32("ScriptDialogsPosition"); + childSetEnabled("FSAnimatedScriptDialogs", position == 2 || position == 3); +} +// + //------------------------------Updater--------------------------------------- // FIRE-6340, FIRE-6567 - Setting Bandwidth issues diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 940ba43115..ee806643da 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -164,6 +164,9 @@ protected: // Properly disable avatar tag setting void onAvatarTagSettingsChanged(); + // Correct enabled state of Animated Script Dialogs option + void updateAnimatedScriptDialogs(); + public: // This function squirrels away the current values of the controls so that // cancel() can restore them. diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp index 6b6e0f422e..0ea3d50c0d 100644 --- a/indra/newview/llscriptfloater.cpp +++ b/indra/newview/llscriptfloater.cpp @@ -127,47 +127,9 @@ LLScriptFloater* LLScriptFloater::show(const LLUUID& notification_id) //LLDialog(LLGiveInventory and LLLoadURL) should no longer steal focus (see EXT-5445) floater->setAutoFocus(FALSE); - LLScriptFloaterManager::e_object_type floaterType=LLScriptFloaterManager::getObjectType(notification_id); - - // for some reason an inventory offer comes back as OBJ_UNKNOWN -Zi - if(floaterType==LLScriptFloaterManager::OBJ_UNKNOWN || - floaterType==LLScriptFloaterManager::OBJ_SCRIPT) + if(LLScriptFloaterManager::OBJ_SCRIPT == LLScriptFloaterManager::getObjectType(notification_id)) { floater->setSavePosition(true); - if(gSavedSettings.getBOOL("ShowScriptDialogsTopRight") || - gSavedSettings.getBOOL("FSDisableIMChiclets") - ) - { - // undock the dialog - floater->setDocked(false,true); - LLRect pos=floater->getRect(); - - S32 width=pos.getWidth(); - S32 height=pos.getHeight(); - pos.setOriginAndSize(gViewerWindow->getWorldViewWidthScaled()-width, - gViewerWindow->getWorldViewHeightScaled()-height, - width,height); - floater->setRect(pos); - floater->savePosition(); - } - // do this only for inventory offers -Zi - else if(floaterType==LLScriptFloaterManager::OBJ_UNKNOWN) - { - // undock the dialog - floater->setDocked(false,true); - LLRect pos=floater->getRect(); - - S32 width=pos.getWidth(); - S32 height=pos.getHeight(); - - pos.setOriginAndSize(gViewerWindow->getWorldViewWidthScaled()-width, - gViewerWindow->getWorldViewHeightScaled()-height, - width,height); - - floater->setRect(pos); - floater->savePosition(); - } - floater->restorePosition(); } else @@ -892,16 +854,6 @@ LLScriptFloater* LLScriptFloater::show(const LLUUID& notification_id) { eDialogPosition dialog_position = (eDialogPosition)gSavedSettings.getS32("ScriptDialogsPosition"); - if (dialog_position == POS_LEGACY) - { - dialog_position = POS_TOP_RIGHT; - if (!gSavedSettings.getBOOL("ShowScriptDialogsTopRight")) - { - dialog_position = POS_DOCKED; - } - gSavedSettings.setS32("ScriptDialogsPosition", (S32)dialog_position); - } - if (dialog_position == POS_DOCKED && chicletsDisabled) { dialog_position = POS_TOP_RIGHT; diff --git a/indra/newview/llscriptfloater.h b/indra/newview/llscriptfloater.h index ecd82639d8..a7ace79c8a 100644 --- a/indra/newview/llscriptfloater.h +++ b/indra/newview/llscriptfloater.h @@ -235,8 +235,7 @@ public: // script dialogs position enum eDialogPosition { - POS_LEGACY, // Use ShowScriptDialogsTopRight once and convert to one of these - POS_DOCKED, + POS_DOCKED = 1, POS_TOP_LEFT, POS_TOP_RIGHT, POS_BOTTOM_LEFT, diff --git a/indra/newview/skins/default/xui/de/panel_preferences_UI.xml b/indra/newview/skins/default/xui/de/panel_preferences_UI.xml index 5267f3992e..e30f98ca6b 100644 --- a/indra/newview/skins/default/xui/de/panel_preferences_UI.xml +++ b/indra/newview/skins/default/xui/de/panel_preferences_UI.xml @@ -50,7 +50,6 @@ Skriptdialog-Position: - diff --git a/indra/newview/skins/default/xui/en/panel_preferences_UI.xml b/indra/newview/skins/default/xui/en/panel_preferences_UI.xml index 67397a441b..c7123cae47 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_UI.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_UI.xml @@ -346,10 +346,6 @@ tool_tip="Choose where script dialogs (menus) come up on your screen." width="180"> - - diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_UI.xml b/indra/newview/skins/default/xui/fr/panel_preferences_UI.xml index d8bf2b1e76..e38b3c6c13 100644 --- a/indra/newview/skins/default/xui/fr/panel_preferences_UI.xml +++ b/indra/newview/skins/default/xui/fr/panel_preferences_UI.xml @@ -30,7 +30,6 @@ Position des dialogues de scripts : - diff --git a/indra/newview/skins/default/xui/ja/panel_preferences_UI.xml b/indra/newview/skins/default/xui/ja/panel_preferences_UI.xml index 98de345fd3..41578197b3 100644 --- a/indra/newview/skins/default/xui/ja/panel_preferences_UI.xml +++ b/indra/newview/skins/default/xui/ja/panel_preferences_UI.xml @@ -61,7 +61,6 @@ スクリプトダイアログの表示位置: - diff --git a/indra/newview/skins/default/xui/pl/panel_preferences_UI.xml b/indra/newview/skins/default/xui/pl/panel_preferences_UI.xml index 518fb003d3..0427567c5c 100644 --- a/indra/newview/skins/default/xui/pl/panel_preferences_UI.xml +++ b/indra/newview/skins/default/xui/pl/panel_preferences_UI.xml @@ -46,7 +46,6 @@ Pozycja komunikatów skryptów: - diff --git a/indra/newview/skins/default/xui/ru/panel_preferences_UI.xml b/indra/newview/skins/default/xui/ru/panel_preferences_UI.xml index 42f0bfe5ae..e6697872bd 100644 --- a/indra/newview/skins/default/xui/ru/panel_preferences_UI.xml +++ b/indra/newview/skins/default/xui/ru/panel_preferences_UI.xml @@ -44,7 +44,6 @@ Размещение диалогов скрипта: -