Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4b3873b113 | ||
|
|
6428f20d35 | ||
|
|
35751a64f5 | ||
|
|
1c14dc96ca | ||
|
|
b1d39dbe2b | ||
|
|
294923b3af | ||
|
|
fecc271e23 | ||
|
|
4bc8ddd5ef | ||
|
|
7bba877d22 | ||
|
|
370cea4800 | ||
|
|
f88b6466e4 | ||
|
|
3b64a16466 | ||
|
|
21254c4342 | ||
|
|
3374686ba2 | ||
|
|
ac75aa493d | ||
|
|
4b345b72c7 | ||
|
|
4a7546d4f3 | ||
|
|
2164784f77 | ||
|
|
14d9762389 | ||
|
|
315bfd267b | ||
|
|
9af37879b1 | ||
|
|
83fa307fb1 | ||
|
|
04cd721160 | ||
|
|
20c06fd4cf | ||
|
|
dac836ae16 | ||
|
|
4145ce469d | ||
|
|
d555ad7a69 | ||
|
|
aaebf214c5 | ||
|
|
4287f17c25 | ||
|
|
a3486a2dbd | ||
|
|
2e1638bc7b | ||
|
|
c75f49d323 | ||
|
|
31251cb120 | ||
|
|
869befa181 | ||
|
|
7163c0aff0 | ||
|
|
1aa348016c | ||
|
|
a128703a55 | ||
|
|
b601eabe60 | ||
|
|
0b90c31ddc | ||
|
|
32e67cc51d | ||
|
|
62440325ce | ||
|
|
a7dd748aab | ||
|
|
13ece1f6fc | ||
|
|
21e8529bb6 | ||
|
|
213c8788cc | ||
|
|
8a476dc956 | ||
|
|
bd9d363403 | ||
|
|
f57172ab53 | ||
|
|
289e64022d | ||
|
|
88aa5bd7a8 |
129 changed files with 28256 additions and 25485 deletions
52
NEWS
52
NEWS
|
|
@ -1,3 +1,55 @@
|
|||
### atril 1.18.5
|
||||
|
||||
* Fix build without epub
|
||||
* Disable presentation if there is no document or document
|
||||
has no pages (fixes some crashes)
|
||||
* epub: allow to save epub documents
|
||||
* libview: check number of pages on ev_view_document_changed_cb
|
||||
(fixes crash on corrupted PDF with no pages)
|
||||
* libview: setting annotation window icons sizes
|
||||
* libview: don't change the font color of the annotation window
|
||||
* libview: fix focus on ev_annotation_window
|
||||
* libview: fix annotation window focus change after creation
|
||||
* libview: fix occasional black color of annotation window border
|
||||
* libview: fix text selection with mouse in annotation window
|
||||
* libview: fix shift+click text selection
|
||||
* libview: save inverted colors in a document
|
||||
* libview: fix goto window in presentation mode
|
||||
* libview: fix a crash in ev_view_accessible_get_link
|
||||
|
||||
### atril 1.18.4
|
||||
|
||||
* epub: fix loading epub thumbnails
|
||||
* epub: make minizip support more BSD variants
|
||||
* previewer: add style class atril-previewer-window
|
||||
* dvi: Mitigate command injection attacks by quoting filename
|
||||
|
||||
### atril 1.18.3
|
||||
|
||||
* update NEWS
|
||||
|
||||
### atril 1.18.2
|
||||
|
||||
* Translations update
|
||||
* libmisc: set width chars for page label
|
||||
* EvPixbufCache: Handle backends that don't render a selection
|
||||
|
||||
### atril 1.18.1
|
||||
|
||||
* Take monitor scale factor into account when calculating zoom.
|
||||
* Add hi-dpi support for main view.
|
||||
* sidebar-thumbnails: fix unwanted move to start after fullscreen
|
||||
* sidebar-thumbnails: preload one extra visible range while scrolling
|
||||
* sidebar-thumbnails: keep thumbnails already rendered
|
||||
* sidebar-thumbnails: fix clunky scrolling
|
||||
* sidebar-layers: Make it actually usable and fix a runtime warning
|
||||
* libview: save changes to a dropdown in an embedded form
|
||||
* ev-window: remove deprecated GtkToolbar-shadow-type
|
||||
* annotation-properties-dialog: don't use a headerbar
|
||||
* comics: make the files containing "--checkpoint-action=" unsupported
|
||||
* Translations update
|
||||
* update copyright year to 2017
|
||||
|
||||
### atril 1.18.0
|
||||
|
||||
* NEWS: use consistent, project wide, markdown-like formatting to make
|
||||
|
|
|
|||
|
|
@ -983,6 +983,12 @@ extract_argv (EvDocument *document, gint page)
|
|||
char *command_line, *quoted_archive, *quoted_filename;
|
||||
GError *err = NULL;
|
||||
|
||||
if (g_strrstr (comics_document->page_names->pdata[page], "--checkpoint-action="))
|
||||
{
|
||||
g_warning ("File unsupported\n");
|
||||
gtk_main_quit ();
|
||||
}
|
||||
|
||||
if (page >= comics_document->page_names->len)
|
||||
return NULL;
|
||||
|
||||
|
|
|
|||
|
|
@ -374,11 +374,13 @@ dvi_document_file_exporter_end (EvFileExporter *exporter)
|
|||
gboolean success;
|
||||
|
||||
DviDocument *dvi_document = DVI_DOCUMENT(exporter);
|
||||
gchar* quoted_filename = g_shell_quote (dvi_document->context->filename);
|
||||
|
||||
command_line = g_strdup_printf ("dvipdfm %s -o %s \"%s\"", /* dvipdfm -s 1,2,.., -o exporter_filename dvi_filename */
|
||||
command_line = g_strdup_printf ("dvipdfm %s -o %s %s", /* dvipdfm -s 1,2,.., -o exporter_filename dvi_filename */
|
||||
dvi_document->exporter_opts->str,
|
||||
dvi_document->exporter_filename,
|
||||
dvi_document->context->filename);
|
||||
quoted_filename);
|
||||
g_free (quoted_filename);
|
||||
|
||||
success = g_spawn_command_line_sync (command_line,
|
||||
NULL,
|
||||
|
|
|
|||
|
|
@ -124,9 +124,10 @@ epub_document_thumbnails_get_thumbnail (EvDocumentThumbnails *document,
|
|||
cairo_surface_t *webpage;
|
||||
GdkPixbuf *thumbnailpix = NULL ;
|
||||
gint width,height;
|
||||
epub_document_thumbnails_get_dimensions(document,rc,&width,&height);
|
||||
webpage = ev_document_misc_surface_rotate_and_scale(rc->page->backend_page,width,height,0);
|
||||
thumbnailpix = ev_document_misc_pixbuf_from_surface(webpage);
|
||||
epub_document_thumbnails_get_dimensions (document, rc, &width, &height);
|
||||
webpage = ev_document_misc_surface_rotate_and_scale (rc->page->backend_page,
|
||||
width, height, 0);
|
||||
thumbnailpix = ev_document_misc_pixbuf_from_surface (webpage);
|
||||
return thumbnailpix;
|
||||
}
|
||||
|
||||
|
|
@ -351,7 +352,11 @@ epub_document_save (EvDocument *document,
|
|||
{
|
||||
EpubDocument *epub_document = EPUB_DOCUMENT (document);
|
||||
|
||||
return ev_xfer_uri_simple (epub_document->archivename, uri, error);
|
||||
gchar *source_uri = g_filename_to_uri (epub_document->archivename, NULL, error);
|
||||
if (source_uri == NULL)
|
||||
return FALSE;
|
||||
|
||||
return ev_xfer_uri_simple (source_uri, uri, error);
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@
|
|||
#define ftello64 ftell
|
||||
#define fseeko64 fseek
|
||||
#else
|
||||
#ifdef __FreeBSD__
|
||||
#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)
|
||||
#define fopen64 fopen
|
||||
#define ftello64 ftello
|
||||
#define fseeko64 fseeko
|
||||
|
|
|
|||
21
configure.ac
21
configure.ac
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
m4_define([ev_major_version], [1])
|
||||
m4_define([ev_minor_version], [18])
|
||||
m4_define([ev_micro_version], [0])
|
||||
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])
|
||||
|
||||
|
|
@ -94,7 +94,7 @@ AC_ARG_WITH([gtk],
|
|||
AC_MSG_RESULT([$with_gtk])
|
||||
|
||||
dnl Specify required versions of dependencies
|
||||
CAIRO_REQUIRED=1.9.10
|
||||
CAIRO_REQUIRED=1.10.0
|
||||
GLIB_REQUIRED=2.36.0
|
||||
GTK_REQUIRED=3.14.0
|
||||
WEBKIT_REQUIRED=2.4.3
|
||||
|
|
@ -123,6 +123,23 @@ PKG_CHECK_MODULES(GMODULE, gmodule-2.0 >= $GLIB_REQUIRED)
|
|||
|
||||
PKG_CHECK_MODULES([SHELL_CORE],[libxml-2.0 >= $LIBXML_REQUIRED gtk+-3.0 >= $GTK_REQUIRED gio-2.0 >= $GLIB_REQUIRED gthread-2.0 x11])
|
||||
|
||||
# Although GTK+ 3.10 includes hi-dpi functionality, it does not require a cairo with
|
||||
# cairo_surface_set_device_scale(), which we also need if we're to support hi-dpi,
|
||||
# so we need check for that explicity.
|
||||
|
||||
atril_save_LIBS=$LIBS
|
||||
LIBS="$LIBS $LIBVIEW_LIBS"
|
||||
AC_CHECK_FUNCS(cairo_surface_set_device_scale)
|
||||
LIBS=$atril_save_LIBS
|
||||
|
||||
AC_MSG_CHECKING([for hi-dpi support])
|
||||
if test "$ac_cv_func_cairo_surface_set_device_scale" = yes ; then
|
||||
AC_DEFINE([HAVE_HIDPI_SUPPORT], [1], [Define if cairo and GTK+ have necessary functions for hi-dpi])
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl zlib support
|
||||
dnl
|
||||
|
|
|
|||
|
|
@ -343,6 +343,7 @@ gimp_cell_renderer_toggle_render (GtkCellRenderer *cell,
|
|||
gdk_rectangle_intersect (&clip_rect, cell_area, &draw_rect))
|
||||
{
|
||||
cairo_save (cr);
|
||||
gtk_style_context_save (context);
|
||||
gdk_cairo_rectangle (cr, &draw_rect);
|
||||
cairo_clip (cr);
|
||||
gtk_render_frame (context, //gtk_widget_get_style_context (widget),
|
||||
|
|
|
|||
|
|
@ -379,7 +379,7 @@ ev_document_misc_invert_pixbuf (GdkPixbuf *pixbuf)
|
|||
}
|
||||
|
||||
gdouble
|
||||
ev_document_misc_get_screen_dpi (GdkScreen *screen)
|
||||
ev_document_misc_get_screen_dpi (GdkScreen *screen, gint monitor)
|
||||
{
|
||||
gdouble dp, di;
|
||||
|
||||
|
|
@ -389,6 +389,10 @@ ev_document_misc_get_screen_dpi (GdkScreen *screen)
|
|||
/*diagonal in inches*/
|
||||
di = hypot (gdk_screen_get_width_mm(screen), gdk_screen_get_height_mm (screen)) / 25.4;
|
||||
|
||||
#ifdef HAVE_HIDPI_SUPPORT
|
||||
di /= gdk_screen_get_monitor_scale_factor(screen, monitor);
|
||||
#endif
|
||||
|
||||
return (dp / di);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ cairo_surface_t *ev_document_misc_surface_rotate_and_scale (cairo_surface_t *sur
|
|||
void ev_document_misc_invert_surface (cairo_surface_t *surface);
|
||||
void ev_document_misc_invert_pixbuf (GdkPixbuf *pixbuf);
|
||||
|
||||
gdouble ev_document_misc_get_screen_dpi (GdkScreen *screen);
|
||||
gdouble ev_document_misc_get_screen_dpi (GdkScreen *screen, gint monitor);
|
||||
|
||||
gchar *ev_document_misc_format_date (GTime utime);
|
||||
|
||||
|
|
|
|||
|
|
@ -181,6 +181,12 @@ ev_page_action_widget_init (EvPageActionWidget *action_widget)
|
|||
gtk_widget_show (action_widget->entry);
|
||||
|
||||
action_widget->label = gtk_label_new (NULL);
|
||||
gtk_label_set_width_chars (GTK_LABEL (action_widget->label), 14);
|
||||
#if GTK_CHECK_VERSION (3, 16, 0)
|
||||
gtk_label_set_xalign (GTK_LABEL (action_widget->label), 0.0);
|
||||
#else
|
||||
gtk_misc_set_alignment (GTK_MISC (action_widget->label), 0.0, 0.5);
|
||||
#endif
|
||||
gtk_box_pack_start (GTK_BOX (hbox), action_widget->label,
|
||||
FALSE, FALSE, 0);
|
||||
gtk_widget_show (action_widget->label);
|
||||
|
|
|
|||
|
|
@ -75,8 +75,6 @@ static guint signals[N_SIGNALS] = { 0 };
|
|||
|
||||
G_DEFINE_TYPE (EvAnnotationWindow, ev_annotation_window, GTK_TYPE_WINDOW)
|
||||
|
||||
#define EV_ICON_SIZE_ANNOT_WINDOW (ev_annotation_window_get_icon_size())
|
||||
|
||||
/* Cut and paste from gtkwindow.c */
|
||||
static void
|
||||
send_focus_change (GtkWidget *widget,
|
||||
|
|
@ -99,20 +97,11 @@ static gdouble
|
|||
get_screen_dpi (EvAnnotationWindow *window)
|
||||
{
|
||||
GdkScreen *screen;
|
||||
gint monitor;
|
||||
|
||||
screen = gtk_window_get_screen (GTK_WINDOW (window));
|
||||
return ev_document_misc_get_screen_dpi (screen);
|
||||
}
|
||||
|
||||
static GtkIconSize
|
||||
ev_annotation_window_get_icon_size (void)
|
||||
{
|
||||
static GtkIconSize icon_size = 0;
|
||||
|
||||
if (G_UNLIKELY (icon_size == 0))
|
||||
icon_size = gtk_icon_size_register ("ev-icon-size-annot-window", 8, 8);
|
||||
|
||||
return icon_size;
|
||||
monitor = gdk_screen_get_primary_monitor (screen);
|
||||
return ev_document_misc_get_screen_dpi (screen, monitor);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -145,7 +134,6 @@ ev_annotation_window_set_color (EvAnnotationWindow *window,
|
|||
|
||||
properties = gtk_style_properties_new ();
|
||||
gtk_style_properties_set (properties, 0,
|
||||
"color", &rgba,
|
||||
"background-color", &rgba,
|
||||
NULL);
|
||||
|
||||
|
|
@ -259,14 +247,14 @@ ev_annotation_window_set_resize_cursor (GtkWidget *widget,
|
|||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
text_view_button_press (GtkWidget *widget,
|
||||
GdkEventButton *event,
|
||||
EvAnnotationWindow *window)
|
||||
static void
|
||||
text_view_state_flags_changed (GtkWidget *widget,
|
||||
GtkStateFlags previous_flags)
|
||||
{
|
||||
ev_annotation_window_grab_focus (window);
|
||||
GtkStateFlags current_flags = gtk_widget_get_state_flags (widget);
|
||||
|
||||
return FALSE;
|
||||
if (current_flags & GTK_STATE_FLAG_BACKDROP)
|
||||
gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (widget), FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -276,12 +264,38 @@ ev_annotation_window_close (EvAnnotationWindow *window)
|
|||
g_signal_emit (window, signals[CLOSED], 0);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
ev_annotation_window_button_press_event (GtkWidget *widget,
|
||||
GdkEventButton *event)
|
||||
{
|
||||
EvAnnotationWindow *window = EV_ANNOTATION_WINDOW (widget);
|
||||
|
||||
if (event->type == GDK_BUTTON_PRESS && event->button == 1) {
|
||||
window->in_move = TRUE;
|
||||
window->x = event->x_root - event->x;
|
||||
window->y = event->y_root - event->y;
|
||||
gtk_window_begin_move_drag (GTK_WINDOW (widget),
|
||||
event->button,
|
||||
event->x_root,
|
||||
event->y_root,
|
||||
event->time);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
ev_annotation_window_init (EvAnnotationWindow *window)
|
||||
{
|
||||
GtkWidget *vbox, *hbox;
|
||||
GtkWidget *icon;
|
||||
GtkWidget *swindow;
|
||||
GtkWidget *header;
|
||||
GtkIconTheme *icon_theme;
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
icon_theme = gtk_icon_theme_get_default ();
|
||||
|
||||
gtk_widget_set_can_focus (GTK_WIDGET (window), TRUE);
|
||||
|
||||
|
|
@ -294,17 +308,28 @@ ev_annotation_window_init (EvAnnotationWindow *window)
|
|||
gtk_box_pack_start (GTK_BOX (hbox), icon, FALSE, FALSE, 0);
|
||||
gtk_widget_show (icon);
|
||||
|
||||
header = gtk_event_box_new ();
|
||||
gtk_widget_add_events (header, GDK_BUTTON_PRESS_MASK);
|
||||
g_signal_connect_swapped (header, "button-press-event",
|
||||
G_CALLBACK (ev_annotation_window_button_press_event),
|
||||
window);
|
||||
|
||||
window->title = gtk_label_new (NULL);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), window->title, TRUE, TRUE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (header), window->title);
|
||||
gtk_widget_show (window->title);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (hbox), header, TRUE, TRUE, 0);
|
||||
gtk_widget_show (header);
|
||||
|
||||
window->close_button = gtk_button_new ();
|
||||
gtk_button_set_relief (GTK_BUTTON (window->close_button), GTK_RELIEF_NONE);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window->close_button), 0);
|
||||
g_signal_connect_swapped (window->close_button, "clicked",
|
||||
G_CALLBACK (ev_annotation_window_close),
|
||||
window);
|
||||
icon = gtk_image_new_from_stock (EV_STOCK_CLOSE, EV_ICON_SIZE_ANNOT_WINDOW);
|
||||
pixbuf = gtk_icon_theme_load_icon (icon_theme, EV_STOCK_CLOSE, 8, GTK_ICON_LOOKUP_FORCE_SIZE, NULL);
|
||||
icon = gtk_image_new_from_pixbuf (pixbuf);
|
||||
g_object_unref (pixbuf);
|
||||
gtk_container_add (GTK_CONTAINER (window->close_button), icon);
|
||||
gtk_widget_show (icon);
|
||||
|
||||
|
|
@ -321,9 +346,9 @@ ev_annotation_window_init (EvAnnotationWindow *window)
|
|||
GTK_POLICY_AUTOMATIC);
|
||||
window->text_view = gtk_text_view_new ();
|
||||
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (window->text_view), GTK_WRAP_WORD);
|
||||
g_signal_connect (window->text_view, "button_press_event",
|
||||
G_CALLBACK (text_view_button_press),
|
||||
window);
|
||||
g_signal_connect (window->text_view, "state-flags-changed",
|
||||
G_CALLBACK (text_view_state_flags_changed),
|
||||
window);
|
||||
gtk_container_add (GTK_CONTAINER (swindow), window->text_view);
|
||||
gtk_widget_show (window->text_view);
|
||||
|
||||
|
|
@ -342,7 +367,9 @@ ev_annotation_window_init (EvAnnotationWindow *window)
|
|||
G_CALLBACK (ev_annotation_window_set_resize_cursor),
|
||||
window);
|
||||
|
||||
icon = gtk_image_new_from_stock (EV_STOCK_RESIZE_SW, EV_ICON_SIZE_ANNOT_WINDOW);
|
||||
pixbuf = gtk_icon_theme_load_icon (icon_theme, EV_STOCK_RESIZE_SW, 8, GTK_ICON_LOOKUP_FORCE_SIZE, NULL);
|
||||
icon = gtk_image_new_from_pixbuf (pixbuf);
|
||||
g_object_unref (pixbuf);
|
||||
gtk_container_add (GTK_CONTAINER (window->resize_sw), icon);
|
||||
gtk_widget_show (icon);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), window->resize_sw, FALSE, FALSE, 0);
|
||||
|
|
@ -357,7 +384,9 @@ ev_annotation_window_init (EvAnnotationWindow *window)
|
|||
G_CALLBACK (ev_annotation_window_set_resize_cursor),
|
||||
window);
|
||||
|
||||
icon = gtk_image_new_from_stock (EV_STOCK_RESIZE_SE, EV_ICON_SIZE_ANNOT_WINDOW);
|
||||
pixbuf = gtk_icon_theme_load_icon (icon_theme, EV_STOCK_RESIZE_SE, 8, GTK_ICON_LOOKUP_FORCE_SIZE, NULL);
|
||||
icon = gtk_image_new_from_pixbuf (pixbuf);
|
||||
g_object_unref (pixbuf);
|
||||
gtk_container_add (GTK_CONTAINER (window->resize_se), icon);
|
||||
gtk_widget_show (icon);
|
||||
gtk_box_pack_end (GTK_BOX (hbox), window->resize_se, FALSE, FALSE, 0);
|
||||
|
|
@ -367,17 +396,14 @@ ev_annotation_window_init (EvAnnotationWindow *window)
|
|||
gtk_widget_show (hbox);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
|
||||
gtk_widget_show (vbox);
|
||||
|
||||
gtk_widget_add_events (GTK_WIDGET (window),
|
||||
GDK_BUTTON_PRESS_MASK |
|
||||
GDK_KEY_PRESS_MASK);
|
||||
gtk_widget_set_app_paintable (GTK_WIDGET (window), TRUE);
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 2);
|
||||
|
||||
gtk_window_set_accept_focus (GTK_WINDOW (window), FALSE);
|
||||
gtk_window_set_decorated (GTK_WINDOW (window), FALSE);
|
||||
gtk_window_set_skip_taskbar_hint (GTK_WINDOW (window), TRUE);
|
||||
gtk_window_set_skip_pager_hint (GTK_WINDOW (window), TRUE);
|
||||
|
|
@ -445,27 +471,6 @@ ev_annotation_window_constructor (GType type,
|
|||
return object;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
ev_annotation_window_button_press_event (GtkWidget *widget,
|
||||
GdkEventButton *event)
|
||||
{
|
||||
EvAnnotationWindow *window = EV_ANNOTATION_WINDOW (widget);
|
||||
|
||||
if (event->type == GDK_BUTTON_PRESS && event->button == 1) {
|
||||
window->in_move = TRUE;
|
||||
window->x = event->x_root - event->x;
|
||||
window->y = event->y_root - event->y;
|
||||
gtk_window_begin_move_drag (GTK_WINDOW (widget),
|
||||
event->button,
|
||||
event->x_root,
|
||||
event->y_root,
|
||||
event->time);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
ev_annotation_window_configure_event (GtkWidget *widget,
|
||||
GdkEventConfigure *event)
|
||||
|
|
@ -496,6 +501,10 @@ ev_annotation_window_focus_in_event (GtkWidget *widget,
|
|||
window->in_move = FALSE;
|
||||
}
|
||||
|
||||
gtk_widget_grab_focus (window->text_view);
|
||||
send_focus_change (window->text_view, TRUE);
|
||||
gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (window->text_view), TRUE);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
@ -510,24 +519,6 @@ ev_annotation_window_focus_out_event (GtkWidget *widget,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
ev_annotation_window_enter_notify_event (GtkWidget *widget,
|
||||
GdkEventCrossing *event)
|
||||
{
|
||||
gtk_window_set_accept_focus (GTK_WINDOW (widget), TRUE);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
ev_annotation_window_leave_notify_event (GtkWidget *widget,
|
||||
GdkEventCrossing *event)
|
||||
{
|
||||
gtk_window_set_accept_focus (GTK_WINDOW (widget), FALSE);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
ev_annotation_window_class_init (EvAnnotationWindowClass *klass)
|
||||
{
|
||||
|
|
@ -538,12 +529,9 @@ ev_annotation_window_class_init (EvAnnotationWindowClass *klass)
|
|||
g_object_class->set_property = ev_annotation_window_set_property;
|
||||
g_object_class->dispose = ev_annotation_window_dispose;
|
||||
|
||||
gtk_widget_class->button_press_event = ev_annotation_window_button_press_event;
|
||||
gtk_widget_class->configure_event = ev_annotation_window_configure_event;
|
||||
gtk_widget_class->focus_in_event = ev_annotation_window_focus_in_event;
|
||||
gtk_widget_class->focus_out_event = ev_annotation_window_focus_out_event;
|
||||
gtk_widget_class->enter_notify_event = ev_annotation_window_enter_notify_event;
|
||||
gtk_widget_class->leave_notify_event = ev_annotation_window_leave_notify_event;
|
||||
|
||||
g_object_class_install_property (g_object_class,
|
||||
PROP_ANNOTATION,
|
||||
|
|
|
|||
|
|
@ -92,11 +92,6 @@ enum {
|
|||
FIND_LAST_SIGNAL
|
||||
};
|
||||
|
||||
#if ENABLE_EPUB
|
||||
static GtkWidget* webview;
|
||||
static GtkWidget* offscreenwindow;
|
||||
#endif
|
||||
|
||||
static guint job_signals[LAST_SIGNAL] = { 0 };
|
||||
static guint job_fonts_signals[FONTS_LAST_SIGNAL] = { 0 };
|
||||
static guint job_find_signals[FIND_LAST_SIGNAL] = { 0 };
|
||||
|
|
@ -859,6 +854,8 @@ snapshot_callback(WebKitWebView *webview,
|
|||
|
||||
ev_document_doc_mutex_unlock ();
|
||||
ev_job_succeeded (EV_JOB(job_thumb));
|
||||
|
||||
gtk_widget_destroy (gtk_widget_get_toplevel (GTK_WIDGET (webview)));
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -888,8 +885,11 @@ webview_load_failed_cb (WebKitWebView *webview,
|
|||
GError *e = (GError *) error;
|
||||
g_warning ("Error loading data from %s: %s", failing_uri, e->message);
|
||||
ev_job_failed_from_error (EV_JOB(job_thumb), e);
|
||||
|
||||
gtk_widget_destroy (gtk_widget_get_toplevel (GTK_WIDGET (webview)));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#endif /* ENABLE_EPUB */
|
||||
|
||||
static gboolean
|
||||
|
|
@ -921,24 +921,23 @@ ev_job_thumbnail_run (EvJob *job)
|
|||
|
||||
#if ENABLE_EPUB
|
||||
if (job->document->iswebdocument == TRUE) {
|
||||
if (!webview) {
|
||||
webview = webkit_web_view_new();
|
||||
g_signal_connect(WEBKIT_WEB_VIEW(webview),"load-changed",
|
||||
G_CALLBACK(web_thumbnail_get_screenshot_cb),
|
||||
g_object_ref (job_thumb));
|
||||
g_signal_connect(WEBKIT_WEB_VIEW(webview),"load-failed",
|
||||
G_CALLBACK(webview_load_failed_cb),
|
||||
g_object_ref (job_thumb));
|
||||
}
|
||||
GtkWidget *webview;
|
||||
GtkWidget *offscreenwindow;
|
||||
|
||||
webview = webkit_web_view_new ();
|
||||
offscreenwindow = gtk_offscreen_window_new ();
|
||||
|
||||
if (!offscreenwindow) {
|
||||
offscreenwindow = gtk_offscreen_window_new();
|
||||
gtk_container_add(GTK_CONTAINER(offscreenwindow),GTK_WIDGET(webview));
|
||||
gtk_window_set_default_size (GTK_WINDOW(offscreenwindow),800,1080);
|
||||
gtk_widget_show_all(offscreenwindow);
|
||||
}
|
||||
gtk_container_add (GTK_CONTAINER(offscreenwindow), GTK_WIDGET (webview));
|
||||
gtk_window_set_default_size (GTK_WINDOW(offscreenwindow), 800, 1080);
|
||||
gtk_widget_show_all (offscreenwindow);
|
||||
|
||||
webkit_web_view_load_uri(WEBKIT_WEB_VIEW(webview),(gchar*)rc->page->backend_page);
|
||||
g_signal_connect (WEBKIT_WEB_VIEW (webview), "load-changed",
|
||||
G_CALLBACK (web_thumbnail_get_screenshot_cb),
|
||||
g_object_ref (job_thumb));
|
||||
g_signal_connect (WEBKIT_WEB_VIEW(webview), "load-failed",
|
||||
G_CALLBACK(webview_load_failed_cb),
|
||||
g_object_ref (job_thumb));
|
||||
webkit_web_view_load_uri (WEBKIT_WEB_VIEW (webview), (gchar*) rc->page->backend_page);
|
||||
}
|
||||
else
|
||||
#endif /* ENABLE_EPUB */
|
||||
|
|
|
|||
|
|
@ -14,6 +14,9 @@ typedef struct _CacheJobInfo
|
|||
/* Data we get from rendering */
|
||||
cairo_surface_t *surface;
|
||||
|
||||
/* Device scale factor of target widget */
|
||||
int device_scale;
|
||||
|
||||
/* Selection data.
|
||||
* Selection_points are the coordinates encapsulated in selection.
|
||||
* target_points is the target selection size. */
|
||||
|
|
@ -235,6 +238,27 @@ ev_pixbuf_cache_set_max_size (EvPixbufCache *pixbuf_cache,
|
|||
pixbuf_cache->max_size = max_size;
|
||||
}
|
||||
|
||||
static int
|
||||
get_device_scale (EvPixbufCache *pixbuf_cache)
|
||||
{
|
||||
#ifdef HAVE_HIDPI_SUPPORT
|
||||
return gtk_widget_get_scale_factor (pixbuf_cache->view);
|
||||
#else
|
||||
return 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
set_device_scale_on_surface (cairo_surface_t *surface,
|
||||
int device_scale)
|
||||
{
|
||||
#ifdef HAVE_HIDPI_SUPPORT
|
||||
cairo_surface_set_device_scale (surface, device_scale, device_scale);
|
||||
#else
|
||||
g_return_if_fail (device_scale != 1);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
copy_job_to_job_info (EvJobRender *job_render,
|
||||
CacheJobInfo *job_info,
|
||||
|
|
@ -244,6 +268,7 @@ copy_job_to_job_info (EvJobRender *job_render,
|
|||
cairo_surface_destroy (job_info->surface);
|
||||
}
|
||||
job_info->surface = cairo_surface_reference (job_render->surface);
|
||||
set_device_scale_on_surface (job_info->surface, job_info->device_scale);
|
||||
if (pixbuf_cache->inverted_colors) {
|
||||
ev_document_misc_invert_surface (job_info->surface);
|
||||
}
|
||||
|
|
@ -262,6 +287,8 @@ copy_job_to_job_info (EvJobRender *job_render,
|
|||
job_info->selection_points = job_render->selection_points;
|
||||
job_info->selection_region = cairo_region_reference (job_render->selection_region);
|
||||
job_info->selection = cairo_surface_reference (job_render->selection);
|
||||
if (job_info->selection)
|
||||
set_device_scale_on_surface (job_info->selection, job_info->device_scale);
|
||||
g_assert (job_info->selection_points.x1 >= 0);
|
||||
job_info->points_set = TRUE;
|
||||
}
|
||||
|
|
@ -307,20 +334,24 @@ check_job_size_and_unref (EvPixbufCache *pixbuf_cache,
|
|||
gfloat scale)
|
||||
{
|
||||
gint width, height;
|
||||
gint device_scale;
|
||||
|
||||
g_assert (job_info);
|
||||
|
||||
if (job_info->job == NULL)
|
||||
return;
|
||||
|
||||
_get_page_size_for_scale_and_rotation (job_info->job->document,
|
||||
EV_JOB_RENDER (job_info->job)->page,
|
||||
scale,
|
||||
EV_JOB_RENDER (job_info->job)->rotation,
|
||||
&width, &height);
|
||||
if (width == EV_JOB_RENDER (job_info->job)->target_width &&
|
||||
height == EV_JOB_RENDER (job_info->job)->target_height)
|
||||
return;
|
||||
device_scale = get_device_scale (pixbuf_cache);
|
||||
if (job_info->device_scale == device_scale) {
|
||||
_get_page_size_for_scale_and_rotation (job_info->job->document,
|
||||
EV_JOB_RENDER (job_info->job)->page,
|
||||
scale,
|
||||
EV_JOB_RENDER (job_info->job)->rotation,
|
||||
&width, &height);
|
||||
if (width * device_scale == EV_JOB_RENDER (job_info->job)->target_width &&
|
||||
height * device_scale == EV_JOB_RENDER (job_info->job)->target_height)
|
||||
return;
|
||||
}
|
||||
|
||||
g_signal_handlers_disconnect_by_func (job_info->job,
|
||||
G_CALLBACK (job_finished_cb),
|
||||
|
|
@ -634,6 +665,7 @@ add_job (EvPixbufCache *pixbuf_cache,
|
|||
gfloat scale,
|
||||
EvJobPriority priority)
|
||||
{
|
||||
job_info->device_scale = get_device_scale (pixbuf_cache);
|
||||
job_info->page_ready = FALSE;
|
||||
|
||||
if (job_info->region)
|
||||
|
|
@ -641,8 +673,10 @@ add_job (EvPixbufCache *pixbuf_cache,
|
|||
job_info->region = region ? cairo_region_reference (region) : NULL;
|
||||
|
||||
job_info->job = ev_job_render_new (pixbuf_cache->document,
|
||||
page, rotation, scale,
|
||||
width, height);
|
||||
page, rotation,
|
||||
scale * job_info->device_scale,
|
||||
width * job_info->device_scale,
|
||||
height * job_info->device_scale);
|
||||
|
||||
if (new_selection_surface_needed (pixbuf_cache, job_info, page, scale)) {
|
||||
GdkColor text, base;
|
||||
|
|
@ -667,6 +701,7 @@ add_job_if_needed (EvPixbufCache *pixbuf_cache,
|
|||
gfloat scale,
|
||||
EvJobPriority priority)
|
||||
{
|
||||
gint device_scale = get_device_scale (pixbuf_cache);
|
||||
gint width, height;
|
||||
|
||||
if (job_info->job)
|
||||
|
|
@ -677,8 +712,9 @@ add_job_if_needed (EvPixbufCache *pixbuf_cache,
|
|||
&width, &height);
|
||||
|
||||
if (job_info->surface &&
|
||||
cairo_image_surface_get_width (job_info->surface) == width &&
|
||||
cairo_image_surface_get_height (job_info->surface) == height)
|
||||
job_info->device_scale == device_scale &&
|
||||
cairo_image_surface_get_width (job_info->surface) == width * device_scale &&
|
||||
cairo_image_surface_get_height (job_info->surface) == height * device_scale)
|
||||
return;
|
||||
|
||||
/* Free old surfaces for non visible pages */
|
||||
|
|
@ -949,7 +985,7 @@ ev_pixbuf_cache_get_selection_surface (EvPixbufCache *pixbuf_cache,
|
|||
|
||||
/* Now, lets see if we need to resize the image. If we do, we clear the
|
||||
* old one. */
|
||||
clear_selection_if_needed (pixbuf_cache, job_info, page, scale);
|
||||
clear_selection_if_needed (pixbuf_cache, job_info, page, scale * job_info->device_scale);
|
||||
|
||||
/* Finally, we see if the two scales are the same, and get a new pixbuf
|
||||
* if needed. We do this synchronously for now. At some point, we
|
||||
|
|
@ -973,7 +1009,7 @@ ev_pixbuf_cache_get_selection_surface (EvPixbufCache *pixbuf_cache,
|
|||
}
|
||||
|
||||
ev_page = ev_document_get_page (pixbuf_cache->document, page);
|
||||
rc = ev_render_context_new (ev_page, 0, scale);
|
||||
rc = ev_render_context_new (ev_page, 0, scale * job_info->device_scale);
|
||||
g_object_unref (ev_page);
|
||||
|
||||
if (job_info->selection_region)
|
||||
|
|
@ -991,6 +1027,8 @@ ev_pixbuf_cache_get_selection_surface (EvPixbufCache *pixbuf_cache,
|
|||
old_points,
|
||||
job_info->selection_style,
|
||||
&text, &base);
|
||||
if (job_info->selection)
|
||||
set_device_scale_on_surface (job_info->selection, job_info->device_scale);
|
||||
job_info->selection_points = job_info->target_points;
|
||||
g_object_unref (rc);
|
||||
ev_document_doc_mutex_unlock ();
|
||||
|
|
|
|||
|
|
@ -829,6 +829,9 @@ ev_view_accessible_get_link (AtkHypertext *hypertext,
|
|||
EvMapping *mapping;
|
||||
EvLinkAccessible *atk_link;
|
||||
|
||||
if (link_index < 0)
|
||||
return NULL;
|
||||
|
||||
widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (hypertext));
|
||||
if (widget == NULL)
|
||||
/* State is defunct */
|
||||
|
|
@ -849,6 +852,9 @@ ev_view_accessible_get_link (AtkHypertext *hypertext,
|
|||
return NULL;
|
||||
|
||||
n_links = ev_mapping_list_length (link_mapping);
|
||||
if (link_index > n_links - 1)
|
||||
return NULL;
|
||||
|
||||
mapping = ev_mapping_list_nth (link_mapping, n_links - link_index - 1);
|
||||
atk_link = ev_link_accessible_new (EV_VIEW_ACCESSIBLE (hypertext),
|
||||
EV_LINK (mapping->data),
|
||||
|
|
|
|||
|
|
@ -650,9 +650,9 @@ ev_view_presentation_goto_window_create (EvViewPresentation *pview)
|
|||
GtkWindow *toplevel, *goto_window;
|
||||
|
||||
toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (pview)));
|
||||
goto_window = GTK_WINDOW (pview->goto_window);
|
||||
|
||||
if (pview->goto_window) {
|
||||
goto_window = GTK_WINDOW (pview->goto_window);
|
||||
if (gtk_window_has_group (toplevel))
|
||||
gtk_window_group_add_window (gtk_window_get_group (toplevel), goto_window);
|
||||
else if (gtk_window_has_group (goto_window))
|
||||
|
|
@ -662,6 +662,7 @@ ev_view_presentation_goto_window_create (EvViewPresentation *pview)
|
|||
}
|
||||
|
||||
pview->goto_window = gtk_window_new (GTK_WINDOW_POPUP);
|
||||
goto_window = GTK_WINDOW (pview->goto_window);
|
||||
gtk_window_set_screen (goto_window, gtk_widget_get_screen (GTK_WIDGET (pview)));
|
||||
|
||||
if (gtk_window_has_group (toplevel))
|
||||
|
|
|
|||
|
|
@ -2177,7 +2177,7 @@ ev_view_form_field_text_create_widget (EvView *view,
|
|||
g_free (txt);
|
||||
}
|
||||
|
||||
g_signal_connect( buffer, "focus-out-event",
|
||||
g_signal_connect (text, "focus-out-event",
|
||||
G_CALLBACK (ev_view_form_field_text_focus_out),
|
||||
view);
|
||||
g_signal_connect (buffer, "changed",
|
||||
|
|
@ -2235,7 +2235,7 @@ ev_view_form_field_choice_changed (GtkWidget *widget,
|
|||
{
|
||||
EvFormFieldChoice *field_choice = EV_FORM_FIELD_CHOICE (field);
|
||||
|
||||
if (gtk_combo_box_get_has_entry ( GTK_COMBO_BOX (widget))) {
|
||||
if (GTK_IS_COMBO_BOX (widget)) {
|
||||
gint item;
|
||||
|
||||
item = gtk_combo_box_get_active (GTK_COMBO_BOX (widget));
|
||||
|
|
@ -3601,13 +3601,29 @@ start_selection_for_event (EvView *view,
|
|||
&(view->selection_info.start));
|
||||
}
|
||||
|
||||
static void
|
||||
extend_selection (EvView *view,
|
||||
GdkPoint *start_point,
|
||||
GdkPoint *end_point)
|
||||
{
|
||||
if (!view->selection_info.selections) {
|
||||
view->selection_info.start.x = start_point->x;
|
||||
view->selection_info.start.y = start_point->y;
|
||||
}
|
||||
|
||||
compute_selections (view,
|
||||
EV_SELECTION_STYLE_GLYPH,
|
||||
&(view->selection_info.start),
|
||||
end_point);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
ev_view_button_press_event (GtkWidget *widget,
|
||||
GdkEventButton *event)
|
||||
{
|
||||
EvView *view = EV_VIEW (widget);
|
||||
|
||||
if (!view->document)
|
||||
if (!view->document || ev_document_get_n_pages (view->document) <= 0)
|
||||
return FALSE;
|
||||
|
||||
if (!gtk_widget_has_focus (widget)) {
|
||||
|
|
@ -3643,6 +3659,12 @@ ev_view_button_press_event (GtkWidget *widget,
|
|||
if (EV_IS_SELECTION (view->document) && view->selection_info.selections) {
|
||||
if (event->type == GDK_3BUTTON_PRESS) {
|
||||
start_selection_for_event (view, event);
|
||||
} else if (event->state & GDK_SHIFT_MASK) {
|
||||
GdkPoint end_point;
|
||||
|
||||
end_point.x = event->x + view->scroll_x;
|
||||
end_point.y = event->y + view->scroll_y;
|
||||
extend_selection (view, &view->selection_info.start, &end_point);
|
||||
} else if (location_in_selected_text (view,
|
||||
event->x + view->scroll_x,
|
||||
event->y + view->scroll_y)) {
|
||||
|
|
@ -4463,6 +4485,7 @@ draw_one_page (EvView *view,
|
|||
cairo_surface_t *page_surface = NULL;
|
||||
gint selection_width, selection_height;
|
||||
cairo_surface_t *selection_surface = NULL;
|
||||
double device_scale_x = 1, device_scale_y = 1;
|
||||
|
||||
page_surface = ev_pixbuf_cache_get_surface (view->pixbuf_cache, page);
|
||||
|
||||
|
|
@ -4475,6 +4498,10 @@ draw_one_page (EvView *view,
|
|||
return;
|
||||
}
|
||||
|
||||
#ifdef HAVE_HIDPI_SUPPORT
|
||||
cairo_surface_get_device_scale (page_surface, &device_scale_x, &device_scale_y);
|
||||
#endif
|
||||
|
||||
if (page == current_page)
|
||||
hide_loading_window (view);
|
||||
|
||||
|
|
@ -4490,13 +4517,13 @@ draw_one_page (EvView *view,
|
|||
cairo_pattern_set_filter (cairo_get_source (cr),
|
||||
CAIRO_FILTER_FAST);
|
||||
cairo_scale (cr,
|
||||
(gdouble)width / page_width,
|
||||
(gdouble)height / page_height);
|
||||
(gdouble)width / page_width * device_scale_x,
|
||||
(gdouble)height / page_height * device_scale_y);
|
||||
}
|
||||
|
||||
cairo_surface_set_device_offset (page_surface,
|
||||
overlap.x - real_page_area.x,
|
||||
overlap.y - real_page_area.y);
|
||||
(overlap.x - real_page_area.x) * device_scale_x,
|
||||
(overlap.y - real_page_area.y) * device_scale_y);
|
||||
cairo_set_source_surface (cr, page_surface, 0, 0);
|
||||
cairo_paint (cr);
|
||||
cairo_restore (cr);
|
||||
|
|
@ -4525,13 +4552,13 @@ draw_one_page (EvView *view,
|
|||
cairo_pattern_set_filter (cairo_get_source (cr),
|
||||
CAIRO_FILTER_FAST);
|
||||
cairo_scale (cr,
|
||||
(gdouble)width / selection_width,
|
||||
(gdouble)height / selection_height);
|
||||
(gdouble)width / selection_width * device_scale_x,
|
||||
(gdouble)height / selection_height * device_scale_y);
|
||||
}
|
||||
|
||||
cairo_surface_set_device_offset (selection_surface,
|
||||
overlap.x - real_page_area.x,
|
||||
overlap.y - real_page_area.y);
|
||||
(overlap.x - real_page_area.x) * device_scale_x,
|
||||
(overlap.y - real_page_area.y) * device_scale_y);
|
||||
|
||||
cairo_set_source_surface (cr, selection_surface, 0, 0);
|
||||
cairo_paint (cr);
|
||||
|
|
@ -4872,6 +4899,14 @@ ev_view_class_init (EvViewClass *class)
|
|||
GTK_SCROLL_STEP_FORWARD, G_TYPE_BOOLEAN, TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
on_notify_scale_factor (EvView *view,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
if (view->document)
|
||||
view_update_range_and_current_page (view);
|
||||
}
|
||||
|
||||
static void
|
||||
ev_view_init (EvView *view)
|
||||
{
|
||||
|
|
@ -4918,6 +4953,9 @@ ev_view_init (EvView *view)
|
|||
view->pending_scroll = SCROLL_TO_KEEP_POSITION;
|
||||
view->jump_to_find_result = TRUE;
|
||||
view->highlight_find_results = FALSE;
|
||||
|
||||
g_signal_connect (view, "notify::scale-factor",
|
||||
G_CALLBACK (on_notify_scale_factor), NULL);
|
||||
}
|
||||
|
||||
/*** Callbacks ***/
|
||||
|
|
@ -5194,12 +5232,15 @@ ev_view_document_changed_cb (EvDocumentModel *model,
|
|||
g_object_unref (view->document);
|
||||
}
|
||||
|
||||
view->document = document;
|
||||
view->document = document ? g_object_ref (document) : NULL;
|
||||
view->find_result = 0;
|
||||
|
||||
if (view->document) {
|
||||
if (ev_document_get_n_pages (view->document) <= 0 ||
|
||||
!ev_document_check_dimensions (view->document))
|
||||
return;
|
||||
|
||||
view->loading = FALSE;
|
||||
g_object_ref (view->document);
|
||||
setup_caches (view);
|
||||
}
|
||||
|
||||
|
|
@ -6043,18 +6084,7 @@ merge_selection_region (EvView *view,
|
|||
* changed, so we xor the old and new regions
|
||||
* and redraw if it's different */
|
||||
region = cairo_region_copy (old_sel->covered_region);
|
||||
#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 9, 12)
|
||||
cairo_region_xor (region, new_sel->covered_region);
|
||||
#else
|
||||
cairo_region_t *tbr;
|
||||
tbr = cairo_region_copy (new_sel->covered_region);
|
||||
|
||||
/* xor old_sel, new_sel*/
|
||||
cairo_region_subtract (tbr, region);
|
||||
cairo_region_subtract (region, new_sel->covered_region);
|
||||
cairo_region_union (region, tbr);
|
||||
cairo_region_destroy (tbr);
|
||||
#endif
|
||||
|
||||
if (cairo_region_is_empty (region)) {
|
||||
cairo_region_destroy (region);
|
||||
|
|
|
|||
|
|
@ -252,6 +252,9 @@ ev_web_view_inverted_colors_changed_cb (EvDocumentModel *model,
|
|||
EvWebView *webview)
|
||||
{
|
||||
EvDocument *document = ev_document_model_get_document(model);
|
||||
|
||||
if (!document || !document->iswebdocument)
|
||||
return;
|
||||
|
||||
if (ev_document_model_get_inverted_colors(model) == TRUE) {
|
||||
if (document == NULL) {
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ am
|
|||
ar
|
||||
as
|
||||
ast
|
||||
az
|
||||
be
|
||||
bg
|
||||
bn
|
||||
|
|
@ -17,6 +18,7 @@ cs
|
|||
cy
|
||||
da
|
||||
de
|
||||
de_CH
|
||||
dz
|
||||
el
|
||||
en_AU
|
||||
|
|
|
|||
480
po/bn_IN.po
480
po/bn_IN.po
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
1784
po/de_CH.po
Normal file
1784
po/de_CH.po
Normal file
File diff suppressed because it is too large
Load diff
486
po/en_AU.po
486
po/en_AU.po
File diff suppressed because it is too large
Load diff
480
po/en_CA.po
480
po/en_CA.po
File diff suppressed because it is too large
Load diff
486
po/en_GB.po
486
po/en_GB.po
File diff suppressed because it is too large
Load diff
480
po/es_CL.po
480
po/es_CL.po
File diff suppressed because it is too large
Load diff
567
po/es_CO.po
567
po/es_CO.po
File diff suppressed because it is too large
Load diff
480
po/es_MX.po
480
po/es_MX.po
File diff suppressed because it is too large
Load diff
480
po/es_VE.po
480
po/es_VE.po
File diff suppressed because it is too large
Load diff
480
po/fr_CA.po
480
po/fr_CA.po
File diff suppressed because it is too large
Load diff
480
po/ku_IQ.po
480
po/ku_IQ.po
File diff suppressed because it is too large
Load diff
488
po/pt_BR.po
488
po/pt_BR.po
File diff suppressed because it is too large
Load diff
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue