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.
Liny 2012-10-01 16:09:16 -07:00
parent f0bf17c824
commit e43847574f
3 changed files with 50 additions and 0 deletions

View File

@ -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);
// </FS:AW opensim search support>
#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<LLUICtrl>("OnlineOfflinetoNearbyChat")->getValue().asBoolean());
}
#ifdef LL_WINDOWS
if (hasChild("notify_growl_checkbox", TRUE))
{
getChild<LLCheckBoxCtrl>("notify_growl_checkbox")->setCommitCallback(boost::bind(&showGrowlNotInstalledWarning, _1, _2));
}
#endif
#ifdef HAS_OPENSIM_SUPPORT // <FS:AW optional opensim support/>
// <FS:AW Disable LSL bridge on opensim>
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();

View File

@ -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<std::string, LLColor4> string_color_map_t;
string_color_map_t mSavedColors;

View File

@ -369,6 +369,19 @@ Save all changes to clothing/body parts?
yestext="OK"/>
</notification>
<notification
icon="alertmodal.tga"
name="GrowlNotInstalled"
type="alertmodal">
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?
<usetemplate
name="okcancelbuttons"
notext="No"
yestext="Yes"/>
</notification>
<notification
icon="alertmodal.tga"
name="GrantModifyRights"