...
 
Commits (43)
=================
Evince 3.28.5
=================
* Handle unexpected page jump while dragging the scroll (Jason Crain)
=================
Evince 3.28.4
=================
Printing:
* Fix messages to show printed file name when it contains '&' in the name (#776, Nelson Benítez León)
libdocument:
* Fix handling of mime-type aiases (#972, Bastien Nocera)
Backends:
* comics: Use official IANA type for .cbr (#972, Frank Dana)
* djvu: Ignore text regions that are missing text (Jason Crain)
UI:
* Fix Dual odd-left state (#603, Nelson Benítez León)
* Fix regression, set to odd-left in dual mode when document has only 2 pages (#669, Nelson Benítez León)
* Fix cursor movement when logical and visual line differs (#889, Colomban Wendling)
* Fix zoom-action to respond touch events (#976, Jason Crain)
=================
Evince 3.28.3
=================
libview:
* fix transformation functions to document coordinates. (#914, Juan Pablo Ugarte)
* Reset `pressed_button` when starting Drag and Drop. (#754, Jason Crain)
* Set minimum for Page Forward/Backward scrolling. (#692, Jason Crain)
libmisc:
* Emit "updated" signal at end of search. (#917, Jason Crain)
* Let the buttons in search bar get focus. (#216, Germán Poo-Caamaño)
Backends:
* Fix URL to report unimplemented features (Germán Poo-Caamaño)
Shell (UI)
* Disconnect bookmarks signal on toolbar dispose. (#920, Jason Crain)
* Fix crash in ev_media_player_keys_grab_keys (Marek Kasik)
* Fix gresource location in recent view. (#670, Germán Poo-Caamaño)
* Fix regression on Ctrl+PageUp/PageDown shortcuts. (#699, Germán Poo-Caamaño)
* Fix regression on F3 shortcut. (#595, Germán Poo-Caamaño)
* Only propagate key press with control on presentation. (#821, Jonas Hahnfeld)
* sidebar-bookmarks: fix sensitiveness of remove bookmark button. (#892, Nelson Benítez León)
* zoom-action: Store priv->popup as a GtkPopover* (#881, Daniel Boles)
* zoom-action: Use Popover.popup() to get animation. (#881, Daniel Boles)
UI translations:
* Update Afrikaans translation (af) (Pieter Schalk Schoeman)
* Update Chinese (China) translation (zh_CN) (Mingcong Bai)
* Update Icelandic translation (is) (Sveinn í Felli)
=================
Evince 3.28.2
=================
UI translations:
* Daniel Șerbănescu (ro)
* Stas Solovey (ru)
Doc translations:
* Anders Jonsson (sv)
Ba
=================
Evince 3.28.0
=================
Translation updates:
* Aman Alam (pa)
* Gianvito Cavasoli (it)
* gogo (hr)
* Tom Tryfonidis (el)
* Милош Поповић (sr@latin)
* Anders Jonsson (sv)
=================
Evince 3.27.92
=================
......
......@@ -63,20 +63,24 @@ djvu_text_page_selection_process_box (DjvuTextPage *page,
{
if (page->results || p == page->start) {
EvRectangle box;
const char *text;
box.x1 = miniexp_to_int (miniexp_nth (1, p));
box.y1 = miniexp_to_int (miniexp_nth (2, p));
box.x2 = miniexp_to_int (miniexp_nth (3, p));
box.y2 = miniexp_to_int (miniexp_nth (4, p));
text = miniexp_to_str (miniexp_nth (5, p));
if (!(delimit & 2) && page->results != NULL) {
EvRectangle *union_box = (EvRectangle *)page->results->data;
if (text != NULL && text[0] != '\0') {
if (!(delimit & 2) && page->results != NULL) {
EvRectangle *union_box = (EvRectangle *)page->results->data;
/* If still on the same line, add box to union */
djvu_text_page_union (union_box, &box);
} else {
/* A new line, a new box */
page->results = g_list_prepend (page->results, ev_rectangle_copy (&box));
/* If still on the same line, add box to union */
djvu_text_page_union (union_box, &box);
} else {
/* A new line, a new box */
page->results = g_list_prepend (page->results, ev_rectangle_copy (&box));
}
}
if (p == page->end)
......@@ -171,13 +175,16 @@ djvu_text_page_limits_process (DjvuTextPage *page,
EvRectangle *rect)
{
EvRectangle current;
const char *text;
current.x1 = miniexp_to_int (miniexp_nth (1, p));
current.y1 = miniexp_to_int (miniexp_nth (2, p));
current.x2 = miniexp_to_int (miniexp_nth (3, p));
current.y2 = miniexp_to_int (miniexp_nth (4, p));
text = miniexp_to_str (miniexp_nth (5, p));
if (current.x2 >= rect->x1 && current.y1 <= rect->y2 &&
current.x1 <= rect->x2 && current.y2 >= rect->y1) {
current.x1 <= rect->x2 && current.y2 >= rect->y1 &&
text != NULL && text[0] != '\0') {
if (page->start == miniexp_nil)
page->start = p;
page->end = p;
......
......@@ -1327,8 +1327,8 @@ ev_link_dest_from_dest (PdfDocument *pdf_document,
if (unimplemented_dest) {
g_warning ("Unimplemented destination: %s, please post a "
"bug report in Evince bugzilla "
"(http://bugzilla.gnome.org) with a testcase.",
"bug report in Evince issue tracker "
"(https://gitlab.gnome.org/GNOME/evince/issues) with a testcase.",
unimplemented_dest);
}
......@@ -1434,7 +1434,7 @@ ev_link_from_action (PdfDocument *pdf_document,
if (unimplemented_action) {
g_warning ("Unimplemented action: %s, please post a bug report "
"in Evince bugzilla (http://bugzilla.gnome.org) "
"in Evince issue tracker (https://gitlab.gnome.org/GNOME/evince/issues) "
"with a testcase.", unimplemented_action);
}
......@@ -2966,8 +2966,8 @@ ev_annot_from_poppler_annot (PopplerAnnot *poppler_annot,
unimplemented_annot);
} else {
g_warning ("Unimplemented annotation: %s, please post a "
"bug report in Evince bugzilla "
"(http://bugzilla.gnome.org) with a testcase.",
"bug report in Evince issue tracker "
"(https://gitlab.gnome.org/GNOME/evince/issues) with a testcase.",
unimplemented_annot);
}
}
......
......@@ -3,8 +3,8 @@
# *****************************************************************************
m4_define([ev_major_version],[3])
m4_define([ev_minor_version],[27])
m4_define([ev_micro_version],[92])
m4_define([ev_minor_version],[28])
m4_define([ev_micro_version],[5])
m4_define([ev_extra_version],[])
m4_define([ev_version],[ev_major_version.ev_minor_version.ev_micro_version()ev_extra_version])
......@@ -573,7 +573,7 @@ AC_ARG_ENABLE(ps,
[AS_HELP_STRING([--disable-ps],
[Disable the PostScript backend])],
[enable_ps=$enableval],
[enable_ps=yes])
[enable_ps=no])
if test "x$enable_ps" = "xyes"; then
if test "x$have_spectre" = "xyes"; then
......@@ -818,7 +818,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-cbt;application/x-ext-cbr;application/x-ext-cbz;application/x-ext-cb7;application/x-ext-cbt;application/vnd.comicbook+zip;application/vnd.comicbook-rar"
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}"
......
This diff is collapsed.
......@@ -58,7 +58,7 @@ get_backend_info_for_mime_type (const gchar *mime_type)
guint i;
for (i = 0; mime_types[i] != NULL; ++i) {
if (g_ascii_strcasecmp (mime_type, mime_types[i]) == 0)
if (g_content_type_is_mime_type (mime_type, mime_types[i]))
return info;
}
}
......
......@@ -129,6 +129,10 @@ static inline gboolean
find_check_refresh_rate (EvJobFind *job,
gint page_rate)
{
/* Always update if this is the last page of the search */
if ((job->current_page + 1) % job->n_pages == job->start_page)
return TRUE;
return ((job->current_page % (gint)((job->n_pages / page_rate) + 1)) == 0);
}
......@@ -588,14 +592,12 @@ ev_search_box_init (EvSearchBox *box)
priv->prev_button = gtk_button_new_from_icon_name ("go-up-symbolic", GTK_ICON_SIZE_MENU);
gtk_widget_set_tooltip_text (priv->prev_button, _("Find previous occurrence of the search string"));
gtk_widget_set_can_focus (priv->prev_button, FALSE);
gtk_widget_set_sensitive (priv->prev_button, FALSE);
gtk_container_add (GTK_CONTAINER (box), priv->prev_button);
gtk_widget_show (priv->prev_button);
priv->next_button = gtk_button_new_from_icon_name ("go-down-symbolic", GTK_ICON_SIZE_MENU);
gtk_widget_set_tooltip_text (priv->next_button, _("Find next occurrence of the search string"));
gtk_widget_set_can_focus (priv->next_button, FALSE);
gtk_widget_set_sensitive (priv->next_button, FALSE);
gtk_container_add (GTK_CONTAINER (box), priv->next_button);
gtk_widget_show (priv->next_button);
......
......@@ -1163,7 +1163,7 @@ ev_view_presentation_key_press_event (GtkWidget *widget,
if (pview->state == EV_PRESENTATION_END)
return gtk_bindings_activate_event (G_OBJECT (widget), event);
if (event->state != 0)
if (event->state & GDK_CONTROL_MASK)
return gtk_bindings_activate_event (G_OBJECT (widget), event);
switch (event->keyval) {
......
......@@ -47,6 +47,7 @@ typedef struct {
guint release_timeout_id;
GdkPoint buffer[DRAG_HISTORY];
GdkPoint momentum;
gboolean in_notify;
} DragInfo;
/* Autoscrolling */
......
......@@ -107,6 +107,7 @@ typedef struct {
#define ZOOM_OUT_FACTOR (1.0/ZOOM_IN_FACTOR)
#define SCROLL_TIME 150
#define SCROLL_PAGE_THRESHOLD 0.7
#define DEFAULT_PIXBUF_CACHE_SIZE 52428800 /* 50MB */
......@@ -951,6 +952,10 @@ compute_scroll_increment (EvView *view,
if (cairo_region_num_rectangles (sel_region) > 0) {
cairo_region_get_rectangle (sel_region, 0, &rect);
fraction = 1 - (rect.height / gtk_adjustment_get_page_size (adjustment));
/* jump the full page height if the line is too large a
* fraction of the page */
if (fraction < SCROLL_PAGE_THRESHOLD)
fraction = 1.0;
}
cairo_region_destroy (sel_region);
}
......@@ -1373,7 +1378,7 @@ _ev_view_transform_view_point_to_doc_point (EvView *view,
double *doc_point_y)
{
*doc_point_x = MAX ((double) (view_point->x - page_area->x - border->left) / view->scale, 0);
*doc_point_y = MAX ((double) (view_point->y - page_area->y - border->right) / view->scale, 0);
*doc_point_y = MAX ((double) (view_point->y - page_area->y - border->top) / view->scale, 0);
}
void
......@@ -1384,7 +1389,7 @@ _ev_view_transform_view_rect_to_doc_rect (EvView *view,
EvRectangle *doc_rect)
{
doc_rect->x1 = MAX ((double) (view_rect->x - page_area->x - border->left) / view->scale, 0);
doc_rect->y1 = MAX ((double) (view_rect->y - page_area->y - border->right) / view->scale, 0);
doc_rect->y1 = MAX ((double) (view_rect->y - page_area->y - border->top) / view->scale, 0);
doc_rect->x2 = doc_rect->x1 + (double) view_rect->width / view->scale;
doc_rect->y2 = doc_rect->y1 + (double) view_rect->height / view->scale;
}
......@@ -5393,6 +5398,7 @@ ev_view_motion_notify_event (GtkWidget *widget,
1, (GdkEvent *)event);
view->selection_info.in_drag = FALSE;
view->pressed_button = -1;
gtk_target_list_unref (target_list);
......@@ -5413,6 +5419,7 @@ ev_view_motion_notify_event (GtkWidget *widget,
1, (GdkEvent *)event);
view->image_dnd_info.in_drag = FALSE;
view->pressed_button = -1;
gtk_target_list_unref (target_list);
......@@ -5608,6 +5615,11 @@ ev_view_motion_notify_event (GtkWidget *widget,
dvadj_value = gtk_adjustment_get_page_size (view->vadjustment) *
(gdouble)dy / allocation.height;
/* We will update the drag event's start position if
* the adjustment value is changed, but only if the
* change was not caused by this function. */
view->drag_info.in_notify = TRUE;
/* clamp scrolling to visible area */
gtk_adjustment_set_value (view->hadjustment,
MIN (view->drag_info.hadj - dhadj_value,
......@@ -5618,6 +5630,8 @@ ev_view_motion_notify_event (GtkWidget *widget,
gtk_adjustment_get_upper (view->vadjustment) -
gtk_adjustment_get_page_size (view->vadjustment)));
view->drag_info.in_notify = FALSE;
return TRUE;
}
......@@ -6201,6 +6215,7 @@ ev_view_move_cursor (EvView *view,
gint prev_page;
cairo_region_t *damage_region;
gboolean clear_selections = FALSE;
const gboolean forward = count >= 0;
if (!view->caret_enabled || view->rotation != 0)
return FALSE;
......@@ -6276,9 +6291,18 @@ ev_view_move_cursor (EvView *view,
return TRUE;
if (step == GTK_MOVEMENT_DISPLAY_LINES) {
const gint prev_cursor_offset = view->cursor_offset;
position_caret_cursor_at_location (view,
MAX (rect.x, view->cursor_line_offset),
rect.y + (rect.height / 2));
/* Make sure we didn't move the cursor in the wrong direction
* in case the visual order isn't the same as the logical one,
* in order to avoid cursor movement loops */
if ((forward && prev_cursor_offset > view->cursor_offset) ||
(!forward && prev_cursor_offset < view->cursor_offset)) {
view->cursor_offset = prev_cursor_offset;
}
if (!clear_selections &&
prev_offset == view->cursor_offset && prev_page == view->cursor_page) {
gtk_widget_error_bell (GTK_WIDGET (view));
......@@ -7804,6 +7828,13 @@ on_adjustment_value_changed (GtkAdjustment *adjustment,
if (!gtk_widget_get_realized (widget))
return;
/* If the adjustment value is set during a drag event, update the drag
* start position so it can continue from the new location. */
if (view->drag_info.in_drag && !view->drag_info.in_notify) {
view->drag_info.hadj += gtk_adjustment_get_value (view->hadjustment) - view->scroll_x;
view->drag_info.vadj += gtk_adjustment_get_value (view->vadjustment) - view->scroll_y;
}
if (view->hadjustment) {
value = (gint) gtk_adjustment_get_value (view->hadjustment);
dx = view->scroll_x - value;
......@@ -8191,7 +8222,10 @@ ev_view_dual_odd_left_changed_cb (EvDocumentModel *model,
{
view->dual_even_left = !ev_document_model_get_dual_page_odd_pages_left (model);
view->pending_scroll = SCROLL_TO_PAGE_POSITION;
gtk_widget_queue_resize (GTK_WIDGET (view));
if (ev_document_model_get_dual_page (model))
/* odd_left may be set when not in dual mode,
queue_resize is not needed in that case */
gtk_widget_queue_resize (GTK_WIDGET (view));
}
static void
......
This diff is collapsed.
This diff is collapsed.
......@@ -8,8 +8,8 @@ msgstr ""
"Project-Id-Version: evince\n"
"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?"
"product=evince&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2018-02-10 00:12+0000\n"
"PO-Revision-Date: 2018-02-17 16:33+0100\n"
"POT-Creation-Date: 2018-03-06 02:27+0000\n"
"PO-Revision-Date: 2018-03-07 16:01+0100\n"
"Last-Translator: gogo <trebelnik2@gmail.com>\n"
"Language-Team: Croatian <hr@li.org>\n"
"Language: hr\n"
......@@ -1339,35 +1339,35 @@ msgstr ""
msgid "Don’t show this message again"
msgstr "Ne prikazuj više ovu poruku"
#: ../shell/ev-window.c:5939 ../shell/ev-window.c:5955
#: ../shell/ev-window.c:5942 ../shell/ev-window.c:5958
msgid "Unable to launch external application."
msgstr "Pokretanje vanjske aplikacije nije moguće."
#: ../shell/ev-window.c:6016
#: ../shell/ev-window.c:6019
msgid "Unable to open external link"
msgstr "Nemoguće otvaranje vanjske poveznice"
#: ../shell/ev-window.c:6219
#: ../shell/ev-window.c:6222
msgid "Couldn’t find appropriate format to save image"
msgstr "Nemoguć pronalazak odgovarajućeg formata za spremanje slike"
#: ../shell/ev-window.c:6251
#: ../shell/ev-window.c:6254
msgid "The image could not be saved."
msgstr "Slika ne može biti spremljena."
#: ../shell/ev-window.c:6286
#: ../shell/ev-window.c:6289
msgid "Save Image"
msgstr "Spremi sliku"
#: ../shell/ev-window.c:6445
#: ../shell/ev-window.c:6448
msgid "Unable to open attachment"
msgstr "Nemoguće otvaranje privitka"
#: ../shell/ev-window.c:6501
#: ../shell/ev-window.c:6504
msgid "The attachment could not be saved."
msgstr "Privitak ne može biti spremljen."
#: ../shell/ev-window.c:6549
#: ../shell/ev-window.c:6552
msgid "Save Attachment"
msgstr "Spremi privitak"
......@@ -1497,7 +1497,7 @@ msgstr "_Prečaci tipkovnice"
#: ../shell/evince-menus.ui.h:3
msgid "_Help"
msgstr "_Pomoć"
msgstr "_Priručnik"
#: ../shell/evince-menus.ui.h:4
msgid "_About"
......@@ -1802,7 +1802,7 @@ msgstr "Prilagodi širinu"
#: ../shell/help-overlay.ui.h:29
msgctxt "shortcut window"
msgid "Automatic zoom"
msgstr "_Automatsko uvećanje"
msgstr "Automatsko uvećanje"
#: ../shell/help-overlay.ui.h:30
msgctxt "shortcut window"
......
......@@ -2,14 +2,13 @@
# 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, 2017.
# Sveinn í Felli <sv1@fellsnet.is>, 2015, 2016, 2017, 2018.
msgid ""
msgstr ""
"Project-Id-Version: evince.master\n"
"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?"
"product=evince&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2017-11-18 08:01+0000\n"
"PO-Revision-Date: 2017-12-06 15:01+0000\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/evince/issues\n"
"POT-Creation-Date: 2018-07-06 21:07+0000\n"
"PO-Revision-Date: 2018-08-17 14:00+0000\n"
"Last-Translator: Sveinn í Felli <sv1@fellsnet.is>\n"
"Language-Team: Icelandic <translation-team-is@lists.sourceforge.net>\n"
"Language: is\n"
......@@ -19,25 +18,25 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n%10!=1 || n%100==11);\n"
"X-Generator: Lokalize 1.5\n"
#: ../backend/comics/comics-document.c:99
#: ../backend/comics/comics-document.c:121
#: ../backend/comics/comics-document.c:118
#: ../backend/comics/comics-document.c:140
msgid "File is corrupted"
msgstr "Skráin er skemmd"
#: ../backend/comics/comics-document.c:151
#: ../backend/comics/comics-document.c:176
msgid "Archive is encrypted"
msgstr "Safnskrá er dulrituð"
#: ../backend/comics/comics-document.c:156
#: ../backend/comics/comics-document.c:181
msgid "No files in archive"
msgstr "Engar skrár eru í safnskránni"
#: ../backend/comics/comics-document.c:192
#: ../backend/comics/comics-document.c:217
#, c-format
msgid "Not a comic book MIME type: %s"
msgstr "Ekki MIME gerð teiknimyndasögu: %s"
#: ../backend/comics/comics-document.c:199
#: ../backend/comics/comics-document.c:224
msgid ""
"libarchive lacks support for this comic book’s compression, please contact "
"your distributor"
......@@ -45,7 +44,7 @@ msgstr ""
"libarchive vantar stuðning við þessa þjöppun myndasöguskráa (comic book), "
"endilega hafðu samband við þá sem sjá um dreifinguna þína"
#: ../backend/comics/comics-document.c:239
#: ../backend/comics/comics-document.c:264
msgid "Can not get local path for archive"
msgstr "Gat ekki fengið staðværa slóð að safnskrá"
......@@ -168,8 +167,8 @@ msgstr "Ekkert heiti"
#. Author: None
#. Keywords: None
#.
#: ../backend/pdf/ev-poppler.cc:1171 ../libview/ev-print-operation.c:1965
#: ../properties/ev-properties-view.c:196
#: ../backend/pdf/ev-poppler.cc:1171 ../libview/ev-print-operation.c:1975
#: ../properties/ev-properties-view.c:231
msgid "None"
msgstr "Ekkert"
......@@ -329,7 +328,6 @@ msgid "View multi-page documents"
msgstr "Skoða margsíðna skjöl"
#: ../data/evince.desktop.in.in.h:3
#| msgid "pdf;ps;postscript;dvi;xps;djvu;tiff;document;presentation;"
msgid "pdf;ps;postscript;dvi;xps;djvu;tiff;document;presentation;viewer;"
msgstr "pdf;ps;postscript;dvi;xps;djvu;tiff;skjal;kynning;skoðari;"
......@@ -444,8 +442,8 @@ msgid "of %d"
msgstr "af %d"
#: ../libmisc/ev-page-action-widget.c:185 ../shell/ev-history.c:426
#: ../shell/ev-sidebar-bookmarks.c:306 ../shell/ev-window.c:907
#: ../shell/ev-window.c:4707
#: ../shell/ev-sidebar-bookmarks.c:310 ../shell/ev-window.c:910
#: ../shell/ev-window.c:4709
#, c-format
msgid "Page %s"
msgstr "Síða %s"
......@@ -454,23 +452,23 @@ msgstr "Síða %s"
msgid "Not found, click to change search options"
msgstr "Fannst ekki, smelltu til að breyta leitarskilyrðum"
#: ../libmisc/ev-search-box.c:180 ../libmisc/ev-search-box.c:236
#: ../libmisc/ev-search-box.c:184 ../libmisc/ev-search-box.c:240
msgid "Search options"
msgstr "Leitarvalkostir"
#: ../libmisc/ev-search-box.c:310
#: ../libmisc/ev-search-box.c:314
msgid "_Whole Words Only"
msgstr "Aðeins _heil orð"
#: ../libmisc/ev-search-box.c:323
#: ../libmisc/ev-search-box.c:327
msgid "C_ase Sensitive"
msgstr "_Næmt fyrir há og lágstöfum"
#: ../libmisc/ev-search-box.c:590
#: ../libmisc/ev-search-box.c:594
msgid "Find previous occurrence of the search string"
msgstr "Leita afturábak að næsta tilviki leitarstrengs"
#: ../libmisc/ev-search-box.c:597
#: ../libmisc/ev-search-box.c:600
msgid "Find next occurrence of the search string"
msgstr "Leita áfram að næsta tilviki leitarstrengs"
......@@ -535,19 +533,19 @@ msgstr "Prentsviðið sem þú valdir inniheldur engar blaðsíður"
msgid "Print"
msgstr "Prenta"
#: ../libview/ev-print-operation.c:1959
#: ../libview/ev-print-operation.c:1969
msgid "Page Scaling:"
msgstr "Kvörðun síðu:"
#: ../libview/ev-print-operation.c:1966
#: ../libview/ev-print-operation.c:1976
msgid "Shrink to Printable Area"
msgstr "Minnka að prentanlegu svæði"
#: ../libview/ev-print-operation.c:1967
#: ../libview/ev-print-operation.c:1977
msgid "Fit to Printable Area"
msgstr "Laga að prentanlegu svæði"
#: ../libview/ev-print-operation.c:1970
#: ../libview/ev-print-operation.c:1980
msgid ""
"Scale document pages to fit the selected printer page. Select from one of "
"the following:\n"
......@@ -572,11 +570,11 @@ msgstr ""
"• \"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
#: ../libview/ev-print-operation.c:1992
msgid "Auto Rotate and Center"
msgstr "Snúa og miðja sjálfkrafa"
#: ../libview/ev-print-operation.c:1985
#: ../libview/ev-print-operation.c:1995
msgid ""
"Rotate printer page orientation of each page to match orientation of each "
"document page. Document pages will be centered within the printer page."
......@@ -584,11 +582,11 @@ msgstr ""
"Snúa stefnu prentaðra síðna til samræmis við stefnu síðna í skjalinu. "
"Síðurnar í skjalinu verða miðjaðar á útprentuðum síðum."
#: ../libview/ev-print-operation.c:1990
#: ../libview/ev-print-operation.c:2000
msgid "Select page size using document page size"
msgstr "Nota blaðastærð skjalsins til að velja blaðastærð"
#: ../libview/ev-print-operation.c:1992
#: ../libview/ev-print-operation.c:2002
msgid ""
"When enabled, each page will be printed on the same size paper as the "
"document page."
......@@ -596,7 +594,7 @@ msgstr ""
"Þegar þetta er virkjað, þá mun hver síða verða prentuð á sömu stærð af "
"pappír eins og síða skjalsins segir til um."
#: ../libview/ev-print-operation.c:2092
#: ../libview/ev-print-operation.c:2102
msgid "Page Handling"
msgstr "Meðhöndlun blaðsíðna"
......@@ -688,7 +686,7 @@ msgstr "SKRÁ"
msgid "GNOME Document Previewer"
msgstr "GNOME forskoðun skjala"
#: ../previewer/ev-previewer-window.c:91 ../shell/ev-window.c:3290
#: ../previewer/ev-previewer-window.c:91 ../shell/ev-window.c:3293
msgid "Failed to print document"
msgstr "Gat ekki prentað skjalið"
......@@ -725,7 +723,7 @@ msgstr "Síða"
msgid "Select Page"
msgstr "Veldu síðu"
#: ../properties/ev-properties-main.c:116
#: ../properties/ev-properties-main.c:117
msgid "Document"
msgstr "Skjal"
......@@ -796,30 +794,30 @@ msgstr "Stærð:"
#. * Do *not* translate it to "predefinito:mm", if it
#. * it isn't default:mm or default:inch it will not work
#.
#: ../properties/ev-properties-view.c:233
#: ../properties/ev-properties-view.c:268
msgid "default:mm"
msgstr "default:mm"
#: ../properties/ev-properties-view.c:277
#: ../properties/ev-properties-view.c:312
#, c-format
msgid "%.0f × %.0f mm"
msgstr "%.0f × %.0f mm"
#: ../properties/ev-properties-view.c:281
#: ../properties/ev-properties-view.c:316
#, c-format
msgid "%.2f × %.2f inch"
msgstr "%.2f × %.2f tommur"
#. Note to translators: first placeholder is the paper name (eg.
#. * A4), second placeholder is the paper size (eg. 297x210 mm)
#: ../properties/ev-properties-view.c:305
#: ../properties/ev-properties-view.c:340
#, c-format
msgid "%s, Portrait (%s)"
msgstr "%s, lóðrétt (%s)"
#. Note to translators: first placeholder is the paper name (eg.
#. * A4), second placeholder is the paper size (eg. 297x210 mm)
#: ../properties/ev-properties-view.c:312
#: ../properties/ev-properties-view.c:347
#, c-format
msgid "%s, Landscape (%s)"
msgstr "%s, lárétt (%s)"
......@@ -925,7 +923,6 @@ msgid "Evince"
msgstr "Evince"
#: ../shell/ev-application.c:1009
#| msgid "© 1996–2014 The Evince authors"
msgid "© 1996–2017 The Evince authors"
msgstr "© 1996–2017 - Höfundar Evince"
......@@ -1047,27 +1044,29 @@ msgstr "Glósur"
msgid "Attachments"
msgstr "Viðhengi"
#: ../shell/ev-sidebar-bookmarks.c:148
#: ../shell/ev-sidebar-bookmarks.c:150
msgid "_Open Bookmark"
msgstr "_Opna bókamerki"
#: ../shell/ev-sidebar-bookmarks.c:150
#: ../shell/ev-sidebar-bookmarks.c:152
msgid "_Rename Bookmark"
msgstr "_Endurnefna bókamerki"
#: ../shell/ev-sidebar-bookmarks.c:152
#: ../shell/ev-sidebar-bookmarks.c:154
msgid "_Remove Bookmark"
msgstr "_Fjarlægja bókamerki"
#: ../shell/ev-sidebar-bookmarks.c:467
msgid "Add"
msgstr "Bæta við"
#: ../shell/ev-sidebar-bookmarks.c:473 ../shell/ev-sidebar-bookmarks.c:474
#| msgid "_Add Bookmark"
msgid "Add bookmark"
msgstr "Bæta við bókamerki"
#: ../shell/ev-sidebar-bookmarks.c:474
msgid "Remove"
msgstr "Fjarlægja"
#: ../shell/ev-sidebar-bookmarks.c:482 ../shell/ev-sidebar-bookmarks.c:483
#| msgid "_Remove Bookmark"
msgid "Remove bookmark"
msgstr "Fjarlægja bókamerki"
#: ../shell/ev-sidebar-bookmarks.c:590 ../shell/ev-toolbar.c:161
#: ../shell/ev-sidebar-bookmarks.c:599 ../shell/ev-toolbar.c:161
msgid "Bookmarks"
msgstr "Bókamerki"
......@@ -1129,141 +1128,140 @@ msgstr "Setja aðdráttargildi"
msgid "Supported Image Files"
msgstr "Studdar myndaskrár"
#: ../shell/ev-window.c:1541
#: ../shell/ev-window.c:1544
msgid "The document contains no pages"
msgstr "Þetta skjal inniheldur engar blaðsíður"
#: ../shell/ev-window.c:1544
#: ../shell/ev-window.c:1547
msgid "The document contains only empty pages"
msgstr "Þetta skjal inniheldur eingöngu tómar blaðsíður"
#: ../shell/ev-window.c:1758 ../shell/ev-window.c:1924
#: ../shell/ev-window.c:1761 ../shell/ev-window.c:1927
#, c-format
msgid "Unable to open document “%s”."
msgstr "Gat ekki opnað skjalið \"%s\"."
#: ../shell/ev-window.c:1888
#: ../shell/ev-window.c:1891
#, c-format
msgid "Loading document from “%s”"
msgstr "Hleð inn skjali frá \"%s\""
#: ../shell/ev-window.c:2039 ../shell/ev-window.c:2367
#: ../shell/ev-window.c:2042 ../shell/ev-window.c:2370
#, c-format
msgid "Downloading document (%d%%)"
msgstr "Sæki skjalið (%d%%)"
#: ../shell/ev-window.c:2072
#: ../shell/ev-window.c:2075
msgid "Failed to load remote file."
msgstr "Gat hlaðið inn fjartengdri skrá."
#: ../shell/ev-window.c:2311
#: ../shell/ev-window.c:2314
#, c-format
msgid "Reloading document from %s"
msgstr "Endurlesa skjalið aftur frá %s"
#: ../shell/ev-window.c:2343
#: ../shell/ev-window.c:2346
msgid "Failed to reload document."
msgstr "Það tókst ekki að endurhlaða skjalinu inn."
#: ../shell/ev-window.c:2559
#: ../shell/ev-window.c:2562
msgid "Open Document"
msgstr "Opna skjal"
#: ../shell/ev-window.c:2632
#: ../shell/ev-window.c:2635
#, c-format
msgid "Saving document to %s"
msgstr "Vista skjalinu í %s"
#: ../shell/ev-window.c:2635
#: ../shell/ev-window.c:2638
#, c-format
msgid "Saving attachment to %s"
msgstr "Vista viðhengi í %s"
#: ../shell/ev-window.c:2638
#: ../shell/ev-window.c:2641
#, c-format
msgid "Saving image to %s"
msgstr "Vista mynd í %s"
#: ../shell/ev-window.c:2682 ../shell/ev-window.c:2782
#: ../shell/ev-window.c:2685 ../shell/ev-window.c:2785
#, c-format
msgid "The file could not be saved as “%s”."
msgstr "Gat ekki vistað skrána sem \"%s\"."
#: ../shell/ev-window.c:2713
#: ../shell/ev-window.c:2716
#, c-format
msgid "Uploading document (%d%%)"
msgstr "Hleð skjalinu upp (%d%%)"
#: ../shell/ev-window.c:2717
#: ../shell/ev-window.c:2720
#, c-format
msgid "Uploading attachment (%d%%)"
msgstr "Hleð viðhengi upp (%d%%)"
#: ../shell/ev-window.c:2721
#: ../shell/ev-window.c:2724
#, c-format
msgid "Uploading image (%d%%)"
msgstr "Hleð mynd upp (%d%%)"
#: ../shell/ev-window.c:2834
#| msgid "_Save Image As…"
#: ../shell/ev-window.c:2837
msgid "Save As…"
msgstr "Vista sem…"
#: ../shell/ev-window.c:2929
#: ../shell/ev-window.c:2932
msgid "Could not send current document"
msgstr "Gat ekki sent þetta skjal"
#: ../shell/ev-window.c:3234
#: ../shell/ev-window.c:3237
#, 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:3347
#: ../shell/ev-window.c:3350
#, c-format
msgid "Printing job “%s”"
msgstr "Prenta verk „%s“"
#: ../shell/ev-window.c:3562
#: ../shell/ev-window.c:3565
msgid "Document contains form fields that have been filled out. "
msgstr "Skjalið inniheldur reiti sem þú hefur fyllt út."
#: ../shell/ev-window.c:3565
#: ../shell/ev-window.c:3568
msgid "Document contains new or modified annotations. "
msgstr "Skjalið inniheldur engar nýjar eða breyttar glósur. "
#: ../shell/ev-window.c:3577
#: ../shell/ev-window.c:3580
#, c-format
msgid "Reload document “%s”?"
msgstr "Endurhlaða skjalinu \"%s\"?"
#: ../shell/ev-window.c:3579
#: ../shell/ev-window.c:3582
msgid "If you reload the document, changes will be permanently lost."
msgstr "Ef þú endurhleður skjalið, munu breytingar tapast endanlega."
#: ../shell/ev-window.c:3583
#: ../shell/ev-window.c:3586
msgid "Reload"
msgstr "Endurhlaða"
#: ../shell/ev-window.c:3590
#: ../shell/ev-window.c:3593
#, 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:3592
#: ../shell/ev-window.c:3595
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:3594
#: ../shell/ev-window.c:3597
msgid "Close _without Saving"
msgstr "_Loka án þess að vista"
#: ../shell/ev-window.c:3598
#: ../shell/ev-window.c:3601
msgid "Save a _Copy"
msgstr "_Vista afrit"
#: ../shell/ev-window.c:3682
#: ../shell/ev-window.c:3685
#, 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“?"
......@@ -1271,7 +1269,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:3688
#: ../shell/ev-window.c:3691
#, c-format
msgid "There is %d print job active. Wait until print finishes before closing?"
msgid_plural ""
......@@ -1283,31 +1281,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:3703
#: ../shell/ev-window.c:3706
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:3707
#: ../shell/ev-window.c:3710
msgid "Cancel _print and Close"
msgstr "Hætta við _prentun og loka"
#: ../shell/ev-window.c:3711
#: ../shell/ev-window.c:3714
msgid "Close _after Printing"
msgstr "Loka _eftir prentun"
#: ../shell/ev-window.c:4242
#: ../shell/ev-window.c:4244
msgid "Running in presentation mode"
msgstr "Keyri í kynningarham"
#: ../shell/ev-window.c:5391
#: ../shell/ev-window.c:5393
msgid "Enable caret navigation?"
msgstr "Virkja vafur með innsláttarmerki?"
#: ../shell/ev-window.c:5393
#: ../shell/ev-window.c:5395
msgid "_Enable"
msgstr "_Virkja"
#: ../shell/ev-window.c:5396
#: ../shell/ev-window.c:5398
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 "
......@@ -1317,39 +1315,39 @@ 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:5401
#: ../shell/ev-window.c:5403
msgid "Don’t show this message again"
msgstr "Ekki birta þessi skilaboð aftur"
#: ../shell/ev-window.c:5916 ../shell/ev-window.c:5932
#: ../shell/ev-window.c:5942 ../shell/ev-window.c:5958
msgid "Unable to launch external application."
msgstr "Það tókst ekki að ræsa ytra forrit."
#: ../shell/ev-window.c:5989
#: ../shell/ev-window.c:6019
msgid "Unable to open external link"
msgstr "Gat ekki opnað ytri tengil"
#: ../shell/ev-window.c:6192
#: ../shell/ev-window.c:6222
msgid "Couldn’t find appropriate format to save image"
msgstr "Fann ekki viðeigandi snið til að vista myndinni á"
#: ../shell/ev-window.c:6224
#: ../shell/ev-window.c:6254
msgid "The image could not be saved."
msgstr "Ekki var hægt að vista myndina"
#: ../shell/ev-window.c:6259
#: ../shell/ev-window.c:6289
msgid "Save Image"
msgstr "Vista mynd"
#: ../shell/ev-window.c:6418
#: ../shell/ev-window.c:6448
msgid "Unable to open attachment"
msgstr "Gat ekki opnað viðhengi"
#: ../shell/ev-window.c:6474
#: ../shell/ev-window.c:6504
msgid "The attachment could not be saved."
msgstr "Ekki var hægt að vista viðhengið"
#: ../shell/ev-window.c:6522
#: ../shell/ev-window.c:6552
msgid "Save Attachment"
msgstr "Vista viðhengi"
......@@ -1558,7 +1556,6 @@ msgid "Op_en a Copy"
msgstr "Opna _afrit"
#: ../shell/evince-menus.ui.h:23
#| msgid "_Save Image As…"
msgid "_Save As…"
msgstr "Vista _sem..."
......@@ -1773,19 +1770,16 @@ msgid "Zoom out"
msgstr "Renna frá"
#: ../shell/help-overlay.ui.h:27
#| msgid "Fit Pa_ge"
msgctxt "shortcut window"
msgid "Fit page"
msgstr "Aðlaga á síðu"
#: ../shell/help-overlay.ui.h:28
#| msgid "Fit _Width"
msgctxt "shortcut window"
msgid "Fit width"
msgstr "Aðlaga að breidd"
#: ../shell/help-overlay.ui.h:29
#| msgid "_Automatic"
msgctxt "shortcut window"
msgid "Automatic zoom"
msgstr "Sjálfvirkur aðdráttur"
......@@ -1821,6 +1815,12 @@ msgstr ""
"Það styður eftirfarandi skjalasnið: PDF, PS, EPS, XPS, DjVu, TIFF, DVI (með "
"SyncTeX), og myndasögusafnskrár (Comicbook) eins og (CBR, CBT, CBZ, CB7)."
#~ msgid "Add"
#~ msgstr "Bæta við"
#~ msgid "Remove"
#~ msgstr "Fjarlægja"
#~ msgid ""
#~ "Evince is free software; you can redistribute it and/or modify it under "
#~ "the terms of the GNU General Public License as published by the Free "
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -1039,13 +1039,13 @@ ev_application_startup (GApplication *gapplication)
"win.close", "<Ctrl>W", NULL,
"win.escape", "Escape", NULL,
"win.find", "<Ctrl>F", "slash", NULL,
"win.find-next", "<Ctrl>G", NULL,
"win.find-previous", "<Ctrl><Shift>G", NULL,
"win.find-next", "<Ctrl>G", "F3", NULL,
"win.find-previous", "<Ctrl><Shift>G", "<Shift>F3", NULL,
"win.select-page", "<Ctrl>L", NULL,
"win.go-backwards", "<Shift>Page_Up", NULL,
"win.go-forward", "<Shift>Page_Down", NULL,
"win.go-next-page", "n", NULL,
"win.go-previous-page", "p", NULL,
"win.go-next-page", "n", "<Ctrl>Page_Down", NULL,
"win.go-previous-page", "p", "<Ctrl>Page_Up", NULL,
"win.go-back-history", "<alt>P", "Back", NULL,
"win.go-forward-history", "<alt>N", "Forward", NULL,
"win.sizing-mode::fit-page", "f", NULL,
......
......@@ -41,8 +41,9 @@ struct _EvMediaPlayerKeys
{
GObject parent;
GDBusProxy *proxy;
gboolean has_name_owner;
GDBusProxy *proxy;
gboolean has_name_owner;
GCancellable *cancellable;
};
struct _EvMediaPlayerKeysClass
......@@ -163,7 +164,7 @@ mediakeys_service_appeared_cb (GObject *source_object,
GAsyncResult *res,
gpointer user_data)
{
EvMediaPlayerKeys *keys = EV_MEDIA_PLAYER_KEYS (user_data);
EvMediaPlayerKeys *keys;
GDBusProxy *proxy;
proxy = g_dbus_proxy_new_for_bus_finish (res, NULL);
......@@ -172,6 +173,7 @@ mediakeys_service_appeared_cb (GObject *source_object,
return;
}
keys = EV_MEDIA_PLAYER_KEYS (user_data);
g_signal_connect (proxy, "g-signal",
G_CALLBACK (media_player_key_pressed_cb),
keys);
......@@ -187,13 +189,15 @@ mediakeys_service_appeared_cb (GObject *source_object,
static void
ev_media_player_keys_init (EvMediaPlayerKeys *keys)
{
keys->cancellable = g_cancellable_new ();
g_dbus_proxy_new_for_bus (G_BUS_TYPE_SESSION,
G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES,
NULL,
SD_NAME,
SD_OBJECT_PATH,
SD_INTERFACE,
NULL,
keys->cancellable,
mediakeys_service_appeared_cb,
keys);
}
......@@ -212,6 +216,9 @@ ev_media_player_keys_finalize (GObject *object)
{
EvMediaPlayerKeys *keys = EV_MEDIA_PLAYER_KEYS (object);
g_cancellable_cancel (keys->cancellable);
g_object_unref (keys->cancellable);
if (keys->proxy != NULL) {
ev_media_player_keys_release_keys (keys);
g_object_unref (keys->proxy);
......
......@@ -323,11 +323,13 @@ ev_message_area_set_text (EvMessageArea *area,
g_return_if_fail (EV_IS_MESSAGE_AREA (area));
if (str) {
gchar *msg;
gchar *msg, *escaped;
msg = g_strdup_printf ("<b>%s</b>", str);
escaped = g_markup_escape_text (str, -1);
msg = g_strdup_printf ("<b>%s</b>", escaped);
gtk_label_set_markup (GTK_LABEL (area->priv->label), msg);
g_free (msg);
g_free (escaped);
} else {
gtk_label_set_markup (GTK_LABEL (area->priv->label), NULL);
}
......
......@@ -308,7 +308,7 @@ add_thumbnail_to_model (GetDocumentInfoAsyncData *data,
border.bottom = 6;
surface = gd_embed_surface_in_frame (thumbnail,
"resource:///org/gnome/evince/shell/ui/thumbnail-frame.png",
"resource:///org/gnome/evince/ui/thumbnail-frame.png",
&border, &border);
path = gtk_tree_row_reference_get_path (data->row);
......
......@@ -142,6 +142,8 @@ ev_bookmarks_popup_cmd_remove_bookmark (GtkAction *action,
bm.page = page;
bm.title = NULL;
ev_bookmarks_delete (priv->bookmarks, &bm);
if (gtk_widget_get_sensitive (priv->del_button))
gtk_widget_set_sensitive (priv->del_button, FALSE);
}
static const GtkActionEntry popup_entries[] = {
......@@ -244,6 +246,8 @@ ev_sidebar_bookmarks_del_clicked (GtkWidget *button,
bm.page = page;
bm.title = NULL;
ev_bookmarks_delete (priv->bookmarks, &bm);
if (gtk_widget_get_sensitive (priv->del_button))
gtk_widget_set_sensitive (priv->del_button, FALSE);
}
static void
......@@ -341,6 +345,8 @@ ev_sidebar_bookmarks_popup_menu_show (EvSidebarBookmarks *sidebar_bookmarks,
g_signal_handlers_unblock_by_func (selection,
ev_sidebar_bookmarks_selection_changed,
sidebar_bookmarks);
if (!gtk_widget_get_sensitive (priv->del_button))
gtk_widget_set_sensitive (priv->del_button, TRUE);
gtk_tree_path_free (path);
}
......
......@@ -277,6 +277,22 @@ ev_toolbar_constructed (GObject *object)
g_object_unref (builder);
}
static void
ev_toolbar_dispose (GObject *object)
{
EvToolbar *ev_toolbar = EV_TOOLBAR (object);
GMenuModel *bookmarks_submenu_model;
bookmarks_submenu_model = ev_window_get_bookmarks_menu (ev_toolbar->priv->window);
if (bookmarks_submenu_model) {
g_signal_handlers_disconnect_by_func (bookmarks_submenu_model,
ev_toolbar_bookmarks_menu_model_changed,
ev_toolbar);
}
G_OBJECT_CLASS (ev_toolbar_parent_class)->dispose (object);
}
static void
ev_toolbar_class_init (EvToolbarClass *klass)
{
......@@ -284,6 +300,7 @@ ev_toolbar_class_init (EvToolbarClass *klass)
g_object_class->set_property = ev_toolbar_set_property;
g_object_class->constructed = ev_toolbar_constructed;
g_object_class->dispose = ev_toolbar_dispose;
g_object_class_install_property (g_object_class,
PROP_WINDOW,
......
......@@ -520,8 +520,6 @@ ev_window_update_actions_sensitivity (EvWindow *ev_window)
!recent_view_mode);
ev_window_set_action_enabled (ev_window, "dual-page", has_pages &&
!recent_view_mode);
ev_window_set_action_enabled (ev_window, "dual-odd-left", has_pages &&
!recent_view_mode);
ev_window_set_action_enabled (ev_window, "reload", has_pages &&
!recent_view_mode);
ev_window_set_action_enabled (ev_window, "auto-scroll", has_pages &&
......@@ -572,7 +570,7 @@ ev_window_update_actions_sensitivity (EvWindow *ev_window)
has_pages && can_find_in_page &&
!recent_view_mode);
ev_window_set_action_enabled (ev_window, "dual-odd-left", dual_mode &&
!recent_view_mode);
has_pages && !recent_view_mode);
ev_window_set_action_enabled (ev_window, "zoom-in",
has_pages &&
......@@ -1259,8 +1257,13 @@ setup_document_from_metadata (EvWindow *window)
ev_metadata_get_int (window->priv->metadata, "window_height", &height))
return; /* size was already set in setup_size_from_metadata */
/* Following code is intended to be executed first time a document is opened
* in Evince, that's why is located *after* the previous return that exits
* when evince metadata for window_width{height} already exists. */
if (n_pages == 1)
ev_document_model_set_dual_page (window->priv->model, FALSE);
else if (n_pages == 2)
ev_document_model_set_dual_page_odd_pages_left (window->priv->model, TRUE);
g_settings_get (window->priv->default_settings, "window-ratio", "(dd)", &width_ratio, &height_ratio);
if (width_ratio > 0. && height_ratio > 0.) {
......@@ -4891,9 +4894,17 @@ ev_window_dual_mode_odd_pages_left_changed_cb (EvDocumentModel *model,
GParamSpec *pspec,
EvWindow *ev_window)
{
gboolean odd_left;
GAction *action;
odd_left = ev_document_model_get_dual_page_odd_pages_left (model);
action = g_action_map_lookup_action (G_ACTION_MAP (ev_window), "dual-odd-left");
g_simple_action_set_state (G_SIMPLE_ACTION (action), g_variant_new_boolean (odd_left));
if (ev_window->priv->metadata && !ev_window_is_empty (ev_window))
ev_metadata_set_boolean (ev_window->priv->metadata, "dual-page-odd-left",
ev_document_model_get_dual_page_odd_pages_left (model));
odd_left);
}
static void
......
......@@ -68,7 +68,7 @@ struct _EvZoomActionPrivate {
GMenu *menu;
GMenuModel *zoom_free_section;
GtkWidget *popup;
GtkPopover *popup;
gboolean popup_shown;
};
......@@ -225,7 +225,7 @@ focus_out_cb (EvZoomAction *zoom_action)
}
static void
popup_menu_closed (GtkWidget *popup,
popup_menu_closed (GtkPopover *popup,
EvZoomAction *zoom_action)
{
if (zoom_action->priv->popup != popup)
......@@ -235,7 +235,7 @@ popup_menu_closed (GtkWidget *popup,
zoom_action->priv->popup = NULL;
}
static GtkWidget *
static GtkPopover *
get_popup (EvZoomAction *zoom_action)
{
GdkRectangle rect;
......@@ -243,15 +243,15 @@ get_popup (EvZoomAction *zoom_action)
if (zoom_action->priv->popup)
return zoom_action->priv->popup;
zoom_action->priv->popup = gtk_popover_new_from_model (GTK_WIDGET (zoom_action),
G_MENU_MODEL (zoom_action->priv->menu));
zoom_action->priv->popup = GTK_POPOVER (gtk_popover_new_from_model (GTK_WIDGET (zoom_action),
G_MENU_MODEL (zoom_action->priv->menu)));
g_signal_connect (zoom_action->priv->popup, "closed",
G_CALLBACK (popup_menu_closed),
zoom_action);
gtk_entry_get_icon_area (GTK_ENTRY (zoom_action->priv->entry),
GTK_ENTRY_ICON_SECONDARY, &rect);
gtk_popover_set_pointing_to (GTK_POPOVER (zoom_action->priv->popup), &rect);
gtk_popover_set_position (GTK_POPOVER (zoom_action->priv->popup), GTK_POS_BOTTOM);
gtk_popover_set_pointing_to (zoom_action->priv->popup, &rect);
gtk_popover_set_position (zoom_action->priv->popup, GTK_POS_BOTTOM);
return zoom_action->priv->popup;
}
......@@ -259,13 +259,16 @@ get_popup (EvZoomAction *zoom_action)
static void
entry_icon_press_callback (GtkEntry *entry,
GtkEntryIconPosition icon_pos,
GdkEventButton *event,
GdkEvent *event,
EvZoomAction *zoom_action)
{
if (event->button != GDK_BUTTON_PRIMARY)
guint button = 0;
if (gdk_event_get_button (event, &button) &&
button != GDK_BUTTON_PRIMARY)
return;
gtk_widget_show (get_popup (zoom_action));
gtk_popover_popup (get_popup (zoom_action));
zoom_action->priv->popup_shown = TRUE;
}
......