[Commits] [SCM] claws-win32-installer branch, master, updated. 4.1.1-1-102-g0d36064
jonathan at claws-mail.org
jonathan at claws-mail.org
Sun Nov 26 01:57:48 UTC 2023
The branch, master has been updated
via 0d3606454a7e48c1c5adbe70ec147408324a3c76 (commit)
from b242cc00647c884cb8a977f4c0218db43320ce38 (commit)
Summary of changes:
packages/packages.current | 4 +-
.../03-Fix-building-on-non-X11-systems.patch | 214 +++++++++++++++++++++
src/claws-mail.nsi | 2 +-
3 files changed, 217 insertions(+), 3 deletions(-)
create mode 100644 patches/claws_mail/03-Fix-building-on-non-X11-systems.patch
- Log -----------------------------------------------------------------
commit 0d3606454a7e48c1c5adbe70ec147408324a3c76
Author: Jonathan Boeing <jonathan at claws-mail.org>
Date: Sat Nov 25 13:07:00 2023 -0700
Update to claws-mail-4.2.0
diff --git a/packages/packages.current b/packages/packages.current
index b2d5991..525f7dd 100644
--- a/packages/packages.current
+++ b/packages/packages.current
@@ -9,10 +9,10 @@
# ref - type 'git' only - the <tree-ish> value passed to git archive to produce the tarball
# To build Claws from the release tarball
-#claws_mail,4.1.1,file,https://www.claws-mail.org/releases/claws-mail-4.1.1.tar.xz,b189e700c1896f5e0deb0b76d4bfa820eb7ac1935ee10aa9afbada3cf53a0344,,
+claws_mail,4.2.0,file,https://www.claws-mail.org/releases/claws-mail-4.2.0.tar.xz,7c8ab1732d74197df06d61a6b7ebc7c580ecf6e92eb1ef6ae5b0107533f1af07,,
# To build Claws from git
-claws_mail,,git,git://git.claws-mail.org/claws.git,,,HEAD
+#claws_mail,,git,git://git.claws-mail.org/claws.git,,,HEAD
adwaita_icon_theme,41.0,file,https://download.gnome.org/sources/adwaita-icon-theme/41/adwaita-icon-theme-41.0.tar.xz,ef5339d8c35fcad5d10481b70480803f0fa20b3d3cbc339238fcaceeaee01eba,,
atk,2.38.0,file,https://download.gnome.org/sources/atk/2.38/atk-2.38.0.tar.xz,ac4de2a4ef4bd5665052952fe169657e65e895c5057dffb3c2a810f6191a0c36,,
diff --git a/patches/claws_mail/03-Fix-building-on-non-X11-systems.patch b/patches/claws_mail/03-Fix-building-on-non-X11-systems.patch
new file mode 100644
index 0000000..49846f9
--- /dev/null
+++ b/patches/claws_mail/03-Fix-building-on-non-X11-systems.patch
@@ -0,0 +1,214 @@
+From dd4c4e5152235f9f4f319cc9fdad9227ebf688c9 Mon Sep 17 00:00:00 2001
+From: Jonathan Boeing <jonathan at claws-mail.org>
+Date: Sat, 18 Nov 2023 18:51:30 -0700
+Subject: [PATCH] Fix building on non-X11 systems
+
+Gtk Sockets and the GDK_IS_X11_DISPLAY() macro are only available when
+GDK_WINDOWING_X11 is defined
+---
+ src/action.c | 3 ++
+ src/compose.c | 78 ++++++++++++++++++--------------
+ src/plugins/dillo/dillo_viewer.c | 5 ++
+ 3 files changed, 53 insertions(+), 33 deletions(-)
+
+diff --git a/src/action.c b/src/action.c
+index d86294fbc..0c459aab6 100644
+--- a/src/action.c
++++ b/src/action.c
+@@ -30,6 +30,9 @@
+ #ifdef GDK_WINDOWING_X11
+ # include <gdk/gdkx.h>
+ #endif /* GDK_WINDOWING_X11 */
++#ifdef GDK_WINDOWING_QUARTZ
++# include <gdk/gdkquartz.h>
++#endif /* GDK_WINDOWING_QUARTZ */
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+diff --git a/src/compose.c b/src/compose.c
+index 574d89be1..b32fa6bc7 100644
+--- a/src/compose.c
++++ b/src/compose.c
+@@ -375,11 +375,11 @@ static void compose_set_ext_editor_sensitive (Compose *compose,
+ gboolean sensitive);
+ static gboolean compose_get_ext_editor_cmd_valid();
+ static gboolean compose_get_ext_editor_uses_socket();
+-#ifndef G_OS_WIN32
++#ifdef GDK_WINDOWING_X11
+ static gboolean compose_ext_editor_plug_removed_cb
+ (GtkSocket *socket,
+ Compose *compose);
+-#endif /* G_OS_WIN32 */
++#endif /* GDK_WINDOWING_X11 */
+
+ static void compose_undo_state_changed (UndoMain *undostruct,
+ gint undo_state,
+@@ -9623,11 +9623,11 @@ static gboolean compose_can_autosave(Compose *compose)
+ static void compose_exec_ext_editor(Compose *compose)
+ {
+ gchar *tmp;
+-#ifndef G_OS_WIN32
++#ifdef GDK_WINDOWING_X11
+ GtkWidget *socket;
+ Window socket_wid = 0;
+ gchar *p, *s;
+-#endif /* G_OS_WIN32 */
++#endif /* GDK_WINDOWING_X11 */
+ GPid pid;
+ GError *error = NULL;
+ gchar *cmd = NULL;
+@@ -9643,39 +9643,43 @@ static void compose_exec_ext_editor(Compose *compose)
+ return;
+ }
+
+- if (compose_get_ext_editor_uses_socket() && GDK_IS_X11_DISPLAY(gdk_display_get_default())) {
+-#ifndef G_OS_WIN32
+- /* Only allow one socket */
+- if (compose->exteditor_socket != NULL) {
+- if (gtk_widget_is_focus(compose->exteditor_socket)) {
+- /* Move the focus off of the socket */
+- gtk_widget_child_focus(compose->window, GTK_DIR_TAB_BACKWARD);
++#ifdef GDK_WINDOWING_X11
++ if (compose_get_ext_editor_uses_socket()) {
++ if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) {
++ /* Only allow one socket */
++ if (compose->exteditor_socket != NULL) {
++ if (gtk_widget_is_focus(compose->exteditor_socket)) {
++ /* Move the focus off of the socket */
++ gtk_widget_child_focus(compose->window, GTK_DIR_TAB_BACKWARD);
++ }
++ g_free(tmp);
++ return;
+ }
+- g_free(tmp);
+- return;
+- }
+- /* Create the receiving GtkSocket */
+- socket = gtk_socket_new ();
+- g_signal_connect (G_OBJECT(socket), "plug-removed",
+- G_CALLBACK(compose_ext_editor_plug_removed_cb),
+- compose);
+- gtk_box_pack_start(GTK_BOX(compose->edit_vbox), socket, TRUE, TRUE, 0);
+- gtk_widget_set_size_request(socket, prefs_common.compose_width, -1);
+- /* Realize the socket so that we can use its ID */
+- gtk_widget_realize(socket);
+- socket_wid = gtk_socket_get_id(GTK_SOCKET (socket));
+- compose->exteditor_socket = socket;
++ /* Create the receiving GtkSocket */
++ socket = gtk_socket_new ();
++ g_signal_connect (G_OBJECT(socket), "plug-removed",
++ G_CALLBACK(compose_ext_editor_plug_removed_cb),
++ compose);
++ gtk_box_pack_start(GTK_BOX(compose->edit_vbox), socket, TRUE, TRUE, 0);
++ gtk_widget_set_size_request(socket, prefs_common.compose_width, -1);
++ /* Realize the socket so that we can use its ID */
++ gtk_widget_realize(socket);
++ socket_wid = gtk_socket_get_id(GTK_SOCKET (socket));
++ compose->exteditor_socket = socket;
++ } else
++ debug_print("Socket communication with an external editor is only available on X11.\n");
++ }
+ #else
+- alertpanel_error(_("Socket communication with an external editor is not available on Windows."));
++ if (compose_get_ext_editor_uses_socket()) {
++ alertpanel_error(_("Socket communication with an external editor is only available on X11."));
+ g_free(tmp);
+ return;
+-#endif /* G_OS_WIN32 */
+- } else
+- debug_print("Socket communication with an external editor is only available on X11.\n");
++ }
++#endif /* GDK_WINDOWING_X11 */
+
+ if (compose_get_ext_editor_cmd_valid()) {
++#ifdef GDK_WINDOWING_X11
+ if (compose_get_ext_editor_uses_socket() && GDK_IS_X11_DISPLAY(gdk_display_get_default())) {
+-#ifndef G_OS_WIN32
+ p = g_strdup(prefs_common_get_ext_editor_cmd());
+ s = strstr(p, "%w");
+ s[1] = 'u';
+@@ -9684,10 +9688,12 @@ static void compose_exec_ext_editor(Compose *compose)
+ else
+ cmd = g_strdup_printf(p, socket_wid, tmp);
+ g_free(p);
+-#endif /* G_OS_WIN32 */
+ } else {
+ cmd = g_strdup_printf(prefs_common_get_ext_editor_cmd(), tmp);
+ }
++#else
++ cmd = g_strdup_printf(prefs_common_get_ext_editor_cmd(), tmp);
++#endif /* GDK_WINDOWING_X11 */
+ } else {
+ if (prefs_common_get_ext_editor_cmd())
+ g_warning("external editor command-line is invalid: '%s'",
+@@ -9776,10 +9782,12 @@ static void compose_ext_editor_closed_cb(GPid pid, gint exit_status, gpointer da
+ compose->exteditor_file = NULL;
+ compose->exteditor_pid = INVALID_PID;
+ compose->exteditor_tag = -1;
++#ifdef GDK_WINDOWING_X11
+ if (compose->exteditor_socket && GDK_IS_X11_DISPLAY(gdk_display_get_default())) {
+ gtk_widget_destroy(compose->exteditor_socket);
+ compose->exteditor_socket = NULL;
+ }
++#endif /* GDK_WINDOWING_X11 */
+
+ }
+
+@@ -9887,6 +9895,7 @@ static void compose_set_ext_editor_sensitive(Compose *compose,
+ ext_editor_menu_entries[i], sensitive);
+ }
+
++#ifdef GDK_WINDOWING_X11
+ if (compose_get_ext_editor_uses_socket() && GDK_IS_X11_DISPLAY(gdk_display_get_default())) {
+ if (sensitive) {
+ if (compose->exteditor_socket)
+@@ -9910,6 +9919,9 @@ static void compose_set_ext_editor_sensitive(Compose *compose,
+ } else {
+ gtk_widget_set_sensitive(compose->text, sensitive);
+ }
++#else
++ gtk_widget_set_sensitive(compose->text, sensitive);
++#endif /* GDK_WINDOWING_X11 */
+ if (compose->toolbar->send_btn)
+ gtk_widget_set_sensitive(compose->toolbar->send_btn, sensitive);
+ if (compose->toolbar->sendl_btn)
+@@ -9934,14 +9946,14 @@ static gboolean compose_get_ext_editor_uses_socket()
+ strstr(prefs_common_get_ext_editor_cmd(), "%w"));
+ }
+
+-#ifndef G_OS_WIN32
++#ifdef GDK_WINDOWING_X11
+ static gboolean compose_ext_editor_plug_removed_cb(GtkSocket *socket, Compose *compose)
+ {
+ compose->exteditor_socket = NULL;
+ /* returning FALSE allows destruction of the socket */
+ return FALSE;
+ }
+-#endif /* G_OS_WIN32 */
++#endif /* GDK_WINDOWING_X11 */
+
+ /**
+ * compose_undo_state_changed:
+diff --git a/src/plugins/dillo/dillo_viewer.c b/src/plugins/dillo/dillo_viewer.c
+index d2690bff6..8a93511d7 100644
+--- a/src/plugins/dillo/dillo_viewer.c
++++ b/src/plugins/dillo/dillo_viewer.c
+@@ -125,10 +125,15 @@ static void dillo_show_mimepart(MimeViewer *_viewer,
+ g_free(viewer->filename);
+ }
+
++#ifdef GDK_WINDOWING_X11
+ if (!GDK_IS_X11_DISPLAY(gdk_display_get_default())) {
+ debug_print("dillo viewer only works on X11\n");
+ return;
+ }
++#else
++ debug_print("dillo viewer only works on X11\n");
++ return;
++#endif
+
+ viewer->filename = procmime_get_tmp_file_name(partinfo);
+
+--
+2.30.2
+
diff --git a/src/claws-mail.nsi b/src/claws-mail.nsi
index 183c464..21cab9b 100644
--- a/src/claws-mail.nsi
+++ b/src/claws-mail.nsi
@@ -11,7 +11,7 @@
!define PRETTY_PACKAGE_SHORT "ClawsMail"
!define COMPANY "claws-mail.org"
!define WEBSITE "https://www.claws-mail.org"
-!define COPYRIGHT "Copyright (C) 1999-2022 The Claws Mail Team and Hiroyuki Yamamoto"
+!define COPYRIGHT "Copyright (C) 1999-2023 The Claws Mail Team and Hiroyuki Yamamoto"
!define DESCRIPTION "Claws Mail for Windows Installation Package"
# Admin privileges are required for installation
-----------------------------------------------------------------------
hooks/post-receive
--
Installer sources for Claws Mail Windows port
More information about the Commits
mailing list