On Sun, 2021-10-24 at 21:06 +0300, Lib Lists wrote:
> > 
> > > but the cursor doesn't move and I don't get any message in the
> > > terminal.
> > 
> > so the signal is not emitted. I'll try and build against libatril.

I applied that attached patch to the sources using

patch -p1 < atril.patch

and as it doesn't provide a method of forcing use of libatril instead
of libevince I uninstalled libevince-dev so that it would choose
libatril-dev. However it seemed that just installing libatril-dev was
not sufficient. I couldn't make any further progress because my distro
is now too ancient, so I think I will have to upgrade before taking
this further. This won't be possible this week unfortunately.
If anyone can get this patch working meanwhile (I'm sure it just needs
tweaking to allow --enable-atril) and can get a build using atril there
is a reasonable chance that wysywig operations will be restored. (This
is based on the fact that the MATE desktop seems to be an attempt to
keep the interface that gnome had before they followed the rush towards
gesture-based guis).

Richard
--- a/configure.ac 2021-02-10 05:01:18.504869919 +0100
+++ b/configure.ac 2021-06-30 16:58:17.796489927 +0200
@@ -251,10 +251,16 @@
     fi

     if test "x$have_evince2_3" = "xno"; then
-      PKG_CHECK_MODULES(EVINCE_2_32, evince-view-2.32 >= 2.0)
+      PKG_CHECK_MODULES(EVINCE_2_32, evince-view-2.32 >= 2.0, have_evince2_32=yes, have_evince2_32=no)
       CFLAGS="$CFLAGS $EVINCE_2_32_CFLAGS"
       LIBS="$LIBS $EVINCE_2_32_LIBS"
     fi
+
+    if test "x$have_evince2_32" = "xno"; then
+      PKG_CHECK_MODULES(ATRIL, atril-view-1.5.0 >= 1.5 have_atril=yes, have_atril=no)
+      CFLAGS="$CFLAGS $ATRIL_CFLAGS"
+      LIBS="$LIBS $ATRIL_LIBS"
+    fi
   fi
 fi

@@ -267,15 +273,25 @@
   LIBS="$LIBS $GTKSOURCEVIEW_LIBS"

   if test "x$useevince" != "xno"; then
-    PKG_CHECK_MODULES(EVINCE, evince-view-3.0 >= 3.0)
+    PKG_CHECK_MODULES(EVINCE, evince-view-3.0 >= 3.0, have_envince_3_0=yes, have_envince_3_0=no)
     CFLAGS="$CFLAGS $EVINCE_CFLAGS"
     LIBS="$LIBS $EVINCE_LIBS"
   fi
+
+  if test "x$have_envince_3_0" = "xno"; then
+    PKG_CHECK_MODULES(ATRIL, atril-view-1.5.0 >= 1.5, have_atril=yes, have_atril=no)
+    CFLAGS="$CFLAGS $ATRIL_CFLAGS"
+    LIBS="$LIBS $ATRIL_LIBS"
+  fi
 fi

 if test "x$useevince" = "xyes"; then
   CFLAGS="$CFLAGS -DUSE_EVINCE"
   LIBS="$LIBS -DUSE_EVINCE"
