From a98affc88b03b18aa8e52ffccddf12a81141821a Mon Sep 17 00:00:00 2001 From: Johannes Rosenberger Date: Tue, 4 Jun 2024 22:37:00 +0200 Subject: [PATCH] fix typo in CMakeLists.txt --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5dd70705..8613572e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -338,7 +338,7 @@ target_link_libraries ( ${GTKMM3_LDFLAGS} ${GLIBMM2_LDFLAGS} ${GIOMM2_LDFLAGS} - ${GIOUINX_LDFLAGS} + ${GIOUNIX_LDFLAGS} ${LIBSOUP_LDFLAGS} ${GMIME_LDFLAGS} ${VTE2_LDFLAGS} @@ -368,7 +368,7 @@ target_link_libraries ( ${WEBKIT2GTK_LDFLAGS} ${GLIBMM2_LDFLAGS} ${GIOMM2_LDFLAGS} - ${GIOUINX_LDFLAGS} + ${GIOUNIX_LDFLAGS} ${CMAKE_THREAD_LIBS_INIT} ${PROTOBUF_LIBRARIES} ${GTKMM3_LDFLAGS} From 4c76a4cf6226752f5270197ba8747c7c7550e35e Mon Sep 17 00:00:00 2001 From: Johannes Rosenberger Date: Tue, 4 Jun 2024 22:43:06 +0200 Subject: [PATCH 1/2] improve mailto uri handling 1. This introduces consistent mailto uri handling, supporting passing a body and all headers that can be given as agruments to EditMessage, namely, To, From, Cc, Bcc and Subject. Other headers are not dropped but prepended to the email body with a note. 2. Positional (i.e., non-option) commandline arguments are now interpreted as --mailto options. 3. Multiple --mailto options on the commandline are now supported, and are merged into one mailto argument before being passed to EditMessage. 4. A consequence is that libsoup is not used any more, enabling compatibility with webkit2gtk-4.1 while maintaining compatibility with gio (glib) 2.16, and thus building on older and current distros. --- .github/workflows/ci-debian-build-test.yml | 1 - CMakeLists.txt | 6 +- src/astroid.cc | 91 ++++++++++------------ src/astroid.hh | 1 + src/message_thread.cc | 3 +- src/modes/edit_message.cc | 89 +++++++++++++++++++-- src/modes/edit_message.hh | 4 +- src/modes/thread_view/thread_view.cc | 4 - 8 files changed, 127 insertions(+), 72 deletions(-) diff --git a/.github/workflows/ci-debian-build-test.yml b/.github/workflows/ci-debian-build-test.yml index 3015b7f06..ddc33728f 100644 --- a/.github/workflows/ci-debian-build-test.yml +++ b/.github/workflows/ci-debian-build-test.yml @@ -59,7 +59,6 @@ jobs: libpeas-dev \ libprotobuf-dev \ libsass-dev \ - libsoup2.4-dev \ libvte-2.91-dev \ libwebkit2gtk-${WEBKITGTK_VERSION}-dev \ ninja-build \ diff --git a/CMakeLists.txt b/CMakeLists.txt index 8613572ec..498e4a260 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -98,8 +98,7 @@ pkg_check_modules (GLIBMM2 REQUIRED glibmm-2.4) pkg_check_modules (WEBKIT2GTK REQUIRED webkit2gtk-4.0>=2.22) pkg_check_modules (SASS REQUIRED libsass) pkg_check_modules (GIOMM2 REQUIRED giomm-2.4) -pkg_check_modules (GIOUNIX REQUIRED gio-unix-2.0) -pkg_check_modules (LIBSOUP REQUIRED libsoup-2.4) +pkg_check_modules (GIOUNIX REQUIRED gio-unix-2.0>=2.16) string (REGEX REPLACE "([0-9]+\.[0-9]+)\.[0-9]+" "\\1" GMIME_MAJOR_MINOR ${Notmuch_GMIME_VERSION}) pkg_check_modules (GMIME REQUIRED gmime-${GMIME_MAJOR_MINOR}>=${Notmuch_GMIME_VERSION}) @@ -154,7 +153,6 @@ include_directories ( ${GLIBMM2_INCLUDE_DIRS} ${GIOMM2_INCLUDE_DIRS} ${GIOUNIX_INCLUDE_DIRS} - ${LIBSOUP_INCLUDE_DIRS} ${GMIME_INCLUDE_DIRS} ${WEBKIT2GTK_INCLUDE_DIRS} ${VTE2_INCLUDE_DIRS} @@ -169,7 +167,6 @@ add_compile_options ( ${GLIBMM2_CFLAGS} ${GIOMM2_CFLAGS} ${GIOUNIX_CFLAGS} - ${LIBSOUP_CFLAGS} ${GMIME_CFLAGS} ${WEBKIT2GTK_CFLAGS} ${VTE2_CFLAGS} @@ -339,7 +336,6 @@ target_link_libraries ( ${GLIBMM2_LDFLAGS} ${GIOMM2_LDFLAGS} ${GIOUNIX_LDFLAGS} - ${LIBSOUP_LDFLAGS} ${GMIME_LDFLAGS} ${VTE2_LDFLAGS} ${SASS_LDFLAGS} diff --git a/src/astroid.cc b/src/astroid.cc index 3d5dc9f54..b23e8f6e6 100644 --- a/src/astroid.cc +++ b/src/astroid.cc @@ -53,8 +53,6 @@ # include # include -# include - using namespace std; using namespace boost::filesystem; @@ -126,7 +124,7 @@ namespace Astroid { # ifdef DEBUG ( "test-config,t", "use test config (same as used when tests are run), only makes sense from the source root") # endif - ( "mailto,m", po::value(), "compose mail with mailto url or address") + ( "mailto,m", po::value< vector >()->composing(), "compose mail with mailto url or address") ( "no-auto-poll", "do not poll automatically") ( "disable-log", "disable logging") ( "log-stdout", "log to stdout regardless of configuration") @@ -139,6 +137,9 @@ namespace Astroid { # else ; # endif + + /* default option (without --