aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc/e-attachment-bar.h
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@novell.com>2006-05-27 04:51:51 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2006-05-27 04:51:51 +0800
commitcae250057c8ad1a0ce35ff5d119063e187789038 (patch)
treec3684eb32c29ea83b208c2a28e804d7ff72accde /widgets/misc/e-attachment-bar.h
parent859a20c8042ec24ab669fe75aca7dce976b17218 (diff)
downloadgsoc2013-evolution-cae250057c8ad1a0ce35ff5d119063e187789038.tar
gsoc2013-evolution-cae250057c8ad1a0ce35ff5d119063e187789038.tar.gz
gsoc2013-evolution-cae250057c8ad1a0ce35ff5d119063e187789038.tar.bz2
gsoc2013-evolution-cae250057c8ad1a0ce35ff5d119063e187789038.tar.lz
gsoc2013-evolution-cae250057c8ad1a0ce35ff5d119063e187789038.tar.xz
gsoc2013-evolution-cae250057c8ad1a0ce35ff5d119063e187789038.tar.zst
gsoc2013-evolution-cae250057c8ad1a0ce35ff5d119063e187789038.zip
Fix for Novell bug #178631
2006-05-26 Jeffrey Stedfast <fejj@novell.com> Fix for Novell bug #178631 * e-attachment-bar.c: Changed the EAttachmentBarPrivate struct, we no longer use a linked list, instead we use a GPtrArray - faster, simpler (plus all the code used indexes anyway, so it was really bizarre). (free_attachment_list): Removed. (attachment_destroy): New GWeakNotify callback for when an EAttachment object gets destroyed. Remove the attachment from the attachments array. (add_common): Updated to add to an array rather than a linked list. Also weak_ref the attachment object. (remove_attachment): Removed. (update): Updated to use the array instead of linked list of attachments. (e_attachment_bar_remove_selected): Same. (e_attachment_bar_set_width): Same. (e_attachment_bar_edit_selected): Same. (e_attachment_bar_get_selected): Same. (e_attachment_bar_get_attachment): Same. (e_attachment_bar_get_all_attachments): Same and also optimised since we can cheat now without having to g_slist_reverse. (e_attachment_bar_get_parts): Same. (destroy): Same. (eab_drag_data_get): Same. (init): Init attachments to a g_ptr_array_new (e_attachment_bar_to_multipart): Updated to use the attachments array. (e_attachment_bar_get_num_attachments): Updated to return the attachments->len. (e_attachment_bar_get_download_count): Updated to use the array. * e-attachment.c (finalise): Close the editor dialog if it is open. (async_progress_update_cb): If the phase is COMPLETE but the file_size is 0, then treat it as an error. In the error case, unref the attachment object (this will magically remove it from the EAttachmentBar). (close_cb): Don't unref the attachment object here anymore. (e_attachment_edit): Don't ref the EAttachment anymore. svn path=/trunk/; revision=32042
Diffstat (limited to 'widgets/misc/e-attachment-bar.h')
-rw-r--r--widgets/misc/e-attachment-bar.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/widgets/misc/e-attachment-bar.h b/widgets/misc/e-attachment-bar.h
index 21f568c186..0acccf742a 100644
--- a/widgets/misc/e-attachment-bar.h
+++ b/widgets/misc/e-attachment-bar.h
@@ -48,13 +48,12 @@ extern "C" {
typedef struct _EAttachmentBar EAttachmentBar;
typedef struct _EAttachmentBarClass EAttachmentBarClass;
-typedef struct _EAttachmentBarPrivate EAttachmentBarPrivate;
struct _EAttachmentBar {
GnomeIconList parent;
gboolean expand;
-
- EAttachmentBarPrivate *priv;
+
+ struct _EAttachmentBarPrivate *priv;
};
struct _EAttachmentBarClass {
@@ -68,12 +67,12 @@ GtkType e_attachment_bar_get_type (void);
GtkWidget *e_attachment_bar_new (GtkAdjustment *adj);
void e_attachment_bar_to_multipart (EAttachmentBar *bar, CamelMultipart *multipart,
- const char *default_charset);
+ const char *default_charset);
guint e_attachment_bar_get_num_attachments (EAttachmentBar *bar);
-void e_attachment_bar_attach (EAttachmentBar *bar, const char *file_name, char *disposition);
+void e_attachment_bar_attach (EAttachmentBar *bar, const char *file_name, const char *disposition);
void e_attachment_bar_attach_mime_part (EAttachmentBar *bar, CamelMimePart *part);
int e_attachment_bar_get_download_count (EAttachmentBar *bar);
-void e_attachment_bar_attach_remote_file (EAttachmentBar *bar,const gchar *url, const char *disposition);
+void e_attachment_bar_attach_remote_file (EAttachmentBar *bar, const char *url, const char *disposition);
GSList *e_attachment_bar_get_attachment (EAttachmentBar *bar, int id);
void e_attachment_bar_add_attachment (EAttachmentBar *bar, EAttachment *attachment);
void e_attachment_bar_edit_selected (EAttachmentBar *bar);