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 ae688159c3b52201dc35cf7fe567f5b4f545e617..f9c9ad692acd77b715ce4e50a72d91bc1a6fc60d 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 7f06d21682e7e421ec82a0f9dd0cf6af515405fd..d9e6ab3926c02491d4f41af734b4ebc7fa4acaff 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 a7f1537a5f82e37cc485048c91be7d0ac7886910..d31ceb1c0d8bd7067ecc5b1ca993e22919e429dc 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 4d53a1b2cc5b7f6785f244b1e4f6f0aaaaf9c681..a8bea564e55650c68d1fb6abf5f106f7378b51b7 100644 (file)
@@ -74,7 +74,7 @@ struct _MimeView
 
 struct _MimeViewerFactory
 {
-       gchar *content_type;
+       gchar **content_types;
        gint priority;
        
        MimeViewer *(*create_viewer) (void);
index 68c88f6652cd42bfa223c9e5d2d91e4d6d421d71..580e7f858a9ade95f6bf3e63615495bf763a2a6a 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 c7fde98f4763b8bad802026bd68c8f54fcb4d074..240be8a43f4690f43b56f1ae93c4632bee0075fc 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 cb8d41ca1c747ce6d78a58195b52ccc5a9467fb3..59a63ff985459000dd2b26491ba3cf67f4475f41 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,