Mercurial > pidgin
changeset 5615:6500a6c8d679
[gaim-migrate @ 6022]
Checkboxes update!
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sat, 31 May 2003 18:35:22 +0000 |
parents | ff89436b30d2 |
children | ba870ac49bfc |
files | src/connection.c src/gtkaccount.c src/idle.c |
diffstat | 3 files changed, 30 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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();
--- 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); }