+2003-05-18 [christoph] 0.8.11claws163
+
+ * src/mimeview.[ch]
+ * src/plugins/dillo_viewer/dillo_viewer.c
+ * src/plugins/image_viewer/viewer.c
+ * src/plugins/mathml_viewer/mathml_viewer.c
+ let a viewer to have a list of Content-Types
+
2003-05-18 [paul] 0.8.11claws162
* src/prefs_filtering.c
MICRO_VERSION=11
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=claws162
+EXTRA_VERSION=claws163
VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
dnl set $target
for (cur = mimeviewer_factories; cur != NULL; cur = g_slist_next(cur)) {
MimeViewerFactory *curfactory = cur->data;
-
- if(!fnmatch(curfactory->content_type, content_type, 0)) {
- factory = curfactory;
- break;
+ gint i = 0;
+
+ while (curfactory->content_types[i] != NULL) {
+ debug_print("%s\n", curfactory->content_types[i]);
+ if(!fnmatch(curfactory->content_types[i], content_type, 0)) {
+ factory = curfactory;
+ break;
+ }
+ i++;
}
+ if (factory != NULL)
+ break;
}
if (factory == NULL)
return NULL;
struct _MimeViewerFactory
{
- gchar *content_type;
+ gchar **content_types;
gint priority;
MimeViewer *(*create_viewer) (void);
return (MimeViewer *) viewer;
}
+static gchar *content_types[] =
+ {"text/html", NULL};
+
static MimeViewerFactory dillo_viewer_factory =
{
- "text/html",
+ content_types,
0,
dillo_viewer_create
return (MimeViewer *) imageviewer;
}
+static gchar *content_types[] =
+ {"image/*", NULL};
+
MimeViewerFactory image_viewer_factory =
{
- "image/*",
+ content_types,
0,
image_viewer_create,
return (MimeViewer *) viewer;
}
+static gchar *content_types[] =
+ {"text/mathml", NULL};
+
static MimeViewerFactory mathml_viewer_factory =
{
- "text/mathml",
+ content_types,
0,
mathml_viewer_create,