# HG changeset patch # User Richard Laager # Date 1150052745 0 # Node ID 5ef7dae8ab871bfc81e3335d4d897fff1939d544 # Parent e5e07c996c56d9614f8533e949a7797903f556aa [gaim-migrate @ 16257] SF Patch #1504436 from roast, with changes by me "gaim_gtkdialogs_log() doesn't set initial account value, but shows an initial account. This is confusing because if the user does not use the hint list to select an account (e.g. he types a name in), gaim_gtkdialogs_log_cb() services an empty call. This patch fixes this." committer: Tailor Script diff -r e5e07c996c56 -r 5ef7dae8ab87 src/gtkdialogs.c --- a/src/gtkdialogs.c Sun Jun 11 06:05:09 2006 +0000 +++ b/src/gtkdialogs.c Sun Jun 11 19:05:45 2006 +0000 @@ -798,6 +798,16 @@ gaim_request_field_group_add_field(group, field); field = gaim_request_field_account_new("account", _("_Account"), NULL); + + /* gaim_request_field_account_new() only sets a default value if you're + * connected, and it sets it from the list of connected accounts. Since + * we're going to set show_all here, it makes sense to use the first + * account, not the first connected account. */ + if (gaim_accounts_get_all() != NULL) { + gaim_request_field_account_set_default_value(field, gaim_accounts_get_all()->data); + gaim_request_field_account_set_value(field, gaim_accounts_get_all()->data); + } + gaim_request_field_set_type_hint(field, "account"); gaim_request_field_account_set_show_all(field, TRUE); gaim_request_field_set_visible(field,