Mercurial > pidgin.yaz
changeset 5978:041b657227c4
[gaim-migrate @ 6425]
Fixed a warning about the protocol_id being NULL. Also removed some debug
statements and such.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Mon, 30 Jun 2003 03:12:40 +0000 |
parents | 2d34c02d2031 |
children | 49ae70ffcea5 |
files | src/gtkaccount.c |
diffstat | 1 files changed, 17 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gtkaccount.c Mon Jun 30 01:56:00 2003 +0000 +++ b/src/gtkaccount.c Mon Jun 30 03:12:40 2003 +0000 @@ -83,7 +83,7 @@ GaimAccount *account; GaimProtocol protocol; - const char *protocol_id; + char *protocol_id; GaimPlugin *plugin; GaimPluginProtocolInfo *prpl_info; @@ -186,11 +186,14 @@ { if ((dialog->plugin = gaim_find_prpl(protocol)) != NULL) { dialog->prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(dialog->plugin); - dialog->protocol = dialog->prpl_info->protocol; + dialog->protocol = dialog->prpl_info->protocol; + + if (dialog->protocol_id != NULL) + g_free(dialog->protocol_id); + + dialog->protocol_id = g_strdup(dialog->plugin->info->id); } - dialog->protocol_id = dialog->plugin->info->id; - add_login_options(dialog, dialog->top_vbox); add_user_options(dialog, dialog->top_vbox); add_protocol_options(dialog, dialog->bottom_vbox); @@ -902,6 +905,9 @@ if (dialog->protocol_opt_entries != NULL) g_list_free(dialog->protocol_opt_entries); + if (dialog->protocol_id != NULL) + g_free(dialog->protocol_id); + if (dialog->buddy_icon_filesel) gtk_widget_destroy(dialog->buddy_icon_filesel); @@ -1138,10 +1144,15 @@ dialog->type = type; dialog->sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); - if (dialog->account == NULL) + if (dialog->account == NULL) { + dialog->protocol_id = g_strdup("prpl-oscar"); dialog->protocol = GAIM_PROTO_OSCAR; - else + } + else { + dialog->protocol_id = + g_strdup(gaim_account_get_protocol_id(dialog->account)); dialog->protocol = gaim_account_get_protocol(dialog->account); + } if ((dialog->plugin = gaim_find_prpl(dialog->protocol)) != NULL) dialog->prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(dialog->plugin); @@ -1638,10 +1649,6 @@ if (pixbuf != NULL) scale = gdk_pixbuf_scale_simple(pixbuf, 16, 16, GDK_INTERP_BILINEAR); - gaim_debug(GAIM_DEBUG_MISC, "gtkaccount", "auto-login for %s: %d\n", - gaim_account_get_username(account), - gaim_account_get_auto_login(account, GAIM_GTK_UI)); - gtk_list_store_set(store, iter, COLUMN_ICON, scale, COLUMN_SCREENNAME, gaim_account_get_username(account),