[arch-commits] Commit in marker/trunk (3 files)

Balló György bgyorgy at archlinux.org
Thu Jul 23 00:42:02 UTC 2020


    Date: Thursday, July 23, 2020 @ 00:42:02
  Author: bgyorgy
Revision: 664959

upgpkg: marker 2020.04.04.2-3: Further fixes

Added:
  marker/trunk/optional-pandoc.patch
  marker/trunk/pdf-export.patch
Modified:
  marker/trunk/PKGBUILD

-----------------------+
 PKGBUILD              |   16 +++++++++++++---
 optional-pandoc.patch |   42 ++++++++++++++++++++++++++++++++++++++++++
 pdf-export.patch      |   21 +++++++++++++++++++++
 3 files changed, 76 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-07-23 00:34:31 UTC (rev 664958)
+++ PKGBUILD	2020-07-23 00:42:02 UTC (rev 664959)
@@ -3,7 +3,7 @@
 
 pkgname=marker
 pkgver=2020.04.04.2
-pkgrel=2
+pkgrel=3
 pkgdesc='Simple yet robust Markdown editor made with GTK'
 arch=(x86_64)
 url='https://fabiocolacio.github.io/Marker/'
@@ -18,13 +18,17 @@
         git+https://github.com/Mandarancio/charter.git
         git+https://github.com/codeplea/tinyexpr.git
         mathjax.patch
-        elf_files_in_lib.patch)
+        elf_files_in_lib.patch
+        pdf-export.patch
+        optional-pandoc.patch)
 sha256sums=('SKIP'
             'SKIP'
             'SKIP'
             'SKIP'
             '00bed5a7b888a2872933b25c0d12c46c38b47f641308e7b87f876ffa34542be2'
-            '09c3394f7cdcd21aa184c42ad837c2b1cacc5326772e10f92f3b3585d5b443c2')
+            '09c3394f7cdcd21aa184c42ad837c2b1cacc5326772e10f92f3b3585d5b443c2'
+            '9d80931b473a7c36d8ac116999484315f3f332d39b26199e87e62cb62edc3f81'
+            'ac8ecbdd9d49e14045c7508184aeaf267a5ec24aeb05a186486c1ebac20173fb')
 
 pkgver() {
   cd Marker
@@ -41,6 +45,12 @@
   rm -r data/scripts/mathjax
   patch -Np1 -i ../mathjax.patch
 
+  # Fix PDF export
+  patch -Np1 -i ../pdf-export.patch
+
+  # Make pandoc optional
+  patch -Np1 -i ../optional-pandoc.patch
+
   git submodule init
   git submodule set-url src/scidown "$srcdir/scidown"
   git submodule update

Added: optional-pandoc.patch
===================================================================
--- optional-pandoc.patch	                        (rev 0)
+++ optional-pandoc.patch	2020-07-23 00:42:02 UTC (rev 664959)
@@ -0,0 +1,42 @@
+diff --git a/src/marker-exporter.c b/src/marker-exporter.c
+index a038ab8a..d07a5f7e 100644
+--- a/src/marker-exporter.c
++++ b/src/marker-exporter.c
+@@ -127,20 +127,23 @@ marker_exporter_show_export_dialog(MarkerWindow* window)
+   gtk_file_filter_add_pattern (filter, "*.pdf");
+   gtk_file_chooser_add_filter (chooser, filter);
+ 
+-  filter = gtk_file_filter_new ();
+-  gtk_file_filter_set_name (filter, "RTF");
+-  gtk_file_filter_add_pattern (filter, "*.rtf");
+-  gtk_file_chooser_add_filter (chooser, filter);
+-
+-  filter = gtk_file_filter_new ();
+-  gtk_file_filter_set_name (filter, "DOCX");
+-  gtk_file_filter_add_pattern (filter, "*.docx");
+-  gtk_file_chooser_add_filter (chooser, filter);
+-
+-  filter = gtk_file_filter_new ();
+-  gtk_file_filter_set_name (filter, "ODT");
+-  gtk_file_filter_add_pattern (filter, "*.odt");
+-  gtk_file_chooser_add_filter (chooser, filter);
++  if (g_find_program_in_path ("pandoc"))
++  {
++    filter = gtk_file_filter_new ();
++    gtk_file_filter_set_name (filter, "RTF");
++    gtk_file_filter_add_pattern (filter, "*.rtf");
++    gtk_file_chooser_add_filter (chooser, filter);
++
++    filter = gtk_file_filter_new ();
++    gtk_file_filter_set_name (filter, "DOCX");
++    gtk_file_filter_add_pattern (filter, "*.docx");
++    gtk_file_chooser_add_filter (chooser, filter);
++
++    filter = gtk_file_filter_new ();
++    gtk_file_filter_set_name (filter, "ODT");
++    gtk_file_filter_add_pattern (filter, "*.odt");
++    gtk_file_chooser_add_filter (chooser, filter);
++  }
+ 
+   filter = gtk_file_filter_new ();
+   gtk_file_filter_set_name (filter, "LATEX");

Added: pdf-export.patch
===================================================================
--- pdf-export.patch	                        (rev 0)
+++ pdf-export.patch	2020-07-23 00:42:02 UTC (rev 664959)
@@ -0,0 +1,21 @@
+diff --git a/src/marker-preview.c b/src/marker-preview.c
+index a7c2e2b4..2cfd153e 100644
+--- a/src/marker-preview.c
++++ b/src/marker-preview.c
+@@ -21,6 +21,7 @@
+ 
+ #include <string.h>
+ #include <stdlib.h>
++#include <libintl.h>
+ 
+ #include <glib.h>
+ #include <time.h>
+@@ -451,7 +452,7 @@ marker_preview_print_pdf(MarkerPreview*     preview,
+ 
+     gtk_print_settings_set(print_s, GTK_PRINT_SETTINGS_OUTPUT_FILE_FORMAT, "pdf");
+     gtk_print_settings_set(print_s, GTK_PRINT_SETTINGS_OUTPUT_URI, uri);
+-    gtk_print_settings_set(print_s, GTK_PRINT_SETTINGS_PRINTER, "Print to File");
++    gtk_print_settings_set(print_s, GTK_PRINT_SETTINGS_PRINTER, dgettext ("gtk30", "Print to File"));
+ 
+     if (orientation == GTK_PAGE_ORIENTATION_PORTRAIT) {
+       gtk_page_setup_set_paper_size(gtk_page_setup, gtk_paper_size);


More information about the arch-commits mailing list