[balsa/popover] Bump required versions
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/popover] Bump required versions
- Date: Thu, 14 May 2020 23:31:43 +0000 (UTC)
commit 0018ca8b1d191f8d4729461c5d1735b91082d6bf
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Thu May 14 19:14:17 2020 -0400
Bump required versions
Bump required versions as discussed in
https://mail.gnome.org/archives/balsa-list/2020-May/msg00010.html
and remove corresponding conditional compilation directives.
* configure.ac:
* libbalsa/html.c (lbh_web_process_terminated_cb),
(lbh_web_view_new):
* libbalsa/identity.c (help_ident_cb):
* libbalsa/mime.c (is_in_url):
* libbalsa/misc.c (libbalsa_font_string_to_css):
* libbalsa/smtp-server.c (smtp_server_response):
* meson.build:
* src/address-book-config.c (help_button_cb):
* src/balsa-index.c (bndx_do_popup):
* src/balsa-mblist.c (bmbl_do_popup):
* src/balsa-message.c (balsa_headers_attachments_popup),
(tree_mult_selection_popup), (tree_button_press_cb):
* src/balsa-mime-widget-image.c (balsa_image_button_press_cb):
* src/balsa-mime-widget-message.c (extbody_call_url):
* src/balsa-mime-widget-text.c (balsa_mime_widget_new_text),
(handle_url):
* src/filter-edit-callbacks.c (condition_dialog_response),
(fe_dialog_response):
* src/filter-run-callbacks.c (fr_dialog_response):
* src/folder-conf.c (folder_conf_response):
* src/main-window.c (help_activated), (bw_notebook_label_new),
(bw_find_real):
* src/pref-manager.c (balsa_help_pbox_display), (add_menu_cb):
* src/sendmsg-window.c (on_open_url_cb),
(attachment_button_press_cb), (attachment_popup_cb),
(create_text_area), (create_lang_menu):
* src/toolbar-factory.c (tm_popup_context_menu_cb):
* src/toolbar-prefs.c (tp_dialog_response_cb):
ChangeLog | 36 +++++++++++++++++++++
configure.ac | 74 +++++++-------------------------------------
libbalsa/html.c | 19 ------------
meson.build | 43 +++++++++----------------
src/balsa-mime-widget-text.c | 7 -----
src/sendmsg-window.c | 37 +++++++---------------
src/toolbar-factory.c | 1 +
7 files changed, 74 insertions(+), 143 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 8ad902bee..089057112 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,39 @@
+2020-05-14 Peter Bloomfield <pbloomfield bellsouth net>
+
+ Bump required versions as discussed in
+ https://mail.gnome.org/archives/balsa-list/2020-May/msg00010.html
+ and remove corresponding conditional compilation directives.
+
+ * configure.ac:
+ * libbalsa/html.c (lbh_web_process_terminated_cb),
+ (lbh_web_view_new):
+ * libbalsa/identity.c (help_ident_cb):
+ * libbalsa/mime.c (is_in_url):
+ * libbalsa/misc.c (libbalsa_font_string_to_css):
+ * libbalsa/smtp-server.c (smtp_server_response):
+ * meson.build:
+ * src/address-book-config.c (help_button_cb):
+ * src/balsa-index.c (bndx_do_popup):
+ * src/balsa-mblist.c (bmbl_do_popup):
+ * src/balsa-message.c (balsa_headers_attachments_popup),
+ (tree_mult_selection_popup), (tree_button_press_cb):
+ * src/balsa-mime-widget-image.c (balsa_image_button_press_cb):
+ * src/balsa-mime-widget-message.c (extbody_call_url):
+ * src/balsa-mime-widget-text.c (balsa_mime_widget_new_text),
+ (handle_url):
+ * src/filter-edit-callbacks.c (condition_dialog_response),
+ (fe_dialog_response):
+ * src/filter-run-callbacks.c (fr_dialog_response):
+ * src/folder-conf.c (folder_conf_response):
+ * src/main-window.c (help_activated), (bw_notebook_label_new),
+ (bw_find_real):
+ * src/pref-manager.c (balsa_help_pbox_display), (add_menu_cb):
+ * src/sendmsg-window.c (on_open_url_cb),
+ (attachment_button_press_cb), (attachment_popup_cb),
+ (create_text_area), (create_lang_menu):
+ * src/toolbar-factory.c (tm_popup_context_menu_cb):
+ * src/toolbar-prefs.c (tp_dialog_response_cb):
+
2020-05-11 Peter Bloomfield <pbloomfield bellsouth net>
* src/balsa-message.c (display_face): Fix a scan-build report
diff --git a/configure.ac b/configure.ac
index fae1c841a..7c432c1fe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -224,7 +224,7 @@ dnl #####################################################################
PKG_CHECK_MODULES(BALSA, [
glib-2.0 >= 2.48.0
-gtk+-3.0 >= 3.22.0
+gtk+-3.0 >= 3.24.0
gmime-3.0 >= 3.2.6
gio-2.0
gthread-2.0
@@ -260,7 +260,7 @@ AC_MSG_CHECKING(whether to use an HTML widget)
case "$use_html_widget" in
webkit2)
AC_MSG_RESULT([$use_html_widget])
- PKG_CHECK_MODULES(HTML, [ webkit2gtk-4.0 ])
+ PKG_CHECK_MODULES(HTML, [ webkit2gtk-4.0 >= 2.28.0 ])
AC_PATH_PROGS(HTML2TEXT,
[python-html2text \
html2markdown \
@@ -299,48 +299,10 @@ fi
# GPGME detection.
-# We don't use the std macro AM_PATH_GPGME here to avoid dependencies.
-AC_PATH_PROG(gpgmecfg, gpgme-config, no)
-if test "$gpgmecfg" = no; then
- AC_MSG_ERROR([gpgme-config program not found.])
-fi
-AC_MSG_CHECKING([gpgme library version])
-gpgmever=`$gpgmecfg --version`
-AC_MSG_RESULT($gpgmever)
-gpgme_ve=`echo $gpgmever|sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
-gpgme_ma=`echo $gpgmever|sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
-gpgme_mi=`echo $gpgmever|sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
-if test $gpgme_ve -lt 1; then
- gpgmecfg=no
-fi
-if test \( $gpgme_ve -eq 1 \) -a \( $gpgme_ma -lt 6 \) ; then
- gpgmecfg=no
-fi
-if test x"$gpgmecfg" != xno ; then
- if test \( $gpgme_ve -eq 1 \) -a \( $gpgme_ma -lt 8 \) ; then
- BALSA_LIBS="$BALSA_LIBS `$gpgmecfg --thread=pthread --libs`"
- if test x"$?" != x0 ; then
- AC_MSG_ERROR([*** Your gpgme installation does not support threads.])
- fi
- else
- BALSA_LIBS="$BALSA_LIBS `$gpgmecfg --libs`"
- fi
- BALSA_CFLAGS="$BALSA_CFLAGS `$gpgmecfg --cflags`"
-else
- AC_MSG_ERROR([sorry, you need at least gpgme version 1.6.0])
-fi
-
-# Autocrypt support
-AC_MSG_CHECKING(whether to build with Autocrypt support)
-if test x"$autocrypt" != xno ; then
- AC_MSG_RESULT([yes])
- PKG_CHECK_MODULES(AUTOCRYPT, [sqlite3])
- AC_DEFINE(ENABLE_AUTOCRYPT,1,[If defined, enable Autocrypt support])
- BALSA_CFLAGS="$BALSA_CFLAGS $AUTOCRYPT_CFLAGS"
- BALSA_LIBS="$BALSA_LIBS $AUTOCRYPT_LIBS"
-else
- AC_MSG_RESULT([no])
-fi
+#
+PKG_CHECK_MODULES(GPGME, [ gpgme >= 1.8.0 ])
+BALSA_CFLAGS="$BALSA_CFLAGS $GPGME_CFLAGS"
+BALSA_LIBS="$BALSA_LIBS $GPGME_LIBS"
# OpenLDAP configuration.
#
@@ -450,12 +412,8 @@ fi
# GtkSourceView configuration
#
if test x$with_gtksourceview != xno; then
- PKG_CHECK_MODULES([GTKSOURCEVIEW], [ gtksourceview-4 ], [],
- [
- PKG_CHECK_MODULES([GTKSOURCEVIEW], [ gtksourceview-3.0 >= 3.2.0 ])
- BALSA_CFLAGS="$BALSA_CFLAGS -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_48"
- ])
- AC_DEFINE(HAVE_GTKSOURCEVIEW,1,[Defined when GtkSourceView-3 or 4 can be used.])
+ PKG_CHECK_MODULES([GTKSOURCEVIEW], [ gtksourceview-4 ])
+ AC_DEFINE(HAVE_GTKSOURCEVIEW,1,[Defined when GtkSourceView-4 can be used.])
BALSA_CFLAGS="$BALSA_CFLAGS $GTKSOURCEVIEW_CFLAGS"
BALSA_LIBS="$BALSA_LIBS $GTKSOURCEVIEW_LIBS"
fi
@@ -517,22 +475,12 @@ AC_MSG_CHECKING(whether to use an external spell checker)
case "$use_spell_checker" in
gspell)
AC_MSG_RESULT([configure gspell])
- PKG_CHECK_MODULES(SPELL, [ gspell-1 ])
+ PKG_CHECK_MODULES(SPELL, [ gspell-1 >= 1.6.0 ])
AC_DEFINE(HAVE_GSPELL,1,[Defined when Gspell can be used.])
- if $PKG_CONFIG --atleast-version=1.1.2 gspell-1; then
- AC_DEFINE(HAVE_GSPELL_1_2,1,[Defined when Gspell API is version 1.2.])
- fi
;;
gtkspell)
- if $PKG_CONFIG --atleast-version=3.0.3 gtkspell3-3.0; then
- AC_MSG_RESULT([gtkspell version >= 3.0.3])
- PKG_CHECK_MODULES(SPELL, [ gtkspell3-3.0 ])
- AC_DEFINE(HAVE_GTKSPELL_3_0_3,1,[Defined when GtkSpell version
- is at least 3.0.3.])
- else
- AC_MSG_RESULT([gtkspell version < 3.0.3])
- PKG_CHECK_MODULES(SPELL, [ gtkspell3-3.0 enchant ])
- fi
+ AC_MSG_RESULT([configure gtkspell])
+ PKG_CHECK_MODULES(SPELL, [ gtkspell3-3.0 >= 3.0.9 ])
AC_DEFINE(HAVE_GTKSPELL,1,[Defined when GtkSpell can be used.])
;;
internal)
diff --git a/libbalsa/html.c b/libbalsa/html.c
index 2fd395395..28a0ba5e9 100644
--- a/libbalsa/html.c
+++ b/libbalsa/html.c
@@ -499,7 +499,6 @@ lbh_load_changed_cb(WebKitWebView *web_view,
gtk_widget_queue_resize(GTK_WIDGET(web_view));
}
-#if WEBKIT_CHECK_VERSION(2,20,0)
/*
* Callback for the "web-process-terminated" signal
*/
@@ -525,20 +524,6 @@ lbh_web_process_terminated_cb(WebKitWebView *web_view,
g_warning("webkit process terminated abnormally: %s", reason_str);
info->webprocess_error = TRUE;
}
-#else
-/*
- * Callback for the "web-process-crashed" signal
- */
-static gboolean
-lbh_web_process_crashed_cb(WebKitWebView *web_view,
- gpointer data)
-{
- LibBalsaWebKitInfo *info = (LibBalsaWebKitInfo *) data;
- g_debug("%s", __func__);
- info->webprocess_error = TRUE;
- return FALSE;
-}
-#endif
/*
* WebKitURISchemeRequestCallback for "cid:" URIs
@@ -636,11 +621,7 @@ lbh_web_view_new(LibBalsaWebKitInfo *info,
g_debug("%s_ registered “cid:” scheme", __func__);
}
-#if WEBKIT_CHECK_VERSION(2,20,0)
g_signal_connect(view, "web-process-terminated", G_CALLBACK(lbh_web_process_terminated_cb), info);
-#else
- g_signal_connect(view, "web-process-crashed", G_CALLBACK(lbh_web_process_crashed_cb), info);
-#endif
g_signal_connect(view, "decide-policy", G_CALLBACK(lbh_decide_policy_cb), info);
g_signal_connect(view, "resource-load-started", G_CALLBACK(lbh_resource_load_started_cb), info);
g_signal_connect(view, "load-changed", G_CALLBACK(lbh_load_changed_cb), info);
diff --git a/meson.build b/meson.build
index 8a6b96845..03e54ce54 100644
--- a/meson.build
+++ b/meson.build
@@ -128,15 +128,15 @@ conf.set('TOOLKIT_CATEGORIES', TOOLKIT_CATEGORIES)
# #####################################################################
# Dependencies for balsa and balsa_ab:
-glib_dep = dependency('glib-2.0', version : '>= 2.48.0')
-gtk_dep = dependency('gtk+-3.0', version : '>= 3.22.0')
-gmime_dep = dependency('gmime-3.0', version : '>= 3.2.6')
-gio_dep = dependency('gio-2.0')
-gthread_dep = dependency('gthread-2.0')
-gnutls_dep = dependency('gnutls', version : '>= 3.0')
-gpgme_dep = dependency('gpgme', version : '>= 1.6.0')
-fribidi_dep = dependency('fribidi')
-libical_dep = dependency('libical', version : '>= 2.0.0')
+glib_dep = dependency('glib-2.0', version : '>= 2.48.0')
+gtk_dep = dependency('gtk+-3.0', version : '>= 3.24.0')
+gmime_dep = dependency('gmime-3.0', version : '>= 3.2.6' )
+gio_dep = dependency('gio-2.0' )
+gthread_dep = dependency('gthread-2.0' )
+gnutls_dep = dependency('gnutls', version : '>= 3.0' )
+gpgme_dep = dependency('gpgme', version : '>= 1.8.0' )
+fribidi_dep = dependency('fribidi' )
+libical_dep = dependency('libical', version : '>= 2.0.0' )
# Dependencies for balsa
balsa_deps = [glib_dep,
@@ -166,7 +166,7 @@ libnetclient_deps = [glib_dep,
# HTML widget
#
if html_widget == 'webkit2'
- html_dep = dependency('webkit2gtk-4.0')
+ html_dep = dependency('webkit2gtk-4.0', version : '>= 2.28.0')
html2text = find_program('python-html2text',
'html2markdown',
@@ -347,14 +347,10 @@ endif # compface != 'false'
# GtkSourceView configuration
#
if gtksourceview
- gsv_dep = dependency('gtksourceview-4', required : false)
- if not gsv_dep.found()
- gsv_dep = dependency('gtksourceview-3.0', version : '>= 3.2.0')
- add_global_arguments('-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_48', language : 'c')
- endif # not gsv_dep.found()
+ gsv_dep = dependency('gtksourceview-4')
balsa_deps += gsv_dep
conf.set('HAVE_GTKSOURCEVIEW', 1,
- description : 'Defined when GtkSourceView-3 or 4 can be used.')
+ description : 'Defined when GtkSourceView-4 can be used.')
endif # gtksourceview
# libcanberra configuration
@@ -395,22 +391,11 @@ endif # libsecret
# Spell check detection.
#
if spell_checker == 'gspell'
- spell_dep = dependency('gspell-1')
+ spell_dep = dependency('gspell-1', version : '>= 1.6.0')
conf.set('HAVE_GSPELL', 1,
description : 'Defined when Gspell can be used.')
- if spell_dep.version().version_compare('>= 1.1.2')
- conf.set('HAVE_GSPELL_1_2', 1,
- description : 'Defined when Gspell API is version 1.2.')
- endif
elif spell_checker == 'gtkspell'
- spell_dep = dependency('gtkspell3-3.0')
- if spell_dep.version().version_compare('>= 3.0.3')
- conf.set('HAVE_GTKSPELL_3_0_3', 1,
- description : 'Defined when GtkSpell version is at least 3.0.3.')
- else
- enchant_dep = dependency('enchant')
- spell_dep = [spell_dep, enchant_dep]
- endif
+ spell_dep = dependency('gtkspell3-3.0', version : '>= 3.0.9')
conf.set('HAVE_GTKSPELL', 1,
description : 'Defined when GtkSpell can be used.')
elif spell_checker == 'internal'
diff --git a/src/balsa-mime-widget-text.c b/src/balsa-mime-widget-text.c
index 61c3f05b7..efdb39a16 100644
--- a/src/balsa-mime-widget-text.c
+++ b/src/balsa-mime-widget-text.c
@@ -235,15 +235,8 @@ balsa_mime_widget_new_text(BalsaMessage * bm, LibBalsaMessageBody * mime_body,
/* configure text or source view */
gtk_text_view_set_editable(text_view, FALSE);
-#if GTK_CHECK_VERSION(3, 24, 0)
gtk_text_view_set_left_margin(text_view, BALSA_LEFT_MARGIN);
gtk_text_view_set_right_margin(text_view, BALSA_RIGHT_MARGIN);
-#else /* GTK_CHECK_VERSION(3, 24, 0) */
- gtk_text_view_set_left_margin(text_view, 0);
- gtk_text_view_set_right_margin(text_view, 0);
- gtk_widget_set_margin_start(widget, BALSA_LEFT_MARGIN);
- gtk_widget_set_margin_end(widget, BALSA_RIGHT_MARGIN);
-#endif /* GTK_CHECK_VERSION(3, 24, 0) */
gtk_text_view_set_wrap_mode(text_view, GTK_WRAP_WORD_CHAR);
/* set the message font */
diff --git a/src/sendmsg-window.c b/src/sendmsg-window.c
index cfe79e71b..b1e73c603 100644
--- a/src/sendmsg-window.c
+++ b/src/sendmsg-window.c
@@ -67,14 +67,12 @@
#include "macosx-helpers.h"
#include "geometry-manager.h"
-#if !HAVE_GSPELL && !HAVE_GTKSPELL_3_0_3
-#include <enchant/enchant.h>
-#endif /* HAVE_GTKSPELL_3_0_3 */
#if HAVE_GTKSPELL
-#include "gtkspell/gtkspell.h"
+#include <gtkspell/gtkspell.h>
#elif HAVE_GSPELL
-#include "gspell/gspell.h"
+#include <gspell/gspell.h>
#else /* HAVE_GTKSPELL */
+#include <enchant/enchant.h>
#include "spell-check.h"
#endif /* HAVE_GTKSPELL */
#if HAVE_GTKSOURCEVIEW
@@ -104,9 +102,9 @@ static void bsmsg_update_gpg_ui_on_ident_change(BalsaSendmsg *bsmsg,
LibBalsaIdentity *new_ident);
static void bsmsg_setup_gpg_ui_by_mode(BalsaSendmsg *bsmsg, gint mode);
-#if !HAVE_GSPELL && !HAVE_GTKSPELL_3_0_3
+#if !HAVE_GSPELL && !HAVE_GTKSPELL
static void sw_spell_check_weak_notify(BalsaSendmsg * bsmsg);
-#endif /* HAVE_GTKSPELL */
+#endif /* !HAVE_GSPELL && !HAVE_GTKSPELL */
static void address_book_cb(LibBalsaAddressView * address_view,
GtkTreeRowReference * row_ref,
@@ -2828,9 +2826,7 @@ create_text_area(BalsaSendmsg * bsmsg)
#if HAVE_GSPELL
GspellTextBuffer *gspell_buffer;
GspellChecker *checker;
-#if HAVE_GSPELL_1_2
GspellTextView *gspell_view;
-#endif /* HAVE_GSPELL_1_2 */
#endif /* HAVE_GSPELL */
GtkWidget *scroll;
@@ -2840,15 +2836,8 @@ create_text_area(BalsaSendmsg * bsmsg)
bsmsg->text = gtk_text_view_new();
#endif /* HAVE_GTKSOURCEVIEW */
text_view = GTK_TEXT_VIEW(bsmsg->text);
-#if GTK_CHECK_VERSION(3, 24, 0)
gtk_text_view_set_left_margin(text_view, 2);
gtk_text_view_set_right_margin(text_view, 2);
-#else /* GTK_CHECK_VERSION(3, 24, 0) */
- gtk_text_view_set_left_margin(text_view, 0);
- gtk_text_view_set_right_margin(text_view, 0);
- gtk_widget_set_margin_start(bsmsg->text, 2);
- gtk_widget_set_margin_end(bsmsg->text, 2);
-#endif /* GTK_CHECK_VERSION(3, 24, 0) */
/* set the message font */
if (!balsa_app.use_system_fonts) {
@@ -2890,10 +2879,8 @@ create_text_area(BalsaSendmsg * bsmsg)
gspell_text_buffer_set_spell_checker(gspell_buffer, checker);
g_object_unref(checker);
-#if HAVE_GSPELL_1_2
gspell_view = gspell_text_view_get_from_gtk_text_view(text_view);
gspell_text_view_set_enable_language_menu(gspell_view, TRUE);
-#endif /* HAVE_GSPELL_1_2 */
}
#endif /* HAVE_GSPELL */
@@ -4132,7 +4119,7 @@ comp_send_locales(const void* a, const void* b)
in which case spell-checking must be disabled.
*/
#define BALSA_LANGUAGE_MENU_LANG "balsa-language-menu-lang"
-#if !HAVE_GSPELL && !HAVE_GTKSPELL_3_0_3
+#if !HAVE_GSPELL && !HAVE_GTKSPELL
static void
sw_broker_cb(const gchar * lang_tag,
const gchar * provider_name,
@@ -4145,7 +4132,7 @@ sw_broker_cb(const gchar * lang_tag,
*lang_list = g_list_insert_sorted(*lang_list, g_strdup(lang_tag),
(GCompareFunc) strcmp);
}
-#endif /* HAVE_GTKSPELL_3_0_3 */
+#endif /* !HAVE_GSPELL && !HAVE_GTKSPELL */
static const gchar *
create_lang_menu(GtkWidget * parent, BalsaSendmsg * bsmsg)
@@ -4159,22 +4146,22 @@ create_lang_menu(GtkWidget * parent, BalsaSendmsg * bsmsg)
#else
GList *lang_list, *l;
#endif /* HAVE_GSPELL */
-#if !HAVE_GSPELL && !HAVE_GTKSPELL_3_0_3
+#if !HAVE_GSPELL && !HAVE_GTKSPELL_
EnchantBroker *broker;
-#endif /* HAVE_GTKSPELL_3_0_3 */
+#endif /* !HAVE_GSPELL && !HAVE_GTKSPELL */
const gchar *preferred_lang;
GtkWidget *active_item = NULL;
-#if HAVE_GTKSPELL_3_0_3
+#if HAVE_GTKSPELL
lang_list = gtk_spell_checker_get_language_list();
#elif HAVE_GSPELL
lang_list = gspell_language_get_available();
-#else /* HAVE_GTKSPELL_3_0_3 */
+#else /* HAVE_GTKSPELL */
broker = enchant_broker_init();
lang_list = NULL;
enchant_broker_list_dicts(broker, sw_broker_cb, &lang_list);
enchant_broker_free(broker);
-#endif /* HAVE_GTKSPELL_3_0_3 */
+#endif /* HAVE_GTKSPELL */
if (lang_list == NULL) {
return NULL;
diff --git a/src/toolbar-factory.c b/src/toolbar-factory.c
index ba06eb37c..bc43f6cff 100644
--- a/src/toolbar-factory.c
+++ b/src/toolbar-factory.c
@@ -623,6 +623,7 @@ tm_remove_underscore(const gchar * text)
return r;
}
+
static gboolean
tm_popup_context_menu_cb(GtkWidget * toolbar,
gint x,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]