gaim/gaim

Parents a7cb4634e839
Children a7fd3c1a75f2
Ok, so I broke 1.2.0 with my last commit, hopefully this reverts everything.
--- a/src/account.c Wed Mar 16 21:03:34 2005 -0500
+++ b/src/account.c Thu Mar 17 00:17:05 2005 -0500
@@ -248,8 +248,8 @@
void
gaim_account_notify_added(GaimAccount *account, const char *id,
- const char *remote_user, const char *alias,
- const char *message, gboolean request_add)
+ const char *remote_user, const char *alias,
+ const char *message)
{
GaimAccountUiOps *ui_ops;
@@ -259,8 +259,7 @@
ui_ops = gaim_accounts_get_ui_ops();
if (ui_ops != NULL && ui_ops->notify_added != NULL)
- ui_ops->notify_added(account, remote_user, id, alias,
- message, request_add);
+ ui_ops->notify_added(account, remote_user, id, alias, message);
}
static void
--- a/src/account.h Wed Mar 16 21:03:34 2005 -0500
+++ b/src/account.h Thu Mar 17 00:17:05 2005 -0500
@@ -42,8 +42,8 @@
struct _GaimAccountUiOps
{
void (*notify_added)(GaimAccount *account, const char *remote_user,
- const char *id, const char *alias,
- const char *message, gboolean request_add);
+ const char *id, const char *alias,
+ const char *message);
};
struct _GaimAccount
@@ -131,7 +131,7 @@
* Notifies the user that the account was added to a remote user's
* buddy list.
*
- * This can present a dialog so that the local user can add the buddy,
+ * This will present a dialog so that the local user can add the buddy,
* if not already added.
*
* @param account The account that was added.
@@ -139,11 +139,10 @@
* @param id The optional ID of the local account. Rarely used.
* @param alias The optional alias of the user.
* @param message The optional message sent from the user adding you.
- * @param request_add Whether to ask about adding the buddy to the buddy list.
*/
void gaim_account_notify_added(GaimAccount *account, const char *remote_user,
- const char *id, const char *alias,
- const char *message, gboolean request_add);
+ const char *id, const char *alias,
+ const char *message);
/**
* Requests information from the user to change the account's password.
--- a/src/gtkaccount.c Wed Mar 16 21:03:34 2005 -0500
+++ b/src/gtkaccount.c Thu Mar 17 00:17:05 2005 -0500
@@ -2511,8 +2511,8 @@
static void
gaim_gtk_accounts_notify_added(GaimAccount *account, const char *remote_user,
- const char *id, const char *alias,
- const char *msg, gboolean request_add)
+ const char *id, const char *alias,
+ const char *msg)
{
char *buffer;
GaimConnection *gc;
@@ -2544,7 +2544,7 @@
? ""
: _("\n\nDo you wish to add him or her to your buddy list?")));
- if (!request_add)
+ if (buddy != NULL)
{
gaim_notify_info(NULL, NULL, _("Information"), buffer);
}
--- a/src/protocols/jabber/presence.c Wed Mar 16 21:03:34 2005 -0500
+++ b/src/protocols/jabber/presence.c Thu Mar 17 00:17:05 2005 -0500
@@ -156,7 +156,6 @@
}
struct _jabber_add_permit {
- JabberStream *js;
GaimConnection *gc;
char *who;
};
@@ -164,24 +163,11 @@
static void authorize_add_cb(struct _jabber_add_permit *jap)
{
if(g_list_find(gaim_connections_get_all(), jap->gc)) {
- GaimBuddy *buddy = NULL;
jabber_presence_subscription_set(jap->gc->proto_data, jap->who,
"subscribed");
- buddy = gaim_find_buddy(jap->gc->account, jap->who);
-
- if (buddy) {
- JabberBuddy *jb = NULL;
-
- jb = jabber_buddy_find(jap->js, jap->who, TRUE);
-
- gaim_account_notify_added(jap->gc->account, NULL,
- jap->who, NULL, NULL,
- ((jb->subscription & JABBER_SUB_TO) == 0));
- } else {
- gaim_account_notify_added(jap->gc->account, NULL,
- jap->who, NULL, NULL, TRUE);
- }
+ if(!gaim_find_buddy(jap->gc->account, jap->who))
+ gaim_account_notify_added(jap->gc->account, NULL, jap->who, NULL, NULL);
}
g_free(jap->who);
@@ -256,7 +242,6 @@
char *msg = g_strdup_printf(_("The user %s wants to add you to their buddy list."), from);
jap->gc = js->gc;
jap->who = g_strdup(from);
- jap->js = js;
gaim_request_action(js->gc, NULL, msg, NULL, GAIM_DEFAULT_ACTION_NONE,
jap, 2,
--- a/src/protocols/msn/userlist.c Wed Mar 16 21:03:34 2005 -0500
+++ b/src/protocols/msn/userlist.c Thu Mar 17 00:17:05 2005 -0500
@@ -47,7 +47,7 @@
msn_userlist_add_buddy(userlist, pa->who, MSN_LIST_AL, NULL);
/* TODO: This ask for the alias, right? */
- gaim_account_notify_added(pa->gc->account, NULL, pa->who, NULL, NULL, TRUE);
+ gaim_account_notify_added(pa->gc->account, NULL, pa->who, NULL, NULL);
}
g_free(pa->who);
--- a/src/protocols/oscar/oscar.c Wed Mar 16 21:03:34 2005 -0500
+++ b/src/protocols/oscar/oscar.c Thu Mar 17 00:17:05 2005 -0500
@@ -3660,7 +3660,7 @@
message = 0;
buddy = gaim_find_buddy(gc->account, data->name);
aim_im_sendch4(od->sess, data->name, AIM_ICQMSG_AUTHGRANTED, &message);
- gaim_account_notify_added(gc->account, NULL, data->name, (buddy ? gaim_buddy_get_alias_only(buddy) : NULL), NULL, TRUE);
+ gaim_account_notify_added(gc->account, NULL, data->name, (buddy ? gaim_buddy_get_alias_only(buddy) : NULL), NULL);
#else
aim_ssi_sendauthreply(od->sess, data->name, 0x01, NULL);
#endif
@@ -6401,7 +6401,7 @@
buddy = gaim_find_buddy(gc->account, sn);
gaim_debug_info("oscar",
"ssi: %s added you to their buddy list\n", sn);
- gaim_account_notify_added(gc->account, NULL, sn, (buddy ? gaim_buddy_get_alias_only(buddy) : NULL), NULL, TRUE);
+ gaim_account_notify_added(gc->account, NULL, sn, (buddy ? gaim_buddy_get_alias_only(buddy) : NULL), NULL);
return 1;
}
--- a/src/protocols/yahoo/yahoo.c Wed Mar 16 21:03:34 2005 -0500
+++ b/src/protocols/yahoo/yahoo.c Thu Mar 17 00:17:05 2005 -0500
@@ -1002,7 +1002,7 @@
if (id) {
if (msg)
tmpmsg = yahoo_string_decode(gc, msg, FALSE);
- gaim_account_notify_added(gc->account, id, who, NULL, tmpmsg, TRUE);
+ gaim_account_notify_added(gc->account, id, who, NULL, tmpmsg);
if (tmpmsg)
g_free(tmpmsg);
}