diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2000-06-10 03:19:36 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2000-06-10 03:19:36 +0800 |
commit | 7f36752a67c274640378ec096f37e690fd5ca8ed (patch) | |
tree | dcc3124da275074dcf11803bb553d2af384858db /shell/e-folder-type-registry.c | |
parent | 59d329b5b090175e2ea5ffd06cb20dfcd41a7688 (diff) | |
download | gsoc2013-evolution-7f36752a67c274640378ec096f37e690fd5ca8ed.tar.gz gsoc2013-evolution-7f36752a67c274640378ec096f37e690fd5ca8ed.tar.zst gsoc2013-evolution-7f36752a67c274640378ec096f37e690fd5ca8ed.zip |
Initial support for creating/removing folders. This implies some new
IDL methods and new functions to implement on the component side. I
have also added a simple folder creation dialog in the shell. It's
quite unfinished and untested.
svn path=/trunk/; revision=3491
Diffstat (limited to 'shell/e-folder-type-registry.c')
-rw-r--r-- | shell/e-folder-type-registry.c | 37 |
1 files changed, 33 insertions, 4 deletions
diff --git a/shell/e-folder-type-registry.c b/shell/e-folder-type-registry.c index e5447ca54d..8e3e87ed8b 100644 --- a/shell/e-folder-type-registry.c +++ b/shell/e-folder-type-registry.c @@ -42,7 +42,7 @@ struct _FolderType { char *name; char *icon_name; - BonoboObjectClient *handler; + EvolutionShellComponentClient *handler; /* The icon, standard (48x48) and mini (16x16) versions. */ GdkPixbuf *icon_pixbuf; @@ -144,7 +144,7 @@ register_folder_type (EFolderTypeRegistry *folder_type_registry, static gboolean set_handler (EFolderTypeRegistry *folder_type_registry, const char *name, - BonoboObjectClient *handler) + EvolutionShellComponentClient *handler) { EFolderTypeRegistryPrivate *priv; FolderType *folder_type; @@ -258,7 +258,7 @@ e_folder_type_registry_register_type (EFolderTypeRegistry *folder_type_registry, gboolean e_folder_type_registry_set_handler_for_type (EFolderTypeRegistry *folder_type_registry, const char *type_name, - BonoboObjectClient *handler) + EvolutionShellComponentClient *handler) { g_return_val_if_fail (folder_type_registry != NULL, FALSE); g_return_val_if_fail (E_IS_FOLDER_TYPE_REGISTRY (folder_type_registry), FALSE); @@ -268,6 +268,35 @@ e_folder_type_registry_set_handler_for_type (EFolderTypeRegistry *folder_type_r return set_handler (folder_type_registry, type_name, handler); } + +static void +get_type_names_hash_forall (void *key, + void *value, + void *data) +{ + GList **type_name_list; + + type_name_list = (GList **) data; + + *type_name_list = g_list_prepend (*type_name_list, g_strdup ((const char *) key)); +} + +GList * +e_folder_type_registry_get_type_names (EFolderTypeRegistry *folder_type_registry) +{ + GList *type_name_list; + EFolderTypeRegistryPrivate *priv; + + g_return_val_if_fail (folder_type_registry != NULL, NULL); + g_return_val_if_fail (E_IS_FOLDER_TYPE_REGISTRY (folder_type_registry), NULL); + + priv = folder_type_registry->priv; + + type_name_list = NULL; + g_hash_table_foreach (priv->name_to_type, get_type_names_hash_forall, &type_name_list); + + return type_name_list; +} const char * @@ -312,7 +341,7 @@ e_folder_type_registry_get_icon_for_type (EFolderTypeRegistry *folder_type_regis return folder_type->icon_pixbuf; } -BonoboObjectClient * +EvolutionShellComponentClient * e_folder_type_registry_get_handler_for_type (EFolderTypeRegistry *folder_type_registry, const char *type_name) { |