diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2013-05-21 01:41:57 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2013-05-21 03:34:32 +0800 |
commit | badc0e6156777c65885bad6858a6f44f7cbf037e (patch) | |
tree | 1154558584d4ef39c9e9350507063114458d7f54 /addressbook/gui/widgets/eab-contact-formatter.h | |
parent | 3df09670afb44ecf2d39fb71a228f0fa7ebbdb73 (diff) | |
download | gsoc2013-evolution-badc0e6156777c65885bad6858a6f44f7cbf037e.tar.gz gsoc2013-evolution-badc0e6156777c65885bad6858a6f44f7cbf037e.tar.zst gsoc2013-evolution-badc0e6156777c65885bad6858a6f44f7cbf037e.zip |
Simplify EABContactFormatter.
Simplify the EABContactFormatter API as follows:
* Drop all constructor arguments from eab_contact_formatter_new()
since get/set functions exist for all of them.
* Remove eab_contact_formatter_format_contact_async() since
EABContactFormatter does not block.
* Replace eab_contact_formatter_format_contact_sync() with
eab_contact_formatter_format_contact() which drops the CamelStream
and GCancellable arguments and takes a GString as an output buffer.
* Remove the "state" and "style" properties, and always use a white
background when rendering the full contact.
This is particularly important since render_normal() dereferenced
the GtkStyle without checking for NULL, which would crash on mails
with a vCard MIME part when "Show Full vCard" was clicked, because
the "vcard-inline" module never set a GtkStyle.
Diffstat (limited to 'addressbook/gui/widgets/eab-contact-formatter.h')
-rw-r--r-- | addressbook/gui/widgets/eab-contact-formatter.h | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/addressbook/gui/widgets/eab-contact-formatter.h b/addressbook/gui/widgets/eab-contact-formatter.h index 58f671fe9f..4dc1427960 100644 --- a/addressbook/gui/widgets/eab-contact-formatter.h +++ b/addressbook/gui/widgets/eab-contact-formatter.h @@ -60,14 +60,7 @@ struct _EABContactFormatterClass { GType eab_contact_formatter_get_type (void) G_GNUC_CONST; EABContactFormatter * - eab_contact_formatter_new (EABContactDisplayMode mode, - gboolean render_maps); -GtkStyle * eab_contact_formatter_get_style (EABContactFormatter *formatter); -void eab_contact_formatter_set_style (EABContactFormatter *formatter, - GtkStyle *context); -GtkStateType eab_contact_formatter_get_state (EABContactFormatter *formatter); -void eab_contact_formatter_set_state (EABContactFormatter *formatter, - GtkStateType state); + eab_contact_formatter_new (void); gboolean eab_contact_formatter_get_render_maps (EABContactFormatter *formatter); void eab_contact_formatter_set_render_maps @@ -79,17 +72,10 @@ EABContactDisplayMode void eab_contact_formatter_set_display_mode (EABContactFormatter *formatter, EABContactDisplayMode mode); -void eab_contact_formatter_format_contact_sync - (EABContactFormatter *formatter, - EContact *contact, - CamelStream *stream, - GCancellable *cancellable); -void eab_contact_formatter_format_contact_async +void eab_contact_formatter_format_contact (EABContactFormatter *formatter, EContact *contact, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); + GString *output_buffer); void eab_contact_formatter_bind_dom (WebKitDOMDocument *document); G_END_DECLS |