2006-06-28 [colin] 2.3.1cvs32
authorColin Leroy <colin@colino.net>
Wed, 28 Jun 2006 16:22:41 +0000 (16:22 +0000)
committerColin Leroy <colin@colino.net>
Wed, 28 Jun 2006 16:22:41 +0000 (16:22 +0000)
* src/mimeview.c
Save named inlined attachments with "Save all"
* src/main.c
* src/mbox.c
* src/common/plugin.c
* src/common/plugin.h
* src/common/sylpheed.c
* src/common/utils.c
* src/plugins/pgpcore/sylpheed.def
* src/plugins/pgpinline/sylpheed.def
* src/plugins/pgpmime/sylpheed.def
Win32 compatibility patch, by
Werner Koch

13 files changed:
ChangeLog
PATCHSETS
configure.ac
src/common/plugin.c
src/common/plugin.h
src/common/sylpheed.c
src/common/utils.c
src/main.c
src/mbox.c
src/mimeview.c
src/plugins/pgpcore/sylpheed.def
src/plugins/pgpinline/sylpheed.def
src/plugins/pgpmime/sylpheed.def

index 871778652149a30a725ed74391f532955a5b19c5..f989f814bbc4a6bd2b160ce3772a94bb363e25f6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2006-06-28 [colin]     2.3.1cvs32
+
+       * src/mimeview.c
+               Save named inlined attachments with "Save all"
+       * src/main.c
+       * src/mbox.c
+       * src/common/plugin.c
+       * src/common/plugin.h
+       * src/common/sylpheed.c
+       * src/common/utils.c
+       * src/plugins/pgpcore/sylpheed.def
+       * src/plugins/pgpinline/sylpheed.def
+       * src/plugins/pgpmime/sylpheed.def
+               Win32 compatibility patch, by
+               Werner Koch
+
 2006-06-28 [wwp]       2.3.1cvs31
 
        * src/imap.c
 2006-06-28 [wwp]       2.3.1cvs31
 
        * src/imap.c
index 94e835df30b9a64e0cf6ef642d2caa93816f7884..39127fb3c64e23b110eb3563d4a0333fd3ed4865 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.3.2.9 -r 1.3.2.10 src/prefs_ext_prog.c;  ) > 2.3.1cvs29.patchset
 ( cvs diff -u -r 1.5.2.31 -r 1.5.2.32 src/gtk/gtkutils.c;  ) > 2.3.1cvs30.patchset
 ( cvs diff -u -r 1.179.2.122 -r 1.179.2.123 src/imap.c;  cvs diff -u -r 1.52.2.22 -r 1.52.2.23 src/prefs_folder_item.c;  ) > 2.3.1cvs31.patchset
 ( cvs diff -u -r 1.3.2.9 -r 1.3.2.10 src/prefs_ext_prog.c;  ) > 2.3.1cvs29.patchset
 ( cvs diff -u -r 1.5.2.31 -r 1.5.2.32 src/gtk/gtkutils.c;  ) > 2.3.1cvs30.patchset
 ( cvs diff -u -r 1.179.2.122 -r 1.179.2.123 src/imap.c;  cvs diff -u -r 1.52.2.22 -r 1.52.2.23 src/prefs_folder_item.c;  ) > 2.3.1cvs31.patchset