+  if test "x$have_atril" = "xyes"; then
+    CFLAGS="$CFLAGS -DUSE_ATRIL"
+    LIBS="$LIBS $ATRIL_LIBS"
+  fi
 fi

 AC_ARG_ENABLE(
diff -ruN a/src/printview/markupview.c b/src/printview/markupview.c
--- a/src/printview/markupview.c 2021-02-10 05:01:18.314877858 +0100
+++ b/src/printview/markupview.c 2021-06-30 16:54:34.574654343 +0200
@@ -1,4 +1,8 @@
+#ifdef USE_ATRIL
+#include <atril-view.h>
+#else
 #include <evince-view.h>
+#endif
 #include <errno.h>
 #include <math.h>
 #include <glib/gstdio.h>
diff -ruN a/src/printview/printview.c b/src/printview/printview.c
--- a/src/printview/printview.c 2021-02-10 05:01:18.314877858 +0100
+++ b/src/printview/printview.c 2021-06-30 16:54:40.591621493 +0200
@@ -1,4 +1,8 @@
+#ifdef USE_ATRIL
+#include <atril-view.h>
+#else
 #include <evince-view.h>
+#endif
 #include <errno.h>
 #include <math.h>
 #include <glib/gstdio.h>
diff -ruN a/src/source/proof.c b/src/source/proof.c
--- a/src/source/proof.c 2021-02-10 05:01:18.318211052 +0100
+++ b/src/source/proof.c 2021-06-30 16:55:18.887414370 +0200
@@ -21,8 +21,13 @@
 #include "source/proof.h"
 #include "core/view.h"
 #include "core/utils.h"
+#ifdef USE_ATRIL
+#include <atril-view.h>
+#include <atril-document.h>
+#else
 #include <evince-view.h>
 #include <evince-document.h>
+#endif

 static const gchar *nearest_annotation_text = NULL;
 static GList *annotated_pages = NULL;
diff -ruN a/src/source/source.c b/src/source/source.c
--- a/src/source/source.c 2021-02-10 05:01:18.318211052 +0100
+++ b/src/source/source.c 2021-06-30 16:55:45.880270386 +0200
@@ -20,7 +20,11 @@
 #include "source/source.h"
 #include "core/view.h"
 #include "core/utils.h"
+#ifdef USE_ATRIL
+#include <atril-view.h>
+#else
 #include <evince-view.h>
+#endif

 static gboolean Dragging;
 static GdkPoint DragStart, DragEnd;
diff -ruN a/tools/annotator.c b/tools/annotator.c
--- a/tools/annotator.c 2021-02-10 05:01:18.344876604 +0100
+++ b/tools/annotator.c 2021-06-30 17:49:50.413450185 +0200
@@ -22,7 +22,11 @@
 #include <math.h>
 #include <string.h>
 #include<gtk/gtk.h>
+#ifdef USE_ATRIL
+#include <atril-view.h>
+#else
 #include <evince-view.h>
+#endif

 #define SPOT_SIZE (10) //size of spot for picking out an annotation
 typedef struct Location {
diff -ruN a/tools/pageswitcher.c b/tools/pageswitcher.c
--- a/tools/pageswitcher.c 2021-02-10 05:01:18.344876604 +0100
+++ b/tools/pageswitcher.c 2021-06-30 17:49:47.148464866 +0200
@@ -22,7 +22,11 @@
 #include <math.h>
 #include <string.h>
 #include<gtk/gtk.h>
+#ifdef USE_ATRIL
+#include <atril-view.h>
+#else
 #include <evince-view.h>
+#endif

 #define SPOT_SIZE (10) //size of spot for picking out an annotation
 typedef struct Location {
diff -ruN a/tools/pageturner.c b/tools/pageturner.c
--- a/tools/pageturner.c 2021-02-10 05:01:18.344876604 +0100
+++ b/tools/pageturner.c 2021-06-30 17:49:46.399468236 +0200
@@ -22,7 +22,11 @@
 #include <math.h>
 #include <string.h>
 #include<gtk/gtk.h>
+#ifdef USE_ATRIL
+#include <atril-view.h>
+#else
 #include <evince-view.h>
+#endif

 #define SPOT_SIZE (20) //size of spot indicating the position of a repeat to be returned to
 typedef struct Location {
diff -ruN a/tools/twopageturner.c b/tools/twopageturner.c
--- a/tools/twopageturner.c 2021-02-10 05:01:18.344876604 +0100
+++ b/tools/twopageturner.c 2021-06-30 17:49:45.517472206 +0200
@@ -22,7 +22,11 @@
 #include <math.h>
 #include <string.h>
 #include<gtk/gtk.h>
+#ifdef USE_ATRIL
+#include <atril-view.h>
+#else
 #include <evince-view.h>
+#endif

 #if !((GTK_MAJOR_VERSION==3) && (GTK_MINOR_VERSION>=18))
 #define gtk_overlay_reorder_overlay(a,b,c) g_critical("Must be Gtk version 3.18 or greater"), exit(-1)

Reply via email to