Mercurial > pidgin.yaz
comparison src/gtkaccount.c @ 12121:943307dd6ee9
[gaim-migrate @ 14421]
When adding a new account, set the status before enabling it.That way, the correct status ends up being used, and you don't run into a a weird situation where the account tries to connect and then the offline status is appled when your current status is 'Offline'. Also a warning fix.
committer: Tailor Script <tailor@pidgin.im>
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Thu, 17 Nov 2005 04:42:16 +0000 |
parents | 36a0c8719af3 |
children | 355c7acbb61d |
comparison
equal
deleted
inserted
replaced
12120:b8c5b67a5475 | 12121:943307dd6ee9 |
---|---|
963 GtkWidget *frame; | 963 GtkWidget *frame; |
964 GtkWidget *vbox; | 964 GtkWidget *vbox; |
965 GtkWidget *check; | 965 GtkWidget *check; |
966 GtkWidget *entry; | 966 GtkWidget *entry; |
967 GtkWidget *combo; | 967 GtkWidget *combo; |
968 GList *list; | 968 const GList *list; |
969 GList *node; | 969 const GList *node; |
970 gint i, idx; | 970 gint i, idx; |
971 GtkListStore *model; | 971 GtkListStore *model; |
972 GtkTreeIter iter; | 972 GtkTreeIter iter; |
973 GtkCellRenderer *renderer; | 973 GtkCellRenderer *renderer; |
974 GaimKeyValuePair *kvp; | 974 GaimKeyValuePair *kvp; |
1621 gaim_signal_emit(gaim_gtk_account_get_handle(), "account-modified", account); | 1621 gaim_signal_emit(gaim_gtk_account_get_handle(), "account-modified", account); |
1622 | 1622 |
1623 /* If this is a new account, then sign on! */ | 1623 /* If this is a new account, then sign on! */ |
1624 if (new) { | 1624 if (new) { |
1625 const char *current_savedstatus_name; | 1625 const char *current_savedstatus_name; |
1626 const GaimSavedStatus *saved_status; | 1626 const GaimSavedStatus *saved_status = NULL; |
1627 | 1627 |
1628 gaim_account_set_enabled(account, GAIM_GTK_UI, TRUE); | |
1629 current_savedstatus_name = gaim_prefs_get_string("/core/status/current"); | 1628 current_savedstatus_name = gaim_prefs_get_string("/core/status/current"); |
1630 saved_status = gaim_savedstatus_find(current_savedstatus_name); | 1629 if (current_savedstatus_name) |
1631 gaim_savedstatus_activate_for_account(saved_status, account); | 1630 saved_status = gaim_savedstatus_find(current_savedstatus_name); |
1631 | |
1632 if (saved_status) { | |
1633 gaim_savedstatus_activate_for_account(saved_status, account); | |
1634 gaim_account_set_enabled(account, GAIM_GTK_UI, TRUE); | |
1635 } | |
1632 } | 1636 } |
1633 | 1637 |
1634 return account; | 1638 return account; |
1635 } | 1639 } |
1636 | 1640 |
2337 gtk_tree_model_get_iter(GTK_TREE_MODEL(dialog->model), &iter, path); | 2341 gtk_tree_model_get_iter(GTK_TREE_MODEL(dialog->model), &iter, path); |
2338 gtk_tree_path_free(path); | 2342 gtk_tree_path_free(path); |
2339 gtk_tree_model_get(GTK_TREE_MODEL(dialog->model), &iter, COLUMN_DATA, &account, -1); | 2343 gtk_tree_model_get(GTK_TREE_MODEL(dialog->model), &iter, COLUMN_DATA, &account, -1); |
2340 | 2344 |
2341 if ((account != NULL) && (event->button == 1) && | 2345 if ((account != NULL) && (event->button == 1) && |
2342 (event->type == GDK_2BUTTON_PRESS) && | 2346 (event->type == GDK_2BUTTON_PRESS) && |
2343 (strcmp(gtk_tree_view_column_get_title(column), title))) | 2347 (strcmp(gtk_tree_view_column_get_title(column), title))) |
2344 { | 2348 { |
2345 gaim_gtk_account_dialog_show(GAIM_GTK_MODIFY_ACCOUNT_DIALOG, account); | 2349 gaim_gtk_account_dialog_show(GAIM_GTK_MODIFY_ACCOUNT_DIALOG, account); |
2346 return TRUE; | 2350 return TRUE; |
2347 } | 2351 } |