comparison src/main.c @ 7132:d17a587efeb3

[gaim-migrate @ 7699] new blist parser code, and some tweaks to the account code to make my next commit possible. the other parser code can get moved over to this model to make things cleaner, but i'm too lazy to do it now. committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Fri, 03 Oct 2003 21:49:11 +0000
parents 9220c7490cd1
children e09020153d85
comparison
equal deleted inserted replaced
7131:af889fd531d0 7132:d17a587efeb3
143 143
144 /* if there is more than one user of the same name, then fuck 144 /* if there is more than one user of the same name, then fuck
145 * them, they just have to use the account editor to sign in 145 * them, they just have to use the account editor to sign in
146 * the second one */ 146 * the second one */
147 147
148 account = gaim_accounts_find(username, -1); 148 account = gaim_accounts_find(username, NULL);
149 if (!account) { 149 if (!account) {
150 account = gaim_account_new(username, "prpl-oscar"); 150 account = gaim_account_new(username, "prpl-oscar");
151 gaim_account_set_remember_password(account, TRUE); 151 gaim_account_set_remember_password(account, TRUE);
152 gaim_accounts_add(account); 152 gaim_accounts_add(account);
153 } 153 }
171 int retval = -1; 171 int retval = -1;
172 172
173 if (name !=NULL) { /* list of names given */ 173 if (name !=NULL) { /* list of names given */
174 names = g_strsplit(name, ",", 32); 174 names = g_strsplit(name, ",", 32);
175 for (n = names; *n != NULL; n++) { 175 for (n = names; *n != NULL; n++) {
176 account = gaim_accounts_find(*n, -1); 176 account = gaim_accounts_find(*n, NULL);
177 if (account) { /* found a user */ 177 if (account) { /* found a user */
178 retval = 0; 178 retval = 0;
179 gaim_account_connect(account); 179 gaim_account_connect(account);
180 } 180 }
181 } 181 }
201 static void combo_changed(GtkWidget *w, GtkWidget *combo) 201 static void combo_changed(GtkWidget *w, GtkWidget *combo)
202 { 202 {
203 const char *txt = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(combo)->entry)); 203 const char *txt = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(combo)->entry));
204 GaimAccount *account; 204 GaimAccount *account;
205 205
206 account = gaim_accounts_find(txt, -1); 206 account = gaim_accounts_find(txt, NULL);
207 207
208 if (account && gaim_account_get_remember_password(account)) { 208 if (account && gaim_account_get_remember_password(account)) {
209 gtk_entry_set_text(GTK_ENTRY(pass), account->password); 209 gtk_entry_set_text(GTK_ENTRY(pass), account->password);
210 } else { 210 } else {
211 gtk_entry_set_text(GTK_ENTRY(pass), ""); 211 gtk_entry_set_text(GTK_ENTRY(pass), "");
461 461
462 static void set_first_user(char *name) 462 static void set_first_user(char *name)
463 { 463 {
464 GaimAccount *account; 464 GaimAccount *account;
465 465
466 account = gaim_accounts_find(name, -1); 466 account = gaim_accounts_find(name, NULL);
467 467
468 if (account == NULL) { /* new user */ 468 if (account == NULL) { /* new user */
469 account = gaim_account_new(name, "prpl-oscar"); 469 account = gaim_account_new(name, "prpl-oscar");
470 gaim_accounts_add(account); 470 gaim_accounts_add(account);
471 } 471 }