From 349afcaf2935e4fc177d50dc1047a317980dcd2d Mon Sep 17 00:00:00 2001 From: infirit Date: Sun, 11 May 2014 21:32:27 +0200 Subject: [PATCH 01/12] Fix typo in Makefile.am --- Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 5e29a9bb..23a43443 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAG} +ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} # Set the minimum required Windows version to Windows 2000 (0x0500). if PLATFORM_WIN32 From 004d1e95fc86e9667eb4aecaf7d8d7a9c33e6ddd Mon Sep 17 00:00:00 2001 From: infirit Date: Wed, 30 Apr 2014 14:34:20 +0200 Subject: [PATCH 02/12] Add keywords key to .desktop files, close #78 Patch by Mike Gabriel --- data/atril.desktop.in.in | 1 + 1 file changed, 1 insertion(+) diff --git a/data/atril.desktop.in.in b/data/atril.desktop.in.in index 988d845d..0f7fd7b3 100644 --- a/data/atril.desktop.in.in +++ b/data/atril.desktop.in.in @@ -14,4 +14,5 @@ X-MATE-Bugzilla-Product=atril X-MATE-Bugzilla-Component=BugBuddyBugs X-MATE-Bugzilla-Version=@VERSION@ Categories=GTK;Office;Viewer; +Keywords=MATE;document;viewer;pdf;dvi;ps;xps;tiff;pixbuf;djvu;comics; MimeType=@ATRIL_MIME_TYPES@ From 6b13afb617b32c7832c088ea62ab9125e276d0ec Mon Sep 17 00:00:00 2001 From: Alexander Date: Thu, 25 Sep 2014 13:32:54 +0200 Subject: [PATCH 03/12] Fix FTBFS of atril when build with the clang compiler Closes https://github.com/mate-desktop/atril/issues/82 --- libview/ev-view.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libview/ev-view.c b/libview/ev-view.c index 7bb56cae..78261d3a 100644 --- a/libview/ev-view.c +++ b/libview/ev-view.c @@ -840,6 +840,7 @@ set_scroll_adjustment (EvView *view, } #if !GTK_CHECK_VERSION (3, 0, 0) +void ev_view_set_scroll_adjustments (GtkLayout *layout, GtkAdjustment *hadjustment, GtkAdjustment *vadjustment) @@ -6567,4 +6568,3 @@ ev_view_previous_page (EvView *view) return FALSE; } } - From cd3a1af793824e33d26efa4fe709316d5617373d Mon Sep 17 00:00:00 2001 From: Matvey Soloviev Date: Thu, 21 Aug 2014 04:33:12 -0400 Subject: [PATCH 04/12] Fix crash when clicking empty canvas while loading. --- libview/ev-pixbuf-cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libview/ev-pixbuf-cache.c b/libview/ev-pixbuf-cache.c index 367f70d7..9741e434 100644 --- a/libview/ev-pixbuf-cache.c +++ b/libview/ev-pixbuf-cache.c @@ -88,7 +88,7 @@ static gboolean new_selection_surface_needed(EvPixbufCache *pixbuf_cac #define VISIBLE_NEXT_LEN(pixbuf_cache) \ (MIN(pixbuf_cache->preload_cache_size, ev_document_get_n_pages (pixbuf_cache->document) - (1 + pixbuf_cache->end_page))) #define PAGE_CACHE_LEN(pixbuf_cache) \ - ((pixbuf_cache->end_page - pixbuf_cache->start_page) + 1) + (pixbuf_cache->start_page>=0?((pixbuf_cache->end_page - pixbuf_cache->start_page) + 1):0) #define MAX_PRELOADED_PAGES 3 From 1e3ba90d474f9451866fc8f2009e6ab544f97704 Mon Sep 17 00:00:00 2001 From: infirit Date: Thu, 25 Sep 2014 13:53:31 +0200 Subject: [PATCH 05/12] Make ev_view_set_scroll_adjustments static void --- libview/ev-view.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libview/ev-view.c b/libview/ev-view.c index 78261d3a..20f5b600 100644 --- a/libview/ev-view.c +++ b/libview/ev-view.c @@ -840,7 +840,7 @@ set_scroll_adjustment (EvView *view, } #if !GTK_CHECK_VERSION (3, 0, 0) -void +static void ev_view_set_scroll_adjustments (GtkLayout *layout, GtkAdjustment *hadjustment, GtkAdjustment *vadjustment) From ca2a2421a774769a605472c9a64405a2d3c589b9 Mon Sep 17 00:00:00 2001 From: infirit Date: Sun, 28 Sep 2014 20:32:59 +0200 Subject: [PATCH 06/12] Update NEWS for 1.8.1 --- NEWS | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/NEWS b/NEWS index 1e18b235..fceca2cf 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,10 @@ +1.8.1 +----- + + * Fix crash when clicking empty canvas while loading. + * Fix FTBFS of atril when build with the clang compiler + * Add keywords key to .desktop files, close #78 + 1.8.0 ----- From 16ea275cf30821bd54c2e0a5decb5e12ceca5bcf Mon Sep 17 00:00:00 2001 From: infirit Date: Sun, 28 Sep 2014 20:33:35 +0200 Subject: [PATCH 07/12] Bump version to 1.8.1 --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 14b11ba8..6bfe2c52 100644 --- a/configure.ac +++ b/configure.ac @@ -4,7 +4,7 @@ m4_define([ev_major_version], [1]) m4_define([ev_minor_version], [8]) -m4_define([ev_micro_version], [0]) +m4_define([ev_micro_version], [1]) m4_define([ev_extra_version], []) m4_define([ev_version], [ev_major_version.ev_minor_version.ev_micro_version()ev_extra_version]) From c8caf0cd9de8e31904a60a60fb5e98e55b59555c Mon Sep 17 00:00:00 2001 From: raveit65 Date: Mon, 21 Apr 2014 12:18:15 +0200 Subject: [PATCH 08/12] ps: Make sure page labels are valid utf-8 strings taken from https://git.gnome.org/browse/evince/commit/?id=150d0cfa2d8f64823f2782d207d717fa3ac340a0 --- backend/ps/ev-spectre.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/backend/ps/ev-spectre.c b/backend/ps/ev-spectre.c index d28325ba..b0489b78 100644 --- a/backend/ps/ev-spectre.c +++ b/backend/ps/ev-spectre.c @@ -224,7 +224,21 @@ static char * ps_document_get_page_label (EvDocument *document, EvPage *page) { - return g_strdup (spectre_page_get_label ((SpectrePage *)page->backend_page)); + const gchar *label = spectre_page_get_label ((SpectrePage *)page->backend_page); + gchar *utf8; + + if (!label) + return NULL; + + if (g_utf8_validate (label, -1, NULL)) + return g_strdup (label); + + /* Try with latin1 and ASCII encondings */ + utf8 = g_convert (label, -1, "utf-8", "latin1", NULL, NULL, NULL); + if (!utf8) + utf8 = g_convert (label, -1, "utf-8", "ASCII", NULL, NULL, NULL); + + return utf8; } static EvDocumentInfo * From 1c809012d4a25781926137d01307c998e46c703f Mon Sep 17 00:00:00 2001 From: raveit65 Date: Mon, 21 Apr 2014 12:15:04 +0200 Subject: [PATCH 09/12] create_thumbnail_frame should return NULL when source_pixbuf is NULL and width and height are not positive. fix https://bugzilla.redhat.com/show_bug.cgi?id=1082143 taken from https://git.gnome.org/browse/evince/commit/?id=3d8180a605e8c98172e9e0e739e22b7f50ed7bad --- libdocument/ev-document-misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libdocument/ev-document-misc.c b/libdocument/ev-document-misc.c index d597127f..6099b7fa 100644 --- a/libdocument/ev-document-misc.c +++ b/libdocument/ev-document-misc.c @@ -56,7 +56,7 @@ create_thumbnail_frame (int width, } /* make sure no one is passing us garbage */ - g_assert (width_r >= 0 && height_r >= 0); + g_return_val_if_fail (width_r >= 0 && height_r >= 0, NULL); retval = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, From 175296fe8246a472439d529543c5c31802cad4b2 Mon Sep 17 00:00:00 2001 From: Stefano Karapetsas Date: Wed, 19 Mar 2014 10:17:58 +0100 Subject: [PATCH 10/12] djvu: Fix case sensitive search Closes https://github.com/mate-desktop/atril/issues/41 Closes https://github.com/mate-desktop/atril/pull/74 This commit is based on Aleksi Blinnikka one from #74 --- backend/djvu/djvu-document.c | 2 +- backend/djvu/djvu-text-page.c | 15 +++++++++++++-- backend/djvu/djvu-text-page.h | 3 ++- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/backend/djvu/djvu-document.c b/backend/djvu/djvu-document.c index 814503c1..bddcef51 100644 --- a/backend/djvu/djvu-document.c +++ b/backend/djvu/djvu-document.c @@ -654,7 +654,7 @@ djvu_document_find_find_text (EvDocumentFind *document, djvu_text_page_prepare_search (tpage, case_sensitive); if (tpage->links->len > 0) { - djvu_text_page_search (tpage, text); + djvu_text_page_search (tpage, text, case_sensitive); matches = tpage->results; } djvu_text_page_free (tpage); diff --git a/backend/djvu/djvu-text-page.c b/backend/djvu/djvu-text-page.c index 3f171d1e..d74a3983 100644 --- a/backend/djvu/djvu-text-page.c +++ b/backend/djvu/djvu-text-page.c @@ -365,22 +365,31 @@ djvu_text_page_append_text (DjvuTextPage *page, * djvu_text_page_search: * @page: #DjvuTextPage instance * @text: text to search + * @case_sensitive: do not ignore case * * Searches the page for the given text. The results list has to be * externally freed afterwards. */ void djvu_text_page_search (DjvuTextPage *page, - const char *text) + const char *text, + gboolean case_sensitive) { char *haystack = page->text; + char *search_text; int search_len; EvRectangle *result; if (page->links->len == 0) return; search_len = strlen (text); - while ((haystack = strstr (haystack, text)) != NULL) { + + if (case_sensitive) + search_text = g_strdup (text); + else + search_text = g_utf8_casefold (text, search_len); + + while ((haystack = strstr (haystack, search_text)) != NULL) { int start_p = haystack - page->text; miniexp_t start = djvu_text_page_position (page, start_p); int end_p = start_p + search_len - 1; @@ -391,6 +400,8 @@ djvu_text_page_search (DjvuTextPage *page, haystack = haystack + search_len; } page->results = g_list_reverse (page->results); + + g_free (search_text); } diff --git a/backend/djvu/djvu-text-page.h b/backend/djvu/djvu-text-page.h index 6e16f259..5ee85a3e 100644 --- a/backend/djvu/djvu-text-page.h +++ b/backend/djvu/djvu-text-page.h @@ -51,7 +51,8 @@ char * djvu_text_page_copy (DjvuTextPage *page, void djvu_text_page_prepare_search (DjvuTextPage *page, gboolean case_sensitive); void djvu_text_page_search (DjvuTextPage *page, - const char *text); + const char *text, + gboolean case_sensitive); DjvuTextPage* djvu_text_page_new (miniexp_t text); void djvu_text_page_free (DjvuTextPage *page); From e97dcef7bb3fa143181a68b36eaa3fb02c814d32 Mon Sep 17 00:00:00 2001 From: monsta Date: Thu, 5 Mar 2015 17:21:31 +0300 Subject: [PATCH 11/12] ev-jobs: don't forget to unlock the trylock'ed mutex --- libview/ev-jobs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libview/ev-jobs.c b/libview/ev-jobs.c index d8d3043d..99cfc8c0 100644 --- a/libview/ev-jobs.c +++ b/libview/ev-jobs.c @@ -834,9 +834,11 @@ ev_job_fonts_run (EvJob *job) /* Do not block the main loop */ if (!ev_document_doc_mutex_trylock ()) return TRUE; - - if (!ev_document_fc_mutex_trylock ()) + + if (!ev_document_fc_mutex_trylock ()) { + ev_document_doc_mutex_unlock (); return TRUE; + } #ifdef EV_ENABLE_DEBUG /* We use the #ifdef in this case because of the if */ From 6707c4b0a0b4f549d44a8574d4f783705ed949ec Mon Sep 17 00:00:00 2001 From: Monsta Date: Tue, 17 Mar 2015 16:47:26 +0300 Subject: [PATCH 12/12] corrected bug tracker links everywhere --- NEWS.gnome | 2 +- TODO | 4 ++-- backend/pdf/ev-poppler.cc | 10 +++++----- libdocument/ev-file-helpers.c | 2 +- libview/ev-transition-animation.c | 4 ++-- shell/ev-window.c | 4 ++-- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/NEWS.gnome b/NEWS.gnome index 57e2af85..dfec6e08 100644 --- a/NEWS.gnome +++ b/NEWS.gnome @@ -1535,7 +1535,7 @@ Atril 2.21.90 Important notice for distributors: * This release overrides document permissions by default. See - http://bugzilla.mate.org/show_bug.cgi?id=382700 for more information + http://bugzilla.gnome.org/show_bug.cgi?id=382700 for more information about this. * Ghostscript interface for PostScript documents is now deprecated. Please use libspectre (http://libspectre.freedesktop.org/) diff --git a/TODO b/TODO index 9425ff05..670c483c 100644 --- a/TODO +++ b/TODO @@ -1,3 +1,3 @@ -See our bugzilla for list of entries we are working at +See our bug tracker for list of issues we are working at -http://bugzilla.mate.org/buglist.cgi?product=atril&bug_status=NEW \ No newline at end of file +https://github.com/mate-desktop/atril/issues diff --git a/backend/pdf/ev-poppler.cc b/backend/pdf/ev-poppler.cc index 8049db55..fdba9a22 100644 --- a/backend/pdf/ev-poppler.cc +++ b/backend/pdf/ev-poppler.cc @@ -1074,8 +1074,8 @@ ev_link_dest_from_dest (PdfDocument *pdf_document, if (unimplemented_dest) { g_warning ("Unimplemented destination: %s, please post a " - "bug report in Atril bugzilla " - "(http://bugzilla.mate.org) with a testcase.", + "bug report on Atril bug tracker " + "(https://github.com/mate-desktop/atril/issues) with a testcase.", unimplemented_dest); } @@ -1139,7 +1139,7 @@ ev_link_from_action (PdfDocument *pdf_document, if (unimplemented_action) { g_warning ("Unimplemented action: %s, please post a bug report " - "in Atril bugzilla (http://bugzilla.mate.org) " + "on Atril bug tracker (https://github.com/mate-desktop/atril/issues) " "with a testcase.", unimplemented_action); } @@ -2694,8 +2694,8 @@ ev_annot_from_poppler_annot (PopplerAnnot *poppler_annot, if (unimplemented_annot) { g_warning ("Unimplemented annotation: %s, please post a " - "bug report in Atril bugzilla " - "(http://bugzilla.mate.org) with a testcase.", + "bug report on Atril bug tracker " + "(https://github.com/mate-desktop/atril/issues) with a testcase.", unimplemented_annot); } diff --git a/libdocument/ev-file-helpers.c b/libdocument/ev-file-helpers.c index 779b635c..13e510f7 100644 --- a/libdocument/ev-file-helpers.c +++ b/libdocument/ev-file-helpers.c @@ -197,7 +197,7 @@ ev_mkstemp_file (const char *template, /** * This function is copied from - * http://bugzilla.mate.org/show_bug.cgi?id=524831 + * http://bugzilla.gnome.org/show_bug.cgi?id=524831 * and renamed from g_mkdtemp to _ev_g_mkdtemp. * * If/when this function gets added to glib, it can be removed from diff --git a/libview/ev-transition-animation.c b/libview/ev-transition-animation.c index 1e766af3..a8a2e117 100644 --- a/libview/ev-transition-animation.c +++ b/libview/ev-transition-animation.c @@ -591,8 +591,8 @@ ev_transition_animation_paint (EvTransitionAnimation *animation, enum_value = g_enum_get_value (g_type_class_peek (EV_TYPE_TRANSITION_EFFECT_TYPE), type); g_warning ("Unimplemented transition animation: '%s', " - "please post a bug report in Atril bugzilla " - "(http://bugzilla.mate.org) with a testcase.", + "please post a bug report on Atril bug tracker " + "(https://github.com/mate-desktop/atril/issues) with a testcase.", enum_value->value_nick); /* just paint the destination slide */ diff --git a/shell/ev-window.c b/shell/ev-window.c index 6bd6fe85..f3d30a23 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -6086,8 +6086,8 @@ do_action_named (EvWindow *window, EvLinkAction *action) ev_window_cmd_file_print (NULL, window); } else { g_warning ("Unimplemented named action: %s, please post a " - "bug report in Atril bugzilla " - "(http://bugzilla.mate.org) with a testcase.", + "bug report on Atril bug tracker " + "(https://github.com/mate-desktop/atril/issues) with a testcase.", name); } }