comparison src/gtkaccount.c @ 10720:0e017707532f

[gaim-migrate @ 12318] We can now sign on and off and on and off accounts all the live long day using the "enabled" button in the accounts window committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Thu, 24 Mar 2005 04:36:09 +0000
parents ad57a8b5495e
children 9c52a83fc3ac
comparison
equal deleted inserted replaced
10719:1da76f22c750 10720:0e017707532f
1355 1355
1356 screenname = gtk_entry_get_text(GTK_ENTRY(dialog->screenname_entry)); 1356 screenname = gtk_entry_get_text(GTK_ENTRY(dialog->screenname_entry));
1357 1357
1358 dialog->account = gaim_account_new(screenname, dialog->protocol_id); 1358 dialog->account = gaim_account_new(screenname, dialog->protocol_id);
1359 gaim_account_set_enabled(dialog->account, GAIM_GTK_UI, TRUE); 1359 gaim_account_set_enabled(dialog->account, GAIM_GTK_UI, TRUE);
1360
1361 } 1360 }
1362 else 1361 else
1363 { 1362 {
1364 /* Protocol */ 1363 /* Protocol */
1365 gaim_account_set_protocol_id(dialog->account, dialog->protocol_id); 1364 gaim_account_set_protocol_id(dialog->account, dialog->protocol_id);
2040 gtk_tree_model_get(model, &iter, 2039 gtk_tree_model_get(model, &iter,
2041 COLUMN_DATA, &account, 2040 COLUMN_DATA, &account,
2042 COLUMN_ENABLED, &enabled, 2041 COLUMN_ENABLED, &enabled,
2043 -1); 2042 -1);
2044 if (enabled) { 2043 if (enabled) {
2045 gaim_account_disconnect(account); 2044 gaim_account_set_status(account, "offline", TRUE, NULL);
2046 } else { 2045 } else {
2047 GaimGtkBuddyList *gtkblist; 2046 GaimGtkBuddyList *gtkblist;
2048 const char *type; 2047 const char *type;
2049 GaimStatus *status; 2048 GaimStatus *status;
2050 GaimStatusType *status_type; 2049 GaimStatusType *status_type;