From e43847574f37e579d4de9db4eda32fd330810704 Mon Sep 17 00:00:00 2001 From: Liny Date: Mon, 1 Oct 2012 16:09:16 -0700 Subject: [PATCH] FIRE-7050 - Add a warning to the Growl preference option because of FIRE-6868 Warning only shows up for windows as mac and linux are immune to the bug due to how the windows growl lib works. --- indra/newview/llfloaterpreference.cpp | 33 +++++++++++++++++++ indra/newview/llfloaterpreference.h | 4 +++ .../skins/default/xui/en/notifications.xml | 13 ++++++++ 3 files changed, 50 insertions(+) diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 662d6afefa..b5eafaf398 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -212,6 +212,10 @@ bool callback_clear_debug_search(const LLSD& notification, const LLSD& response) bool callback_pick_debug_search(const LLSD& notification, const LLSD& response); // +#ifdef LL_WINDOWS +bool callback_growl_not_installed(const LLSD& notification, const LLSD& response); +#endif + //bool callback_skip_dialogs(const LLSD& notification, const LLSD& response, LLFloaterPreference* floater); //bool callback_reset_dialogs(const LLSD& notification, const LLSD& response, LLFloaterPreference* floater); @@ -230,6 +234,19 @@ bool callback_clear_cache(const LLSD& notification, const LLSD& response) return false; } +#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); @@ -2184,6 +2201,12 @@ BOOL LLPanelPreference::postBuild() { getChildView("OnlineOfflinetoNearbyChatHistory")->setEnabled(getChild("OnlineOfflinetoNearbyChat")->getValue().asBoolean()); } +#ifdef LL_WINDOWS + if (hasChild("notify_growl_checkbox", TRUE)) + { + getChild("notify_growl_checkbox")->setCommitCallback(boost::bind(&showGrowlNotInstalledWarning, _1, _2)); + } +#endif #ifdef HAS_OPENSIM_SUPPORT // // if(LLGridManager::getInstance()->isInOpenSim() && hasChild("UseLSLBridge", TRUE)) @@ -2278,6 +2301,16 @@ void LLPanelPreference::showFavoritesOnLoginWarning(LLUICtrl* checkbox, const LL } } +#ifdef LL_WINDOWS +void LLPanelPreference::showGrowlNotInstalledWarning(LLUICtrl* checkbox, const LLSD& value) +{ + if (checkbox && checkbox->getValue()) + { + LLNotificationsUtil::add("GrowlNotInstalled",LLSD(), LLSD(), callback_growl_not_installed); + } +} +#endif + void LLPanelPreference::cancel() { for (control_values_map_t::iterator iter = mSavedValues.begin(); diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index ab391d7be3..541c27268b 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -245,6 +245,10 @@ private: //for "Show my Favorite Landmarks at Login" static void showFavoritesOnLoginWarning(LLUICtrl* checkbox, const LLSD& value); +#ifdef LL_WINDOWS + static void showGrowlNotInstalledWarning(LLUICtrl* checkbox, const LLSD& value); +#endif + typedef std::map string_color_map_t; string_color_map_t mSavedColors; diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 5ed0a4364a..2fd6aed5e0 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -369,6 +369,19 @@ Save all changes to clothing/body parts? 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? + + +