+( cvs diff -u -r 1.115.2.91 -r 1.115.2.92 src/main.c;  cvs diff -u -r 1.28.2.21 -r 1.28.2.22 src/mbox.c;  cvs diff -u -r 1.83.2.71 -r 1.83.2.72 src/mimeview.c;  cvs diff -u -r 1.13.2.18 -r 1.13.2.19 src/common/plugin.c;  cvs diff -u -r 1.5.2.5 -r 1.5.2.6 src/common/plugin.h;  cvs diff -u -r 1.7.2.7 -r 1.7.2.8 src/common/sylpheed.c;  cvs diff -u -r 1.36.2.68 -r 1.36.2.69 src/common/utils.c;  cvs diff -u -r 1.1.2.3 -r 1.1.2.4 src/plugins/pgpcore/sylpheed.def;  cvs diff -u -r 1.1.2.3 -r 1.1.2.4 src/plugins/pgpinline/sylpheed.def;  cvs diff -u -r 1.1.2.3 -r 1.1.2.4 src/plugins/pgpmime/sylpheed.def;  ) > 2.3.1cvs32.patchset
index e33a94f00d40c490d103749ff80ccf11f7be388b..a01185d2b69262451675c7bc34a6dbf8d9787ab9 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=3
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=31
+EXTRA_VERSION=32
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 33b097c249880ff0e33bc79e7a2e545c8e54cc44..8287f947ad125f924e2c7998884f50c254a37373 100644 (file)
@@ -64,10 +64,15 @@ static gint list_find_by_string(gconstpointer data, gconstpointer str)
 
 static gint list_find_by_plugin_filename(const Plugin *plugin, const gchar *filename)
 {
 
 static gint list_find_by_plugin_filename(const Plugin *plugin, const gchar *filename)
 {
-        g_return_val_if_fail(plugin, 1);
-        g_return_val_if_fail(plugin->filename, 1);
-        g_return_val_if_fail(filename, 1);
-        return strcmp(filename, plugin->filename);
+       /* FIXME: There is a problem in case of symlinks or when a
+          user tries to load a plugin with the same name from a
+          different directory.  I think it would be better to compare
+          only the basename of the filename here (case-insensitive on
+          W32). */
+       g_return_val_if_fail(plugin, 1);
+       g_return_val_if_fail(plugin->filename, 1);
+       g_return_val_if_fail(filename, 1);
+       return strcmp(filename, plugin->filename);
 }
 
 void plugin_save_list(void)
 }
 
 void plugin_save_list(void)
@@ -116,7 +121,7 @@ void plugin_save_list(void)
 static gboolean plugin_is_loaded(const gchar *filename)
 {
        return (g_slist_find_custom(plugins, filename, 
 static gboolean plugin_is_loaded(const gchar *filename)
 {
        return (g_slist_find_custom(plugins, filename, 
-                  (GCompareFunc)list_find_by_plugin_filename) != NULL);
+                 (GCompareFunc)list_find_by_plugin_filename) != NULL);
 }
 
 static Plugin *plugin_get_by_filename(const gchar *filename)
 }
 
 static Plugin *plugin_get_by_filename(const gchar *filename)
@@ -146,9 +151,11 @@ static gint plugin_load_deps(const gchar *filename, gchar **error)
        gchar *deps_file = NULL;
        FILE *fp = NULL;
        gchar buf[BUFFSIZE];
        gchar *deps_file = NULL;
        FILE *fp = NULL;
        gchar buf[BUFFSIZE];
+       gchar *p;
 
 
-        tmp = g_strdup(filename);
-       *strrchr(tmp, '.') = '\0';
+       tmp = g_strdup(filename);
+       if( (p = strrchr(tmp, '.')) )
+         *p = '\0';
        deps_file = g_strconcat(tmp, ".deps", NULL);
        g_free(tmp);
        
        deps_file = g_strconcat(tmp, ".deps", NULL);
        g_free(tmp);
        
@@ -242,8 +249,8 @@ Plugin *plugin_load(const gchar *filename, gchar **error)
        /* check duplicate plugin path name */
        if (plugin_is_loaded(filename)) {
                *error = g_strdup(_("Plugin already loaded"));
        /* check duplicate plugin path name */
        if (plugin_is_loaded(filename)) {
                *error = g_strdup(_("Plugin already loaded"));
-               return NULL;                
-       }                               
+               return NULL;            
+       }                              
        
        plugin_remove_from_unloaded_list(filename);
        
        
        plugin_remove_from_unloaded_list(filename);
        
@@ -255,7 +262,7 @@ Plugin *plugin_load(const gchar *filename, gchar **error)
                return NULL;
        }
 
                return NULL;
        }
 
-        debug_print("trying to load `%s'\n", filename);
+       debug_print("trying to load `%s'\n", filename);
        plugin->module = g_module_open(filename, 0);
        if (plugin->module == NULL) {
                *error = g_strdup(g_module_error());
        plugin->module = g_module_open(filename, 0);
        if (plugin->module == NULL) {
                *error = g_strdup(g_module_error());
@@ -390,6 +397,45 @@ void plugin_unload_all(const gchar *type)
        }
 }
 
        }
 }
 
