From 13c9d214fa4b93a0c3ae08a533a8605b13a323b1 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Mon, 20 May 2002 19:06:03 +0000 Subject: Set the can_sync_offline property on the EFolder based on the * e-corba-storage.c (impl_StorageListener_notifyFolderCreated): Set the can_sync_offline property on the EFolder based on the canSyncOffline value on the CORBA folder. * evolution-test-component.c (setup_custom_storage): Pass FALSE for @sync_offline to evolution_storage_new_folder(). * e-local-storage.c (new_folder): Pass FALSE for @sync_offline to evolution_storage_new_folder(). * evolution-storage.h (evolution_storage_new_folder): New arg @can_sync_offline. * subscribe-dialog.c (recursive_add_folder): Pass TRUE for @sync_offline to evolution_storage_new_folder(). * mail-folder-cache.c (real_flush_updates): Pass TRUE for @sync_offline to evolution_storage_new_folder(). * gui/component/addressbook-storage.c (load_source_data): Pass FALSE for @sync_offline to evolution_storage_new_folder(). (addressbook_storage_add_source): Pass FALSE for @sync_offline to evolution_storage_new_folder(). svn path=/trunk/; revision=16947 --- addressbook/ChangeLog | 7 + addressbook/gui/component/addressbook-storage.c | 4 +- mail/ChangeLog | 8 + mail/mail-config.glade | 522 ++++++------------------ mail/mail-folder-cache.c | 4 +- mail/subscribe-dialog.c | 2 +- shell/ChangeLog | 15 + shell/e-corba-storage.c | 1 + shell/e-local-storage.c | 3 +- shell/evolution-storage.c | 12 +- shell/evolution-storage.h | 3 +- shell/evolution-test-component.c | 6 +- 12 files changed, 166 insertions(+), 421 deletions(-) diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index abcc8b687a..2cb1d58305 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,10 @@ +2002-05-20 Ettore Perazzoli + + * gui/component/addressbook-storage.c (load_source_data): Pass + FALSE for @sync_offline to evolution_storage_new_folder(). + (addressbook_storage_add_source): Pass FALSE for @sync_offline to + evolution_storage_new_folder(). + 2002-05-16 Ettore Perazzoli * gui/component/addressbook-component.c (request_quit): New, quit diff --git a/addressbook/gui/component/addressbook-storage.c b/addressbook/gui/component/addressbook-storage.c index 358c3e8245..be2ad3d1e7 100644 --- a/addressbook/gui/component/addressbook-storage.c +++ b/addressbook/gui/component/addressbook-storage.c @@ -460,7 +460,7 @@ load_source_data (const char *file_path) path = g_strdup_printf ("/%s", source->name); evolution_storage_new_folder (storage, path, source->name, "ldap-contacts", source->uri, - source->description, 0); + source->description, 0, FALSE); sources = g_list_append (sources, source); @@ -579,7 +579,7 @@ addressbook_storage_add_source (AddressbookSource *source) addressbook_get_other_contact_storage(); path = g_strdup_printf ("/%s", source->name); evolution_storage_new_folder (storage, path, source->name, "ldap-contacts", - source->uri, source->description, 0); + source->uri, source->description, 0, FALSE); g_free (path); } diff --git a/mail/ChangeLog b/mail/ChangeLog index b78dbef629..838d31935f 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,11 @@ +2002-05-20 Ettore Perazzoli + + * subscribe-dialog.c (recursive_add_folder): Pass TRUE for + @sync_offline to evolution_storage_new_folder(). + + * mail-folder-cache.c (real_flush_updates): Pass TRUE for + @sync_offline to evolution_storage_new_folder(). + 2002-05-20 Ettore Perazzoli * mail-callbacks.c (composer_sent_cb): Always unref the composer diff --git a/mail/mail-config.glade b/mail/mail-config.glade index 3c6884c5cf..0040fe6271 100644 --- a/mail/mail-config.glade +++ b/mail/mail-config.glade @@ -250,7 +250,7 @@ Click "Finish" to save your settings. account_vbox 3 False - 0 + 3 GtkLabel @@ -261,8 +261,8 @@ For example: "Work" or "Personal" False 0 0.5 - 0 - 0 + 3 + 3 0 False @@ -476,8 +476,8 @@ For example: "Work" or "Personal" GtkTable identity_optional_table 3 - 4 - 4 + 3 + 2 False 3 3 @@ -512,14 +512,13 @@ For example: "Work" or "Personal" GtkLabel label-sig-text - + GTK_JUSTIFY_LEFT False 0 0.5 0 0 - option-sig-text 0 1 @@ -536,33 +535,6 @@ For example: "Work" or "Personal" - - GtkLabel - label-sig-html - - GTK_JUSTIFY_LEFT - False - 0 - 0.5 - 0 - 0 - option-sig-html - - 0 - 1 - 3 - 4 - 0 - 0 - False - False - False - False - True - False - - - GtkEntry identity_organization @@ -573,7 +545,7 @@ For example: "Work" or "Personal" 1 - 4 + 2 1 2 0 @@ -587,143 +559,6 @@ For example: "Work" or "Personal" - - GtkButton - button-sig-edit-text - True - - GTK_RELIEF_NORMAL - - 3 - 4 - 2 - 3 - 0 - 0 - False - False - False - False - True - False - - - - - GtkButton - button-sig-edit-html - True - - GTK_RELIEF_NORMAL - - 3 - 4 - 3 - 4 - 0 - 0 - False - False - False - False - True - False - - - - - GtkButton - button-sig-new-text - True - - GTK_RELIEF_NORMAL - - 2 - 3 - 2 - 3 - 0 - 0 - False - False - False - False - True - False - - - - - GtkButton - button-sig-new-html - True - - GTK_RELIEF_NORMAL - - 2 - 3 - 3 - 4 - 0 - 0 - False - False - False - False - True - False - - - - - GtkOptionMenu - option-sig-html - True - None -Same as text -Random - - 0 - - 1 - 2 - 3 - 4 - 0 - 0 - False - False - False - False - True - False - - - - - GtkOptionMenu - option-sig-text - True - None -Random - - 0 - - 1 - 2 - 2 - 3 - 0 - 0 - True - False - False - False - True - False - - - GtkLabel reply_to_label @@ -761,7 +596,7 @@ Random 1 - 4 + 2 0 1 0 @@ -774,6 +609,41 @@ Random False + + + GtkAlignment + alignment27 + 0 + 0.5 + 0 + 1 + + 1 + 2 + 2 + 3 + 0 + 0 + True + False + False + False + True + False + + + + GtkOptionMenu + optionmenu2 + True + Default + +Signature #1 +Signature #2 + + 0 + + @@ -4374,8 +4244,8 @@ Baltic (ISO-8859-4) GtkCList clistSignatures True - 2 - 189,80 + 1 + 80 GTK_SELECTION_SINGLE True GTK_SHADOW_IN @@ -4383,22 +4253,9 @@ Baltic (ISO-8859-4) GtkLabel CList:title - lblSignature - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkLabel - CList:title - lblRandomized - - GTK_JUSTIFY_CENTER + label448 + + GTK_JUSTIFY_LEFT False 0.5 0.5 @@ -4420,23 +4277,6 @@ Baltic (ISO-8859-4) False - - GtkLabel - lblSpacer - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - 0 - False - False - - - GtkVButtonBox vbuttonbox25 @@ -4457,7 +4297,7 @@ Baltic (ISO-8859-4) cmdSignatureAdd True True - + GTK_RELIEF_NORMAL @@ -4475,27 +4315,78 @@ Baltic (ISO-8859-4) cmdSignatureDelete True True - + GTK_RELIEF_NORMAL - - - GtkToggleButton - chkRandomSignature - True - - GTK_RELIEF_NORMAL - False - - 0 - False - False - + + GtkButton + button1 + True + True + + GTK_RELIEF_NORMAL + + + + GtkButton + button2 + True + True + + GTK_RELIEF_NORMAL + + + GtkHBox + hbox165 + False + 0 + + 0 + False + False + + + + GtkLabel + label449 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 3 + 0 + optionmenu1 + + 0 + False + False + + + + + GtkOptionMenu + optionmenu1 + True + Random + +Signature #1 +Signature #2 + + 0 + + 0 + False + False + + + + GtkHBox hbox162 @@ -4533,191 +4424,6 @@ Baltic (ISO-8859-4) - - - GtkCheckButton - chkAdvancedSignature - True - - False - True - - 0 - False - False - - - - - GtkFrame - frameAdvancedOptions - - 0 - GTK_SHADOW_ETCHED_IN - - 0 - False - False - - - - GtkTable - tableAdvancedOptions - 3 - 3 - 2 - False - 3 - 3 - - - GtkLabel - lblSignatureFilename - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - entry-sig-filename - - 0 - 1 - 1 - 2 - 0 - 0 - False - False - False - False - True - False - - - - - GnomeFileEntry - fileSignatureFilename - sig-filename - 10 - Select a signature file - False - True - - 1 - 2 - 1 - 2 - 0 - 0 - True - False - False - False - True - False - - - - GtkEntry - GnomeEntry:entry - entry-sig-filename - True - True - True - 0 - - - - - - GnomeFileEntry - fileSignatureScript - sig-script - 10 - Select a signature script - False - True - - 1 - 2 - 2 - 3 - 0 - 0 - True - False - False - False - True - False - - - - GtkEntry - GnomeEntry:entry - entry-sig-script - True - True - True - 0 - - - - - - GtkLabel - lblSignatureScript - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - entry-sig-script - - 0 - 1 - 2 - 3 - 0 - 0 - False - False - False - False - True - False - - - - - GtkCheckButton - chkHtmlSignature - True - - False - True - - 0 - 2 - 0 - 1 - 0 - 0 - False - False - False - False - True - False - - - - diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c index a9479f3d36..4ceb61b16a 100644 --- a/mail/mail-folder-cache.c +++ b/mail/mail-folder-cache.c @@ -190,7 +190,9 @@ real_flush_updates(void *o, void *event_data, void *data) char *type = (strncmp(up->uri, "vtrash:", 7)==0)?"vtrash":"mail"; d(printf("Adding new folder: %s\n", up->path)); - evolution_storage_new_folder(storage, up->path, up->name, type, up->uri, up->name, up->unread); + evolution_storage_new_folder(storage, + up->path, up->name, type, up->uri, up->name, up->unread, + TRUE); } if (!up->olduri && up->add) diff --git a/mail/subscribe-dialog.c b/mail/subscribe-dialog.c index 25d6290094..b7a65e3089 100644 --- a/mail/subscribe-dialog.c +++ b/mail/subscribe-dialog.c @@ -185,7 +185,7 @@ recursive_add_folder (EvolutionStorage *storage, const char *path, const char *n g_free (parent); } - evolution_storage_new_folder (storage, path, name, "mail", url, name, FALSE); + evolution_storage_new_folder (storage, path, name, "mail", url, name, FALSE, TRUE); } /* ** Get one level of folderinfo ****************************************** */ diff --git a/shell/ChangeLog b/shell/ChangeLog index ff0acc14de..d9c431e1ab 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,18 @@ +2002-05-20 Ettore Perazzoli + + * e-corba-storage.c (impl_StorageListener_notifyFolderCreated): + Set the can_sync_offline property on the EFolder based on the + canSyncOffline value on the CORBA folder. + + * evolution-test-component.c (setup_custom_storage): Pass FALSE + for @sync_offline to evolution_storage_new_folder(). + + * e-local-storage.c (new_folder): Pass FALSE for @sync_offline to + evolution_storage_new_folder(). + + * evolution-storage.h (evolution_storage_new_folder): New arg + @can_sync_offline. + 2002-05-20 Ettore Perazzoli * Evolution-Offline.idl (syncFolder): Remove exception. diff --git a/shell/e-corba-storage.c b/shell/e-corba-storage.c index 96a981b859..8caaac7776 100644 --- a/shell/e-corba-storage.c +++ b/shell/e-corba-storage.c @@ -108,6 +108,7 @@ impl_StorageListener_notifyFolderCreated (PortableServer_Servant servant, e_folder_set_physical_uri (e_folder, folder->physicalUri); e_folder_set_unread_count (e_folder, folder->unreadCount); + e_folder_set_can_sync_offline (e_folder, folder->canSyncOffline); if (! e_storage_new_folder (storage, path, e_folder)) { g_warning ("Cannot register folder -- %s %s\n", path, folder->displayName); diff --git a/shell/e-local-storage.c b/shell/e-local-storage.c index 58d8a5b20a..46965f43a8 100644 --- a/shell/e-local-storage.c +++ b/shell/e-local-storage.c @@ -145,7 +145,8 @@ new_folder (ELocalStorage *local_storage, e_folder_get_type_string (folder), e_folder_get_physical_uri (folder), e_folder_get_description (folder), - e_folder_get_unread_count (folder)); + e_folder_get_unread_count (folder), + FALSE); } static gboolean diff --git a/shell/evolution-storage.c b/shell/evolution-storage.c index 28cbf89ce2..9e6b7883d5 100644 --- a/shell/evolution-storage.c +++ b/shell/evolution-storage.c @@ -943,7 +943,8 @@ evolution_storage_new_folder (EvolutionStorage *evolution_storage, const char *type, const char *physical_uri, const char *description, - int unread_count) + int unread_count, + gboolean can_sync_offline) { EvolutionStorageResult result; EvolutionStoragePrivate *priv; @@ -970,10 +971,11 @@ evolution_storage_new_folder (EvolutionStorage *evolution_storage, CORBA_exception_init (&ev); corba_folder = GNOME_Evolution_Folder__alloc (); - corba_folder->displayName = CORBA_string_dup (display_name); - corba_folder->description = CORBA_string_dup (description); - corba_folder->type = CORBA_string_dup (type); - corba_folder->physicalUri = CORBA_string_dup (physical_uri); + corba_folder->displayName = CORBA_string_dup (display_name); + corba_folder->description = CORBA_string_dup (description); + corba_folder->type = CORBA_string_dup (type); + corba_folder->physicalUri = CORBA_string_dup (physical_uri); + corba_folder->canSyncOffline = (CORBA_boolean) can_sync_offline; evolutionUri = make_full_uri (evolution_storage, path); corba_folder->evolutionUri = CORBA_string_dup (evolutionUri); diff --git a/shell/evolution-storage.h b/shell/evolution-storage.h index 59d46f7a44..10cec85ea3 100644 --- a/shell/evolution-storage.h +++ b/shell/evolution-storage.h @@ -138,7 +138,8 @@ EvolutionStorageResult evolution_storage_new_folder (EvolutionStorage const char *type, const char *physical_uri, const char *description, - int unread_count); + int unread_count, + gboolean can_sync_offline); EvolutionStorageResult evolution_storage_update_folder (EvolutionStorage *evolution_storage, const char *path, int unread_count); diff --git a/shell/evolution-test-component.c b/shell/evolution-test-component.c index 5c2d36b16e..98227d67b3 100644 --- a/shell/evolution-test-component.c +++ b/shell/evolution-test-component.c @@ -326,8 +326,10 @@ setup_custom_storage (EvolutionShellClient *shell_client) return; } - evolution_storage_new_folder (the_storage, "/FirstFolder", "FirstFolder", "mail", "file:///tmp/blah", "", 0); - evolution_storage_new_folder (the_storage, "/SecondFolder", "SecondFolder", "calendar", "file:///tmp/bleh", "", 0); + evolution_storage_new_folder (the_storage, "/FirstFolder", "FirstFolder", + "mail", "file:///tmp/blah", "", 0, TRUE); + evolution_storage_new_folder (the_storage, "/SecondFolder", "SecondFolder", + "calendar", "file:///tmp/bleh", "", 0, FALSE); } -- cgit