+
+static gboolean
+on_handle_calendar (ModestMsgView *msgview, TnyMimePart *calendar_part, GtkContainer *container, ModestMsgViewWindow *self)
+{
+ const gchar *account_name;
+ ModestProtocolType proto_type;
+ ModestProtocol *protocol;
+ gboolean retval = FALSE;
+
+ account_name = modest_window_get_active_account (MODEST_WINDOW (self));
+
+ /* Get proto */
+ proto_type = modest_account_mgr_get_store_protocol (modest_runtime_get_account_mgr (),
+ account_name);
+ protocol =
+ modest_protocol_registry_get_protocol_by_type (modest_runtime_get_protocol_registry (),
+ proto_type);
+
+ if (MODEST_IS_ACCOUNT_PROTOCOL (protocol)) {
+ retval = modest_account_protocol_handle_calendar (MODEST_ACCOUNT_PROTOCOL (protocol), MODEST_WINDOW (self),
+ calendar_part, container);
+ }
+ return retval;
+}