+
+/* Load those plugins we always want to use.  No error output; just
+ * try. */
+void plugin_load_standard_plugins (void)
+{
+       static const char *names[] = {
+#ifdef G_OS_WIN32 
+               "pgpmime",
+               "pgpinline",
+#endif
+               NULL
+       };
+       int i;
+       gchar *error, *filename;
+       
+       for (i=0; names[i]; i++) {
+               /* Simple hack to check whether the plugin has already
+                * been loaded but checking only for the basename. */
+               GSList *cur = plugins;
+               for(; cur; cur = cur->next) {
+                       Plugin *p = (Plugin *)cur->data;
+                       if (strstr(p->filename, names[i]))
+                               break;
+               }
+               if (!cur) { /* Not yet loaded. */
+                       /* FIXME: get_plugin_dir () returns with a trailing
+                        * (back)slash; this should be fixed so that we can use
+                        * g_module_build_path here. */
+                       filename = g_strconcat (get_plugin_dir(),
+                                               names[i], NULL);
+                       error = NULL;
+                       plugin_load(filename, &error);
+                       g_free (error);
+                       g_free(filename);
+               }
+       }
+}
+
+
 GSList *plugin_get_list(void)
 {
        return g_slist_copy(plugins);
 GSList *plugin_get_list(void)
 {
        return g_slist_copy(plugins);
index 9d0869092816e039a52ddcf1e94ad61d99cb03b7..1dd18c29db2e849b23b5940320a957d3f676d0ba 100644 (file)
@@ -38,6 +38,7 @@ void plugin_unload            (Plugin          *plugin);
 void plugin_load_all           (const gchar     *type);
 void plugin_unload_all         (const gchar     *type);
 void plugin_save_list          (void);
 void plugin_load_all           (const gchar     *type);
 void plugin_unload_all         (const gchar     *type);
 void plugin_save_list          (void);
+void plugin_load_standard_plugins (void);
 
 GSList *plugin_get_list                (void);
 GSList *plugin_get_unloaded_list(void);
 
 GSList *plugin_get_list                (void);
 GSList *plugin_get_unloaded_list(void);
index a71756bed4bab25cf1e699b953291063cfcf0e9f..a17eedda8c7885637c4c37b39132487a19ecf13e 100644 (file)
@@ -100,7 +100,7 @@ gboolean sylpheed_init(int *argc, char ***argv)
 
        setlocale(LC_ALL, "");
 #ifdef ENABLE_NLS
 
        setlocale(LC_ALL, "");
 #ifdef ENABLE_NLS
-       bindtextdomain(PACKAGE, LOCALEDIR);
+       bindtextdomain(PACKAGE, get_locale_dir () );
        bind_textdomain_codeset (PACKAGE, "UTF-8");
        textdomain(PACKAGE);
 #endif /*ENABLE_NLS*/
        bind_textdomain_codeset (PACKAGE, "UTF-8");
        textdomain(PACKAGE);
 #endif /*ENABLE_NLS*/
index 1ec2b08a01931cc375e97b6b6e3b6b5ff23ef9b8..89f6db7e496de6810cf4fc745f88e8268d93b06e 100644 (file)
@@ -170,12 +170,12 @@ gint g_chmod(const gchar *path, gint mode)
 gint mkstemp_name(const gchar *template, gchar **name_used)
 {
        static gulong count=0; /* W32-_mktemp only supports up to 27
 gint mkstemp_name(const gchar *template, gchar **name_used)
 {
        static gulong count=0; /* W32-_mktemp only supports up to 27
-                                  tempfiles... */
+                                 tempfiles... */
        int tmpfd;
 
        *name_used = g_strdup_printf("%s.%ld",_mktemp(template),count++);
        tmpfd = open (*name_used, (O_CREAT | O_RDWR | O_BINARY),
        int tmpfd;
 
        *name_used = g_strdup_printf("%s.%ld",_mktemp(template),count++);
        tmpfd = open (*name_used, (O_CREAT | O_RDWR | O_BINARY),
-                                    (S_IRUSR | S_IWUSR));
+                                   (S_IRUSR | S_IWUSR));
 
        tempfiles=g_slist_append(tempfiles, g_strdup(*name_used));
        if (tmpfd<0) {
 
        tempfiles=g_slist_append(tempfiles, g_strdup(*name_used));
        if (tmpfd<0) {
@@ -370,21 +370,21 @@ gchar *strstr2(const gchar *s1, const gchar *s2)
 gint path_cmp(const gchar *s1, const gchar *s2)
 {
        gint len1, len2;
 gint path_cmp(const gchar *s1, const gchar *s2)
 {
        gint len1, len2;
-        int rc;
+       int rc;
 #ifdef G_OS_WIN32
 #ifdef G_OS_WIN32
-        gchar *s1buf, *s2buf;
+       gchar *s1buf, *s2buf;
 #endif
 
        if (s1 == NULL || s2 == NULL) return -1;
        if (*s1 == '\0' || *s2 == '\0') return -1;
 
 #ifdef G_OS_WIN32
 #endif
 
        if (s1 == NULL || s2 == NULL) return -1;
        if (*s1 == '\0' || *s2 == '\0') return -1;
 
 #ifdef G_OS_WIN32
-        s1buf = g_strdup (s1);
-        s2buf = g_strdup (s2);
-        subst_char (s1buf, '/', G_DIR_SEPARATOR);
-        subst_char (s2buf, '/', G_DIR_SEPARATOR);
-        s1 = s1buf;
-        s2 = s2buf;
+       s1buf = g_strdup (s1);
+       s2buf = g_strdup (s2);
+       subst_char (s1buf, '/', G_DIR_SEPARATOR);
+       subst_char (s2buf, '/', G_DIR_SEPARATOR);
+       s1 = s1buf;
+       s2 = s2buf;
 #endif /* !G_OS_WIN32 */
 
        len1 = strlen(s1);
 #endif /* !G_OS_WIN32 */
 
        len1 = strlen(s1);
@@ -395,10 +395,10 @@ gint path_cmp(const gchar *s1, const gchar *s2)
 
        rc = strncmp(s1, s2, MAX(len1, len2));
 #ifdef G_OS_WIN32
 
        rc = strncmp(s1, s2, MAX(len1, len2));
 #ifdef G_OS_WIN32
-        g_free (s1buf);
-        g_free (s2buf);
+       g_free (s1buf);
+       g_free (s2buf);
 #endif /* !G_OS_WIN32 */
 #endif /* !G_OS_WIN32 */
-        return rc;
+       return rc;
 }
 
 /* remove trailing return code */
 }
 
 /* remove trailing return code */
@@ -1700,7 +1700,7 @@ GList *uri_list_extract_filenames(const gchar *uri_list)
                                        strncpy(escaped_utf8uri, p, q - p + 1);
                                        escaped_utf8uri[q - p + 1] = '\0';
                                        decode_uri(file, escaped_utf8uri);
                                        strncpy(escaped_utf8uri, p, q - p + 1);
                                        escaped_utf8uri[q - p + 1] = '\0';
                                        decode_uri(file, escaped_utf8uri);
-                    /*
+                   /*
                     * g_filename_from_uri() rejects escaped/locale encoded uri
                     * string which come from Nautilus.
                     */
                     * g_filename_from_uri() rejects escaped/locale encoded uri
                     * string which come from Nautilus.
                     */
@@ -1905,8 +1905,8 @@ w32_strerror (int w32_errno)
   if (w32_errno == 0)
     w32_errno = ec;
   FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM, NULL, w32_errno,
   if (w32_errno == 0)
     w32_errno = ec;
   FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM, NULL, w32_errno,
-                 MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT),
-                 strerr, DIM (strerr)-1, NULL);
+                MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT),
+                strerr, DIM (strerr)-1, NULL);
   return strerr;
 }
 
   return strerr;
 }
 
