aboutsummaryrefslogtreecommitdiffstats
path: root/em-format/e-mail-formatter-attachment-bar.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-05-17 01:06:56 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-05-20 01:07:20 +0800
commitcd5a55f9812643109be6c2b0ed5d8f8ce655a4a9 (patch)
tree271b673b6e311d5cb44acdd0b6c1d1830aa6982e /em-format/e-mail-formatter-attachment-bar.c
parentf6f11a1da2dfa2c7616cd18b36a44fefd66f0c75 (diff)
downloadgsoc2013-evolution-cd5a55f9812643109be6c2b0ed5d8f8ce655a4a9.tar
gsoc2013-evolution-cd5a55f9812643109be6c2b0ed5d8f8ce655a4a9.tar.gz
gsoc2013-evolution-cd5a55f9812643109be6c2b0ed5d8f8ce655a4a9.tar.bz2
gsoc2013-evolution-cd5a55f9812643109be6c2b0ed5d8f8ce655a4a9.tar.lz
gsoc2013-evolution-cd5a55f9812643109be6c2b0ed5d8f8ce655a4a9.tar.xz
gsoc2013-evolution-cd5a55f9812643109be6c2b0ed5d8f8ce655a4a9.tar.zst
gsoc2013-evolution-cd5a55f9812643109be6c2b0ed5d8f8ce655a4a9.zip
em-format cleanups.
Diffstat (limited to 'em-format/e-mail-formatter-attachment-bar.c')
-rw-r--r--em-format/e-mail-formatter-attachment-bar.c25
1 files changed, 7 insertions, 18 deletions
diff --git a/em-format/e-mail-formatter-attachment-bar.c b/em-format/e-mail-formatter-attachment-bar.c
index f91500ed1d..61c1509cd1 100644
--- a/em-format/e-mail-formatter-attachment-bar.c
+++ b/em-format/e-mail-formatter-attachment-bar.c
@@ -64,17 +64,8 @@ emfe_attachment_bar_format (EMailFormatterExtension *extension,
camel_stream_write_string (stream, str, cancellable, NULL);
g_free (str);
- return TRUE;
-}
-static void
-unset_bar_from_store_data (GObject *store,
- EAttachmentBar *bar)
-{
- /*
- if (E_IS_ATTACHMENT_STORE (store))
- g_object_set_data (store, "attachment-bar", NULL);
- */
+ return TRUE;
}
static GtkWidget *
@@ -83,17 +74,15 @@ emfe_attachment_bar_get_widget (EMailFormatterExtension *extension,
EMailPart *part,
GHashTable *params)
{
- EMailPartAttachmentBar *empab;
+ EAttachmentStore *store;
GtkWidget *widget;
- g_return_val_if_fail (E_MAIL_PART_IS (part, EMailPartAttachmentBar), NULL);
+ g_return_val_if_fail (E_IS_MAIL_PART_ATTACHMENT_BAR (part), NULL);
+
+ store = E_MAIL_PART_ATTACHMENT_BAR (part)->store;
- empab = (EMailPartAttachmentBar *) part;
- widget = e_attachment_bar_new (empab->store);
- g_object_set_data (G_OBJECT (empab->store), "attachment-bar", widget);
- g_object_weak_ref (
- G_OBJECT (widget),
- (GWeakNotify) unset_bar_from_store_data, empab->store);
+ widget = e_attachment_bar_new (store);
+ g_object_set_data (G_OBJECT (store), "attachment-bar", widget);
return widget;
}