GtkWidget *calendar_box;
GtkWidget *calendar_icon;
#endif
+ GtkWidget *calendar_actions_box;
+ GtkWidget *calendar_actions_container;
/* internal adjustments for set_scroll_adjustments */
GtkAdjustment *hadj;
gtk_widget_hide_all (priv->priority_box);
}
+ priv->calendar_actions_box = NULL;
priv->calendar_icon = gtk_image_new ();
gtk_image_set_from_icon_name (GTK_IMAGE (priv->calendar_icon), MODEST_HEADER_ICON_CALENDAR, GTK_ICON_SIZE_MENU);
gtk_misc_set_alignment (GTK_MISC (priv->calendar_icon), 0.0, 0.5);
g_free (att_label);
}
+ priv->calendar_actions_container = gtk_vbox_new (FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (priv->headers_box), priv->calendar_actions_container, FALSE, FALSE, 0);
+
#ifndef MODEST_TOOLKIT_HILDON2
separator = gtk_hseparator_new ();
gtk_box_pack_start (GTK_BOX(priv->headers_box), separator, FALSE, FALSE, 0);
g_return_if_fail (MODEST_IS_GTKHTML_MSG_VIEW (self));
priv = MODEST_GTKHTML_MSG_VIEW_GET_PRIVATE (self);
+ if (priv->calendar_actions_box) {
+ gtk_widget_destroy (priv->calendar_actions_box);
+ priv->calendar_actions_box = NULL;
+ }
+
calendar_part = modest_tny_msg_find_calendar (TNY_MSG (msg));
if (calendar_part) {
+ priv->calendar_actions_box = gtk_vbox_new (FALSE, 0);
+ gtk_widget_show (priv->calendar_actions_box);
+ gtk_box_pack_start (GTK_BOX (priv->calendar_actions_container), priv->calendar_actions_box, FALSE, FALSE, 0);
+ gtk_widget_show (priv->calendar_actions_container);
+ g_signal_emit_by_name (G_OBJECT (self), "handle-calendar", calendar_part, priv->calendar_actions_box);
gtk_widget_show_all (priv->calendar_box);
g_object_unref (calendar_part);
} else {
FETCH_IMAGE_SIGNAL,
SHOW_DETAILS_SIGNAL,
LIMIT_ERROR_SIGNAL,
+ HANDLE_CALENDAR_SIGNAL,
LAST_SIGNAL
};
static guint signals[LAST_SIGNAL] = {0};
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
+ signals[HANDLE_CALENDAR_SIGNAL] =
+ g_signal_new ("handle_calendar",
+ MODEST_TYPE_MSG_VIEW,
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET(ModestMsgViewIface, handle_calendar),
+ NULL, NULL,
+ modest_marshal_VOID__OBJECT_OBJECT,
+ G_TYPE_NONE, 2, G_TYPE_OBJECT, G_TYPE_OBJECT);
initialized = TRUE;
}
}