@@ -1924,7 +1924,7 @@ dlsym (void * hd, const char * sym)
     {
       void * fnc = GetProcAddress (hd, sym);
       if (!fnc)
     {
       void * fnc = GetProcAddress (hd, sym);
       if (!fnc)
-        return NULL;
+       return NULL;
       return fnc;
     }
   return NULL;
       return fnc;
     }
   return NULL;
@@ -1964,18 +1964,18 @@ w32_shgetfolderpath (HWND a, int b, HANDLE c, DWORD d, LPSTR e)
       initialized = 1;
 
       for (i=0, handle = NULL; !handle && dllnames[i]; i++)
       initialized = 1;
 
       for (i=0, handle = NULL; !handle && dllnames[i]; i++)
-        {
-          handle = dlopen (dllnames[i], RTLD_LAZY);
-          if (handle)
-            {
-              func = dlsym (handle, "SHGetFolderPathA");
-              if (!func)
-                {
-                  dlclose (handle);
-                  handle = NULL;
-                }
-            }
-        }
+       {
+         handle = dlopen (dllnames[i], RTLD_LAZY);
+         if (handle)
+           {
+             func = dlsym (handle, "SHGetFolderPathA");
+             if (!func)
+               {
+                 dlclose (handle);
+                 handle = NULL;
+               }
+           }
+       }
     }
 
   if (func)
     }
 
   if (func)
