...
 
Commits (20)
================
Evince 3.24.2
================
Bug fixes:
* Fix infinite loop when removing annotation windows (#785975,
Jose Aliste)
Translation updates:
* Sveinn í Felli (is)
================
Evince 3.24.1
================
Bug fixes:
* Remove support for tar and tar-like commands in commics backend
(CVE-2017-1000083, #784630, Bastien Nocera)
* Improve performance of the links sidebar (#779614, Benjamin
Berg)
* Improve performance of scrolling in thumbnails sidebar (#691448,
Nelson Benítez León)
* Don't copy remote files before thumbnailing (#780351, Bastien
Nocera)
* Fix toggling layers that are not in the current visible range of
pages (#780139, Georges Dupéron)
* Fix ev_page_accessible_get_range_for_boundary() to ensure the
start and end offsets it returns are within the allowed range
(#777992, Jason Crain)
* Fix crash with Orca screen reader (#777992, Jason Crain)
Translation updates:
* Yuras Shumovich (be)
* Tom Tryfonidis (el)
* gogo (hr)
* Matej Urbančič (sl)
================
Evince 3.24.0
================
......
......@@ -56,8 +56,7 @@ typedef enum
RARLABS,
GNAUNRAR,
UNZIP,
P7ZIP,
TAR
P7ZIP
} ComicBookDecompressType;
typedef struct _ComicsDocumentClass ComicsDocumentClass;
......@@ -117,9 +116,6 @@ static const ComicBookDecompressCommand command_usage_def[] = {
/* 7zip */
{NULL , "%s l -- %s" , "%s x -y %s -o%s", FALSE, OFFSET_7Z},
/* tar */
{"%s -xOf" , "%s -tf %s" , NULL , FALSE, NO_OFFSET}
};
static GSList* get_supported_image_extensions (void);
......@@ -364,13 +360,6 @@ comics_check_decompress_command (gchar *mime_type,
comics_document->command_usage = GNAUNRAR;
return TRUE;
}
comics_document->selected_command =
g_find_program_in_path ("bsdtar");
if (comics_document->selected_command) {
comics_document->command_usage = TAR;
return TRUE;
}
} else if (g_content_type_is_a (mime_type, "application/x-cbz") ||
g_content_type_is_a (mime_type, "application/zip")) {
/* InfoZIP's unzip program */
......@@ -396,12 +385,6 @@ comics_check_decompress_command (gchar *mime_type,
comics_document->command_usage = P7ZIP;
return TRUE;
}
comics_document->selected_command =
g_find_program_in_path ("bsdtar");
if (comics_document->selected_command) {
comics_document->command_usage = TAR;
return TRUE;
}
} else if (g_content_type_is_a (mime_type, "application/x-cb7") ||
g_content_type_is_a (mime_type, "application/x-7z-compressed")) {
......@@ -425,27 +408,6 @@ comics_check_decompress_command (gchar *mime_type,
comics_document->command_usage = P7ZIP;
return TRUE;
}
comics_document->selected_command =
g_find_program_in_path ("bsdtar");
if (comics_document->selected_command) {
comics_document->command_usage = TAR;
return TRUE;
}
} else if (g_content_type_is_a (mime_type, "application/x-cbt") ||
g_content_type_is_a (mime_type, "application/x-tar")) {
/* tar utility (Tape ARchive) */
comics_document->selected_command =
g_find_program_in_path ("tar");
if (comics_document->selected_command) {
comics_document->command_usage = TAR;
return TRUE;
}
comics_document->selected_command =
g_find_program_in_path ("bsdtar");
if (comics_document->selected_command) {
comics_document->command_usage = TAR;
return TRUE;
}
} else {
g_set_error (error,
EV_DOCUMENT_ERROR,
......
......@@ -4,7 +4,7 @@
m4_define([ev_major_version],[3])
m4_define([ev_minor_version],[24])
m4_define([ev_micro_version],[0])
m4_define([ev_micro_version],[2])
m4_define([ev_extra_version],[])
m4_define([ev_version],[ev_major_version.ev_minor_version.ev_micro_version()ev_extra_version])
......@@ -795,7 +795,7 @@ AC_SUBST(TIFF_MIME_TYPES)
AC_SUBST(APPDATA_TIFF_MIME_TYPES)
AM_SUBST_NOTMAKE(APPDATA_TIFF_MIME_TYPES)
if test "x$enable_comics" = "xyes"; then
COMICS_MIME_TYPES="application/x-cbr;application/x-cbz;application/x-cb7;application/x-cbt;application/x-ext-cbr;application/x-ext-cbz;application/vnd.comicbook+zip;application/x-ext-cb7;application/x-ext-cbt"
COMICS_MIME_TYPES="application/x-cbr;application/x-cbz;application/x-cb7;application/x-ext-cbr;application/x-ext-cbz;application/vnd.comicbook+zip;application/x-ext-cb7"
APPDATA_COMICS_MIME_TYPES=$(echo "<mimetype>$COMICS_MIME_TYPES</mimetype>" | sed -e 's/;/<\/mimetype>\n <mimetype>/g')
if test -z "$EVINCE_MIME_TYPES"; then
EVINCE_MIME_TYPES="${COMICS_MIME_TYPES}"
......
......@@ -487,9 +487,9 @@ ev_page_accessible_get_substring (AtkText *text,
return NULL;
page_text = ev_page_cache_get_text (view->page_cache, self->priv->page);
start_offset = MAX (0, start_offset);
if (end_offset < 0 || end_offset > g_utf8_strlen (page_text, -1))
end_offset = strlen (page_text);
start_offset = CLAMP (start_offset, 0, end_offset);
substring = g_utf8_substring (page_text, start_offset, end_offset);
normalized = g_utf8_normalize (substring, -1, G_NORMALIZE_NFKC);
......@@ -541,23 +541,26 @@ ev_page_accessible_get_range_for_boundary (AtkText *text,
if (!log_attrs)
return;
if (offset < 0 || offset >= n_attrs)
return;
switch (boundary_type) {
case ATK_TEXT_BOUNDARY_CHAR:
start = offset;
end = offset + 1;
break;
case ATK_TEXT_BOUNDARY_WORD_START:
for (start = offset; start >= 0 && !log_attrs[start].is_word_start; start--);
for (end = offset + 1; end <= n_attrs && !log_attrs[end].is_word_start; end++);
for (start = offset; start > 0 && !log_attrs[start].is_word_start; start--);
for (end = offset + 1; end < n_attrs && !log_attrs[end].is_word_start; end++);
break;
case ATK_TEXT_BOUNDARY_SENTENCE_START:
for (start = offset; start >= 0; start--) {
for (start = offset; start > 0; start--) {
if (log_attrs[start].is_mandatory_break && treat_as_soft_return (view, self->priv->page, log_attrs, start - 1))
continue;
if (log_attrs[start].is_sentence_start)
break;
}
for (end = offset + 1; end <= n_attrs; end++) {
for (end = offset + 1; end < n_attrs; end++) {
if (log_attrs[end].is_mandatory_break && treat_as_soft_return (view, self->priv->page, log_attrs, end - 1))
continue;
if (log_attrs[end].is_sentence_start)
......@@ -565,8 +568,8 @@ ev_page_accessible_get_range_for_boundary (AtkText *text,
}
break;
case ATK_TEXT_BOUNDARY_LINE_START:
for (start = offset; start >= 0 && !log_attrs[start].is_mandatory_break; start--);
for (end = offset + 1; end <= n_attrs && !log_attrs[end].is_mandatory_break; end++);
for (start = offset; start > 0 && !log_attrs[start].is_mandatory_break; start--);
for (end = offset + 1; end < n_attrs && !log_attrs[end].is_mandatory_break; end++);
break;
default:
/* The "END" boundary types are deprecated */
......
......@@ -2012,7 +2012,7 @@ ev_view_handle_link (EvView *view, EvLink *link)
}
g_signal_emit (view, signals[SIGNAL_LAYERS_CHANGED], 0);
ev_view_reload_page (view, view->current_page, NULL);
ev_view_reload (view);
}
break;
case EV_LINK_ACTION_TYPE_GOTO_REMOTE:
......@@ -3017,9 +3017,10 @@ ev_view_remove_window_child_for_annot (EvView *view,
child = (EvViewWindowChild *)children->data;
if (child->page != page)
if (child->page != page) {
children = children->next;
continue;
}
wannot = ev_annotation_window_get_annotation (EV_ANNOTATION_WINDOW (child->window));
if (ev_annotation_equal (wannot, annot)) {
gtk_widget_destroy (child->window);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -2,14 +2,14 @@
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Sveinn í Felli <sv1@fellsnet.is>, 2015, 2016.
# Sveinn í Felli <sv1@fellsnet.is>, 2015, 2016, 2017.
msgid ""
msgstr ""
"Project-Id-Version: evince.master\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?"
"product=evince&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2016-10-09 14:09+0000\n"
"PO-Revision-Date: 2016-10-11 08:57+0000\n"
"POT-Creation-Date: 2017-07-21 14:58+0000\n"
"PO-Revision-Date: 2017-08-23 09:42+0000\n"
"Last-Translator: Sveinn í Felli <sv1@fellsnet.is>\n"
"Language-Team: Icelandic <translation-team-is@lists.sourceforge.net>\n"
"Language: is\n"
......@@ -19,52 +19,54 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n%10!=1 || n%100==11);\n"
"X-Generator: Lokalize 1.5\n"
#: ../backend/comics/comics-document.c:210
#: ../backend/comics/comics-document.c:206
#, c-format
msgid ""
"Error launching the command “%s” in order to decompress the comic book: %s"
msgstr ""
"Gat ekki keyrt skipunina \"%s\" sem átti að afþjappa teiknimyndasöguna: %s"
#: ../backend/comics/comics-document.c:224
#: ../backend/comics/comics-document.c:220
#, c-format
msgid "The command “%s” failed at decompressing the comic book."
msgstr "Skipunin \"%s\" gat ekki afþjappað þessari myndasögu"
#: ../backend/comics/comics-document.c:233
#: ../backend/comics/comics-document.c:229
#, c-format
msgid "The command “%s” did not end normally."
msgstr "Skipunin \"%s\" endaði ekki eðlilega."
#: ../backend/comics/comics-document.c:453
#: ../backend/comics/comics-document.c:415
#, c-format
msgid "Not a comic book MIME type: %s"
msgstr "Ekki MIME gerð teiknimyndasögu: %s"
#: ../backend/comics/comics-document.c:460
msgid "Can't find an appropriate command to decompress this type of comic book"
#: ../backend/comics/comics-document.c:422
#| msgid ""
#| "Can't find an appropriate command to decompress this type of comic book"
msgid "Can’t find an appropriate command to decompress this type of comic book"
msgstr ""
"Fann ekki viðeigandi skipun til að afþjappa þessari gerð teiknimyndasögu"
#: ../backend/comics/comics-document.c:515
#: ../backend/comics/comics-document.c:488
msgid "File corrupted"
msgstr "Skráin er skemmd"
#: ../backend/comics/comics-document.c:528
#: ../backend/comics/comics-document.c:501
msgid "No files in archive"
msgstr "Engar skrár eru í safnskránni"
#: ../backend/comics/comics-document.c:567
#: ../backend/comics/comics-document.c:540
#, c-format
msgid "No images found in archive %s"
msgstr "Engar myndir fundust í safnskránni %s"
#: ../backend/comics/comics-document.c:817
#: ../backend/comics/comics-document.c:790
#, c-format
msgid "There was an error deleting “%s”."
msgstr "Villa kom upp við að eyða “%s”."
#: ../backend/comics/comics-document.c:910
#: ../backend/comics/comics-document.c:883
#, c-format
msgid "Error %s"
msgstr "Villa %s"
......@@ -410,17 +412,20 @@ msgstr "Leyfa tenglum að breyta aðdrætti."
#: ../libdocument/ev-attachment.c:310 ../libdocument/ev-attachment.c:331
#, c-format
msgid "Couldn't save attachment “%s”: %s"
#| msgid "Couldn't save attachment “%s”: %s"
msgid "Couldn’t save attachment “%s”: %s"
msgstr "Gat ekki vistað viðhengi “%s”: %s"
#: ../libdocument/ev-attachment.c:379
#, c-format
msgid "Couldn't open attachment “%s”: %s"
#| msgid "Couldn't open attachment “%s”: %s"
msgid "Couldn’t open attachment “%s”: %s"
msgstr "Gat ekki opnað viðhengi “%s”: %s"
#: ../libdocument/ev-attachment.c:414
#, c-format
msgid "Couldn't open attachment “%s”"
#| msgid "Couldn't open attachment “%s”"
msgid "Couldn’t open attachment “%s”"
msgstr "Gat ekki opnað viðhengi “%s”"
#: ../libdocument/ev-document-factory.c:101
......@@ -463,8 +468,8 @@ msgid "of %d"
msgstr "af %d"
#: ../libmisc/ev-page-action-widget.c:185 ../shell/ev-history.c:426
#: ../shell/ev-sidebar-bookmarks.c:295 ../shell/ev-window.c:902
#: ../shell/ev-window.c:4644
#: ../shell/ev-sidebar-bookmarks.c:295 ../shell/ev-window.c:907
#: ../shell/ev-window.c:4679
#, c-format
msgid "Page %s"
msgstr "Síða %s"
......@@ -503,7 +508,7 @@ msgstr "Mistókst að myndgera síðu %d"
msgid "Failed to create thumbnail for page %d"
msgstr "Tókst ekki að gera smámynd fyrir %d"
#: ../libview/ev-jobs.c:2031
#: ../libview/ev-jobs.c:2033
#, c-format
msgid "Failed to print page %d: %s"
msgstr "Það tókst ekki að prenta síðu %d: %s"
......@@ -567,16 +572,27 @@ msgid "Fit to Printable Area"
msgstr "Laga að prentanlegu svæði"
#: ../libview/ev-print-operation.c:1970
#| msgid ""
#| "Scale document pages to fit the selected printer page. Select from one of "
#| "the following:\n"
#| "\n"
#| "• \"None\": No page scaling is performed.\n"
#| "\n"
#| "• \"Shrink to Printable Area\": Document pages larger than the printable "
#| "area are reduced to fit the printable area of the printer page.\n"
#| "\n"
#| "• \"Fit to Printable Area\": Document pages are enlarged or reduced as "
#| "required to fit the printable area of the printer page.\n"
msgid ""
"Scale document pages to fit the selected printer page. Select from one of "
"the following:\n"
"\n"
"• \"None\": No page scaling is performed.\n"
"• “None”: No page scaling is performed.\n"
"\n"
"• \"Shrink to Printable Area\": Document pages larger than the printable "
"area are reduced to fit the printable area of the printer page.\n"
"• “Shrink to Printable Area”: Document pages larger than the printable area "
"are reduced to fit the printable area of the printer page.\n"
"\n"
"• \"Fit to Printable Area\": Document pages are enlarged or reduced as "
"• “Fit to Printable Area”: Document pages are enlarged or reduced as "
"required to fit the printable area of the printer page.\n"
msgstr ""
"Kvarða síður í skjalinu svo þær passi á útprentaðar síður. Veldu einn af "
......@@ -588,8 +604,8 @@ msgstr ""
"prentanlegt svæði eru minnkaðar þannig að þær komist fyrir á útprentuðum "
"síðum.\n"
"\n"
"• \"Laga að prentanlegu svæði\": síður í skjalinu eru minnkaðar eða "
"stækkaðar þannig að þær passi á útprentuðar síður.\n"
"• \"Laga að prentanlegu svæði\": síður í skjalinu eru minnkaðar eða stækkaðar "
"þannig að þær passi á útprentaðar síður.\n"
#: ../libview/ev-print-operation.c:1982
msgid "Auto Rotate and Center"
......@@ -639,46 +655,46 @@ msgstr "Skruna sýn niður"
msgid "Document View"
msgstr "Birta skjal"
#: ../libview/ev-view.c:2031
#: ../libview/ev-view.c:2033
msgid "Go to first page"
msgstr "Fara á fyrstu síðu"
#: ../libview/ev-view.c:2033
#: ../libview/ev-view.c:2035
msgid "Go to previous page"
msgstr "Fara á fyrri síðu"
#: ../libview/ev-view.c:2035
#: ../libview/ev-view.c:2037
msgid "Go to next page"
msgstr "Fara á næstu síðu"
#: ../libview/ev-view.c:2037
#: ../libview/ev-view.c:2039
msgid "Go to last page"
msgstr "Fara á öftustu síðu"
#: ../libview/ev-view.c:2039
#: ../libview/ev-view.c:2041
msgid "Go to page"
msgstr "Fara á síðu"
#: ../libview/ev-view.c:2041
#: ../libview/ev-view.c:2043
msgid "Find"
msgstr "Finna"
#: ../libview/ev-view.c:2069
#: ../libview/ev-view.c:2071
#, c-format
msgid "Go to page %s"
msgstr "Fara á síðu %s"
#: ../libview/ev-view.c:2075
#: ../libview/ev-view.c:2077
#, c-format
msgid "Go to %s on file “%s”"
msgstr "Fara á %s í skrá \"%s\""
#: ../libview/ev-view.c:2078
#: ../libview/ev-view.c:2080
#, c-format
msgid "Go to file “%s”"
msgstr "Fara í skrá \"%s\""
#: ../libview/ev-view.c:2086
#: ../libview/ev-view.c:2088
#, c-format
msgid "Launch %s"
msgstr "Ræsa %s"
......@@ -707,13 +723,14 @@ msgstr "SKRÁ"
msgid "GNOME Document Previewer"
msgstr "GNOME forskoðun skjala"
#: ../previewer/ev-previewer-window.c:91 ../shell/ev-window.c:3257
#: ../previewer/ev-previewer-window.c:91 ../shell/ev-window.c:3262
msgid "Failed to print document"
msgstr "Gat ekki prentað skjalið"
#: ../previewer/ev-previewer-window.c:223
#, c-format
msgid "The selected printer '%s' could not be found"
#| msgid "The selected printer '%s' could not be found"
msgid "The selected printer “%s” could not be found"
msgstr "Prentarinn '%s' sem þú valdir, fannst ekki"
#: ../previewer/ev-previewer-window.c:270 ../shell/evince-menus.ui.h:40
......@@ -1000,7 +1017,7 @@ msgstr "Lykilorð fyrir skjalið %s"
#. Create tree view
#: ../shell/ev-loading-message.c:50 ../shell/ev-sidebar-annotations.c:125
#: ../shell/ev-sidebar-layers.c:125 ../shell/ev-sidebar-links.c:261
#: ../shell/ev-sidebar-layers.c:125 ../shell/ev-sidebar-links.c:268
msgid "Loading…"
msgstr "Hleð inn..."
......@@ -1127,7 +1144,7 @@ msgstr "Bókamerki"
msgid "Layers"
msgstr "Lög"
#: ../shell/ev-sidebar-links.c:337
#: ../shell/ev-sidebar-links.c:344
msgid "Print…"
msgstr "Prenta…"
......@@ -1137,11 +1154,11 @@ msgstr "Prenta…"
#. * your language. The sidebar cannot be shrinked smaller than
#. * the longest title in there.
#.
#: ../shell/ev-sidebar-links.c:728
#: ../shell/ev-sidebar-links.c:750
msgid "Outline"
msgstr "Outline"
#: ../shell/ev-sidebar-thumbnails.c:1093
#: ../shell/ev-sidebar-thumbnails.c:1117
msgid "Thumbnails"
msgstr "Smámyndir"
......@@ -1181,135 +1198,153 @@ msgstr "Setja aðdráttargildi"
msgid "Supported Image Files"
msgstr "Studdar myndaskrár"
#: ../shell/ev-window.c:1536
#: ../shell/ev-window.c:1541
msgid "The document contains no pages"
msgstr "Þetta skjal inniheldur engar blaðsíður"
#: ../shell/ev-window.c:1539
#: ../shell/ev-window.c:1544
msgid "The document contains only empty pages"
msgstr "Þetta skjal inniheldur eingöngu tómar blaðsíður"
#: ../shell/ev-window.c:1752 ../shell/ev-window.c:1918
#: ../shell/ev-window.c:1757 ../shell/ev-window.c:1923
#, c-format
msgid "Unable to open document “%s”."
msgstr "Gat ekki opnað skjalið \"%s\"."
#: ../shell/ev-window.c:1882
#: ../shell/ev-window.c:1887
#, c-format
msgid "Loading document from “%s”"
msgstr "Hleð inn skjali frá \"%s\""
#: ../shell/ev-window.c:2033 ../shell/ev-window.c:2361
#: ../shell/ev-window.c:2038 ../shell/ev-window.c:2366
#, c-format
msgid "Downloading document (%d%%)"
msgstr "Sæki skjalið (%d%%)"
#: ../shell/ev-window.c:2066
#: ../shell/ev-window.c:2071
msgid "Failed to load remote file."
msgstr "Gat hlaðið inn fjartengdri skrá."
#: ../shell/ev-window.c:2305
#: ../shell/ev-window.c:2310
#, c-format
msgid "Reloading document from %s"
msgstr "Endurlesa skjalið aftur frá %s"
#: ../shell/ev-window.c:2337
#: ../shell/ev-window.c:2342
msgid "Failed to reload document."
msgstr "Það tókst ekki að endurhlaða skjalinu inn."
#: ../shell/ev-window.c:2553
#: ../shell/ev-window.c:2558
msgid "Open Document"
msgstr "Opna skjal"
#: ../shell/ev-window.c:2626
#: ../shell/ev-window.c:2631
#, c-format
msgid "Saving document to %s"
msgstr "Vista skjalinu í %s"
#: ../shell/ev-window.c:2629
#: ../shell/ev-window.c:2634
#, c-format
msgid "Saving attachment to %s"
msgstr "Vista viðhengi í %s"
#: ../shell/ev-window.c:2632
#: ../shell/ev-window.c:2637
#, c-format
msgid "Saving image to %s"
msgstr "Vista mynd í %s"
#: ../shell/ev-window.c:2676 ../shell/ev-window.c:2776
#: ../shell/ev-window.c:2681 ../shell/ev-window.c:2781
#, c-format
msgid "The file could not be saved as “%s”."
msgstr "Gat ekki vistað skrána sem \"%s\"."
#: ../shell/ev-window.c:2707
#: ../shell/ev-window.c:2712
#, c-format
msgid "Uploading document (%d%%)"
msgstr "Hleð skjalinu upp (%d%%)"
#: ../shell/ev-window.c:2711
#: ../shell/ev-window.c:2716
#, c-format
msgid "Uploading attachment (%d%%)"
msgstr "Hleð viðhengi upp (%d%%)"
#: ../shell/ev-window.c:2715
#: ../shell/ev-window.c:2720
#, c-format
msgid "Uploading image (%d%%)"
msgstr "Hleð mynd upp (%d%%)"
#: ../shell/ev-window.c:2827
#: ../shell/ev-window.c:2832
msgid "Save a Copy"
msgstr "Vista afrit"
#: ../shell/ev-window.c:2903
#: ../shell/ev-window.c:2908
msgid "Could not send current document"
msgstr "Gat ekki sent þetta skjal"
#: ../shell/ev-window.c:2937
#: ../shell/ev-window.c:2942
msgid "Could not open the containing folder"
msgstr "Gat ekki opnað umlykjandi möppu"
#: ../shell/ev-window.c:3201
#: ../shell/ev-window.c:3206
#, c-format
msgid "%d pending job in queue"
msgid_plural "%d pending jobs in queue"
msgstr[0] "%d verk sem bíður"
msgstr[1] "%d verk sem bíða"
#: ../shell/ev-window.c:3314
#: ../shell/ev-window.c:3319
#, c-format
msgid "Printing job “%s”"
msgstr "Prenta verk „%s“"
#: ../shell/ev-window.c:3517
msgid ""
"Document contains form fields that have been filled out. If you don't save a "
"copy, changes will be permanently lost."
msgstr ""
"Skjalið inniheldur reiti sem þú hefur fyllt út. Ef þú vistar ekki afrit af "
"skjalinu munu breytingarnar tapast."
#: ../shell/ev-window.c:3534
#| msgid ""
#| "Document contains form fields that have been filled out. If you don't "
#| "save a copy, changes will be permanently lost."
msgid "Document contains form fields that have been filled out. "
msgstr "Skjalið inniheldur reiti sem þú hefur fyllt út."
#: ../shell/ev-window.c:3521
msgid ""
"Document contains new or modified annotations. If you don't save a copy, "
"changes will be permanently lost."
msgstr ""
"Skjalið inniheldu nýjar eða breyttar glósur. Ef þú vistar ekki afrit af "
"skjalinu munu breytingarnar tapast."
#: ../shell/ev-window.c:3537
#| msgid "Document contains no annotations"
msgid "Document contains new or modified annotations. "
msgstr "Skjalið inniheldur engar nýjar eða breyttar glósur. "
#: ../shell/ev-window.c:3528
#: ../shell/ev-window.c:3549
#, c-format
#| msgid "Failed to load document “%s”"
msgid "Reload document “%s”?"
msgstr "Endurhlaða skjalinu \"%s\"?"
#: ../shell/ev-window.c:3551
msgid "If you reload the document, changes will be permanently lost."
msgstr "Ef þú endurhleður skjalið, munu breytingar tapast endanlega."
#: ../shell/ev-window.c:3555
#| msgid "_Reload"
msgid "Reload"
msgstr "Endurhlaða"
#: ../shell/ev-window.c:3562
#, c-format
msgid "Save a copy of document “%s” before closing?"
msgstr "Viltu vista breytingar á skjalinu „%s“ áður en þú lokar því?"
#: ../shell/ev-window.c:3547
#: ../shell/ev-window.c:3564
#| msgid ""
#| "Document contains new or modified annotations. If you don't save a copy, "
#| "changes will be permanently lost."
msgid "If you don’t save a copy, changes will be permanently lost."
msgstr "Ef þú vistar ekki afrit af skjalinu munu breytingarnar tapast."
#: ../shell/ev-window.c:3566
msgid "Close _without Saving"
msgstr "_Loka án þess að vista"
#: ../shell/ev-window.c:3551
#: ../shell/ev-window.c:3570
msgid "Save a _Copy"
msgstr "_Vista afrit"
#: ../shell/ev-window.c:3625
#: ../shell/ev-window.c:3654
#, c-format
msgid "Wait until print job “%s” finishes before closing?"
msgstr "Viltu bíða með að loka þangað til búið er að prenta „%s“?"
......@@ -1317,7 +1352,7 @@ msgstr "Viltu bíða með að loka þangað til búið er að prenta „%s“?"
#. TRANS: the singular form is not really used as n_print_jobs > 1
#. but some languages distinguish between different plurals forms,
#. so the ngettext is needed.
#: ../shell/ev-window.c:3631
#: ../shell/ev-window.c:3660
#, c-format
msgid "There is %d print job active. Wait until print finishes before closing?"
msgid_plural ""
......@@ -1329,31 +1364,31 @@ msgstr[1] ""
"Það eru %d verk sem á eftir að prenta. Viltu bíða með að loka þangað til "
"búið er að prenta þau út?"
#: ../shell/ev-window.c:3646
#: ../shell/ev-window.c:3675
msgid "If you close the window, pending print jobs will not be printed."
msgstr "Það sem er á biðlistanum verður ekki prentað ef þú lokar glugganum."
#: ../shell/ev-window.c:3650
#: ../shell/ev-window.c:3679
msgid "Cancel _print and Close"
msgstr "Hætta við _prentun og loka"
#: ../shell/ev-window.c:3654
#: ../shell/ev-window.c:3683
msgid "Close _after Printing"
msgstr "Loka _eftir prentun"
#: ../shell/ev-window.c:4185
#: ../shell/ev-window.c:4214
msgid "Running in presentation mode"
msgstr "Keyri í kynningarham"
#: ../shell/ev-window.c:5325
#: ../shell/ev-window.c:5363
msgid "Enable caret navigation?"
msgstr "Virkja vafur með innsláttarmerki?"
#: ../shell/ev-window.c:5327
#: ../shell/ev-window.c:5365
msgid "_Enable"
msgstr "_Virkja"
#: ../shell/ev-window.c:5330
#: ../shell/ev-window.c:5368
msgid ""
"Pressing F7 turns the caret navigation on or off. This feature places a "
"moveable cursor in text pages, allowing you to move around and select text "
......@@ -1363,39 +1398,41 @@ msgstr ""
"birtir færanlegt innsláttarmerki á síðum með texta og leyfir þér að vafra um "
"og velja texta með lyklaborðinu. Viltu virka vafur með innsláttarmerki?"
#: ../shell/ev-window.c:5335
msgid "Don't show this message again"
msgstr "Ekki sýna þessi skilaboð aftur"
#: ../shell/ev-window.c:5373
#| msgid "Don't show this message again"
msgid "Don’t show this message again"
msgstr "Ekki birta þessi skilaboð aftur"
#: ../shell/ev-window.c:5850 ../shell/ev-window.c:5866
#: ../shell/ev-window.c:5888 ../shell/ev-window.c:5904
msgid "Unable to launch external application."
msgstr "Það tókst ekki að ræsa ytra forrit."
#: ../shell/ev-window.c:5923
#: ../shell/ev-window.c:5961
msgid "Unable to open external link"
msgstr "Gat ekki opnað ytri tengil"
#: ../shell/ev-window.c:6126
msgid "Couldn't find appropriate format to save image"
#: ../shell/ev-window.c:6164
#| msgid "Couldn't find appropriate format to save image"
msgid "Couldn’t find appropriate format to save image"
msgstr "Fann ekki viðeigandi snið til að vista myndinni á"
#: ../shell/ev-window.c:6158
#: ../shell/ev-window.c:6196
msgid "The image could not be saved."
msgstr "Ekki var hægt að vista myndina"
#: ../shell/ev-window.c:6193
#: ../shell/ev-window.c:6231
msgid "Save Image"
msgstr "Vista mynd"
#: ../shell/ev-window.c:6352
#: ../shell/ev-window.c:6390
msgid "Unable to open attachment"
msgstr "Gat ekki opnað viðhengi"
#: ../shell/ev-window.c:6408
#: ../shell/ev-window.c:6446
msgid "The attachment could not be saved."
msgstr "Ekki var hægt að vista viðhengið"
#: ../shell/ev-window.c:6456
#: ../shell/ev-window.c:6494
msgid "Save Attachment"
msgstr "Vista viðhengi"
......@@ -1743,8 +1780,6 @@ msgid "Moving around the document"
msgstr "Flakka um í skjalinu"
#: ../shell/help-overlay.ui.h:12
#| msgctxt "shortcut window"
#| msgid "Move up/down a page"
msgctxt "shortcut window"
msgid "Move around a page"
msgstr "Flakka um á síðu"
......
This diff is collapsed.
This diff is collapsed.
......@@ -135,9 +135,6 @@ media_player_key_pressed_cb (GDBusProxy *proxy,
{
const char *application, *key;
if (g_strcmp0 (sender_name, SD_NAME) != 0)
return;
if (g_strcmp0 (signal_name, "MediaPlayerKeyPressed") != 0)
return;
......
......@@ -47,6 +47,8 @@ struct _EvSidebarLinksPrivate {
GtkTreeModel *model;
EvDocument *document;
EvDocumentModel *doc_model;
GTree *page_link_tree;
};
enum {
......@@ -152,6 +154,11 @@ ev_sidebar_links_dispose (GObject *object)
sidebar->priv->model = NULL;
}
if (sidebar->priv->page_link_tree) {
g_tree_unref (sidebar->priv->page_link_tree);
sidebar->priv->page_link_tree = NULL;
}
if (sidebar->priv->document) {
g_object_unref (sidebar->priv->document);
sidebar->priv->document = NULL;
......@@ -470,40 +477,20 @@ ev_sidebar_links_new (void)
return ev_sidebar_links;
}
static gboolean
update_page_callback_foreach (GtkTreeModel *model,
GtkTreePath *path,
GtkTreeIter *iter,
gpointer data)
{
EvSidebarLinks *sidebar_links = (data);
EvLink *link;
typedef struct EvSidebarLinkPageSearch {
gint page;
gint best_existing;
} EvSidebarLinkPageSearch;
gtk_tree_model_get (model, iter,
EV_DOCUMENT_LINKS_COLUMN_LINK, &link,
-1);
if (link) {
int current_page;
int dest_page;
EvDocumentLinks *document_links = EV_DOCUMENT_LINKS (sidebar_links->priv->document);
static gint
page_link_tree_search_best_page (gpointer page_ptr, EvSidebarLinkPageSearch* data)
{
gint page = GPOINTER_TO_INT (page_ptr);
dest_page = ev_document_links_get_link_page (document_links, link);
g_object_unref (link);
current_page = ev_document_model_get_page (sidebar_links->priv->doc_model);
if (dest_page == current_page) {
gtk_tree_view_expand_to_path (GTK_TREE_VIEW (sidebar_links->priv->tree_view),
path);
gtk_tree_view_set_cursor (GTK_TREE_VIEW (sidebar_links->priv->tree_view),
path, NULL, FALSE);
return TRUE;
}
}
if (page <= data->page && page > data->best_existing)
data->best_existing = page;
return FALSE;
return data->page - page;
}
static void
......@@ -511,45 +498,35 @@ ev_sidebar_links_set_current_page (EvSidebarLinks *sidebar_links,
gint current_page)
{
GtkTreeSelection *selection;
GtkTreeModel *model;
GtkTreeIter iter;
GtkTreePath *path;
EvSidebarLinkPageSearch search_data;
/* Widget is not currently visible */
if (!gtk_widget_get_mapped (GTK_WIDGET (sidebar_links)))
if (!gtk_widget_is_visible (GTK_WIDGET (sidebar_links)))
return;
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (sidebar_links->priv->tree_view));
if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
EvLink *link;
search_data.page = current_page;
search_data.best_existing = G_MININT;
gtk_tree_model_get (model, &iter,
EV_DOCUMENT_LINKS_COLUMN_LINK, &link,
-1);
if (link) {
gint dest_page;
EvDocumentLinks *document_links = EV_DOCUMENT_LINKS (sidebar_links->priv->document);
path = g_tree_search (sidebar_links->priv->page_link_tree, (GCompareFunc) page_link_tree_search_best_page, &search_data);
/* No direct hit, try a lookup on the best match. */
if (!path)
path = g_tree_lookup (sidebar_links->priv->page_link_tree, GINT_TO_POINTER (search_data.best_existing));
dest_page = ev_document_links_get_link_page (document_links, link);
g_object_unref (link);
if (dest_page == current_page)
return;
}
}
/* Still no hit, give up. */
if (!path)
return;
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (sidebar_links->priv->tree_view));
/* We go through the tree linearly looking for the first page that
* matches. This is pretty inefficient. We can do something neat with
* a GtkTreeModelSort here to make it faster, if it turns out to be
* slow.
*/
g_signal_handler_block (selection, sidebar_links->priv->selection_id);
g_signal_handler_block (sidebar_links->priv->tree_view, sidebar_links->priv->row_activated_id);
gtk_tree_model_foreach (model,
update_page_callback_foreach,
sidebar_links);
gtk_tree_view_expand_to_path (GTK_TREE_VIEW (sidebar_links->priv->tree_view),
path);
gtk_tree_view_set_cursor (GTK_TREE_VIEW (sidebar_links->priv->tree_view),
path, NULL, FALSE);
g_signal_handler_unblock (selection, sidebar_links->priv->selection_id);
g_signal_handler_unblock (sidebar_links->priv->tree_view, sidebar_links->priv->row_activated_id);
}
......@@ -599,6 +576,42 @@ expand_open_links (GtkTreeView *tree_view, GtkTreeModel *model, GtkTreeIter *par
}
}
static gint
page_link_tree_sort (gconstpointer a, gconstpointer b, void *data)
{
return GPOINTER_TO_INT (a) - GPOINTER_TO_INT (b);
}
static gboolean
update_page_link_tree_foreach (GtkTreeModel *model,
GtkTreePath *path,
GtkTreeIter *iter,
gpointer data)
{
EvSidebarLinks *sidebar_links = data;
EvSidebarLinksPrivate *priv = sidebar_links->priv;
EvDocumentLinks *document_links = EV_DOCUMENT_LINKS (priv->document);
EvLink *link;
int page;
gtk_tree_model_get (model, iter,
EV_DOCUMENT_LINKS_COLUMN_LINK, &link,
-1);
if (!link)
return FALSE;
page = ev_document_links_get_link_page (document_links, link);
g_object_unref (link);
/* Only save the first link we find per page. */
if (!g_tree_lookup (priv->page_link_tree, GINT_TO_POINTER (page)))
g_tree_insert (priv->page_link_tree, GINT_TO_POINTER (page), gtk_tree_path_copy (path));
return FALSE;
}
static void
ev_sidebar_links_set_links_model (EvSidebarLinks *sidebar_links,
GtkTreeModel *model)
......@@ -612,6 +625,15 @@ ev_sidebar_links_set_links_model (EvSidebarLinks *sidebar_links,
g_object_unref (priv->model);
priv->model = g_object_ref (model);
/* Rebuild the binary search tree for finding links on pages. */
if (priv->page_link_tree)
g_tree_unref (priv->page_link_tree);
priv->page_link_tree = g_tree_new_full (page_link_tree_sort, NULL, NULL, (GDestroyNotify) gtk_tree_path_free);
gtk_tree_model_foreach (model,
update_page_link_tree_foreach,
sidebar_links);
g_object_notify (G_OBJECT (sidebar_links), "model");
}
......
......@@ -801,10 +801,27 @@ ev_sidebar_thumbnails_device_scale_factor_changed_cb (EvSidebarThumbnails *sideb
ev_sidebar_thumbnails_reload (sidebar_thumbnails);
}
static void
ev_sidebar_thumbnails_row_changed (GtkTreeModel *model,
GtkTreePath *path,
GtkTreeIter *iter,
gpointer data)
{
guint signal_id;
signal_id = GPOINTER_TO_UINT (data);
/* PREVENT GtkIconView "row-changed" handler to be reached, as it will
* perform a full invalidate and relayout of all items, See bug:
* https://bugzilla.gnome.org/show_bug.cgi?id=691448#c9 */
g_signal_stop_emission (model, signal_id, 0);
}
static void
ev_sidebar_thumbnails_init (EvSidebarThumbnails *ev_sidebar_thumbnails)
{
EvSidebarThumbnailsPrivate *priv;
guint signal_id;
priv = ev_sidebar_thumbnails->priv = EV_SIDEBAR_THUMBNAILS_GET_PRIVATE (ev_sidebar_thumbnails);
......@@ -814,6 +831,11 @@ ev_sidebar_thumbnails_init (EvSidebarThumbnails *ev_sidebar_thumbnails)
G_TYPE_BOOLEAN,
EV_TYPE_JOB_THUMBNAIL);
signal_id = g_signal_lookup ("row-changed", GTK_TYPE_TREE_MODEL);
g_signal_connect (GTK_TREE_MODEL (priv->list_store), "row-changed",
G_CALLBACK (ev_sidebar_thumbnails_row_changed),
GUINT_TO_POINTER (signal_id));
priv->swindow = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (priv->swindow),
......@@ -962,6 +984,8 @@ thumbnail_job_completed_callback (EvJobThumbnail *job,
COLUMN_JOB, NULL,
-1);
cairo_surface_destroy (surface);
gtk_widget_queue_draw (priv->icon_view);
}
static void
......
......@@ -101,15 +101,42 @@ delete_temp_file (GFile *file)
g_object_unref (file);
}
static char *
get_target_uri (GFile *file)
{
GFileInfo *info;
char *target;
info = g_file_query_info (file, G_FILE_ATTRIBUTE_STANDARD_TARGET_URI, G_FILE_QUERY_INFO_NONE, NULL, NULL);
if (info == NULL)
return NULL;
target = g_strdup (g_file_info_get_attribute_string (info, G_FILE_ATTRIBUTE_STANDARD_TARGET_URI));
g_object_unref (info);
return target;
}
static char *
get_local_path (GFile *file)
{
if (g_file_has_uri_scheme (file, "trash") != FALSE ||
g_file_has_uri_scheme (file, "recent") != FALSE) {
return get_target_uri (file);
}
return g_file_get_path (file);
}
static EvDocument *
evince_thumbnailer_get_document (GFile *file)
{
EvDocument *document = NULL;
gchar *uri;
gchar *uri, *path;
GFile *tmp_file = NULL;
GError *error = NULL;
if (!g_file_is_native (file)) {
path = get_local_path (file);
if (!path) {
gchar *base_name, *template;
base_name = g_file_get_basename (file);
......@@ -136,7 +163,8 @@ evince_thumbnailer_get_document (GFile *file)
}
uri = g_file_get_uri (tmp_file);
} else {
uri = g_file_get_uri (file);
uri = g_filename_to_uri (path, NULL, NULL);
g_free (path);
}
document = ev_document_factory_get_document (uri, &error);
......