From ad68d3656f56b4a4f8194f9cc68721769041260f Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Fri, 19 Jan 2001 21:13:25 +0000 Subject: New function. Obvious. * evolution-storage.c (evolution_storage_folder_exists): New function. Obvious. svn path=/trunk/; revision=7654 --- shell/ChangeLog | 5 +++++ shell/evolution-storage.c | 16 ++++++++++++++++ shell/evolution-storage.h | 2 ++ 3 files changed, 23 insertions(+) diff --git a/shell/ChangeLog b/shell/ChangeLog index 0fd988508e..b33f999574 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,8 @@ +2001-01-19 Dan Winship + + * evolution-storage.c (evolution_storage_folder_exists): New + function. Obvious. + 2001-01-19 Jason Leach (Bug #883: Shortcut bar does not update when a folders display diff --git a/shell/evolution-storage.c b/shell/evolution-storage.c index c87c031cd0..75b15ee25e 100644 --- a/shell/evolution-storage.c +++ b/shell/evolution-storage.c @@ -734,5 +734,21 @@ evolution_storage_removed_folder (EvolutionStorage *evolution_storage, return result; } +gboolean +evolution_storage_folder_exists (EvolutionStorage *evolution_storage, + const char *path) +{ + EvolutionStoragePrivate *priv; + + g_return_val_if_fail (EVOLUTION_IS_STORAGE (evolution_storage), + EVOLUTION_STORAGE_ERROR_INVALIDPARAMETER); + g_return_val_if_fail (path != NULL, EVOLUTION_STORAGE_ERROR_INVALIDPARAMETER); + g_return_val_if_fail (g_path_is_absolute (path), EVOLUTION_STORAGE_ERROR_INVALIDPARAMETER); + + priv = evolution_storage->priv; + + return e_folder_tree_get_folder (priv->folder_tree, path) != NULL; +} + E_MAKE_TYPE (evolution_storage, "EvolutionStorage", EvolutionStorage, class_init, init, PARENT_TYPE) diff --git a/shell/evolution-storage.h b/shell/evolution-storage.h index 824c7ea12a..8336f14adc 100644 --- a/shell/evolution-storage.h +++ b/shell/evolution-storage.h @@ -105,6 +105,8 @@ EvolutionStorageResult evolution_storage_update_folder_by_uri (EvolutionStorage gboolean highlighted); EvolutionStorageResult evolution_storage_removed_folder (EvolutionStorage *evolution_storage, const char *path); +gboolean evolution_storage_folder_exists (EvolutionStorage *evolution_storage, + const char *path); #ifdef __cplusplus } -- cgit v1.2.3