diff options
author | Dan Winship <danw@src.gnome.org> | 2003-04-16 01:09:32 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2003-04-16 01:09:32 +0800 |
commit | 11213eb9c80b081404c6e5ce13b4e0f81f34c695 (patch) | |
tree | d2650103173bf8ad466d838153de576de797d257 /shell/e-folder.c | |
parent | 7e8c68f20cf664624e8c28c9a434e0c29457b278 (diff) | |
download | gsoc2013-evolution-11213eb9c80b081404c6e5ce13b4e0f81f34c695.tar.gz gsoc2013-evolution-11213eb9c80b081404c6e5ce13b4e0f81f34c695.tar.zst gsoc2013-evolution-11213eb9c80b081404c6e5ce13b4e0f81f34c695.zip |
new boolean flag.
* e-folder.c (e_folder_get_has_subfolders,
e_folder_set_has_subfolders): new boolean flag.
* e-storage.c (EStoragePrivate, impl_finalize, init): Remove the
pseudofolders hash
(e_storage_async_open_folder): Replace the pseudofolders test with
a test of whether the folder has the "has_subfolders" flag set.
(e_storage_new_folder): Likewise (for the folder's parent).
(e_storage_declare_has_subfolders): Set "has_subfolders" on the
folder.
(e_storage_get_has_subfolders): Check "has_subfolders" on the
folder.
Should fix #33919.
svn path=/trunk/; revision=20845
Diffstat (limited to 'shell/e-folder.c')
-rw-r--r-- | shell/e-folder.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/shell/e-folder.c b/shell/e-folder.c index 0568308488..8226170e92 100644 --- a/shell/e-folder.c +++ b/shell/e-folder.c @@ -57,6 +57,7 @@ struct _EFolderPrivate { unsigned int self_highlight : 1; unsigned int is_stock : 1; unsigned int can_sync_offline : 1; + unsigned int has_subfolders : 1; /* Custom icon for this folder; if NULL the folder will just use the icon for its type. */ @@ -181,6 +182,7 @@ init (EFolder *folder) priv->self_highlight = FALSE; priv->is_stock = FALSE; priv->can_sync_offline = FALSE; + priv->has_subfolders = FALSE; priv->custom_icon_name = NULL; folder->priv = priv; @@ -299,6 +301,14 @@ e_folder_get_can_sync_offline (EFolder *folder) return folder->priv->can_sync_offline; } +gboolean +e_folder_get_has_subfolders (EFolder *folder) +{ + g_return_val_if_fail (E_IS_FOLDER (folder), FALSE); + + return folder->priv->has_subfolders; +} + /** * e_folder_get_custom_icon: * @folder: An EFolder @@ -444,6 +454,17 @@ e_folder_set_can_sync_offline (EFolder *folder, g_signal_emit (folder, signals[CHANGED], 0); } +void +e_folder_set_has_subfolders (EFolder *folder, + gboolean has_subfolders) +{ + g_return_if_fail (E_IS_FOLDER (folder)); + + folder->priv->has_subfolders = !! has_subfolders; + + g_signal_emit (folder, signals[CHANGED], 0); +} + /** * e_folder_set_custom_icon_name: * @folder: An EFolder |