changeset 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 74a0e79ad627
children b07aa997ddd8
files src/gtkaccount.c src/prefs.c src/server.c
diffstat 3 files changed, 12 insertions(+), 5 deletions(-) [+]
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
--- a/src/prefs.c	Sat May 31 07:52:04 2003 +0000
+++ b/src/prefs.c	Sat May 31 08:39:12 2003 +0000
@@ -440,8 +440,6 @@
 gboolean gaim_prefs_get_bool(const char *name) {
 	struct gaim_pref *pref = find_pref(name);
 
-	gaim_debug(GAIM_DEBUG_MISC, "prefs", "key = %s\n", name);
-
 	g_return_val_if_fail(pref != NULL, FALSE);
 	g_return_val_if_fail(pref->type == GAIM_PREF_BOOLEAN, FALSE);
 
--- a/src/server.c	Sat May 31 07:52:04 2003 +0000
+++ b/src/server.c	Sat May 31 08:39:12 2003 +0000
@@ -122,8 +122,6 @@
 	}
 
 	prpl = gc->prpl;
-
-	gaim_account_disconnect(gaim_connection_get_account(gc));
 }
 
 void serv_touch_idle(GaimConnection *gc)