@@ -1983,16 +1983,56 @@ w32_shgetfolderpath (HWND a, int b, HANDLE c, DWORD d, LPSTR e)
   else
     return -1;
 }
   else
     return -1;
 }
+
+/* Returns a static string with the directroy from which the module
+   has been loaded.  Returns an empty string on error. */
+static char *w32_get_module_dir(void)
+{
+       static char *moddir;
+
+       if (!moddir) {
+               char name[MAX_PATH+10];
+               char *p;
+
+               if ( !GetModuleFileNameA (0, name, sizeof (name)-10) )
+                       *name = 0;
+               else {
+                       p = strrchr (name, '\\');
+                       if (p)
+                               *p = 0;
+                       else
+                               *name = 0;
+               }
+               moddir = g_strdup (name);
+       }
+       return moddir;
+}
+#endif /* G_OS_WIN32 */
+
+/* Return a static string with the locale dir. */
+const gchar *get_locale_dir(void)
+{
+       static gchar *loc_dir;
+
+#ifdef G_OS_WIN32
+       if (!loc_dir)
+               loc_dir = g_strconcat(w32_get_module_dir(), G_DIR_SEPARATOR_S,
+                                     "\\share\\locale", NULL);
 #endif
 #endif
+       if (!loc_dir)
+               loc_dir = LOCALEDIR;
+       
+       return loc_dir;
+}
+
 
 const gchar *get_home_dir(void)
 {
 #ifdef G_OS_WIN32
        static char home_dir[MAX_PATH] = "";
 
 
 const gchar *get_home_dir(void)
 {
 #ifdef G_OS_WIN32
        static char home_dir[MAX_PATH] = "";
 
-       if (home_dir[0] == '\0')
-               {
-                       if (w32_shgetfolderpath
+       if (home_dir[0] == '\0') {
+               if (w32_shgetfolderpath
                            (NULL, CSIDL_APPDATA|CSIDL_FLAG_CREATE,
                             NULL, 0, home_dir) < 0)
                                strcpy (home_dir, "C:\\Sylpheed");
                            (NULL, CSIDL_APPDATA|CSIDL_FLAG_CREATE,
                             NULL, 0, home_dir) < 0)
                                strcpy (home_dir, "C:\\Sylpheed");
@@ -2112,12 +2152,21 @@ const gchar *get_plugin_dir(void)
        static gchar *plugin_dir = NULL;
 
        if (!plugin_dir)
        static gchar *plugin_dir = NULL;
 
        if (!plugin_dir)
-                plugin_dir = g_strconcat(sylpheed_get_startup_dir(),
-                                         "\\lib\\sylpheed-claws\\plugins\\",
-                                         NULL);
+               plugin_dir = g_strconcat(w32_get_module_dir(),
+                                        "\\lib\\sylpheed-claws\\plugins\\",
+                                        NULL);
        return plugin_dir;
 #else
        return plugin_dir;
 #else
-        return PLUGINDIR;
+       if (is_dir_exist(PLUGINDIR))
+               return PLUGINDIR;
+       else {
+               static gchar *plugin_dir = NULL;
+               if (!plugin_dir)
+                       plugin_dir = g_strconcat(get_rc_dir(), 
+                               G_DIR_SEPARATOR_S, "plugins", 
+                               G_DIR_SEPARATOR_S, NULL);
+               return plugin_dir;                      
+       }
 #endif
 }
 
 #endif
 }
 
@@ -2261,21 +2310,21 @@ gboolean file_exist(const gchar *file, gboolean allow_fifo)
  * straightforward for Unix but more complex for Windows. */
 gboolean is_relative_filename(const gchar *file)
 {
  * straightforward for Unix but more complex for Windows. */
 gboolean is_relative_filename(const gchar *file)
 {
-        if (!file)
-                return TRUE;
+       if (!file)
+               return TRUE;
 #ifdef G_OS_WIN32
 #ifdef G_OS_WIN32
-        if ( *file == '\\' && file[1] == '\\' && strchr (file+2, '\\') )
-                return FALSE; /* Prefixed with a hostname - this can't
-                               * be a relative name. */
+       if ( *file == '\\' && file[1] == '\\' && strchr (file+2, '\\') )
+               return FALSE; /* Prefixed with a hostname - this can't
+                              * be a relative name. */
 
 
-        if ( ((*file >= 'a' && *file <= 'z')
-              || (*file >= 'A' && *file <= 'Z'))
-             && file[1] == ':')
-                file += 2;  /* Skip drive letter. */
+       if ( ((*file >= 'a' && *file <= 'z')
+             || (*file >= 'A' && *file <= 'Z'))
+            && file[1] == ':')
+               file += 2;  /* Skip drive letter. */
 
 
-        return !(*file == '\\' || *file == '/');
+       return !(*file == '\\' || *file == '/');
 #else
 #else
-        return !(*file == G_DIR_SEPARATOR);
+       return !(*file == G_DIR_SEPARATOR);
 #endif
 }
 
 #endif
 }
 
@@ -3180,8 +3229,8 @@ gchar *get_outgoing_rfc2822_str(FILE *fp)
  *   boundary := 0*69<bchars> bcharsnospace
  *   bchars := bcharsnospace / " "
  *   bcharsnospace := DIGIT / ALPHA / "'" / "(" / ")" /
  *   boundary := 0*69<bchars> bcharsnospace
  *   bchars := bcharsnospace / " "
  *   bcharsnospace := DIGIT / ALPHA / "'" / "(" / ")" /
- *                    "+" / "_" / "," / "-" / "." /
- *                    "/" / ":" / "=" / "?"
+ *                 "+" / "_" / "," / "-" / "." /
+ *                 "/" / ":" / "=" / "?"
  *
  * some special characters removed because of buggy MTAs
  */
  *
  * some special characters removed because of buggy MTAs
  */
@@ -3260,7 +3309,7 @@ FILE *get_tmpfile_in_dir(const gchar *dir, gchar **filename)
        int fd;
 #ifdef G_OS_WIN32
        char *template = g_strdup_printf ("%s%csylpheed.XXXXXX",
        int fd;
 #ifdef G_OS_WIN32
        char *template = g_strdup_printf ("%s%csylpheed.XXXXXX",
-                                          dir, G_DIR_SEPARATOR);
+                                         dir, G_DIR_SEPARATOR);
        fd = mkstemp_name(template, filename);
        g_free(template);
 #else
        fd = mkstemp_name(template, filename);
        g_free(template);
 #else
@@ -3732,8 +3781,8 @@ void debug_print_real(const gchar *format, ...)
 
 const char * debug_srcname(const char *file)
 {
 
 const char * debug_srcname(const char *file)
 {
-        const char *s = strrchr (file, '/');
-        return s? s+1:file;
+       const char *s = strrchr (file, '/');
+       return s? s+1:file;
 }
 
 
 }
 
 
@@ -3792,11 +3841,11 @@ int subject_get_prefix_length(const gchar *subject)
                "Odp\\:",                       /* "Odp:" Re (Polish Outlook) */
                "Rif\\:",                       /* "Rif:" (Italian Outlook) */
                "SV\\:",                        /* "SV" (Norwegian) */
                "Odp\\:",                       /* "Odp:" Re (Polish Outlook) */
                "Rif\\:",                       /* "Rif:" (Italian Outlook) */
                "SV\\:",                        /* "SV" (Norwegian) */
-                "Sv\\:",                       /* "Sv" (Norwegian) */
-                "VS\\:",                       /* "VS" (Norwegian) */
-                "Vs\\:",                       /* "Vs" (Norwegian) */
-               "AD\\:",                        /* "AD" (Norwegian) */
-                "Ad\\:"                                /* "Ad" (Norwegian) */
+               "Sv\\:",                        /* "Sv" (Norwegian) */
+               "VS\\:",                        /* "VS" (Norwegian) */
+               "Vs\\:",                        /* "Vs" (Norwegian) */
+               "AD\\:",                        /* "AD" (Norwegian) */
+               "Ad\\:"                         /* "Ad" (Norwegian) */
                /* add more */
        };
        const int PREFIXES = sizeof prefixes / sizeof prefixes[0];
                /* add more */
        };
        const int PREFIXES = sizeof prefixes / sizeof prefixes[0];
