Пример #1
0
static struct _GtkWidget *eih_get_widget(EImport *ei, EImportTarget *target, EImportImporter *im)
{
	struct _EImportHookImporter *ihook = (EImportHookImporter *)im;
	EImportHook *hook = im->user_data;

	return e_plugin_invoke(hook->hook.plugin, ihook->get_widget, target);
}
Пример #2
0
static void eih_cancel(EImport *ei, EImportTarget *target, EImportImporter *im)
{
	struct _EImportHookImporter *ihook = (EImportHookImporter *)im;
	EImportHook *hook = im->user_data;

	e_plugin_invoke(hook->hook.plugin, ihook->cancel, target);
}
Пример #3
0
static gboolean eih_supported(EImport *ei, EImportTarget *target, EImportImporter *im)
{
	struct _EImportHookImporter *ihook = (EImportHookImporter *)im;
	EImportHook *hook = im->user_data;

	return e_plugin_invoke(hook->hook.plugin, ihook->supported, target) != NULL;
}
Пример #4
0
static void
emph_event_handle(EEvent *ee, EEventItem *item, void *data)
{
	struct _EEventHook *hook = data;

	/* FIXME: we could/should just remove the items we added to the event handler */
	if (!hook->hook.plugin->enabled)
		return;

	e_plugin_invoke(hook->hook.plugin, (char *)item->user_data, ee->target);
}
Пример #5
0
static void
emfh_format_format (EMFormat *md,
                    CamelStream *stream,
                    CamelMimePart *part,
                    const EMFormatHandler *info,
                    GCancellable *cancellable,
                    gboolean is_fallback)
{
	struct _EMFormatHookItem *item = (EMFormatHookItem *) info;

	if (item->hook->hook.plugin->enabled) {
		EMFormatHookTarget target = {
			md, stream, part, item
		};

		e_plugin_invoke (item->hook->hook.plugin, item->format, &target);
	} else if (info->old) {
		info->old->handler (
			md, stream, part, info->old, cancellable, FALSE);
	}
}