Mercurial > pidgin.yaz
diff src/gtkaccount.c @ 5592:57165429ed73
[gaim-migrate @ 5996]
You can sign on and off, but you can never leave.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sat, 31 May 2003 08:39:12 +0000 |
parents | 3a9b54f260e3 |
children | 6500a6c8d679 |
line wrap: on
line diff
--- a/src/gtkaccount.c Sat May 31 07:52:04 2003 +0000 +++ b/src/gtkaccount.c Sat May 31 08:39:12 2003 +0000 @@ -127,7 +127,18 @@ static void __online_cb(GtkCellRendererToggle *renderer, gchar *path_str, gpointer data) { - + AccountsDialog *dialog = (AccountsDialog *)data; + GaimAccount *account; + GtkTreeModel *model = GTK_TREE_MODEL(dialog->model); + GtkTreeIter iter; + + gtk_tree_model_get_iter_from_string(model, &iter, path_str); + gtk_tree_model_get(model, &iter, COLUMN_DATA, &account, -1); + + if (gaim_account_is_connected(account)) + gaim_account_disconnect(account); + else + gaim_account_connect(account); } static void