Mercurial > pidgin
comparison src/gtkaccount.c @ 10932:3ad0e7351826
[gaim-migrate @ 12711]
This is a bit better, but needs work. Don't sign on accounts just because
you modified them. This should be adapted to use the currently active
status sometime.
committer: Tailor Script <tailor@pidgin.im>
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Thu, 19 May 2005 01:03:45 +0000 |
parents | ceb88f2a2f17 |
children | 77d26d0b7a0a |
comparison
equal
deleted
inserted
replaced
10931:ceb88f2a2f17 | 10932:3ad0e7351826 |
---|---|
1346 GList *l, *l2; | 1346 GList *l, *l2; |
1347 const char *value; | 1347 const char *value; |
1348 char *username; | 1348 char *username; |
1349 char *tmp; | 1349 char *tmp; |
1350 size_t index; | 1350 size_t index; |
1351 gboolean new = FALSE; | |
1351 GtkTreeIter iter; | 1352 GtkTreeIter iter; |
1352 GaimAccount *ret; | 1353 GaimAccount *ret; |
1353 | 1354 |
1354 if (dialog->account == NULL) | 1355 if (dialog->account == NULL) |
1355 { | 1356 { |
1357 | 1358 |
1358 screenname = gtk_entry_get_text(GTK_ENTRY(dialog->screenname_entry)); | 1359 screenname = gtk_entry_get_text(GTK_ENTRY(dialog->screenname_entry)); |
1359 | 1360 |
1360 dialog->account = gaim_account_new(screenname, dialog->protocol_id); | 1361 dialog->account = gaim_account_new(screenname, dialog->protocol_id); |
1361 gaim_account_set_enabled(dialog->account, GAIM_GTK_UI, TRUE); | 1362 gaim_account_set_enabled(dialog->account, GAIM_GTK_UI, TRUE); |
1363 new = TRUE; | |
1362 } | 1364 } |
1363 else | 1365 else |
1364 { | 1366 { |
1365 /* Protocol */ | 1367 /* Protocol */ |
1366 gaim_account_set_protocol_id(dialog->account, dialog->protocol_id); | 1368 gaim_account_set_protocol_id(dialog->account, dialog->protocol_id); |
1536 add_account(accounts_window, dialog->account); | 1538 add_account(accounts_window, dialog->account); |
1537 gaim_accounts_add(dialog->account); | 1539 gaim_accounts_add(dialog->account); |
1538 } | 1540 } |
1539 } | 1541 } |
1540 | 1542 |
1541 gaim_presence_set_status_active(dialog->account->presence, "online", TRUE); | |
1542 ret = dialog->account; | 1543 ret = dialog->account; |
1543 | 1544 |
1544 account_win_destroy_cb(NULL, NULL, dialog); | 1545 account_win_destroy_cb(NULL, NULL, dialog); |
1545 | 1546 |
1546 gaim_signal_emit(gaim_gtk_account_get_handle(), "account-modified", ret); | 1547 gaim_signal_emit(gaim_gtk_account_get_handle(), "account-modified", ret); |
1548 | |
1549 /* XXX: make the new account sign on with the currently active global status | |
1550 * instead of hardcoding "online" */ | |
1551 if (new) | |
1552 gaim_presence_set_status_active(dialog->account->presence, "online", TRUE); | |
1547 | 1553 |
1548 return ret; | 1554 return ret; |
1549 } | 1555 } |
1550 | 1556 |
1551 static void | 1557 static void |