diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llui/llnotifications.cpp | 28 | ||||
-rw-r--r-- | indra/newview/app_settings/cmd_line.xml | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 44 |
3 files changed, 30 insertions, 44 deletions
diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index ab9bd12b85..d86b0183fc 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -133,12 +133,6 @@ private: bool filterIgnoredNotifications(LLNotificationPtr notification) { - // filter everything if we are to ignore ALL - if(LLNotifications::instance().getIgnoreAllNotifications()) - { - return false; - } - LLNotificationFormPtr form = notification->getForm(); // Check to see if the user wants to ignore this alert return !notification->getForm()->getIgnored(); @@ -173,6 +167,20 @@ bool handleIgnoredNotification(const LLSD& payload) return false; } +bool defaultResponse(const LLSD& payload) +{ + if (payload["sigtype"].asString() == "add") + { + LLNotificationPtr pNotif = LLNotifications::instance().find(payload["id"].asUUID()); + if (pNotif) + { + // supply default response + pNotif->respond(pNotif->getResponseTemplate(LLNotification::WITH_DEFAULT_BUTTON)); + } + } + return false; +} + namespace LLNotificationFilters { // a sample filter @@ -1187,9 +1195,11 @@ void LLNotifications::createDefaultChannels() { // now construct the various channels AFTER loading the notifications, // because the history channel is going to rewrite the stored notifications file - LLNotificationChannel::buildChannel("Expiration", "", + LLNotificationChannel::buildChannel("Enabled", "", + !boost::bind(&LLNotifications::getIgnoreAllNotifications, this)); + LLNotificationChannel::buildChannel("Expiration", "Enabled", boost::bind(&LLNotifications::expirationFilter, this, _1)); - LLNotificationChannel::buildChannel("Unexpired", "", + LLNotificationChannel::buildChannel("Unexpired", "Enabled", !boost::bind(&LLNotifications::expirationFilter, this, _1)); // use negated bind LLNotificationChannel::buildChannel("Unique", "Unexpired", boost::bind(&LLNotifications::uniqueFilter, this, _1)); @@ -1203,6 +1213,8 @@ void LLNotifications::createDefaultChannels() new LLPersistentNotificationChannel(); // connect action methods to these channels + LLNotifications::instance().getChannel("Enabled")-> + connectFailedFilter(&defaultResponse); LLNotifications::instance().getChannel("Expiration")-> connectChanged(boost::bind(&LLNotifications::expirationHandler, this, _1)); // uniqueHandler slot should be added as first slot of the signal due to diff --git a/indra/newview/app_settings/cmd_line.xml b/indra/newview/app_settings/cmd_line.xml index 00d69f805e..962c4e9d36 100644 --- a/indra/newview/app_settings/cmd_line.xml +++ b/indra/newview/app_settings/cmd_line.xml @@ -149,7 +149,7 @@ <key>nonotifications</key> <map> <key>desc</key> - <string>User will not get any notifications. NOTE: All notifications that occur will get added to ignore file for future runs.</string> + <string>User will not get any notifications.</string> <key>map-to</key> <string>IgnoreAllNotifications</string> </map> diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index e1aecda151..5966db9d51 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -2069,7 +2069,7 @@ Would you be my friend? <button default="true" index="0" - name="Offer" + name="OK" text="OK"/> <button index="1" @@ -2091,7 +2091,7 @@ Would you be my friend? <button default="true" index="0" - name="Offer" + name="OK" text="OK"/> <button index="1" @@ -2114,7 +2114,7 @@ Would you be my friend? <button default="true" index="0" - name="Offer" + name="OK" text="OK"/> <button index="1" @@ -4812,24 +4812,6 @@ Please select at least one type of content to search (General, Moderate, or Adul <notification icon="notify.tga" - name="GroupVote" - type="notify"> -[NAME] has proposed to vote on: -[MESSAGE] - <form name="form"> - <button - index="0" - name="VoteNow" - text="Vote Now"/> - <button - index="1" - name="Later" - text="Later"/> - </form> - </notification> - - <notification - icon="notify.tga" name="SystemMessage" persist="true" type="notify"> @@ -6313,13 +6295,9 @@ Avatar '[NAME]' left appearance mode. type="alertmodal"> We're having trouble connecting using [PROTOCOL] [HOSTID]. Please check your network and firewall setup. - <form name="form"> - <button - default="true" - index="0" - name="OK" - text="OK"/> - </form> + <usetemplate + name="okbutton" + yestext="OK"/> </notification> <notification @@ -6332,13 +6310,9 @@ We're having trouble connecting to your voice server: Voice communications will not be available. Please check your network and firewall setup. - <form name="form"> - <button - default="true" - index="0" - name="OK" - text="OK"/> - </form> + <usetemplate + name="okbutton" + yestext="OK"/> </notification> <notification |