From e51bb13fc41584414bdb78cf2ea3d1c86d01133f Mon Sep 17 00:00:00 2001 From: Jon Trowbridge Date: Sat, 31 Mar 2001 06:52:11 +0000 Subject: Call e_select_names_model_clean after adding address. This should deal 2001-03-31 Jon Trowbridge * gui/component/select-names/e-select-names.c (real_add_address_cb): Call e_select_names_model_clean after adding address. This should deal with the bug reports related to stray commas. * gui/component/select-names/e-select-names-model.c (e_select_names_model_clean): Added. Remove all empty destinations. * backend/ebook/e-destination.c (e_destination_is_empty): Added. Check if an EDestination is in essentially a null state. svn path=/trunk/; revision=9067 --- addressbook/backend/ebook/e-destination.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'addressbook/backend/ebook/e-destination.c') diff --git a/addressbook/backend/ebook/e-destination.c b/addressbook/backend/ebook/e-destination.c index 3b7ad60189..a44ce3ddc8 100644 --- a/addressbook/backend/ebook/e-destination.c +++ b/addressbook/backend/ebook/e-destination.c @@ -126,6 +126,14 @@ e_destination_copy (EDestination *dest) return new_dest; } +gboolean +e_destination_is_empty (EDestination *dest) +{ + g_return_val_if_fail (dest && E_IS_DESTINATION (dest), TRUE); + + return !(dest->priv->card || (dest->priv->string && *dest->priv->string)); +} + static void e_destination_clear_card (EDestination *dest) { -- cgit