changeset 1878:75643b9f4261

[gaim-migrate @ 1888] eh. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Tue, 22 May 2001 09:05:21 +0000
parents a333eccaae93
children 6497ee3751cf
files src/aim.c src/gaimrc.c src/multi.c src/prpl.h src/util.c
diffstat 5 files changed, 10 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/aim.c	Tue May 22 08:35:02 2001 +0000
+++ b/src/aim.c	Tue May 22 09:05:21 2001 +0000
@@ -159,7 +159,7 @@
 	 * to use the account editor to sign in the second one */
 	u = find_user(username, -1);
 	if (!u)
-		u = new_user(username, PROTO_TOC, OPT_USR_REM_PASS);
+		u = new_user(username, DEFAULT_PROTO, OPT_USR_REM_PASS);
 	g_snprintf(u->password, sizeof u->password, "%s", password);
 	save_prefs();
 	serv_login(u);
--- a/src/gaimrc.c	Tue May 22 08:35:02 2001 +0000
+++ b/src/gaimrc.c	Tue May 22 09:05:21 2001 +0000
@@ -471,7 +471,7 @@
 
 	u->user_info[0] = 0;
 	u->options = OPT_USR_REM_PASS;
-	u->protocol = PROTO_TOC;
+	u->protocol = DEFAULT_PROTO;
 
 	if (!fgets(buf, sizeof(buf), f))
 		return u;
--- a/src/multi.c	Tue May 22 08:35:02 2001 +0000
+++ b/src/multi.c	Tue May 22 09:05:21 2001 +0000
@@ -42,7 +42,9 @@
 static GtkWidget *list = NULL;	/* the clist of names in the accteditor */
 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;
+static struct aim_user tmpusr = { "", "", "", OPT_USR_REM_PASS, DEFAULT_PROTO,
+		{ "", "", "", "", "", "", "" }, NULL, NULL, NULL, NULL, NULL,
+		OPT_USR_REM_PASS, DEFAULT_PROTO, NULL, NULL, NULL };
 
 static void generate_prpl_options(struct aim_user *, GtkWidget *);
 
@@ -284,13 +286,13 @@
 	struct aim_user *u = gtk_object_get_user_data(GTK_OBJECT(opt));
 	if (u && (u->tmp_protocol != proto)) {
 		int i;
-		for (i = 0; i < 6; i++)
+		for (i = 0; i < 7; i++)
 			u->proto_opt[i][0] = '\0';
 		u->tmp_protocol = proto;
 		generate_prpl_options(u, u->main);
 	} else if (tmpusr.tmp_protocol != proto) {
 		int i;
-		for (i = 0; i < 6; i++)
+		for (i = 0; i < 7; i++)
 			tmpusr.proto_opt[i][0] = '\0';
 		tmpusr.tmp_protocol = tmpusr.protocol = proto;
 		generate_prpl_options(NULL, newmain);
--- a/src/prpl.h	Tue May 22 08:35:02 2001 +0000
+++ b/src/prpl.h	Tue May 22 09:05:21 2001 +0000
@@ -36,6 +36,8 @@
 #define PROTO_NAPSTER	9
 #define PROTO_ZEPHYR   10
 
+#define DEFAULT_PROTO   PROTO_OSCAR
+
 /* These should all be stuff that some plugins can do and others can't */
 /* TOC/Oscar send HTML-encoded messages; most other protocols don't */
 #define OPT_PROTO_HTML            0x00000001
--- a/src/util.c	Tue May 22 08:35:02 2001 +0000
+++ b/src/util.c	Tue May 22 09:05:21 2001 +0000
@@ -1183,7 +1183,7 @@
 	if (!u) {		/* new user */
 		u = g_new0(struct aim_user, 1);
 		g_snprintf(u->username, sizeof(u->username), "%s", name);
-		u->protocol = 0 /* PROTO_TOC */ ;
+		u->protocol = DEFAULT_PROTO;
 		aim_users = g_list_prepend(aim_users, u);
 	} else {		/* user already exists */
 		aim_users = g_list_remove(aim_users, u);