[Commits] [SCM] claws branch, gtk2, updated. 3.20.0-39-g727e5d1fe
paul at claws-mail.org
paul at claws-mail.org
Fri Feb 9 14:45:53 UTC 2024
The branch, gtk2 has been updated
via 727e5d1fe1c5116e2d4db88472a068bcf9fb40e5 (commit)
from c9b487514f760ca8c749da2614b7cc5201cbbef9 (commit)
Summary of changes:
configure.ac | 23 +--------
m4/ax_func_mkdir.m4 | 99 ---------------------------------------
src/common/Makefile.am | 3 +-
src/exporthtml.c | 11 ++---
src/exportldif.c | 9 +---
src/gtk/gtkutils.c | 8 ++--
src/plugins/pgpinline/pgpinline.c | 10 ++--
src/plugins/pgpmime/pgpmime.c | 10 ++--
src/procheader.c | 4 +-
9 files changed, 23 insertions(+), 154 deletions(-)
delete mode 100644 m4/ax_func_mkdir.m4
- Log -----------------------------------------------------------------
commit 727e5d1fe1c5116e2d4db88472a068bcf9fb40e5
Author: Paul <paul at claws-mail.org>
Date: Fri Feb 9 15:41:26 2024 +0100
various clean-ups and optimisations by Olaf Hering
bug 4752, 'Adjust incorrect debug_printf call in pgp plugins'
bug 4757, 'remove AX_FUNC_MKDIR'
bug 4758, 'remove unused check for bind_textdomain_codeset'
bug 4759, 'remove unused function checks from AC_CHECK_FUNCS'
bug 4760, 'use correct type for move_bar_id'
bug 4768, 'Adjust logic while evaluating enable_avatars'
bug 4770, 'remove intl from list of include directories'
diff --git a/configure.ac b/configure.ac
index e4ebe1ac2..e8a787fa5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -244,14 +244,6 @@ AM_ICONV
dnl floor and ceil are in -lm
LIBS="$LIBS -lm"
-dnl
-dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
-dnl
-syl_save_LIBS=$LIBS
-LIBS="$LIBS $GTK_LIBS"
-AC_CHECK_FUNCS(bind_textdomain_codeset)
-LIBS=$syl_save_LIBS
-
dnl for gettext
ALL_LINGUAS="ca cs da de el_GR en_GB es fi fr hu id_ID it ja nb nl pl pt_BR pt_PT ro ru sk sv tr zh_TW"
GETTEXT_PACKAGE=claws-mail
@@ -435,9 +427,6 @@ if test $ac_cv_dirent_d_type = yes; then
Define if `struct dirent' has `d_type' member.)
fi
-# Check whether mkdir does not take the permission argument.
-AX_FUNC_MKDIR
-
dnl Checks for header files.
AC_HEADER_DIRENT
@@ -461,11 +450,7 @@ AC_CHECK_SIZEOF(unsigned long, 4)
dnl Checks for library functions.
AC_FUNC_ALLOCA
-AC_CHECK_FUNCS(gethostname mkdir mktime socket strstr strchr strcasestr \
- uname flock lockf inet_aton inet_addr \
- fchmod mkstemp truncate getuid regcomp)
-
-AC_CHECK_FUNCS(fgets_unlocked fgetc_unlocked fputs_unlocked fputc_unlocked fread_unlocked fwrite_unlocked feof_unlocked ferror_unlocked fmemopen)
+AC_CHECK_FUNCS(fchmod fgets_unlocked flock lockf strcasestr)
dnl *****************
dnl ** common code **
@@ -482,12 +467,6 @@ AC_SUBST(GLIB_LIBS)
PKG_CHECK_MODULES(GDK_PIXBUF, [gdk-pixbuf-2.0 >= 2.26])
-dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
-syl_save_LIBS=$LIBS
-LIBS="$LIBS $GTK_LIBS"
-AC_CHECK_FUNCS(bind_textdomain_codeset)
-LIBS=$syl_save_LIBS
-
dnl check for IPv6 option
dnl automated checks for IPv6 support.
AC_MSG_CHECKING([whether to use IPv6])
diff --git a/m4/ax_func_mkdir.m4 b/m4/ax_func_mkdir.m4
deleted file mode 100644
index 8275410f4..000000000
--- a/m4/ax_func_mkdir.m4
+++ /dev/null
@@ -1,99 +0,0 @@
-# ===========================================================================
-# https://www.gnu.org/software/autoconf-archive/ax_func_mkdir.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_FUNC_MKDIR
-#
-# DESCRIPTION
-#
-# Check whether mkdir() is mkdir or _mkdir, and whether it takes one or
-# two arguments.
-#
-# This macro can define HAVE_MKDIR, HAVE__MKDIR, and MKDIR_TAKES_ONE_ARG,
-# which are expected to be used as follows:
-#
-# #if HAVE_MKDIR
-# # if MKDIR_TAKES_ONE_ARG
-# /* MinGW32 */
-# # define mkdir(a, b) mkdir(a)
-# # endif
-# #else
-# # if HAVE__MKDIR
-# /* plain Windows 32 */
-# # define mkdir(a, b) _mkdir(a)
-# # else
-# # error "Don't know how to create a directory on this system."
-# # endif
-# #endif
-#
-# LICENSE
-#
-# Copyright (c) 2008 Alexandre Duret-Lutz <adl at gnu.org>
-#
-# 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, see <https://www.gnu.org/licenses/>.
-#
-# As a special exception, the respective Autoconf Macro's copyright owner
-# gives unlimited permission to copy, distribute and modify the configure
-# scripts that are the output of Autoconf when processing the Macro. You
-# need not follow the terms of the GNU General Public License when using
-# or distributing such scripts, even though portions of the text of the
-# Macro appear in them. The GNU General Public License (GPL) does govern
-# all other use of the material that constitutes the Autoconf Macro.
-#
-# This special exception to the GPL applies to versions of the Autoconf
-# Macro released by the Autoconf Archive. When you make and distribute a
-# modified version of the Autoconf Macro, you may extend this special
-# exception to the GPL to apply to your modified version as well.
-
-#serial 6
-
-AU_ALIAS([AC_FUNC_MKDIR], [AX_FUNC_MKDIR])
-AC_DEFUN([AX_FUNC_MKDIR],
-[AC_CHECK_FUNCS([mkdir _mkdir])
-AC_CACHE_CHECK([whether mkdir takes one argument],
- [ac_cv_mkdir_takes_one_arg],
-[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#include <sys/stat.h>
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-]], [[mkdir (".");]])],
-[ac_cv_mkdir_takes_one_arg=yes], [ac_cv_mkdir_takes_one_arg=no])])
-if test x"$ac_cv_mkdir_takes_one_arg" = xyes; then
- AC_DEFINE([MKDIR_TAKES_ONE_ARG], 1,
- [Define if mkdir takes only one argument.])
-fi
-])
-
-dnl Note:
-dnl =====
-dnl I have not implemented the following suggestion because I don't have
-dnl access to such a broken environment to test the macro. So I'm just
-dnl appending the comments here in case you have, and want to fix
-dnl AX_FUNC_MKDIR that way.
-dnl
-dnl |Thomas E. Dickey (dickey at herndon4.his.com) said:
-dnl | it doesn't cover the problem areas (compilers that mistreat mkdir
-dnl | may prototype it in dir.h and dirent.h, for instance).
-dnl |
-dnl |Alexandre:
-dnl | Would it be sufficient to check for these headers and #include
-dnl | them in the AC_COMPILE_IFELSE block? (and is AC_HEADER_DIRENT
-dnl | suitable for this?)
-dnl |
-dnl |Thomas:
-dnl | I think that might be a good starting point (with the set of recommended
-dnl | ifdef's and includes for AC_HEADER_DIRENT, of course).
diff --git a/src/common/Makefile.am b/src/common/Makefile.am
index fb4710b60..74193d138 100644
--- a/src/common/Makefile.am
+++ b/src/common/Makefile.am
@@ -1,4 +1,4 @@
-# Copyright 1999-2014 the Claws Mail team.
+# Copyright 1999-2024 the Claws Mail team.
# This file is part of Claws Mail package, and distributed under the
# terms of the General Public License version 3 (or later).
# See COPYING file for license details.
@@ -87,7 +87,6 @@ clawscommoninclude_HEADERS = $(arch_headers) \
unmime.h
AM_CPPFLAGS = \
- -I$(top_srcdir)/intl \
$(GLIB_CFLAGS) \
$(VALGRIND_CFLAGS) \
-DLOCALEDIR=\""$(localedir)"\" \
diff --git a/src/exporthtml.c b/src/exporthtml.c
index 7bc77533c..b2ea89268 100644
--- a/src/exporthtml.c
+++ b/src/exporthtml.c
@@ -1,6 +1,6 @@
/*
- * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2002-2012 Match Grun and the Claws Mail team
+ * Claws Mail -- a GTK based, lightweight, and fast e-mail client
+ * Copyright (C) 2002-2024 the Claws Mail team and Match Grun
*
* 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
@@ -44,11 +44,6 @@
#include "xmlprops.h"
#include "file-utils.h"
-#ifdef MKDIR_TAKES_ONE_ARG
-#undef mkdir
-#define mkdir(a,b) mkdir(a)
-#endif
-
#define DFL_DIR_CLAWS_OUT "claws-mail-out"
#define DFL_FILE_CLAWS_OUT "addressbook.html"
@@ -1043,7 +1038,7 @@ gboolean exporthtml_create_dir( ExportHtmlCtl *ctl ) {
gboolean retVal = FALSE;
ctl->rcCreate = 0;
- if( mkdir( ctl->dirOutput, S_IRWXU ) == 0 ) {
+ if( g_mkdir( ctl->dirOutput, S_IRWXU ) == 0 ) {
retVal = TRUE;
}
else {
diff --git a/src/exportldif.c b/src/exportldif.c
index f3273203a..16006cf8b 100644
--- a/src/exportldif.c
+++ b/src/exportldif.c
@@ -1,6 +1,6 @@
/*
* Claws Mail -- a GTK based, lightweight, and fast e-mail client
- * Copyright (C) 2003-2022 Match Grun and the Claws Mail team
+ * Copyright (C) 2003-2024 the Claws Mail team and Match Grun
*
* 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
@@ -41,11 +41,6 @@
#include "file-utils.h"
-#ifdef MKDIR_TAKES_ONE_ARG
-#undef mkdir
-#define mkdir(a,b) mkdir(a)
-#endif
-
#define DFL_DIR_CLAWS_OUT "claws-mail-out"
#define DFL_FILE_CLAWS_OUT "addressbook.ldif"
@@ -586,7 +581,7 @@ gboolean exportldif_create_dir( ExportLdifCtl *ctl ) {
gboolean retVal = FALSE;
ctl->rcCreate = 0;
- if( mkdir( ctl->dirOutput, S_IRWXU ) == 0 ) {
+ if( g_mkdir( ctl->dirOutput, S_IRWXU ) == 0 ) {
retVal = TRUE;
}
else {
diff --git a/src/gtk/gtkutils.c b/src/gtk/gtkutils.c
index 1f4171dea..f3f6b6dc6 100644
--- a/src/gtk/gtkutils.c
+++ b/src/gtk/gtkutils.c
@@ -1,6 +1,6 @@
/*
* Claws Mail -- a GTK based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2022 the Claws Mail team and Hiroyuki Yamamoto
+ * Copyright (C) 1999-2024 the Claws Mail team and 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
@@ -745,7 +745,7 @@ void gtkut_widget_set_composer_icon(GtkWidget *widget)
}
static gboolean move_bar = FALSE;
-static gint move_bar_id = -1;
+static guint move_bar_id;
static gboolean move_bar_cb(gpointer data)
{
@@ -794,7 +794,7 @@ GtkWidget *label_window_create(const gchar *str)
gtk_widget_show_now(window);
- if (move_bar_id == -1) {
+ if (move_bar_id == 0) {
move_bar_id = g_timeout_add(200, move_bar_cb, wait_progress);
move_bar = TRUE;
}
@@ -808,7 +808,7 @@ void label_window_destroy(GtkWidget *window)
{
move_bar = FALSE;
g_source_remove(move_bar_id);
- move_bar_id = -1;
+ move_bar_id = 0;
GTK_EVENTS_FLUSH();
gtk_widget_destroy(window);
}
diff --git a/src/plugins/pgpinline/pgpinline.c b/src/plugins/pgpinline/pgpinline.c
index 4dbd2befb..8a9c0fab5 100644
--- a/src/plugins/pgpinline/pgpinline.c
+++ b/src/plugins/pgpinline/pgpinline.c
@@ -1,6 +1,6 @@
/*
- * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2021 Colin Leroy and the Claws Mail team
+ * Claws Mail -- a GTK based, lightweight, and fast e-mail client
+ * Copyright (C) 1999-2024 the Claws Mail team and Colin Leroy
*
* 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
@@ -597,7 +597,7 @@ static gboolean pgpinline_sign(MimeInfo *mimeinfo, PrefsAccount *account, const
gpgme_data_new_from_mem(&gpgtext, textstr, (size_t)strlen(textstr), 0);
gpgme_data_new(&gpgsig);
if ((err = gpgme_new(&ctx)) != GPG_ERR_NO_ERROR) {
- debug_print(("Couldn't initialize GPG context, %s\n"), gpgme_strerror(err));
+ debug_print("Couldn't initialize GPG context, %s\n", gpgme_strerror(err));
privacy_set_error(_("Couldn't initialize GPG context, %s"), gpgme_strerror(err));
return FALSE;
}
@@ -736,7 +736,7 @@ static gboolean pgpinline_encrypt(MimeInfo *mimeinfo, const gchar *encrypt_data)
kset = g_malloc(sizeof(gpgme_key_t)*(i+1));
memset(kset, 0, sizeof(gpgme_key_t)*(i+1));
if ((err = gpgme_new(&ctx)) != GPG_ERR_NO_ERROR) {
- debug_print(("Couldn't initialize GPG context, %s\n"), gpgme_strerror(err));
+ debug_print("Couldn't initialize GPG context, %s\n", gpgme_strerror(err));
privacy_set_error(_("Couldn't initialize GPG context, %s"), gpgme_strerror(err));
g_free(kset);
g_free(fprs);
@@ -801,7 +801,7 @@ static gboolean pgpinline_encrypt(MimeInfo *mimeinfo, const gchar *encrypt_data)
gpgme_data_new_from_mem(&gpgtext, textstr, (size_t)strlen(textstr), 0);
gpgme_data_new(&gpgenc);
if ((err = gpgme_new(&ctx)) != GPG_ERR_NO_ERROR) {
- debug_print(("Couldn't initialize GPG context, %s\n"), gpgme_strerror(err));
+ debug_print("Couldn't initialize GPG context, %s\n", gpgme_strerror(err));
privacy_set_error(_("Couldn't initialize GPG context, %s"), gpgme_strerror(err));
for (gint x = 0; x < i; x++)
gpgme_key_unref(kset[x]);
diff --git a/src/plugins/pgpmime/pgpmime.c b/src/plugins/pgpmime/pgpmime.c
index a3e1142e6..1841b9fb5 100644
--- a/src/plugins/pgpmime/pgpmime.c
+++ b/src/plugins/pgpmime/pgpmime.c
@@ -1,6 +1,6 @@
/*
- * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2021 the Claws Mail team
+ * Claws Mail -- a GTK based, lightweight, and fast e-mail client
+ * Copyright (C) 1999-2024 the Claws Mail team
*
* 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
@@ -226,7 +226,7 @@ static MimeInfo *pgpmime_decrypt(MimeInfo *mimeinfo)
SignatureData *sig_data = NULL;
if ((err = gpgme_new(&ctx)) != GPG_ERR_NO_ERROR) {
- debug_print(("Couldn't initialize GPG context, %s\n"), gpgme_strerror(err));
+ debug_print("Couldn't initialize GPG context, %s\n", gpgme_strerror(err));
privacy_set_error(_("Couldn't initialize GPG context, %s"), gpgme_strerror(err));
return NULL;
}
@@ -421,7 +421,7 @@ gboolean pgpmime_sign(MimeInfo *mimeinfo, PrefsAccount *account, const gchar *fr
gpgme_data_new_from_mem(&gpgtext, textstr, (size_t)strlen(textstr), 0);
gpgme_data_new(&gpgsig);
if ((err = gpgme_new(&ctx)) != GPG_ERR_NO_ERROR) {
- debug_print(("Couldn't initialize GPG context, %s\n"), gpgme_strerror(err));
+ debug_print("Couldn't initialize GPG context, %s\n", gpgme_strerror(err));
privacy_set_error(_("Couldn't initialize GPG context, %s"), gpgme_strerror(err));
return FALSE;
}
@@ -565,7 +565,7 @@ gboolean pgpmime_encrypt(MimeInfo *mimeinfo, const gchar *encrypt_data)
kset = g_malloc0(sizeof(gpgme_key_t)*(i+1));
if ((err = gpgme_new(&ctx)) != GPG_ERR_NO_ERROR) {
- debug_print(("Couldn't initialize GPG context, %s\n"), gpgme_strerror(err));
+ debug_print("Couldn't initialize GPG context, %s\n", gpgme_strerror(err));
privacy_set_error(_("Couldn't initialize GPG context, %s"), gpgme_strerror(err));
g_free(kset);
g_free(fprs);
diff --git a/src/procheader.c b/src/procheader.c
index a1a0368a1..30c262d7c 100644
--- a/src/procheader.c
+++ b/src/procheader.c
@@ -660,11 +660,11 @@ static MsgInfo *parse_stream(void *data, gboolean isstring, MsgFlags flags,
msginfo->inreplyto = NULL;
if (avatar_hook_id == HOOK_NONE &&
- (prefs_common.enable_avatars && (AVATARS_ENABLE_CAPTURE || AVATARS_ENABLE_RENDER))) {
+ (prefs_common.enable_avatars & (AVATARS_ENABLE_CAPTURE | AVATARS_ENABLE_RENDER))) {
avatar_hook_id = hooks_register_hook(AVATAR_HEADER_UPDATE_HOOKLIST,
avatar_from_some_face, NULL);
} else if (avatar_hook_id != HOOK_NONE &&
- !(prefs_common.enable_avatars && AVATARS_ENABLE_CAPTURE)) {
+ !(prefs_common.enable_avatars & AVATARS_ENABLE_CAPTURE)) {
hooks_unregister_hook(AVATAR_HEADER_UPDATE_HOOKLIST, avatar_hook_id);
avatar_hook_id = HOOK_NONE;
}
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list