Show warning, but display message in case we cannot get attachments.
authorParthasarathi Susarla <sparthasarathi@novell.com>
Thu, 20 Jan 2005 08:14:15 +0000 (08:14 +0000)
committerParthasarathi Susarla <saps@src.gnome.org>
Thu, 20 Jan 2005 08:14:15 +0000 (08:14 +0000)
2005-01-20  Parthasarathi Susarla <sparthasarathi@novell.com>

* providers/groupwise/camel-groupwise-folder.c
  (groupwise_folder_get_message):
  Show warning, but display message in case we cannot get
  attachments.
  Display the itip control for appointments even if no
  message body is present
* providers/groupwise/camel-groupwise-store.c
  (groupwise_get_folder_info):
  Not displaying the Calendar and Contacts folders in the mail
  view.

camel/ChangeLog
camel/providers/groupwise/camel-groupwise-folder.c
camel/providers/groupwise/camel-groupwise-store.c

index 8436a72..ec5e168 100644 (file)
@@ -1,3 +1,16 @@
+2005-01-20  Parthasarathi Susarla <sparthasarathi@novell.com>
+
+       * providers/groupwise/camel-groupwise-folder.c 
+         (groupwise_folder_get_message):
+         Show warning, but display message in case we cannot get
+         attachments. 
+         Display the itip control for appointments even if no 
+         message body is present
+       * providers/groupwise/camel-groupwise-store.c 
+         (groupwise_get_folder_info):
+         Not displaying the Calendar and Contacts folders in the mail
+         view.
+
 2005-01-20  Not Zed  <NotZed@Ximian.com>
 
        * camel-lock-helper.c (main): since malloc(MAXINT+1) returns a
index 0304415..3db237b 100644 (file)
@@ -242,7 +242,10 @@ groupwise_folder_get_message( CamelFolder *folder,
                camel_multipart_set_boundary (multipart, NULL);
                camel_mime_part_set_encoding(part, CAMEL_TRANSFER_ENCODING_8BIT);
                if (type == E_GW_ITEM_TYPE_APPOINTMENT) {
-                       camel_mime_part_set_content(part, " ", strlen(" "),"text/calendar") ;
+                       char *cal_buffer = NULL ;
+                       int len ;
+                       convert_to_calendar (item, &cal_buffer, &len) ;
+                       camel_mime_part_set_content(part, cal_buffer, len,"text/calendar") ;
                } else
                        camel_mime_part_set_content(part, " ", strlen(" "),"text/html") ;
                camel_multipart_add_part (multipart, part) ;
@@ -271,8 +274,9 @@ groupwise_folder_get_message( CamelFolder *folder,
 
                        status = e_gw_connection_get_attachment (cnc, g_strdup(attach->id), 0, -1, (unsigned char **)&attachment, &len) ;
                        if (status != E_GW_CONNECTION_STATUS_OK) {
-                               camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_INVALID, _("Could not get message"));
-                               return NULL;
+                               //camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_INVALID, _("Could not get attachment"));
+                               g_message ("Could not get attachment\n") ;
+                               continue ;
                        }
                        if (attach && (len !=0) ) {
                                part = camel_mime_part_new () ;
index 6df7572..22401c3 100644 (file)
@@ -701,8 +701,12 @@ groupwise_get_folder_info (CamelStore *store, const char *top, guint32 flags, Ca
                CamelFolderInfo *fi;
                const char *parent ;
                gchar *par_name = NULL;
+               EGwContainer *container = E_GW_CONTAINER (folder_list->data) ;
+               EGwContainerType type = e_gw_container_get_container_type (container) ;
                
-               if (e_gw_container_is_root (E_GW_CONTAINER(folder_list->data))) 
+               if (e_gw_container_is_root (container)) 
+                       continue ;
+               if ( (type == E_GW_CONTAINER_TYPE_CALENDAR) || (type == E_GW_CONTAINER_TYPE_CONTACTS) )
                        continue ;
 
                fi = g_new0 (CamelFolderInfo, 1);
@@ -713,14 +717,14 @@ groupwise_get_folder_info (CamelStore *store, const char *top, guint32 flags, Ca
                  NULL is found
                */
 
-               parent = e_gw_container_get_parent_id (E_GW_CONTAINER (folder_list->data)) ;
+               parent = e_gw_container_get_parent_id (container) ;
                par_name = g_hash_table_lookup (priv->id_hash, parent) ;
 
                if (par_name != NULL) {
                        gchar *temp_parent = NULL, *temp = NULL ;
-                       gchar *str = g_strconcat (par_name,"/",e_gw_container_get_name (E_GW_CONTAINER (folder_list->data)), NULL) ;
+                       gchar *str = g_strconcat (par_name,"/",e_gw_container_get_name (container), NULL) ;
 
-                       fi->name = g_strdup (e_gw_container_get_name (E_GW_CONTAINER (folder_list->data)) ) ;
+                       fi->name = g_strdup (e_gw_container_get_name (container) ) ;
 
                        temp_parent = g_hash_table_lookup (priv->parent_hash, parent) ;
                        while (temp_parent) {
@@ -738,20 +742,20 @@ groupwise_get_folder_info (CamelStore *store, const char *top, guint32 flags, Ca
                        g_free (str) ;
                }
                else {
-                       fi->name =  fi->full_name = g_strdup (e_gw_container_get_name (E_GW_CONTAINER (folder_list->data)));
-                       fi->uri = g_strconcat (url, "", e_gw_container_get_name(E_GW_CONTAINER(folder_list->data)), NULL) ;
+                       fi->name =  fi->full_name = g_strdup (e_gw_container_get_name (container));
+                       fi->uri = g_strconcat (url, "", e_gw_container_get_name(container), NULL) ;
 
                }
 
-               if (e_gw_container_get_is_shared_to_me (E_GW_CONTAINER(folder_list->data)))
+               if (e_gw_container_get_is_shared_to_me (container))
                         fi->flags |= CAMEL_FOLDER_SHARED_TO_ME;
                                                                                                                              
-                if (e_gw_container_get_is_shared_by_me (E_GW_CONTAINER(folder_list->data)))
+                if (e_gw_container_get_is_shared_by_me (container))
                         fi->flags |= CAMEL_FOLDER_SHARED_BY_ME;
 
                g_ptr_array_add (folders, fi);
-               fi->total = e_gw_container_get_total_count (E_GW_CONTAINER (folder_list->data)) ;
-               fi->unread = e_gw_container_get_unread_count (E_GW_CONTAINER (folder_list->data)) ;
+               fi->total = e_gw_container_get_total_count (container) ;
+               fi->unread = e_gw_container_get_unread_count (container) ;
                
        }
        if ( (top != NULL) && (folders->len == 0)) {