Mercurial > pidgin
comparison src/protocols/jabber/jabber.c @ 3730:a20bf3d247ff
[gaim-migrate @ 3868]
Pretty do_ask_dialog. I also "fixed" the "hitting yes calls the 'no' function
anyway" behavior.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Thu, 17 Oct 2002 21:29:53 +0000 |
parents | 988485669631 |
children | f53370197bb9 |
comparison
equal
deleted
inserted
replaced
3729:a8f0c169e529 | 3730:a20bf3d247ff |
---|---|
1597 } | 1597 } |
1598 | 1598 |
1599 /* | 1599 /* |
1600 * Callback from "accept" in do_ask_dialog() invoked by jabber_handles10n() | 1600 * Callback from "accept" in do_ask_dialog() invoked by jabber_handles10n() |
1601 */ | 1601 */ |
1602 static void jabber_accept_add(gpointer w, struct jabber_add_permit *jap) | 1602 static void jabber_accept_add(struct jabber_add_permit *jap) |
1603 { | 1603 { |
1604 jabber_accept_deny_add(jap, "subscribed"); | 1604 jabber_accept_deny_add(jap, "subscribed"); |
1605 /* | 1605 /* |
1606 * If we don't already have the buddy on *our* buddylist, | 1606 * If we don't already have the buddy on *our* buddylist, |
1607 * ask if we want him or her added. | 1607 * ask if we want him or her added. |
1614 } | 1614 } |
1615 | 1615 |
1616 /* | 1616 /* |
1617 * Callback from "deny/cancel" in do_ask_dialog() invoked by jabber_handles10n() | 1617 * Callback from "deny/cancel" in do_ask_dialog() invoked by jabber_handles10n() |
1618 */ | 1618 */ |
1619 static void jabber_deny_add(gpointer w, struct jabber_add_permit *jap) | 1619 static void jabber_deny_add(struct jabber_add_permit *jap) |
1620 { | 1620 { |
1621 jabber_accept_deny_add(jap, "unsubscribed"); | 1621 jabber_accept_deny_add(jap, "unsubscribed"); |
1622 g_free(jap->user); | 1622 g_free(jap->user); |
1623 g_free(jap); | 1623 g_free(jap); |
1624 } | 1624 } |
1643 gchar *msg = g_strdup_printf(_("The user %s wants to add you to their buddy list."), | 1643 gchar *msg = g_strdup_printf(_("The user %s wants to add you to their buddy list."), |
1644 Jid); | 1644 Jid); |
1645 | 1645 |
1646 jap->gjc = gjc; | 1646 jap->gjc = gjc; |
1647 jap->user = g_strdup(Jid); | 1647 jap->user = g_strdup(Jid); |
1648 do_ask_dialog(msg, jap, jabber_accept_add, jabber_deny_add); | 1648 do_ask_dialog(msg, NULL, jap, _("Authorize"), jabber_accept_add, _("Deny"), jabber_deny_add); |
1649 | 1649 |
1650 g_free(msg); | 1650 g_free(msg); |
1651 xmlnode_free(g); /* Never needed it here anyway */ | 1651 xmlnode_free(g); /* Never needed it here anyway */ |
1652 return; | 1652 return; |
1653 | 1653 |