From 0fa29927fc5a0913388dc8fbc4a9b816c0a11119 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Thu, 2 Nov 2000 00:11:53 +0000 Subject: Add "highligted" field to Folder. Add update_folder method to * Evolution-Storage.idl: Add "highligted" field to Folder. Add update_folder method to StorageListener to change display_name and highlight status. * e-folder.c: Add "highlighted" to EFolder to match the Evolution::Folder type. (e_folder_get_highlighted, e_folder_set_highlighted): Added * evolution-storage-listener.c (impl_Evolution_StorageListener_update_folder, etc): * e-storage.c (e_storage_updated_folder, etc): * e-corba-storage.c (impl_StorageListener_update_folder, etc): Implement update_folder. * e-storage-set.c (storage_updated_folder_cb, etc): Re-emit updated_folder signals received from EStorage. * e-storage-set-view.c (various): Add another model column to the ETable and set it up as a bold_column based on e_folder_get_highligted. (updated_folder_cb, etc): Listen to EStorageSet update_folder signal and emit ETree node_changed signals. * evolution-storage.c (evolution_storage_update_folder): Client function to update a folder's display_name and highlighted status. * Evolution-LocalStorage.idl: * evolution-local-storage.c: * e-local-storage.c: Change set_display_name to update_folder to match Evolution::StorageListener svn path=/trunk/; revision=6328 --- shell/e-storage-set.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'shell/e-storage-set.c') diff --git a/shell/e-storage-set.c b/shell/e-storage-set.c index 7d3fb84a59..246af39f68 100644 --- a/shell/e-storage-set.c +++ b/shell/e-storage-set.c @@ -59,6 +59,7 @@ enum { NEW_STORAGE, REMOVED_STORAGE, NEW_FOLDER, + UPDATED_FOLDER, REMOVED_FOLDER, LAST_SIGNAL }; @@ -135,6 +136,21 @@ storage_new_folder_cb (EStorage *storage, g_free (full_path); } +static void +storage_updated_folder_cb (EStorage *storage, + const char *path, + void *data) +{ + EStorageSet *storage_set; + char *full_path; + + storage_set = E_STORAGE_SET (data); + + full_path = make_full_path (storage, path); + gtk_signal_emit (GTK_OBJECT (storage_set), signals[UPDATED_FOLDER], full_path); + g_free (full_path); +} + static void storage_removed_folder_cb (EStorage *storage, const char *path, @@ -242,6 +258,14 @@ class_init (EStorageSetClass *klass) gtk_marshal_NONE__STRING, GTK_TYPE_NONE, 1, GTK_TYPE_STRING); + signals[UPDATED_FOLDER] = + gtk_signal_new ("updated_folder", + GTK_RUN_FIRST, + object_class->type, + GTK_SIGNAL_OFFSET (EStorageSetClass, updated_folder), + gtk_marshal_NONE__STRING, + GTK_TYPE_NONE, 1, + GTK_TYPE_STRING); signals[REMOVED_FOLDER] = gtk_signal_new ("removed_folder", GTK_RUN_FIRST, @@ -347,6 +371,8 @@ e_storage_set_add_storage (EStorageSet *storage_set, gtk_signal_connect (GTK_OBJECT (storage), "new_folder", GTK_SIGNAL_FUNC (storage_new_folder_cb), storage_set); + gtk_signal_connect (GTK_OBJECT (storage), "updated_folder", + GTK_SIGNAL_FUNC (storage_updated_folder_cb), storage_set); gtk_signal_connect (GTK_OBJECT (storage), "removed_folder", GTK_SIGNAL_FUNC (storage_removed_folder_cb), storage_set); -- cgit v1.2.3