# HG changeset patch # User Christian Hammond # Date 1054406122 0 # Node ID 6500a6c8d679d3d4799e919549ff7b568651459b # Parent ff89436b30d2fada9c3d2693c00d5350b21457cf [gaim-migrate @ 6022] Checkboxes update! committer: Tailor Script diff -r ff89436b30d2 -r 6500a6c8d679 src/connection.c --- a/src/connection.c Sat May 31 18:11:06 2003 +0000 +++ b/src/connection.c Sat May 31 18:35:22 2003 +0000 @@ -115,13 +115,13 @@ if (gaim_connection_get_state(gc) != GAIM_CONNECTING) gaim_blist_remove_account(gaim_connection_get_account(gc)); - gaim_event_broadcast(event_signoff, gc); - system_log(log_signoff, gc, NULL, OPT_LOG_BUDDY_SIGNON | OPT_LOG_MY_SIGNON); - serv_close(gc); gaim_connection_set_state(gc, GAIM_DISCONNECTED); + gaim_event_broadcast(event_signoff, gc); + system_log(log_signoff, gc, NULL, OPT_LOG_BUDDY_SIGNON | OPT_LOG_MY_SIGNON); + /* XXX Evil UI stuff!! */ do_away_menu(); do_proto_menu(); diff -r ff89436b30d2 -r 6500a6c8d679 src/gtkaccount.c --- a/src/gtkaccount.c Sat May 31 18:11:06 2003 +0000 +++ b/src/gtkaccount.c Sat May 31 18:35:22 2003 +0000 @@ -22,6 +22,7 @@ */ #include "gtkaccount.h" #include "account.h" +#include "event.h" #include "prefs.h" #include "stock.h" #include "gtkblist.h" @@ -58,6 +59,27 @@ return ((p && p->info->name) ? _(p->info->name) : _("Unknown")); } +static void +__account_signed_on_cb(GaimConnection *gc, AccountsDialog *dialog) +{ + +} + +static void +__signed_on_off_cb(GaimConnection *gc, AccountsDialog *dialog) +{ + GaimAccount *account = gaim_connection_get_account(gc); + GtkTreeModel *model = GTK_TREE_MODEL(dialog->model); + GtkTreeIter iter; + size_t index = g_list_index(gaim_accounts_get_all(), account); + + if (gtk_tree_model_iter_nth_child(model, &iter, NULL, index)) { + gtk_list_store_set(dialog->model, &iter, + COLUMN_ONLINE, gaim_account_is_connected(account), + -1); + } +} + static gint __window_destroy_cb(GtkWidget *w, GdkEvent *event, void *unused) { @@ -375,6 +397,10 @@ g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(__close_accounts_cb), dialog); + /* Setup some gaim signal handlers. */ + gaim_signal_connect(dialog, event_signon, __signed_on_off_cb, dialog); + gaim_signal_connect(dialog, event_signoff, __signed_on_off_cb, dialog); + gtk_widget_show(win); } diff -r ff89436b30d2 -r 6500a6c8d679 src/idle.c --- a/src/idle.c Sat May 31 18:11:06 2003 +0000 +++ b/src/idle.c Sat May 31 18:35:22 2003 +0000 @@ -39,6 +39,7 @@ #endif /* USE_SCREENSAVER */ #include "gaim.h" +#include "connection.h" #include "multi.h" #include "prpl.h" #include "prefs.h"