update the base uri of the "On This Computer" group when user home dir
2005-02-19 Sivaiah Nallagatla <snallagatla@novell.com> * gui/component/addressbook-component.c (ensure_sources) : update the base uri of the "On This Computer" group when user home dir changes. Also unref personal source if created here. Fixes #67724 svn path=/trunk/; revision=28838
This commit is contained in:
committed by
Sivaiah Nallagatla
parent
edcedd2cb6
commit
e5711b4dd2
@ -1,3 +1,12 @@
|
||||
2005-02-19 Sivaiah Nallagatla <snallagatla@novell.com>
|
||||
|
||||
* gui/component/addressbook-component.c
|
||||
(ensure_sources) : update the base uri
|
||||
of the "On This Computer" group when user home dir
|
||||
changes. Also unref personal source if created here.
|
||||
|
||||
Fixes #67724
|
||||
|
||||
2005-02-09 Sivaiah Nallagatla <snallagatla@novell.com>
|
||||
|
||||
* gui/component/addressbook-config.c
|
||||
|
||||
@ -95,7 +95,10 @@ ensure_sources (AddressbookComponent *component)
|
||||
|
||||
group = E_SOURCE_GROUP (g->data);
|
||||
|
||||
if (!on_this_computer && !strcmp (base_uri_proto, e_source_group_peek_base_uri (group)))
|
||||
/* compare only file:// part. If user home dir name changes we do not want to create
|
||||
one more group */
|
||||
|
||||
if (!on_this_computer && !strncmp (base_uri_proto, e_source_group_peek_base_uri (group), 7))
|
||||
on_this_computer = group;
|
||||
else if (!on_ldap_servers && !strcmp (LDAP_BASE_URI, e_source_group_peek_base_uri (group)))
|
||||
on_ldap_servers = group;
|
||||
@ -114,6 +117,16 @@ ensure_sources (AddressbookComponent *component)
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* Make sure we have the correct base uri. This can change when user's
|
||||
homedir name changes */
|
||||
if (strcmp (base_uri_proto, e_source_group_peek_base_uri (on_this_computer))) {
|
||||
e_source_group_set_base_uri (on_this_computer, base_uri_proto);
|
||||
|
||||
/* *sigh* . We shouldn't need this sync call here as set_base_uri
|
||||
call results in synching to gconf, but that happens in idle loop
|
||||
and too late to prevent user seeing "Can not Open ... because of invalid uri" error.*/
|
||||
e_source_list_sync (source_list,NULL);
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* create the local source group */
|
||||
@ -138,7 +151,8 @@ ensure_sources (AddressbookComponent *component)
|
||||
|
||||
on_ldap_servers = group;
|
||||
}
|
||||
|
||||
if (personal_source)
|
||||
g_object_unref (personal_source);
|
||||
g_free (base_uri_proto);
|
||||
g_free (base_uri);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user