@@ -4345,7 +4394,7 @@ static GHashTable *create_domain_tab(void)
            "tc", "td", "tf", "tg", "th", "tj", "tk", "tm", "tn", "to",
            "tp", "tr", "tt", "tv", "tw", "tz", "ua", "ug", "uk", "um",
            "us", "uy", "uz", "va", "vc", "ve", "vg", "vi", "vn", "vu",
            "tc", "td", "tf", "tg", "th", "tj", "tk", "tm", "tn", "to",
            "tp", "tr", "tt", "tv", "tw", "tz", "ua", "ug", "uk", "um",
            "us", "uy", "uz", "va", "vc", "ve", "vg", "vi", "vn", "vu",
-            "wf", "ws", "ye", "yt", "yu", "za", "zm", "zw"
+           "wf", "ws", "ye", "yt", "yu", "za", "zm", "zw"
        };
        gint n;
        GHashTable *htab = g_hash_table_new(g_stricase_hash, g_stricase_equal);
        };
        gint n;
        GHashTable *htab = g_hash_table_new(g_stricase_hash, g_stricase_equal);
@@ -4483,7 +4532,7 @@ search_again:
                                last_dot = ep_;
                                if (*(last_dot + 1) == '.') {
                                        if (prelast_dot == NULL)
                                last_dot = ep_;
                                if (*(last_dot + 1) == '.') {
                                        if (prelast_dot == NULL)
-                                               return FALSE;
+                                               return FALSE;
                                        last_dot = prelast_dot;
                                        break;
                                }
                                        last_dot = prelast_dot;
                                        break;
                                }
