Compare commits

...
Sign in to create a new pull request.
Author SHA1 Message Date
Martin Wimpress
70f1f50118 Merge pull request #129 from monsta/patch-1
[1.8] ev-jobs: don't forget to unlock the trylock'ed mutex
2015-06-09 22:51:45 +01:00
Martin Wimpress
28cd11d64d Merge pull request #133 from monsta/wrong-bugzilla-1.8
[1.8] corrected bug tracker links everywhere
2015-06-09 22:50:46 +01:00
Monsta
6707c4b0a0 corrected bug tracker links everywhere 2015-03-17 17:00:03 +03:00
monsta
e97dcef7bb ev-jobs: don't forget to unlock the trylock'ed mutex 2015-03-05 17:21:31 +03:00
Stefano Karapetsas
175296fe82 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
2014-09-29 16:18:58 +02:00
raveit65
1c809012d4 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
2014-09-29 16:18:41 +02:00
raveit65
c8caf0cd9d ps: Make sure page labels are valid utf-8 strings
taken from https://git.gnome.org/browse/evince/commit/?id=150d0cfa2d8f64823f2782d207d717fa3ac340a0
2014-09-29 16:18:29 +02:00
infirit
16ea275cf3 Bump version to 1.8.1 2014-09-28 20:33:35 +02:00
infirit
ca2a2421a7 Update NEWS for 1.8.1 2014-09-28 20:32:59 +02:00
infirit
1e3ba90d47 Make ev_view_set_scroll_adjustments static void 2014-09-25 13:54:39 +02:00
Matvey Soloviev
cd3a1af793 Fix crash when clicking empty canvas while loading. 2014-09-25 13:51:49 +02:00
Alexander
6b13afb617 Fix FTBFS of atril when build with the clang compiler
Closes https://github.com/mate-desktop/atril/issues/82
2014-09-25 13:51:23 +02:00
infirit
004d1e95fc Add keywords key to .desktop files, close #78
Patch by Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
2014-09-25 13:05:37 +02:00
infirit
349afcaf29 Fix typo in Makefile.am 2014-09-25 13:05:25 +02:00
18 changed files with 61 additions and 25 deletions

View file

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

7
NEWS
View file

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

View file

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

4
TODO
View file

@ -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
https://github.com/mate-desktop/atril/issues

View file

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

View file

@ -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);
}

View file

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

View file

@ -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);
}

View file

@ -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 *

View file

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

View file

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

View file

@ -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,

View file

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

View file

@ -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 */

View file

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

View file

@ -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 */

View file

@ -840,6 +840,7 @@ set_scroll_adjustment (EvView *view,
}
#if !GTK_CHECK_VERSION (3, 0, 0)
static void
ev_view_set_scroll_adjustments (GtkLayout *layout,
GtkAdjustment *hadjustment,
GtkAdjustment *vadjustment)
@ -6567,4 +6568,3 @@ ev_view_previous_page (EvView *view)
return FALSE;
}
}

View file

@ -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);
}
}