bugDenemo - Bugs: bug #60827, Add support for Atril

 
 

bug #60827: Add support for Atril

Submitter:  None
Submitted:  Sat 26 Jun 2021 11:05:01 AM UTC
   
 
Category:  Feature request Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Originator Name:  Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Wed 10 Nov 2021 10:02:09 AM UTC, comment #10: 

This patch in now in the source. By uninstalling the package libevince-dev (and installing libatril-dev) Denemo builds and the "handle-link" signal works properly in the EvView widget.

Richard Shann <rshann>
Group administrator
Sun 24 Oct 2021 07:38:17 PM UTC, comment #9: 

It would seem that more recent versions of libevince break Denemo. The patch you give doesn't seem to allow --use-atril so that despite having atril installed I can't use the patch to build against libatril.
Can someone who understands the configure.ac file suggest how it should be modified to prefer libatril?

Richard Shann <rshann>
Group administrator
Thu 01 Jul 2021 08:13:17 AM UTC, comment #8: 

Thanks for the patch. I wonder have you been able to ascertain that it works?
 This would probably hinge on whether you are yourself a user of Denemo or a user of MATE seeking to improve the MATE experience...
I ask because its not apparent to me that the USE_EVINCE flag has been set when the Atril lib is being used - without it things like the most general multi-line markup would not work.

Richard Shann <rshann>
Group administrator
Wed 30 Jun 2021 04:52:35 PM UTC, comment #7: 

I am the original submitter of that bug and created a patch for this.



--- 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)

Marius Spix <spixi>
Sat 26 Jun 2021 03:29:21 PM UTC, comment #6: 

The header files are different but they create the same symbols in the executable library (at least for the header file you pointed to).
If they didn't then the Denemo source code would require conditional code to call the different functions, which would presumably do something different, (otherwise why change the name?), and so Denemo might not work.

Richard Shann <rshann>
Group administrator
Sat 26 Jun 2021 02:25:36 PM UTC, comment #5: 

The header files are also a little different, so it would be a compile-time flag (can be easily made with autotools). Evince depends on a lot of gnome libraries like gvfs or librsvg, which are not required for Atril. Having both installed is a little bit superfluous.

comment #4:

> The header files you pointed to are to create libraries with the same entry points, so I imagine if you had libatril installed you could make a symbolic link to it under the name libevince. I don't know what else could be done (I haven't got much experience with autotools - I don't know what "install envince and the GNOME boilerplate" means ...)
>

Anonymous
Sat 26 Jun 2021 01:01:37 PM UTC, comment #4: 

The header files you pointed to are to create libraries with the same entry points, so I imagine if you had libatril installed you could make a symbolic link to it under the name libevince. I don't know what else could be done (I haven't got much experience with autotools - I don't know what "install envince and the GNOME boilerplate" means ...)

Richard Shann <rshann>
Group administrator
Sat 26 Jun 2021 12:25:10 PM UTC, comment #3: 

MATE uses a libenvince fork called libatril, the interface is nearly the same. It would be nice to add support for that library, so you don’t have to install envince and the GNOME boilerplate.

comment #2:

> I think this bug may be a misunderstanding on the part of the submitter: Denemo uses the libevince library to load and display PDF files, Denemo has nothing to do with the executable document viewer called evince. I use the Mate desktop and haven't noticed any problem - is there one?

Anonymous
Sat 26 Jun 2021 11:36:56 AM UTC, comment #2: 

I think this bug may be a misunderstanding on the part of the submitter: Denemo uses the libevince library to load and display PDF files, Denemo has nothing to do with the executable document viewer called evince. I use the Mate desktop and haven't noticed any problem - is there one?

Richard Shann <rshann>
Group administrator
Sat 26 Jun 2021 11:10:33 AM UTC, comment #1: 

If you compare these two, the interface is pretty much the same. This should be an easy integration.

https://github.com/mate-desktop/atril/blob/master/atril-view.h
https://github.com/GNOME/evince/blob/master/evince-view.h

Anonymous
Sat 26 Jun 2021 11:05:01 AM UTC, original submission:  

Atril is a fork Evince and the default document viewer in MATE Desktop (fork of GNOME 2). Denemo currently only supports Evince. It would be great if Denemo could add support for Atril.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by spixi (Posted a comment)
  • -email is unavailable- added by rshann (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-11-10 rshann StatusNeed Info Fixed
        Open/ClosedOpen Closed
    2021-06-26 rshann StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code