index db35939c6462fd97e978511d879d27405c3b36dc..04d8d9ce9791aa057d959e35af09a1d3a5f70a8c 100644 (file)
@@ -539,7 +539,9 @@ int main(int argc, char *argv[])
                                     "Check the Plugins configuration "
                                     "for more information."));
        }
                                     "Check the Plugins configuration "
                                     "for more information."));
        }
-       
+
+       plugin_load_standard_plugins ();
+       
        if (!folder_have_mailbox()) {
                alertpanel_error(_("Sylpheed-Claws has detected a configured "
                                   "mailbox, but could not load it. It is "
        if (!folder_have_mailbox()) {
                alertpanel_error(_("Sylpheed-Claws has detected a configured "
                                   "mailbox, but could not load it. It is "
index e259964eba1909e3ad6bba5d40aa7d6fbb9420c5..5fee70cf35c8b577fa8532aea129bdf144cc2668 100644 (file)
@@ -324,7 +324,7 @@ gint lock_mbox(const gchar *base, LockType type)
        } else if (type == LOCK_FLOCK) {
                gint lockfd;
                gboolean fcntled = FALSE;
        } else if (type == LOCK_FLOCK) {
                gint lockfd;
                gboolean fcntled = FALSE;
-#if HAVE_FCNTL_H
+#if HAVE_FCNTL_H && !defined(G_OS_WIN32)
                struct flock fl;
                fl.l_type = F_WRLCK;
                fl.l_whence = SEEK_SET;
                struct flock fl;
                fl.l_type = F_WRLCK;
                fl.l_whence = SEEK_SET;
@@ -341,7 +341,7 @@ gint lock_mbox(const gchar *base, LockType type)
                        return -1;
                }
                
                        return -1;
                }
                
-#if HAVE_FCNTL_H
+#if HAVE_FCNTL_H && !defined(G_OS_WIN32)
                if (fcntl(lockfd, F_SETLK, &fl) == -1) {
                        g_warning("can't fnctl %s (%s)", base, strerror(errno));
                        return -1;
                if (fcntl(lockfd, F_SETLK, &fl) == -1) {
                        g_warning("can't fnctl %s (%s)", base, strerror(errno));
                        return -1;
@@ -394,7 +394,7 @@ gint unlock_mbox(const gchar *base, gint fd, LockType type)
                return 0;
        } else if (type == LOCK_FLOCK) {
                gboolean fcntled = FALSE;
                return 0;
        } else if (type == LOCK_FLOCK) {
                gboolean fcntled = FALSE;
-#if HAVE_FCNTL_H
+#if HAVE_FCNTL_H && !defined(G_OS_WIN32)
                struct flock fl;
                fl.l_type = F_UNLCK;
                fl.l_whence = SEEK_SET;
                struct flock fl;
                fl.l_type = F_UNLCK;
                fl.l_whence = SEEK_SET;
index b05a37f213c653d851a072b04527e9b7da72564b..0718c98f0d7bcc24559131ef6d550ca258ab0402 100644 (file)
@@ -1439,7 +1439,8 @@ static void mimeview_save_all(MimeView *mimeview)
        while (partinfo != NULL) {
                if (partinfo->type != MIMETYPE_MESSAGE &&
                    partinfo->type != MIMETYPE_MULTIPART &&
        while (partinfo != NULL) {
                if (partinfo->type != MIMETYPE_MESSAGE &&
                    partinfo->type != MIMETYPE_MULTIPART &&
-                   partinfo->disposition != DISPOSITIONTYPE_INLINE) {
+                   (partinfo->disposition != DISPOSITIONTYPE_INLINE
+                    || get_part_name(partinfo) != NULL)) {
                        gchar *filename = mimeview_get_filename_for_part
                                (partinfo, dirname, number++);
 
                        gchar *filename = mimeview_get_filename_for_part
                                (partinfo, dirname, number++);
 
index fb91c812619a25b927947b1222920ee688ce5aad..7573ac911acddace6444af451473f93ef532f849 100644 (file)
@@ -2,6 +2,7 @@ LIBRARY SYLPHEED-CLAWS.EXE
 EXPORTS
 alertpanel
 alertpanel_full
 EXPORTS
 alertpanel
 alertpanel_full
+alertpanel_error
 copy_file_part
 debug_print_real
 debug_srcname
 copy_file_part
 debug_print_real
 debug_srcname
@@ -30,3 +31,5 @@ prefs_set_default
 prefs_write_open
 prefs_write_param
 sylpheed_get_version
 prefs_write_open
 prefs_write_param
 sylpheed_get_version
+privacy_set_error
+privacy_get_error
index dbe2d91baf75e887c63d9560892dcc3ceccaeada..998fc1c7e533d58c047cd5e70cc8293509637478 100644 (file)
@@ -17,3 +17,5 @@ procmime_mimeinfo_parent
 procmime_scan_file
 procmime_write_mimeinfo
 sylpheed_get_version
 procmime_scan_file
 procmime_write_mimeinfo
 sylpheed_get_version
+privacy_set_error
+privacy_get_error
index 31fe7c32ec92c17c1b8e4bb3220b4d70424fef14..bc79608ff657145ec61c9fc3e9bc22f31a6a5e46 100644 (file)
@@ -16,3 +16,5 @@ procmime_mimeinfo_parent
 procmime_scan_file
 procmime_write_mimeinfo
 sylpheed_get_version
 procmime_scan_file
 procmime_write_mimeinfo
 sylpheed_get_version
+privacy_set_error
+privacy_get_error