diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2013-03-25 01:37:16 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2013-03-25 01:37:16 +0800 |
commit | 78dfe47fdfe0c11540b508799517f3d9f21c3b0a (patch) | |
tree | 7b4b975283444669d56e02b4feaa6337ea94856e /modules/addressbook | |
parent | 393586c8f744b8b2d68684331ba1029a7950f211 (diff) | |
download | gsoc2013-evolution-78dfe47fdfe0c11540b508799517f3d9f21c3b0a.tar.gz gsoc2013-evolution-78dfe47fdfe0c11540b508799517f3d9f21c3b0a.tar.zst gsoc2013-evolution-78dfe47fdfe0c11540b508799517f3d9f21c3b0a.zip |
Bug 696257 - Handle default values for "primary" selection settings
The default value for these GSettings keys is an empty string. The
mapping function should handle empty strings by falling back to the
appropriate default ESource.
Diffstat (limited to 'modules/addressbook')
-rw-r--r-- | modules/addressbook/e-book-shell-sidebar.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/addressbook/e-book-shell-sidebar.c b/modules/addressbook/e-book-shell-sidebar.c index d8b25ee3f4..9c655e7504 100644 --- a/modules/addressbook/e-book-shell-sidebar.c +++ b/modules/addressbook/e-book-shell-sidebar.c @@ -63,7 +63,10 @@ book_shell_sidebar_map_uid_to_source (GValue *value, registry = E_SOURCE_REGISTRY (user_data); uid = g_variant_get_string (variant, NULL); - source = e_source_registry_ref_source (registry, uid); + if (uid != NULL && *uid != '\0') + source = e_source_registry_ref_source (registry, uid); + else + source = e_source_registry_ref_default_address_book (registry); g_value_take_object (value, source); return (source != NULL); |