/*
* module-yahoo-backend.c
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) version 3.
+ * This library is free software you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, see <http://www.gnu.org/licenses/>.
*
*/
if (is_mail && e_source_has_extension (child_source, extension_name)) {
ESourceAuthentication *auth_child_extension;
ESourceCollection *collection_extension;
+ const gchar *collection_identity;
+ const gchar *auth_child_user;
extension_name = E_SOURCE_EXTENSION_COLLECTION;
collection_extension = e_source_get_extension (
collection_source, extension_name);
+ collection_identity = e_source_collection_get_identity (
+ collection_extension);
extension_name = E_SOURCE_EXTENSION_AUTHENTICATION;
auth_child_extension = e_source_get_extension (
child_source, extension_name);
-
- g_object_bind_property (
- collection_extension, "identity",
- auth_child_extension, "user",
- G_BINDING_SYNC_CREATE);
+ auth_child_user = e_source_authentication_get_user (
+ auth_child_extension);
+
+ /* XXX Do not override an existing user name setting.
+ * The IMAP or (especially) SMTP configuration may
+ * have been modified to use a non-Yahoo! server. */
+ if (auth_child_user == NULL)
+ e_source_authentication_set_user (
+ auth_child_extension,
+ collection_identity);
}
/* Chain up to parent's child_added() method. */