# HG changeset patch # User Daniel Atallah # Date 1132202536 0 # Node ID 943307dd6ee9442aaa470fd7ba7f14eb53fdbb38 # Parent b8c5b67a54751d848b06c6d578b6a50adbd6d11c [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 diff -r b8c5b67a5475 -r 943307dd6ee9 src/gtkaccount.c --- a/src/gtkaccount.c Thu Nov 17 03:38:38 2005 +0000 +++ b/src/gtkaccount.c Thu Nov 17 04:42:16 2005 +0000 @@ -965,8 +965,8 @@ GtkWidget *check; GtkWidget *entry; GtkWidget *combo; - GList *list; - GList *node; + const GList *list; + const GList *node; gint i, idx; GtkListStore *model; GtkTreeIter iter; @@ -1623,12 +1623,16 @@ /* If this is a new account, then sign on! */ if (new) { const char *current_savedstatus_name; - const GaimSavedStatus *saved_status; - - gaim_account_set_enabled(account, GAIM_GTK_UI, TRUE); + const GaimSavedStatus *saved_status = NULL; + current_savedstatus_name = gaim_prefs_get_string("/core/status/current"); - saved_status = gaim_savedstatus_find(current_savedstatus_name); - gaim_savedstatus_activate_for_account(saved_status, account); + if (current_savedstatus_name) + saved_status = gaim_savedstatus_find(current_savedstatus_name); + + if (saved_status) { + gaim_savedstatus_activate_for_account(saved_status, account); + gaim_account_set_enabled(account, GAIM_GTK_UI, TRUE); + } } return account; @@ -2339,7 +2343,7 @@ gtk_tree_model_get(GTK_TREE_MODEL(dialog->model), &iter, COLUMN_DATA, &account, -1); if ((account != NULL) && (event->button == 1) && - (event->type == GDK_2BUTTON_PRESS) && + (event->type == GDK_2BUTTON_PRESS) && (strcmp(gtk_tree_view_column_get_title(column), title))) { gaim_gtk_account_dialog_show(GAIM_GTK_MODIFY_ACCOUNT_DIALOG, account);