--- a/src/gtkconv.c Tue May 31 23:40:57 2005 +0000 +++ b/src/gtkconv.c Tue May 31 23:48:54 2005 +0000 @@ -2543,15 +2543,16 @@ icon_menu_save_cb(GtkWidget *widget, GaimGtkConversation *gtkconv) { GaimConversation *conv = gtkconv->active_conv; + const gchar *ext; gchar *buf; g_return_if_fail(conv != NULL); - /* - * XXX - The file extension needs to be set to something that doesn't suck... - * Maybe do what gtkimhtml.c does when saving an image? - */ - buf = g_strdup_printf("%s.icon", gaim_normalize(conv->account, conv->name)); + ext = gaim_buddy_icon_get_type(gaim_conv_im_get_icon(GAIM_CONV_IM(conv))); + if (ext == NULL) + ext = "icon"; + + buf = g_strdup_printf("%s.%s", gaim_normalize(conv->account, conv->name), ext); gaim_request_file(conv, _("Save Icon"), buf, TRUE, G_CALLBACK(saveicon_writefile_cb), NULL, conv);