0.8.11claws163
authorChristoph Hohmann <reboot@gmx.ch>
Sun, 18 May 2003 16:15:33 +0000 (16:15 +0000)
committerChristoph Hohmann <reboot@gmx.ch>
Sun, 18 May 2003 16:15:33 +0000 (16:15 +0000)
* 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

ChangeLog.claws
configure.ac
src/mimeview.c
src/mimeview.h
src/plugins/dillo_viewer/dillo_viewer.c
src/plugins/image_viewer/viewer.c
src/plugins/mathml_viewer/mathml_viewer.c

index ae68815..f9c9ad6 100644 (file)
@@ -1,3 +1,11 @@
+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
index 7f06d21..d9e6ab3 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 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
index a7f1537..d31ceb1 100644 (file)
@@ -483,11 +483,18 @@ static MimeViewer *get_viewer_for_content_type(MimeView *mimeview, const gchar *
        
        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;
index 4d53a1b..a8bea56 100644 (file)
@@ -74,7 +74,7 @@ struct _MimeView
 
 struct _MimeViewerFactory
 {
-       gchar *content_type;
+       gchar **content_types;
        gint priority;
        
        MimeViewer *(*create_viewer) (void);
index 68c88f6..580e7f8 100644 (file)
@@ -151,9 +151,12 @@ static MimeViewer *dillo_viewer_create(void)
        return (MimeViewer *) viewer;
 }
 
+static gchar *content_types[] = 
+       {"text/html", NULL};
+
 static MimeViewerFactory dillo_viewer_factory =
 {
-       "text/html",
+       content_types,  
        0,
 
        dillo_viewer_create
index c7fde98..240be8a 100644 (file)
@@ -397,9 +397,12 @@ MimeViewer *image_viewer_create(void)
        return (MimeViewer *) imageviewer;
 }
 
+static gchar *content_types[] =
+       {"image/*", NULL};
+
 MimeViewerFactory image_viewer_factory =
 {
-       "image/*",
+       content_types,
        0,
        
        image_viewer_create,
index cb8d41c..59a63ff 100644 (file)
@@ -124,9 +124,12 @@ static MimeViewer *mathml_viewer_create(void)
        return (MimeViewer *) viewer;
 }
 
+static gchar *content_types[] =
+       {"text/mathml", NULL};
+
 static MimeViewerFactory mathml_viewer_factory =
 {
-       "text/mathml",
+       content_types,
        0,
        
        mathml_viewer_create,