X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fwidgets%2Fmodest-expander-mail-header-view.c;h=c6a3aef7113aa1aac2db6bb8117987c5a18f0dad;hp=8a7c3d94df4bc3d3f0b2f3afc85f53402c8a0252;hb=1f240a543af567aeac580bbd10d07f55f015c4cc;hpb=e374da56f67092cecb1572dd4bee2ca34e0bc04c diff --git a/src/widgets/modest-expander-mail-header-view.c b/src/widgets/modest-expander-mail-header-view.c index 8a7c3d9..c6a3aef 100644 --- a/src/widgets/modest-expander-mail-header-view.c +++ b/src/widgets/modest-expander-mail-header-view.c @@ -32,6 +32,7 @@ #include #include +#include #include #include #include @@ -55,6 +56,7 @@ struct _ModestExpanderMailHeaderViewPriv GtkSizeGroup *labels_size_group; gboolean is_outgoing; gboolean is_draft; + gboolean is_loading; TnyHeader *header; TnyHeaderFlags priority_flags; ModestDatetimeFormatter *datetime_formatter; @@ -83,6 +85,12 @@ static TnyHeaderFlags modest_expander_mail_header_view_get_priority_default (Mod static void modest_expander_mail_header_view_set_priority (ModestMailHeaderView *self, TnyHeaderFlags flags); static void modest_expander_mail_header_view_set_priority_default (ModestMailHeaderView *headers_view, TnyHeaderFlags flags); +static gboolean modest_expander_mail_header_view_get_loading (ModestMailHeaderView *headers_view); +static gboolean modest_expander_mail_header_view_get_loading_default (ModestMailHeaderView *headers_view); +static void modest_expander_mail_header_view_set_branding (ModestMailHeaderView *headers_view, const gchar *brand_name, const GdkPixbuf *brand_icon); +static void modest_expander_mail_header_view_set_branding_default (ModestMailHeaderView *headers_view, const gchar *brand_name, const GdkPixbuf *brand_icon); +static void modest_expander_mail_header_view_set_loading (ModestMailHeaderView *headers_view, gboolean is_loading); +static void modest_expander_mail_header_view_set_loading_default (ModestMailHeaderView *headers_view, gboolean is_loading); static const GtkWidget *modest_expander_mail_header_view_add_custom_header (ModestMailHeaderView *self, const gchar *label, GtkWidget *custom_widget, @@ -480,6 +488,8 @@ modest_expander_mail_header_view_instance_init (GTypeInstance *instance, gpointe priv->is_outgoing = FALSE; priv->is_draft = FALSE; + priv->is_loading = FALSE; + return; } @@ -528,6 +538,9 @@ modest_mail_header_view_init (gpointer g, gpointer iface_data) klass->get_priority = modest_expander_mail_header_view_get_priority; klass->set_priority = modest_expander_mail_header_view_set_priority; + klass->get_loading = modest_expander_mail_header_view_get_loading; + klass->set_loading = modest_expander_mail_header_view_set_loading; + klass->set_branding = modest_expander_mail_header_view_set_branding; klass->add_custom_header = modest_expander_mail_header_view_add_custom_header; return; @@ -545,6 +558,9 @@ modest_expander_mail_header_view_class_init (ModestExpanderMailHeaderViewClass * klass->clear_func = modest_expander_mail_header_view_clear_default; klass->set_priority_func = modest_expander_mail_header_view_set_priority_default; klass->get_priority_func = modest_expander_mail_header_view_get_priority_default; + klass->set_loading_func = modest_expander_mail_header_view_set_loading_default; + klass->get_loading_func = modest_expander_mail_header_view_get_loading_default; + klass->set_branding_func = modest_expander_mail_header_view_set_branding_default; klass->add_custom_header_func = modest_expander_mail_header_view_add_custom_header_default; object_class->finalize = modest_expander_mail_header_view_finalize; @@ -653,3 +669,52 @@ modest_expander_mail_header_view_set_priority_default (ModestMailHeaderView *hea gtk_widget_show (priv->priority_icon); } } + +static gboolean +modest_expander_mail_header_view_get_loading (ModestMailHeaderView *headers_view) +{ + return MODEST_EXPANDER_MAIL_HEADER_VIEW_GET_CLASS (headers_view)->get_loading_func (headers_view); +} + +static gboolean +modest_expander_mail_header_view_get_loading_default (ModestMailHeaderView *headers_view) +{ + ModestExpanderMailHeaderViewPriv *priv; + + g_return_val_if_fail (MODEST_IS_EXPANDER_MAIL_HEADER_VIEW (headers_view), FALSE); + priv = MODEST_EXPANDER_MAIL_HEADER_VIEW_GET_PRIVATE (headers_view); + + return priv->is_loading; +} + +static void +modest_expander_mail_header_view_set_loading (ModestMailHeaderView *headers_view, gboolean is_loading) +{ + MODEST_EXPANDER_MAIL_HEADER_VIEW_GET_CLASS (headers_view)->set_loading_func (headers_view, is_loading); +} + +static void +modest_expander_mail_header_view_set_loading_default (ModestMailHeaderView *headers_view, gboolean is_loading) +{ + ModestExpanderMailHeaderViewPriv *priv; + + g_return_if_fail (MODEST_IS_EXPANDER_MAIL_HEADER_VIEW (headers_view)); + priv = MODEST_EXPANDER_MAIL_HEADER_VIEW_GET_PRIVATE (headers_view); + + priv->is_loading = is_loading; +} + +static void +modest_expander_mail_header_view_set_branding (ModestMailHeaderView *headers_view, const gchar *brand_name, const GdkPixbuf *brand_icon) +{ + MODEST_EXPANDER_MAIL_HEADER_VIEW_GET_CLASS (headers_view)->set_branding_func (headers_view, brand_name, brand_icon); +} + +static void +modest_expander_mail_header_view_set_branding_default (ModestMailHeaderView *headers_view, const gchar *brand_name, const GdkPixbuf *brand_icon) +{ + g_return_if_fail (MODEST_IS_EXPANDER_MAIL_HEADER_VIEW (headers_view)); + + /* Empty implementation */ + return; +}