From 92299fb5ccf6b2c78b73496902419954f696ffa1 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Mon, 29 Apr 2013 11:46:07 +0200 Subject: [PATCH] Remove Growl warning in preferences and instead enable Growl checkboxes only if Growl is usable since we can check status on all platforms now --- indra/newview/growlmanager.cpp | 5 +++ indra/newview/growlmanager.h | 2 + indra/newview/llfloaterpreference.cpp | 41 ++++++------------- indra/newview/llfloaterpreference.h | 8 +--- .../skins/default/xui/de/notifications.xml | 6 --- .../skins/default/xui/en/notifications.xml | 13 ------ .../xui/en/panel_preferences_alerts.xml | 3 +- .../skins/default/xui/es/notifications.xml | 6 --- .../skins/default/xui/pl/notifications.xml | 6 --- 9 files changed, 22 insertions(+), 68 deletions(-) diff --git a/indra/newview/growlmanager.cpp b/indra/newview/growlmanager.cpp index d8e9cac4d9..6847c5c2d0 100644 --- a/indra/newview/growlmanager.cpp +++ b/indra/newview/growlmanager.cpp @@ -357,3 +357,8 @@ void GrowlManager::InitiateManager() { gGrowlManager = new GrowlManager(); } + +bool GrowlManager::isUsable() +{ + return (gGrowlManager && gGrowlManager->mNotifier && gGrowlManager->mNotifier->isUsable()); +} \ No newline at end of file diff --git a/indra/newview/growlmanager.h b/indra/newview/growlmanager.h index e8c5a0d220..9c8784ba9a 100644 --- a/indra/newview/growlmanager.h +++ b/indra/newview/growlmanager.h @@ -63,6 +63,8 @@ public: BOOL tick(); static void InitiateManager(); + static bool isUsable(); + private: GrowlNotifier *mNotifier; std::map mNotifications; diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index f505c015ee..f7b1839a4b 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -140,6 +140,7 @@ #include "llwldaycycle.h" #include "llwlparammanager.h" // +#include "growlmanager.h" const F32 MAX_USER_FAR_CLIP = 512.f; const F32 MIN_USER_FAR_CLIP = 64.f; @@ -252,21 +253,6 @@ bool callback_clear_cache(const LLSD& notification, const LLSD& response) return false; } -// FIRE-7050 - Add a warning to the Growl preference option because of FIRE-6868 -#ifdef LL_WINDOWS -bool callback_growl_not_installed(const LLSD& notification, const LLSD& response) -{ - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - if ( option == 1 ) // NO - { - gSavedSettings.setBOOL("FSEnableGrowl", FALSE); - } - - return false; -} -#endif -// - bool callback_clear_browser_cache(const LLSD& notification, const LLSD& response) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); @@ -2317,14 +2303,16 @@ BOOL LLPanelPreference::postBuild() { getChildView("OnlineOfflinetoNearbyChatHistory")->setEnabled(getChild("OnlineOfflinetoNearbyChat")->getValue().asBoolean()); } - // FIRE-7050 - Add a warning to the Growl preference option because of FIRE-6868 -#ifdef LL_WINDOWS + + // Only enable Growl checkboxes if Growl is usable if (hasChild("notify_growl_checkbox", TRUE)) { - getChild("notify_growl_checkbox")->setCommitCallback(boost::bind(&showGrowlNotInstalledWarning, _1, _2)); + getChild("notify_growl_checkbox")->setCommitCallback(boost::bind(&LLPanelPreference::onEnableGrowlChanged, this)); + getChild("notify_growl_checkbox")->setEnabled(GrowlManager::isUsable()); + getChild("notify_growl_always_checkbox")->setEnabled(gSavedSettings.getBOOL("FSEnableGrowl") && GrowlManager::isUsable()); } -#endif - // + // + #ifdef OPENSIM // // if(LLGridManager::getInstance()->isInOpenSim() && !LLGridManager::getInstance()->isInAuroraSim() && hasChild("UseLSLBridge", TRUE)) @@ -2419,17 +2407,12 @@ void LLPanelPreference::showFavoritesOnLoginWarning(LLUICtrl* checkbox, const LL } } -// FIRE-7050 - Add a warning to the Growl preference option because of FIRE-6868 -#ifdef LL_WINDOWS -void LLPanelPreference::showGrowlNotInstalledWarning(LLUICtrl* checkbox, const LLSD& value) +// Only enable Growl checkboxes if Growl is usable +void LLPanelPreference::onEnableGrowlChanged() { - if (checkbox && checkbox->getValue()) - { - LLNotificationsUtil::add("GrowlNotInstalled",LLSD(), LLSD(), callback_growl_not_installed); - } + getChild("notify_growl_always_checkbox")->setEnabled(gSavedSettings.getBOOL("FSEnableGrowl") && GrowlManager::isUsable()); } -#endif -// +// void LLPanelPreference::cancel() { diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index f76624239a..1f586e21fc 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -133,7 +133,6 @@ protected: // This function squirrels away the current values of the controls so that // cancel() can restore them. void saveSettings(); - public: @@ -261,11 +260,8 @@ private: //for "Show my Favorite Landmarks at Login" static void showFavoritesOnLoginWarning(LLUICtrl* checkbox, const LLSD& value); - // FIRE-7050 - Add a warning to the Growl preference option because of FIRE-6868 -#ifdef LL_WINDOWS - static void showGrowlNotInstalledWarning(LLUICtrl* checkbox, const LLSD& value); -#endif - // + // Only enable Growl checkboxes if Growl is usable + void onEnableGrowlChanged(); typedef std::map string_color_map_t; string_color_map_t mSavedColors; diff --git a/indra/newview/skins/default/xui/de/notifications.xml b/indra/newview/skins/default/xui/de/notifications.xml index 29179340ba..7de7489268 100644 --- a/indra/newview/skins/default/xui/de/notifications.xml +++ b/indra/newview/skins/default/xui/de/notifications.xml @@ -153,12 +153,6 @@ Wählen Sie ein einzelnes Objekt aus und versuchen Sie es erneut. Hinweis: Bei Aktivierung dieser Option sehen alle Personen, die diesen Computer benutzen, Ihre Lieblingsorte. - - WARNUNG: Wenn diese Funktion aktiviert wird, ohne dass Growl installiert ist, kann dieses zu kleinen Rucklern führen, wenn sich Freunde ein- oder ausloggen. -Für weitere Informationen siehe http://wiki.phoenixviewer.com/fs_growl -Soll diese Funktion dennoch aktiviert werden? - - Wenn Sie einem anderen Einwohner Änderungsrechte gewähren, dann kann dieser JEDES Objekt, das Sie inworld besitzen, ändern, löschen oder an sich nehmen. Seien Sie daher beim Gewähren dieser Rechte sehr vorsichtig! Möchten Sie [NAME] Änderungsrechte gewähren? diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index b09323c6e9..6ce8d74bd1 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -368,19 +368,6 @@ Save all changes to clothing/body parts? name="okbutton" yestext="OK"/> - - - WARNING: Enabling this option without having growl installed will result in small freezes when someone messages you or goes on/offline. -Read http://wiki.phoenixviewer.com/fs_growl for more information. -Do you stil wish to enable it? - - + width="160"/> - - ATENCIÓN: Activar esta opción sin tener growl instalado puede dar lugar a pequeños congelamientos cuando alguien te envía un mensaje o se conecta/desconecta. -Lee http://wiki.phoenixviewer.com/fs_growl para más información. -¿Deseas activarlo de todas formas? - - Al conceder permisos de modificación a otro Residente, le estás permitiendo cambiar, borrar o tomar CUALQUIER objeto que tengas en el mundo. Sé MUY cuidadoso al conceder este permiso. ¿Quieres conceder permisos de modificación a [NAME]? diff --git a/indra/newview/skins/default/xui/pl/notifications.xml b/indra/newview/skins/default/xui/pl/notifications.xml index de1a6f0b7a..79c42184cd 100644 --- a/indra/newview/skins/default/xui/pl/notifications.xml +++ b/indra/newview/skins/default/xui/pl/notifications.xml @@ -108,12 +108,6 @@ Wybierz pojedynczy obiekt i spróbuj jeszcze raz. Pamiętaj: kiedy włączysz tą opcję to każdy kto używa tego komputera może zobaczyć Twoją listę ulubionych miejsc. - - UWAGA: Jeśli Growl nie jest zainstalowany, to włączenie tej opcji będzie skutkować małymi zacięciami gdy ktoś wyśle do Ciebie wiadomość lub zaloguje/wyloguje się. -Zobacz http://wiki.phoenixviewer.com/fs_growl, aby uzyskać więcej informacji. -Ciągle chcesz włączyć tą opcję? - - Udzielenie praw modyfikacji innemu Rezydentowi umożliwia modyfikację, usuwanie lub wzięcie JAKIEGOKOLWIEK z Twoich obiektów. Używaj tej opcji z rozwagą! Czy chcesz udzielić prawa do modyfikacji [NAME]?