diff options
author | dequis <dx@dxzone.com.ar> | 2015-05-28 00:41:37 -0300 |
---|---|---|
committer | dequis <dx@dxzone.com.ar> | 2015-05-28 02:26:30 -0300 |
commit | b38f6555bd32356ac6befe329fea1764912ede96 (patch) | |
tree | d736d0aeddda527aa490bf0496525efcf112e198 | |
parent | 0864a524c9fd1184874d550216beb49f6a0bef55 (diff) |
Rename mail notification related settings for consistency
- GMail notifications stuff is now just 'mail_notifications'
- sed -i s/notify_handle/mail_notifications_handle/
-rw-r--r-- | doc/user-guide/commands.xml | 15 | ||||
-rw-r--r-- | protocols/bee_user.c | 2 | ||||
-rw-r--r-- | protocols/jabber/iq.c | 2 | ||||
-rw-r--r-- | protocols/jabber/jabber.c | 14 | ||||
-rw-r--r-- | protocols/msn/msn.c | 6 | ||||
-rw-r--r-- | protocols/purple/purple.c | 6 | ||||
-rw-r--r-- | protocols/yahoo/yahoo.c | 6 |
7 files changed, 21 insertions, 30 deletions
diff --git a/doc/user-guide/commands.xml b/doc/user-guide/commands.xml index 40387585..0de4dfcf 100644 --- a/doc/user-guide/commands.xml +++ b/doc/user-guide/commands.xml @@ -1016,13 +1016,13 @@ <description> <para> - Some protocols (MSN, Yahoo!) can notify via IM about new e-mail. Since most people use their Hotmail/Yahoo! addresses as a spam-box, this is disabled default. If you want these notifications, you can enable this setting. + Some protocols (MSN, Yahoo!, GTalk) can notify via IM about new e-mail. Since most people use their Hotmail/Yahoo! addresses as a spam-box, this is disabled default. If you want these notifications, you can enable this setting. </para> </description> </bitlbee-setting> - <bitlbee-setting name="notify_handle" type="string" scope="account"> + <bitlbee-setting name="mail_notifications_handle" type="string" scope="account"> <default>empty</default> <description> @@ -1033,17 +1033,6 @@ </bitlbee-setting> - <bitlbee-setting name="gmail_notifications" type="boolean" scope="account"> - <default>false</default> - - <description> - <para> - Same as "mail_notifications" but GMail specific. - </para> - </description> - - </bitlbee-setting> - <bitlbee-setting name="message_length" type="integer" scope="account"> <default>140</default> diff --git a/protocols/bee_user.c b/protocols/bee_user.c index 3088de5c..2d63bfb4 100644 --- a/protocols/bee_user.c +++ b/protocols/bee_user.c @@ -285,7 +285,7 @@ void imcb_notify_email(struct im_connection *ic, char *format, ...) va_end(params); /* up to the protocol to set_add this if they want to use this */ - handle = set_getstr(&ic->acc->set, "notify_handle"); + handle = set_getstr(&ic->acc->set, "mail_notifications_handle"); if (handle != NULL) { imcb_buddy_msg(ic, handle, msg, 0, 0); diff --git a/protocols/jabber/iq.c b/protocols/jabber/iq.c index 1a915e4a..327cc859 100644 --- a/protocols/jabber/iq.c +++ b/protocols/jabber/iq.c @@ -802,7 +802,7 @@ xt_status jabber_iq_parse_gmail(struct im_connection *ic, struct xt_node *node, return XT_HANDLED; } - max = set_getint(&ic->acc->set, "gmail_notifications_limit"); + max = set_getint(&ic->acc->set, "mail_notifications_limit"); c = c->children; while ((max-- > 0) && (c = xt_find_node(c, "mail-thread-info"))) { diff --git a/protocols/jabber/jabber.c b/protocols/jabber/jabber.c index 08da6e26..431b3e54 100644 --- a/protocols/jabber/jabber.c +++ b/protocols/jabber/jabber.c @@ -100,14 +100,14 @@ static void jabber_init(account_t *acc) s = set_add(&acc->set, "xmlconsole", "false", set_eval_bool, acc); - s = set_add(&acc->set, "gmail_notifications", "false", set_eval_bool, acc); + s = set_add(&acc->set, "mail_notifications", "false", set_eval_bool, acc); s->flags |= ACC_SET_OFFLINE_ONLY; /* changing this is rarely needed so keeping it secret */ - s = set_add(&acc->set, "gmail_notifications_limit", "5", set_eval_int, acc); + s = set_add(&acc->set, "mail_notifications_limit", "5", set_eval_int, acc); s->flags |= SET_HIDDEN_DEFAULT; - s = set_add(&acc->set, "notify_handle", NULL, NULL, acc); + s = set_add(&acc->set, "mail_notifications_handle", NULL, NULL, acc); s->flags |= ACC_SET_OFFLINE_ONLY | SET_NULL_OK; acc->flags |= ACC_FLAG_AWAY_MESSAGE | ACC_FLAG_STATUS_MESSAGE | @@ -267,10 +267,12 @@ void jabber_connect(struct im_connection *ic) I think this shouldn't break anything. */ imcb_add_buddy(ic, JABBER_XMLCONSOLE_HANDLE, NULL); } - if (set_getbool(&acc->set, "gmail_notifications")) { + + if (set_getbool(&acc->set, "mail_notifications")) { + /* It's gmail specific, but it checks for server support before enabling it */ jd->flags |= JFLAG_GMAILNOTIFY; - if (set_getstr(&acc->set, "notify_handle")) { - imcb_add_buddy(ic, set_getstr(&acc->set, "notify_handle"), NULL); + if (set_getstr(&acc->set, "mail_notifications_handle")) { + imcb_add_buddy(ic, set_getstr(&acc->set, "mail_notifications_handle"), NULL); } } diff --git a/protocols/msn/msn.c b/protocols/msn/msn.c index c5567a14..8d3e7787 100644 --- a/protocols/msn/msn.c +++ b/protocols/msn/msn.c @@ -48,7 +48,7 @@ static void msn_init(account_t *acc) s = set_add(&acc->set, "mail_notifications", "false", set_eval_bool, acc); s->flags |= ACC_SET_OFFLINE_ONLY; - s = set_add(&acc->set, "notify_handle", NULL, NULL, acc); + s = set_add(&acc->set, "mail_notifications_handle", NULL, NULL, acc); s->flags |= ACC_SET_OFFLINE_ONLY | SET_NULL_OK; acc->flags |= ACC_FLAG_AWAY_MESSAGE | ACC_FLAG_STATUS_MESSAGE | @@ -86,8 +86,8 @@ static void msn_login(account_t *acc) msn_ns_connect(ic, server, set_getint(&ic->acc->set, "port")); - if (set_getbool(&acc->set, "mail_notifications") && set_getstr(&acc->set, "notify_handle")) { - imcb_add_buddy(ic, set_getstr(&acc->set, "notify_handle"), NULL); + if (set_getbool(&acc->set, "mail_notifications") && set_getstr(&acc->set, "mail_notifications_handle")) { + imcb_add_buddy(ic, set_getstr(&acc->set, "mail_notifications_handle"), NULL); } } diff --git a/protocols/purple/purple.c b/protocols/purple/purple.c index ab958891..b00d3078 100644 --- a/protocols/purple/purple.c +++ b/protocols/purple/purple.c @@ -238,7 +238,7 @@ static void purple_init(account_t *acc) s = set_add(&acc->set, "mail_notifications", "false", set_eval_bool, acc); s->flags |= ACC_SET_OFFLINE_ONLY; - s = set_add(&acc->set, "notify_handle", NULL, NULL, acc); + s = set_add(&acc->set, "mail_notifications_handle", NULL, NULL, acc); s->flags |= ACC_SET_OFFLINE_ONLY | SET_NULL_OK; } @@ -335,8 +335,8 @@ static void purple_login(account_t *acc) purple_account_set_enabled(pd->account, "BitlBee", TRUE); - if (set_getbool(&acc->set, "mail_notifications") && set_getstr(&acc->set, "notify_handle")) { - imcb_add_buddy(ic, set_getstr(&acc->set, "notify_handle"), NULL); + if (set_getbool(&acc->set, "mail_notifications") && set_getstr(&acc->set, "mail_notifications_handle")) { + imcb_add_buddy(ic, set_getstr(&acc->set, "mail_notifications_handle"), NULL); } } diff --git a/protocols/yahoo/yahoo.c b/protocols/yahoo/yahoo.c index 2df454f3..9da12949 100644 --- a/protocols/yahoo/yahoo.c +++ b/protocols/yahoo/yahoo.c @@ -127,7 +127,7 @@ static void byahoo_init(account_t *acc) s = set_add(&acc->set, "mail_notifications", "false", set_eval_bool, acc); s->flags |= ACC_SET_OFFLINE_ONLY; - s = set_add(&acc->set, "notify_handle", NULL, NULL, acc); + s = set_add(&acc->set, "mail_notifications_handle", NULL, NULL, acc); s->flags |= ACC_SET_OFFLINE_ONLY | SET_NULL_OK; acc->flags |= ACC_FLAG_AWAY_MESSAGE | ACC_FLAG_STATUS_MESSAGE; @@ -151,8 +151,8 @@ static void byahoo_login(account_t *acc) yd->y2_id = yahoo_init(acc->user, acc->pass); yahoo_login(yd->y2_id, yd->current_status); - if (set_getbool(&acc->set, "mail_notifications") && set_getstr(&acc->set, "notify_handle")) { - imcb_add_buddy(ic, set_getstr(&acc->set, "notify_handle"), NULL); + if (set_getbool(&acc->set, "mail_notifications") && set_getstr(&acc->set, "mail_notifications_handle")) { + imcb_add_buddy(ic, set_getstr(&acc->set, "mail_notifications_handle"), NULL); } } |