[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #60827] Add support for Atril
From: |
Marius Spix |
Subject: |
[bug #60827] Add support for Atril |
Date: |
Wed, 30 Jun 2021 12:52:36 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 |
Follow-up Comment #7, bug #60827 (project denemo):
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)
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?60827>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/