diff options
author | Dan Winship <danw@src.gnome.org> | 2003-03-15 03:58:36 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2003-03-15 03:58:36 +0800 |
commit | 35ff6769cb500b826678ae64504befc1c9c4757e (patch) | |
tree | 8728b8b6a4092dede79f5591668867726af23ff6 /shell/e-storage.c | |
parent | 238c20117fc8d3fdddb270e3ef197593e45e1a85 (diff) | |
download | gsoc2013-evolution-35ff6769cb500b826678ae64504befc1c9c4757e.tar.gz gsoc2013-evolution-35ff6769cb500b826678ae64504befc1c9c4757e.tar.zst gsoc2013-evolution-35ff6769cb500b826678ae64504befc1c9c4757e.zip |
Add (e_storage_declare_has_subfolders): Rename from
* e-storage.c (e_storage_get_has_subfolders): Add
(e_storage_declare_has_subfolders): Rename from
e_storage_has_subfolders to make it clearer that this is a setter,
not a getter. (Can't call it e_storage_set_has_subfolders because
that sounds like it belongs in e-storage-set.)
* e-corba-storage.c (impl_StorageListener_notifyHasSubfolders):
update for e_storage_declare_has_subfolders name change
(get_folder): Override the default EStorage implementation: if
asked for a folder under a not-yet-expanded folder, attempt to
force the parent(s) to expand so that the child is available.
Fixes part of #30415
svn path=/trunk/; revision=20302
Diffstat (limited to 'shell/e-storage.c')
-rw-r--r-- | shell/e-storage.c | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/shell/e-storage.c b/shell/e-storage.c index 6825485f9d..1f54ee5afa 100644 --- a/shell/e-storage.c +++ b/shell/e-storage.c @@ -720,10 +720,16 @@ e_storage_new_folder (EStorage *storage, return TRUE; } +/* This really should be called e_storage_set_has_subfolders, but then + * it would look like it was an EStorageSet function. (Fact o' the + * day: The word "set" has more distinct meanings than any other word + * in the English language.) Anyway, we now return you to your + * regularly scheduled source code, already in progress. + */ gboolean -e_storage_has_subfolders (EStorage *storage, - const char *path, - const char *message) +e_storage_declare_has_subfolders (EStorage *storage, + const char *path, + const char *message) { EStoragePrivate *priv; GList *subfolders, *f; @@ -762,6 +768,22 @@ e_storage_has_subfolders (EStorage *storage, } gboolean +e_storage_get_has_subfolders (EStorage *storage, + const char *path) +{ + EStoragePrivate *priv; + + g_return_val_if_fail (storage != NULL, FALSE); + g_return_val_if_fail (E_IS_STORAGE (storage), FALSE); + g_return_val_if_fail (path != NULL, FALSE); + g_return_val_if_fail (g_path_is_absolute (path), FALSE); + + priv = storage->priv; + + return g_hash_table_lookup (priv->pseudofolders, path) != NULL; +} + +gboolean e_storage_removed_folder (EStorage *storage, const char *path) { |