Mercurial > pidgin
comparison src/gtkaccount.c @ 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 | 57165429ed73 |
children | feb012e01741 |
comparison
equal
deleted
inserted
replaced
5614:ff89436b30d2 | 5615:6500a6c8d679 |
---|---|
20 * along with this program; if not, write to the Free Software | 20 * along with this program; if not, write to the Free Software |
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
22 */ | 22 */ |
23 #include "gtkaccount.h" | 23 #include "gtkaccount.h" |
24 #include "account.h" | 24 #include "account.h" |
25 #include "event.h" | |
25 #include "prefs.h" | 26 #include "prefs.h" |
26 #include "stock.h" | 27 #include "stock.h" |
27 #include "gtkblist.h" | 28 #include "gtkblist.h" |
28 | 29 |
29 enum | 30 enum |
54 proto_name(int proto) | 55 proto_name(int proto) |
55 { | 56 { |
56 GaimPlugin *p = gaim_find_prpl(proto); | 57 GaimPlugin *p = gaim_find_prpl(proto); |
57 | 58 |
58 return ((p && p->info->name) ? _(p->info->name) : _("Unknown")); | 59 return ((p && p->info->name) ? _(p->info->name) : _("Unknown")); |
60 } | |
61 | |
62 static void | |
63 __account_signed_on_cb(GaimConnection *gc, AccountsDialog *dialog) | |
64 { | |
65 | |
66 } | |
67 | |
68 static void | |
69 __signed_on_off_cb(GaimConnection *gc, AccountsDialog *dialog) | |
70 { | |
71 GaimAccount *account = gaim_connection_get_account(gc); | |
72 GtkTreeModel *model = GTK_TREE_MODEL(dialog->model); | |
73 GtkTreeIter iter; | |
74 size_t index = g_list_index(gaim_accounts_get_all(), account); | |
75 | |
76 if (gtk_tree_model_iter_nth_child(model, &iter, NULL, index)) { | |
77 gtk_list_store_set(dialog->model, &iter, | |
78 COLUMN_ONLINE, gaim_account_is_connected(account), | |
79 -1); | |
80 } | |
59 } | 81 } |
60 | 82 |
61 static gint | 83 static gint |
62 __window_destroy_cb(GtkWidget *w, GdkEvent *event, void *unused) | 84 __window_destroy_cb(GtkWidget *w, GdkEvent *event, void *unused) |
63 { | 85 { |
373 gtk_widget_show(button); | 395 gtk_widget_show(button); |
374 | 396 |
375 g_signal_connect(G_OBJECT(button), "clicked", | 397 g_signal_connect(G_OBJECT(button), "clicked", |
376 G_CALLBACK(__close_accounts_cb), dialog); | 398 G_CALLBACK(__close_accounts_cb), dialog); |
377 | 399 |
400 /* Setup some gaim signal handlers. */ | |
401 gaim_signal_connect(dialog, event_signon, __signed_on_off_cb, dialog); | |
402 gaim_signal_connect(dialog, event_signoff, __signed_on_off_cb, dialog); | |
403 | |
378 gtk_widget_show(win); | 404 gtk_widget_show(win); |
379 } | 405 } |
380 | 406 |