+2002-12-25 [christoph] 0.8.7claws8
+
+ * src/Makefile.am
+ * src/account.[ch]
+ * src/addrbook.c
+ * src/addressbook.c
+ * src/addrindex.c
+ * src/filtering.c
+ * src/folder.c
+ * src/matcher.c
+ * src/prefs.[ch] ** REMOVE **
+ * src/prefs_account.c
+ * src/prefs_actions.c
+ * src/prefs_common.c
+ * src/prefs_customheader.c
+ * src/prefs_display_header.c
+ * src/prefs_filtering.c
+ * src/prefs_folder_item.c
+ * src/prefs_gtk.[ch] ** NEW **
+ * src/prefs_matcher.c
+ * src/prefs_scoring.c
+ * src/prefs_summary_column.c
+ * src/procmime.c
+ * src/selective_download.c
+ * src/toolbar.c
+ * src/common/Makefile.am
+ * src/common/prefs.[ch] ** NEW **
+ split prefs.[ch] into prefs_gtk.[ch] and common/prefs.[ch]
+
2002-12-24 [alfons] 0.8.7claws7
* src/summaryview.c
2002-12-13 [christoph] 0.8.6claws109
* src/Makefile.am
- * src/manage_window.[ch]
+ * src/manage_window.[ch] ** REMOVE **
* src/gtk/Makefile.am
- * src/gtk/manage_window.[ch]
+ * src/gtk/manage_window.[ch] ** NEW **
move manage_window files to gtk directory
2002-12-13 [christoph] 0.8.6claws108
* src/Makefile.am
- * src/gtkshruler.[ch]
+ * src/gtkshruler.[ch] ** REMOVE **
* src/gtk/Makefile.am
- * src/gtk/gtkshruler.[ch]
+ * src/gtk/gtkshruler.[ch] ** NEW **
move gtkshruler files to gtk directory
2002-12-13 [christoph] 0.8.6claws107
MICRO_VERSION=7
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=claws7
+EXTRA_VERSION=claws8
VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
dnl set $target
gtkshruler.[ch] gtk/gtkshruler.[ch] ok
manage_window.[ch] gtk/manage_window.[ch] ok
+
+prefs.[ch] common/prefs.[ch]
+ prefs_gtk.[ch] not completed
compose.c compose.h \
menu.c menu.h \
stock_pixmap.c stock_pixmap.h \
- prefs.c prefs.h \
+ prefs_gtk.c prefs_gtk.h \
prefs_common.c prefs_common.h \
prefs_account.c prefs_account.h \
prefs_folder_item.c prefs_folder_item.h \
#include "folderview.h"
#include "folder.h"
#include "account.h"
-#include "prefs.h"
+#include "prefs_gtk.h"
#include "prefs_account.h"
#include "prefs_folder_item.h"
#include "compose.h"
#include <glib.h>
-#include "prefs.h"
+#include "prefs_gtk.h"
#include "prefs_account.h"
#include "folder.h"
#include "adbookbase.h"
#ifndef DEV_STANDALONE
-#include "prefs.h"
+#include "prefs_gtk.h"
#include "codeconv.h"
#endif
#include "menu.h"
#include "stock_pixmap.h"
#include "xml.h"
-#include "prefs.h"
+#include "prefs_gtk.h"
#include "procmime.h"
#include "utils.h"
#include "gtkutils.h"
#include "xml.h"
#ifndef DEV_STANDALONE
-#include "prefs.h"
+#include "prefs_gtk.h"
#include "codeconv.h"
#endif
noinst_LTLIBRARIES = libsylpheedcommon.la
libsylpheedcommon_la_SOURCES = \
- intl.h \
- defs.h \
- version.h \
base64.c base64.h \
+ defs.h \
hooks.c hooks.h \
+ intl.h \
log.c log.h \
md5.c md5.h \
nntp.c nntp.h \
+ prefs.c prefs.h \
quoted-printable.c quoted-printable.h \
session.c session.h \
smtp.c smtp.h \
sylpheed.c sylpheed.h \
template.c template.h \
utils.c utils.h \
+ version.h \
uuencode.c uuencode.h
INCLUDES = \
--- /dev/null
+/*
+ * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
+ * Copyright (C) 1999-2002 Hiroyuki Yamamoto
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <glib.h>
+
+#include "prefs.h"
+#include "utils.h"
+
+PrefFile *prefs_write_open(const gchar *path)
+{
+ PrefFile *pfile;
+ gchar *tmppath;
+ FILE *fp;
+
+ g_return_val_if_fail(path != NULL, NULL);
+
+ if (prefs_is_readonly(path)) {
+ g_warning("no permission - %s\n", path);
+ return NULL;
+ }
+
+ tmppath = g_strconcat(path, ".tmp", NULL);
+ if ((fp = fopen(tmppath, "wb")) == NULL) {
+ FILE_OP_ERROR(tmppath, "fopen");
+ g_free(tmppath);
+ return NULL;
+ }
+
+ if (change_file_mode_rw(fp, tmppath) < 0)
+ FILE_OP_ERROR(tmppath, "chmod");
+
+ g_free(tmppath);
+
+ pfile = g_new(PrefFile, 1);
+ pfile->fp = fp;
+ pfile->path = g_strdup(path);
+
+ return pfile;
+}
+
+gint prefs_write_close(PrefFile *pfile)
+{
+ FILE *fp;
+ gchar *path;
+ gchar *tmppath;
+ gchar *bakpath = NULL;
+
+ g_return_val_if_fail(pfile != NULL, -1);
+
+ fp = pfile->fp;
+ path = pfile->path;
+ g_free(pfile);
+
+ tmppath = g_strconcat(path, ".tmp", NULL);
+ if (fclose(fp) == EOF) {
+ FILE_OP_ERROR(tmppath, "fclose");
+ unlink(tmppath);
+ g_free(path);
+ g_free(tmppath);
+ return -1;
+ }
+
+ if (is_file_exist(path)) {
+ bakpath = g_strconcat(path, ".bak", NULL);
+ if (rename(path, bakpath) < 0) {
+ FILE_OP_ERROR(path, "rename");
+ unlink(tmppath);
+ g_free(path);
+ g_free(tmppath);
+ g_free(bakpath);
+ return -1;
+ }
+ }
+
+ if (rename(tmppath, path) < 0) {
+ FILE_OP_ERROR(tmppath, "rename");
+ unlink(tmppath);
+ g_free(path);
+ g_free(tmppath);
+ g_free(bakpath);
+ return -1;
+ }
+
+ g_free(path);
+ g_free(tmppath);
+ g_free(bakpath);
+ return 0;
+}
+
+gint prefs_write_close_revert(PrefFile *pfile)
+{
+ gchar *tmppath;
+
+ g_return_val_if_fail(pfile != NULL, -1);
+
+ tmppath = g_strconcat(pfile->path, ".tmp", NULL);
+ fclose(pfile->fp);
+ if (unlink(tmppath) < 0) FILE_OP_ERROR(tmppath, "unlink");
+ g_free(tmppath);
+ g_free(pfile->path);
+ g_free(pfile);
+
+ return 0;
+}
+
+gboolean prefs_is_readonly(const gchar * path)
+{
+ if (path == NULL)
+ return TRUE;
+
+ return (access(path, W_OK) != 0 && access(path, F_OK) == 0);
+}
+
+gboolean prefs_rc_is_readonly(const gchar * rcfile)
+{
+ gboolean result;
+ gchar * rcpath;
+
+ if (rcfile == NULL)
+ return TRUE;
+
+ rcpath = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, rcfile, NULL);
+ result = prefs_is_readonly(rcpath);
+ g_free(rcpath);
+
+ return result;
+}
--- /dev/null
+/*
+ * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
+ * Copyright (C) 1999-2002 Hiroyuki Yamamoto
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef PREFS_H
+#define PREFS_H 1
+
+#include <stdio.h>
+
+typedef struct _PrefFile PrefFile;
+
+struct _PrefFile {
+ FILE *fp;
+ gchar *path;
+};
+
+PrefFile *prefs_write_open (const gchar *path);
+gint prefs_write_close (PrefFile *pfile);
+gint prefs_write_close_revert (PrefFile *pfile);
+gboolean prefs_is_readonly (const gchar *path);
+gboolean prefs_rc_is_readonly (const gchar *rcfile);
+
+#endif
#include "procheader.h"
#include "matcher.h"
#include "filtering.h"
-#include "prefs.h"
+#include "prefs_gtk.h"
#include "compose.h"
#define PREFSBUFSIZE 1024
#include "utils.h"
#include "xml.h"
#include "codeconv.h"
-#include "prefs.h"
+#include "prefs_gtk.h"
#include "account.h"
#include "filtering.h"
#include "scoring.h"
#include "matcher.h"
#include "intl.h"
#include "matcher_parser.h"
-#include "prefs.h"
+#include "prefs_gtk.h"
struct _MatchParser {
gint id;
#include "intl.h"
#include "main.h"
-#include "prefs.h"
+#include "prefs_gtk.h"
#include "prefs_account.h"
#include "prefs_customheader.h"
#include "account.h"
#include <unistd.h>
#include "intl.h"
-#include "prefs.h"
+#include "prefs_gtk.h"
#include "inc.h"
#include "utils.h"
#include "gtkutils.h"
#include "intl.h"
#include "main.h"
-#include "prefs.h"
+#include "prefs_gtk.h"
#include "prefs_common.h"
#include "prefs_display_header.h"
#include "prefs_summary_column.h"
#include "intl.h"
#include "main.h"
-#include "prefs.h"
+#include "prefs_gtk.h"
#include "prefs_customheader.h"
#include "prefs_common.h"
#include "prefs_account.h"
#include <errno.h>
#include "intl.h"
-#include "prefs.h"
+#include "prefs_gtk.h"
#include "prefs_display_header.h"
#include "prefs_common.h"
#include "manage_window.h"
#include "intl.h"
#include "main.h"
-#include "prefs.h"
+#include "prefs_gtk.h"
#include "prefs_matcher.h"
#include "prefs_filtering.h"
#include "prefs_common.h"
#include "summaryview.h"
#include "menu.h"
#include "account.h"
-#include "prefs.h"
+#include "prefs_gtk.h"
#include "manage_window.h"
#include "utils.h"
#include "addr_compl.h"
#include "intl.h"
#include "main.h"
#include "prefs.h"
+#include "prefs_gtk.h"
#include "utils.h"
#include "gtkutils.h"
return 0;
}
-PrefFile *prefs_write_open(const gchar *path)
-{
- PrefFile *pfile;
- gchar *tmppath;
- FILE *fp;
-
- g_return_val_if_fail(path != NULL, NULL);
-
- if (prefs_is_readonly(path)) {
- g_warning("no permission - %s\n", path);
- return NULL;
- }
-
- tmppath = g_strconcat(path, ".tmp", NULL);
- if ((fp = fopen(tmppath, "wb")) == NULL) {
- FILE_OP_ERROR(tmppath, "fopen");
- g_free(tmppath);
- return NULL;
- }
-
- if (change_file_mode_rw(fp, tmppath) < 0)
- FILE_OP_ERROR(tmppath, "chmod");
-
- g_free(tmppath);
-
- pfile = g_new(PrefFile, 1);
- pfile->fp = fp;
- pfile->path = g_strdup(path);
-
- return pfile;
-}
-
-gint prefs_write_close(PrefFile *pfile)
-{
- FILE *fp;
- gchar *path;
- gchar *tmppath;
- gchar *bakpath = NULL;
-
- g_return_val_if_fail(pfile != NULL, -1);
-
- fp = pfile->fp;
- path = pfile->path;
- g_free(pfile);
-
- tmppath = g_strconcat(path, ".tmp", NULL);
- if (fclose(fp) == EOF) {
- FILE_OP_ERROR(tmppath, "fclose");
- unlink(tmppath);
- g_free(path);
- g_free(tmppath);
- return -1;
- }
-
- if (is_file_exist(path)) {
- bakpath = g_strconcat(path, ".bak", NULL);
- if (rename(path, bakpath) < 0) {
- FILE_OP_ERROR(path, "rename");
- unlink(tmppath);
- g_free(path);
- g_free(tmppath);
- g_free(bakpath);
- return -1;
- }
- }
-
- if (rename(tmppath, path) < 0) {
- FILE_OP_ERROR(tmppath, "rename");
- unlink(tmppath);
- g_free(path);
- g_free(tmppath);
- g_free(bakpath);
- return -1;
- }
-
- g_free(path);
- g_free(tmppath);
- g_free(bakpath);
- return 0;
-}
-
-gint prefs_write_close_revert(PrefFile *pfile)
-{
- gchar *tmppath;
-
- g_return_val_if_fail(pfile != NULL, -1);
-
- tmppath = g_strconcat(pfile->path, ".tmp", NULL);
- fclose(pfile->fp);
- if (unlink(tmppath) < 0) FILE_OP_ERROR(tmppath, "unlink");
- g_free(tmppath);
- g_free(pfile->path);
- g_free(pfile);
-
- return 0;
-}
-
void prefs_set_default(PrefParam *param)
{
gint i;
pparam->type);
}
}
-
-gboolean prefs_is_readonly(const gchar * path)
-{
- if (path == NULL)
- return TRUE;
-
- return (access(path, W_OK) != 0 && access(path, F_OK) == 0);
-}
-
-gboolean prefs_rc_is_readonly(const gchar * rcfile)
-{
- gboolean result;
- gchar * rcpath;
-
- if (rcfile == NULL)
- return TRUE;
-
- rcpath = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, rcfile, NULL);
- result = prefs_is_readonly(rcpath);
- g_free(rcpath);
-
- return result;
-}
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#ifndef __PREFS_H__
-#define __PREFS_H__
+#ifndef __PREFS_GTK_H__
+#define __PREFS_GTK_H__
#include <glib.h>
#include <gtk/gtkwidget.h>
#include <stdio.h>
typedef struct _PrefParam PrefParam;
-typedef struct _PrefFile PrefFile;
typedef struct _PrefsDialog PrefsDialog;
+#include "prefs.h"
#include "account.h"
#define VSPACING 10
WidgetSetFunc widget_set_func;
};
-struct _PrefFile {
- FILE *fp;
- gchar *path;
-};
-
struct _PrefsDialog
{
GtkWidget *window;
void prefs_set_toggle (PrefParam *pparam);
void prefs_set_data_from_spinbtn(PrefParam *pparam);
void prefs_set_spinbtn (PrefParam *pparam);
-gboolean prefs_is_readonly(const gchar * path);
-gboolean prefs_rc_is_readonly(const gchar * rcfile);
#endif /* __PREFS_H__ */
#include "intl.h"
#include "main.h"
-#include "prefs.h"
+#include "prefs_gtk.h"
#include "prefs_matcher.h"
#include "prefs_common.h"
#include "mainwindow.h"
#include "intl.h"
#include "main.h"
-#include "prefs.h"
+#include "prefs_gtk.h"
#include "prefs_matcher.h"
#include "prefs_scoring.h"
#include "prefs_common.h"
#include <gdk/gdkkeysyms.h>
#include "intl.h"
-#include "prefs.h"
+#include "prefs_gtk.h"
#include "prefs_common.h"
#include "prefs_summary_column.h"
#include "manage_window.h"
# include "rfc2015.h"
#endif
-#include "prefs.h"
+#include "prefs_gtk.h"
static GHashTable *procmime_get_mime_type_table (void);
#include "intl.h"
#include "main.h"
-#include "prefs.h"
+#include "prefs_gtk.h"
#include "account.h"
#include "mainwindow.h"
#include "manage_window.h"
#include "utils.h"
#include "xml.h"
#include "mgutils.h"
-#include "prefs.h"
+#include "prefs_gtk.h"
#include "codeconv.h"
#include "stock_pixmap.h"
#include "manage_window.h"