changeset 2248:cef6d4e81aec

[gaim-migrate @ 2258] per-account? global? i don't know. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Sun, 09 Sep 2001 11:33:08 +0000
parents f721ae9582d5
children 59a11f4fa4d0
files src/gaim.h src/multi.c src/multi.h src/protocols/oscar/oscar.c
diffstat 4 files changed, 16 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/src/gaim.h	Sun Sep 09 10:12:26 2001 +0000
+++ b/src/gaim.h	Sun Sep 09 11:33:08 2001 +0000
@@ -126,6 +126,9 @@
 	 * like which server to connect to, etc */
 	char proto_opt[7][256];
 
+	/* buddy icon file */
+	char *iconfile;
+
 	struct gaim_connection *gc;
 
 	/* stuff for modify window */
--- a/src/multi.c	Sun Sep 09 10:12:26 2001 +0000
+++ b/src/multi.c	Sun Sep 09 11:33:08 2001 +0000
@@ -47,7 +47,7 @@
 static GtkWidget *newmod = NULL;	/* the dialog for creating a new account */
 static GtkWidget *newmain = NULL;	/* the notebook that holds options */
 static struct aim_user tmpusr = { "", "", "", OPT_USR_REM_PASS, DEFAULT_PROTO,
-		{ "", "", "", "", "", "", "" }, NULL, NULL, NULL, NULL, NULL,
+		{ "", "", "", "", "", "", "" }, NULL, NULL, NULL, NULL, NULL, NULL,
 		NULL, NULL, OPT_USR_REM_PASS, DEFAULT_PROTO, NULL, NULL, NULL };
 
 static void generate_prpl_options(struct aim_user *, GtkWidget *);
--- a/src/multi.h	Sun Sep 09 10:12:26 2001 +0000
+++ b/src/multi.h	Sun Sep 09 11:33:08 2001 +0000
@@ -78,9 +78,6 @@
 	/* email notification (MSN and Yahoo) */
 	GtkWidget *email_win;
 	GtkWidget *email_label;
-
-	/* buddy icon file */
-	char *iconfile;
 };
 
 struct proto_user_opt {
--- a/src/protocols/oscar/oscar.c	Sun Sep 09 10:12:26 2001 +0000
+++ b/src/protocols/oscar/oscar.c	Sun Sep 09 11:33:08 2001 +0000
@@ -1286,13 +1286,14 @@
 		ir->timestamp = args->iconstamp;
 	}
 
-	if (gc->iconfile && (args->icbmflags & AIM_IMFLAGS_BUDDYREQ)) {
+	/*if (gc->user->iconfile && (args->icbmflags & AIM_IMFLAGS_BUDDYREQ)) {*/
+	if (gc->user->iconfile) {
 		FILE *file;
 		struct stat st;
 
-		if (!stat(gc->iconfile, &st)) {
+		if (!stat(gc->user->iconfile, &st)) {
 			char *buf = g_malloc(st.st_size);
-			file = fopen(gc->iconfile, "r");
+			file = fopen(gc->user->iconfile, "r");
 			if (file) {
 				fread(buf, 1, st.st_size, file);
 				aim_send_icon(sess, conn, userinfo->sn, buf, st.st_size,
@@ -2076,8 +2077,12 @@
 			struct icon_req *ir = NULL;
 			char *who = normalize(name);
 			struct stat st;
-
-			args.flags = AIM_IMFLAGS_ACK;
+			static fu8_t features[] = {0x01, 0x01, 0x01, 0x02, 0x66};
+
+			args.flags = AIM_IMFLAGS_ACK | AIM_IMFLAGS_CUSTOMFEATURES;
+
+			args.features = features;
+			args.featureslen = sizeof(features);
 
 			while (h) {
 				ir = h->data;
@@ -2091,8 +2096,8 @@
 				debug_printf("sending buddy icon request with message\n");
 			}
 
-			if (gc->iconfile && !stat(gc->iconfile, &st)) {
-				FILE *file = fopen(gc->iconfile, "r");
+			if (gc->user->iconfile && !stat(gc->user->iconfile, &st)) {
+				FILE *file = fopen(gc->user->iconfile, "r");
 				if (file) {
 					char *buf = g_malloc(st.st_size);
 					fread(buf, 1, st.st_size, file);