changeset 2317:ab8ca5d75dcd

[gaim-migrate @ 2327] hi committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Thu, 20 Sep 2001 04:50:50 +0000
parents ebb5ecb2cd5b
children a7bfb5dfab25
files src/gaim.h src/gaimrc.c src/multi.c
diffstat 3 files changed, 16 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/gaim.h	Thu Sep 20 04:29:56 2001 +0000
+++ b/src/gaim.h	Thu Sep 20 04:50:50 2001 +0000
@@ -122,7 +122,7 @@
 	char proto_opt[7][256];
 
 	/* buddy icon file */
-	char *iconfile;
+	char iconfile[256];
 
 	struct gaim_connection *gc;
 
--- a/src/gaimrc.c	Thu Sep 20 04:29:56 2001 +0000
+++ b/src/gaimrc.c	Thu Sep 20 04:50:50 2001 +0000
@@ -482,6 +482,19 @@
 	for (i = 0; i < 7; i++)
 		g_snprintf(u->proto_opt[i], sizeof u->proto_opt[i], "%s", p->value[i]);
 
+	if (!fgets(buf, sizeof(buf), f))
+		return u;
+
+	if (!strcmp(buf, "\t}"))
+		return u;
+
+	p = parse_line(buf);
+
+	if (strcmp(p->option, "iconfile"))
+		return u;
+
+	g_snprintf(u->iconfile, sizeof(u->iconfile), "%s", p->value[0]);
+
 	return u;
 
 }
@@ -517,6 +530,7 @@
 	for (i = 0; i < 7; i++)
 		fprintf(f, " { %s }", u->proto_opt[i]);
 	fprintf(f, "\n");
+	fprintf(f, "\t\ticonfile { %s }\n", u->iconfile);
 }
 
 
--- a/src/multi.c	Thu Sep 20 04:29:56 2001 +0000
+++ b/src/multi.c	Thu Sep 20 04:50:50 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 *);