aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-storage-set-view.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-03-22 21:41:01 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-03-22 21:41:01 +0800
commita2ae2d718be2cf4803ae0564c0cc539ecdaa4f6b (patch)
tree7674d44bf7424c4342f5e52ea0e89a738f893518 /shell/e-storage-set-view.c
parent03765ef0bb21fb7d98af1dd8d72a76e683a26a2f (diff)
downloadgsoc2013-evolution-a2ae2d718be2cf4803ae0564c0cc539ecdaa4f6b.tar.gz
gsoc2013-evolution-a2ae2d718be2cf4803ae0564c0cc539ecdaa4f6b.tar.zst
gsoc2013-evolution-a2ae2d718be2cf4803ae0564c0cc539ecdaa4f6b.zip
Changed the EStorageSet API to have a single `xfer()' method instead
of separate copy/move (as in the IDL). Actually implement the `xfer()' operation for the case when source and destination are in the same storage. Fix the `EStorageSet' API by having a special `EStorageSetResultCallback' callback type for it (instead of using `EStorageResultCallback', which would never work). Also, removed some unused variables in `e-storage-set-view.c'. svn path=/trunk/; revision=8895
Diffstat (limited to 'shell/e-storage-set-view.c')
-rw-r--r--shell/e-storage-set-view.c32
1 files changed, 15 insertions, 17 deletions
diff --git a/shell/e-storage-set-view.c b/shell/e-storage-set-view.c
index ba5172a73a..b8c59b956d 100644
--- a/shell/e-storage-set-view.c
+++ b/shell/e-storage-set-view.c
@@ -130,20 +130,6 @@ typedef enum _DndTargetType DndTargetType;
#define URI_LIST_TYPE "text/uri-list"
#define E_SHORTCUT_TYPE "E-SHORTCUT"
-static GtkTargetEntry source_drag_types [] = {
- { URI_LIST_TYPE, 0, DND_TARGET_TYPE_URI_LIST },
- { E_SHORTCUT_TYPE, 0, DND_TARGET_TYPE_E_SHORTCUT }
-};
-static const int num_source_drag_types = sizeof (source_drag_types) / sizeof (source_drag_types[0]);
-
-static GtkTargetEntry destination_drag_types [] = {
- { URI_LIST_TYPE, 0, DND_TARGET_TYPE_URI_LIST },
- { E_SHORTCUT_TYPE, 0, DND_TARGET_TYPE_E_SHORTCUT }
-};
-static const int num_destination_drag_types = sizeof (destination_drag_types) / sizeof (destination_drag_types[0]);
-
-static GtkTargetList *target_list;
-
/* Sorting callbacks. */
@@ -613,7 +599,6 @@ set_evolution_path_selection (EStorageSetView *storage_set_view,
GtkSelectionData *selection_data)
{
EStorageSetViewPrivate *priv;
- const char *evolution_path;
g_assert (storage_set_view != NULL);
g_assert (selection_data != NULL);
@@ -625,6 +610,17 @@ set_evolution_path_selection (EStorageSetView *storage_set_view,
}
+/* Callbacks for folder operations. */
+
+static void
+folder_xfer_callback (EStorageSet *storage_set,
+ EStorageResult result,
+ void *data)
+{
+ g_print ("Folder Xfer result -- %s\n", e_storage_result_to_string (result));
+}
+
+
/* Folder context menu. */
/* FIXME: This should be moved somewhere else, so that also the shortcut code
can share it. */
@@ -1188,11 +1184,13 @@ tree_drag_data_received (ETree *etree,
switch (context->action) {
case GDK_ACTION_MOVE:
g_print ("EStorageSetView: Moving from `%s' to `%s'\n", source_path, destination_path);
- e_storage_set_async_move_folder (priv->storage_set, source_path, destination_path, NULL, NULL);
+ e_storage_set_async_xfer_folder (priv->storage_set, source_path, destination_path, TRUE,
+ folder_xfer_callback, NULL);
break;
case GDK_ACTION_COPY:
g_print ("EStorageSetView: Copying from `%s' to `%s'\n", source_path, destination_path);
- e_storage_set_async_copy_folder (priv->storage_set, source_path, destination_path, NULL, NULL);
+ e_storage_set_async_xfer_folder (priv->storage_set, source_path, destination_path, FALSE,
+ folder_xfer_callback, NULL);
break;
default:
g_warning ("EStorageSetView: Don't know action %d\n", context->action);