diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2002-09-26 02:06:29 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2002-09-26 02:06:29 +0800 |
commit | 6a5efeb0f98a88afbbe18af740df7a209bb1c71b (patch) | |
tree | 0b7cc11115a6fa4ff45f634545fad0c842c1e7d0 /shell/e-shell.c | |
parent | 541c29f0d9914395cf5a2b840edc5e88c5f809bd (diff) | |
download | gsoc2013-evolution-6a5efeb0f98a88afbbe18af740df7a209bb1c71b.tar.gz gsoc2013-evolution-6a5efeb0f98a88afbbe18af740df7a209bb1c71b.tar.zst gsoc2013-evolution-6a5efeb0f98a88afbbe18af740df7a209bb1c71b.zip |
[Finish fixing #11645.]
* e-shell-folder-commands.c (xfer_result_callback): Don't update
the shortcuts here anymore since now the shell takes care of it.
* e-shell.c (storage_set_moved_folder_callback): New callback for
EStorageSetView::folder_moved; update the shortcuts.
(e_shell_construct): Connect.
* e-storage-set.c: Renamed StorageConverterCallbackData to
StorageCallbackData. New members destination_folder,
source_folder, operation in it.
(class_init): Install "moved_folder" signal.
(storage_callback_data_new): Renamed from
storage_converter_callback_data_new.
(storage_callback_data_free): New.
(storage_callback): Renamed from storage_callback_converter. Use
storage_callback_data_free().
(e_storage_set_async_create_folder): Updated to use the
storage_callback and storage_callback_data_new().
(e_storage_set_async_remove_folder): Likewise.
(e_storage_set_async_xfer_folder): Likewise.
* e-storage-set.h: New signal "moved_folder".
svn path=/trunk/; revision=18216
Diffstat (limited to 'shell/e-shell.c')
-rw-r--r-- | shell/e-shell.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/shell/e-shell.c b/shell/e-shell.c index 3fedf7dd56..33cdf23751 100644 --- a/shell/e-shell.c +++ b/shell/e-shell.c @@ -914,6 +914,32 @@ set_owner_on_components (EShell *shell, } +/* EStorageSet callbacks. */ + +static void +storage_set_moved_folder_callback (EStorageSet *storage_set, + const char *source_path, + const char *destination_path, + void *data) +{ + EShell *shell; + char *source_uri; + char *destination_uri; + + shell = E_SHELL (data); + + source_uri = g_strconcat (E_SHELL_URI_PREFIX, source_path, NULL); + destination_uri = g_strconcat (E_SHELL_URI_PREFIX, destination_path, NULL); + + e_shortcuts_update_shortcuts_for_changed_uri (e_shell_get_shortcuts (shell), + source_uri, + destination_uri); + + g_free (source_uri); + g_free (destination_uri); +} + + /* EShellView handling and bookkeeping. */ static int @@ -1208,6 +1234,11 @@ e_shell_construct (EShell *shell, priv->folder_type_registry = e_folder_type_registry_new (); priv->uri_schema_registry = e_uri_schema_registry_new (); priv->storage_set = e_storage_set_new (priv->folder_type_registry); + + gtk_signal_connect_while_alive (GTK_OBJECT (priv->storage_set), "moved_folder", + GTK_SIGNAL_FUNC (storage_set_moved_folder_callback), + shell, + GTK_OBJECT (shell)); e_folder_type_registry_register_type (priv->folder_type_registry, "noselect", "empty.gif", |