aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-storage-set-view.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2002-05-08 00:57:45 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2002-05-08 00:57:45 +0800
commitee4d8e5cb0d4b235ab9b813836a4024047ee1fb1 (patch)
treeaa9d1c5fdd071d32c0038ec97a5ec6abee23e205 /shell/e-storage-set-view.c
parent76dfe7c6a96a444df6759be50be1f7c59b934a88 (diff)
downloadgsoc2013-evolution-ee4d8e5cb0d4b235ab9b813836a4024047ee1fb1.tar.gz
gsoc2013-evolution-ee4d8e5cb0d4b235ab9b813836a4024047ee1fb1.tar.zst
gsoc2013-evolution-ee4d8e5cb0d4b235ab9b813836a4024047ee1fb1.zip
Put the EStorageSetView in an EScrollFrame.
* evolution-storage-set-view-factory.c (evolution_storage_set_view_factory_new_view): Put the EStorageSetView in an EScrollFrame. * e-shell.c (impl_Shell_createStorageSetView): CORBA_Object_duplicate the object before returning. * evolution-test-component.c (create_new_folder_selector): New function to create a simple test environment for the new checkbox-enabled StorageSetView. (register_component): Add user-creatable type FolderSelector. (user_create_new_item_callback): Handle FolderSelector. (dialog_clicked_callback): Print out the checked items in the folder selector. (main): Print out a message before going into bonobo_main(). * evolution-storage-set-view.c (impl_StorageSetView__get_showFolders): Renamed from impl_StorageSetView__get_show_folders. (impl_StorageSetView__set_showFolders): Renamed from impl_StorageSetView__set_show_folders. (impl_StorageSetView__set_showCheckboxes): New, write the showCheckboxes CORBA attribute. (impl_StorageSetView__get_showCheckboxes): New, read the showCheckboxes CORBA attribute. (impl_StorageSetView__get_checkedFolders): New, read the checkedFolders CORBA attribute. (corba_class_init): Install the new CORBA methods methods. * e-storage-set-view.c (essv_add_to_list): strdup() the path. (e_storage_set_view_get_storage_set): New. * e-folder.c (e_folder_to_corba): New. * Evolution-StorageSetView.idl: Add showCheckboxes and checkedFolders attributes. * Evolution-common.idl: Add typedef for FolderList. svn path=/trunk/; revision=16704
Diffstat (limited to 'shell/e-storage-set-view.c')
-rw-r--r--shell/e-storage-set-view.c31
1 files changed, 23 insertions, 8 deletions
diff --git a/shell/e-storage-set-view.c b/shell/e-storage-set-view.c
index f924c19cc4..3938d48d1a 100644
--- a/shell/e-storage-set-view.c
+++ b/shell/e-storage-set-view.c
@@ -1864,6 +1864,17 @@ e_storage_set_view_new (EStorageSet *storage_set,
}
+EStorageSet *
+e_storage_set_view_get_storage_set (EStorageSetView *storage_set_view)
+{
+ EStorageSetViewPrivate *priv;
+
+ g_return_val_if_fail (E_IS_STORAGE_SET_VIEW (storage_set_view), NULL);
+
+ priv = storage_set_view->priv;
+ return priv->storage_set;
+}
+
void
e_storage_set_view_set_current_folder (EStorageSetView *storage_set_view,
const char *path)
@@ -2022,19 +2033,23 @@ e_storage_set_view_set_checkboxes_list (EStorageSetView *storage_set_view,
static void
essv_add_to_list (ETreePath tree_path, void **temp)
{
- EStorageSetView *storage_set_view = temp[0];
- EStorageSetViewPrivate *priv = storage_set_view->priv;
- GList **list = temp[1];
+ EStorageSetView *storage_set_view;
+ EStorageSetViewPrivate *priv;
+ GList **list;
+
+ storage_set_view = temp[0];
+ list = temp[1];
+ priv = storage_set_view->priv;
if (priv->checkboxes) {
- char *path = (char*)e_tree_memory_node_get_data(E_TREE_MEMORY(priv->etree_model), tree_path);
- if (path && g_hash_table_lookup (priv->checkboxes, path)) {
- *list = g_list_prepend (*list, path);
- }
+ const char *path;
+
+ path = (const char *) e_tree_memory_node_get_data (E_TREE_MEMORY (priv->etree_model), tree_path);
+ if (path != NULL && g_hash_table_lookup (priv->checkboxes, path))
+ *list = g_list_prepend (*list, g_strdup (path));
}
}
-/* g_list_free this list, but don't free the strings within. */
GList *
e_storage_set_view_get_checkboxes_list (EStorageSetView *storage_set_view)
{