sync with 0.7.6cvs16
authorPaul Mangan <paul@claws-mail.org>
Tue, 28 May 2002 06:42:48 +0000 (06:42 +0000)
committerPaul Mangan <paul@claws-mail.org>
Tue, 28 May 2002 06:42:48 +0000 (06:42 +0000)
ChangeLog
ChangeLog.claws
ChangeLog.jp
configure.in
src/compose.c
src/main.c
src/mh.c
src/template.c
src/utils.c
src/utils.h

index 977e77c..ce2192f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-05-28
+
+       * src/utils.[ch]: make_dir(): wrapper for mkdir() and chmod().
+       * src/compose.c: compose_create(): removed unrequired lines.
+
 2002-05-27
 
        * src/news.c: news_scan_group(): fixed a bug that set the wrong
index eeaf0cf..8796de4 100644 (file)
@@ -1,3 +1,8 @@
+2002-05-28 [paul]      0.7.6claws23
+
+       * sync with 0.7.6cvs16
+               see ChangeLog 2002-05-28
+
 2002-05-27 [thorsten]  0.7.6claws22 
 
        * faq/it/sylpheed-faq-1.html
index 077a19c..0e116e3 100644 (file)
@@ -1,3 +1,8 @@
+2002-05-28
+
+       * src/utils.[ch]: make_dir(): mkdir() ¤È chmod() ¤Î¥é¥Ã¥Ñ¡¼¡£
+       * src/compose.c: compose_create(): ÉÔÍפʹԤòºï½ü¡£
+
 2002-05-27
 
        * src/news.c: news_scan_group(): ÆÃÄê¤Î¾ì¹ç¤Ë¸í¤Ã¤¿Ãͤò¥»¥Ã¥È¤¹¤ë
index 983dd46..2c587bc 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=7
 MICRO_VERSION=6
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws22
+EXTRA_VERSION=claws23
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 99938cd..cc3b6f8 100644 (file)
@@ -4547,9 +4547,6 @@ static Compose *compose_create(PrefsAccount *account, ComposeMode mode)
                new_style = gtk_style_copy(style);
 
        if (prefs_common.textfont) {
-               CharSet charset;
-
-               charset = conv_get_current_charset();
                if (MB_CUR_MAX == 1) {
                        gchar *fontstr, *p;
 
index c74b21e..eb03b16 100644 (file)
@@ -131,12 +131,8 @@ _("File `%s' already exists.\n"
                                 dir); \
                        return 1; \
                } \
-               if (mkdir(dir, S_IRWXU) < 0) { \
-                       FILE_OP_ERROR(dir, "mkdir"); \
+               if (make_dir(dir) < 0) \
                        return 1; \
-               } \
-               if (chmod(dir, S_IRWXU) < 0) \
-                       FILE_OP_ERROR(dir, "chmod"); \
        } \
 }
 
index bd9f632..94b13b5 100644 (file)
--- a/src/mh.c
+++ b/src/mh.c
@@ -793,12 +793,8 @@ void mh_scan_tree(Folder *folder)
                                    "Can't create folder."), dir); \
                        return -1; \
                } \
-               if (mkdir(dir, S_IRWXU) < 0) { \
-                       FILE_OP_ERROR(dir, "mkdir"); \
+               if (make_dir(dir) < 0) \
                        return -1; \
-               } \
-               if (chmod(dir, S_IRWXU) < 0) \
-                       FILE_OP_ERROR(dir, "chmod"); \
        } \
 }
 
@@ -841,13 +837,10 @@ FolderItem *mh_create_folder(Folder *folder, FolderItem *parent,
        fullpath = g_strconcat(path, G_DIR_SEPARATOR_S, name, NULL);
        g_free(path);
 
-       if (mkdir(fullpath, S_IRWXU) < 0) {
-               FILE_OP_ERROR(fullpath, "mkdir");
+       if (make_dir(fullpath) < 0) {
                g_free(fullpath);
                return NULL;
        }
-       if (chmod(fullpath, S_IRWXU) < 0)
-               FILE_OP_ERROR(fullpath, "chmod");
 
        g_free(fullpath);
 
index 4e458d7..38d5db8 100644 (file)
@@ -118,10 +118,8 @@ GSList *template_read_config(void)
        debug_print(_("%s:%d reading templates dir %s\n"), __FILE__, __LINE__, path);
 
        if (!is_dir_exist(path)) {
-               if (mkdir(path, S_IRWXU) < 0) {
-                       FILE_OP_ERROR(path, "mkdir");
+               if (make_dir(path) < 0)
                        return NULL;
-               }
        }
 
        if ((dp = opendir(path)) == NULL) {
@@ -167,10 +165,8 @@ void template_write_config(GSList *tmpl_list)
                        g_warning(_("file %s already exists\n"), path);
                        return;
                }
-               if (mkdir(path, S_IRWXU) < 0) {
-                       FILE_OP_ERROR(path, "mkdir");
+               if (make_dir(path) < 0)
                        return;
-               }
        }
 
        remove_all_files(path);
index cf1fdd7..bebbca2 100644 (file)
@@ -1627,6 +1627,18 @@ gint change_dir(const gchar *dir)
        return 0;
 }
 
+gint make_dir(const gchar *dir)
+{
+       if (mkdir(dir, S_IRWXU) < 0) {
+               FILE_OP_ERROR(dir, "mkdir");
+               return -1;
+       }
+       if (chmod(dir, S_IRWXU) < 0)
+               FILE_OP_ERROR(dir, "chmod");
+
+       return 0;
+}
+
 gint make_dir_hier(const gchar *dir)
 {
        gchar *parent_dir;
@@ -1636,24 +1648,18 @@ gint make_dir_hier(const gchar *dir)
                parent_dir = g_strndup(dir, p - dir);
                if (*parent_dir != '\0') {
                        if (!is_dir_exist(parent_dir)) {
-                               if (mkdir(parent_dir, S_IRWXU) < 0) {
-                                       FILE_OP_ERROR(parent_dir, "mkdir");
+                               if (make_dir(parent_dir) < 0) {
                                        g_free(parent_dir);
                                        return -1;
                                }
-                               if (chmod(parent_dir, S_IRWXU) < 0)
-                                       FILE_OP_ERROR(parent_dir, "chmod");
                        }
                }
                g_free(parent_dir);
        }
+
        if (!is_dir_exist(dir)) {
-               if (mkdir(dir, S_IRWXU) < 0) {
-                       FILE_OP_ERROR(dir, "mkdir");
+               if (make_dir(dir) < 0)
                        return -1;
-               }
-               if (chmod(dir, S_IRWXU) < 0)
-                       FILE_OP_ERROR(dir, "chmod");
        }
 
        return 0;
index dcd4b61..bc4e796 100644 (file)
@@ -319,6 +319,7 @@ gboolean is_file_entry_exist        (const gchar    *file);
 #define is_file_or_fifo_exist(file)    file_exist(file, TRUE)
 
 gint change_dir                        (const gchar    *dir);
+gint make_dir                  (const gchar    *dir);
 gint make_dir_hier             (const gchar    *dir);
 gint remove_all_files          (const gchar    *dir);
 gint remove_numbered_files     (const gchar    *dir,