Mercurial > pidgin.yaz
comparison src/gtkaccount.c @ 11724:a8ec0a291d14
[gaim-migrate @ 14015]
If you're online, and sitting around, and la-di-da you enable one of your
accounts, it will now use the status currently set in your gtkstatusbox
instead of whatever the account was set to when it was disabled
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 22 Oct 2005 22:29:40 +0000 |
parents | bf6ba37db13b |
children | ef511dec9903 |
comparison
equal
deleted
inserted
replaced
11723:9537977703bb | 11724:a8ec0a291d14 |
---|---|
33 #include "notify.h" | 33 #include "notify.h" |
34 #include "plugin.h" | 34 #include "plugin.h" |
35 #include "prefs.h" | 35 #include "prefs.h" |
36 #include "prpl.h" | 36 #include "prpl.h" |
37 #include "request.h" | 37 #include "request.h" |
38 #include "savedstatuses.h" | |
38 #include "signals.h" | 39 #include "signals.h" |
39 #include "util.h" | 40 #include "util.h" |
40 | 41 |
41 #include "gtkgaim-disclosure.h" | 42 #include "gtkgaim-disclosure.h" |
42 #include "gtkaccount.h" | 43 #include "gtkaccount.h" |
2127 AccountsWindow *dialog = (AccountsWindow *)data; | 2128 AccountsWindow *dialog = (AccountsWindow *)data; |
2128 GaimAccount *account; | 2129 GaimAccount *account; |
2129 GtkTreeModel *model = GTK_TREE_MODEL(dialog->model); | 2130 GtkTreeModel *model = GTK_TREE_MODEL(dialog->model); |
2130 GtkTreeIter iter; | 2131 GtkTreeIter iter; |
2131 gboolean enabled; | 2132 gboolean enabled; |
2133 const char *current_savedstatus_name; | |
2134 const GaimSavedStatus *saved_status; | |
2132 | 2135 |
2133 gtk_tree_model_get_iter_from_string(model, &iter, path_str); | 2136 gtk_tree_model_get_iter_from_string(model, &iter, path_str); |
2134 gtk_tree_model_get(model, &iter, | 2137 gtk_tree_model_get(model, &iter, |
2135 COLUMN_DATA, &account, | 2138 COLUMN_DATA, &account, |
2136 COLUMN_ENABLED, &enabled, | 2139 COLUMN_ENABLED, &enabled, |
2137 -1); | 2140 -1); |
2138 | 2141 |
2139 /* TODO: Set the statuses for this account to match the GtkStatusBox */ | 2142 /* Set the statuses for this account to the current status */ |
2140 /* | 2143 current_savedstatus_name = gaim_prefs_get_string("/core/status/current"); |
2141 GtkWidget *blist; | 2144 saved_status = gaim_savedstatus_find(current_savedstatus_name); |
2142 GtkWidget *statusbox; | 2145 gaim_savedstatus_activate_for_account(saved_status, account); |
2143 GaimStatus *status; | 2146 |
2144 | |
2145 blist = gaim_gtk_blist_get_default_gtk_blist(); | |
2146 statusbox = blist->statusbox; | |
2147 status = gaim_gtk_status_box_get_current_status(); | |
2148 | |
2149 gaim_account_set_status(account, ); | |
2150 gaim_account_set_status_vargs(account, ); | |
2151 gaim_account_set_status_list(account, ); | |
2152 */ | |
2153 gaim_account_set_enabled(account, GAIM_GTK_UI, !enabled); | 2147 gaim_account_set_enabled(account, GAIM_GTK_UI, !enabled); |
2154 | 2148 |
2155 gtk_list_store_set(dialog->model, &iter, | 2149 gtk_list_store_set(dialog->model, &iter, |
2156 COLUMN_ENABLED, !enabled, | 2150 COLUMN_ENABLED, !enabled, |
2157 -1); | 2151 -1); |