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 977e77cdc3a001b0afcca3a60a513e40397925ca..ce2192f6bf9365aa6d9e849d3666ba3f7752ce6c 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 eeaf0cf2d31737b4816fb3a3b03c1b4b43ea6ba0..8796de4ed37940f66cd88df7422291b4ff490494 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 077a19c13a6376640b0295d5d9dff77b65d0fabc..0e116e369dd2dfbb8b951e14a237f2fed7dfb264 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 983dd46852e7ff4e208eecc1c44b55105b29ed68..2c587bc5f68b05c58911128b20fe65ff6bf44b5e 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 99938cde1ddd910fc2283637f5617689b56f5869..cc3b6f8b304cb6bdd971aa4e8be3d977bef7784d 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 c74b21ebe7ba22013742aa56c2a6bfa5121973cd..eb03b16f9484b675ae354fe1559321f760bcd526 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 bd9f632b8ff0997525c0947b14936b920fc6a8c5..94b13b52ae0d72ee9a33986a1246797c5108522a 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 4e458d70bdfcd64c572e708b939d4a8ec07c4b9f..38d5db843c851f5c6966dc9bc1172755fbfa0b83 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 cf1fdd7aa201d69f0379757983752b789325cd87..bebbca2f78ee3e92185a96984931eb26d691caef 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 dcd4b61f3a83314c269cd88b7610a7b80551df1d..bc4e79615668fa924a0b0e52cb432dd6e915c43c 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,