0.9.0claws16
authorChristoph Hohmann <reboot@gmx.ch>
Fri, 6 Jun 2003 22:09:46 +0000 (22:09 +0000)
committerChristoph Hohmann <reboot@gmx.ch>
Fri, 6 Jun 2003 22:09:46 +0000 (22:09 +0000)
* configure.ac
* src/mimeview.h
        add check for fnmatch.h and include it when available

* src/mimeview.[ch]
        fix wrong case sensitivity of Content-Types

* src/gtk/Makefile.am
        need the same include paths in gtk directory as in
        common directory because .h files in common can
        include files from these directories, when included
        in gtk's .h or .c files

ChangeLog.claws
configure.ac
src/gtk/Makefile.am
src/mimeview.c
src/mimeview.h

index 05608b1cc18b4a8e532e6068ad52e6d97512b05f..d0364cbaedeb59bb742e3ed5573f8807644ba1fd 100644 (file)
@@ -1,3 +1,18 @@
+2003-06-06 [christoph] 0.9.0claws16
+
+       * configure.ac
+       * src/mimeview.h
+               add check for fnmatch.h and include it when available
+
+       * src/mimeview.[ch]
+               fix wrong case sensitivity of Content-Types
+
+       * src/gtk/Makefile.am
+               need the same include paths in gtk directory as in
+               common directory because .h files in common can
+               include files from these directories, when included
+               in gtk's .h or .c files
+
 2003-06-06 [alfons]    0.9.0claws15
 
        * src/mimeview.c
 2003-06-06 [alfons]    0.9.0claws15
 
        * src/mimeview.c
index 80e0b366f441c38f7d3ba5f48a8ba0467a51f468..2dff4d01ea3712ba4357f488690f8eb5367c34da 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws15
+EXTRA_VERSION=claws16
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
@@ -128,7 +128,7 @@ AC_HEADER_STDC
 AC_HEADER_SYS_WAIT
 AC_CHECK_HEADERS(fcntl.h sys/file.h unistd.h paths.h \
                 sys/param.h sys/utsname.h sys/select.h \
 AC_HEADER_SYS_WAIT
 AC_CHECK_HEADERS(fcntl.h sys/file.h unistd.h paths.h \
                 sys/param.h sys/utsname.h sys/select.h \
-                wchar.h wctype.h)
+                wchar.h wctype.h fnmatch.h)
 
 dnl Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
 
 dnl Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
index 94d68f86d0f292d1fa1d5fa8d1d3630a8cd62826..ba395c5067bd132ff4c21d8e2a7a0fba58ce7846 100644 (file)
@@ -14,10 +14,11 @@ libsylpheedgtk_la_SOURCES = \
        prefswindow.c prefswindow.h \
        sslcertwindow.c sslcertwindow.h
 
        prefswindow.c prefswindow.h \
        sslcertwindow.c sslcertwindow.h
 
-INCLUDES = \
+CPPFLAGS = \
        -I../common \
        -I.. \
        $(GTK_CFLAGS)
        -I../common \
        -I.. \
        $(GTK_CFLAGS)
+       $(OPENSSL_CFLAGS)
 
 libsylpheedgtk_la_LIBADD = \
        ../common/libsylpheedcommon.la \
 
 libsylpheedgtk_la_LIBADD = \
        ../common/libsylpheedcommon.la \
index d739317849731865e6cecdc52e0f9e15dbd2f4f6..3a5d678f8ee1df79619188f750bf6f9ef2b9100e 100644 (file)
@@ -36,6 +36,9 @@
 #include <gtk/gtkdnd.h>
 #include <gtk/gtkselection.h>
 #include <stdio.h>
 #include <gtk/gtkdnd.h>
 #include <gtk/gtkselection.h>
 #include <stdio.h>
+#ifdef HAVE_FNMATCH_H
+#include <fnmatch.h>
+#endif
 
 #include "intl.h"
 #include "main.h"
 
 #include "intl.h"
 #include "main.h"
@@ -478,6 +481,17 @@ static MimeViewer *get_viewer_for_content_type(MimeView *mimeview, const gchar *
        GSList *cur;
        MimeViewerFactory *factory = NULL;
        MimeViewer *viewer = NULL;
        GSList *cur;
        MimeViewerFactory *factory = NULL;
        MimeViewer *viewer = NULL;
+
+/*
+ * FNM_CASEFOLD is a GNU extension
+ * if its not defined copy the string to the stack and
+ * convert the copy to lower case
+ */
+#ifndef FNM_CASEFOLD
+#define FNM_CASEFOLD 0
+       Xstrdup_a(content_type, content_type, return NULL);
+       g_strdown((gchar *)content_type);
+#endif
        
        for (cur = mimeviewer_factories; cur != NULL; cur = g_slist_next(cur)) {
                MimeViewerFactory *curfactory = cur->data;
        
        for (cur = mimeviewer_factories; cur != NULL; cur = g_slist_next(cur)) {
                MimeViewerFactory *curfactory = cur->data;
@@ -485,7 +499,7 @@ static MimeViewer *get_viewer_for_content_type(MimeView *mimeview, const gchar *
 
                while (curfactory->content_types[i] != NULL) {
                        debug_print("%s\n", curfactory->content_types[i]);
 
                while (curfactory->content_types[i] != NULL) {
                        debug_print("%s\n", curfactory->content_types[i]);
-                       if(!fnmatch(curfactory->content_types[i], content_type, 0)) {
+                       if(!fnmatch(curfactory->content_types[i], content_type, FNM_CASEFOLD)) {
                                factory = curfactory;
                                break;
                        }
                                factory = curfactory;
                                break;
                        }
index a8bea564e55650c68d1fb6abf5f106f7378b51b7..5411b1c21ce154653c1b042162344f00c18956b4 100644 (file)
@@ -74,6 +74,10 @@ struct _MimeView
 
 struct _MimeViewerFactory
 {
 
 struct _MimeViewerFactory
 {
+       /**
+         * Array of supported content types.
+        * Must be NULL terminated and lower case
+        */
        gchar **content_types;
        gint priority;
        
        gchar **content_types;
        gint priority;