aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--shell/ChangeLog22
-rw-r--r--shell/e-local-storage.c8
-rw-r--r--shell/e-shell-folder-commands.c4
-rw-r--r--shell/e-shell-view.c17
-rw-r--r--shell/e-storage-set-view.c7
5 files changed, 45 insertions, 13 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 5cede21be0..f01a848c2c 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,25 @@
+2001-08-30 Peter Williams <peterw@ximian.com>
+
+ * e-local-storage.c (async_xfer_folder_complete): Remove the folder from
+ the EvolutionStorage as well as the EStorage.
+
+2001-08-29 Peter Williams <peterw@ximian.com>
+
+ * e-storage-set-view.c (etree_node_destroy_func): Only call
+ remove_node_from_hash if it's not the root node.
+ (removed_storage_cb): Don't remove the node from the hash here,
+ because it will be removed in the node_destroyed callback.
+ (removed_folder_cb): Same.
+
+ * e-shell-view.c (e_shell_view_remove_control_for_uri): Disconnect
+ from the destroy signal so as not to confuse ourselves. Also, the
+ page remove in the notebook destroys the control and the socket, so don't
+ do that explicitly.
+
+ * e-shell-folder-commands.c
+ (folder_selection_dialog_folder_selected_callback): Remove the control
+ for the source view if we're moving.
+
2001-08-31 Zbigniew Chyla <cyba@gnome.pl>
* e-local-storage.c
diff --git a/shell/e-local-storage.c b/shell/e-local-storage.c
index c3c73954c8..c06edcca9a 100644
--- a/shell/e-local-storage.c
+++ b/shell/e-local-storage.c
@@ -791,7 +791,6 @@ async_xfer_folder_complete (XferData *xfer_data)
local_storage = xfer_data->local_storage;
-#if 0
if (xfer_data->remove_source) {
EStorageResult result;
@@ -807,11 +806,14 @@ async_xfer_folder_complete (XferData *xfer_data)
/* FIXME handle failure differently? This should be n
unlikely situation. */
- if (result == E_STORAGE_OK)
+ if (result == E_STORAGE_OK) {
e_storage_removed_folder (E_STORAGE (local_storage), item->source_path);
+
+ evolution_storage_removed_folder (EVOLUTION_STORAGE (local_storage->priv->bonobo_interface),
+ item->source_path);
+ }
}
}
-#endif
/* Free the data. */
diff --git a/shell/e-shell-folder-commands.c b/shell/e-shell-folder-commands.c
index e0472c6a73..861e2cd3b8 100644
--- a/shell/e-shell-folder-commands.c
+++ b/shell/e-shell-folder-commands.c
@@ -194,6 +194,10 @@ folder_selection_dialog_folder_selected_callback (EShellFolderSelectionDialog *f
storage_set = e_shell_get_storage_set (folder_command_data->shell);
+ if (remove_source)
+ e_shell_view_remove_control_for_uri (folder_command_data->shell_view,
+ e_shell_view_get_current_uri (folder_command_data->shell_view));
+
e_storage_set_async_xfer_folder (storage_set,
folder_command_data->source_path,
folder_command_data->destination_path,
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index 9048c3a147..059df15b7f 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -2014,6 +2014,7 @@ e_shell_view_remove_control_for_uri (EShellView *shell_view,
GtkWidget *socket;
GtkWidget *control;
int page_num;
+ int destroy_connection_id;
g_return_val_if_fail (shell_view != NULL, FALSE);
g_return_val_if_fail (E_IS_SHELL_VIEW (shell_view), FALSE);
@@ -2022,8 +2023,10 @@ e_shell_view_remove_control_for_uri (EShellView *shell_view,
/* Get the control, remove it from our hash of controls */
view = g_hash_table_lookup (priv->uri_to_view, uri);
- if (view == NULL)
+ if (view == NULL) {
+ g_message ("Trying to remove view for non-existing URI -- %s", uri);
return FALSE;
+ }
control = view->control;
view_destroy (view);
@@ -2033,15 +2036,15 @@ e_shell_view_remove_control_for_uri (EShellView *shell_view,
socket = find_socket (GTK_CONTAINER (control));
priv->sockets = g_list_remove (priv->sockets, socket);
- /* Remove the notebook page */
+ /* disconnect from the destroy signal */
+ destroy_connection_id = GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (socket),
+ "e_shell_view_destroy_connection_id"));
+ gtk_signal_disconnect (GTK_OBJECT (socket), destroy_connection_id);
+
+ /* Remove the notebook page, destroying the control and socket */
page_num = gtk_notebook_page_num (GTK_NOTEBOOK (priv->notebook), control);
gtk_notebook_remove_page (GTK_NOTEBOOK (priv->notebook), page_num);
- /* Destroy things, socket first because otherwise shell will
- think the control crashed */
- gtk_widget_destroy (socket);
- gtk_widget_destroy (control);
-
return TRUE;
}
diff --git a/shell/e-storage-set-view.c b/shell/e-storage-set-view.c
index 3ebeb14f06..82e08d2ed3 100644
--- a/shell/e-storage-set-view.c
+++ b/shell/e-storage-set-view.c
@@ -1555,7 +1555,8 @@ etree_node_destroy_func (void *data,
path = (char *) data;
storage_set_view = E_STORAGE_SET_VIEW (user_data);
- remove_node_from_hash (storage_set_view, path);
+ if (strcmp (path, ROOT_NODE_NAME))
+ remove_node_from_hash (storage_set_view, path);
g_free (path);
}
@@ -1602,7 +1603,7 @@ removed_storage_cb (EStorageSet *storage_set,
etree = priv->etree_model;
path = g_strconcat (G_DIR_SEPARATOR_S, e_storage_get_name (storage), NULL);
- node = remove_node_from_hash (storage_set_view, path);
+ node = lookup_node_in_hash (storage_set_view, path);
g_free (path);
e_tree_memory_node_remove (E_TREE_MEMORY(etree), node);
@@ -1683,7 +1684,7 @@ removed_folder_cb (EStorageSet *storage_set,
priv = storage_set_view->priv;
etree = priv->etree_model;
- node = remove_node_from_hash (storage_set_view, path);
+ node = lookup_node_in_hash (storage_set_view, path);
e_tree_memory_node_remove (E_TREE_MEMORY(etree), node);
}