debian/0000775000000000000000000000000013210053722007163 5ustar debian/control0000664000000000000000000001675513210054640010604 0ustar # This file is autogenerated. DO NOT EDIT! # # Modifications should be made to debian/control.in instead. # This file is regenerated automatically in the clean target. Source: evince Section: gnome Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Debian GNOME Maintainers Uploaders: Debian GNOME Maintainers Build-Depends: cdbs (>= 0.4.90), debhelper (>= 8), dpkg-dev (>= 1.16.1), dh-autoreconf, intltool (>= 0.35.0), gnome-pkg-tools (>= 0.10), yelp-tools, gtk-doc-tools (>= 1.0), libx11-dev, libcairo2-dev (>= 1.10.0), libgtk-3-dev (>= 3.8.0), libgail-3-dev (>= 3.0.2), libglib2.0-dev (>= 2.36), libsecret-1-dev (>= 0.5), gnome-icon-theme (>= 2.17.1), libxml2-dev (>= 2.5.0), libsm-dev (>= 2:1.0.0), zlib1g-dev, libnautilus-extension-dev (>= 2.91.4), libpoppler-glib-dev (>= 0.24.0), libspectre-dev (>= 0.2.0), libtiff5-dev | libtiff-dev, libdjvulibre-dev (>= 3.5.17), libkpathsea-dev, libt1-dev, libgxps-dev (>= 0.2.1), autotools-dev, gobject-introspection (>= 1.0), libgirepository1.0-dev (>= 1.0), gsettings-desktop-schemas-dev, gnome-common, dh-apparmor, libgrip-dev (>= 0.3.1) Standards-Version: 3.9.3 Homepage: http://www.gnome.org/projects/evince/ Vcs-Svn: svn://anonscm.debian.org/svn/pkg-gnome/desktop/unstable/evince Vcs-Browser: http://anonscm.debian.org/viewvc/pkg-gnome/desktop/unstable/evince Package: evince Conflicts: evince-gtk Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, libevdocument3-4 (= ${binary:Version}), libevview3-3 (= ${binary:Version}), evince-common (>= ${gnome:Version}), evince-common (<< ${gnome:NextVersion}), gnome-icon-theme (>= 2.17.1), shared-mime-info, gnome-icon-theme-symbolic Recommends: dbus-x11, gvfs Provides: pdf-viewer, postscript-viewer, djvu-viewer Suggests: unrar, poppler-data, nautilus, apparmor Description: Document (PostScript, PDF) viewer Evince is a simple multi-page document viewer. It can display and print PostScript (PS), Encapsulated PostScript (EPS), DjVu, DVI, Portable Document Format (PDF) and XML Paper Specification (XPS) files. When supported by the document, it also allows searching for text, copying text to the clipboard, hypertext navigation, and table-of-contents bookmarks. Package: evince-dbg Section: debug Priority: extra Architecture: any Depends: ${misc:Depends}, evince (= ${binary:Version}), libevdocument3-4 (= ${binary:Version}), libevview3-3 (= ${binary:Version}) Description: Document (PostScript, PDF) viewer - debugging symbols Evince is a simple multi-page document viewer. It can display and print PostScript (PS), Encapsulated PostScript (EPS), DjVu, DVI, Portable Document Format (PDF) and XML Paper Specification (XPS) files. When supported by the document, it also allows searching for text, copying text to the clipboard, hypertext navigation, and table-of-contents bookmarks. . This package contains the debugging symbols needed by gdb. Package: evince-gtk Section: x11 Conflicts: evince Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, libevdocument3-4 (= ${binary:Version}), libevview3-3 (= ${binary:Version}), evince-common (>= ${gnome:Version}), evince-common (<< ${gnome:NextVersion}), gnome-icon-theme (>= 2.17.1), shared-mime-info Recommends: dbus-x11 Provides: pdf-viewer, postscript-viewer, djvu-viewer Suggests: gvfs, unrar, poppler-data, nautilus Description: Document (PostScript, PDF) viewer (GTK+ version) Evince is a simple multi-page document viewer. It can display and print PostScript (PS), Encapsulated PostScript (EPS), DjVu, DVI, Portable Document Format (PDF) and XML Paper Specification (XPS) files. When supported by the document, it also allows searching for text, copying text to the clipboard, hypertext navigation, and table-of-contents bookmarks. . This version of evince is built without GNOME keyring support. Package: evince-common Architecture: all Depends: ${misc:Depends}, gsettings-desktop-schemas Description: Document (PostScript, PDF) viewer - common files Evince is a simple multi-page document viewer. It can display and print PostScript (PS), Encapsulated PostScript (EPS), DjVu, DVI, Portable Document Format (PDF) and XML Paper Specification (XPS) files. When supported by the document, it also allows searching for text, copying text to the clipboard, hypertext navigation, and table-of-contents bookmarks. . This package contains shared files for evince and evince-gtk packages. Package: libevdocument3-4 Architecture: any Section: libs Depends: ${shlibs:Depends}, ${misc:Depends} Replaces: libevince3-3 Breaks: libevince3-3 Description: Document (PostScript, PDF) rendering library This package contains libevdocument, which performs the rendering of the documents. . It ships with a ps, pdf, dvi, tiff, djvu, comics and xps backend. Package: libevview3-3 Architecture: any Section: libs Depends: ${shlibs:Depends}, ${misc:Depends} Replaces: libevince3-3 Breaks: libevince3-3 Description: Document (PostScript, PDF) rendering library - Gtk+ widgets This package contains libevview, which provides GTK+ widgets for displaying documents. Package: libevince-dev Architecture: any Section: libdevel Depends: libevdocument3-4 (= ${binary:Version}), libevview3-3 (= ${binary:Version}), gir1.2-evince-3.0 (= ${binary:Version}), ${misc:Depends}, libgtk-3-dev (>= 3.8.0), libglib2.0-dev (>= 2.36) Description: Document (PostScript, PDF) rendering library - development files This package contains evince-related libraries for rendering and displaying Evince documents like PostScript (PS), Encapsulated PostScript (EPS), DjVu, DVI, Portable Document Format (PDF) and XML Paper Specification (XPS) files. * libevdocument, which performs the rendering of the documents * libevview, which provides GTK+ widgets for displaying documents . This package provides the development headers, static libraries and documentation. Package: gir1.2-evince-3.0 Section: introspection Architecture: any Depends: ${gir:Depends}, ${shlibs:Depends}, ${misc:Depends} Provides: gir1.2-evince-document-3.0, gir1.2-evince-view-3.0 Description: GObject introspection data for the evince libraries This package contains introspection data for the libevview and libevdocument library. . Evince is a simple multi-page document viewer. It can display and print PostScript (PS), Encapsulated PostScript (EPS), DjVu, DVI, Portable Document Format (PDF) and XML Paper Specification (XPS) files. When supported by the document, it also allows searching for text, copying text to the clipboard, hypertext navigation, and table-of-contents bookmarks. . It can be used by packages using the GIRepository format to generate dynamic bindings. debian/apparmor-profile.abstraction0000664000000000000000000000674012343356101014707 0ustar # vim:syntax=apparmor # # abstraction used by evince binaries # #include #include #include @{PROC}/[0-9]*/fd/ r, @{PROC}/[0-9]*/mountinfo r, owner @{PROC}/[0-9]*/auxv r, owner @{PROC}/[0-9]*/status r, # Doesn't seem to be required, but noisy. Maybe allow 'r' for 'b*' if needed. # Possibly move to an abstraction if anything else needs it. deny /run/udev/data/** r, # move out to the gnome abstraction if anyone else needs these /dev/.udev/{data,db}/* r, /etc/udev/udev.conf r, /sys/devices/**/block/**/uevent r, # apport /etc/default/apport r, # evince specific /etc/ r, /etc/fstab r, /etc/texmf/ r, /etc/texmf/** r, /etc/xpdf/* r, /usr/bin/gs-esp ixr, /usr/bin/mktexpk Cx -> sanitized_helper, /usr/bin/mktextfm Cx -> sanitized_helper, /usr/bin/dvipdfm Cx -> sanitized_helper, /usr/bin/dvipdfmx Cx -> sanitized_helper, # supported archivers /bin/gzip ixr, /bin/bzip2 ixr, /usr/bin/unrar* ixr, /usr/bin/unzip ixr, /usr/bin/7zr ixr, /usr/lib/p7zip/7zr ixr, /usr/bin/7za ixr, /usr/lib/p7zip/7za ixr, /usr/bin/zipnote ixr, /bin/tar ixr, /usr/bin/xz ixr, # allow read access to anything in /usr/share, for plugins and input methods /usr/local/share/** r, /usr/share/** r, /usr/lib/ghostscript/** mr, /var/lib/ghostscript/** r, /var/lib/texmf/** r, # from http://live.gnome.org/Evince/SupportedDocumentFormats. Allow # read for all supported file formats /**.[bB][mM][pP] r, /**.[dD][jJ][vV][uU] r, /**.[dD][vV][iI] r, /**.[gG][iI][fF] r, /**.[jJ][pP][gG] r, /**.[jJ][pP][eE][gG] r, /**.[oO][dD][pP] r, /**.[fFpP][dD][fF] r, /**.[pP][nN][mM] r, /**.[pP][nN][gG] r, /**.[pP][sS] r, /**.[eE][pP][sS] r, /**.[tT][iI][fF] r, /**.[tT][iI][fF][fF] r, /**.[xX][pP][mM] r, /**.[gG][zZ] r, /**.[bB][zZ]2 r, /**.[cC][bB][rRzZ7] r, /**.[xX][zZ] r, # Use abstractions/private-files instead of abstractions/private-files-strict # and add the sensitive files manually to work around LP: #451422. The goal # is to disallow access to the .mozilla folder in general, but to allow # access to the Cache directory, which the browser may tell evince to open # from directly. #include audit deny @{HOME}/.gnupg/** mrwkl, audit deny @{HOME}/.ssh/** mrwkl, audit deny @{HOME}/.gnome2_private/** mrwkl, audit deny @{HOME}/.gnome2/keyrings/** mrwkl, audit deny @{HOME}/.kde/share/apps/kwallet/** mrwkl, audit deny @{HOME}/.pki/nssdb/** w, audit deny @{HOME}/.mozilla/*/*/* mrwkl, audit deny @{HOME}/.mozilla/**/bookmarkbackups/** mrwkl, audit deny @{HOME}/.mozilla/**/chrome/** mrwkl, audit deny @{HOME}/.mozilla/**/extensions/** mrwkl, audit deny @{HOME}/.mozilla/**/gm_scripts/** mrwkl, audit deny @{HOME}/.config/chromium/** mrwkl, audit deny @{HOME}/.evolution/** mrwkl, audit deny @{HOME}/.config/evolution/** mrwkl, audit deny @{HOME}/.kde/share/config/** mrwkl, audit deny @{HOME}/.kde/share/apps/kmail/** mrwkl, audit deny @{HOME}/.{,mozilla-}thunderbird/*/* mrwkl, audit deny @{HOME}/.{,mozilla-}thunderbird/*/[^C][^a][^c][^h][^e]*/** mrwkl, # When LP: #451422 is fixed, change the above to simply be: ##include #owner @{HOME}/.mozilla/**/*Cache/* r, # Site-specific additions and overrides. See local/README for details. #include debian/libevdocument3-4.symbols0000664000000000000000000003132012343356101013663 0ustar libevdocument3.so.4 libevdocument3-4 #MINVER# ev_annotation_attachment_get_attachment@Base 3.0.2 ev_annotation_attachment_get_type@Base 3.0.2 ev_annotation_attachment_new@Base 3.0.2 ev_annotation_attachment_set_attachment@Base 3.0.2 ev_annotation_equal@Base 3.0.2 ev_annotation_get_annotation_type@Base 3.0.2 ev_annotation_get_color@Base 3.0.2 ev_annotation_get_contents@Base 3.0.2 ev_annotation_get_modified@Base 3.0.2 ev_annotation_get_name@Base 3.0.2 ev_annotation_get_page@Base 3.0.2 ev_annotation_get_page_index@Base 3.0.2 ev_annotation_get_rgba@Base 3.5.3 ev_annotation_get_type@Base 3.0.2 ev_annotation_markup_get_label@Base 3.0.2 ev_annotation_markup_get_opacity@Base 3.0.2 ev_annotation_markup_get_popup_is_open@Base 3.0.2 ev_annotation_markup_get_rectangle@Base 3.0.2 ev_annotation_markup_get_type@Base 3.0.2 ev_annotation_markup_has_popup@Base 3.0.2 ev_annotation_markup_set_has_popup@Base 3.0.2 ev_annotation_markup_set_label@Base 3.0.2 ev_annotation_markup_set_opacity@Base 3.0.2 ev_annotation_markup_set_popup_is_open@Base 3.0.2 ev_annotation_markup_set_rectangle@Base 3.0.2 ev_annotation_set_color@Base 3.0.2 ev_annotation_set_contents@Base 3.0.2 ev_annotation_set_modified@Base 3.0.2 ev_annotation_set_modified_from_time@Base 3.0.2 ev_annotation_set_name@Base 3.0.2 ev_annotation_set_rgba@Base 3.5.3 ev_annotation_text_get_icon@Base 3.0.2 ev_annotation_text_get_is_open@Base 3.0.2 ev_annotation_text_get_type@Base 3.0.2 ev_annotation_text_icon_get_type@Base 3.0.2 ev_annotation_text_new@Base 3.0.2 ev_annotation_text_set_icon@Base 3.0.2 ev_annotation_text_set_is_open@Base 3.0.2 ev_annotation_type_get_type@Base 3.0.2 ev_annotations_save_mask_get_type@Base 3.0.2 ev_async_renderer_get_type@Base 3.0.2 ev_async_renderer_render_pixbuf@Base 3.0.2 ev_attachment_error_quark@Base 3.0.2 ev_attachment_get_creation_date@Base 3.0.2 ev_attachment_get_description@Base 3.0.2 ev_attachment_get_mime_type@Base 3.0.2 ev_attachment_get_modification_date@Base 3.0.2 ev_attachment_get_name@Base 3.0.2 ev_attachment_get_type@Base 3.0.2 ev_attachment_new@Base 3.0.2 ev_attachment_open@Base 3.0.2 ev_attachment_save@Base 3.0.2 ev_backends_manager_get_all_types_info@Base 3.0.2 ev_backends_manager_get_document@Base 3.0.2 ev_backends_manager_get_document_module_name@Base 3.0.2 ev_backends_manager_get_document_type_info@Base 3.0.2 ev_compression_type_get_type@Base 3.0.2 #MISSING: 3.9.5-0ubuntu1~saucy1# (optional)ev_doc_mutex@Base 3.3.90 ev_document_annotations_add_annotation@Base 3.0.2 ev_document_annotations_can_add_annotation@Base 3.0.2 ev_document_annotations_document_is_modified@Base 3.0.2 ev_document_annotations_get_annotations@Base 3.0.2 ev_document_annotations_get_type@Base 3.0.2 ev_document_annotations_save_annotation@Base 3.0.2 ev_document_attachments_get_attachments@Base 3.0.2 ev_document_attachments_get_type@Base 3.0.2 ev_document_attachments_has_attachments@Base 3.0.2 ev_document_check_dimensions@Base 3.0.2 ev_document_doc_mutex_lock@Base 3.0.2 ev_document_doc_mutex_trylock@Base 3.0.2 ev_document_doc_mutex_unlock@Base 3.0.2 ev_document_error_get_type@Base 3.0.2 ev_document_error_quark@Base 3.0.2 ev_document_factory_add_filters@Base 3.0.2 ev_document_factory_get_document@Base 3.0.2 ev_document_factory_get_document_for_gfile@Base 3.5.2 ev_document_factory_get_document_for_stream@Base 3.5.2 ev_document_fc_mutex_lock@Base 3.0.2 ev_document_fc_mutex_trylock@Base 3.0.2 ev_document_fc_mutex_unlock@Base 3.0.2 ev_document_find_find_text@Base 3.0.2 ev_document_find_find_text_with_options@Base 3.5.3 ev_document_find_get_supported_options@Base 3.5.3 ev_document_find_get_type@Base 3.0.2 ev_document_find_page_by_label@Base 3.0.2 ev_document_fonts_fill_model@Base 3.0.2 ev_document_fonts_get_fonts_summary@Base 3.7.4 ev_document_fonts_get_progress@Base 3.0.2 ev_document_fonts_get_type@Base 3.0.2 ev_document_fonts_scan@Base 3.0.2 ev_document_forms_document_is_modified@Base 3.0.2 ev_document_forms_form_field_button_get_state@Base 3.0.2 ev_document_forms_form_field_button_set_state@Base 3.0.2 ev_document_forms_form_field_choice_get_item@Base 3.0.2 ev_document_forms_form_field_choice_get_n_items@Base 3.0.2 ev_document_forms_form_field_choice_get_text@Base 3.0.2 ev_document_forms_form_field_choice_is_item_selected@Base 3.0.2 ev_document_forms_form_field_choice_select_item@Base 3.0.2 ev_document_forms_form_field_choice_set_text@Base 3.0.2 ev_document_forms_form_field_choice_toggle_item@Base 3.0.2 ev_document_forms_form_field_choice_unselect_all@Base 3.0.2 ev_document_forms_form_field_text_get_text@Base 3.0.2 ev_document_forms_form_field_text_set_text@Base 3.0.2 ev_document_forms_get_form_fields@Base 3.0.2 ev_document_forms_get_type@Base 3.0.2 ev_document_get_backend_info@Base 3.0.2 ev_document_get_info@Base 3.0.2 ev_document_get_max_label_len@Base 3.0.2 ev_document_get_max_page_size@Base 3.0.2 ev_document_get_min_page_size@Base 3.0.2 ev_document_get_n_pages@Base 3.0.2 ev_document_get_page@Base 3.0.2 ev_document_get_page_label@Base 3.0.2 ev_document_get_page_size@Base 3.0.2 ev_document_get_thumbnail@Base 3.0.2 ev_document_get_title@Base 3.0.2 ev_document_get_type@Base 3.0.2 ev_document_get_uri@Base 3.0.2 ev_document_has_synctex@Base 3.0.2 ev_document_has_text_page_labels@Base 3.0.2 ev_document_images_get_image@Base 3.0.2 ev_document_images_get_image_mapping@Base 3.0.2 ev_document_images_get_type@Base 3.0.2 ev_document_info_copy@Base 3.0.2 ev_document_info_fields_get_type@Base 3.0.2 ev_document_info_free@Base 3.0.2 ev_document_info_get_type@Base 3.0.2 ev_document_is_page_size_uniform@Base 3.0.2 ev_document_layers_get_layers@Base 3.0.2 ev_document_layers_get_type@Base 3.0.2 ev_document_layers_has_layers@Base 3.0.2 ev_document_layers_hide_layer@Base 3.0.2 ev_document_layers_layer_is_visible@Base 3.0.2 ev_document_layers_show_layer@Base 3.0.2 ev_document_layout_get_type@Base 3.0.2 ev_document_license_copy@Base 3.0.2 ev_document_license_free@Base 3.0.2 ev_document_license_get_text@Base 3.0.2 ev_document_license_get_type@Base 3.0.2 ev_document_license_get_uri@Base 3.0.2 ev_document_license_get_web_statement@Base 3.0.2 ev_document_license_new@Base 3.0.2 ev_document_links_find_link_dest@Base 3.0.2 ev_document_links_find_link_page@Base 3.0.2 ev_document_links_get_dest_page@Base 3.0.2 ev_document_links_get_dest_page_label@Base 3.0.2 ev_document_links_get_link_page@Base 3.0.2 ev_document_links_get_link_page_label@Base 3.0.2 ev_document_links_get_links@Base 3.0.2 ev_document_links_get_links_model@Base 3.0.2 ev_document_links_get_type@Base 3.0.2 ev_document_links_has_document_links@Base 3.0.2 ev_document_load@Base 3.0.2 ev_document_load_flags_get_type@Base 3.5.2 ev_document_load_gfile@Base 3.5.2 ev_document_load_stream@Base 3.5.2 ev_document_misc_format_date@Base 3.0.2 ev_document_misc_get_loading_thumbnail@Base 3.0.2 ev_document_misc_get_page_border_size@Base 3.0.2 ev_document_misc_get_pointer_position@Base 3.3.90 ev_document_misc_get_screen_dpi@Base 3.0.2 ev_document_misc_get_thumbnail_frame@Base 3.0.2 ev_document_misc_invert_pixbuf@Base 3.0.2 ev_document_misc_invert_surface@Base 3.0.2 ev_document_misc_paint_one_page@Base 3.0.2 ev_document_misc_pixbuf_from_surface@Base 3.0.2 ev_document_misc_render_loading_thumbnail@Base 3.7.4 ev_document_misc_render_thumbnail_with_frame@Base 3.7.4 ev_document_misc_surface_from_pixbuf@Base 3.0.2 ev_document_misc_surface_rotate_and_scale@Base 3.0.2 ev_document_mode_get_type@Base 3.0.2 ev_document_permissions_get_type@Base 3.0.2 ev_document_print_get_type@Base 3.0.2 ev_document_print_print_page@Base 3.0.2 ev_document_render@Base 3.0.2 ev_document_save@Base 3.0.2 ev_document_security_get_type@Base 3.0.2 ev_document_security_has_document_security@Base 3.0.2 ev_document_security_set_password@Base 3.0.2 ev_document_synctex_backward_search@Base 3.0.2 ev_document_synctex_forward_search@Base 3.0.2 ev_document_text_get_text@Base 3.0.2 ev_document_text_get_text_attrs@Base 3.9.5 ev_document_text_get_text_layout@Base 3.0.2 ev_document_text_get_text_mapping@Base 3.0.2 ev_document_text_get_type@Base 3.0.2 ev_document_transition_get_effect@Base 3.0.2 ev_document_transition_get_page_duration@Base 3.0.2 ev_document_transition_get_type@Base 3.0.2 ev_document_ui_hints_get_type@Base 3.0.2 #MISSING: 3.9.5-0ubuntu1~saucy1# (optional)ev_fc_mutex@Base 3.3.90 ev_file_compress@Base 3.0.2 ev_file_copy_metadata@Base 3.5.2 ev_file_exporter_begin@Base 3.0.2 ev_file_exporter_begin_page@Base 3.0.2 ev_file_exporter_capabilities_get_type@Base 3.0.2 ev_file_exporter_do_page@Base 3.0.2 ev_file_exporter_end@Base 3.0.2 ev_file_exporter_end_page@Base 3.0.2 ev_file_exporter_format_get_type@Base 3.0.2 ev_file_exporter_get_capabilities@Base 3.0.2 ev_file_exporter_get_type@Base 3.0.2 ev_file_get_mime_type@Base 3.0.2 ev_file_is_temp@Base 3.0.2 ev_file_uncompress@Base 3.0.2 ev_find_options_get_type@Base 3.5.3 ev_form_field_button_get_type@Base 3.0.2 ev_form_field_button_new@Base 3.0.2 ev_form_field_button_type_get_type@Base 3.0.2 ev_form_field_choice_get_type@Base 3.0.2 ev_form_field_choice_new@Base 3.0.2 ev_form_field_choice_type_get_type@Base 3.0.2 ev_form_field_get_type@Base 3.0.2 ev_form_field_signature_get_type@Base 3.0.2 ev_form_field_signature_new@Base 3.0.2 ev_form_field_text_get_type@Base 3.0.2 ev_form_field_text_new@Base 3.0.2 ev_form_field_text_type_get_type@Base 3.0.2 ev_get_locale_dir@Base 3.0.2 ev_image_get_id@Base 3.0.2 ev_image_get_page@Base 3.0.2 ev_image_get_pixbuf@Base 3.0.2 ev_image_get_tmp_uri@Base 3.0.2 ev_image_get_type@Base 3.0.2 ev_image_new@Base 3.0.2 ev_image_new_from_pixbuf@Base 3.0.2 ev_image_save_tmp@Base 3.0.2 ev_init@Base 3.0.2 ev_layer_get_rb_group@Base 3.0.2 ev_layer_get_type@Base 3.0.2 ev_layer_is_parent@Base 3.0.2 ev_layer_new@Base 3.0.2 ev_link_action_equal@Base 3.7.90 ev_link_action_get_action_type@Base 3.0.2 ev_link_action_get_dest@Base 3.0.2 ev_link_action_get_filename@Base 3.0.2 ev_link_action_get_hide_list@Base 3.0.2 ev_link_action_get_name@Base 3.0.2 ev_link_action_get_params@Base 3.0.2 ev_link_action_get_show_list@Base 3.0.2 ev_link_action_get_toggle_list@Base 3.0.2 ev_link_action_get_type@Base 3.0.2 ev_link_action_get_uri@Base 3.0.2 ev_link_action_new_dest@Base 3.0.2 ev_link_action_new_external_uri@Base 3.0.2 ev_link_action_new_launch@Base 3.0.2 ev_link_action_new_layers_state@Base 3.0.2 ev_link_action_new_named@Base 3.0.2 ev_link_action_new_remote@Base 3.0.2 ev_link_action_type_get_type@Base 3.0.2 ev_link_dest_equal@Base 3.7.90 ev_link_dest_get_bottom@Base 3.0.2 ev_link_dest_get_dest_type@Base 3.0.2 ev_link_dest_get_left@Base 3.0.2 ev_link_dest_get_named_dest@Base 3.0.2 ev_link_dest_get_page@Base 3.0.2 ev_link_dest_get_page_label@Base 3.0.2 ev_link_dest_get_right@Base 3.0.2 ev_link_dest_get_top@Base 3.0.2 ev_link_dest_get_type@Base 3.0.2 ev_link_dest_get_zoom@Base 3.0.2 ev_link_dest_new_fit@Base 3.0.2 ev_link_dest_new_fith@Base 3.0.2 ev_link_dest_new_fitr@Base 3.0.2 ev_link_dest_new_fitv@Base 3.0.2 ev_link_dest_new_named@Base 3.0.2 ev_link_dest_new_page@Base 3.0.2 ev_link_dest_new_page_label@Base 3.0.2 ev_link_dest_new_xyz@Base 3.0.2 ev_link_dest_type_get_type@Base 3.0.2 ev_link_get_action@Base 3.0.2 ev_link_get_title@Base 3.0.2 ev_link_get_type@Base 3.0.2 ev_link_new@Base 3.0.2 ev_mapping_list_find@Base 3.0.2 ev_mapping_list_find_custom@Base 3.0.2 ev_mapping_list_get_data@Base 3.0.2 ev_mapping_list_get_list@Base 3.0.2 ev_mapping_list_get_page@Base 3.0.2 ev_mapping_list_get_type@Base 3.7.5 ev_mapping_list_length@Base 3.7.5 ev_mapping_list_new@Base 3.0.2 ev_mapping_list_nth@Base 3.7.5 ev_mapping_list_ref@Base 3.0.2 ev_mapping_list_unref@Base 3.0.2 ev_mkdtemp@Base 3.0.2 ev_mkstemp@Base 3.0.2 ev_mkstemp_file@Base 3.0.2 ev_page_get_type@Base 3.0.2 ev_page_new@Base 3.0.2 ev_rect_cmp@Base 3.0.2 ev_rectangle_copy@Base 3.0.2 ev_rectangle_free@Base 3.0.2 ev_rectangle_get_type@Base 3.0.2 ev_rectangle_new@Base 3.0.2 ev_render_context_get_type@Base 3.0.2 ev_render_context_new@Base 3.0.2 ev_render_context_set_page@Base 3.0.2 ev_render_context_set_rotation@Base 3.0.2 ev_render_context_set_scale@Base 3.0.2 ev_selection_get_selected_text@Base 3.0.2 ev_selection_get_selection_region@Base 3.0.2 ev_selection_get_type@Base 3.0.2 ev_selection_render_selection@Base 3.0.2 ev_selection_style_get_type@Base 3.0.2 ev_shutdown@Base 3.0.2 ev_source_link_copy@Base 3.3.90 ev_source_link_free@Base 3.3.90 ev_source_link_get_type@Base 3.3.90 ev_source_link_new@Base 3.3.90 ev_tmp_file_unlink@Base 3.0.2 ev_tmp_filename_unlink@Base 3.0.2 ev_tmp_uri_unlink@Base 3.0.2 ev_transition_effect_alignment_get_type@Base 3.0.2 ev_transition_effect_direction_get_type@Base 3.0.2 ev_transition_effect_get_type@Base 3.0.2 ev_transition_effect_new@Base 3.0.2 ev_transition_effect_type_get_type@Base 3.0.2 ev_xfer_uri_simple@Base 3.0.2 debian/apparmor-profile0000664000000000000000000001263012343356101012372 0ustar # vim:syntax=apparmor # Author: Kees Cook # Jamie Strandboge #include /usr/bin/evince { #include #include #include #include #include #include #include #include #include #include #include #include #include #include # Terminals for using console applications. These abstractions should ideally # have 'ix' to restrict access to what only evince is allowed to do #include # By default, we won't support launching a terminal program in Xterm or # KDE's konsole. It opens up too many unnecessary files for most users. # People who need this functionality can uncomment the following: ##include ##include /usr/bin/evince rmPx, /usr/bin/evince-previewer Px, /usr/bin/yelp Cx -> sanitized_helper, /usr/bin/bug-buddy px, # 'Show Containing Folder' (LP: #1022962) /usr/bin/nautilus Cx -> sanitized_helper, # Gnome /usr/bin/pcmanfm Cx -> sanitized_helper, # LXDE /usr/bin/krusader Cx -> sanitized_helper, # KDE /usr/bin/thunar Cx -> sanitized_helper, # XFCE # For Xubuntu to launch the browser /usr/bin/exo-open ixr, /usr/lib/@{multiarch}/xfce4/exo-1/exo-helper-1 ixr, /etc/xdg/xdg-xubuntu/xfce4/helpers.rc r, /etc/xdg/xfce4/helpers.rc r, # For text attachments /usr/bin/gedit ixr, # For Send to /usr/bin/nautilus-sendto Cx -> sanitized_helper, # allow directory listings (ie 'r' on directories) so browsing via the file # dialog works / r, /**/ r, @{HOME}/ r, # This is need for saving files in your home directory without an extension. # Changing this to '@{HOME}/** r' makes it require an extension and more # secure (but with 'rw', we still have abstractions/private-files-strict in # effect). @{HOME}/** rw, @{HOME}/.local/share/gvfs-metadata/** l, @{HOME}/.gnome2/evince/* rwl, @{HOME}/.gnome2/accels/ rw, @{HOME}/.gnome2/accelsevince rw, @{HOME}/.gnome2/accels/evince rw, # Maybe add to an abstraction? owner /{,var/}run/user/*/dconf/ w, owner /{,var/}run/user/*/dconf/user rw, # from http://live.gnome.org/Evince/SupportedDocumentFormats. Allow # read and write for all supported file formats /**.[bB][mM][pP] rw, /**.[dD][jJ][vV][uU] rw, /**.[dD][vV][iI] rw, /**.[gG][iI][fF] rw, /**.[jJ][pP][gG] rw, /**.[jJ][pP][eE][gG] rw, /**.[oO][dD][pP] rw, /**.[fFpP][dD][fF] rw, /**.[pP][nN][mM] rw, /**.[pP][nN][gG] rw, /**.[pP][sS] rw, /**.[eE][pP][sS] rw, /**.[tT][iI][fF] rw, /**.[tT][iI][fF][fF] rw, /**.[xX][pP][mM] rw, /**.[gG][zZ] rw, /**.[bB][zZ]2 rw, /**.[cC][bB][rRzZ7] rw, /**.[xX][zZ] rw, # allow creating directories that we own owner /media/**/ w, owner @{HOME}/**/ w, # evince creates a temporary stream file like '.goutputstream-XXXXXX' in the # directory a file is saved. This allows that behavior. owner /**/.goutputstream-* w, } /usr/bin/evince-previewer { #include #include #include #include #include #include #include #include #include #include #include #include #include # Terminals for using console applications. These abstractions should ideally # have 'ix' to restrict access to what only evince is allowed to do #include # By default, we won't support launching a terminal program in Xterm or # KDE's konsole. It opens up too many unnecessary files for most users. # People who need this functionality can uncomment the following: ##include /usr/bin/evince-previewer mr, /usr/bin/yelp Cx -> sanitized_helper, /usr/bin/bug-buddy px, # Lenient, but remember we still have abstractions/private-files-strict in # effect). Write is needed for 'print to file' from the previewer. @{HOME}/ r, @{HOME}/** rw, # Maybe add to an abstraction? owner /{,var/}run/user/*/dconf/ w, owner /{,var/}run/user/*/dconf/user rw, } /usr/bin/evince-thumbnailer { #include #include # The thumbnailer doesn't need access to everything in the nameservice # abstraction. Allow reading of /etc/passwd and /etc/group, but suppress # logging denial of nsswitch.conf. /etc/passwd r, /etc/group r, deny /etc/nsswitch.conf r, # TCP/UDP network access for NFS network inet stream, network inet6 stream, network inet dgram, network inet6 dgram, /usr/bin/evince-thumbnailer mr, # Lenient, but remember we still have abstractions/private-files-strict in # effect). @{HOME}/ r, @{HOME}/** rw, } debian/control.in0000664000000000000000000001641012343356101011200 0ustar Source: evince Section: gnome Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Debian GNOME Maintainers Uploaders: @GNOME_TEAM@ Build-Depends: cdbs (>= 0.4.90), debhelper (>= 8), dpkg-dev (>= 1.16.1), dh-autoreconf, intltool (>= 0.35.0), gnome-pkg-tools (>= 0.10), yelp-tools, gtk-doc-tools (>= 1.0), libx11-dev, libcairo2-dev (>= 1.10.0), libgtk-3-dev (>= 3.8.0), libgail-3-dev (>= 3.0.2), libglib2.0-dev (>= 2.36), libsecret-1-dev (>= 0.5), gnome-icon-theme (>= 2.17.1), libxml2-dev (>= 2.5.0), libsm-dev (>= 2:1.0.0), zlib1g-dev, libnautilus-extension-dev (>= 2.91.4), libpoppler-glib-dev (>= 0.24.0), libspectre-dev (>= 0.2.0), libtiff5-dev | libtiff-dev, libdjvulibre-dev (>= 3.5.17), libkpathsea-dev, libt1-dev, libgxps-dev (>= 0.2.1), autotools-dev, gobject-introspection (>= 1.0), libgirepository1.0-dev (>= 1.0), gsettings-desktop-schemas-dev, gnome-common, dh-apparmor, libgrip-dev (>= 0.3.1) Standards-Version: 3.9.3 Homepage: http://www.gnome.org/projects/evince/ Vcs-Svn: svn://anonscm.debian.org/svn/pkg-gnome/desktop/unstable/evince Vcs-Browser: http://anonscm.debian.org/viewvc/pkg-gnome/desktop/unstable/evince Package: evince Conflicts: evince-gtk Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, libevdocument3-4 (= ${binary:Version}), libevview3-3 (= ${binary:Version}), evince-common (>= ${gnome:Version}), evince-common (<< ${gnome:NextVersion}), gnome-icon-theme (>= 2.17.1), shared-mime-info, gnome-icon-theme-symbolic Recommends: dbus-x11, gvfs Provides: pdf-viewer, postscript-viewer, djvu-viewer Suggests: unrar, poppler-data, nautilus, apparmor Description: Document (PostScript, PDF) viewer Evince is a simple multi-page document viewer. It can display and print PostScript (PS), Encapsulated PostScript (EPS), DjVu, DVI, Portable Document Format (PDF) and XML Paper Specification (XPS) files. When supported by the document, it also allows searching for text, copying text to the clipboard, hypertext navigation, and table-of-contents bookmarks. Package: evince-dbg Section: debug Priority: extra Architecture: any Depends: ${misc:Depends}, evince (= ${binary:Version}), libevdocument3-4 (= ${binary:Version}), libevview3-3 (= ${binary:Version}) Description: Document (PostScript, PDF) viewer - debugging symbols Evince is a simple multi-page document viewer. It can display and print PostScript (PS), Encapsulated PostScript (EPS), DjVu, DVI, Portable Document Format (PDF) and XML Paper Specification (XPS) files. When supported by the document, it also allows searching for text, copying text to the clipboard, hypertext navigation, and table-of-contents bookmarks. . This package contains the debugging symbols needed by gdb. Package: evince-gtk Section: x11 Conflicts: evince Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, libevdocument3-4 (= ${binary:Version}), libevview3-3 (= ${binary:Version}), evince-common (>= ${gnome:Version}), evince-common (<< ${gnome:NextVersion}), gnome-icon-theme (>= 2.17.1), shared-mime-info Recommends: dbus-x11 Provides: pdf-viewer, postscript-viewer, djvu-viewer Suggests: gvfs, unrar, poppler-data, nautilus Description: Document (PostScript, PDF) viewer (GTK+ version) Evince is a simple multi-page document viewer. It can display and print PostScript (PS), Encapsulated PostScript (EPS), DjVu, DVI, Portable Document Format (PDF) and XML Paper Specification (XPS) files. When supported by the document, it also allows searching for text, copying text to the clipboard, hypertext navigation, and table-of-contents bookmarks. . This version of evince is built without GNOME keyring support. Package: evince-common Architecture: all Depends: ${misc:Depends}, gsettings-desktop-schemas Description: Document (PostScript, PDF) viewer - common files Evince is a simple multi-page document viewer. It can display and print PostScript (PS), Encapsulated PostScript (EPS), DjVu, DVI, Portable Document Format (PDF) and XML Paper Specification (XPS) files. When supported by the document, it also allows searching for text, copying text to the clipboard, hypertext navigation, and table-of-contents bookmarks. . This package contains shared files for evince and evince-gtk packages. Package: libevdocument3-4 Architecture: any Section: libs Depends: ${shlibs:Depends}, ${misc:Depends} Replaces: libevince3-3 Breaks: libevince3-3 Description: Document (PostScript, PDF) rendering library This package contains libevdocument, which performs the rendering of the documents. . It ships with a ps, pdf, dvi, tiff, djvu, comics and xps backend. Package: libevview3-3 Architecture: any Section: libs Depends: ${shlibs:Depends}, ${misc:Depends} Replaces: libevince3-3 Breaks: libevince3-3 Description: Document (PostScript, PDF) rendering library - Gtk+ widgets This package contains libevview, which provides GTK+ widgets for displaying documents. Package: libevince-dev Architecture: any Section: libdevel Depends: libevdocument3-4 (= ${binary:Version}), libevview3-3 (= ${binary:Version}), gir1.2-evince-3.0 (= ${binary:Version}), ${misc:Depends}, libgtk-3-dev (>= 3.8.0), libglib2.0-dev (>= 2.36) Description: Document (PostScript, PDF) rendering library - development files This package contains evince-related libraries for rendering and displaying Evince documents like PostScript (PS), Encapsulated PostScript (EPS), DjVu, DVI, Portable Document Format (PDF) and XML Paper Specification (XPS) files. * libevdocument, which performs the rendering of the documents * libevview, which provides GTK+ widgets for displaying documents . This package provides the development headers, static libraries and documentation. Package: gir1.2-evince-3.0 Section: introspection Architecture: any Depends: ${gir:Depends}, ${shlibs:Depends}, ${misc:Depends} Provides: gir1.2-evince-document-3.0, gir1.2-evince-view-3.0 Description: GObject introspection data for the evince libraries This package contains introspection data for the libevview and libevdocument library. . Evince is a simple multi-page document viewer. It can display and print PostScript (PS), Encapsulated PostScript (EPS), DjVu, DVI, Portable Document Format (PDF) and XML Paper Specification (XPS) files. When supported by the document, it also allows searching for text, copying text to the clipboard, hypertext navigation, and table-of-contents bookmarks. . It can be used by packages using the GIRepository format to generate dynamic bindings. debian/evince.apport0000664000000000000000000000104212343356101011663 0ustar '''apport package hook for evince (c) 2009-2011 Canonical Ltd. Author: Jamie Strandboge ''' from apport.hookutils import * from os import path import re def add_info(report): attach_conffiles(report, 'evince') attach_related_packages(report, ['apparmor', 'libapparmor1', 'libapparmor-perl', 'apparmor-utils', 'auditd', 'libaudit0']) attach_mac_events(report, ['/usr/bin/evince', '/usr/bin/evince-previewer', '/usr/bin/evince-thumbnailer']) debian/changelog0000664000000000000000000012235513210053722011045 0ustar evince (3.10.3-0ubuntu10.4) trusty-security; urgency=medium * SECURITY UPDATE: command injection in dvi backend - debian/patches/CVE-2017-1000159.patch: properly quote filename in backend/dvi/dvi-document.c. - CVE-2017-1000159 -- Marc Deslauriers Thu, 30 Nov 2017 14:11:14 -0500 evince (3.10.3-0ubuntu10.3) trusty-security; urgency=medium * SECURITY UPDATE: command injection via cbt files - debian/patches/CVE-2017-1000083.patch: disable cbt support entirely as not widely used. - CVE-2017-1000083 -- Steve Beattie Tue, 11 Jul 2017 23:00:19 -0700 evince (3.10.3-0ubuntu10.2) trusty; urgency=medium * debian/patches/slash_to_search.patch: register "slash" as a valid keybinding to start a search (lp: #1328678) -- Sebastien Bacher Mon, 09 Mar 2015 19:02:51 +0100 evince (3.10.3-0ubuntu10.1) trusty; urgency=medium * debian/patches/0001-Port-to-GMenuModel-and-add-menu-bar.patch: - use the correct "previous/next page" tooltips (lp: #1318581) [ Lars Uebernickel ] * restore keybindings that stopped working with the gmenumodel work (lp: #1313250, #1310782, #1312179) -- Sebastien Bacher Tue, 03 Jun 2014 16:25:15 +0200 evince (3.10.3-0ubuntu10) trusty; urgency=medium [ Lars Uebernickel ] * debian/patches/gtk310-secondary-keybindings.patch: - get multiple keybindings to work with gtk 3.10 (lp: #1290104) * debian/patches/0001-Port-to-GMenuModel-and-add-menu-bar.patch: "gmenumodel patch: restore zoom selector popup. It got deleted by accident in the last commit. (lp: #1289180) -- Sebastien Bacher Tue, 11 Mar 2014 18:40:10 +0100 evince (3.10.3-0ubuntu9) trusty; urgency=medium [ Lars Uebernickel ] * debian/patches/0001-Port-to-GMenuModel-and-add-menu-bar.patch: - don't show menubar in presentation mode (lp: #1283235) - restore the context menu by using gmenumodel as well there -- Sebastien Bacher Tue, 04 Mar 2014 18:11:03 +0100 evince (3.10.3-0ubuntu8) trusty; urgency=medium * debian/apparmor-profile: allow alternate file managers to nautilus when using 'Show containing folder' (LP: #1022962) -- Jamie Strandboge Wed, 26 Feb 2014 08:37:42 -0600 evince (3.10.3-0ubuntu7) trusty; urgency=medium * debian/patches/0001-Port-to-GMenuModel-and-add-menu-bar.patch: - updated to fix issue with autoreload on changes, thanks Lars Uebernickel for the update (lp: #1279755) -- Sebastien Bacher Thu, 13 Feb 2014 17:00:16 +0100 evince (3.10.3-0ubuntu6) trusty; urgency=medium * Restore working keybindings under non unity sessions, thanks Lars Uebernickel (lp: #1277370) -- Sebastien Bacher Tue, 11 Feb 2014 17:02:46 +0100 evince (3.10.3-0ubuntu5) trusty; urgency=medium * Updated previous patch to fix some issues, thanks Lars Uebernickel (lp: #1277370) -- Sebastien Bacher Fri, 07 Feb 2014 16:24:46 +0000 evince (3.10.3-0ubuntu4) trusty; urgency=medium * debian/patches/0001-Port-to-GMenuModel-and-add-menu-bar.patch: - updated to fix menus not showing in other desktops (lp: #1131664) -- Sebastien Bacher Thu, 06 Feb 2014 13:52:03 +0000 evince (3.10.3-0ubuntu3) trusty; urgency=medium * Add GMenuModel port (lp: #1131664) -- Lars Uebernickel Tue, 04 Feb 2014 15:22:45 +0000 evince (3.10.3-0ubuntu2) trusty; urgency=medium * debian/apparmor-profile.abstraction, debian/apparmor-profile: - let create directories, from the file selector, on devices mounted by the user, thanks Jamie Strandboge (lp: #1265491) - updated to allow opening/saving pdf.xz files, thanks Martin Thornton (lp: #1252771) * debian/control.in: Depends on gnome-icon-theme-symbolic (lp: #1246448) -- Sebastien Bacher Wed, 08 Jan 2014 18:24:03 +0100 evince (3.10.3-0ubuntu1) trusty; urgency=low * New upstream version -- Sebastien Bacher Mon, 18 Nov 2013 15:37:35 +0100 evince (3.10.2-0ubuntu1) trusty; urgency=low * New upstream version * debian/patches/git_give_focus_correctly.patch, debian/patches/git_correct_page_info.patch, debian/patches/git_djvu_segfault.patch: - dropped, those changes are in the new version -- Sebastien Bacher Tue, 12 Nov 2013 12:10:03 +0100 evince (3.10.0-0ubuntu3) trusty; urgency=low * Backport some fixes from git * debian/patches/CVE-2013-3718.patch: - dropped, the fix was already in the new version in a slightly different place, the patch there is not needed and creates warnings * debian/patches/git_give_focus_correctly.patch: - 'fix annotation window focus change after creation' (lp: #919965) * debian/patches/git_correct_page_info.patch: - "This fixes the page size always reported as 0x0 in the properties dialog" (lp: #1245637) * debian/patches/git_djvu_segfault.patch: - ' djvu: Fix a segfault caused by a double free' -- Sebastien Bacher Tue, 05 Nov 2013 16:09:18 +0100 evince (3.10.0-0ubuntu2) saucy; urgency=low * debian/apparmor-profile: Update evince profiles - Include the AppArmor dbus-accessibility abstraction in the evince and evince-previewer profiles to gain access to the accessibility bus (LP: #1226141) - Include the AppArmor dbus abstraction in the evince profile to gain access to the system bus for avahi and colord when printing (LP: #1235216) - Include the AppArmor dbus-session abstraction in the evince-thumbnailer profile to gain access to the session bus (LP: #1236082) -- Tyler Hicks Sun, 06 Oct 2013 14:26:18 -0700 evince (3.10.0-0ubuntu1) saucy; urgency=low * New upstream version -- Sebastien Bacher Mon, 30 Sep 2013 13:47:16 +0200 evince (3.9.90-0ubuntu1) saucy; urgency=low * New upstream release -- Luke Yelavich Wed, 28 Aug 2013 07:51:41 +1000 evince (3.9.5-0ubuntu1~saucy1) saucy; urgency=medium * New upstream release * debian/libevdocument3-4.symbols, libevview3-3.symbols: updated -- Tim Lunn Fri, 09 Aug 2013 21:14:49 +1000 evince (3.9.4-0ubuntu1~saucy1) saucy; urgency=medium * New upstream release * debian/control.in: bump b-d on glib, gtk and poppler * debian/patches/11_grip_gestures.patch: Refreshed * debian/libevdocument3-4.symbols, libevview3-3.symbols: updated -- Tim Lunn Wed, 24 Jul 2013 20:08:56 +1000 evince (3.8.2-0ubuntu4) saucy; urgency=low * SECURITY UPDATE: denial of service and possible code execution via missing page number check - debian/patches/CVE-2013-3718.patch: check number of pages in libview/ev-view.c. - CVE-2013-3718 -- Marc Deslauriers Thu, 06 Jun 2013 13:36:38 -0400 evince (3.8.2-0ubuntu3) saucy; urgency=low * Rebuild again, the new library is published this time... -- Sebastien Bacher Thu, 30 May 2013 13:10:46 +0200 evince (3.8.2-0ubuntu2) saucy; urgency=low * Rebuild with the new poppler soname -- Sebastien Bacher Thu, 30 May 2013 11:29:11 +0200 evince (3.8.2-0ubuntu1) saucy; urgency=medium * Upload to saucy based on the work from the GNOME3 ppa, thanks Rico * The new version fixes those issues: - "use nautilus's frame for thumbnails" (lp: #155726) - "When +Scroll zooming, include Page Width, Fit Page" (lp: #254519) - "Fix rendering of the first visible page while resizing" (lp: #349670) - "Allow case-sensitive and/or regexp search in evince" (lp: #360152) - "When manually zooming below 50% Evince still shows 50% as the zoom level." (lp: #653911) - "can´t resize side pane" (lp: #704232) - "incorrectly reports document Location in its Properties if there are % in filename" (lp: #1112641) [ Rico Tzschichholz ] * New upstream release * debian/control: - Bump build-depends on libgtk-3-dev (>= 3.7.5), Add libsecret-1-dev (>= 0.5) and drop libgnome-keyring-dev * debian/libevdocument3-4.symbols,libevview3-3.symbols: - Updated * debian/patches: - Drop 03_nodisplay.patch, upstream * debian/patches/11_grip_gestures.patch: - Refreshed -- Sebastien Bacher Tue, 28 May 2013 13:43:47 +0200 evince (3.6.1-1ubuntu1) raring; urgency=low * Resynchronize on Debian * debian/apparmor-profile: * debian/apparmor-profile.abstraction: * debian/evince.apport: * debian/evince-common.dirs: - Ubuntu apparmor profile * debian/control: - Build-Depend on dh-apparmor, use tiff5 rather than tiff4 - Suggests on apparmor * debian/rules: - install apparmor files - save some space by not shipping the synctex screencast. * debian/patches/11_grip_gestures.patch: - supports pinch to zoom, rotate, and drag gestures -- Sebastien Bacher Mon, 12 Nov 2012 16:36:53 +0100 evince (3.6.1-1) experimental; urgency=low * Team upload. * debian/patches/03_nodisplay.patch: add upstream and Debian bug references * New upstream release (Closes: #690792) - update symbols files, dropping some removed private symbols - update build-dependencies - help is now in yelp format -- Simon McVittie Mon, 22 Oct 2012 18:47:56 +0100 evince (3.4.0-3) unstable; urgency=low [ Josselin Mouette ] * Build with all hardening flags. Closes: #678995. * Add corresponding build-dependency on a recent dpkg-dev. [ Michael Biebl ] * Build against poppler 0.18. [ Jeremy Bicha ] * Fix typo in package description * Have libevdocument3-4 break/replace libevince3-3 too (LP: #1018543) [ Josselin Mouette ] * Re-add evince.mime with only application/pdf supported. Closes: #658139. -- Michael Biebl Thu, 30 Aug 2012 02:27:50 +0200 evince (3.4.0-2) unstable; urgency=low * Upload to unstable. -- Michael Biebl Tue, 15 May 2012 14:35:31 +0200 evince (3.4.0-1) experimental; urgency=low * New upstream release. * Wrap dependencies. * Remove obsolete Replaces. * Drop explicit Build-Depends on gir packages. * Don't bother setting a shlibs version for dh_makeshlibs since we use a symbols file, use "-V -- -c4" instead. * Bump Standards-Version to 3.9.3. * Split libevince3-3 into libevdocument3-4 and libevview3-3 as libevdocument had a soname bump but libevview did not, so they are no longer in sync. We still keep a single -dev and gir package for convenience sake. * Mention support for XPS documents in the package description. -- Michael Biebl Thu, 19 Apr 2012 15:22:50 +0200 evince (3.3.90-1) experimental; urgency=low * New upstream development release. * Change section of gir1.2-evince-3.0 to introspection. * Tighten dependency beetwen libevince-dev and gir1.2-evince-3.0. * Exclude /usr/lib/nautilus/ and /usr/lib/evince/ from dh_makeshlibs. * debian/patches/01_poppler-0.16-compat.patch: Keep evince compiling against 0.16 so we don't require 0.18. Thanks Pino Toscano for the patch. * Enable XPS support. * Add symbols file for libevince3-3. -- Michael Biebl Sat, 10 Mar 2012 17:36:20 +0100 evince (3.2.1-1) unstable; urgency=low [ Jordi Mallach ] * Make Vcs-* fields point at the unstable branch. [ Michael Biebl ] * New upstream release. -- Michael Biebl Tue, 18 Oct 2011 00:32:54 +0200 evince (3.2.0-2) unstable; urgency=low * Upload to unstable. * debian/watch: Switch to .xz tarballs. -- Michael Biebl Thu, 13 Oct 2011 19:58:23 +0200 evince (3.2.0-1) experimental; urgency=low [ Josselin Mouette ] * 03_nodisplay.patch: drop NoDisplay=true from the desktop file, so that it appears in the shell. Closes: #427576. [ Michael Biebl ] * New upstream release. * Remove patches: - debian/patches/00_gir-libdocument-library-path.patch, merged upstream. - debian/patches/01_configure-gdk-targets.patch, merged upstream. - debian/patches/02-link-missing-zlib-library.patch, fixed upstream. * debian/control: - Add Vcs-* fields. -- Michael Biebl Tue, 04 Oct 2011 07:19:28 +0200 evince (3.0.2-2) experimental; urgency=low [ Josselin Mouette ] * evince-gtk.mime: removed too. Really closes: #627027. * Add missing Replaces/Breaks against libevince3. Closes: #632733. [ Michael Biebl ] * Rely on cdbs to call dh_girepository. Bump Build-Depends accordingly. * Bump debhelper compatibility level to 8. * debian/patches/02-link-missing-zlib-library.patch: Fix build failure with binutils-gold (missing -lz). Closes: #638689 * Remove desktop-check-mime-types call from debian/rules. -- Michael Biebl Sun, 28 Aug 2011 20:04:11 +0200 evince (3.0.2-1) experimental; urgency=low [ Josselin Mouette ] * bug-presubj: please document where to report rendering bugs. * evince.mime: dropped. We have desktop files to handle MIME associations, no need to maintain an alternate system by hand. Closes: #619564, #627027, #551734, #581441. [ Sebastien Bacher ] * debian/evince-commin.install: install the thumbnailer entry [ Michael Biebl ] * New upstream release. * debian/patches/01_configure-gdk-targets.patch: Update configure check for smclient support. With GDK 3.0 the target variable was renamed to targets. -- Michael Biebl Thu, 30 Jun 2011 02:58:49 +0200 evince (3.0.0-3) experimental; urgency=low [ Josselin Mouette ] * Drop unneeded build-dependency on gir-repository-dev. -- Frederic Peters Wed, 20 Apr 2011 08:15:04 +0200 evince (3.0.0-2) experimental; urgency=low * debian/control.in: add dependency on gsettings-desktop-schemas -- Frederic Peters Thu, 14 Apr 2011 16:20:57 +0200 evince (3.0.0-1) experimental; urgency=low * New upstream release. [ Josselin Mouette ] * Fix indentation in package description. Closes: #609770. [ Emilio Pozuelo Monfort ] * debian/rules: - Don't put evince-gtk's debugging symbols in evince-dbg, as they clash with those from evince itself. Closes: #610856. [ Frederic Peters ] * debian/control.in: + Update list of build dependencies for new release. + Make the -dev package depend on the gir package. + Add build-dependency on dh-autoreconf. + Update libevince3-3 description to note the removal of the pixbuf and impress backends. + Update evince-gtk description as evince doesn't depend on GConf. * debian/rules: + include dh-autoreconf + update configure flags (pixbuf and impress backends have been removed). * debian/patches/01_dvi_security.patch: removed, upstream. * debian/patches/00_gir-libdocument-library-path.patch: fix call to g-ir-scanner to make it find libdocument3. * debian/evince-common.install: install GSettings schemas. -- Frederic Peters Thu, 14 Apr 2011 15:28:56 +0200 evince (2.32.0-1) unstable; urgency=low * New upstream release. * Refresh debian/patches/02_link_ice.patch. * debian/patches/03_dvi_security_CVE-2010-0433.patch: - Fix another buffer overflow in the dvi-backend. CVE-2010-0433 Patch cherry-picked from upstream Git. Closes: #614668 * debian/control.in - Drop Build-Depends on libdbus-glib-1-dev (ported to GDBus). - Bump Build-Depends on libgtk2.0-dev to (>= 2.21.5). - Bump Build-Depends on libglib2.0-dev to (>= 2.25.11). - Bump Build-Depends on libpoppler-glib-dev to (>= 0.14.0). - Add Build-Depends on libcairo2-dev (>= 1.9.10) and libgail-dev (>= 2.21.5). - Bump Standards-Version to 3.9.2. No further changes. * Update libevince for soname bump from 2 → 3. * debian/evince-common.install: - Install gsettings schemas and gconf conversion script. * debian/patches/06_new_poppler_api_update.patch - Update pdf_document_get_info to new poppler API. Patch cherry-picked from upstream Git. * Bump debhelper compatibility level to 7. - Update Build-Depends on debhelper. - Strip debian/tmp/ from .install files. * debian/watch: Switch to .bz2 tarballs. * Use dh_lintian to install the override files. -- Michael Biebl Thu, 30 Jun 2011 01:29:48 +0200 evince (2.30.3-3) unstable; urgency=low [ Josselin Mouette ] * Fix indentation in package description. Closes: #609770. [ Emilio Pozuelo Monfort ] * debian/rules: - Don't put evince-gtk's debugging symbols in evince-dbg, as they clash with those from evince itself. Closes: #610856. * Remove gir1.0-evince-2.30 since nothing uses it, to ease the gir1.2 transition. * debian/patches/02_link_ice.patch: - Link against libICE since eggsmclient uses it. * Use dh-autoreconf for the above patch. -- Emilio Pozuelo Monfort Wed, 16 Feb 2011 21:22:17 +0000 evince (2.30.3-2) unstable; urgency=medium * Fix PostScript capitalization. Closes: #591872. * 01_dvi_security.patch: security fix from upstream git. CVE-2010-2640, CVE-2010-2641, CVE-2010-2642 and CVE-2010-2643. Closes: #609534. -- Josselin Mouette Mon, 10 Jan 2011 19:03:57 +0100 evince (2.30.3-1) unstable; urgency=low * Fix description for the GIR package. Closes: #587646. * New upstream release. + Can open files with # in their name. Closes: #580739. * 01_dotdir_crash.patch: dropped, merged upstream. -- Josselin Mouette Wed, 07 Jul 2010 20:31:24 +0200 evince (2.30.1-3) unstable; urgency=low * Switch to 3.0 source format. * 01_dotdir_crash.patch: stolen upstream. Fix a crash when .gnome2/evince doesn’t exist. Closes: #580647, #583569. -- Josselin Mouette Sat, 29 May 2010 11:15:27 +0200 evince (2.30.1-2) unstable; urgency=low * Upload to unstable. -- Sebastian Dröge Mon, 03 May 2010 13:53:23 +0200 evince (2.30.1-1) experimental; urgency=low * New upstream bugfix release: + debian/rules: - Update shlibs version because of API changes. -- Sebastian Dröge Wed, 28 Apr 2010 14:27:18 +0200 evince (2.30.0-2) experimental; urgency=low * debian/evince.install, debian/rules: + Ship the evinced and evince-convert-metadata programs. -- Sebastian Dröge Thu, 08 Apr 2010 16:53:12 +0200 evince (2.30.0-1) experimental; urgency=low * New upstream stable release: + debian/control.in, debian/rules, debian/libevince[12].install, debian/lintian/libevince[12]: - Update for new soname. + debian/control.in: - Update build dependencies. + debian/control.in, debian/rules, debian/gir1.0-evince-2.30.install, debian/libevince-dev.install: - Enable GObject-Introspection support. + debian/*.mime: - Add application/x-cbt. -- Sebastian Dröge Thu, 08 Apr 2010 06:11:38 +0200 evince (2.28.2-1) unstable; urgency=low * New upstream release. -- Emilio Pozuelo Monfort Fri, 18 Dec 2009 14:20:46 +0100 evince (2.28.1-1) unstable; urgency=low * New upstream release. * Standards-Version is 3.8.3, no changes needed. -- Emilio Pozuelo Monfort Thu, 22 Oct 2009 21:14:02 +0200 evince (2.28.0-2) unstable; urgency=low * Remove the libgs-dev dependency now that libspectre has been fixed. * Upload to unstable. -- Josselin Mouette Sat, 17 Oct 2009 11:28:54 +0200 evince (2.28.0-1) experimental; urgency=low * New upstream release. * Disable D-Bus in the GTK+ build. * Add missing -dev dependencies. * Bump shlibs for libevince1. * 01_fix_last_page_in_presentations.patch, 60_gzdvi-support.patch: dropped, merged upstream. * Add build-dependency on libgs-dev because of the broken libspectre.la. -- Josselin Mouette Fri, 25 Sep 2009 19:06:36 +0200 evince (2.26.2-2) unstable; urgency=low [ Emilio Pozuelo Monfort ] * debian/patches/60_gzdvi-support.patch: forwarded, add headers. * debian/patches/01_fix_last_page_in_presentations.patch: Backport change from upstream to fix last page in presentation mode being skipped. Closes: #537156. * Standards-Version is 3.8.2, no changes needed. * evince-gtk shouldn't be in the gnome section. Closes: #528467. -- Josselin Mouette Sat, 15 Aug 2009 10:56:01 +0200 evince (2.26.2-1) unstable; urgency=low [ Luca Bruno ] * New upstream release. * debian/control.in: - Split libevince1, libevince-dev and libevince-doc to expose evince rendering and widgets development API. These packages include libevdocument and libevview libraries. - Split evince-backends which files are shared by evince and evince-gtk binary packages. - Split evince-common containing platform-independent files shared between evince and evince-gtk packages. * debian/evince.manpages, debian/evince-gtk.manpages: - Moved to evince-common.manpages as they shared the evince-thumbnailer manpage and because evince manpage is installed by evince-common. * debian/rules: - Install under debian/tmp by default. - Enable gtk-doc, added install rule for evince-common to delete gtk-doc files. - Link evince and evince-gtk docs to evince-common docs. * debian/lintian/{evince-backends, evince-common, libevince1, libevince-dev, libevince-doc}: - Added. [ Josselin Mouette ] * Don’t install any .la’s, and only the relevant .a’s. * Use ${gnome:Depends}. * Remove evince-gtk-dbg, the differences with evince are minor now and it will not work with the backends. Let’s hope the build-ids come soon to fix that mess. * Don’t split the docs, given their size. * Ship the backends with the library; the library needs them anyway, and they are in a correctly versioned directory. * Install evince-thumbnailer.1 in evince-common. * Install the XPM in evince-common. * Fixup some dependencies. * Don’t use symlinks for /usr/share/doc, it would require the postinst dance. * Correctly remove the doc from evince-common. -- Josselin Mouette Wed, 10 Jun 2009 22:41:12 +0200 evince (2.26.1-2) unstable; urgency=low * Update build dependencies to the current version. Closes: #528717. * Enable t1lib support. -- Josselin Mouette Fri, 15 May 2009 01:53:41 +0200 evince (2.26.1-1) unstable; urgency=low [ Josselin Mouette ] * Section of evince-dbg is debug. [ Luca Bruno ] * New upstream release + Remember page setup options too. Closes: #430913. + Show a confirmation dialog when there are pending print jobs while closing the main window. Closes: #469304. + Clamp top/bottom values of destinations to make sure they are not bigger than the page height. Closes: #513150. * debian/rules: delete libevdocument.so and libevview.so dev links. * debian/control.in: + Build-Depends version bumps: - libglib2.0-dev to 2.18.0. - libgtk2.0-dev to 2.12.0. - libgnome-keyring-dev to 2.22.0. + Update Standards-Version to 3.8.1. No changes needed. [ Josselin Mouette ] * Remove useless build-dependency on libglade. * New upstream release. * Add lintian override for versionless GPL, we link to both. * Reinstate evince-gtk, since we can now disable GConf and gnome-keyring. * Don’t install .la and .a files in the moved places. * Remove files in the install/evince* targets so that GConf schemas are removed. -- Josselin Mouette Thu, 14 May 2009 08:27:03 +0200 evince (2.24.2-2) unstable; urgency=low [ Josselin Mouette ] * Add missing build-dependency on libgconf2-dev. Closes: #512540. [ Emilio Pozuelo Monfort ] * Upload to unstable * Let evince-dbg depend on ${misc:Depends} [ Josselin Mouette ] * Revert the nautilus requirement, it will be handled later by binNMUs. -- Josselin Mouette Sun, 15 Mar 2009 13:54:00 +0100 evince (2.24.2-1) experimental; urgency=low [ Josselin Mouette ] * README.Debian: document that you need to install poppler-data. Closes: #506836. [ Marc 'HE' Brockschmidt ] * debian/control: Make the Gnome team maintainer. I'm not doing the job anyway. [ Josselin Mouette ] * New upstream release. * Require nautilus 2.22 to build the extension for the correct version. -- Josselin Mouette Wed, 31 Dec 2008 16:41:58 +0100 evince (2.24.1-1) experimental; urgency=low * New upstream release. + Control+N opens a new window. Closes: #479760. + Does not hang on corrupt djvu files. Closes: #477571. + Copies links to the primary selection. Closes: #469579. + More helpful error messages. Closes: #496487. + Control+Insert copies text. Closes: #463836. * Update build-dependencies. * Remove evince-gtk, the libgnome dependency has disappeared now. * evince provides evince-gtk. * Don’t generate dependencies for the nautilus extension. * Suggest nautilus. * 01_external_libgnome.patch: removed, gio is the default now. * Recommend gvfs. * 02_fix_saving_images.patch: dropped, merged upstream. * Add application/x-cb7 to supported MIME types. -- Josselin Mouette Fri, 14 Nov 2008 12:37:55 +0100 evince (2.22.2-4) unstable; urgency=low [ Loic Minier ] * Depend on shared-mime-info for MIME type detection via g_content_type_guess(); see LP #208729 and GNOME #554563. [ Emilio Pozuelo Monfort ] * debian/patches/02_fix_saving_images.patch: - Patch from upstream r3159, fix saving images duplicating the extension. Closes: #497935. * debian/control.in: - No need to have one Homepage field for each package. Move it to the source stanza. - Update Standards-Version to 3.8.0. No changes needed. -- Emilio Pozuelo Monfort Sun, 19 Oct 2008 15:49:19 +0200 evince (2.22.2-3) unstable; urgency=low [ Loic Minier ] * Let evince and evince-gtk provide djvu-viewer; closes: #493360. [ Josselin Mouette ] * Suggest poppler-data. -- Josselin Mouette Thu, 18 Sep 2008 14:29:13 +0200 evince (2.22.2-2) unstable; urgency=low * 01_external_libgnome.patch: use libgnome to launch external links instead of GIO, which requires gvfs installed for it to work. This is a temporary measure until gvfs becomes used by default in nautilus. Closes: #484032. -- Josselin Mouette Fri, 18 Jul 2008 17:16:23 +0200 evince (2.22.2-1) unstable; urgency=low * New upstream bugfix release. -- Sebastian Dröge Mon, 02 Jun 2008 13:12:37 +0200 evince (2.22.1.1-3) unstable; urgency=low * Upload to unstable. -- Josselin Mouette Tue, 27 May 2008 12:14:13 +0200 evince (2.22.1.1-2) experimental; urgency=low * debian/control.in: + Rebuild against new poppler >= 0.8.0. -- Sebastian Dröge Tue, 20 May 2008 12:13:16 +0200 evince (2.22.1.1-1) experimental; urgency=low * New upstream bugfix release. -- Sebastian Dröge Wed, 09 Apr 2008 08:46:03 +0200 evince (2.22.1-1) experimental; urgency=low * New upstream bugfix release: + debian/patches/60_gzdvi-support.patch: - Updated, most parts are applied upstream now. + debian/patches/99_autoreconf.patch: - Dropped, merged upstream. -- Sebastian Dröge Mon, 07 Apr 2008 19:18:30 +0200 evince (2.22.0-1) experimental; urgency=low [ Loic Minier ] * Fix mailcap entry for gzip and bzip2-compressed PDF files; thanks Tanguy Ortolo; closes: #470891. * Wrap deps. [ Josselin Mouette ] * Fix watch file to only take stable versions into account. * Recommend dbus-x11. Closes: #460984. [ Marc 'HE' Brockschmidt ] * debian/control: + Move Homepage information to a proper control field from the long description. + Bump Standards-Version to 3.7.3 (no changes needed) * debian/copyright: Convert to UTF8 * New upstream version: Upload to experimental due to extensive changes + debian/control: - Switch from gnomevfs to gvfs - Switch from gs to libspectre, remove deps (Closes: #466619, #455645) - Update descriptions for gs -> libspectre change by removing borings hints about what renderer is used + debian/patches/60_gzdvi-support.patch: - Updated for the new backend plugin system + debian/patches/99_autoreconf.patch: - Updated for the new version. -- Marc 'HE' Brockschmidt Fri, 14 Mar 2008 14:57:17 +0100 evince (2.20.2-1) unstable; urgency=low * New upstream bugfix release: + debian/patches/99_autoreconf.patch: - Updated for the new version. -- Sebastian Dröge Tue, 27 Nov 2007 05:44:45 +0100 evince (2.20.1-2) unstable; urgency=low * Simplify the build process by installing directly the stuff in debian/evince(-gtk). This way dh_* are executed in the correct order, and this fixes the GConf schemas installation. Closes: #448640. * Update the menu files to the new layout. * Upload to unstable; drop check-dist include. -- Josselin Mouette Sat, 17 Nov 2007 11:48:11 +0100 evince (2.20.1-1) experimental; urgency=low * New upstream bugfix release: + debian/patches/99_autoreconf.patch: - Updated for the new version. -- Sebastian Dröge Tue, 30 Oct 2007 13:13:35 +0100 evince (2.20.0-1) experimental; urgency=low [Loic Minier] * Build-depend on gnome-pkg-tools >= 0.12 and call desktop-check-mime-types to check for missing MIME types; update MIME types. * Add application/x-pdf to evince.mime; closes: #431370. [ Josselin Mouette ] * 60_gzdvi-support: add support for bzip2 compressed DVI files (closes: #432445). Thanks Géraud Meyer. [ Sebastian Dröge ] * New upstream release: + debian/patches/10-comics_fix_INCLUDES.patch: - Dropped, merged upstream. + debian/control.in: - Build depend on poppler >= 0.6 + debian/patches/60_gzdvi-support.patch: - Updated for new upstream version. + debian/patches/99_autoreconf.patch: - Regenerated. * debian/control.in: + Add build dependency on autotools-dev. * debian/evince.mime: + Add bzip2 compressed DVI mimetype. -- Sebastian Dröge Thu, 04 Oct 2007 10:12:45 +0200 evince (0.9.0-1) experimental; urgency=low * New upstream release. New features include: + Printing support in djvu documents + Optional drop of libgnome dependency + Print button for preview mode + Remember print settings + History button improvements Some bugfixes: + Fixes for issues with fullscreen toolbar + Fix for crash in comics backend when filename contains quote + Fix unhelpful messages on invalid URLs. (Closes: #415692) * Added needed magic to provide gtk-only packages (evince-gtk and evince-gtk-dbg). (Closes: #399439) * debian/patches/10-comics_fix_INCLUDES.patch: Added to work around Gnome #439925) -- Marc 'HE' Brockschmidt Sun, 20 May 2007 12:47:56 +0200 evince (0.8.1-2) unstable; urgency=low * Upload to unstable; drop check-dist include. * debian/control.in: * Wrap build-depends and re-order them * Replace b-d on "libkpathsea4-dev | libkpathsea-dev" by "libkpathsea-dev", which is a real package nowadays. * Add Suggests: unrar * Fix little oversight in evince-dbg description * Remove unneeded librsvg2-common build-dep that was only there to soothe sbuild. * debian/copyright: Drop GFDL include, point to the common-licenses one. -- Marc 'HE' Brockschmidt Wed, 02 May 2007 15:22:31 +0200 evince (0.8.1-1) experimental; urgency=low * New upstream version: + debian/copyright: Updated + debian/control: Add explicit dep on librsvg2-common from experimental to allow autobuilding. -- Marc 'HE' Brockschmidt Mon, 09 Apr 2007 23:17:21 +0200 evince (0.8.0-1) experimental; urgency=low [ Loic Minier ] * Fix watch file to track all releases and use HTTP. * Add a get-orig-source target to retrieve the upstream tarball. * Recommend gnome-icon-theme for the icon used in the .desktop file. * Include the new check-dist Makefile to prevent accidental uploads to unstable; bump build-dep on gnome-pkg-tools to >= 0.10. [ Marc 'HE' Brockschmidt ] * Move to debhelper compat level 5. * Add evince-dbg with the debugging symbols. With the number of crashes, this seems to be needed quite often. * Add evince.xpm (converted from the evince.png in the package) to be installed as menu icon. (Closes: #391194) * Put my name in the Maintainer field. * Update and fix debian/copyright. * Add manpage for evince-thumbnailer and install it. * New upstream release: + debian/control: - Updated (build-)depends (Closes: #332633, #373162) - Add dependency on gnome-icon-theme (>= 2.17.1), as evince uses some icons from there. + debian/evince.1: Remove our manpage, upstream included one. + debian/patches/10_CVE-2006-5864.patch: Removed, included upstream. + Upstream changes: - Fixed PS security problem. (Closes: #400904) - Fixed printing of multiple copies. (Closes: #401172) - Added support for compressed document types. (Closes: #329620, #388188, #395119, #412613) - Reworked printing dialog, allowing to print only even/odd pages and fixing various problems. (Closes: #402398, #355845) - Fixed various problems happening when trying to reload documents. (Closes: #388368, #396467, #405130) - Fixed mime type detection to use file data, not the file name. (Closes: #327769, #368351) - Fixed fullscreen/presentation mode problems. The toolbar is now only displayed on relevant (virtual) screens, zooming works properly. (Closes: #399906) - Fixed generation of thumbnail images to not provide RGBA, but only RGB images. (Closes: #367612) - Fixed documentation to clear up the "scroll by dragging the mouse" feature. (Closes: #384749) - Fixed page-(down|up) behaviour in Dual View-mode. (Closes: #359143) - Fixed display of foreign character sets like japanese (Closes: #379105) - Fixed a bunch of rendering quirks (Closes: #383399, #394124) - Add support for a bookmark system that defaults to opening a file on the page it was closed before. (Closes: #342839) -- Marc 'HE' Brockschmidt Sat, 24 Mar 2007 17:57:56 +0100 evince (0.6.1-1) experimental; urgency=low * Bump libgnomeui-dev build-dep to >= 2.14.1-2 for the Gtk transition. * New upstream release. - Bump libpoppler-glib-dev build-dep to >= 0.5.4. -- Loic Minier Wed, 11 Oct 2006 14:00:53 +0200 evince (0.6.0-1) experimental; urgency=low [ Sebastien Bacher ] * debian/watch: - updated [ Loic Minier ] * Fix bashism. [ Josselin Mouette ] * New upstream release. * Bump needed build-dependencies. * Remove libgnomeprint requirements. * Build-depend on GTK+ 2.10 and force use of GTK-print. * Build-depend on libdbus-glib-1-dev and libdbus-glib-1-dev. * Enable pixbuf, comics and impress backends. * Require intltool 0.35.0. * 04_gdk_threads_init.patch: removed, integrated upstream. -- Josselin Mouette Sat, 9 Sep 2006 22:43:08 +0200 evince (0.5.3-1) experimental; urgency=low [ Sebastien Bacher ] * New upstream versions: - fix a typo to the documentation (Closes: #320266) - odd pages are placed to the right in dual page mode (Closes: #356040) - store window settings by document (Closes: #327408) * Patches from the Ubuntu package: * debian/patches/03_presentation_change_page.patch: - fix previous and next keys usage to presentation mode (GNOME: #332993) * debian/patches/04_gdk_threads_init.patch: - call gdk_threads_init, fix issues when using an authentification dialog (Ubuntu: #343347) * debian/patches/05_fix_build_with_djvulibre.patch: - fix build with the new djvulibre * debian/control.in: - Build-Depends on gnome-doc-utils and gnome-keyring according to configure - Depends on "gs-esp | gs" (Closes: #335108) - updated djvulibre requirement according to the configure - updated the description to mention poppler instead of xpdf (Closes: #332197) - updated the poppler requirement to build with the new soname * debian/evince.mime: - list dvi and djvu, change suggested by Pierre THIERRY (Closes: #337784) [ Josselin Mouette ] * Even newer upstream release. * 03_presentation_change_page.patch, 05_fix_build_with_djvulibre.patch: removed, integrated upstream. -- Josselin Mouette Sun, 18 Jun 2006 16:40:50 +0200 evince (0.4.0-5) unstable; urgency=low * Recommend gnome-icon-theme for the icon used in the .desktop file. * Convert the default PNG icon for evince of gnome-icon-theme to XPM as debian/evince.xpm; install it in /usr/share/pixmaps; update menu entry. -- Loic Minier Tue, 16 Jan 2007 17:07:37 +0100 evince (0.4.0-4) unstable; urgency=low [ Marc 'HE' Brockschmidt ] * debian/patches/21_fix_doc_typo.patch: Fix typo in documentation. (Closes: #320266) -- Marc 'HE' Brockschmidt Fri, 12 Jan 2007 13:56:37 +0100 evince (0.4.0-3) unstable; urgency=high * SECURITY: new patch, 10_CVE-2006-5864.patch, fixes a buffer overflow in the PostScript processor; thanks Kees Cook; CVE-2006-5864; (Closes: #402063). -- Loic Minier Thu, 7 Dec 2006 22:09:17 +0100 evince (0.4.0-2) unstable; urgency=low * Build-depend on libkpathsea4-dev | libkpathsea-dev instead of libkpathsea-dev, thanks Frank Küster. (Closes: #357262) [debian/control, debian/control.in] * Bump up Standards-Version to 3.7.2. [debian/control, debian/control.in] -- Loic Minier Tue, 30 May 2006 13:47:04 +0200 evince (0.4.0-1) unstable; urgency=low * New upstream version: (Closes: #311134) - Document properties (Closes: #300761). - Document rotation (Closes: #294555). - Fix the number of pages for some ps files (Closes: #309905). - Fix zoom value update (Closes: #310089). - Support for printing page ranges (Closes: #299453). - Update of the mimetype list (Closes: #308378). - Updated translations (Closes: #308727). * debian/control.in: - updated the Build-Depends. - updated the Standards-Version. * debian/rules: - clean the static files for the nautilus properties page. - don't update scrollkeeper files on build. -- Sebastien Bacher Tue, 6 Sep 2005 17:38:16 +0200 evince (0.3.0-2) unstable; urgency=low * debian/control.in: - updated the Build-Depends and the description. * debian/rules: - build with djvu and dvi options (Closes: #308021). * debian/watch: - updated. -- Sebastien Bacher Sat, 7 May 2005 14:40:25 +0200 evince (0.3.0-1) unstable; urgency=low * New upstream version: - Continous mode. - Dual page mode. - Control + Scroll does zooming. - Shift + Scroll scrolls horizontally. - Zoom control in the toolbar. -- Sebastien Bacher Sat, 7 May 2005 12:55:06 +0200 evince (0.2.1-1) unstable; urgency=low * New upstream version (Closes: #306615): - fix the crasher on copy (Closes: #294511). * debian/control.in: - updated. * debian/evince.menu: - menu entry (Closes: #297560). * debian/evince.mime: - register with the mimesystem (Closes: #303887). * debian/watch: - new file. -- Sebastien Bacher Fri, 6 May 2005 15:01:45 +0200 evince (0.1.5-2) unstable; urgency=low * Rebuilt for the libhowl transition (Closes: #298807). * debian/control.in: - updated the gnome-vfs requirements. -- Sebastien Bacher Thu, 10 Mar 2005 19:44:16 +0100 evince (0.1.5-1) unstable; urgency=low * New upstream release: - reload menu. - support for DnD of files. * debian/control.in: - Depends on gs (Closes: #294512). - Description update based on the text sent by Andre Lehovich (Closes: #294519). - Provides pdf-viewer, postscript-viewer (Closes: #294516). * debian/evince.xml, debian/evince.1: - manpage written by Lars Wirzenius with some changes by Andre Lehovich (Closes: #295095). * po/pt_BR.po: - translation update by Fábio Brito d'Araújo e Oliveira . -- Sebastien Bacher Sat, 26 Feb 2005 23:34:50 +0100 evince (0.1.4-1) unstable; urgency=low * New upstream release: - epiphany like fullscreen mode. - save chromes state between sessions. - improve toolbar layout and icons. - really fix postscript rendering. * debian/control.in: - don't mention DVI in the description (Closes: #294011). - typos fix in the description (Closes: #294348). -- Sebastien Bacher Wed, 9 Feb 2005 15:13:54 +0100 evince (0.1.3-1) unstable; urgency=low * New upstream release. -- Sebastien Bacher Sat, 5 Feb 2005 01:55:16 +0100 evince (0.1.2-1) unstable; urgency=low * Upload to unstable. * New upstream release. -- Sebastien Bacher Fri, 4 Feb 2005 14:53:13 +0100 evince (0.1.1-1) experimental; urgency=low * Initial Release. -- Sebastien Bacher Mon, 24 Jan 2005 13:21:42 +0100 debian/libevdocument3-4.lintian-overrides0000664000000000000000000000024612343356101015634 0ustar #Our copyright file is more complex, but correct: libevdocument3-4: copyright-without-copyright-notice libevdocument3-4: copyright-refers-to-versionless-license-file debian/evince-common.install0000664000000000000000000000035112343356101013314 0ustar debian/evince.xpm /usr/share/pixmaps/ usr/share/dbus-1 usr/share/help usr/share/evince usr/share/icons usr/share/man usr/share/applications usr/share/locale usr/share/thumbnailers usr/share/glib-2.0/schemas usr/share/GConf/gsettings debian/evince-thumbnailer.xml0000664000000000000000000000551712343356101013501 0ustar
he@debian.org
Marc Brockschmidt 2007-01-15
evince-thumbnailer 1 evince-thumbnailer create png thumbnails from PostScript and PDF documents evince-thumbnailer -s size input output DESCRIPTION evince-thumbnailer is a GNOME program to create thumbnails from PostScript (PS), Portable Document Format (PDF), DjVu and DVI files. OPTIONS evince obeys all normal GNOME and GTK+ command line options. The only option -s size makes it possible to choose the vertical size of the created thumbnail. SEE ALSO evince 1, gnome-options 7, gtk-options 7. http://www.gnome.org/projects/evince/
debian/libevince-dev.lintian-overrides0000664000000000000000000000024012343356101015256 0ustar #Our copyright file is more complex, but correct: libevince-dev: copyright-without-copyright-notice libevince-dev: copyright-refers-to-versionless-license-file debian/libevdocument3-4.install0000664000000000000000000000014612343356101013643 0ustar usr/lib/libevdocument*.so.* usr/lib/evince/*/backends/*.so usr/lib/evince/*/backends/*.evince-backend debian/source/0000775000000000000000000000000012343356101010466 5ustar debian/source/format0000664000000000000000000000001412343356101011674 0ustar 3.0 (quilt) debian/compat0000664000000000000000000000000212343356101010364 0ustar 8 debian/libevview3-3.lintian-overrides0000664000000000000000000000023612343356101014766 0ustar #Our copyright file is more complex, but correct: libevview3-3: copyright-without-copyright-notice libevview3-3: copyright-refers-to-versionless-license-file debian/evince-common.dirs0000664000000000000000000000007312343356101012610 0ustar etc/apparmor.d/abstractions usr/share/apport/package-hooks debian/evince-dbg.lintian-overrides0000664000000000000000000000023212343356101014546 0ustar #Our copyright file is more complex, but correct: evince-dbg: copyright-without-copyright-notice evince-dbg: copyright-refers-to-versionless-license-file debian/bug-presubj0000664000000000000000000000122312343356101011334 0ustar = Reporting bugs for evince The evince software doesn’t do any rendering itself, but instead relies on software libraries that do the job. Unfortunately, due to lack of manpower, bugs in these libraries cannot be dealt with in Debian. Therefore, if you encounter a bug in a PDF rendering, please report it upstream: https://bugs.freedesktop.org/enter_bug.cgi?product=poppler The same holds for PostScript rendering: https://bugs.freedesktop.org/enter_bug.cgi?product=libspectre If you want to report a bug in Evince itself, not related to a specific document, please go ahead. -- Josselin Mouette Wed, 11 May 2011 20:50:41 +0200 debian/patches/0000775000000000000000000000000013210053717010616 5ustar debian/patches/11_grip_gestures.patch0000664000000000000000000003210412343356101015021 0ustar --- a/configure.ac +++ b/configure.ac @@ -329,6 +329,17 @@ AC_DEFINE([HAVE_DESKTOP_SCHEMAS], [1], [Whether GSettings Desktop Schemas are available]) fi +# **************** +# Open Input Framework (optional) +# **************** +GRIP_REQUIRED=0.3.0 + +AC_ARG_WITH([libgrip], AC_HELP_STRING([--with-libgrip], [enable libgrip support]), [], [with_libgrip=no]) +AS_IF([test "x$with_libgrip" = "xyes"],[ + PKG_CHECK_MODULES([LIBGRIP], [libgrip >= $GRIP_REQUIRED], + [AC_DEFINE(HAVE_LIBGRIP, 1, [libgrip support])]) +]) + dnl Debug mode AC_ARG_ENABLE([debug], @@ -353,8 +364,8 @@ AC_SUBST(LIBDOCUMENT_CFLAGS) AC_SUBST(LIBDOCUMENT_LIBS) -LIBVIEW_CFLAGS="$LIBVIEW_CFLAGS $GTKUNIXPRINT_CFLAGS $DEBUG_FLAGS" -LIBVIEW_LIBS="$LIBVIEW_LIBS $GTKUNIXPRINT_LIBS -lm" +LIBVIEW_CFLAGS="$LIBVIEW_CFLAGS $GTKUNIXPRINT_CFLAGS $LIBGRIP_CFLAGS $DEBUG_FLAGS" +LIBVIEW_LIBS="$LIBVIEW_LIBS $GTKUNIXPRINT_LIBS $LIBGRIP_LIBS -lm" AC_SUBST(LIBVIEW_CFLAGS) AC_SUBST(LIBVIEW_LIBS) @@ -848,5 +859,6 @@ Keyring integration ......: $with_keyring Session Manager client ...: $with_smclient GTK+ Unix Print ..........: $with_gtk_unix_print +Libgrip gestures..........: $with_libgrip ]) --- a/libview/ev-view-private.h +++ b/libview/ev-view-private.h @@ -209,6 +209,18 @@ /* Accessibility */ AtkObject *accessible; +#ifdef HAVE_LIBGRIP + /* Gesture state */ + gboolean enable_gestures; + gdouble drag_start_x; + gdouble drag_start_y; + gdouble pinch_start_x; + gdouble pinch_start_y; + gdouble pinch_start_radius; + gdouble pinch_start_scale; + gdouble rotate_start; +#endif + /* Caret navigation */ gboolean caret_enabled; gint cursor_offset; --- a/libview/ev-view.c +++ b/libview/ev-view.c @@ -28,6 +28,10 @@ #include #include +#ifdef HAVE_LIBGRIP +#include +#endif + #include "ev-mapping-list.h" #include "ev-document-forms.h" #include "ev-document-images.h" @@ -74,6 +78,9 @@ PROP_VSCROLL_POLICY, PROP_CAN_ZOOM_IN, PROP_CAN_ZOOM_OUT +#ifdef HAVE_LIBGRIP + ,PROP_ENABLE_GESTURES +#endif }; static guint signals[N_SIGNALS]; @@ -99,6 +106,11 @@ #define ZOOM_IN_FACTOR 1.2 #define ZOOM_OUT_FACTOR (1.0/ZOOM_IN_FACTOR) +#ifdef HAVE_LIBGRIP +#define GESTURE_DRAG_VELOCITY 1.0 +#define GESTURE_ROTATE_ANGLE 1.0 +#endif + #define SCROLL_TIME 150 #define DEFAULT_PIXBUF_CACHE_SIZE 52428800 /* 50MB */ @@ -287,6 +299,14 @@ /*** Caret navigation ***/ static void ev_view_check_cursor_blink (EvView *ev_view); +/*** Gestures ***/ +#ifdef HAVE_LIBGRIP +static void _oif_ev_gesture_callback (GtkWidget *widget, + GripTimeType time_type, + GripGestureEvent *event, + gpointer user_data); +#endif + G_DEFINE_TYPE_WITH_CODE (EvView, ev_view, GTK_TYPE_CONTAINER, G_IMPLEMENT_INTERFACE (GTK_TYPE_SCROLLABLE, NULL)) @@ -3434,6 +3454,123 @@ } } +#ifdef HAVE_LIBGRIP + +static void +_oif_ev_gesture_callback (GtkWidget *widget, + GripTimeType time_type, + GripGestureEvent *event, + gpointer user_data) + { + EvView *view = EV_VIEW (widget); + + if (time_type == GRIP_TIME_START) { + switch (event->type) { + case GRIP_GESTURE_DRAG: { + GripEventGestureDrag *drag = (GripEventGestureDrag *)event; + + view->drag_start_x = drag->position_x; + view->drag_start_y = drag->position_y; + + break; + } + + case GRIP_GESTURE_PINCH: { + GripEventGesturePinch *pinch = (GripEventGesturePinch *)event; + + view->pinch_start_x = pinch->focus_x; + view->pinch_start_y = pinch->focus_y; + view->pinch_start_radius = pinch->radius; + view->pinch_start_scale = ev_document_model_get_scale(view->model); + break; + } + + case GRIP_GESTURE_ROTATE: { + GripEventGestureRotate *rotate = (GripEventGestureRotate *)event; + view->rotate_start = rotate->angle; + break; + } + + default: + break; + } + } else if (time_type == GRIP_TIME_END) { + switch (event->type) { + case GRIP_GESTURE_DRAG: { + GripEventGestureDrag *drag = (GripEventGestureDrag *)event; + + if (abs(drag->velocity_y) > abs(drag->velocity_x)) { + if (drag->velocity_y >= GESTURE_DRAG_VELOCITY && + drag->position_y > view->drag_start_y) { + ev_view_previous_page (view); + } else if (drag->velocity_y <= -GESTURE_DRAG_VELOCITY && + drag->position_y < view->drag_start_y) { + ev_view_next_page (view); + } + } else { + if (drag->velocity_x >= GESTURE_DRAG_VELOCITY && + drag->position_x > view->drag_start_x) { + ev_view_previous_page (view); + } else if (drag->velocity_x <= -GESTURE_DRAG_VELOCITY && + drag->position_x < view->drag_start_x) { + ev_view_next_page (view); + } + } + + break; + } + + default: + break; + } + } else { + switch (event->type) { + case GRIP_GESTURE_PINCH: { + GripEventGesturePinch *pinch = (GripEventGesturePinch *)event; + gdouble zoom_factor = pinch->radius / view->pinch_start_radius; + + view->pending_scroll = SCROLL_TO_KEEP_POSITION; + ev_document_model_set_scale(view->model, + view->pinch_start_scale * zoom_factor); + break; + + } + + case GRIP_GESTURE_DRAG: { + GripEventGestureDrag *drag = (GripEventGestureDrag *)event; + + gdouble delta_x = -drag->delta_x; + gdouble delta_y = -drag->delta_y; + _oif_ev_view_drag (view, delta_x, delta_y); + break; + } + + case GRIP_GESTURE_ROTATE: { + GripEventGestureRotate *rotate = (GripEventGestureRotate *)event; + gint rotation = ev_document_model_get_rotation (view->model); + gdouble cumulative_rotate = rotate->angle - view->rotate_start; + + if (cumulative_rotate >= GESTURE_ROTATE_ANGLE) { + ev_document_model_set_rotation (view->model, + rotation + 90); + view->rotate_start = rotate->angle; + } else if (cumulative_rotate <= -GESTURE_ROTATE_ANGLE) { + ev_document_model_set_rotation (view->model, + rotation - 90); + view->rotate_start = rotate->angle; + } + + break; + } + + default: + break; + } + } +} + +#endif + /*** GtkWidget implementation ***/ static void @@ -5996,6 +6133,11 @@ case PROP_VSCROLL_POLICY: g_value_set_enum (value, view->vscroll_policy); break; +#ifdef HAVE_LIBGRIP + case PROP_ENABLE_GESTURES: + g_value_set_boolean (value, view->enable_gestures); + break; +#endif default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -6030,6 +6172,41 @@ view->vscroll_policy = g_value_get_enum (value); gtk_widget_queue_resize (GTK_WIDGET (view)); break; +#ifdef HAVE_LIBGRIP + case PROP_ENABLE_GESTURES: + view->enable_gestures = g_value_get_boolean (value); + + if (view->enable_gestures) { + grip_gesture_manager_register_window ( + grip_gesture_manager_get(), + GTK_WIDGET (view), + GRIP_GESTURE_PINCH, + GRIP_DEVICE_ALL, + 2, + _oif_ev_gesture_callback, + NULL, NULL); + + grip_gesture_manager_register_window ( + grip_gesture_manager_get(), + GTK_WIDGET (view), + GRIP_GESTURE_DRAG, + GRIP_DEVICE_TOUCHSCREEN, + 2, + _oif_ev_gesture_callback, + NULL, NULL); + + grip_gesture_manager_register_window ( + grip_gesture_manager_get(), + GTK_WIDGET (view), + GRIP_GESTURE_ROTATE, + GRIP_DEVICE_ALL, + 2, + _oif_ev_gesture_callback, + NULL, NULL); + } + + break; +#endif default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -6335,6 +6512,16 @@ G_TYPE_INT, G_TYPE_INT); +#ifdef HAVE_LIBGRIP + g_object_class_install_property (object_class, + PROP_ENABLE_GESTURES, + g_param_spec_boolean ("enable-gestures", + "Enable gestures", + "Whether to enable gestures", + TRUE, + G_PARAM_WRITABLE)); +#endif + binding_set = gtk_binding_set_by_class (class); add_move_binding_keypad (binding_set, GDK_KEY_Left, 0, GTK_MOVEMENT_VISUAL_POSITIONS, -1); @@ -7038,6 +7225,50 @@ ev_document_model_set_scale (view->model, scale); } +#ifdef HAVE_LIBGRIP +void +_oif_ev_view_drag (EvView *view, + gdouble x, + gdouble y) +{ + gdouble value; + + value = gtk_adjustment_get_value (view->vadjustment); + value = CLAMP (value + y, 0, + gtk_adjustment_get_upper (view->vadjustment) - gtk_adjustment_get_page_size (view->vadjustment)); + gtk_adjustment_set_value (view->vadjustment, value); + + value = gtk_adjustment_get_value (view->hadjustment); + value = CLAMP (value + x, 0, + gtk_adjustment_get_upper (view->hadjustment) - gtk_adjustment_get_page_size (view->hadjustment)); + gtk_adjustment_set_value (view->hadjustment, value); +} + +void +_oif_ev_view_zoom_in_smooth (EvView *view, float factor) +{ + gdouble scale; + + g_return_if_fail (view->sizing_mode == EV_SIZING_FREE); + + view->pending_scroll = SCROLL_TO_CENTER; + scale = ev_document_model_get_scale (view->model) * factor; + ev_document_model_set_scale (view->model, scale); +} + +void +_oif_ev_view_zoom_out_smooth (EvView *view, float factor) +{ + gdouble scale; + + g_return_if_fail (view->sizing_mode == EV_SIZING_FREE); + + view->pending_scroll = SCROLL_TO_CENTER; + scale = ev_document_model_get_scale (view->model) * factor; + ev_document_model_set_scale (view->model, scale); +} +#endif + void ev_view_zoom_in (EvView *view) { --- a/libview/ev-view.h +++ b/libview/ev-view.h @@ -111,6 +111,17 @@ gint page, GdkRectangle *page_area, GtkBorder *border); + +#ifdef HAVE_LIBGRIP +void _oif_ev_view_drag (EvView *view, + gdouble x, + gdouble y); +void _oif_ev_view_zoom_in_smooth (EvView *view, + float factor); +void _oif_ev_view_zoom_out_smooth (EvView *view, + float factor); +#endif + /* Annotations */ void ev_view_focus_annotation (EvView *view, EvMapping *annot_mapping); --- a/shell/ev-application.c +++ b/shell/ev-application.c @@ -64,6 +64,9 @@ #ifdef WITH_SMCLIENT EggSMClient *smclient; #endif +#ifdef HAVE_LIBGRIP + gboolean gestures_enabled; +#endif }; struct _EvApplicationClass { @@ -115,6 +118,20 @@ NULL); } +#ifdef HAVE_LIBGRIP +gboolean +_oif_ev_application_get_gestures_enabled (EvApplication *application) +{ + return application->gestures_enabled; +} + +void +_oif_ev_application_set_gestures_enabled (EvApplication *application, gboolean enabled) +{ + application->gestures_enabled = enabled; +} +#endif + /* Session */ gboolean ev_application_load_session (EvApplication *application) --- a/shell/ev-application.h +++ b/shell/ev-application.h @@ -71,6 +71,11 @@ const gchar *ev_application_get_dot_dir (EvApplication *application, gboolean create); +#ifdef HAVE_LIBGRIP +gboolean _oif_ev_application_get_gestures_enabled (EvApplication *application); +void _oif_ev_application_set_gestures_enabled (EvApplication *application, + gboolean enabled); +#endif void ev_application_show_help (EvApplication *application, GdkScreen *screen, --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -7549,6 +7549,10 @@ gtk_widget_show (ev_window->priv->view_box); ev_window->priv->view = ev_view_new (); +#ifdef HAVE_LIBGRIP + g_object_set(ev_window->priv->view, "enable-gestures", + _oif_ev_application_get_gestures_enabled (EV_APP), NULL); +#endif page_cache_mb = g_settings_get_uint (ev_window_ensure_settings (ev_window), GS_PAGE_CACHE_SIZE); ev_view_set_page_cache_size (EV_VIEW (ev_window->priv->view), --- a/shell/main.c +++ b/shell/main.c @@ -59,6 +59,9 @@ static gboolean unlink_temp_file = FALSE; static gchar *print_settings; static const char **file_arguments = NULL; +#ifdef HAVE_LIBGRIP +static gboolean disable_gestures = FALSE; +#endif static gboolean @@ -84,6 +87,9 @@ { "find", 'l', 0, G_OPTION_ARG_STRING, &ev_find_string, N_("The word or phrase to find in the document"), N_("STRING")}, { "unlink-tempfile", 'u', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE, &unlink_temp_file, NULL, NULL }, { "print-settings", 't', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_FILENAME, &print_settings, NULL, NULL }, +#ifdef HAVE_LIBGRIP + { "disable-gestures", 'g', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE, &disable_gestures, NULL, NULL }, +#endif { "version", 0, G_OPTION_FLAG_NO_ARG | G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_CALLBACK, option_version_cb, NULL, NULL }, { G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &file_arguments, NULL, N_("[FILE…]") }, { NULL } @@ -322,6 +328,9 @@ } ev_application_load_session (application); +#ifdef HAVE_LIBGRIP + _oif_ev_application_set_gestures_enabled (EV_APP, !disable_gestures); +#endif load_files (file_arguments); /* Change directory so we don't prevent unmounting in case the initial cwd debian/patches/series0000664000000000000000000000044713210053713012034 0ustar 11_grip_gestures.patch git_Don-t-allow-Send-To-when-there-is-no-mail-client-ava.patch 0001-Port-to-GMenuModel-and-add-menu-bar.patch 0002-Don-t-use-gtk_application_set_accels_for_action.patch gtk310-secondary-keybindings.patch slash_to_search.patch CVE-2017-1000083.patch CVE-2017-1000159.patch debian/patches/0002-Don-t-use-gtk_application_set_accels_for_action.patch0000664000000000000000000001662712343356101023542 0ustar From 6781213261c36f4f6c417b06da630a49484faab4 Mon Sep 17 00:00:00 2001 From: Lars Uebernickel Date: Mon, 10 Feb 2014 18:13:56 +0100 Subject: [PATCH] Don't use gtk_application_set_accels_for_action() Gtk 3.10 doesn't have this function. Change that to use gtk_application_add_accelerator. Also add the accelerators to menus.xml so that they show up in the UI. (It should be enough to only add them to menus.xml, but gtk doesn't seem to pick those up. It's not worth fixing that bug as the accelerator handling is revamped in 3.12 and the this workaround works fine.) --- shell/ev-application.c | 2 +- shell/menus.ui | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) Index: evince-3.10.3/shell/ev-application.c =================================================================== --- evince-3.10.3.orig/shell/ev-application.c 2014-04-29 16:09:07.319931409 +0200 +++ evince-3.10.3/shell/ev-application.c 2014-04-29 16:09:33.031931585 +0200 @@ -1193,7 +1193,17 @@ it = action_accels; while (it[0]) { - gtk_application_set_accels_for_action (GTK_APPLICATION (application), it[0], &it[1]); + gchar *action; + GVariant *target; + + if (g_action_parse_detailed_name (it[0], &action, &target, NULL)) + { + gtk_application_add_accelerator (GTK_APPLICATION (application), it[1], action, target); + + g_free (action); + if (target) + g_variant_unref (target); + } it += g_strv_length ((gchar **) it) + 1; } } Index: evince-3.10.3/shell/menus.ui =================================================================== --- evince-3.10.3.orig/shell/menus.ui 2014-04-29 16:09:07.319931409 +0200 +++ evince-3.10.3/shell/menus.ui 2014-04-29 16:09:07.311931409 +0200 @@ -23,6 +23,7 @@ _Open app.open + <Ctrl>O
@@ -33,6 +34,7 @@ _Help app.help + F1
@@ -52,36 +54,43 @@ Side _Pane win.show-side-pane + F9
_Fullscreen win.fullscreen + F11 Pre_sentation win.presentation + F5
Rotate _Left win.rotate-left + <Ctrl>Left Rotate _Right win.rotate-right + <Ctrl>Right
Zoom _In win.zoom-in + <Ctrl>plus Zoom _Out win.zoom-out + <Ctrl>minus
@@ -92,12 +101,14 @@ _Inverted Colors win.inverted-colors + <Ctrl>I
_Reload win.reload + <Ctrl>R
@@ -107,10 +118,12 @@ _Open… app.open + <Ctrl>O Op_en a Copy win.open-copy + <Ctrl>N _Recent @@ -120,6 +133,7 @@ _Save a Copy… win.save-copy + <Ctrl>S Send _To… @@ -132,22 +146,26 @@ _Print… win.print + <Ctrl>P
P_roperties… win.show-properties + <Alt>Return
_Copy win.copy + <Ctrl>C Select _All win.select-all + <Ctrl>A
@@ -160,22 +178,26 @@ _First Page win.go-first-page + <Ctrl>Home _Last Page win.go-last-page + <Ctrl>End
_Add Bookmark win.add-bookmark + <Ctrl>D
_Close win.close + <Ctrl>W
debian/patches/slash_to_search.patch0000664000000000000000000000273312477360105015013 0ustar Index: evince-3.10.3/shell/ev-application.c =================================================================== --- evince-3.10.3.orig/shell/ev-application.c +++ evince-3.10.3/shell/ev-application.c @@ -1119,6 +1119,7 @@ ev_application_startup (GApplication *ga "win.close", "W", NULL, "win.escape", "Escape", NULL, "win.find", "F", "slash", NULL, + "win.find2", "slash", NULL, "win.find-next", "G", NULL, "win.find-previous", "G", NULL, "win.select-page", "L", NULL, Index: evince-3.10.3/shell/ev-window.c =================================================================== --- evince-3.10.3.orig/shell/ev-window.c +++ evince-3.10.3/shell/ev-window.c @@ -6675,6 +6675,7 @@ ev_window_init (EvWindow *ev_window) { "go-forward", ev_window_activate_go_forward_action, NULL, NULL, NULL }, { "go-backwards", ev_window_activate_go_backward_action, NULL, NULL, NULL }, { "find", activate_toggle_action, NULL, "false", ev_window_change_find_action_state }, + { "find2", activate_toggle_action, NULL, "false", ev_window_change_find_action_state }, { "find-next", ev_window_activate_find_next_action, NULL, NULL, NULL }, { "find-previous", ev_window_activate_find_previous_action, NULL, NULL, NULL }, { "select-page", ev_window_activate_select_page_action, NULL, NULL, NULL }, debian/patches/workaround_notes_color_issue.patch0000664000000000000000000000105212343356101017645 0ustar diff -Nur evince-3.6.1/libview/ev-annotation-window.c evince-3.6.1.new/libview/ev-annotation-window.c --- evince-3.6.1/libview/ev-annotation-window.c 2012-06-24 16:30:36.000000000 +0200 +++ evince-3.6.1.new/libview/ev-annotation-window.c 2013-01-25 15:11:08.734467181 +0100 @@ -145,7 +145,6 @@ properties = gtk_style_properties_new (); gtk_style_properties_set (properties, 0, - "color", &rgba, "background-color", &rgba, NULL); debian/patches/CVE-2017-1000083.patch0000664000000000000000000000701513131335323013455 0ustar From 717df38fd8509bf883b70d680c9b1b3cf36732ee Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Thu, 6 Jul 2017 20:02:00 +0200 Subject: [PATCH] comics: Remove support for tar and tar-like commands When handling tar files, or using a command with tar-compatible syntax, to open comic-book archives, both the archive name (the name of the comics file) and the filename (the name of a page within the archive) are quoted to not be interpreted by the shell. But the filename is completely with the attacker's control and can start with "--" which leads to tar interpreting it as a command line flag. This can be exploited by creating a CBT file (a tar archive with the .cbt suffix) with an embedded file named something like this: "--checkpoint-action=exec=bash -c 'touch ~/hacked;'.jpg" CBT files are infinitely rare (CBZ is usually used for DRM-free commercial releases, CBR for those from more dubious provenance), so removing support is the easiest way to avoid the bug triggering. All this code was rewritten in the development release for GNOME 3.26 to not shell out to any command, closing off this particular attack vector. This also removes the ability to use libarchive's bsdtar-compatible binary for CBZ (ZIP), CB7 (7zip), and CBR (RAR) formats. The first two are already supported by unzip and 7zip respectively. libarchive's RAR support is limited, so unrar is a requirement anyway. Discovered by Felix Wilhelm from the Google Security Team. https://bugzilla.gnome.org/show_bug.cgi?id=784630 [backported to evince 3.10 -- sbeattie] CVE-2017-1000083 --- backend/comics/comics-document.c | 40 --------------------------------------- configure.ac | 2 - 2 files changed, 2 insertions(+), 40 deletions(-) Index: b/backend/comics/comics-document.c =================================================================== --- a/backend/comics/comics-document.c +++ b/backend/comics/comics-document.c @@ -56,8 +56,7 @@ typedef enum RARLABS, GNAUNRAR, UNZIP, - P7ZIP, - TAR + P7ZIP } ComicBookDecompressType; typedef struct _ComicsDocumentClass ComicsDocumentClass; @@ -117,9 +116,6 @@ static const ComicBookDecompressCommand /* 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); @@ -422,15 +405,6 @@ comics_check_decompress_command (gchar comics_document->command_usage = P7ZIP; return TRUE; } - } else if (!strcmp (mime_type, "application/x-cbt") || - !strcmp (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; - } } else { g_set_error (error, EV_DOCUMENT_ERROR, Index: b/configure.ac =================================================================== --- a/configure.ac +++ b/configure.ac @@ -785,7 +785,7 @@ AC_SUBST(TIFF_MIME_TYPES) EVINCE_MIME_TYPES="${EVINCE_MIME_TYPES}image/tiff;" fi if test "x$enable_comics" = "xyes"; then - EVINCE_MIME_TYPES="${EVINCE_MIME_TYPES}application/x-cbr;application/x-cbz;application/x-cb7;application/x-cbt;" + EVINCE_MIME_TYPES="${EVINCE_MIME_TYPES}application/x-cbr;application/x-cbz;application/x-cb7;" fi if test "x$enable_xps" = "xyes"; then EVINCE_MIME_TYPES="${EVINCE_MIME_TYPES}application/oxps;application/vnd.ms-xpsdocument;" debian/patches/0001-Port-to-GMenuModel-and-add-menu-bar.patch0000664000000000000000000052114112343356101020550 0ustar From 2e12bde40c4b9b4433caea9015bd63df3907dad2 Mon Sep 17 00:00:00 2001 From: Lars Uebernickel Date: Thu, 30 Jan 2014 15:13:13 +0100 Subject: [PATCH 1/2] Port to GMenuModel and add menu bar --- shell/Makefile.am | 7 +- shell/ev-application.c | 325 ++++++++- shell/ev-application.h | 8 + shell/ev-bookmarks.c | 8 + shell/ev-bookmarks.h | 1 + shell/ev-recent-menu-model.c | 108 +++ shell/ev-recent-menu-model.h | 30 + shell/ev-sidebar-bookmarks.c | 32 +- shell/ev-toolbar.c | 164 +++-- shell/ev-utils.c | 89 +++ shell/ev-utils.h | 7 + shell/ev-window.c | 1498 +++++++++++++----------------------------- shell/ev-window.h | 2 +- shell/evince-appmenu.ui | 10 + shell/evince-ui.xml | 88 --- shell/evince.gresource.xml | 3 +- shell/menus.ui | 188 ++++++ shell/traditional-menus.ui | 229 +++++++ 18 files changed, 1591 insertions(+), 1206 deletions(-) create mode 100644 shell/ev-recent-menu-model.c create mode 100644 shell/ev-recent-menu-model.h create mode 100644 shell/menus.ui create mode 100644 shell/traditional-menus.ui Index: evince-3.10.3/shell/Makefile.am =================================================================== --- evince-3.10.3.orig/shell/Makefile.am 2014-04-28 15:33:25.038869346 +0200 +++ evince-3.10.3/shell/Makefile.am 2014-04-28 15:33:25.022869346 +0200 @@ -75,6 +75,8 @@ ev-sidebar-page.h \ ev-sidebar-thumbnails.c \ ev-sidebar-thumbnails.h \ + ev-recent-menu-model.c \ + ev-recent-menu-model.h \ main.c nodist_evince_SOURCES = \ @@ -172,12 +174,13 @@ EXTRA_DIST = \ evince.css \ - evince-appmenu.ui \ evince-icon.rc \ evince-ui.xml \ evince.gresource.xml \ ev-gdbus.xml \ - ev-daemon-gdbus.xml + ev-daemon-gdbus.xml \ + menus.ui \ + traditional-menus.ui ev-resources.c: evince.gresource.xml Makefile $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies --sourcedir $(srcdir) $(srcdir)/evince.gresource.xml) $(AM_V_GEN) XMLLINT=$(XMLLINT) $(GLIB_COMPILE_RESOURCES) --target $@ --sourcedir $(srcdir) --generate-source --c-name ev $< Index: evince-3.10.3/shell/ev-application.c =================================================================== --- evince-3.10.3.orig/shell/ev-application.c 2014-04-28 15:33:25.038869346 +0200 +++ evince-3.10.3/shell/ev-application.c 2014-04-28 15:33:30.000000000 +0200 @@ -42,6 +42,9 @@ #include "ev-application.h" #include "ev-file-helpers.h" #include "ev-stock-icons.h" +#include "ev-utils.h" +#include "ev-document-factory.h" +#include "ev-recent-menu-model.h" #ifdef ENABLE_DBUS #include "ev-gdbus-generated.h" @@ -54,6 +57,8 @@ gchar *uri; gchar *dot_dir; + GSettings *settings; + GMenu *bookmarks_menu; #ifdef ENABLE_DBUS EvEvinceApplication *skeleton; @@ -1028,15 +1033,118 @@ } static void +app_about_cb (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) +{ + EvApplication *application = user_data; + + ev_application_show_about (application); +} + +static void +app_open_cb (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) +{ + EvApplication *application = user_data; + + ev_application_open (application); +} + +static void +app_open_file_cb (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) +{ + EvApplication *application = user_data; + + ev_application_open_uri_at_dest (application, g_variant_get_string (parameter, NULL), + gdk_screen_get_default (), NULL, 0, NULL, + GDK_CURRENT_TIME); +} + +static void +ev_application_dispose (GObject *object) +{ + EvApplication *app = EV_APPLICATION (object); + + g_clear_object (&app->settings); + + G_OBJECT_CLASS (ev_application_parent_class)->dispose (object); +} + +static void +ev_application_update_bookmarks_menu (EvApplication *application) +{ + GtkWindow *window; + + /* The bookmarks menu has two sections: the first one contains + * the "Add Bookmark" menu item and the second one is filled + * with the active window's bookmarks. + */ + + if (g_menu_model_get_n_items (G_MENU_MODEL (application->bookmarks_menu)) == 2) + g_menu_remove (application->bookmarks_menu, 1); + + window = gtk_application_get_active_window (GTK_APPLICATION (application)); + if (window) { + g_menu_append_section (application->bookmarks_menu, NULL, + ev_window_get_bookmarks_menu (EV_WINDOW (window))); + } +} + +static void ev_application_startup (GApplication *gapplication) { const GActionEntry app_menu_actions[] = { + { "open", app_open_cb, NULL, NULL, NULL }, + { "open-file", app_open_file_cb, "s", NULL, NULL }, + { "about", app_about_cb, NULL, NULL, NULL }, { "help", app_help_cb, NULL, NULL, NULL }, }; + const gchar *action_accels[] = { + "app.open", "O", NULL, + "win.open-copy", "N", NULL, + "win.save-copy", "S", NULL, + "win.print", "P", NULL, + "win.copy", "C", "Insert", NULL, + "win.select-all", "A", NULL, + "win.save-settings", "T", NULL, + "win.go-first-page", "Home", NULL, + "win.go-last-page", "End", NULL, + "win.add-bookmark", "D", NULL, + "win.close", "W", NULL, + "win.escape", "Escape", NULL, + "win.find", "F", "slash", NULL, + "win.find-next", "G", NULL, + "win.find-previous", "G", NULL, + "win.select-page", "L", NULL, + "win.go-backward", "Page_Up", NULL, + "win.go-forward", "Page_Down", NULL, + "win.go-next-page", "Page_Down", "n", NULL, + "win.go-previous-page", "Page_Up", "p", NULL, + "win.sizing-mode::fit-page", "f", NULL, + "win.sizing-mode::fit-width", "w", NULL, + "win.open-menu", "F10", NULL, + "win.caret-navigation", "F7", NULL, + "win.zoom-in", "plus", "plus", "KP_Add", "KP_Add", "equal", NULL, + "win.zoom-out", "minus", "minus", "KP_Subtract", "KP_Subtract", NULL, + "win.show-side-pane", "F9", NULL, + "win.fullscreen", "F11", NULL, + "win.presentation", "F5", NULL, + "win.rotate-left", "Left", NULL, + "win.rotate-right", "Right", NULL, + "win.inverted-colors", "I", NULL, + "win.reload", "R", NULL, + NULL + }; + EvApplication *application = EV_APPLICATION (gapplication); GtkBuilder *builder; GError *error = NULL; + const gchar **it; G_APPLICATION_CLASS (ev_application_parent_class)->startup (gapplication); @@ -1045,12 +1153,49 @@ application); builder = gtk_builder_new (); - gtk_builder_add_from_resource (builder, "/org/gnome/evince/shell/ui/appmenu.ui", &error); - g_assert_no_error (error); - gtk_application_set_app_menu (GTK_APPLICATION (application), - G_MENU_MODEL (gtk_builder_get_object (builder, "appmenu"))); + if (ev_application_has_traditional_menus (application)) + { + GMenu *recent_section; + GMenuModel *recent_menu_model; + + gtk_builder_add_from_resource (builder, "/org/gnome/evince/shell/ui/traditional-menus.ui", &error); + g_assert_no_error (error); + + gtk_application_set_menubar (GTK_APPLICATION (application), + G_MENU_MODEL (gtk_builder_get_object (builder, "menubar"))); + + recent_menu_model = ev_recent_menu_model_new (gtk_recent_manager_get_default (), + "app.open-file", + g_get_application_name ()); + + recent_section = G_MENU (gtk_builder_get_object (builder, "recent")); + g_menu_append_section (recent_section, NULL, recent_menu_model); + + application->bookmarks_menu = G_MENU (gtk_builder_get_object (builder, "bookmarks")); + g_signal_connect_swapped (application, "notify::active-window", + G_CALLBACK (ev_application_update_bookmarks_menu), application); + ev_application_update_bookmarks_menu (application); + + g_object_unref (recent_menu_model); + } + else + { + gtk_builder_add_from_resource (builder, "/org/gnome/evince/shell/ui/menus.ui", &error); + g_assert_no_error (error); + + gtk_application_set_app_menu (GTK_APPLICATION (application), + G_MENU_MODEL (gtk_builder_get_object (builder, "appmenu"))); + } + g_object_unref (builder); + + it = action_accels; + while (it[0]) + { + gtk_application_set_accels_for_action (GTK_APPLICATION (application), it[0], &it[1]); + it += g_strv_length ((gchar **) it) + 1; + } } static void @@ -1155,8 +1300,11 @@ static void ev_application_class_init (EvApplicationClass *ev_application_class) { + GObjectClass *object_class = G_OBJECT_CLASS (ev_application_class); GApplicationClass *g_application_class = G_APPLICATION_CLASS (ev_application_class); + object_class->dispose = ev_application_dispose; + g_application_class->startup = ev_application_startup; g_application_class->activate = ev_application_activate; g_application_class->shutdown = ev_application_shutdown; @@ -1175,6 +1323,8 @@ if (!g_file_test (ev_application->dot_dir, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR)) ev_application_migrate_config_dir (ev_application); + ev_application->settings = g_settings_new ("org.gnome.Evince"); + ev_application_init_session (ev_application); ev_application_accel_map_load (ev_application); @@ -1274,3 +1424,170 @@ gtk_show_uri (screen, uri, gtk_get_current_event_time (), NULL); g_free (uri); } + +/** + * ev_application_show_about: + * @application: an #EvApplication + * + * Shows an about dialog for @application with the most recently + * focussed window as transient parent. + */ +void +ev_application_show_about (EvApplication *application) +{ + const char *authors[] = { + "Martin Kretzschmar ", + "Jonathan Blandford ", + "Marco Pesenti Gritti ", + "Nickolay V. Shmyrev ", + "Bryan Clark ", + "Carlos Garcia Campos ", + "Wouter Bolsterlee ", + "Christian Persch ", + NULL + }; + + const char *documenters[] = { + "Nickolay V. Shmyrev ", + "Phil Bull ", + "Tiffany Antpolski ", + NULL + }; + + const char *license[] = { + N_("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 Software Foundation; either version 2 of the License, or " + "(at your option) any later version.\n"), + N_("Evince is distributed in the hope that it will be useful, " + "but WITHOUT ANY WARRANTY; without even the implied warranty of " + "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the " + "GNU General Public License for more details.\n"), + N_("You should have received a copy of the GNU General Public License " + "along with Evince; if not, write to the Free Software Foundation, Inc., " + "51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n") + }; + + char *license_trans; + +#ifdef ENABLE_NLS + const char **p; + + for (p = authors; *p; ++p) + *p = _(*p); + + for (p = documenters; *p; ++p) + *p = _(*p); +#endif + + license_trans = g_strconcat (_(license[0]), "\n", _(license[1]), "\n", + _(license[2]), "\n", NULL); + + gtk_show_about_dialog ( + gtk_application_get_active_window (GTK_APPLICATION (application)), + "name", _("Evince"), + "version", VERSION, + "copyright", + _("© 1996–2012 The Evince authors"), + "license", license_trans, + "website", "http://www.gnome.org/projects/evince", + "authors", authors, + "documenters", documenters, + "translator-credits", _("translator-credits"), + "logo-icon-name", "evince", + "wrap-license", TRUE, + NULL); + + g_free (license_trans); +} + +static void +ev_application_open_dialog_response (GtkWidget *chooser, + gint response_id, + gpointer user_data) +{ + if (response_id == GTK_RESPONSE_OK) { + GSList *uris; + + ev_file_chooser_save_folder (GTK_FILE_CHOOSER (chooser), + G_USER_DIRECTORY_DOCUMENTS); + + uris = gtk_file_chooser_get_uris (GTK_FILE_CHOOSER (chooser)); + + ev_application_open_uri_list (EV_APP, uris, + gtk_widget_get_screen (chooser), + gtk_get_current_event_time ()); + + g_slist_foreach (uris, (GFunc)g_free, NULL); + g_slist_free (uris); + } + + gtk_widget_destroy (chooser); +} + +/** + * ev_application_open: + * @application: an #EvApplication + * + * Shows an open dialog and opens the chosen document(s) in new windows. + * + * The dialog's parent will be the most recently focussed window of + * @application. + */ +void +ev_application_open (EvApplication *application) +{ + GtkWidget *chooser; + GtkWindow *active_window; + + active_window = gtk_application_get_active_window (GTK_APPLICATION (application)); + + chooser = gtk_file_chooser_dialog_new (_("Open Document"), + active_window, + GTK_FILE_CHOOSER_ACTION_OPEN, + _("Cancel"), GTK_RESPONSE_CANCEL, + _("Open"), GTK_RESPONSE_OK, + NULL); + + ev_document_factory_add_filters (chooser, NULL); + gtk_file_chooser_set_select_multiple (GTK_FILE_CHOOSER (chooser), TRUE); + gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (chooser), FALSE); + + ev_file_chooser_restore_folder (GTK_FILE_CHOOSER (chooser), + NULL, G_USER_DIRECTORY_DOCUMENTS); + + g_signal_connect (chooser, "response", + G_CALLBACK (ev_application_open_dialog_response), NULL); + + gtk_widget_show (chooser); +} + +GSettings * +ev_application_get_settings (EvApplication *application) +{ + g_return_val_if_fail (EV_IS_APPLICATION (application), NULL); + + return application->settings; +} + +gboolean +ev_application_has_traditional_menus (EvApplication *application) +{ + GdkDisplay *display; + GdkScreen *screen; + GtkSettings *settings; + gboolean show_app_menu; + gboolean show_menubar; + + g_return_val_if_fail (EV_IS_APPLICATION (application), FALSE); + + display = gdk_display_get_default (); + screen = gdk_display_get_default_screen (display); + settings = gtk_settings_get_for_screen (screen); + g_object_get (G_OBJECT (settings), + "gtk-shell-shows-app-menu", &show_app_menu, + "gtk-shell-shows-menubar", &show_menubar, + NULL); + + return !show_app_menu || show_menubar; +} Index: evince-3.10.3/shell/ev-application.h =================================================================== --- evince-3.10.3.orig/shell/ev-application.h 2014-04-28 15:33:25.038869346 +0200 +++ evince-3.10.3/shell/ev-application.h 2014-04-28 15:33:25.022869346 +0200 @@ -81,6 +81,14 @@ GdkScreen *screen, const char *topic); +void ev_application_show_about (EvApplication *application); + +void ev_application_open (EvApplication *application); + +GSettings * ev_application_get_settings (EvApplication *application); + +gboolean ev_application_has_traditional_menus (EvApplication *application); + G_END_DECLS #endif /* !EV_APPLICATION_H */ Index: evince-3.10.3/shell/ev-bookmarks.c =================================================================== --- evince-3.10.3.orig/shell/ev-bookmarks.c 2014-04-28 15:33:25.038869346 +0200 +++ evince-3.10.3/shell/ev-bookmarks.c 2014-04-28 15:33:25.026869346 +0200 @@ -224,6 +224,14 @@ return g_list_copy (bookmarks->items); } +gboolean +ev_bookmarks_has_bookmarks (EvBookmarks *bookmarks) +{ + g_return_val_if_fail (EV_IS_BOOKMARKS (bookmarks), NULL); + + return bookmarks->items != NULL; +} + void ev_bookmarks_add (EvBookmarks *bookmarks, EvBookmark *bookmark) Index: evince-3.10.3/shell/ev-bookmarks.h =================================================================== --- evince-3.10.3.orig/shell/ev-bookmarks.h 2014-04-28 15:33:25.038869346 +0200 +++ evince-3.10.3/shell/ev-bookmarks.h 2014-04-28 15:33:25.026869346 +0200 @@ -43,6 +43,7 @@ GType ev_bookmarks_get_type (void) G_GNUC_CONST; EvBookmarks *ev_bookmarks_new (EvMetadata *metadata); GList *ev_bookmarks_get_bookmarks (EvBookmarks *bookmarks); +gboolean ev_bookmarks_has_bookmarks (EvBookmarks *bookmarks); void ev_bookmarks_add (EvBookmarks *bookmarks, EvBookmark *bookmark); void ev_bookmarks_delete (EvBookmarks *bookmarks, Index: evince-3.10.3/shell/ev-recent-menu-model.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ evince-3.10.3/shell/ev-recent-menu-model.c 2014-04-28 15:33:25.026869346 +0200 @@ -0,0 +1,108 @@ +/* + * Copyright 2014 Canonical Ltd + * + * 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 Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * Evince is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Author: Lars Uebernickel + */ + +#include "ev-recent-menu-model.h" + +typedef struct +{ + GMenu *menu; + GtkRecentManager *manager; + gchar *action_name; + gchar *application; +} EvRecentMenuModel; + +static void +ev_recent_menu_model_update (GtkRecentManager *manager, + gpointer data) +{ + EvRecentMenuModel *recent_menu = data; + GList *items, *it; + guint n_items = 0; + + g_menu_remove_all (recent_menu->menu); + + items = gtk_recent_manager_get_items (recent_menu->manager); + + for (it = items; it && n_items < 5; it = it->next) + { + GtkRecentInfo *info = it->data; + gchar *label; + GIcon *icon; + GMenuItem *item; + + if (!gtk_recent_info_has_application (info, recent_menu->application)) + continue; + + label = g_strdup_printf ("_%d. %s", n_items + 1, gtk_recent_info_get_display_name (info)); + + item = g_menu_item_new (label, NULL); + g_menu_item_set_action_and_target (item, recent_menu->action_name, + "s", gtk_recent_info_get_uri (info)); + + icon = gtk_recent_info_get_gicon (info); + if (icon) + { + g_menu_item_set_icon (item, icon); + g_object_unref (icon); + } + + g_menu_append_item (recent_menu->menu, item); + + g_free (label); + g_object_unref (item); + + n_items++; + } + + g_list_free_full (items, (GDestroyNotify) gtk_recent_info_unref); +} + +static void +ev_recent_menu_model_destroy (gpointer data, + GObject *menu) +{ + EvRecentMenuModel *recent_menu = data; + + g_signal_handlers_disconnect_by_func (recent_menu->manager, ev_recent_menu_model_update, recent_menu); + g_object_unref (recent_menu->manager); + g_free (recent_menu->application); + g_free (recent_menu->action_name); + + g_slice_free (EvRecentMenuModel, recent_menu); +} + +GMenuModel * +ev_recent_menu_model_new (GtkRecentManager *manager, + const gchar *action_name, + const gchar *application) +{ + EvRecentMenuModel *recent_menu; + + recent_menu = g_slice_new0 (EvRecentMenuModel); + recent_menu->menu = g_menu_new (); + recent_menu->manager = g_object_ref (manager); + recent_menu->action_name = g_strdup (action_name); + recent_menu->application = g_strdup (application); + + g_object_weak_ref (G_OBJECT (recent_menu->menu), ev_recent_menu_model_destroy, recent_menu); + g_signal_connect (manager, "changed", G_CALLBACK (ev_recent_menu_model_update), recent_menu); + + return G_MENU_MODEL (recent_menu->menu); +} Index: evince-3.10.3/shell/ev-recent-menu-model.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ evince-3.10.3/shell/ev-recent-menu-model.h 2014-04-28 15:33:25.026869346 +0200 @@ -0,0 +1,30 @@ +/* + * Copyright 2014 Canonical Ltd + * + * 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 Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * Evince is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Author: Lars Uebernickel + */ + +#ifndef EV_RECENT_MENU_MODEL_H +#define EV_RECENT_MENU_MODEL_H + +#include + +GMenuModel * ev_recent_menu_model_new (GtkRecentManager *manager, + const gchar *action_name, + const gchar *application); + +#endif Index: evince-3.10.3/shell/ev-sidebar-bookmarks.c =================================================================== --- evince-3.10.3.orig/shell/ev-sidebar-bookmarks.c 2014-04-28 15:33:25.038869346 +0200 +++ evince-3.10.3/shell/ev-sidebar-bookmarks.c 2014-04-28 15:33:25.026869346 +0200 @@ -40,11 +40,6 @@ N_COLUMNS }; -enum { - ADD_BOOKMARK, - N_SIGNALS -}; - struct _EvSidebarBookmarksPrivate { EvDocumentModel *model; EvBookmarks *bookmarks; @@ -68,8 +63,6 @@ G_IMPLEMENT_INTERFACE (EV_TYPE_SIDEBAR_PAGE, ev_sidebar_bookmarks_page_iface_init)) -static guint signals[N_SIGNALS]; - static const gchar popup_menu_ui[] = "\n" " \n" @@ -224,16 +217,6 @@ } static void -ev_sidebar_bookmarks_add_clicked (GtkWidget *button, - EvSidebarBookmarks *sidebar_bookmarks) -{ - /* Let the window add the bookmark since - * since we don't know the page title - */ - g_signal_emit (sidebar_bookmarks, signals[ADD_BOOKMARK], 0); -} - -static void ev_sidebar_bookmarks_del_clicked (GtkWidget *button, EvSidebarBookmarks *sidebar_bookmarks) { @@ -469,9 +452,8 @@ hbox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL); priv->add_button = gtk_button_new_from_stock (GTK_STOCK_ADD); - g_signal_connect (priv->add_button, "clicked", - G_CALLBACK (ev_sidebar_bookmarks_add_clicked), - sidebar_bookmarks); + gtk_actionable_set_action_name (GTK_ACTIONABLE (priv->add_button), + "win.add-bookmark"); gtk_widget_set_sensitive (priv->add_button, FALSE); gtk_box_pack_start (GTK_BOX (hbox), priv->add_button, TRUE, TRUE, 6); gtk_widget_show (priv->add_button); @@ -534,16 +516,6 @@ g_type_class_add_private (g_object_class, sizeof (EvSidebarBookmarksPrivate)); g_object_class_override_property (g_object_class, PROP_WIDGET, "main-widget"); - - signals[ADD_BOOKMARK] = - g_signal_new ("add-bookmark", - G_TYPE_FROM_CLASS (g_object_class), - G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, - G_STRUCT_OFFSET (EvSidebarBookmarksClass, add_bookmark), - NULL, NULL, - g_cclosure_marshal_VOID__VOID, - G_TYPE_NONE, 0, - G_TYPE_NONE); } GtkWidget * Index: evince-3.10.3/shell/ev-toolbar.c =================================================================== --- evince-3.10.3.orig/shell/ev-toolbar.c 2014-04-28 15:33:25.038869346 +0200 +++ evince-3.10.3/shell/ev-toolbar.c 2014-04-28 15:33:25.026869346 +0200 @@ -24,9 +24,12 @@ #include "ev-toolbar.h" +#include #include "ev-stock-icons.h" #include "ev-zoom-action.h" #include "ev-history-action.h" +#include "ev-application.h" +#include "ev-recent-menu-model.h" #include enum @@ -40,6 +43,7 @@ GtkWidget *view_menu_button; GtkWidget *action_menu_button; + GMenu *bookmarks_section; }; G_DEFINE_TYPE (EvToolbar, ev_toolbar, GTK_TYPE_TOOLBAR) @@ -62,38 +66,49 @@ } static void -ev_toolbar_set_button_action (EvToolbar *ev_toolbar, - GtkButton *button, - GtkAction *action) +ev_toolbar_set_button_action (EvToolbar *ev_toolbar, + GtkButton *button, + const gchar *action_name, + const gchar *tooltip) { - gtk_activatable_set_related_action (GTK_ACTIVATABLE (button), action); + gtk_actionable_set_action_name (GTK_ACTIONABLE (button), action_name); gtk_button_set_label (button, NULL); gtk_button_set_focus_on_click (button, FALSE); - gtk_widget_set_tooltip_text (GTK_WIDGET (button), gtk_action_get_tooltip (action)); + gtk_widget_set_tooltip_text (GTK_WIDGET (button), tooltip); } static GtkWidget * -ev_toolbar_create_button (EvToolbar *ev_toolbar, - GtkAction *action) +ev_toolbar_create_button (EvToolbar *ev_toolbar, + const gchar *action_name, + const gchar *icon_name, + const gchar *tooltip) { GtkWidget *button = gtk_button_new (); + GtkWidget *image; + + image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_MENU); gtk_widget_set_valign (button, GTK_ALIGN_CENTER); - gtk_button_set_image (GTK_BUTTON (button), gtk_image_new ()); - ev_toolbar_set_button_action (ev_toolbar, GTK_BUTTON (button), action); + gtk_button_set_image (GTK_BUTTON (button), image); + ev_toolbar_set_button_action (ev_toolbar, GTK_BUTTON (button), action_name, tooltip); return button; } static GtkWidget * ev_toolbar_create_toggle_button (EvToolbar *ev_toolbar, - GtkAction *action) + const gchar *action_name, + const gchar *icon_name, + const gchar *tooltip) { GtkWidget *button = gtk_toggle_button_new (); + GtkWidget *image; + + image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_MENU); gtk_widget_set_valign (button, GTK_ALIGN_CENTER); - gtk_button_set_image (GTK_BUTTON (button), gtk_image_new ()); - ev_toolbar_set_button_action (ev_toolbar, GTK_BUTTON (button), action); + gtk_button_set_image (GTK_BUTTON (button), image); + ev_toolbar_set_button_action (ev_toolbar, GTK_BUTTON (button), action_name, tooltip); return button; } @@ -101,17 +116,21 @@ static GtkWidget * ev_toolbar_create_menu_button (EvToolbar *ev_toolbar, const gchar *icon_name, - GtkWidget *menu, + GMenuModel *menu, GtkAlign menu_align) { - GtkWidget *button = gtk_menu_button_new (); + GtkWidget *button; + GtkMenu *popup; + button = gtk_menu_button_new (); gtk_widget_set_valign (button, GTK_ALIGN_CENTER); gtk_button_set_image (GTK_BUTTON (button), gtk_image_new ()); gtk_image_set_from_icon_name (GTK_IMAGE (gtk_button_get_image (GTK_BUTTON (button))), icon_name, GTK_ICON_SIZE_MENU); - gtk_widget_set_halign (menu, menu_align); - gtk_menu_button_set_popup (GTK_MENU_BUTTON (button), menu); + gtk_menu_button_set_menu_model (GTK_MENU_BUTTON (button), menu); + + popup = gtk_menu_button_get_popup (GTK_MENU_BUTTON (button)); + gtk_widget_set_halign (GTK_WIDGET (popup), menu_align); return button; } @@ -132,16 +151,39 @@ } static void +ev_toolbar_update_bookmarks (EvToolbar *toolbar) +{ + GMenu *bookmarks_section; + GMenuModel *bookmarks_submenu; + + /* The bookmarks section has one or two items: "Add Bookmark" + * and the "Bookmarks" submenu item. Hide the latter when there + * are no bookmarks. + */ + + bookmarks_section = toolbar->priv->bookmarks_section; + bookmarks_submenu = ev_window_get_bookmarks_menu (toolbar->priv->window); + + if (g_menu_model_get_n_items (bookmarks_submenu) > 0) { + if (g_menu_model_get_n_items (G_MENU_MODEL (bookmarks_section)) == 1) + g_menu_append_submenu (bookmarks_section, _("Bookmarks"), bookmarks_submenu); + } + else { + if (g_menu_model_get_n_items (G_MENU_MODEL (bookmarks_section)) == 2) + g_menu_remove (bookmarks_section, 1); + } +} + +static void ev_toolbar_constructed (GObject *object) { EvToolbar *ev_toolbar = EV_TOOLBAR (object); - GtkUIManager *ui_manager; GtkActionGroup *action_group; GtkWidget *tool_item; GtkWidget *hbox; GtkAction *action; GtkWidget *button; - GtkWidget *menu; + GMenuModel *menu; G_OBJECT_CLASS (ev_toolbar_parent_class)->constructed (object); @@ -151,18 +193,17 @@ GTK_STYLE_CLASS_MENUBAR); action_group = ev_window_get_main_action_group (ev_toolbar->priv->window); - ui_manager = ev_window_get_ui_manager (ev_toolbar->priv->window); /* Navigation */ hbox = ev_toolbar_create_button_group (ev_toolbar); - action = gtk_action_group_get_action (action_group, "GoPreviousPage"); - button = ev_toolbar_create_button (ev_toolbar, action); + button = ev_toolbar_create_button (ev_toolbar, "win.go-previous-page", + "go-up-symbolic", _("Go to the previous page")); gtk_container_add (GTK_CONTAINER (hbox), button); gtk_widget_show (button); - action = gtk_action_group_get_action (action_group, "GoNextPage"); - button = ev_toolbar_create_button (ev_toolbar, action); + button = ev_toolbar_create_button (ev_toolbar, "win.go-next-page", + "go-down-symbolic", _("Go to the next page")); gtk_container_add (GTK_CONTAINER (hbox), button); gtk_widget_show (button); @@ -195,8 +236,8 @@ gtk_widget_show (tool_item); /* Find */ - action = gtk_action_group_get_action (action_group, "EditFind"); - button = ev_toolbar_create_toggle_button (ev_toolbar, action); + button = ev_toolbar_create_toggle_button (ev_toolbar, "win.find", "edit-find-symbolic", + _("Find a word or phrase in the document")); tool_item = GTK_WIDGET (gtk_tool_item_new ()); gtk_container_add (GTK_CONTAINER (tool_item), button); gtk_widget_show (button); @@ -211,30 +252,55 @@ gtk_container_add (GTK_CONTAINER (ev_toolbar), tool_item); gtk_widget_show (tool_item); - /* View Menu */ - menu = gtk_ui_manager_get_widget (ui_manager, "/ViewMenuPopup"); - button = ev_toolbar_create_menu_button (ev_toolbar, "document-properties-symbolic", - menu, GTK_ALIGN_END); - ev_toolbar->priv->view_menu_button = button; - tool_item = GTK_WIDGET (gtk_tool_item_new ()); - gtk_container_add (GTK_CONTAINER (tool_item), button); - gtk_widget_show (button); - gtk_widget_set_margin_right (tool_item, 6); - - gtk_container_add (GTK_CONTAINER (ev_toolbar), tool_item); - gtk_widget_show (tool_item); - - /* Action Menu */ - menu = gtk_ui_manager_get_widget (ui_manager, "/ActionMenu"); - button = ev_toolbar_create_menu_button (ev_toolbar, "emblem-system-symbolic", - menu, GTK_ALIGN_END); - ev_toolbar->priv->action_menu_button = button; - tool_item = GTK_WIDGET (gtk_tool_item_new ()); - gtk_container_add (GTK_CONTAINER (tool_item), button); - gtk_widget_show (button); + if (!ev_application_has_traditional_menus (EV_APP)) { + GtkBuilder *builder; + GMenu *recent_submenu; + GMenuModel *recent_menu_model; + + builder = gtk_builder_new_from_resource ("/org/gnome/evince/shell/ui/menus.ui"); + + /* View Menu */ + menu = G_MENU_MODEL (gtk_builder_get_object (builder, "view-menu")); + button = ev_toolbar_create_menu_button (ev_toolbar, "document-properties-symbolic", + menu, GTK_ALIGN_END); + ev_toolbar->priv->view_menu_button = button; + tool_item = GTK_WIDGET (gtk_tool_item_new ()); + gtk_widget_set_margin_left (tool_item, 12); + gtk_container_add (GTK_CONTAINER (tool_item), button); + gtk_widget_show (button); + gtk_widget_set_margin_right (tool_item, 6); + + gtk_container_add (GTK_CONTAINER (ev_toolbar), tool_item); + gtk_widget_show (tool_item); + + /* Action Menu */ + menu = G_MENU_MODEL (gtk_builder_get_object (builder, "action-menu")); + button = ev_toolbar_create_menu_button (ev_toolbar, "emblem-system-symbolic", + menu, GTK_ALIGN_END); + ev_toolbar->priv->action_menu_button = button; + tool_item = GTK_WIDGET (gtk_tool_item_new ()); + gtk_container_add (GTK_CONTAINER (tool_item), button); + gtk_widget_show (button); + + gtk_container_add (GTK_CONTAINER (ev_toolbar), tool_item); + gtk_widget_show (tool_item); + + /* insert dynamic recent files submenu */ + recent_menu_model = ev_recent_menu_model_new (gtk_recent_manager_get_default (), + "app.open-file", + g_get_application_name ()); + recent_submenu = G_MENU (gtk_builder_get_object (builder, "recent")); + g_menu_append_section (recent_submenu, NULL, recent_menu_model); + + /* insert bookmarks section */ + ev_toolbar->priv->bookmarks_section = G_MENU (gtk_builder_get_object (builder, "bookmarks")); + g_signal_connect_swapped (ev_window_get_bookmarks_menu (ev_toolbar->priv->window), "items-changed", + G_CALLBACK (ev_toolbar_update_bookmarks), ev_toolbar); + ev_toolbar_update_bookmarks (ev_toolbar); - gtk_container_add (GTK_CONTAINER (ev_toolbar), tool_item); - gtk_widget_show (tool_item); + g_object_unref (recent_menu_model); + g_object_unref (builder); + } } static void Index: evince-3.10.3/shell/ev-utils.c =================================================================== --- evince-3.10.3.orig/shell/ev-utils.c 2014-04-28 15:33:25.038869346 +0200 +++ evince-3.10.3/shell/ev-utils.c 2014-04-28 15:33:25.030869346 +0200 @@ -22,6 +22,7 @@ #include "ev-utils.h" #include "ev-file-helpers.h" +#include "ev-application.h" #include #include @@ -391,3 +392,90 @@ g_slist_free (pixbuf_formats); return NULL; } + +static const gchar * +get_settings_key_for_directory (GUserDirectory directory) +{ + switch (directory) { + case G_USER_DIRECTORY_PICTURES: + return "pictures-directory"; + case G_USER_DIRECTORY_DOCUMENTS: + default: + return "document-directory"; + } +} + +/** + * ev_file_chooser_save_folder: + * @file_chooser: a #GtkFileChooser + * @uri: (allow-none): optional fallback path + * @directory: the #GUserDirectory from which to restore + * + * Saves the directory of @file_chooser for @directory. Use + * ev_file_chooser_restore_folder() to restore this folder in a + * different file chooser. + */ +void +ev_file_chooser_save_folder (GtkFileChooser *file_chooser, + GUserDirectory directory) +{ + gchar *uri, *folder; + + folder = gtk_file_chooser_get_current_folder (file_chooser); + if (g_strcmp0 (folder, g_get_user_special_dir (directory)) == 0) { + /* Store 'nothing' if the folder is the default one */ + uri = NULL; + } else { + uri = gtk_file_chooser_get_current_folder_uri (file_chooser); + } + g_free (folder); + + g_settings_set (ev_application_get_settings (EV_APP), + get_settings_key_for_directory (directory), + "ms", uri); + g_free (uri); +} + +/** + * ev_file_chooser_restore_folder: + * @file_chooser: a #GtkFileChooser + * @uri: (allow-none): optional fallback path + * @directory: the #GUserDirectory from which to restore + * + * Sets the folder of @file_chooser to the last-visited directory for + * the given @directory type. + */ +void +ev_file_chooser_restore_folder (GtkFileChooser *file_chooser, + const gchar *uri, + GUserDirectory directory) +{ + const gchar *dir; + gchar *folder_uri; + gchar *parent_uri = NULL; + + g_settings_get (ev_application_get_settings (EV_APP), + get_settings_key_for_directory (directory), + "ms", &folder_uri); + if (folder_uri == NULL && uri != NULL) { + GFile *file, *parent; + + file = g_file_new_for_uri (uri); + parent = g_file_get_parent (file); + g_object_unref (file); + if (parent) { + folder_uri = parent_uri = g_file_get_uri (parent); + g_object_unref (parent); + } + } + + if (folder_uri) { + gtk_file_chooser_set_current_folder_uri (file_chooser, folder_uri); + } else { + dir = g_get_user_special_dir (directory); + gtk_file_chooser_set_current_folder (file_chooser, + dir ? dir : g_get_home_dir ()); + } + + g_free (folder_uri); +} Index: evince-3.10.3/shell/ev-utils.h =================================================================== --- evince-3.10.3.orig/shell/ev-utils.h 2014-04-28 15:33:25.038869346 +0200 +++ evince-3.10.3/shell/ev-utils.h 2014-04-28 15:33:25.030869346 +0200 @@ -42,6 +42,13 @@ void file_chooser_dialog_add_writable_pixbuf_formats (GtkFileChooser *chooser); GdkPixbufFormat* get_gdk_pixbuf_format_by_extension (const gchar *uri); +void ev_file_chooser_save_folder (GtkFileChooser *file_chooser, + GUserDirectory directory); + +void ev_file_chooser_restore_folder (GtkFileChooser *file_chooser, + const gchar *uri, + GUserDirectory directory); + G_END_DECLS #endif /* __EV_VIEW_H__ */ Index: evince-3.10.3/shell/ev-window.c =================================================================== --- evince-3.10.3.orig/shell/ev-window.c 2014-04-28 15:33:25.038869346 +0200 +++ evince-3.10.3/shell/ev-window.c 2014-04-28 15:33:37.626869432 +0200 @@ -87,10 +87,10 @@ #include "ev-print-operation.h" #include "ev-progress-message-area.h" #include "ev-annotation-properties-dialog.h" -#include "ev-bookmarks.h" #include "ev-bookmark-action.h" #include "ev-zoom-action.h" #include "ev-toolbar.h" +#include "ev-bookmarks.h" #ifdef ENABLE_DBUS #include "ev-gdbus-generated.h" @@ -171,24 +171,26 @@ /* UI Builders */ GtkActionGroup *action_group; - GtkActionGroup *view_popup_action_group; - GtkActionGroup *attachment_popup_action_group; GtkActionGroup *zoom_selector_popup_action_group; GtkRecentManager *recent_manager; - GtkActionGroup *recent_action_group; - guint recent_ui_id; GtkActionGroup *bookmarks_action_group; guint bookmarks_ui_id; GtkUIManager *ui_manager; /* Popup view */ - GtkWidget *view_popup; EvLink *link; EvImage *image; EvAnnotation *annot; + GMenuModel *document_view_menu; + GMenuModel *external_link_section; + GMenuModel *internal_link_section; + GMenuModel *image_section; + GMenuModel *attachment_section; + GMenuModel *annotation_section; + GtkWidget *popup_menu; + /* Popup attachment */ - GtkWidget *attachment_popup; GList *attach_list; /* Document */ @@ -206,6 +208,7 @@ EvWindowTitle *title; EvMetadata *metadata; EvBookmarks *bookmarks; + GMenu *bookmarks_menu; /* Load params */ EvLinkDest *dest; @@ -262,8 +265,6 @@ #define GS_OVERRIDE_RESTRICTIONS "override-restrictions" #define GS_PAGE_CACHE_SIZE "page-cache-size" #define GS_AUTO_RELOAD "auto-reload" -#define GS_LAST_DOCUMENT_DIRECTORY "document-directory" -#define GS_LAST_PICTURES_DIRECTORY "pictures-directory" #define SIDEBAR_DEFAULT_SIZE 132 #define LINKS_SIDEBAR_ID "links" @@ -328,29 +329,9 @@ static void ev_window_run_fullscreen (EvWindow *window); static void ev_window_stop_fullscreen (EvWindow *window, gboolean unfullscreen_window); -static void ev_window_cmd_view_fullscreen (GtkAction *action, - EvWindow *window); static void ev_window_run_presentation (EvWindow *window); static void ev_window_stop_presentation (EvWindow *window, gboolean unfullscreen_window); -static void ev_window_cmd_view_presentation (GtkAction *action, - EvWindow *window); -static void ev_view_popup_cmd_open_link (GtkAction *action, - EvWindow *window); -static void ev_view_popup_cmd_open_link_new_window (GtkAction *action, - EvWindow *window); -static void ev_view_popup_cmd_copy_link_address (GtkAction *action, - EvWindow *window); -static void ev_view_popup_cmd_save_image_as (GtkAction *action, - EvWindow *window); -static void ev_view_popup_cmd_copy_image (GtkAction *action, - EvWindow *window); -static void ev_view_popup_cmd_annot_properties (GtkAction *action, - EvWindow *window); -static void ev_attachment_popup_cmd_open_attachment (GtkAction *action, - EvWindow *window); -static void ev_attachment_popup_cmd_save_attachment_as (GtkAction *action, - EvWindow *window); static void ev_window_cmd_view_fit_page (GtkAction *action, EvWindow *ev_window); static void ev_window_cmd_view_fit_width (GtkAction *action, @@ -361,8 +342,6 @@ EvLink *link, EvWindow *window); static void ev_window_update_find_status_message (EvWindow *ev_window); -static void ev_window_cmd_edit_find (GtkAction *action, - EvWindow *ev_window); static void find_bar_search_changed_cb (EggFindBar *find_bar, GParamSpec *param, EvWindow *ev_window); @@ -396,6 +375,17 @@ } static void +ev_window_set_action_enabled (EvWindow *ev_window, + const char *name, + gboolean enabled) +{ + GAction *action; + + action = g_action_map_lookup_action (G_ACTION_MAP (ev_window), name); + g_simple_action_set_enabled (G_SIMPLE_ACTION (action), enabled); +} + +static void ev_window_set_action_sensitive (EvWindow *ev_window, const char *name, gboolean sensitive) @@ -419,6 +409,7 @@ gboolean can_get_text = FALSE; gboolean has_pages = FALSE; gboolean can_find = FALSE; + GSettings *settings = ev_application_get_settings (EV_APP); if (document) { has_document = TRUE; @@ -438,10 +429,8 @@ can_find = TRUE; } - if (has_document && ev_window->priv->settings) { - override_restrictions = - g_settings_get_boolean (ev_window->priv->settings, - GS_OVERRIDE_RESTRICTIONS); + if (has_document && settings) { + override_restrictions = g_settings_get_boolean (settings, GS_OVERRIDE_RESTRICTIONS); } if (!override_restrictions && info && info->fields_mask & EV_DOCUMENT_INFO_PERMISSIONS) { @@ -463,33 +452,31 @@ } /* File menu */ - ev_window_set_action_sensitive (ev_window, "FileOpenCopy", has_document); - ev_window_set_action_sensitive (ev_window, "FileSaveAs", has_document && ok_to_copy); - ev_window_set_action_sensitive (ev_window, "FilePrint", has_pages && ok_to_print); - ev_window_set_action_sensitive (ev_window, "FileProperties", has_document && has_properties); - ev_window_set_action_sensitive (ev_window, "FileOpenContainingFolder", has_document); - ev_window_set_action_sensitive (ev_window, "FileSendTo", - has_document && ev_window->priv->has_mailto_handler); - ev_window_set_action_sensitive (ev_window, "ViewPresentation", has_document); + ev_window_set_action_enabled (ev_window, "open-copy", has_document); + ev_window_set_action_enabled (ev_window, "save-copy", has_document && ok_to_copy); + ev_window_set_action_enabled (ev_window, "print", has_pages && ok_to_print); + ev_window_set_action_enabled (ev_window, "show-properties", has_document && has_properties); + ev_window_set_action_enabled (ev_window, "open-containing-folder", has_document); + ev_window_set_action_enabled (ev_window, "send-to", + has_document && ev_window->priv->has_mailto_handler); + ev_window_set_action_enabled (ev_window, "presentation", has_document); /* Edit menu */ - ev_window_set_action_sensitive (ev_window, "EditSelectAll", has_pages && can_get_text); - ev_window_set_action_sensitive (ev_window, "EditFind", can_find); - ev_window_set_action_sensitive (ev_window, "Slash", can_find); - ev_window_set_action_sensitive (ev_window, "CtrlF", can_find); - ev_window_set_action_sensitive (ev_window, "EditRotateLeft", has_pages); - ev_window_set_action_sensitive (ev_window, "EditRotateRight", has_pages); + ev_window_set_action_enabled (ev_window, "select-all", has_pages && can_get_text); + ev_window_set_action_enabled (ev_window, "find", can_find); + ev_window_set_action_enabled (ev_window, "rotate-left", has_pages); + ev_window_set_action_enabled (ev_window, "rotate-right", has_pages); /* View menu */ - ev_window_set_action_sensitive (ev_window, "ViewContinuous", has_pages); - ev_window_set_action_sensitive (ev_window, "ViewDual", has_pages); - ev_window_set_action_sensitive (ev_window, "ViewDualOddLeft", has_pages); - ev_window_set_action_sensitive (ev_window, "ViewReload", has_pages); - ev_window_set_action_sensitive (ev_window, "ViewAutoscroll", has_pages); - ev_window_set_action_sensitive (ev_window, "ViewInvertedColors", has_pages); + ev_window_set_action_enabled (ev_window, "continuous", has_pages); + ev_window_set_action_enabled (ev_window, "dual-page", has_pages); + ev_window_set_action_enabled (ev_window, "dual-odd-left", has_pages); + ev_window_set_action_enabled (ev_window, "reload", has_pages); + ev_window_set_action_enabled (ev_window, "auto-scroll", has_pages); + ev_window_set_action_enabled (ev_window, "inverted-colors", has_pages); /* Bookmarks menu */ - ev_window_set_action_sensitive (ev_window, "BookmarksAdd", + ev_window_set_action_enabled (ev_window, "add-bookmark", has_pages && ev_window->priv->bookmarks); /* Toolbar-specific actions: */ @@ -507,62 +494,58 @@ gboolean has_pages = FALSE; gboolean presentation_mode; gboolean can_find_in_page = FALSE; - gboolean dual_mode = FALSE; if (ev_window->priv->document) { page = ev_document_model_get_page (ev_window->priv->model); n_pages = ev_document_get_n_pages (ev_window->priv->document); has_pages = n_pages > 0; - dual_mode = ev_document_model_get_dual_page (ev_window->priv->model); } can_find_in_page = (ev_window->priv->find_job && ev_job_find_has_results (EV_JOB_FIND (ev_window->priv->find_job))); - ev_window_set_action_sensitive (ev_window, "EditCopy", + ev_window_set_action_enabled (ev_window, "copy", has_pages && ev_view_get_has_selection (view)); - ev_window_set_action_sensitive (ev_window, "CtrlG", - has_pages && can_find_in_page); - ev_window_set_action_sensitive (ev_window, "ShiftCtrlG", - has_pages && can_find_in_page); - ev_window_set_action_sensitive (ev_window, "F3", - has_pages && can_find_in_page); + ev_window_set_action_enabled (ev_window, "find-next", + has_pages && can_find_in_page); + ev_window_set_action_enabled (ev_window, "find-previous", + has_pages && can_find_in_page); presentation_mode = EV_WINDOW_IS_PRESENTATION (ev_window); - ev_window_set_action_sensitive (ev_window, "ViewZoomIn", - has_pages && - ev_view_can_zoom_in (view) && - !presentation_mode); - ev_window_set_action_sensitive (ev_window, "ViewZoomOut", - has_pages && - ev_view_can_zoom_out (view) && - !presentation_mode); - ev_window_set_action_sensitive (ev_window, "ViewDualOddLeft", dual_mode); + ev_window_set_action_enabled (ev_window, "zoom-in", + has_pages && + ev_view_can_zoom_in (view) && + !presentation_mode); + ev_window_set_action_enabled (ev_window, "zoom-out", + has_pages && + ev_view_can_zoom_out (view) && + !presentation_mode); + // ev_window_set_action_sensitive (ev_window, "ViewDualOddLeft", dual_mode); /* Go menu */ if (has_pages) { - ev_window_set_action_sensitive (ev_window, "GoPreviousPage", page > 0); - ev_window_set_action_sensitive (ev_window, "GoNextPage", page < n_pages - 1); - ev_window_set_action_sensitive (ev_window, "GoFirstPage", page > 0); - ev_window_set_action_sensitive (ev_window, "GoLastPage", page < n_pages - 1); - ev_window_set_action_sensitive (ev_window, "GoToPage", TRUE); + ev_window_set_action_enabled (ev_window, "go-previous-page", page > 0); + ev_window_set_action_enabled (ev_window, "go-next-page", page < n_pages - 1); + ev_window_set_action_enabled (ev_window, "go-first-page", page > 0); + ev_window_set_action_enabled (ev_window, "go-last-page", page < n_pages - 1); + ev_window_set_action_enabled (ev_window, "select-page", TRUE); } else { - ev_window_set_action_sensitive (ev_window, "GoFirstPage", FALSE); - ev_window_set_action_sensitive (ev_window, "GoPreviousPage", FALSE); - ev_window_set_action_sensitive (ev_window, "GoNextPage", FALSE); - ev_window_set_action_sensitive (ev_window, "GoLastPage", FALSE); - ev_window_set_action_sensitive (ev_window, "GoToPage", FALSE); + ev_window_set_action_enabled (ev_window, "go-first-page", FALSE); + ev_window_set_action_enabled (ev_window, "go-previous-page", FALSE); + ev_window_set_action_enabled (ev_window, "go-next-page", FALSE); + ev_window_set_action_enabled (ev_window, "go-last-page", FALSE); + ev_window_set_action_enabled (ev_window, "select-page", FALSE); } ev_window_set_action_sensitive (ev_window, "History", !ev_history_is_frozen (ev_window->priv->history)); - ev_window_set_action_sensitive (ev_window, "F7", - has_pages && - ev_view_supports_caret_navigation (view) && - !presentation_mode); + ev_window_set_action_enabled (ev_window, "caret-navigation", + has_pages && + ev_view_supports_caret_navigation (view) && + !presentation_mode); } static void @@ -593,6 +576,8 @@ set_widget_visibility (priv->toolbar, toolbar); set_widget_visibility (priv->find_bar, findbar); set_widget_visibility (priv->sidebar, sidebar); + + gtk_application_window_set_show_menubar (GTK_APPLICATION_WINDOW (window), !presentation); } static void @@ -892,7 +877,7 @@ view_selection_changed_cb (EvView *view, EvWindow *window) { - ev_window_set_action_sensitive (window, "EditCopy", + ev_window_set_action_enabled (window, "copy", ev_view_get_has_selection (view)); } @@ -1436,27 +1421,6 @@ } #endif -static GSettings * -ev_window_ensure_settings (EvWindow *ev_window) -{ - EvWindowPrivate *priv = ev_window->priv; - - if (priv->settings != NULL) - return priv->settings; - - priv->settings = g_settings_new (GS_SCHEMA_NAME); - g_signal_connect (priv->settings, - "changed::"GS_OVERRIDE_RESTRICTIONS, - G_CALLBACK (override_restrictions_changed), - ev_window); - g_signal_connect (priv->settings, - "changed::"GS_PAGE_CACHE_SIZE, - G_CALLBACK (page_cache_size_changed), - ev_window); - - return priv->settings; -} - static gboolean ev_window_setup_document (EvWindow *ev_window) { @@ -1471,8 +1435,6 @@ ev_window_title_set_document (ev_window->priv->title, document); ev_window_title_set_uri (ev_window->priv->title, ev_window->priv->uri); - ev_window_ensure_settings (ev_window); - #ifdef HAVE_DESKTOP_SCHEMAS if (!ev_window->priv->lockdown_settings) { ev_window->priv->lockdown_settings = g_settings_new (GS_LOCKDOWN_SCHEMA_NAME); @@ -1563,8 +1525,9 @@ ev_window_document_changed (EvWindow *ev_window, gpointer user_data) { - if (ev_window->priv->settings && - g_settings_get_boolean (ev_window->priv->settings, GS_AUTO_RELOAD)) + GSettings *settings = ev_application_get_settings (EV_APP); + + if (settings && g_settings_get_boolean (settings, GS_AUTO_RELOAD)) ev_window_reload_document (ev_window, NULL); } @@ -2410,124 +2373,10 @@ } } -static const gchar * -get_settings_key_for_directory (GUserDirectory directory) -{ - switch (directory) { - case G_USER_DIRECTORY_PICTURES: - return GS_LAST_PICTURES_DIRECTORY; - case G_USER_DIRECTORY_DOCUMENTS: - default: - return GS_LAST_DOCUMENT_DIRECTORY; - } -} - -static void -ev_window_file_chooser_restore_folder (EvWindow *window, - GtkFileChooser *file_chooser, - const gchar *uri, - GUserDirectory directory) -{ - const gchar *folder_uri, *dir; - gchar *parent_uri = NULL; - - g_settings_get (ev_window_ensure_settings (window), - get_settings_key_for_directory (directory), - "m&s", &folder_uri); - if (folder_uri == NULL && uri != NULL) { - GFile *file, *parent; - - file = g_file_new_for_uri (uri); - parent = g_file_get_parent (file); - g_object_unref (file); - if (parent) { - folder_uri = parent_uri = g_file_get_uri (parent); - g_object_unref (parent); - } - } - - if (folder_uri) { - gtk_file_chooser_set_current_folder_uri (file_chooser, folder_uri); - } else { - dir = g_get_user_special_dir (directory); - gtk_file_chooser_set_current_folder (file_chooser, - dir ? dir : g_get_home_dir ()); - } - - g_free (parent_uri); -} - -static void -ev_window_file_chooser_save_folder (EvWindow *window, - GtkFileChooser *file_chooser, - GUserDirectory directory) -{ - gchar *uri, *folder; - - folder = gtk_file_chooser_get_current_folder (file_chooser); - if (g_strcmp0 (folder, g_get_user_special_dir (directory)) == 0) { - /* Store 'nothing' if the folder is the default one */ - uri = NULL; - } else { - uri = gtk_file_chooser_get_current_folder_uri (file_chooser); - } - g_free (folder); - - g_settings_set (ev_window_ensure_settings (window), - get_settings_key_for_directory (directory), - "ms", uri); - g_free (uri); -} - -static void -file_open_dialog_response_cb (GtkWidget *chooser, - gint response_id, - EvWindow *ev_window) -{ - if (response_id == GTK_RESPONSE_OK) { - GSList *uris; - - ev_window_file_chooser_save_folder (ev_window, GTK_FILE_CHOOSER (chooser), - G_USER_DIRECTORY_DOCUMENTS); - - uris = gtk_file_chooser_get_uris (GTK_FILE_CHOOSER (chooser)); - - ev_application_open_uri_list (EV_APP, uris, - gtk_window_get_screen (GTK_WINDOW (ev_window)), - gtk_get_current_event_time ()); - - g_slist_foreach (uris, (GFunc)g_free, NULL); - g_slist_free (uris); - } - - gtk_widget_destroy (chooser); -} - static void ev_window_cmd_file_open (GtkAction *action, EvWindow *window) { - GtkWidget *chooser; - - chooser = gtk_file_chooser_dialog_new (_("Open Document"), - GTK_WINDOW (window), - GTK_FILE_CHOOSER_ACTION_OPEN, - GTK_STOCK_CANCEL, - GTK_RESPONSE_CANCEL, - GTK_STOCK_OPEN, GTK_RESPONSE_OK, - NULL); - - ev_document_factory_add_filters (chooser, NULL); - gtk_file_chooser_set_select_multiple (GTK_FILE_CHOOSER (chooser), TRUE); - gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (chooser), FALSE); - - ev_window_file_chooser_restore_folder (window, GTK_FILE_CHOOSER (chooser), - NULL, G_USER_DIRECTORY_DOCUMENTS); - - g_signal_connect (chooser, "response", - G_CALLBACK (file_open_dialog_response_cb), - window); - - gtk_widget_show (chooser); + ev_application_open (EV_APP); } static void @@ -2545,26 +2394,13 @@ } static void -ev_window_cmd_file_open_copy (GtkAction *action, EvWindow *window) +ev_window_activate_open_copy_action (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) { - ev_window_open_copy_at_dest (window, NULL); -} + EvWindow *window = user_data; -static void -ev_window_cmd_recent_file_activate (GtkAction *action, - EvWindow *window) -{ - GtkRecentInfo *info; - const gchar *uri; - - info = g_object_get_data (G_OBJECT (action), "gtk-recent-info"); - g_assert (info != NULL); - - uri = gtk_recent_info_get_uri (info); - - ev_application_open_uri_at_dest (EV_APP, uri, - gtk_window_get_screen (GTK_WINDOW (window)), - NULL, 0, NULL, gtk_get_current_event_time ()); + ev_window_open_copy_at_dest (window, NULL); } static void @@ -2583,185 +2419,6 @@ gtk_recent_manager_add_item (window->priv->recent_manager, filename); } -static gint -compare_recent_items (GtkRecentInfo *a, GtkRecentInfo *b) -{ - gboolean has_ev_a, has_ev_b; - const gchar *evince = g_get_application_name (); - - has_ev_a = gtk_recent_info_has_application (a, evince); - has_ev_b = gtk_recent_info_has_application (b, evince); - - if (has_ev_a && has_ev_b) { - time_t time_a, time_b; - - time_a = gtk_recent_info_get_modified (a); - time_b = gtk_recent_info_get_modified (b); - - return (time_b - time_a); - } else if (has_ev_a) { - return -1; - } else if (has_ev_b) { - return 1; - } - - return 0; -} - -/* - * Doubles underscore to avoid spurious menu accels. - */ -static gchar * -ev_window_get_recent_file_label (gint index, const gchar *filename) -{ - GString *str; - gint length; - const gchar *p; - const gchar *end; - gboolean is_rtl; - - is_rtl = (gtk_widget_get_default_direction () == GTK_TEXT_DIR_RTL); - - g_return_val_if_fail (filename != NULL, NULL); - - length = strlen (filename); - str = g_string_sized_new (length + 10); - g_string_printf (str, "%s_%d. ", is_rtl ? "\xE2\x80\x8F" : "", index); - - p = filename; - end = filename + length; - - while (p != end) { - const gchar *next; - next = g_utf8_next_char (p); - - switch (*p) { - case '_': - g_string_append (str, "__"); - break; - default: - g_string_append_len (str, p, next - p); - break; - } - - p = next; - } - - return g_string_free (str, FALSE); -} - -static void -ev_window_recent_action_connect_proxy_cb (GtkActionGroup *action_group, - GtkAction *action, - GtkWidget *proxy, - gpointer data) -{ - GtkLabel *label; - - if (!GTK_IS_MENU_ITEM (proxy)) - return; - - label = GTK_LABEL (gtk_bin_get_child (GTK_BIN (proxy))); - - gtk_label_set_ellipsize (label, PANGO_ELLIPSIZE_MIDDLE); - gtk_label_set_max_width_chars (label, MAX_RECENT_ITEM_LEN); -} - -static void -ev_window_setup_recent (EvWindow *ev_window) -{ - GList *items, *l; - guint n_items = 0; - const gchar *evince = g_get_application_name (); - static guint i = 0; - - if (ev_window->priv->recent_ui_id > 0) { - gtk_ui_manager_remove_ui (ev_window->priv->ui_manager, - ev_window->priv->recent_ui_id); - gtk_ui_manager_ensure_update (ev_window->priv->ui_manager); - } - ev_window->priv->recent_ui_id = gtk_ui_manager_new_merge_id (ev_window->priv->ui_manager); - - if (ev_window->priv->recent_action_group) { - gtk_ui_manager_remove_action_group (ev_window->priv->ui_manager, - ev_window->priv->recent_action_group); - g_object_unref (ev_window->priv->recent_action_group); - } - ev_window->priv->recent_action_group = gtk_action_group_new ("RecentFilesActions"); - g_signal_connect (ev_window->priv->recent_action_group, "connect-proxy", - G_CALLBACK (ev_window_recent_action_connect_proxy_cb), NULL); - - gtk_ui_manager_insert_action_group (ev_window->priv->ui_manager, - ev_window->priv->recent_action_group, -1); - - items = gtk_recent_manager_get_items (ev_window->priv->recent_manager); - items = g_list_sort (items, (GCompareFunc) compare_recent_items); - - for (l = items; l && l->data; l = g_list_next (l)) { - GtkRecentInfo *info; - GtkAction *action; - gchar *action_name; - gchar *label; - const gchar *mime_type; - gchar *content_type; - GIcon *icon = NULL; - - info = (GtkRecentInfo *) l->data; - - if (!gtk_recent_info_has_application (info, evince)) - continue; - - action_name = g_strdup_printf ("RecentFile%u", i++); - label = ev_window_get_recent_file_label ( - n_items + 1, gtk_recent_info_get_display_name (info)); - - mime_type = gtk_recent_info_get_mime_type (info); - content_type = g_content_type_from_mime_type (mime_type); - if (content_type != NULL) { - icon = g_content_type_get_icon (content_type); - g_free (content_type); - } - - action = g_object_new (GTK_TYPE_ACTION, - "name", action_name, - "label", label, - "gicon", icon, - "always-show-image", TRUE, - NULL); - - g_object_set_data_full (G_OBJECT (action), - "gtk-recent-info", - gtk_recent_info_ref (info), - (GDestroyNotify) gtk_recent_info_unref); - - g_signal_connect (action, "activate", - G_CALLBACK (ev_window_cmd_recent_file_activate), - (gpointer) ev_window); - - gtk_action_group_add_action (ev_window->priv->recent_action_group, - action); - g_object_unref (action); - - gtk_ui_manager_add_ui (ev_window->priv->ui_manager, - ev_window->priv->recent_ui_id, - "/ActionMenu/RecentFilesMenu/RecentFiles", - label, - action_name, - GTK_UI_MANAGER_MENUITEM, - FALSE); - g_free (action_name); - g_free (label); - if (icon != NULL) - g_object_unref (icon); - - if (++n_items == 5) - break; - } - - g_list_foreach (items, (GFunc) gtk_recent_info_unref, NULL); - g_list_free (items); -} - static gboolean show_saving_progress (GFile *dst) { @@ -2952,8 +2609,8 @@ return; } - ev_window_file_chooser_save_folder (ev_window, GTK_FILE_CHOOSER (fc), - G_USER_DIRECTORY_DOCUMENTS); + ev_file_chooser_save_folder (GTK_FILE_CHOOSER (fc), + G_USER_DIRECTORY_DOCUMENTS); uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (fc)); @@ -2975,7 +2632,7 @@ } static void -ev_window_cmd_save_as (GtkAction *action, EvWindow *ev_window) +ev_window_save_copy (EvWindow *ev_window) { GtkWidget *fc; gchar *base_name; @@ -3003,9 +2660,9 @@ g_object_unref (file); g_free (base_name); - ev_window_file_chooser_restore_folder (ev_window, GTK_FILE_CHOOSER (fc), - ev_window->priv->uri, - G_USER_DIRECTORY_DOCUMENTS); + ev_file_chooser_restore_folder (GTK_FILE_CHOOSER (fc), + ev_window->priv->uri, + G_USER_DIRECTORY_DOCUMENTS); g_signal_connect (fc, "response", G_CALLBACK (file_save_dialog_response_cb), @@ -3015,9 +2672,21 @@ } static void -ev_window_cmd_send_to (GtkAction *action, - EvWindow *ev_window) +ev_window_activate_save_copy_action (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) +{ + EvWindow *window = user_data; + + ev_window_save_copy (window); +} + +static void +ev_window_activate_send_to_action (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) { + EvWindow *ev_window = user_data; GAppInfo *app_info; gchar *command; const char *uri; @@ -3052,8 +2721,11 @@ } static void -ev_window_cmd_open_containing_folder (GtkAction *action, EvWindow *ev_window) +ev_window_activate_open_containing_folder_action (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) { + EvWindow *ev_window = user_data; GtkWidget *ev_window_widget; GFile *file; GFile *parent; @@ -3589,14 +3261,22 @@ } static void -ev_window_cmd_file_print (GtkAction *action, EvWindow *ev_window) +ev_window_activate_print_action (GSimpleAction *action, + GVariant *state, + gpointer user_data) { + EvWindow *ev_window = user_data; + ev_window_print (ev_window); } static void -ev_window_cmd_file_properties (GtkAction *action, EvWindow *ev_window) +ev_window_activate_show_properties_action (GSimpleAction *action, + GVariant *state, + gpointer user_data) { + EvWindow *ev_window = user_data; + if (ev_window->priv->properties == NULL) { ev_window->priv->properties = ev_properties_dialog_new (); ev_properties_dialog_set_document (EV_PROPERTIES_DIALOG (ev_window->priv->properties), @@ -3622,7 +3302,7 @@ switch (response) { case GTK_RESPONSE_YES: - ev_window_cmd_save_as (NULL, ev_window); + ev_window_save_copy (ev_window); break; case GTK_RESPONSE_NO: gtk_widget_destroy (GTK_WIDGET (ev_window)); @@ -3823,64 +3503,86 @@ } static void -ev_window_cmd_file_close_window (GtkAction *action, EvWindow *ev_window) +ev_window_activate_close_action (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) { + EvWindow *ev_window = user_data; + if (ev_window_close (ev_window)) gtk_widget_destroy (GTK_WIDGET (ev_window)); } static void -ev_window_cmd_focus_page_selector (GtkAction *act, EvWindow *window) +ev_window_activate_select_page_action (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) { - GtkAction *action; - + EvWindow *window = user_data; + GtkAction *page_action; + update_chrome_flag (window, EV_CHROME_RAISE_TOOLBAR, TRUE); update_chrome_visibility (window); - - action = gtk_action_group_get_action (window->priv->action_group, - PAGE_SELECTOR_ACTION); - ev_page_action_grab_focus (EV_PAGE_ACTION (action)); + + page_action = gtk_action_group_get_action (window->priv->action_group, + PAGE_SELECTOR_ACTION); + ev_page_action_grab_focus (EV_PAGE_ACTION (page_action)); } static void -ev_window_cmd_scroll_forward (GtkAction *action, EvWindow *window) +ev_window_activate_scroll_forward_action (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) { + EvWindow *window = user_data; + g_signal_emit_by_name (window->priv->view, "scroll", GTK_SCROLL_PAGE_FORWARD, GTK_ORIENTATION_VERTICAL); } static void -ev_window_cmd_scroll_backward (GtkAction *action, EvWindow *window) +ev_window_activate_scroll_backwards_action (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) { + EvWindow *window = user_data; + g_signal_emit_by_name (window->priv->view, "scroll", GTK_SCROLL_PAGE_BACKWARD, GTK_ORIENTATION_VERTICAL); } static void -ev_window_cmd_continuous (GtkAction *action, EvWindow *ev_window) +ev_window_change_continuous_action_state (GSimpleAction *action, + GVariant *state, + gpointer user_data) { - gboolean continuous; + EvWindow *window = user_data; - ev_window_stop_presentation (ev_window, TRUE); - continuous = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)); - ev_document_model_set_continuous (ev_window->priv->model, continuous); + ev_window_stop_presentation (window, TRUE); + ev_document_model_set_continuous (window->priv->model, g_variant_get_boolean (state)); + g_simple_action_set_state (action, state); } static void -ev_window_cmd_dual (GtkAction *action, EvWindow *ev_window) +ev_window_change_dual_page_action_state (GSimpleAction *action, + GVariant *state, + gpointer user_data) { - gboolean dual_page; + EvWindow *window = user_data; - ev_window_stop_presentation (ev_window, TRUE); - dual_page = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)); - ev_document_model_set_dual_page (ev_window->priv->model, dual_page); + ev_window_stop_presentation (window, TRUE); + ev_document_model_set_dual_page (window->priv->model, g_variant_get_boolean (state)); + g_simple_action_set_state (action, state); } static void -ev_window_cmd_dual_odd_pages_left (GtkAction *action, EvWindow *ev_window) +ev_window_change_dual_odd_left_action_state (GSimpleAction *action, + GVariant *state, + gpointer user_data) { - gboolean dual_page_odd_left; + EvWindow *window = user_data; - dual_page_odd_left = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)); - ev_document_model_set_dual_page_odd_pages_left (ev_window->priv->model, dual_page_odd_left); + ev_document_model_set_dual_page_odd_pages_left (window->priv->model, + g_variant_get_boolean (state)); + g_simple_action_set_state (action, state); } static void @@ -3897,9 +3599,27 @@ } static void -ev_window_cmd_fit_page (GtkAction *action, EvWindow *ev_window) -{ - ev_document_model_set_sizing_mode (ev_window->priv->model, EV_SIZING_FIT_PAGE); +ev_window_change_sizing_mode_action_state (GSimpleAction *action, + GVariant *state, + gpointer user_data) +{ + EvWindow *window = user_data; + const gchar *mode; + + mode = g_variant_get_string (state, NULL); + + if (g_str_equal (mode, "fit-page")) + ev_document_model_set_sizing_mode (window->priv->model, EV_SIZING_FIT_PAGE); + else if (g_str_equal (mode, "fit-width")) + ev_document_model_set_sizing_mode (window->priv->model, EV_SIZING_FIT_WIDTH); + else if (g_str_equal (mode, "automatic")) + ev_document_model_set_sizing_mode (window->priv->model, EV_SIZING_AUTOMATIC); + else if (g_str_equal (mode, "free")) + ev_document_model_set_sizing_mode (window->priv->model, EV_SIZING_FREE); + else + g_assert_not_reached (); + + g_simple_action_set_state (action, state); } static void @@ -3916,12 +3636,6 @@ } static void -ev_window_cmd_fit_width (GtkAction *action, EvWindow *ev_window) -{ - ev_document_model_set_sizing_mode (ev_window->priv->model, EV_SIZING_FIT_WIDTH); -} - -static void ev_window_cmd_view_zoom_automatic (GtkAction *action, EvWindow *ev_window) { @@ -3957,29 +3671,28 @@ } static void -ev_window_cmd_edit_select_all (GtkAction *action, EvWindow *ev_window) +ev_window_activate_select_all_action (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) { - g_return_if_fail (EV_IS_WINDOW (ev_window)); + EvWindow *ev_window = user_data; ev_view_select_all (EV_VIEW (ev_window->priv->view)); } static void -ev_window_cmd_toggle_find (GtkAction *action, EvWindow *ev_window) +ev_window_change_find_action_state (GSimpleAction *action, + GVariant *state, + gpointer user_data) { - gboolean show_find_bar; + EvWindow *ev_window = user_data; - show_find_bar = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)); - if (show_find_bar) + if (g_variant_get_boolean (state)) ev_window_show_find_bar (ev_window); else ev_window_close_find_bar (ev_window); -} -static void -ev_window_cmd_edit_find (GtkAction *action, EvWindow *ev_window) -{ - ev_window_show_find_bar (ev_window); + g_simple_action_set_state (action, state); } static void @@ -4004,8 +3717,11 @@ } static void -ev_window_cmd_edit_find_next (GtkAction *action, EvWindow *ev_window) +ev_window_activate_find_next_action (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) { + EvWindow *ev_window = user_data; gboolean find_bar_hidden; if (EV_WINDOW_IS_PRESENTATION (ev_window)) @@ -4029,8 +3745,11 @@ } static void -ev_window_cmd_edit_find_previous (GtkAction *action, EvWindow *ev_window) +ev_window_activate_find_previous_action (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) { + EvWindow *ev_window = user_data; gboolean find_bar_hidden; if (EV_WINDOW_IS_PRESENTATION (ev_window)) @@ -4047,9 +3766,11 @@ } static void -ev_window_cmd_edit_copy (GtkAction *action, EvWindow *ev_window) +ev_window_activate_copy_action (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) { - g_return_if_fail (EV_IS_WINDOW (ev_window)); + EvWindow *ev_window = user_data; ev_view_copy (EV_VIEW (ev_window->priv->view)); } @@ -4067,15 +3788,12 @@ static void ev_window_update_fullscreen_action (EvWindow *window) { - GtkAction *action; + GAction *action; + gboolean fullscreen; - action = gtk_action_group_get_action (window->priv->action_group, "ViewFullscreen"); - g_signal_handlers_block_by_func - (action, G_CALLBACK (ev_window_cmd_view_fullscreen), window); - gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), - ev_document_model_get_fullscreen (window->priv->model)); - g_signal_handlers_unblock_by_func - (action, G_CALLBACK (ev_window_cmd_view_fullscreen), window); + action = g_action_map_lookup_action (G_ACTION_MAP (window), "fullscreen"); + fullscreen = ev_document_model_get_fullscreen (window->priv->model); + g_simple_action_set_state (G_SIMPLE_ACTION (action), g_variant_new_boolean (fullscreen)); } static void @@ -4292,16 +4010,19 @@ } static void -ev_window_cmd_view_fullscreen (GtkAction *action, EvWindow *window) +ev_window_change_fullscreen_action_state (GSimpleAction *action, + GVariant *state, + gpointer user_data) { - gboolean fullscreen; + EvWindow *window = user_data; - fullscreen = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)); - if (fullscreen) { + if (g_variant_get_boolean (state)) { ev_window_run_fullscreen (window); } else { ev_window_stop_fullscreen (window, TRUE); } + + g_simple_action_set_state (action, state); } static void @@ -4336,15 +4057,11 @@ static void ev_window_update_presentation_action (EvWindow *window) { - GtkAction *action; + GAction *action; - action = gtk_action_group_get_action (window->priv->action_group, "ViewPresentation"); - g_signal_handlers_block_by_func - (action, G_CALLBACK (ev_window_cmd_view_presentation), window); - gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), - EV_WINDOW_IS_PRESENTATION (window)); - g_signal_handlers_unblock_by_func - (action, G_CALLBACK (ev_window_cmd_view_presentation), window); + action = g_action_map_lookup_action (G_ACTION_MAP (window), "presentation"); + g_simple_action_set_state (G_SIMPLE_ACTION (action), + g_variant_new_boolean (EV_WINDOW_IS_PRESENTATION (window))); } static void @@ -4459,14 +4176,17 @@ } static void -ev_window_cmd_view_presentation (GtkAction *action, EvWindow *window) +ev_window_change_presentation_action_state (GSimpleAction *action, + GVariant *state, + gpointer user_data) { - gboolean presentation; + EvWindow *window = user_data; - presentation = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)); - if (presentation) { + if (g_variant_get_boolean (state)) { ev_window_run_presentation (window); } + + g_simple_action_set_state (action, state); } static gboolean @@ -4530,10 +4250,12 @@ ev_window_update_actions_sensitivity (window); } - static void -ev_window_cmd_edit_rotate_left (GtkAction *action, EvWindow *ev_window) +ev_window_activate_rotate_left_action (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) { + EvWindow *ev_window = user_data; gint rotation; if (EV_WINDOW_IS_PRESENTATION (ev_window)) { @@ -4548,8 +4270,11 @@ } static void -ev_window_cmd_edit_rotate_right (GtkAction *action, EvWindow *ev_window) +ev_window_activate_rotate_right_action (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) { + EvWindow *ev_window = user_data; gint rotation; if (EV_WINDOW_IS_PRESENTATION (ev_window)) { @@ -4564,16 +4289,23 @@ } static void -ev_window_cmd_view_inverted_colors (GtkAction *action, EvWindow *ev_window) +ev_window_change_inverted_colors_action_state (GSimpleAction *action, + GVariant *state, + gpointer user_data) { - gboolean inverted_colors = ev_document_model_get_inverted_colors (ev_window->priv->model); + EvWindow *ev_window = user_data; - ev_document_model_set_inverted_colors (ev_window->priv->model, !inverted_colors); + ev_document_model_set_inverted_colors (ev_window->priv->model, + g_variant_get_boolean (state)); + g_simple_action_set_state (action, state); } static void -ev_window_cmd_edit_save_settings (GtkAction *action, EvWindow *ev_window) +ev_window_activate_save_settings_action (GSimpleAction *action, + GVariant *state, + gpointer user_data) { + EvWindow *ev_window = user_data; EvWindowPrivate *priv = ev_window->priv; EvDocumentModel *model = priv->model; GSettings *settings = priv->default_settings; @@ -4582,7 +4314,7 @@ g_settings_set_boolean (settings, "continuous", ev_document_model_get_continuous (model)); g_settings_set_boolean (settings, "dual-page", - ev_document_model_get_dual_page (model)); + ev_document_model_get_dual_page (model)); g_settings_set_boolean (settings, "dual-page-odd-left", ev_document_model_get_dual_page_odd_pages_left (model)); g_settings_set_boolean (settings, "fullscreen", @@ -4607,59 +4339,78 @@ } static void -ev_window_cmd_view_zoom_in (GtkAction *action, EvWindow *ev_window) +ev_window_activate_zoom_in_action (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) { - g_return_if_fail (EV_IS_WINDOW (ev_window)); + EvWindow *ev_window = user_data; + + g_return_if_fail (EV_IS_WINDOW (ev_window)); ev_document_model_set_sizing_mode (ev_window->priv->model, EV_SIZING_FREE); ev_view_zoom_in (EV_VIEW (ev_window->priv->view)); } static void -ev_window_cmd_view_zoom_out (GtkAction *action, EvWindow *ev_window) +ev_window_activate_zoom_out_action (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) { - g_return_if_fail (EV_IS_WINDOW (ev_window)); + EvWindow *ev_window = user_data; + + g_return_if_fail (EV_IS_WINDOW (ev_window)); ev_document_model_set_sizing_mode (ev_window->priv->model, EV_SIZING_FREE); ev_view_zoom_out (EV_VIEW (ev_window->priv->view)); } static void -ev_window_cmd_go_previous_page (GtkAction *action, EvWindow *ev_window) +ev_window_activate_go_previous_page_action (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) { - g_return_if_fail (EV_IS_WINDOW (ev_window)); + EvWindow *window = user_data; - ev_view_previous_page (EV_VIEW (ev_window->priv->view)); + ev_view_previous_page (EV_VIEW (window->priv->view)); } static void -ev_window_cmd_go_next_page (GtkAction *action, EvWindow *ev_window) +ev_window_activate_go_next_page_action (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) { - g_return_if_fail (EV_IS_WINDOW (ev_window)); + EvWindow *window = user_data; - ev_view_next_page (EV_VIEW (ev_window->priv->view)); + ev_view_next_page (EV_VIEW (window->priv->view)); } static void -ev_window_cmd_go_first_page (GtkAction *action, EvWindow *ev_window) +ev_window_activate_go_first_page_action (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) { - g_return_if_fail (EV_IS_WINDOW (ev_window)); + EvWindow *window = user_data; - ev_document_model_set_page (ev_window->priv->model, 0); + ev_document_model_set_page (window->priv->model, 0); } static void -ev_window_cmd_go_last_page (GtkAction *action, EvWindow *ev_window) +ev_window_activate_go_last_page_action (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) { - g_return_if_fail (EV_IS_WINDOW (ev_window)); + EvWindow *window = user_data; - ev_document_model_set_page (ev_window->priv->model, - ev_document_get_n_pages (ev_window->priv->document) - 1); + ev_document_model_set_page (window->priv->model, + ev_document_get_n_pages (window->priv->document) - 1); } static void -ev_window_cmd_go_forward (GtkAction *action, EvWindow *ev_window) +ev_window_activate_go_forward_action (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) { + EvWindow *ev_window = user_data; int n_pages, current_page; g_return_if_fail (EV_IS_WINDOW (ev_window)); @@ -4673,11 +4424,14 @@ } static void -ev_window_cmd_go_backward (GtkAction *action, EvWindow *ev_window) +ev_window_activate_go_backward_action (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) { + EvWindow *ev_window = user_data; int current_page; - - g_return_if_fail (EV_IS_WINDOW (ev_window)); + + g_return_if_fail (EV_IS_WINDOW (ev_window)); current_page = ev_document_model_get_page (ev_window->priv->model); @@ -4686,15 +4440,6 @@ } } -static void -ev_window_cmd_bookmark_activate (GtkAction *action, - EvWindow *window) -{ - guint page = ev_bookmark_action_get_page (EV_BOOKMARK_ACTION (action)); - - ev_document_model_set_page (window->priv->model, page); -} - static gint compare_bookmarks (EvBookmark *a, EvBookmark *b) @@ -4705,59 +4450,33 @@ static void ev_window_setup_bookmarks (EvWindow *window) { - GList *items, *l; + GList *items, *it; - if (!window->priv->bookmarks) - return; + g_menu_remove_all (window->priv->bookmarks_menu); - if (window->priv->bookmarks_ui_id > 0) { - gtk_ui_manager_remove_ui (window->priv->ui_manager, - window->priv->bookmarks_ui_id); - gtk_ui_manager_ensure_update (window->priv->ui_manager); - } - window->priv->bookmarks_ui_id = gtk_ui_manager_new_merge_id (window->priv->ui_manager); + items = g_list_sort (ev_bookmarks_get_bookmarks (window->priv->bookmarks), + (GCompareFunc) compare_bookmarks); - if (window->priv->bookmarks_action_group) { - gtk_ui_manager_remove_action_group (window->priv->ui_manager, - window->priv->bookmarks_action_group); - g_object_unref (window->priv->bookmarks_action_group); - } - window->priv->bookmarks_action_group = gtk_action_group_new ("BookmarksActions"); - gtk_ui_manager_insert_action_group (window->priv->ui_manager, - window->priv->bookmarks_action_group, -1); + for (it = items; it; it = it->next) { + EvBookmark *bookmark = it->data; + GMenuItem *item; - items = ev_bookmarks_get_bookmarks (window->priv->bookmarks); - items = g_list_sort (items, (GCompareFunc)compare_bookmarks); + item = g_menu_item_new (bookmark->title, NULL); + g_menu_item_set_action_and_target (item, "win.goto-bookmark", "u", bookmark->page); + g_menu_append_item (window->priv->bookmarks_menu, item); - for (l = items; l && l->data; l = g_list_next (l)) { - EvBookmark *bm = (EvBookmark *)l->data; - GtkAction *action; - - action = ev_bookmark_action_new (bm); - g_signal_connect (action, "activate", - G_CALLBACK (ev_window_cmd_bookmark_activate), - window); - gtk_action_group_add_action (window->priv->bookmarks_action_group, - action); - - gtk_ui_manager_add_ui (window->priv->ui_manager, - window->priv->bookmarks_ui_id, - "/ActionMenu/BookmarksMenu/BookmarksItems", - gtk_action_get_label (action), - gtk_action_get_name (action), - GTK_UI_MANAGER_MENUITEM, - FALSE); - - g_object_unref (action); + g_object_unref (item); } g_list_free (items); } static void -ev_window_cmd_bookmarks_add (GtkAction *action, - EvWindow *window) +ev_window_activate_add_bookmark_action (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) { + EvWindow *window = user_data; EvBookmark bm; gchar *page_label; @@ -4771,32 +4490,41 @@ } static void -ev_window_cmd_view_reload (GtkAction *action, EvWindow *ev_window) +ev_window_activate_goto_bookmark_action (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) { - ev_window_reload_document (ev_window, NULL); -} + EvWindow *window = user_data; -static void -ev_window_cmd_view_autoscroll (GtkAction *action, EvWindow *ev_window) -{ - ev_view_autoscroll_start (EV_VIEW (ev_window->priv->view)); + ev_document_model_set_page (window->priv->model, g_variant_get_uint32 (parameter)); } static void -ev_window_cmd_leave_fullscreen (GtkAction *action, EvWindow *window) +ev_window_activate_reload_action (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) { - ev_window_stop_fullscreen (window, TRUE); + EvWindow *ev_window = user_data; + + ev_window_reload_document (ev_window, NULL); } static void -ev_window_cmd_start_presentation (GtkAction *action, EvWindow *window) +ev_window_activate_auto_scroll_action (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) { - ev_window_run_presentation (window); + EvWindow *ev_window = user_data; + + ev_view_autoscroll_start (EV_VIEW (ev_window->priv->view)); } static void -ev_window_cmd_escape (GtkAction *action, EvWindow *window) +ev_window_activate_escape_action (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) { + EvWindow *window = user_data; ev_view_autoscroll_stop (EV_VIEW (window->priv->view)); if (gtk_widget_get_visible (window->priv->find_bar)) @@ -4890,29 +4618,20 @@ } static void -ev_window_update_continuous_action (EvWindow *window) -{ - GtkAction *action; - - action = gtk_action_group_get_action (window->priv->action_group, "ViewContinuous"); - g_signal_handlers_block_by_func - (action, G_CALLBACK (ev_window_cmd_continuous), window); - gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), - ev_document_model_get_continuous (window->priv->model)); - g_signal_handlers_unblock_by_func - (action, G_CALLBACK (ev_window_cmd_continuous), window); -} - -static void ev_window_continuous_changed_cb (EvDocumentModel *model, GParamSpec *pspec, EvWindow *ev_window) { - ev_window_update_continuous_action (ev_window); + gboolean continuous; + GAction *action; + + continuous = ev_document_model_get_continuous (model); + + action = g_action_map_lookup_action (G_ACTION_MAP (ev_window), "continuous"); + g_simple_action_set_state (G_SIMPLE_ACTION (action), g_variant_new_boolean (continuous)); if (ev_window->priv->metadata && !ev_window_is_empty (ev_window)) - ev_metadata_set_boolean (ev_window->priv->metadata, "continuous", - ev_document_model_get_continuous (model)); + ev_metadata_set_boolean (ev_window->priv->metadata, "continuous", continuous); } static void @@ -4930,27 +4649,16 @@ } static void -ev_window_update_inverted_colors_action (EvWindow *window) -{ - GtkAction *action; - - action = gtk_action_group_get_action (window->priv->action_group, "ViewInvertedColors"); - g_signal_handlers_block_by_func - (action, G_CALLBACK (ev_window_cmd_view_inverted_colors), window); - gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), - ev_document_model_get_inverted_colors (window->priv->model)); - g_signal_handlers_unblock_by_func - (action, G_CALLBACK (ev_window_cmd_view_inverted_colors), window); -} - -static void ev_window_inverted_colors_changed_cb (EvDocumentModel *model, GParamSpec *pspec, EvWindow *window) { gboolean inverted_colors = ev_document_model_get_inverted_colors (model); + GAction *action; - ev_window_update_inverted_colors_action (window); + action = g_action_map_lookup_action (G_ACTION_MAP (window), "inverted-colors"); + g_simple_action_set_state (G_SIMPLE_ACTION (action), + g_variant_new_boolean (inverted_colors)); if (window->priv->metadata && !ev_window_is_empty (window)) ev_metadata_set_boolean (window->priv->metadata, "inverted-colors", @@ -4960,43 +4668,20 @@ } static void -ev_window_update_dual_page_action (EvWindow *window) -{ - GtkAction *action; - - action = gtk_action_group_get_action (window->priv->action_group, "ViewDual"); - g_signal_handlers_block_by_func - (action, G_CALLBACK (ev_window_cmd_dual), window); - gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), - ev_document_model_get_dual_page (window->priv->model)); - g_signal_handlers_unblock_by_func - (action, G_CALLBACK (ev_window_cmd_dual), window); -} - -static void ev_window_dual_mode_changed_cb (EvDocumentModel *model, GParamSpec *pspec, EvWindow *ev_window) { - ev_window_update_dual_page_action (ev_window); + gboolean dual_page; + GAction *action; - if (ev_window->priv->metadata && !ev_window_is_empty (ev_window)) - ev_metadata_set_boolean (ev_window->priv->metadata, "dual-page", - ev_document_model_get_dual_page (model)); -} + dual_page = ev_document_model_get_dual_page (model); -static void -ev_window_update_dual_page_odd_pages_left_action (EvWindow *window) -{ - GtkAction *action; + action = g_action_map_lookup_action (G_ACTION_MAP (ev_window), "dual-page"); + g_simple_action_set_state (G_SIMPLE_ACTION (action), g_variant_new_boolean (dual_page)); - action = gtk_action_group_get_action (window->priv->action_group, "ViewDualOddLeft"); - g_signal_handlers_block_by_func - (action, G_CALLBACK (ev_window_cmd_dual_odd_pages_left), window); - gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), - ev_document_model_get_dual_page_odd_pages_left (window->priv->model)); - g_signal_handlers_unblock_by_func - (action, G_CALLBACK (ev_window_cmd_dual_odd_pages_left), window); + if (ev_window->priv->metadata && !ev_window_is_empty (ev_window)) + ev_metadata_set_boolean (ev_window->priv->metadata, "dual-page", dual_page); } static void @@ -5004,119 +4689,36 @@ GParamSpec *pspec, EvWindow *ev_window) { - ev_window_update_dual_page_odd_pages_left_action (ev_window); - 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)); } -static char * -build_comments_string (EvDocument *document) -{ - gchar *comments = NULL; - EvDocumentBackendInfo info; - - if (document && ev_document_get_backend_info (document, &info)) { - comments = g_strdup_printf ( - _("Document Viewer\nUsing %s (%s)"), - info.name, info.version); - } else { - comments = g_strdup_printf ( - _("Document Viewer")); - } - - return comments; -} - static void -ev_window_cmd_help_about (GtkAction *action, EvWindow *ev_window) +ev_window_activate_open_menu_command (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) { - const char *authors[] = { - "Martin Kretzschmar ", - "Jonathan Blandford ", - "Marco Pesenti Gritti ", - "Nickolay V. Shmyrev ", - "Bryan Clark ", - "Carlos Garcia Campos ", - "Wouter Bolsterlee ", - "Christian Persch ", - NULL - }; + EvWindow *ev_window = user_data; - const char *documenters[] = { - "Nickolay V. Shmyrev ", - "Phil Bull ", - "Tiffany Antpolski ", - NULL - }; - - const char *license[] = { - N_("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 Software Foundation; either version 2 of the License, or " - "(at your option) any later version.\n"), - N_("Evince is distributed in the hope that it will be useful, " - "but WITHOUT ANY WARRANTY; without even the implied warranty of " - "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the " - "GNU General Public License for more details.\n"), - N_("You should have received a copy of the GNU General Public License " - "along with Evince; if not, write to the Free Software Foundation, Inc., " - "51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n") - }; - - char *license_trans; - char *comments; - -#ifdef ENABLE_NLS - const char **p; - - for (p = authors; *p; ++p) - *p = _(*p); - - for (p = documenters; *p; ++p) - *p = _(*p); -#endif - - license_trans = g_strconcat (_(license[0]), "\n", _(license[1]), "\n", - _(license[2]), "\n", NULL); - - comments = build_comments_string (ev_window->priv->document); - - gtk_show_about_dialog ( - GTK_WINDOW (ev_window), - "name", _("Evince"), - "version", VERSION, - "copyright", - _("© 1996–2012 The Evince authors"), - "license", license_trans, - "website", "http://www.gnome.org/projects/evince", - "comments", comments, - "authors", authors, - "documenters", documenters, - "translator-credits", _("translator-credits"), - "logo-icon-name", "evince", - "wrap-license", TRUE, - NULL); - - g_free (comments); - g_free (license_trans); -} - -static void -ev_window_cmd_action_menu (GtkAction *action, EvWindow *ev_window) -{ ev_toolbar_action_menu_popup (EV_TOOLBAR (ev_window->priv->toolbar)); } static void -ev_window_view_sidebar_cb (GtkAction *action, EvWindow *ev_window) +ev_window_change_show_side_pane_action_state (GSimpleAction *action, + GVariant *state, + gpointer user_data) { + EvWindow *ev_window = user_data; + gboolean show_side_pane; + if (EV_WINDOW_IS_PRESENTATION (ev_window)) return; - - update_chrome_flag (ev_window, EV_CHROME_SIDEBAR, - gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action))); + + show_side_pane = g_variant_get_boolean (state); + g_simple_action_set_state (action, g_variant_new_boolean (show_side_pane)); + + update_chrome_flag (ev_window, EV_CHROME_SIDEBAR, show_side_pane); update_chrome_visibility (ev_window); } @@ -5137,14 +4739,11 @@ GParamSpec *pspec, EvWindow *ev_window) { - GtkAction *action; - - action = gtk_action_group_get_action (ev_window->priv->action_group, "ViewSidebar"); - if (!EV_WINDOW_IS_PRESENTATION (ev_window)) { gboolean visible = gtk_widget_get_visible (GTK_WIDGET (ev_sidebar)); - gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), visible); + g_action_group_change_action_state (G_ACTION_GROUP (ev_window), "show-side-pane", + g_variant_new_boolean (visible)); if (ev_window->priv->metadata) ev_metadata_set_boolean (ev_window->priv->metadata, "sidebar_visibility", @@ -5154,14 +4753,10 @@ } } -static void +static GMenuModel * view_menu_link_popup (EvWindow *ev_window, EvLink *link) { - gboolean show_external = FALSE; - gboolean show_internal = FALSE; - GtkAction *action; - if (ev_window->priv->link) g_object_unref (ev_window->priv->link); @@ -5178,42 +4773,23 @@ switch (ev_link_action_get_action_type (ev_action)) { case EV_LINK_ACTION_TYPE_GOTO_DEST: case EV_LINK_ACTION_TYPE_GOTO_REMOTE: - show_internal = TRUE; - break; + return ev_window->priv->internal_link_section; case EV_LINK_ACTION_TYPE_EXTERNAL_URI: case EV_LINK_ACTION_TYPE_LAUNCH: - show_external = TRUE; - break; - default: - break; + return ev_window->priv->external_link_section; + default: + return NULL; } } } - - action = gtk_action_group_get_action (ev_window->priv->view_popup_action_group, - "OpenLink"); - gtk_action_set_visible (action, show_external); - - action = gtk_action_group_get_action (ev_window->priv->view_popup_action_group, - "CopyLinkAddress"); - gtk_action_set_visible (action, show_external); - - action = gtk_action_group_get_action (ev_window->priv->view_popup_action_group, - "GoLink"); - gtk_action_set_visible (action, show_internal); - - action = gtk_action_group_get_action (ev_window->priv->view_popup_action_group, - "OpenLinkNewWindow"); - gtk_action_set_visible (action, show_internal); + + return NULL; } -static void +static GMenuModel * view_menu_image_popup (EvWindow *ev_window, EvImage *image) { - GtkAction *action; - gboolean show_image = FALSE; - if (ev_window->priv->image) g_object_unref (ev_window->priv->image); @@ -5222,38 +4798,22 @@ else ev_window->priv->image = NULL; - show_image = (ev_window->priv->image != NULL); - - action = gtk_action_group_get_action (ev_window->priv->view_popup_action_group, - "SaveImageAs"); - gtk_action_set_visible (action, show_image); - - action = gtk_action_group_get_action (ev_window->priv->view_popup_action_group, - "CopyImage"); - gtk_action_set_visible (action, show_image); + return ev_window->priv->image != NULL ? ev_window->priv->image_section : NULL; } -static void +static GMenuModel * view_menu_annot_popup (EvWindow *ev_window, EvAnnotation *annot) { - GtkAction *action; - gboolean show_annot = FALSE; - if (ev_window->priv->annot) g_object_unref (ev_window->priv->annot); ev_window->priv->annot = (annot) ? g_object_ref (annot) : NULL; - action = gtk_action_group_get_action (ev_window->priv->view_popup_action_group, - "AnnotProperties"); - gtk_action_set_visible (action, (annot != NULL && EV_IS_ANNOTATION_MARKUP (annot))); - if (annot && EV_IS_ANNOTATION_ATTACHMENT (annot)) { EvAttachment *attachment; attachment = ev_annotation_attachment_get_attachment (EV_ANNOTATION_ATTACHMENT (annot)); if (attachment) { - show_annot = TRUE; if (ev_window->priv->attach_list) { g_list_foreach (ev_window->priv->attach_list, (GFunc) g_object_unref, NULL); @@ -5263,16 +4823,43 @@ ev_window->priv->attach_list = g_list_prepend (ev_window->priv->attach_list, g_object_ref (attachment)); + + return ev_window->priv->annotation_section; } } - action = gtk_action_group_get_action (ev_window->priv->attachment_popup_action_group, - "OpenAttachment"); - gtk_action_set_visible (action, show_annot); - - action = gtk_action_group_get_action (ev_window->priv->attachment_popup_action_group, - "SaveAttachmentAs"); - gtk_action_set_visible (action, show_annot); + return NULL; +} + +static void +popup_menu_detach (GtkWidget *attach_widget, + GtkMenu *menu) +{ + EvWindow *window = EV_WINDOW (attach_widget); + + window->priv->popup_menu = NULL; +} + +static GMenu * +menu_new_copy (GMenuModel *source) +{ + GMenu *menu; + gint n_items; + gint i; + + menu = g_menu_new (); + + n_items = g_menu_model_get_n_items (source); + for (i = 0; i < n_items; i++) { + GMenuItem *item; + + item = g_menu_item_new_from_model (source, i); + g_menu_append_item (menu, item); + + g_object_unref (item); + } + + return menu; } static gboolean @@ -5280,34 +4867,44 @@ GList *items, EvWindow *ev_window) { - GList *l; - gboolean has_link = FALSE; - gboolean has_image = FALSE; - gboolean has_annot = FALSE; + GList *l; + GMenu *popup; + + if (ev_window->priv->popup_menu) { + gtk_widget_destroy (ev_window->priv->popup_menu); + ev_window->priv->popup_menu = NULL; + } + + /* make a deep copy of the base menu to append the optionally + * visible sections to */ + popup = menu_new_copy (ev_window->priv->document_view_menu); for (l = items; l; l = g_list_next (l)) { if (EV_IS_LINK (l->data)) { - view_menu_link_popup (ev_window, EV_LINK (l->data)); - has_link = TRUE; + GMenuModel *section = view_menu_link_popup (ev_window, EV_LINK (l->data)); + if (section) + g_menu_prepend_section (popup, NULL, section); } else if (EV_IS_IMAGE (l->data)) { - view_menu_image_popup (ev_window, EV_IMAGE (l->data)); - has_image = TRUE; + GMenuModel *section = view_menu_image_popup (ev_window, EV_IMAGE (l->data)); + if (section) + g_menu_append_section (popup, NULL, section); } else if (EV_IS_ANNOTATION (l->data)) { - view_menu_annot_popup (ev_window, EV_ANNOTATION (l->data)); - has_annot = TRUE; + GMenuModel *section = view_menu_annot_popup (ev_window, EV_ANNOTATION (l->data)); + if (section) + g_menu_append_section (popup, NULL, section); } } - if (!has_link) - view_menu_link_popup (ev_window, NULL); - if (!has_image) - view_menu_image_popup (ev_window, NULL); - if (!has_annot) - view_menu_annot_popup (ev_window, NULL); + if (g_menu_model_get_n_items (G_MENU_MODEL (popup)) > 0) { + ev_window->priv->popup_menu = gtk_menu_new_from_model (G_MENU_MODEL (popup)); + gtk_menu_attach_to_widget (GTK_MENU (ev_window->priv->popup_menu), + GTK_WIDGET (ev_window), popup_menu_detach); - gtk_menu_popup (GTK_MENU (ev_window->priv->view_popup), - NULL, NULL, NULL, NULL, - 3, gtk_get_current_event_time ()); + gtk_menu_popup (GTK_MENU (ev_window->priv->popup_menu), NULL, NULL, NULL, NULL, + 3, gtk_get_current_event_time ()); + } + + g_object_unref (popup); return TRUE; } @@ -5316,8 +4913,6 @@ GList *attach_list, EvWindow *ev_window) { - GtkWidget *popup; - g_assert (attach_list != NULL); if (ev_window->priv->attach_list) { @@ -5325,13 +4920,19 @@ (GFunc) g_object_unref, NULL); g_list_free (ev_window->priv->attach_list); } - + ev_window->priv->attach_list = attach_list; - - popup = ev_window->priv->attachment_popup; - gtk_menu_popup (GTK_MENU (popup), NULL, NULL, - NULL, NULL, + if (ev_window->priv->popup_menu) { + gtk_widget_destroy (ev_window->priv->popup_menu); + ev_window->priv->popup_menu = NULL; + } + + ev_window->priv->popup_menu = gtk_menu_new_from_model (ev_window->priv->attachment_section); + gtk_menu_attach_to_widget (GTK_MENU (ev_window->priv->popup_menu), + GTK_WIDGET (ev_window), popup_menu_detach); + + gtk_menu_popup (GTK_MENU (ev_window->priv->popup_menu), NULL, NULL, NULL, NULL, 3, gtk_get_current_event_time ()); return TRUE; @@ -5542,21 +5143,6 @@ } static void -update_toggle_find_action (EvWindow *ev_window, - gboolean active) -{ - GtkAction *action; - - action = gtk_action_group_get_action (ev_window->priv->action_group, "EditFind"); - if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)) == active) - return; - - g_signal_handlers_block_by_func (action, G_CALLBACK (ev_window_cmd_toggle_find), ev_window); - gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), active); - g_signal_handlers_unblock_by_func (action, G_CALLBACK (ev_window_cmd_toggle_find), ev_window); -} - -static void ev_window_show_find_bar (EvWindow *ev_window) { if (gtk_widget_get_visible (ev_window->priv->find_bar)) { @@ -5583,7 +5169,7 @@ update_chrome_flag (ev_window, EV_CHROME_FINDBAR, TRUE); update_chrome_visibility (ev_window); gtk_widget_grab_focus (ev_window->priv->find_bar); - update_toggle_find_action (ev_window, TRUE); + g_action_group_change_action_state (G_ACTION_GROUP (ev_window), "find", g_variant_new_boolean (TRUE)); } static void @@ -5601,7 +5187,7 @@ update_chrome_flag (ev_window, EV_CHROME_FINDBAR, FALSE); update_chrome_visibility (ev_window); gtk_widget_grab_focus (ev_window->priv->view); - update_toggle_find_action (ev_window, FALSE); + g_action_group_change_action_state (G_ACTION_GROUP (ev_window), "find", g_variant_new_boolean (FALSE)); ev_history_thaw (ev_window->priv->history); } @@ -5651,10 +5237,15 @@ ev_window_set_caret_navigation_enabled (EvWindow *window, gboolean enabled) { + GAction *action; + if (window->priv->metadata) ev_metadata_set_boolean (window->priv->metadata, "caret-navigation", enabled); ev_view_set_caret_navigation_enabled (EV_VIEW (window->priv->view), enabled); + + action = g_action_map_lookup_action (G_ACTION_MAP (window), "caret-navigation"); + g_simple_action_set_state (G_SIMPLE_ACTION (action), g_variant_new_boolean (enabled)); } static void @@ -5668,7 +5259,7 @@ /* Turn the confirmation dialog off if the user has requested not to show it again */ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (window->priv->ask_caret_navigation_check))) { - g_settings_set_boolean (ev_window_ensure_settings (window), "show-caret-navigation-message", FALSE); + g_settings_set_boolean (ev_application_get_settings (EV_APP), "show-caret-navigation-message", FALSE); g_settings_apply (window->priv->settings); } @@ -5678,9 +5269,11 @@ } static void -ev_window_cmd_view_toggle_caret_navigation (GtkAction *action, - EvWindow *window) +ev_window_change_caret_navigation_action_state (GSimpleAction *action, + GVariant *state, + gpointer user_data) { + EvWindow *window = user_data; GtkWidget *message_area; GtkWidget *box; GtkWidget *hbox; @@ -5689,7 +5282,7 @@ /* Don't ask for user confirmation to turn the caret navigation off when it is active, * or to turn it on when the confirmation dialog is not to be shown per settings */ enabled = ev_view_is_caret_navigation_enabled (EV_VIEW (window->priv->view)); - if (enabled || !g_settings_get_boolean (ev_window_ensure_settings (window), "show-caret-navigation-message")) { + if (enabled || !g_settings_get_boolean (ev_application_get_settings (EV_APP), "show-caret-navigation-message")) { ev_window_set_caret_navigation_enabled (window, !enabled); return; } @@ -5793,40 +5386,24 @@ priv->action_group = NULL; } - if (priv->view_popup_action_group) { - g_object_unref (priv->view_popup_action_group); - priv->view_popup_action_group = NULL; - } - - if (priv->attachment_popup_action_group) { - g_object_unref (priv->attachment_popup_action_group); - priv->attachment_popup_action_group = NULL; - } + g_clear_object (&priv->document_view_menu); + g_clear_object (&priv->external_link_section); + g_clear_object (&priv->internal_link_section); + g_clear_object (&priv->image_section); + g_clear_object (&priv->attachment_section); + g_clear_object (&priv->annotation_section); g_clear_object (&priv->zoom_selector_popup_action_group); - if (priv->recent_action_group) { - g_object_unref (priv->recent_action_group); - priv->recent_action_group = NULL; - } - if (priv->bookmarks_action_group) { g_object_unref (priv->bookmarks_action_group); priv->bookmarks_action_group = NULL; } if (priv->recent_manager) { - g_signal_handlers_disconnect_by_func (priv->recent_manager, - ev_window_setup_recent, - window); priv->recent_manager = NULL; } - if (priv->settings) { - g_object_unref (priv->settings); - priv->settings = NULL; - } - if (priv->default_settings) { g_settings_apply (priv->default_settings); g_object_unref (priv->default_settings); @@ -5838,8 +5415,6 @@ priv->lockdown_settings = NULL; } - priv->recent_ui_id = 0; - if (priv->model) { g_signal_handlers_disconnect_by_func (priv->model, ev_window_page_changed_cb, @@ -5955,7 +5530,6 @@ G_OBJECT_CLASS (ev_window_parent_class)->dispose (object); } - /* * GtkWindow catches keybindings for the menu items _before_ passing them to * the focused widget. This is unfortunate and means that pressing Ctrl+a, @@ -6012,206 +5586,6 @@ g_type_class_add_private (g_object_class, sizeof (EvWindowPrivate)); } -/* Normal items */ -static const GtkActionEntry entries[] = { - { "Bookmarks", NULL, N_("_Bookmarks") }, - { "RecentFiles", NULL, N_("_Recent") }, - - /* File menu */ - { "FileOpen", GTK_STOCK_OPEN, N_("_Open…"), "O", - N_("Open an existing document"), - G_CALLBACK (ev_window_cmd_file_open) }, - { "FileOpenCopy", NULL, N_("Op_en a Copy"), "N", - N_("Open a copy of the current document in a new window"), - G_CALLBACK (ev_window_cmd_file_open_copy) }, - { "FileSaveAs", GTK_STOCK_SAVE_AS, N_("_Save a Copy…"), "S", - N_("Save a copy of the current document"), - G_CALLBACK (ev_window_cmd_save_as) }, - { "FileSendTo", EV_STOCK_SEND_TO, N_("Send _To…"), NULL, - N_("Send current document by mail, instant message…"), - G_CALLBACK (ev_window_cmd_send_to) }, - { "FileOpenContainingFolder", GTK_STOCK_DIRECTORY, N_("Open Containing _Folder"), NULL, - N_("Show the folder which contains this file in the file manager"), - G_CALLBACK (ev_window_cmd_open_containing_folder) }, - { "FilePrint", GTK_STOCK_PRINT, N_("_Print…"), "P", - N_("Print this document"), - G_CALLBACK (ev_window_cmd_file_print) }, - { "FileProperties", GTK_STOCK_PROPERTIES, N_("P_roperties"), "Return", NULL, - G_CALLBACK (ev_window_cmd_file_properties) }, - { "FileCloseWindow", GTK_STOCK_CLOSE, NULL, "W", NULL, - G_CALLBACK (ev_window_cmd_file_close_window) }, - - /* Edit menu */ - { "EditCopy", GTK_STOCK_COPY, NULL, "C", NULL, - G_CALLBACK (ev_window_cmd_edit_copy) }, - { "EditSelectAll", GTK_STOCK_SELECT_ALL, N_("Select _All"), "A", NULL, - G_CALLBACK (ev_window_cmd_edit_select_all) }, - { "EditRotateLeft", EV_STOCK_ROTATE_LEFT, N_("Rotate _Left"), "Left", NULL, - G_CALLBACK (ev_window_cmd_edit_rotate_left) }, - { "EditRotateRight", EV_STOCK_ROTATE_RIGHT, N_("Rotate _Right"), "Right", NULL, - G_CALLBACK (ev_window_cmd_edit_rotate_right) }, - { "EditSaveSettings", NULL, N_("Save Current Settings as _Default"), "T", NULL, - G_CALLBACK (ev_window_cmd_edit_save_settings) }, - - - /* View menu */ - { "ViewZoomIn", GTK_STOCK_ZOOM_IN, NULL, "plus", - N_("Enlarge the document"), - G_CALLBACK (ev_window_cmd_view_zoom_in) }, - { "ViewZoomOut", GTK_STOCK_ZOOM_OUT, NULL, "minus", - N_("Shrink the document"), - G_CALLBACK (ev_window_cmd_view_zoom_out) }, - { "ViewReload", GTK_STOCK_REFRESH, N_("_Reload"), "R", - N_("Reload the document"), - G_CALLBACK (ev_window_cmd_view_reload) }, - - { "ViewAutoscroll", GTK_STOCK_MEDIA_PLAY, N_("Auto_scroll"), NULL, NULL, - G_CALLBACK (ev_window_cmd_view_autoscroll) }, - - /* Go menu */ - { "GoPreviousPage", "go-up-symbolic", N_("_Previous Page"), "Page_Up", - N_("Go to the previous page"), - G_CALLBACK (ev_window_cmd_go_previous_page) }, - { "GoNextPage", "go-down-symbolic", N_("_Next Page"), "Page_Down", - N_("Go to the next page"), - G_CALLBACK (ev_window_cmd_go_next_page) }, - { "GoFirstPage", GTK_STOCK_GOTO_TOP, N_("_First Page"), "Home", - N_("Go to the first page"), - G_CALLBACK (ev_window_cmd_go_first_page) }, - { "GoLastPage", GTK_STOCK_GOTO_BOTTOM, N_("_Last Page"), "End", - N_("Go to the last page"), - G_CALLBACK (ev_window_cmd_go_last_page) }, - { "GoToPage", GTK_STOCK_GOTO_TOP, N_("Go to Pa_ge"),"L", - N_("Go to Page"), - G_CALLBACK (ev_window_cmd_focus_page_selector) }, - - /* Bookmarks menu */ - { "BookmarksAdd", GTK_STOCK_ADD, N_("_Add Bookmark"), "D", - N_("Add a bookmark for the current page"), - G_CALLBACK (ev_window_cmd_bookmarks_add) }, - - { "HelpAbout", GTK_STOCK_ABOUT, N_("_About"), NULL, NULL, - G_CALLBACK (ev_window_cmd_help_about) }, - - /* Toolbar-only */ - { "LeaveFullscreen", GTK_STOCK_LEAVE_FULLSCREEN, N_("Leave Fullscreen"), NULL, - N_("Leave fullscreen mode"), - G_CALLBACK (ev_window_cmd_leave_fullscreen) }, - { "StartPresentation", EV_STOCK_RUN_PRESENTATION, N_("Start Presentation"), NULL, - N_("Start a presentation"), - G_CALLBACK (ev_window_cmd_start_presentation) }, - - /* Accellerators */ - { "Escape", NULL, "", "Escape", "", - G_CALLBACK (ev_window_cmd_escape) }, - { "CtrlF", GTK_STOCK_FIND, NULL, "F", NULL, - G_CALLBACK (ev_window_cmd_edit_find) }, - { "Slash", GTK_STOCK_FIND, NULL, "slash", NULL, - G_CALLBACK (ev_window_cmd_edit_find) }, - { "F3", NULL, "", "F3", NULL, - G_CALLBACK (ev_window_cmd_edit_find_next) }, - { "CtrlG", NULL, "", "G", NULL, - G_CALLBACK (ev_window_cmd_edit_find_next) }, - { "ShiftCtrlG", NULL, "", "G", NULL, - G_CALLBACK (ev_window_cmd_edit_find_previous) }, - { "PageDown", NULL, "", "Page_Down", NULL, - G_CALLBACK (ev_window_cmd_scroll_forward) }, - { "PageUp", NULL, "", "Page_Up", NULL, - G_CALLBACK (ev_window_cmd_scroll_backward) }, - { "p", GTK_STOCK_GO_UP, "", "p", NULL, - G_CALLBACK (ev_window_cmd_go_previous_page) }, - { "n", GTK_STOCK_GO_DOWN, "", "n", NULL, - G_CALLBACK (ev_window_cmd_go_next_page) }, - { "Plus", GTK_STOCK_ZOOM_IN, NULL, "plus", NULL, - G_CALLBACK (ev_window_cmd_view_zoom_in) }, - { "CtrlEqual", GTK_STOCK_ZOOM_IN, NULL, "equal", NULL, - G_CALLBACK (ev_window_cmd_view_zoom_in) }, - { "Equal", GTK_STOCK_ZOOM_IN, NULL, "equal", NULL, - G_CALLBACK (ev_window_cmd_view_zoom_in) }, - { "Minus", GTK_STOCK_ZOOM_OUT, NULL, "minus", NULL, - G_CALLBACK (ev_window_cmd_view_zoom_out) }, - { "FocusPageSelector", NULL, "", "l", NULL, - G_CALLBACK (ev_window_cmd_focus_page_selector) }, - { "GoBackwardFast", NULL, "", "Page_Up", NULL, - G_CALLBACK (ev_window_cmd_go_backward) }, - { "GoForwardFast", NULL, "", "Page_Down", NULL, - G_CALLBACK (ev_window_cmd_go_forward) }, - { "KpPlus", GTK_STOCK_ZOOM_IN, NULL, "KP_Add", NULL, - G_CALLBACK (ev_window_cmd_view_zoom_in) }, - { "KpMinus", GTK_STOCK_ZOOM_OUT, NULL, "KP_Subtract", NULL, - G_CALLBACK (ev_window_cmd_view_zoom_out) }, - { "CtrlKpPlus", GTK_STOCK_ZOOM_IN, NULL, "KP_Add", NULL, - G_CALLBACK (ev_window_cmd_view_zoom_in) }, - { "CtrlKpMinus", GTK_STOCK_ZOOM_OUT, NULL, "KP_Subtract", NULL, - G_CALLBACK (ev_window_cmd_view_zoom_out) }, - { "CtrlInsert", GTK_STOCK_COPY, NULL, "Insert", NULL, - G_CALLBACK (ev_window_cmd_edit_copy) }, - { "FitPage", EV_STOCK_ZOOM_PAGE, NULL, "f", NULL, - G_CALLBACK (ev_window_cmd_fit_page) }, - { "FitWidth", EV_STOCK_ZOOM_WIDTH, NULL, "w", NULL, - G_CALLBACK (ev_window_cmd_fit_width) }, - { "F10", NULL, "", "F10", NULL, - G_CALLBACK (ev_window_cmd_action_menu) }, - { "F7", NULL, "", "F7", NULL, - G_CALLBACK (ev_window_cmd_view_toggle_caret_navigation) }, -}; - -/* Toggle items */ -static const GtkToggleActionEntry toggle_entries[] = { - /* View Menu */ - { "ViewSidebar", GTK_STOCK_INDEX, N_("Side _Pane"), "F9", - N_("Show or hide the side pane"), - G_CALLBACK (ev_window_view_sidebar_cb), TRUE }, - { "ViewContinuous", EV_STOCK_VIEW_CONTINUOUS, N_("_Continuous"), NULL, - N_("Show the entire document"), - G_CALLBACK (ev_window_cmd_continuous), TRUE }, - { "ViewDual", EV_STOCK_VIEW_DUAL, N_("_Dual"), NULL, - N_("Show two pages at once"), - G_CALLBACK (ev_window_cmd_dual), FALSE }, - { "ViewDualOddLeft", NULL, N_("_Odd Pages Left"), NULL, - N_("Show odd pages on the left in dual mode"), - G_CALLBACK (ev_window_cmd_dual_odd_pages_left), FALSE }, - { "ViewFullscreen", GTK_STOCK_FULLSCREEN, N_("_Fullscreen"), "F11", - N_("Expand the window to fill the screen"), - G_CALLBACK (ev_window_cmd_view_fullscreen) }, - { "ViewPresentation", EV_STOCK_RUN_PRESENTATION, N_("Pre_sentation"), "F5", - N_("Run document as a presentation"), - G_CALLBACK (ev_window_cmd_view_presentation) }, - { "ViewInvertedColors", EV_STOCK_INVERTED_COLORS, N_("_Inverted Colors"), "I", - N_("Show page contents with the colors inverted"), - G_CALLBACK (ev_window_cmd_view_inverted_colors) }, - - { "EditFind", "edit-find-symbolic", N_("_Find…"), "F", - N_("Find a word or phrase in the document"), - G_CALLBACK (ev_window_cmd_toggle_find) }, -}; - -/* Popups specific items */ -static const GtkActionEntry view_popup_entries [] = { - /* Links */ - { "OpenLink", GTK_STOCK_OPEN, N_("_Open Link"), NULL, - NULL, G_CALLBACK (ev_view_popup_cmd_open_link) }, - { "GoLink", GTK_STOCK_GO_FORWARD, N_("_Go To"), NULL, - NULL, G_CALLBACK (ev_view_popup_cmd_open_link) }, - { "OpenLinkNewWindow", NULL, N_("Open in New _Window"), NULL, - NULL, G_CALLBACK (ev_view_popup_cmd_open_link_new_window) }, - { "CopyLinkAddress", NULL, N_("_Copy Link Address"), NULL, - NULL, G_CALLBACK (ev_view_popup_cmd_copy_link_address) }, - { "SaveImageAs", NULL, N_("_Save Image As…"), NULL, - NULL, G_CALLBACK (ev_view_popup_cmd_save_image_as) }, - { "CopyImage", NULL, N_("Copy _Image"), NULL, - NULL, G_CALLBACK (ev_view_popup_cmd_copy_image) }, - { "AnnotProperties", NULL, N_("Annotation Properties…"), NULL, - NULL, G_CALLBACK (ev_view_popup_cmd_annot_properties) } -}; - -static const GtkActionEntry attachment_popup_entries [] = { - { "OpenAttachment", GTK_STOCK_OPEN, N_("_Open Attachment"), NULL, - NULL, G_CALLBACK (ev_attachment_popup_cmd_open_attachment) }, - { "SaveAttachmentAs", GTK_STOCK_SAVE_AS, N_("_Save Attachment As…"), NULL, - NULL, G_CALLBACK (ev_attachment_popup_cmd_save_attachment_as) }, -}; - static const GtkToggleActionEntry zoom_selector_popup_actions[] = { { "ViewFitPage", EV_STOCK_ZOOM_PAGE, N_("Fit Pa_ge"), NULL, N_("Make the current document fill the window"), @@ -6276,13 +5650,6 @@ } static void -sidebar_bookmarks_add_bookmark (EvSidebarBookmarks *sidebar_bookmarks, - EvWindow *window) -{ - ev_window_cmd_bookmarks_add (NULL, window); -} - -static void zoom_action_activated_cb (EvZoomAction *action, EvWindow *window) { @@ -6378,42 +5745,6 @@ } static void -set_action_properties (GtkActionGroup *action_group) -{ - GtkAction *action; - - action = gtk_action_group_get_action (action_group, "FileOpenContainingFolder"); - /*translators: this is the label for toolbar button*/ - g_object_set (action, "short_label", _("Open Folder"), NULL); - - action = gtk_action_group_get_action (action_group, "FileSendTo"); - /*translators: this is the label for toolbar button*/ - g_object_set (action, "short_label", _("Send To"), NULL); - gtk_action_set_visible (action, nautilus_sendto != NULL); - - action = gtk_action_group_get_action (action_group, "GoPreviousPage"); - g_object_set (action, "is-important", TRUE, NULL); - /*translators: this is the label for toolbar button*/ - g_object_set (action, "short_label", _("Previous"), NULL); - - action = gtk_action_group_get_action (action_group, "GoNextPage"); - g_object_set (action, "is-important", TRUE, NULL); - /*translators: this is the label for toolbar button*/ - g_object_set (action, "short_label", _("Next"), NULL); - - action = gtk_action_group_get_action (action_group, "ViewZoomIn"); - /*translators: this is the label for toolbar button*/ - g_object_set (action, "short_label", _("Zoom In"), NULL); - - action = gtk_action_group_get_action (action_group, "ViewZoomOut"); - /*translators: this is the label for toolbar button*/ - g_object_set (action, "short_label", _("Zoom Out"), NULL); - - action = gtk_action_group_get_action (action_group, "LeaveFullscreen"); - g_object_set (action, "is-important", TRUE, NULL); -} - -static void sidebar_widget_model_set (EvSidebarLinks *ev_sidebar_links, GParamSpec *pspec, EvWindow *ev_window) @@ -6647,21 +5978,21 @@ const gchar *name = ev_link_action_get_name (action); if (g_ascii_strcasecmp (name, "FirstPage") == 0) { - ev_window_cmd_go_first_page (NULL, window); + g_action_group_activate_action (G_ACTION_GROUP (window), "go-first-page", NULL); } else if (g_ascii_strcasecmp (name, "PrevPage") == 0) { - ev_window_cmd_go_previous_page (NULL, window); + g_action_group_activate_action (G_ACTION_GROUP (window), "go-previous-page", NULL); } else if (g_ascii_strcasecmp (name, "NextPage") == 0) { - ev_window_cmd_go_next_page (NULL, window); + g_action_group_activate_action (G_ACTION_GROUP (window), "go-next-page", NULL); } else if (g_ascii_strcasecmp (name, "LastPage") == 0) { - ev_window_cmd_go_last_page (NULL, window); + g_action_group_activate_action (G_ACTION_GROUP (window), "go-last-page", NULL); } else if (g_ascii_strcasecmp (name, "GoToPage") == 0) { - ev_window_cmd_focus_page_selector (NULL, window); + g_action_group_activate_action (G_ACTION_GROUP (window), "select-page", NULL); } else if (g_ascii_strcasecmp (name, "Find") == 0) { - ev_window_show_find_bar (window); + g_action_group_activate_action (G_ACTION_GROUP (window), "find", NULL); } else if (g_ascii_strcasecmp (name, "Close") == 0) { - ev_window_cmd_file_close_window (NULL, window); + g_action_group_activate_action (G_ACTION_GROUP (window), "close", NULL); } else if (g_ascii_strcasecmp (name, "Print") == 0) { - ev_window_cmd_file_print (NULL, window); + g_action_group_activate_action (G_ACTION_GROUP (window), "print", NULL); } else { g_warning ("Unimplemented named action: %s, please post a " "bug report in Evince bugzilla " @@ -6702,14 +6033,21 @@ } static void -ev_view_popup_cmd_open_link (GtkAction *action, EvWindow *window) +ev_window_activate_open_link_action (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) { + EvWindow *window = user_data; + ev_view_handle_link (EV_VIEW (window->priv->view), window->priv->link); } static void -ev_view_popup_cmd_open_link_new_window (GtkAction *action, EvWindow *window) +ev_window_activate_open_link_in_new_window_action (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) { + EvWindow *window = user_data; EvLinkAction *ev_action = NULL; EvLinkDest *dest; @@ -6725,8 +6063,11 @@ } static void -ev_view_popup_cmd_copy_link_address (GtkAction *action, EvWindow *window) +ev_window_activate_copy_link_address_action (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) { + EvWindow *window = user_data; EvLinkAction *ev_action; ev_action = ev_link_get_action (window->priv->link); @@ -6782,8 +6123,8 @@ return; } - ev_window_file_chooser_save_folder (ev_window, GTK_FILE_CHOOSER (fc), - G_USER_DIRECTORY_PICTURES); + ev_file_chooser_save_folder (GTK_FILE_CHOOSER (fc), + G_USER_DIRECTORY_PICTURES); uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (fc)); filter = gtk_file_chooser_get_filter (GTK_FILE_CHOOSER (fc)); @@ -6862,8 +6203,11 @@ } static void -ev_view_popup_cmd_save_image_as (GtkAction *action, EvWindow *window) +ev_window_activate_save_image_action (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) { + EvWindow *window = user_data; GtkWidget *fc; if (!window->priv->image) @@ -6887,9 +6231,9 @@ gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (fc), TRUE); file_chooser_dialog_add_writable_pixbuf_formats (GTK_FILE_CHOOSER (fc)); - - ev_window_file_chooser_restore_folder (window, GTK_FILE_CHOOSER (fc), NULL, - G_USER_DIRECTORY_PICTURES); + + ev_file_chooser_restore_folder (GTK_FILE_CHOOSER (fc), NULL, + G_USER_DIRECTORY_PICTURES); g_signal_connect (fc, "response", G_CALLBACK (image_save_dialog_response_cb), @@ -6899,8 +6243,11 @@ } static void -ev_view_popup_cmd_copy_image (GtkAction *action, EvWindow *window) +ev_window_activate_copy_image_action (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) { + EvWindow *window = user_data; GtkClipboard *clipboard; GdkPixbuf *pixbuf; @@ -6919,9 +6266,11 @@ } static void -ev_view_popup_cmd_annot_properties (GtkAction *action, - EvWindow *window) +ev_window_activate_show_annotation_properties_action (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) { + EvWindow *window = user_data; const gchar *author; GdkRGBA rgba; gdouble opacity; @@ -6980,8 +6329,11 @@ } static void -ev_attachment_popup_cmd_open_attachment (GtkAction *action, EvWindow *window) +ev_window_activate_open_attachment_action (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) { + EvWindow *window = user_data; GList *l; GdkScreen *screen; @@ -7023,8 +6375,8 @@ return; } - ev_window_file_chooser_save_folder (ev_window, GTK_FILE_CHOOSER (fc), - G_USER_DIRECTORY_DOCUMENTS); + ev_file_chooser_save_folder (GTK_FILE_CHOOSER (fc), + G_USER_DIRECTORY_DOCUMENTS); uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (fc)); target_file = g_file_new_for_uri (uri); @@ -7089,8 +6441,11 @@ } static void -ev_attachment_popup_cmd_save_attachment_as (GtkAction *action, EvWindow *window) +ev_window_activate_save_attachment_action (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) { + EvWindow *window = user_data; GtkWidget *fc; EvAttachment *attachment = NULL; @@ -7122,8 +6477,8 @@ gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (fc), ev_attachment_get_name (attachment)); - ev_window_file_chooser_restore_folder (window, GTK_FILE_CHOOSER (fc), NULL, - G_USER_DIRECTORY_DOCUMENTS); + ev_file_chooser_restore_folder (GTK_FILE_CHOOSER (fc), NULL, + G_USER_DIRECTORY_DOCUMENTS); g_signal_connect (fc, "response", G_CALLBACK (attachment_save_dialog_response_cb), @@ -7154,16 +6509,16 @@ if (EV_WINDOW_IS_PRESENTATION (window)) ev_view_presentation_previous_page (EV_VIEW_PRESENTATION (window->priv->presentation_view)); else - ev_window_cmd_go_previous_page (NULL, window); + g_action_group_activate_action (G_ACTION_GROUP (window), "go-previous-page", NULL); } else if (strcmp (key, "Next") == 0) { if (EV_WINDOW_IS_PRESENTATION (window)) ev_view_presentation_next_page (EV_VIEW_PRESENTATION (window->priv->presentation_view)); else - ev_window_cmd_go_next_page (NULL, window); + g_action_group_activate_action (G_ACTION_GROUP (window), "go-next-page", NULL); } else if (strcmp (key, "FastForward") == 0) { - ev_window_cmd_go_last_page (NULL, window); + g_action_group_activate_action (G_ACTION_GROUP (window), "go-last-page", NULL); } else if (strcmp (key, "Rewind") == 0) { - ev_window_cmd_go_first_page (NULL, window); + g_action_group_activate_action (G_ACTION_GROUP (window), "go-first-page", NULL); } } @@ -7278,11 +6633,84 @@ } static void +activate_toggle_action (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) +{ + GVariant *state; + + state = g_action_get_state (G_ACTION (action)); + g_action_change_state (G_ACTION (action), g_variant_new_boolean (!g_variant_get_boolean (state))); + g_variant_unref (state); +} + +static void +activate_radio_action (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) +{ + g_action_change_state (G_ACTION (action), parameter); +} + +static void ev_window_init (EvWindow *ev_window) { + const GActionEntry actions[] = { + { "open-copy", ev_window_activate_open_copy_action, NULL, NULL, NULL }, + { "save-copy", ev_window_activate_save_copy_action, NULL, NULL, NULL }, + { "send-to", ev_window_activate_send_to_action, NULL, NULL, NULL }, + { "open-containing-folder", ev_window_activate_open_containing_folder_action, NULL, NULL, NULL }, + { "print", ev_window_activate_print_action, NULL, NULL, NULL }, + { "show-properties", ev_window_activate_show_properties_action, NULL, NULL, NULL }, + { "copy", ev_window_activate_copy_action, NULL, NULL, NULL }, + { "select-all", ev_window_activate_select_all_action, NULL, NULL, NULL }, + { "save-settings", ev_window_activate_save_settings_action, NULL, NULL, NULL }, + { "go-previous-page", ev_window_activate_go_previous_page_action, NULL, NULL, NULL }, + { "go-next-page", ev_window_activate_go_next_page_action, NULL, NULL, NULL }, + { "go-first-page", ev_window_activate_go_first_page_action, NULL, NULL, NULL }, + { "go-last-page", ev_window_activate_go_last_page_action, NULL, NULL, NULL }, + { "go-forward", ev_window_activate_go_forward_action, NULL, NULL, NULL }, + { "go-backwards", ev_window_activate_go_backward_action, NULL, NULL, NULL }, + { "find", activate_toggle_action, NULL, "false", ev_window_change_find_action_state }, + { "find-next", ev_window_activate_find_next_action, NULL, NULL, NULL }, + { "find-previous", ev_window_activate_find_previous_action, NULL, NULL, NULL }, + { "select-page", ev_window_activate_select_page_action, NULL, NULL, NULL }, + { "continuous", activate_toggle_action, NULL, "true", ev_window_change_continuous_action_state }, + { "dual-page", activate_toggle_action, NULL, "false", ev_window_change_dual_page_action_state }, + { "dual-odd-left", activate_toggle_action, NULL, "false", ev_window_change_dual_odd_left_action_state }, + { "show-side-pane", activate_toggle_action, NULL, "false", ev_window_change_show_side_pane_action_state }, + { "inverted-colors", activate_toggle_action, NULL, "false", ev_window_change_inverted_colors_action_state }, + { "fullscreen", activate_toggle_action, NULL, "false", ev_window_change_fullscreen_action_state }, + { "presentation", activate_toggle_action, NULL, "false", ev_window_change_presentation_action_state }, + { "rotate-left", ev_window_activate_rotate_left_action, NULL, NULL, NULL }, + { "rotate-right", ev_window_activate_rotate_right_action, NULL, NULL, NULL }, + { "zoom-in", ev_window_activate_zoom_in_action, NULL, NULL, NULL }, + { "zoom-out", ev_window_activate_zoom_out_action, NULL, NULL, NULL }, + { "reload", ev_window_activate_reload_action, NULL, NULL, NULL }, + { "auto-scroll", ev_window_activate_auto_scroll_action, NULL, NULL, NULL }, + { "add-bookmark", ev_window_activate_add_bookmark_action, NULL, NULL, NULL }, + { "goto-bookmark", ev_window_activate_goto_bookmark_action, "u", NULL, NULL }, + { "close", ev_window_activate_close_action, NULL, NULL, NULL }, + { "scroll-forward", ev_window_activate_scroll_forward_action, NULL, NULL, NULL }, + { "scroll-backwards", ev_window_activate_scroll_backwards_action, NULL, NULL, NULL }, + { "sizing-mode", activate_radio_action, "s", "'free'", ev_window_change_sizing_mode_action_state }, + { "escape", ev_window_activate_escape_action, NULL, NULL, NULL }, + { "open-menu", ev_window_activate_open_menu_command, NULL, NULL, NULL }, + { "caret-navigation", activate_toggle_action, NULL, "false", ev_window_change_caret_navigation_action_state }, + { "open-link", ev_window_activate_open_link_action, NULL, NULL, NULL }, + { "open-link-in-new-window", ev_window_activate_open_link_in_new_window_action, NULL, NULL, NULL }, + { "save-image", ev_window_activate_save_image_action, NULL, NULL, NULL }, + { "copy-image", ev_window_activate_copy_image_action, NULL, NULL, NULL }, + { "show-annotation-properties", ev_window_activate_show_annotation_properties_action, NULL, NULL, NULL }, + { "copy-link-address", ev_window_activate_copy_link_address_action, NULL, NULL, NULL }, + { "open-attachment", ev_window_activate_open_attachment_action, NULL, NULL, NULL }, + { "save-attachment", ev_window_activate_save_attachment_action, NULL, NULL, NULL }, + }; + GtkActionGroup *action_group; GtkAccelGroup *accel_group; GtkCssProvider *css_provider; + GtkBuilder *builder; GError *error = NULL; GtkWidget *sidebar_widget; GtkWidget *overlay; @@ -7343,6 +6771,8 @@ G_CALLBACK (activate_link_cb), ev_window); + ev_window->priv->bookmarks_menu = g_menu_new (); + app_info = g_app_info_get_default_for_uri_scheme ("mailto"); ev_window->priv->has_mailto_handler = app_info != NULL; g_clear_object (&app_info); @@ -7351,15 +6781,13 @@ gtk_container_add (GTK_CONTAINER (ev_window), ev_window->priv->main_box); gtk_widget_show (ev_window->priv->main_box); + g_action_map_add_action_entries (G_ACTION_MAP (ev_window), + actions, G_N_ELEMENTS (actions), + ev_window); + action_group = gtk_action_group_new ("MenuActions"); ev_window->priv->action_group = action_group; gtk_action_group_set_translation_domain (action_group, NULL); - gtk_action_group_add_actions (action_group, entries, - G_N_ELEMENTS (entries), ev_window); - gtk_action_group_add_toggle_actions (action_group, toggle_entries, - G_N_ELEMENTS (toggle_entries), - ev_window); - set_action_properties (action_group); register_custom_actions (ev_window, action_group); ev_window->priv->ui_manager = gtk_ui_manager_new (); @@ -7370,24 +6798,6 @@ gtk_ui_manager_get_accel_group (ev_window->priv->ui_manager); gtk_window_add_accel_group (GTK_WINDOW (ev_window), accel_group); - action_group = gtk_action_group_new ("ViewPopupActions"); - ev_window->priv->view_popup_action_group = action_group; - gtk_action_group_set_translation_domain (action_group, NULL); - gtk_action_group_add_actions (action_group, view_popup_entries, - G_N_ELEMENTS (view_popup_entries), - ev_window); - gtk_ui_manager_insert_action_group (ev_window->priv->ui_manager, - action_group, 0); - - action_group = gtk_action_group_new ("AttachmentPopupActions"); - ev_window->priv->attachment_popup_action_group = action_group; - gtk_action_group_set_translation_domain (action_group, NULL); - gtk_action_group_add_actions (action_group, attachment_popup_entries, - G_N_ELEMENTS (attachment_popup_entries), - ev_window); - gtk_ui_manager_insert_action_group (ev_window->priv->ui_manager, - action_group, 0); - action_group = gtk_action_group_new ("ZoomSelectorPopupActions"); ev_window->priv->zoom_selector_popup_action_group = action_group; gtk_action_group_set_translation_domain (action_group, NULL); @@ -7397,10 +6807,10 @@ gtk_ui_manager_insert_action_group (ev_window->priv->ui_manager, action_group, 0); - gtk_ui_manager_add_ui_from_resource (ev_window->priv->ui_manager, - "/org/gnome/evince/shell/ui/evince.xml", - &error); - g_assert_no_error (error); + gtk_ui_manager_add_ui_from_resource (ev_window->priv->ui_manager, + "/org/gnome/evince/shell/ui/evince.xml", + &error); + g_assert_no_error (error); ev_window_register_zoom_selector_popup_actions (ev_window); @@ -7415,12 +6825,6 @@ g_object_unref (css_provider); ev_window->priv->recent_manager = gtk_recent_manager_get_default (); - ev_window->priv->recent_action_group = NULL; - ev_window->priv->recent_ui_id = 0; - g_signal_connect_swapped (ev_window->priv->recent_manager, - "changed", - G_CALLBACK (ev_window_setup_recent), - ev_window); ev_window->priv->toolbar = ev_toolbar_new (ev_window); gtk_widget_set_no_show_all (ev_window->priv->toolbar, TRUE); @@ -7526,10 +6930,6 @@ sidebar_widget = ev_sidebar_bookmarks_new (); ev_window->priv->sidebar_bookmarks = sidebar_widget; - g_signal_connect (sidebar_widget, - "add-bookmark", - G_CALLBACK (sidebar_bookmarks_add_bookmark), - ev_window); gtk_widget_show (sidebar_widget); ev_sidebar_add_page (EV_SIDEBAR (ev_window->priv->sidebar), sidebar_widget); @@ -7565,7 +6965,7 @@ g_object_set(ev_window->priv->view, "enable-gestures", _oif_ev_application_get_gestures_enabled (EV_APP), NULL); #endif - page_cache_mb = g_settings_get_uint (ev_window_ensure_settings (ev_window), + page_cache_mb = g_settings_get_uint (ev_application_get_settings (EV_APP), GS_PAGE_CACHE_SIZE); ev_view_set_page_cache_size (EV_VIEW (ev_window->priv->view), page_cache_mb * 1024 * 1024); @@ -7707,13 +7107,17 @@ G_CALLBACK (find_bar_visibility_changed_cb), ev_window); + builder = gtk_builder_new_from_resource ("/org/gnome/evince/shell/ui/popup-menus.ui"); + /* Popups */ - ev_window->priv->view_popup = gtk_ui_manager_get_widget (ev_window->priv->ui_manager, - "/DocumentPopup"); - ev_window->priv->link = NULL; + ev_window->priv->document_view_menu = G_MENU_MODEL (gtk_builder_get_object (builder, "document-view-menu")); + ev_window->priv->external_link_section = G_MENU_MODEL (gtk_builder_get_object (builder, "external-link-menu")); + ev_window->priv->internal_link_section = G_MENU_MODEL (gtk_builder_get_object (builder, "internal-link-menu")); + ev_window->priv->image_section = G_MENU_MODEL (gtk_builder_get_object (builder, "image-menu")); + ev_window->priv->attachment_section = G_MENU_MODEL (gtk_builder_get_object (builder, "attachment-menu")); + ev_window->priv->annotation_section = G_MENU_MODEL (gtk_builder_get_object (builder, "annotation-menu")); - ev_window->priv->attachment_popup = gtk_ui_manager_get_widget (ev_window->priv->ui_manager, - "/AttachmentPopup"); + ev_window->priv->link = NULL; ev_window->priv->attach_list = NULL; /* Media player keys */ @@ -7731,9 +7135,6 @@ g_settings_delay (ev_window->priv->default_settings); ev_window_setup_default (ev_window); - /* Set it user interface params */ - ev_window_setup_recent (ev_window); - gtk_window_set_default_size (GTK_WINDOW (ev_window), 600, 600); ev_window_sizing_mode_changed_cb (ev_window->priv->model, NULL, ev_window); @@ -7745,6 +7146,8 @@ NULL, 0, GDK_ACTION_COPY); gtk_drag_dest_add_uri_targets (GTK_WIDGET (ev_window)); + + g_object_unref (builder); } /** @@ -7762,7 +7165,6 @@ ev_window = GTK_WIDGET (g_object_new (EV_TYPE_WINDOW, "type", GTK_WINDOW_TOPLEVEL, "application", g_application_get_default (), - "show-menubar", FALSE, NULL)); return ev_window; @@ -7801,3 +7203,11 @@ return ev_window->priv->zoom_selector_popup_action_group; } + +GMenuModel * +ev_window_get_bookmarks_menu (EvWindow *ev_window) +{ + g_return_val_if_fail (EV_WINDOW (ev_window), NULL); + + return G_MENU_MODEL (ev_window->priv->bookmarks_menu); +} Index: evince-3.10.3/shell/ev-window.h =================================================================== --- evince-3.10.3.orig/shell/ev-window.h 2014-04-28 15:33:25.038869346 +0200 +++ evince-3.10.3/shell/ev-window.h 2014-04-28 15:33:25.034869346 +0200 @@ -89,7 +89,7 @@ GtkUIManager *ev_window_get_ui_manager (EvWindow *ev_window); GtkActionGroup *ev_window_get_main_action_group (EvWindow *ev_window); GtkActionGroup *ev_window_get_zoom_selector_action_group (EvWindow *ev_window); - +GMenuModel *ev_window_get_bookmarks_menu (EvWindow *ev_window); G_END_DECLS Index: evince-3.10.3/shell/evince-appmenu.ui =================================================================== --- evince-3.10.3.orig/shell/evince-appmenu.ui 2014-04-28 15:33:25.038869346 +0200 +++ evince-3.10.3/shell/evince-appmenu.ui 2014-04-28 15:33:25.034869346 +0200 @@ -20,6 +20,16 @@
+ _Open + app.open + +
+
+ + _About + app.about + + _Help app.help F1 Index: evince-3.10.3/shell/evince-ui.xml =================================================================== --- evince-3.10.3.orig/shell/evince-ui.xml 2014-04-28 15:33:25.038869346 +0200 +++ evince-3.10.3/shell/evince-ui.xml 2014-04-28 15:33:25.034869346 +0200 @@ -1,86 +1,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -88,31 +6,5 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - + Index: evince-3.10.3/shell/evince.gresource.xml =================================================================== --- evince-3.10.3.orig/shell/evince.gresource.xml 2014-04-28 15:33:25.038869346 +0200 +++ evince-3.10.3/shell/evince.gresource.xml 2014-04-28 15:33:25.034869346 +0200 @@ -19,6 +19,8 @@ evince-ui.xml evince.css - evince-appmenu.ui + menus.ui + traditional-menus.ui + popup-menus.ui Index: evince-3.10.3/shell/menus.ui =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ evince-3.10.3/shell/menus.ui 2014-04-28 15:33:30.000000000 +0200 @@ -0,0 +1,188 @@ + + + + +
+ + _Open + app.open + +
+
+ + _About + app.about + + + _Help + app.help + +
+
+ + +
+ + _Continuous + win.continuous + + + _Dual + win.dual-page + +
+
+ + Side _Pane + win.show-side-pane + +
+
+ + _Fullscreen + win.fullscreen + + + Pre_sentation + win.presentation + +
+
+ + Rotate _Left + win.rotate-left + + + Rotate _Right + win.rotate-right + +
+
+ + Zoom _In + win.zoom-in + + + Zoom _Out + win.zoom-out + +
+
+ + _Odd Pages Left + win.dual-odd-left + + + _Inverted Colors + win.inverted-colors + +
+
+ + _Reload + win.reload + +
+
+ + +
+ + _Open… + app.open + + + Op_en a Copy + win.open-copy + + + _Recent + + + + + _Save a Copy… + win.save-copy + + + Send _To… + win.send-to + + + Open Containing _Folder + win.open-containing-folder + + + _Print… + win.print + +
+
+ + P_roperties… + win.show-properties + +
+
+ + _Copy + win.copy + + + Select _All + win.select-all + +
+
+ + Save Current Settings as _Default + win.save-settings + +
+
+ + _First Page + win.go-first-page + + + _Last Page + win.go-last-page + +
+
+ + _Add Bookmark + win.add-bookmark + +
+
+ + _Close + win.close + +
+
+ + _About + app.about + +
+
+
Index: evince-3.10.3/shell/traditional-menus.ui =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ evince-3.10.3/shell/traditional-menus.ui 2014-04-28 15:33:25.034869346 +0200 @@ -0,0 +1,230 @@ + + + + + + _File +
+ + _Open… + app.open + <Ctrl>O + + + Op_en a Copy + win.open-copy + <Ctrl>N + +
+
+ + _Save a Copy… + win.save-copy + <Ctrl>S + + + Send _To… + win.send-to + + + Open Containing _Folder + win.open-containing-folder + + + _Print… + win.print + <Ctrl>P + +
+
+ + P_roperties… + win.show-properties + <Alt>Return + +
+ + + + +
+ + _Close + win.close + <Ctrl>W + +
+
+ + _Edit +
+ + _Copy + win.copy + <Ctrl>C + + + Select _All + win.select-all + <Ctrl>A + +
+
+ + _Find + win.find + <Ctrl>F + +
+
+ + Rotate _Left + win.rotate-left + <Ctrl>Left + + + Rotate _Right + win.rotate-right + <Ctrl>Right + +
+
+ + Save Current Settings as _Default + win.save-settings + <Ctrl>T + +
+
+ + _View +
+ + _Continuous + win.continuous + + + _Dual + win.dual-page + +
+
+ + Side _Pane + win.show-side-pane + F9 + +
+
+ + _Fullscreen + win.fullscreen + F11 + + + Pre_sentation + win.presentation + F5 + +
+
+ + Zoom _In + win.zoom-in + <Ctrl>plus + + + Zoom _Out + win.zoom-out + <Ctrl>minus + +
+
+ + _Odd Pages Left + win.dual-odd-left + + + _Inverted Colors + win.inverted-colors + <Ctrl>I + +
+
+ + _Reload + win.reload + <Ctrl>R + +
+
+ + _Go +
+ + _Previous Page + win.go-previous-page + p + + + _Next Page + win.go-next-page + n + +
+
+ + _First Page + win.go-first-page + <Ctrl>Home + + + _Last Page + win.go-last-page + <Ctrl>End + +
+
+ + _Bookmarks +
+ + _Add Bookmark + win.add-bookmark + <Ctrl>D + +
+
+ + _Help +
+ + _Help + app.help + + + _About + app.about + +
+
+
+
Index: evince-3.10.3/po/POTFILES.in =================================================================== --- evince-3.10.3.orig/po/POTFILES.in 2014-04-28 15:33:25.038869346 +0200 +++ evince-3.10.3/po/POTFILES.in 2014-04-28 15:33:25.034869346 +0200 @@ -56,3 +56,6 @@ shell/ev-window-title.c shell/main.c [type: gettext/glade]shell/evince-appmenu.ui +[type: gettext/glade]shell/menus.ui +[type: gettext/glade]shell/traditional-menus.ui +shell/ev-toolbar.c Index: evince-3.10.3/shell/popup-menus.ui =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ evince-3.10.3/shell/popup-menus.ui 2014-04-28 15:33:25.034869346 +0200 @@ -0,0 +1,114 @@ + + + + +
+ + _Previous Page + win.go-previous-page + + + _Next Page + win.go-next-page + + + _Reload + win.reload + + + Auto_scroll + win.auto-scroll + +
+
+ + _Copy + win.copy + + + Select _All + win.select-all + +
+
+ + Open Containing _Folder + win.open-containing-folder + +
+
+ +
+ + _Open Link + win.open-link + + + _Copy Link Address + win.copy-link-address + +
+
+ +
+ + _Go To + win.open-link + + + Open in New _Window + win.open-link-in-new-window + +
+
+ +
+ + _Save Image As… + win.save-image + + + Copy _Image + win.copy-image + +
+
+ +
+ + _Open Attachment + win.open-attachment + + + _Save Attachment As… + win.save-attachment + +
+
+ +
+ + Annotation Properties… + win.show-annotation-properties + +
+
+
debian/patches/git_Don-t-allow-Send-To-when-there-is-no-mail-client-ava.patch0000664000000000000000000000434712343356101024105 0ustar From 1156fddaefd6e9da26f024986382f3505ebfdebe Mon Sep 17 00:00:00 2001 From: Marek Kasik Date: Mon, 16 Dec 2013 17:29:15 +0100 Subject: [PATCH] Don't allow "Send To" when there is no mail client available Check for availability of handler of "mailto" scheme and make "Send To..." menu entry sensitive / insensitive accordingly during initialization of EvWindow. Based on patch of Plamena Manolova. https://bugzilla.gnome.org/show_bug.cgi?id=701654 --- shell/ev-window.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/shell/ev-window.c b/shell/ev-window.c index a11fe50..3d35d6b 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -234,6 +234,9 @@ struct _EvWindowPrivate { /* Caret navigation */ GtkWidget *ask_caret_navigation_check; + + /* Send to */ + gboolean has_mailto_handler; }; #define EV_WINDOW_GET_PRIVATE(object) \ @@ -465,7 +468,8 @@ ev_window_setup_action_sensitivity (EvWindow *ev_window) ev_window_set_action_sensitive (ev_window, "FilePrint", has_pages && ok_to_print); ev_window_set_action_sensitive (ev_window, "FileProperties", has_document && has_properties); ev_window_set_action_sensitive (ev_window, "FileOpenContainingFolder", has_document); - ev_window_set_action_sensitive (ev_window, "FileSendTo", has_document); + ev_window_set_action_sensitive (ev_window, "FileSendTo", + has_document && ev_window->priv->has_mailto_handler); ev_window_set_action_sensitive (ev_window, "ViewPresentation", has_document); /* Edit menu */ @@ -7288,6 +7292,7 @@ ev_window_init (EvWindow *ev_window) GDBusConnection *connection; static gint window_id = 0; #endif + GAppInfo *app_info; g_signal_connect (ev_window, "configure_event", G_CALLBACK (window_configure_event_cb), NULL); @@ -7338,6 +7343,10 @@ ev_window_init (EvWindow *ev_window) G_CALLBACK (activate_link_cb), ev_window); + app_info = g_app_info_get_default_for_uri_scheme ("mailto"); + ev_window->priv->has_mailto_handler = app_info != NULL; + g_clear_object (&app_info); + ev_window->priv->main_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); gtk_container_add (GTK_CONTAINER (ev_window), ev_window->priv->main_box); gtk_widget_show (ev_window->priv->main_box); -- 1.9.rc1 debian/patches/CVE-2017-1000159.patch0000664000000000000000000000327313210053717013465 0ustar From 350404c76dc8601e2cdd2636490e2afc83d3090e Mon Sep 17 00:00:00 2001 From: Tobias Mueller Date: Fri, 14 Jul 2017 12:52:14 +0200 Subject: dvi: Mitigate command injection attacks by quoting filename With commit 1fcca0b8041de0d6074d7e17fba174da36c65f99 came a DVI backend. It exports to PDF via the dvipdfm tool. It calls that tool with the filename of the currently loaded document. If that filename is cleverly crafted, it can escape the currently used manual quoting of the filename. Instead of manually quoting the filename, we use g_shell_quote. https://bugzilla.gnome.org/show_bug.cgi?id=784947 --- backend/dvi/dvi-document.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) Index: evince-3.10.3/backend/dvi/dvi-document.c =================================================================== --- evince-3.10.3.orig/backend/dvi/dvi-document.c 2017-11-30 14:11:08.769767642 -0500 +++ evince-3.10.3/backend/dvi/dvi-document.c 2017-11-30 14:11:08.729767122 -0500 @@ -297,12 +297,14 @@ dvi_document_file_exporter_end (EvFileEx 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, NULL, debian/patches/gtk310-secondary-keybindings.patch0000664000000000000000000001207012343356101017140 0ustar From 24c0293b4d520193553d99f1423b9e0394eec0ef Mon Sep 17 00:00:00 2001 From: Lars Uebernickel Date: Tue, 11 Mar 2014 17:00:02 +0100 Subject: [PATCH] Add secondary (and tertiary) keybindings gtk_application_add_accelerator() can only add one accel per action. Duplicate the actions so that we can add multiple accels. This is very gross, but only needed until we update to gtk 3.12, which introduces a new function that can handle setting multiple accels for a single action. --- shell/ev-application.c | 10 ++++++++++ shell/ev-window.c | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/shell/ev-application.c b/shell/ev-application.c index 4493b1e..65064b1 100644 --- a/shell/ev-application.c +++ b/shell/ev-application.c @@ -1093,6 +1093,7 @@ ev_application_startup (GApplication *gapplication) "win.save-copy", "S", NULL, "win.print", "P", NULL, "win.copy", "C", "Insert", NULL, + "win.copy2", "Insert", NULL, "win.select-all", "A", NULL, "win.save-settings", "T", NULL, "win.go-first-page", "Home", NULL, @@ -1107,13 +1108,22 @@ ev_application_startup (GApplication *gapplication) "win.go-backward", "Page_Up", NULL, "win.go-forward", "Page_Down", NULL, "win.go-next-page", "Page_Down", "n", NULL, + "win.go-next-page2", "n", NULL, "win.go-previous-page", "Page_Up", "p", NULL, + "win.go-previous-page2", "p", NULL, "win.sizing-mode::fit-page", "f", NULL, "win.sizing-mode::fit-width", "w", NULL, "win.open-menu", "F10", NULL, "win.caret-navigation", "F7", NULL, "win.zoom-in", "plus", "plus", "KP_Add", "KP_Add", "equal", NULL, + "win.zoom-in2", "plus", "KP_Add", "KP_Add", NULL, + "win.zoom-in3", "KP_Add", "KP_Add", NULL, + "win.zoom-in4", "KP_Add", NULL, + "win.zoom-in5", "equal", NULL, "win.zoom-out", "minus", "minus", "KP_Subtract", "KP_Subtract", NULL, + "win.zoom-out2", "minus", "KP_Subtract", "KP_Subtract", NULL, + "win.zoom-out3", "KP_Subtract", "KP_Subtract", NULL, + "win.zoom-out4", "KP_Subtract", NULL, "win.show-side-pane", "F9", NULL, "win.fullscreen", "F11", NULL, "win.presentation", "F5", NULL, diff --git a/shell/ev-window.c b/shell/ev-window.c index fc2258e..9f685fa 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -6658,10 +6658,13 @@ ev_window_init (EvWindow *ev_window) { "print", ev_window_activate_print_action, NULL, NULL, NULL }, { "show-properties", ev_window_activate_show_properties_action, NULL, NULL, NULL }, { "copy", ev_window_activate_copy_action, NULL, NULL, NULL }, + { "copy2", ev_window_activate_copy_action, NULL, NULL, NULL }, { "select-all", ev_window_activate_select_all_action, NULL, NULL, NULL }, { "save-settings", ev_window_activate_save_settings_action, NULL, NULL, NULL }, { "go-previous-page", ev_window_activate_go_previous_page_action, NULL, NULL, NULL }, + { "go-previous-page2", ev_window_activate_go_previous_page_action, NULL, NULL, NULL }, { "go-next-page", ev_window_activate_go_next_page_action, NULL, NULL, NULL }, + { "go-next-page2", ev_window_activate_go_next_page_action, NULL, NULL, NULL }, { "go-first-page", ev_window_activate_go_first_page_action, NULL, NULL, NULL }, { "go-last-page", ev_window_activate_go_last_page_action, NULL, NULL, NULL }, { "go-forward", ev_window_activate_go_forward_action, NULL, NULL, NULL }, @@ -6680,7 +6683,14 @@ ev_window_init (EvWindow *ev_window) { "rotate-left", ev_window_activate_rotate_left_action, NULL, NULL, NULL }, { "rotate-right", ev_window_activate_rotate_right_action, NULL, NULL, NULL }, { "zoom-in", ev_window_activate_zoom_in_action, NULL, NULL, NULL }, + { "zoom-in2", ev_window_activate_zoom_in_action, NULL, NULL, NULL }, + { "zoom-in3", ev_window_activate_zoom_in_action, NULL, NULL, NULL }, + { "zoom-in4", ev_window_activate_zoom_in_action, NULL, NULL, NULL }, + { "zoom-in5", ev_window_activate_zoom_in_action, NULL, NULL, NULL }, { "zoom-out", ev_window_activate_zoom_out_action, NULL, NULL, NULL }, + { "zoom-out2", ev_window_activate_zoom_out_action, NULL, NULL, NULL }, + { "zoom-out3", ev_window_activate_zoom_out_action, NULL, NULL, NULL }, + { "zoom-out4", ev_window_activate_zoom_out_action, NULL, NULL, NULL }, { "reload", ev_window_activate_reload_action, NULL, NULL, NULL }, { "auto-scroll", ev_window_activate_auto_scroll_action, NULL, NULL, NULL }, { "add-bookmark", ev_window_activate_add_bookmark_action, NULL, NULL, NULL }, -- 1.9.1 debian/evince.xml0000664000000000000000000000500212343356101011156 0ustar
liw@iki.fi
Lars Wirzenius 2005-02-21
evince 1 evince view PostScript and PDF documents evince file DESCRIPTION evince is a GNOME program for viewing PostScript (PS) and Portable Document Format (PDF) documents. It uses GhostScript for showing PS, and XPDF for showing PDF. OPTIONS evince obeys all normal GNOME and GTK+ command line options, and has no application specific options. SEE ALSO gnome-options 7, gtk-options 7. http://www.gnome.org/projects/evince/
debian/evince.lintian-overrides0000664000000000000000000000022212343356101014013 0ustar #Our copyright file is more complex, but correct: evince: copyright-without-copyright-notice evince: copyright-refers-to-versionless-license-file debian/evince-common.manpages0000664000000000000000000000003412343356101013437 0ustar debian/evince-thumbnailer.1 debian/libevince-dev.install0000664000000000000000000000013112343356101013265 0ustar usr/lib/*.a usr/include usr/lib/pkgconfig usr/lib/*.so usr/share/gtk-doc usr/share/gir-* debian/copyright0000664000000000000000000007725512343356101011141 0ustar This package was debianized by Sebastien Bacher on Mon, 10 Jan 2005 13:23:55 +0100. It was downloaded from ftp://ftp.gnome.org/pub/gnome/sources/evince/ The upstream authors are Bryan Clark, Carlos García Campos, David Malcolm, James Bowes, Jonathan Blandford, Kristian Høgsberg, Martin Kretzschmar and Nickolay V. Shmyrev. See http://live.gnome.org/Evince/Team for more information on the team behind evince. Due to the huge number of supported file formats, evince's copyright situation is a bit complex. Please refer to the following table or the source package for more information. The used shortcuts are explained after the table: File | License | Copyright Holder -----------------------------------------------------+---------+----------------- backend/comics/comics-document.c | GPLv2h | Teemu Tervo backend/comics/comics-document.h | GPLv2h | Teemu Tervo backend/djvu/djvu-document.c | GPLv2h | Nickolay V. Shmyrev backend/djvu/djvu-document.h | GPLv2h | Nickolay V. Shmyrev backend/djvu/djvu-document-private.h | GPLv2h | Michael Hofmann backend/djvu/djvu-links.c | GPLv2h | Pauli Virtanen backend/djvu/djvu-links.h | GPLv2h | Pauli Virtanen backend/djvu/djvu-text.c | GPLv2h | Michael Hofmann backend/djvu/djvu-text.h | GPLv2h | Michael Hofmann backend/djvu/djvu-text-page.c | GPLv2h | Michael Hofmann backend/djvu/djvu-text-page.h | GPLv2h | Michael Hofmann backend/dvi/dvi-document.c | GPLv2h | Nickolay V. Shmyrev backend/dvi/dvi-document.h | GPLv2h | Nickolay V. Shmyrev backend/dvi/fonts.c | unspec | unspec backend/dvi/fonts.h | unspec | unspec backend/dvi/mdvi-lib/afmparse.c | Adobe | Adobe Systems Incorporated. backend/dvi/mdvi-lib/afmparse.h | Adobe | Adobe Systems Incorporated. backend/dvi/mdvi-lib/bitmap.c | GPLv2h | Matias Atria backend/dvi/mdvi-lib/bitmap.h | GPLv2h | Matias Atria backend/dvi/mdvi-lib/color.c | GPLv2h | Matias Atria backend/dvi/mdvi-lib/color.h | GPLv2h | Matias Atria backend/dvi/mdvi-lib/common.c | GPLv2h | Matias Atria backend/dvi/mdvi-lib/common.h | GPLv2h | Matias Atria backend/dvi/mdvi-lib/defaults.h | GPLv2h | Matias Atria backend/dvi/mdvi-lib/dviopcodes.h | unspec | unspec backend/dvi/mdvi-lib/dviread.c | GPLv2h | Matias Atria backend/dvi/mdvi-lib/files.c | GPLv2h | Matias Atria backend/dvi/mdvi-lib/font.c | GPLv2h | Matias Atria backend/dvi/mdvi-lib/fontmap.c | GPLv2h | Matias Atria backend/dvi/mdvi-lib/fontmap.h | GPLv2h | Matias Atria backend/dvi/mdvi-lib/fontsrch.c | GPLv2h | Matias Atria backend/dvi/mdvi-lib/gf.c | GPLv2h | Matias Atria backend/dvi/mdvi-lib/hash.c | GPLv2h | Matias Atria backend/dvi/mdvi-lib/hash.h | unspec | unspec backend/dvi/mdvi-lib/list.c | GPLv2h | Matias Atria backend/dvi/mdvi-lib/mdvi.h | GPLv2h | Matias Atria backend/dvi/mdvi-lib/pagesel.c | GPLv2h | Matias Atria backend/dvi/mdvi-lib/paper.c | GPLv2h | Matias Atria backend/dvi/mdvi-lib/paper.h | unspec | unspec backend/dvi/mdvi-lib/pk.c | GPLv2h | Matias Atria backend/dvi/mdvi-lib/private.h | GPLv2h | Matias Atria backend/dvi/mdvi-lib/setup.c | GPLv2h | Matias Atria backend/dvi/mdvi-lib/special.c | GPLv2h | Matias Atria backend/dvi/mdvi-lib/sp-epsf.c | GPLv2h | Matias Atria backend/dvi/mdvi-lib/sysdeps.h | GPLv2h | Matias Atria backend/dvi/mdvi-lib/t1.c | GPLv2h | Matias Atria backend/dvi/mdvi-lib/tfm.c | GPLv2h | Matias Atria backend/dvi/mdvi-lib/tfmfile.c | GPLv2h | Matias Atria backend/dvi/mdvi-lib/tt.c | GPLv2h | Matias Atria backend/dvi/mdvi-lib/util.c | GPLv2h | Matias Atria backend/dvi/mdvi-lib/vf.c | GPLv2h | Matias Atria backend/dvi/pixbuf-device.c | unspec | unspec backend/dvi/pixbuf-device.h | unspec | unspec backend/impress/common.h | GPL | Gurer Ozen backend/impress/document.c | GPL | Gurer Ozen backend/impress/f_oasis.c | GPL | Gurer Ozen backend/impress/f_oo13.c | GPL | Gurer Ozen backend/impress/iksemel.c | LGPLv2h | Gurer Ozen backend/impress/iksemel.h | LGPLv2h | Gurer Ozen backend/impress/imposter.h | GPL | Gurer Ozen backend/impress/impress-document.c | GPLv2h | Jonathan Blandford , Bastien Nocera backend/impress/impress-document.h | GPLv2h | Jonathan Blandford backend/impress/internal.h | GPL | Gurer Ozen backend/impress/r_back.c | GPL | Gurer Ozen backend/impress/r_draw.c | GPL | Gurer Ozen backend/impress/render.c | GPL | Gurer Ozen backend/impress/r_geometry.c | GPL | Gurer Ozen backend/impress/r_gradient.c | GPL | Gurer Ozen backend/impress/r_style.c | GPL | Gurer Ozen backend/impress/r_text.c | GPL | Gurer Ozen backend/impress/zip.c | GPL | Gurer Ozen backend/impress/zip.h | GPL | Gurer Ozen backend/pdf/ev-poppler.cc | GPLv2h | Red Hat, Inc. backend/pdf/ev-poppler.h | GPLv2h | Red Hat, Inc. backend/pixbuf/pixbuf-document.c | GPLv2h | Anders Carlsson backend/pixbuf/pixbuf-document.h | GPLv2h | Anders Carlsson backend/ps/gsdefaults.c | GPLv2h | The Free Software Foundation backend/ps/gsdefaults.h | GPLv2h | The Free Software Foundation backend/ps/gsio.c | GPLv2h | The Free Software Foundation backend/ps/gsio.h | GPLv2h | The Free Software Foundation backend/ps/gstypes.h | LGPLv2h | The Free Software Foundation backend/ps/ps.c | GPLv2h | Timothy O. Theisen backend/ps/ps-document.c | LGPLv2h | The Free Software Foundation backend/ps/ps-document.h | LGPLv2h | The Free Software Foundation backend/ps/ps.h | GPLv2h | Timothy O. Theisen backend/ps/ps-interpreter.c | GPLv2h | Free Software Foundation, Carlos Garcia Campos backend/ps/ps-interpreter.h | GPLv2h | Carlos Garcia Campos backend/tiff/tiff2ps.c | SGI | Sam Leffler, Silicon Graphics, Inc. backend/tiff/tiff2ps.h | GPLv2h | rpath, Inc. backend/tiff/tiff-document.c | GPLv2h | Jonathan Blandford backend/tiff/tiff-document.h | GPLv2h | Jonathan Blandford cut-n-paste/recent-files/egg-recent-item.c | GPLv2h | James Willcox cut-n-paste/recent-files/egg-recent-item.h | unspec | unspec cut-n-paste/recent-files/egg-recent-model.c | GPLv2h | James Willcox cut-n-paste/recent-files/egg-recent-model.h | unspec | unspec cut-n-paste/recent-files/egg-recent-util.c | unspec | unspec cut-n-paste/recent-files/egg-recent-util.h | unspec | unspec cut-n-paste/recent-files/egg-recent-view.c | GPLv2h | James Willcox cut-n-paste/recent-files/egg-recent-view.h | unspec | unspec cut-n-paste/recent-files/egg-recent-view-uimanager.c | GPLv2h | James Willcox , Paolo Bacchilega cut-n-paste/recent-files/egg-recent-view-uimanager.h | unspec | unspec cut-n-paste/toolbar-editor/egg-editable-toolbar.c | GPLv2h | Marco Pesenti Gritti, Christia cut-n-paste/toolbar-editor/egg-editable-toolbar.h | GPLv2h | Marco Pesenti Gritti, Christian Persch cut-n-paste/toolbar-editor/eggmarshalers.c | unspec | unspec cut-n-paste/toolbar-editor/eggmarshalers.h | unspec | unspec cut-n-paste/toolbar-editor/egg-toolbar-editor.c | GPLv2h | Marco Pesenti Gritti cut-n-paste/toolbar-editor/egg-toolbar-editor.h | GPLv2h | Marco Pesenti Gritti cut-n-paste/toolbar-editor/egg-toolbars-model.c | GPLv2h | Marco Pesenti Gritti, Christian Persch cut-n-paste/toolbar-editor/egg-toolbars-model.h | GPLv2h | Marco Pesenti Gritti, Christian Persch cut-n-paste/toolbar-editor/eggtypebuiltins.c | unspec | unspec cut-n-paste/toolbar-editor/eggtypebuiltins.h | unspec | unspec cut-n-paste/totem-screensaver/totem-scrsaver.c | GPLv2h | Bastien Nocera cut-n-paste/totem-screensaver/totem-scrsaver.h | GPLv2h | Bastien Nocera cut-n-paste/zoom-control/ephy-zoom-action.c | GPLv2h | Marco Pesenti Gritti, Christian Persch cut-n-paste/zoom-control/ephy-zoom-action.h | GPLv2h | Marco Pesenti Gritti, Christian Persch cut-n-paste/zoom-control/ephy-zoom.c | GPLv2h | Christian Persch cut-n-paste/zoom-control/ephy-zoom-control.c | GPLv2h | Christian Persch cut-n-paste/zoom-control/ephy-zoom-control.h | GPLv2h | Christian Persch cut-n-paste/zoom-control/ephy-zoom.h | GPLv2h | Christian Persch help/bg/evince.xml | GFDL1.1 | unspec help/ca/evince.xml | GFDL1.1 | Sun Microsystems, Nickolay V. Shmyrev help/C/evince.xml | GFDL1.1 | Sun Microsystems, Nickolay V. Shmyrev help/el/evince.xml | GFDL1.1 | unspec help/en_GB/evince.xml | GFDL1.1 | David Lodge (dave@cirt.net) help/es/evince.xml | GFDL1.1 | Francisco Javier F. Serrador, Jorge Gonzalez Gonzalez help/fi/evince.xml | GFDL1.1 | Tommi Vainikainen, Flammie Pirinen help/fr/evince.xml | GFDL1.1 | Jonathan Ernst, Claude Paroz help/it/evince.xml | GFDL1.1 | Ubuntu Italian Translators, Luca Ferretti help/nl/evince.xml | GFDL1.1 | unspec help/ru/evince.xml | GFDL1.1 | unspec help/sr/evince.xml | GFDL1.1 | unspec help/sv/evince.xml | GFDL1.1 | Daniel Nylander help/uk/evince.xml | GFDL1.1 | unspec libdocument/ev-async-renderer.c | GPLv2h | Marco Pesenti Gritti libdocument/ev-async-renderer.h | GPLv2h | Marco Pesenti Gritti libdocument/ev-attachment.c | GPLv2h | Carlos Garcia Campos libdocument/ev-attachment.h | GPLv2h | Carlos Garcia Campos libdocument/ev-backend-marshal.c | unspec | unspec libdocument/ev-backend-marshalers.h | unspec | unspec libdocument/ev-document.c | GPLv2h | Marco Pesenti Gritti libdocument/ev-document-factory.c | GPLv2h | Red Hat, Inc libdocument/ev-document-factory.h | GPLv2h | Red Hat, Inc libdocument/ev-document-find.c | GPLv2h | Red Hat, Inc libdocument/ev-document-find.h | GPLv2h | Red Hat, Inc libdocument/ev-document-fonts.c | GPLv2h | Red Hat, Inc libdocument/ev-document-fonts.h | GPLv2h | Red Hat, Inc libdocument/ev-document.h | GPLv2h | Marco Pesenti Gritti libdocument/ev-document-images.c | GPLv2h | 2006 Carlos Garcia Campos libdocument/ev-document-images.h | GPLv2h | 2006 Carlos Garcia Campos libdocument/ev-document-info.h | GPLv2h | Marco Pesenti Gritti libdocument/ev-document-links.c | GPLv2h | Red Hat, Inc libdocument/ev-document-links.h | GPLv2h | Red Hat, Inc libdocument/ev-document-misc.c | unspec | Marco Pesenti Gritti libdocument/ev-document-misc.h | GPLv2h | Marco Pesenti Gritti libdocument/ev-document-security.c | GPLv2h | Red Hat, Inc libdocument/ev-document-security.h | GPLv2h | Red Hat, Inc libdocument/ev-document-thumbnails.c | GPLv2h | Anders Carlsson libdocument/ev-document-thumbnails.h | GPLv2h | Anders Carlsson libdocument/ev-document-transition.c | GPLv2h | 2006 Carlos Garcia Campos libdocument/ev-document-transition.h | GPLv2h | 2006 Carlos Garcia Campos libdocument/ev-file-exporter.c | GPLv2h | 2004 Martin Kretzschmar libdocument/ev-file-exporter.h | GPLv2h | 2004 Martin Kretzschmar libdocument/ev-file-helpers.c | GPLv2h | Jorn Baayen libdocument/ev-file-helpers.h | GPLv2h | Jorn Baayen libdocument/ev-image.c | GPLv2h | 2006 Carlos Garcia Campos libdocument/ev-image.h | GPLv2h | 2006 Carlos Garcia Campos libdocument/ev-link-action.c | GPLv2h | Red Hat, Inc., Carlos Garcia Campos libdocument/ev-link-action.h | GPLv2h | Red Hat, Inc., Carlos Garcia Campos libdocument/ev-link.c | GPLv2h | Red Hat, Inc. libdocument/ev-link-dest.c | GPLv2h | Red Hat, Inc., Carlos Garcia Campos libdocument/ev-link-dest.h | GPLv2h | Red Hat, Inc., Carlos Garcia Campos libdocument/ev-link.h | GPLv2h | Red Hat, Inc. libdocument/ev-render-context.c | unspec | unspec libdocument/ev-render-context.h | GPLv2h | unspec libdocument/ev-selection.c | GPLv2h | Red Hat, Inc. libdocument/ev-selection.h | GPLv2h | Marco Pesenti Gritti po/ar.po | GPLv2h | 2006 Yousef Raffah , 2006, 2007 Khaled Hosny po/be.po | GPLv2h | Evince maintainers po/bg.po | GPLv2h | Evince maintainers po/bn_IN.po | GPLv2h | Evince maintainers po/bn.po | GPLv2h | Evince maintainers po/br.po | GPLv2 | Free Software Foundation po/ca.po | GPLv2h | Free Software Foundation po/cs.po | GPLv2h | Miloslav Trmac po/cy.po | GPLv2h | Gareth Bowker po/da.po | GPLv2h | Free Software Foundation po/de.po | GPLv2h | Martin Kretzschmar po/dz.po | GPLv2h | Free Software Foundation po/el.po | GPLv2h | Free Software Foundation po/en_CA.po | GPLv2h | Adam Weinberger and the GNOME Foundation po/en_GB.po | GPLv2h | The Gnome Foundation po/es.po | GPLv2h | Spanish translation for Evince po/et.po | GPLv2h | Free Software Foundation po/eu.po | GPLv2h | Mikel Olasagasti po/fa.po | GPLv2h | Sharif FarsiWeb, Inc. po/fi.po | GPLv2h | Free Software Foundation po/fr.po | GPLv2 | Free Software Foundation po/gl.po | GPLv2h | Evince maintainers po/gu.po | unspec | unspec po/he.po | GPLv2h | Evince maintainers po/hi.po | GPLv2h | Evince maintainers po/hu.po | GPLv2h | Free Software Foundation po/id.po | GPLv2h | Evince maintainers po/it.po | GPLv2h | Evince maintainers po/ja.po | GPLv2h | Evince maintainers po/ka.po | GPLv2h | Evince maintainers po/ko.po | unspec | unspec po/ku.po | GPLv2h | Canonical Ltd, and Rosetta Contributors 2005 po/lt.po | GPLv2h | The Gnome Foundation po/lv.po | GPLv2h | Gnome i18n Project for Latvian po/mg.po | GPLv2h | 2006 Fano Rajaonarisoa , 2007 Thierry Randrianiriana po/mk.po | GPLv2h | Evince maintainers po/ml.po | GPLv2h | Evince maintainers po/mr.po | GPLv2h | Evince maintainers po/nb.po | GPLv2h | Free Software Foundation po/ne.po | GPLv2h | Evince maintainers po/nl.po | GPLv2h | Free Software Foundation po/nn.po | GPLv2h | Evince maintainers po/or.po | GPLv2h | Evince maintainers po/pa.po | GPLv2h | Evince maintainers po/pl.po | GPLv2h | Evince maintainers po/pt_BR.po | GPLv2h | Free Software Foundation po/pt.po | GPLv2h | Evince maintainers po/ro.po | GPLv2h | Free Software Foundation po/ru.po | GPLv2 | Free Software Foundation po/rw.po | GPLv2h | Free Software Foundation po/sk.po | GPLv2h | Free Software Foundation po/sl.po | GPLv2h | Free Software Foundation po/sq.po | GPLv2h | Free Software Foundation po/sr@Latn.po | GPLv2h | Evince maintainers po/sr.po | GPLv2h | Evince maintainers po/sv.po | GPLv2h | Free Software Foundation po/ta.po | GPLv2h | Evince maintainers po/th.po | GPLv2h | Free Software Foundation po/tr.po | GPLv2h | The Gnome Foundation po/uk.po | GPLv2h | Free Software Foundation po/vi.po | GPLv2h | Gnome i18n Project for Vietnamese po/wa.po | GPLv2h | Evince maintainers po/zh_CN.po | GPLv2h | Evince maintainers po/zh_HK.po | GPLv2h | Free Software Foundation po/zh_TW.po | GPLv2h | Free Software Foundation properties/ev-properties-main.c | GPLv2.1h| Eazel Inc., Andrew Sobala , Bastien Nocera properties/ev-properties-view.c | GPLv2h | Red Hat, Inc properties/ev-properties-view.h | GPLv2h | Red Hat, Inc shell/eggfindbar.c | GPLv2h | Red Hat, Inc. shell/eggfindbar.h | GPLv2h | Red Hat, Inc. shell/ev-application.c | GPLv2h | Martin Kretzschma shell/ev-application.h | GPLv2h | Martin Kretzschma shell/ev-history.c | GPLv2h | 2005 Marco Pesenti Gritti shell/ev-history.h | GPLv2h | 2005 Marco Pesenti Gritti shell/ev-job-queue.c | unspec | unspec shell/ev-job-queue.h | GPLv2h | Red Hat, Inc shell/ev-jobs.c | unspec | unspec shell/ev-jobs.h | GPLv2h | Red Hat, Inc shell/ev-marshal.c | unspec | unspec shell/ev-marshal.h | unspec | unspec shell/ev-metadata-manager.c | GPLv2h | Paolo Maggi shell/ev-metadata-manager.h | GPLv2h | Paolo Maggi shell/ev-navigation-action.c | GPLv2h | 2003, 2004 Marco Pesenti Gritti, 2003, 2004 Christian Persch shell/ev-navigation-action.h | GPLv2h | 2003, 2004 Marco Pesenti Gritti, 2003, 2004 Christian Persch shell/ev-navigation-action-widget.c | GPLv2h | 2003, 2004 Marco Pesenti Gritti, 2003, 2004 Christian Persch shell/ev-navigation-action-widget.h | GPLv2h | 2003, 2004 Marco Pesenti Gritti, 2003, 2004 Christian Persch shell/ev-page-action.c | GPLv2h | Marco Pesenti Gritti, Christian Persch shell/ev-page-action.h | GPLv2h | Marco Pesenti Gritti, Christian Persch shell/ev-page-action-widget.c | GPLv2h | 2003, 2004 Marco Pesenti Gritti, 2003, 2004 Christian Persch shell/ev-page-action-widget.h | GPLv2h | 2003, 2004 Marco Pesenti Gritti, 2003, 2004 Christian Persch shell/ev-page-cache.c | unspec | unspec shell/ev-page-cache.h | GPLv2h | Red Hat, Inc shell/ev-password.c | GPLv2h | Red Hat, Inc shell/ev-password.h | GPLv2h | Red Hat, Inc shell/ev-password-view.c | GPLv2h | Red Hat, Inc shell/ev-password-view.h | GPLv2h | Red Hat, Inc shell/ev-pixbuf-cache.c | unspec | unspec shell/ev-pixbuf-cache.h | GPLv2h | Red Hat, Inc shell/ev-print-job.c | GPLv2h | Martin Kretzschmar shell/ev-print-job.h | GPLv2h | Martin Kretzschmar shell/ev-properties-dialog.c | GPLv2h | Red Hat, Inc shell/ev-properties-dialog.h | GPLv2h | Red Hat, Inc shell/ev-properties-fonts.c | GPLv2h | Red Hat, Inc shell/ev-properties-fonts.h | GPLv2h | Red Hat, Inc shell/ev-sidebar-attachments.c | GPLv2h | Carlos Garcia Campos shell/ev-sidebar-attachments.h | GPLv2h | Carlos Garcia Campos shell/ev-sidebar.c | GPLv2h | Red Hat, Inc. shell/ev-sidebar.h | GPLv2h | Red Hat, Inc. shell/ev-sidebar-links.c | GPLv2h | Red Hat, Inc. shell/ev-sidebar-links.h | GPLv2h | Red Hat, Inc. shell/ev-sidebar-page.c | GPLv2h | Marco Pesenti Gritti shell/ev-sidebar-page.h | GPLv2h | Marco Pesenti Gritti shell/ev-sidebar-thumbnails.c | GPLv2h | Red Hat, Inc., Anders Carlsson shell/ev-utils.h | GPLv2h | Anders Carlsson shell/ev-view-accessible.c | GPLv2h | Red Hat, Inc. shell/ev-view-accessible.h | GPLv2h | Red Hat, Inc. shell/ev-view.c | GPLv2h | Red Hat, Inc. shell/ev-view.h | GPLv2h | Red Hat, Inc. shell/ev-view-private.h | GPLv2h | Red Hat, Inc. shell/ev-window.c | GPLv2h | Martin Kretzschmar, Red Hat, Inc., Marco Pesenti Gritti, Christian Persch shell/ev-window.h | GPLv2h | Martin Kretzschmar shell/ev-window-title.c | GPLv2h | Red Hat, Inc. shell/ev-window-title.h | GPLv2h | Red Hat, Inc. shell/main.c | GPLv2h | Marco Pesenti Gritti shell/xdg-user-dir-lookup.c | MIT | 2007 Red Hat, Inc. thumbnailer/evince-thumbnailer.c | GPLv2h | Fernando Herrera Shortcuts: - "unspec": The file contains no specific copyright/license notice. This means that the copyright holder is the Evince Team (as listed above) and the license is GPL2 or higher, unless specified otherwise. - "GPL": The GNU General Public License, without versioning constraints. - "GPLv2": The GNU General Public License, version 2. - "GPLv2h": The GNU General Public License, version 2 or (at your option) higher. - "LGPLv2h": The Lesser (or Library) GNU General Public License, version 2 or (at your option). - "GFDL1.1": The GNU Free Documentation License, version 1.1 or (at your option) higher. The listed documents use the GFDL with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. - "Adobe": The following licensing terms need to be respected: | This file may be freely copied and redistributed as long as: | 1) This entire notice continues to be included in the file, | 2) If the file has been modified in any way, a notice of such | modification is conspicuously indicated. | | PostScript, Display PostScript, and Adobe are registered trademarks of | Adobe Systems Incorporated. | | ************************************************************************ | THE INFORMATION BELOW IS FURNISHED AS IS, IS SUBJECT TO CHANGE WITHOUT | NOTICE, AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY ADOBE SYSTEMS | INCORPORATED. ADOBE SYSTEMS INCORPORATED ASSUMES NO RESPONSIBILITY OR | LIABILITY FOR ANY ERRORS OR INACCURACIES, MAKES NO WARRANTY OF ANY | KIND (EXPRESS, IMPLIED OR STATUTORY) WITH RESPECT TO THIS INFORMATION, | AND EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES OF MERCHANTABILITY, | FITNESS FOR PARTICULAR PURPOSES AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. | ************************************************************************ - "SGI": The following licensing terms need to be respected: | Permission to use, copy, modify, distribute, and sell this software and | its documentation for any purpose is hereby granted without fee, provided | that (i) the above copyright notices and this permission notice appear in | all copies of the software and related documentation, and (ii) the names of | Sam Leffler and Silicon Graphics may not be used in any advertising or | publicity relating to the software without the specific, prior written | permission of Sam Leffler and Silicon Graphics. - "MIT": The following licensing terms need to be respected: | Permission is hereby granted, free of charge, to any person | obtaining a copy of this software and associated documentation files | (the "Software"), to deal in the Software without restriction, | including without limitation the rights to use, copy, modify, merge, | publish, distribute, sublicense, and/or sell copies of the Software, | and to permit persons to whom the Software is furnished to do so, | subject to the following conditions: | | The above copyright notice and this permission notice shall be | included in all copies or substantial portions of the Software. | | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS | BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN | ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE On Debian systems, you can find the complete textes for the GNU (Lesser) General licenses: - GPL: /usr/share/common-licenses/GPL - GPLv2: /usr/share/common-licenses/GPL-2 - LGPLv2: /usr/share/common-licenses/LGPL-2 - GFDL: /usr/share/common-licenses/GFDL debian/watch0000664000000000000000000000014312343356101010215 0ustar version=3 http://ftp.gnome.org/pub/gnome/sources/evince/([\d\.]+[02468])/evince-([\d\.]+)\.tar\.xz debian/README.Debian0000664000000000000000000000053512343356101011232 0ustar evince for Debian ================= Extended character set support ------------------------------ If you want to read most Chinese, Japanese and Korean PDF documents, you need to install the poppler-data package, which contains the Unicode mappings for these languages. -- Josselin Mouette , Tue, 25 Nov 2008 10:09:36 +0100 debian/libevview3-3.symbols0000664000000000000000000002132712343356101013024 0ustar libevview3.so.3 libevview3-3 #MINVER# ev_annotation_window_get_annotation@Base 3.0.2 ev_annotation_window_get_rectangle@Base 3.0.2 ev_annotation_window_get_type@Base 3.0.2 ev_annotation_window_grab_focus@Base 3.0.2 ev_annotation_window_is_open@Base 3.0.2 ev_annotation_window_new@Base 3.0.2 ev_annotation_window_set_annotation@Base 3.0.2 ev_annotation_window_set_rectangle@Base 3.0.2 ev_annotation_window_ungrab_focus@Base 3.0.2 ev_document_model_get_continuous@Base 3.0.2 ev_document_model_get_document@Base 3.0.2 ev_document_model_get_dual_page@Base 3.0.2 ev_document_model_get_dual_page_odd_pages_left@Base 3.3.90 ev_document_model_get_fullscreen@Base 3.0.2 ev_document_model_get_inverted_colors@Base 3.0.2 ev_document_model_get_max_scale@Base 3.0.2 ev_document_model_get_min_scale@Base 3.0.2 ev_document_model_get_page@Base 3.0.2 ev_document_model_get_page_layout@Base 3.7.4 ev_document_model_get_rotation@Base 3.0.2 ev_document_model_get_scale@Base 3.0.2 ev_document_model_get_sizing_mode@Base 3.0.2 ev_document_model_get_type@Base 3.0.2 ev_document_model_new@Base 3.0.2 ev_document_model_new_with_document@Base 3.0.2 ev_document_model_set_continuous@Base 3.0.2 ev_document_model_set_document@Base 3.0.2 ev_document_model_set_dual_page@Base 3.0.2 ev_document_model_set_dual_page_odd_pages_left@Base 3.3.90 ev_document_model_set_fullscreen@Base 3.0.2 ev_document_model_set_inverted_colors@Base 3.0.2 ev_document_model_set_max_scale@Base 3.0.2 ev_document_model_set_min_scale@Base 3.0.2 ev_document_model_set_page@Base 3.0.2 ev_document_model_set_page_by_label@Base 3.0.2 ev_document_model_set_page_layout@Base 3.7.4 ev_document_model_set_rotation@Base 3.0.2 ev_document_model_set_scale@Base 3.0.2 ev_document_model_set_sizing_mode@Base 3.0.2 ev_job_annots_get_type@Base 3.0.2 ev_job_annots_new@Base 3.0.2 ev_job_attachments_get_type@Base 3.0.2 ev_job_attachments_new@Base 3.0.2 ev_job_cancel@Base 3.0.2 ev_job_export_get_type@Base 3.0.2 ev_job_export_new@Base 3.0.2 ev_job_export_set_page@Base 3.0.2 ev_job_failed@Base 3.0.2 ev_job_failed_from_error@Base 3.0.2 ev_job_find_get_n_results@Base 3.0.2 ev_job_find_get_options@Base 3.5.3 ev_job_find_get_progress@Base 3.0.2 ev_job_find_get_results@Base 3.0.2 ev_job_find_get_type@Base 3.0.2 ev_job_find_has_results@Base 3.0.2 ev_job_find_new@Base 3.0.2 ev_job_find_set_options@Base 3.5.3 ev_job_fonts_get_type@Base 3.0.2 ev_job_fonts_new@Base 3.0.2 ev_job_get_run_mode@Base 3.0.2 ev_job_get_type@Base 3.0.2 ev_job_is_failed@Base 3.0.2 ev_job_is_finished@Base 3.0.2 ev_job_layers_get_type@Base 3.0.2 ev_job_layers_new@Base 3.0.2 ev_job_links_get_model@Base 3.5.92 ev_job_links_get_type@Base 3.0.2 ev_job_links_new@Base 3.0.2 ev_job_load_get_type@Base 3.0.2 ev_job_load_gfile_get_type@Base 3.5.2 ev_job_load_gfile_new@Base 3.5.2 ev_job_load_gfile_set_gfile@Base 3.5.2 ev_job_load_gfile_set_load_flags@Base 3.5.2 ev_job_load_gfile_set_password@Base 3.5.2 ev_job_load_new@Base 3.0.2 ev_job_load_set_password@Base 3.0.2 ev_job_load_set_uri@Base 3.0.2 ev_job_load_stream_get_type@Base 3.5.2 ev_job_load_stream_new@Base 3.5.2 ev_job_load_stream_set_load_flags@Base 3.5.2 ev_job_load_stream_set_password@Base 3.5.2 ev_job_load_stream_set_stream@Base 3.5.2 ev_job_page_data_flags_get_type@Base 3.0.2 ev_job_page_data_get_type@Base 3.0.2 ev_job_page_data_new@Base 3.0.2 ev_job_print_get_type@Base 3.0.2 ev_job_print_new@Base 3.0.2 ev_job_print_set_cairo@Base 3.0.2 ev_job_print_set_page@Base 3.0.2 ev_job_priority_get_type@Base 3.0.2 ev_job_render_get_type@Base 3.0.2 ev_job_render_new@Base 3.0.2 ev_job_render_set_selection_info@Base 3.0.2 ev_job_run@Base 3.0.2 ev_job_run_mode_get_type@Base 3.0.2 ev_job_save_get_type@Base 3.0.2 ev_job_save_new@Base 3.0.2 ev_job_scheduler_get_running_thread_job@Base 3.0.2 ev_job_scheduler_push_job@Base 3.0.2 ev_job_scheduler_update_job@Base 3.0.2 ev_job_set_run_mode@Base 3.0.2 ev_job_succeeded@Base 3.0.2 ev_job_thumbnail_get_type@Base 3.0.2 ev_job_thumbnail_new@Base 3.0.2 ev_job_thumbnail_set_has_frame@Base 3.7.4 ev_link_accessible_get_type@Base 3.7.5 ev_link_accessible_new@Base 3.7.5 ev_page_cache_get_annot_mapping@Base 3.0.2 ev_page_cache_get_flags@Base 3.0.2 ev_page_cache_get_form_field_mapping@Base 3.0.2 ev_page_cache_get_image_mapping@Base 3.0.2 ev_page_cache_get_link_mapping@Base 3.0.2 ev_page_cache_get_text@Base 3.0.2 ev_page_cache_get_text_attrs@Base 3.9.5 ev_page_cache_get_text_layout@Base 3.0.2 ev_page_cache_get_text_log_attrs@Base 3.9.5 ev_page_cache_get_text_mapping@Base 3.0.2 ev_page_cache_get_type@Base 3.0.2 ev_page_cache_mark_dirty@Base 3.0.2 ev_page_cache_new@Base 3.0.2 ev_page_cache_set_flags@Base 3.0.2 ev_page_cache_set_page_range@Base 3.0.2 ev_page_layout_get_type@Base 3.7.4 ev_pixbuf_cache_clear@Base 3.0.2 ev_pixbuf_cache_get_selection_list@Base 3.0.2 ev_pixbuf_cache_get_selection_region@Base 3.9.5 ev_pixbuf_cache_get_selection_surface@Base 3.0.2 ev_pixbuf_cache_get_surface@Base 3.0.2 ev_pixbuf_cache_get_type@Base 3.0.2 ev_pixbuf_cache_new@Base 3.0.2 ev_pixbuf_cache_reload_page@Base 3.0.2 ev_pixbuf_cache_set_inverted_colors@Base 3.0.2 ev_pixbuf_cache_set_max_size@Base 3.0.2 ev_pixbuf_cache_set_page_range@Base 3.0.2 ev_pixbuf_cache_set_selection_list@Base 3.0.2 ev_pixbuf_cache_style_changed@Base 3.0.2 ev_print_operation_cancel@Base 3.0.2 ev_print_operation_exists_for_document@Base 3.0.2 ev_print_operation_get_default_page_setup@Base 3.0.2 ev_print_operation_get_embed_page_setup@Base 3.0.2 ev_print_operation_get_error@Base 3.0.2 ev_print_operation_get_job_name@Base 3.0.2 ev_print_operation_get_print_settings@Base 3.0.2 ev_print_operation_get_progress@Base 3.0.2 ev_print_operation_get_status@Base 3.0.2 ev_print_operation_get_type@Base 3.0.2 ev_print_operation_new@Base 3.0.2 ev_print_operation_run@Base 3.0.2 ev_print_operation_set_current_page@Base 3.0.2 ev_print_operation_set_default_page_setup@Base 3.0.2 ev_print_operation_set_embed_page_setup@Base 3.0.2 ev_print_operation_set_job_name@Base 3.0.2 ev_print_operation_set_print_settings@Base 3.0.2 ev_sizing_mode_get_type@Base 3.0.2 ev_stock_icons_init@Base 3.0.2 ev_stock_icons_set_screen@Base 3.0.2 ev_stock_icons_shutdown@Base 3.0.2 ev_timeline_get_duration@Base 3.0.2 ev_timeline_get_fps@Base 3.0.2 ev_timeline_get_loop@Base 3.0.2 ev_timeline_get_progress@Base 3.0.2 ev_timeline_get_type@Base 3.0.2 ev_timeline_is_running@Base 3.0.2 ev_timeline_new@Base 3.0.2 ev_timeline_pause@Base 3.0.2 ev_timeline_rewind@Base 3.0.2 ev_timeline_set_duration@Base 3.0.2 ev_timeline_set_fps@Base 3.0.2 ev_timeline_set_loop@Base 3.0.2 ev_timeline_start@Base 3.0.2 ev_transition_animation_get_type@Base 3.0.2 ev_transition_animation_new@Base 3.0.2 ev_transition_animation_paint@Base 3.0.2 ev_transition_animation_ready@Base 3.0.2 ev_transition_animation_set_dest_surface@Base 3.0.2 ev_transition_animation_set_origin_surface@Base 3.0.2 ev_view_accessible_get_type@Base 3.7.4 ev_view_accessible_new@Base 3.7.4 ev_view_accessible_set_model@Base 3.9.5 ev_view_autoscroll_start@Base 3.0.2 ev_view_autoscroll_stop@Base 3.0.2 ev_view_begin_add_annotation@Base 3.0.2 ev_view_can_zoom_in@Base 3.0.2 ev_view_can_zoom_out@Base 3.0.2 ev_view_cancel_add_annotation@Base 3.0.2 ev_view_copy@Base 3.0.2 ev_view_copy_link_address@Base 3.0.2 ev_view_cursor_new@Base 3.0.2 ev_view_find_cancel@Base 3.0.2 ev_view_find_changed@Base 3.0.2 ev_view_find_next@Base 3.0.2 ev_view_find_previous@Base 3.0.2 ev_view_find_search_changed@Base 3.0.2 ev_view_find_set_highlight_search@Base 3.0.2 ev_view_find_set_result@Base 3.9.5 ev_view_find_started@Base 3.5.92 ev_view_focus_annotation@Base 3.0.2 ev_view_get_has_selection@Base 3.0.2 ev_view_get_page_extents@Base 3.0.2 ev_view_get_type@Base 3.0.2 ev_view_handle_link@Base 3.0.2 ev_view_hide_cursor@Base 3.0.2 ev_view_highlight_forward_search@Base 3.0.2 ev_view_is_caret_navigation_enabled@Base 3.9.5 ev_view_is_loading@Base 3.7.1 ev_view_new@Base 3.0.2 ev_view_next_page@Base 3.0.2 ev_view_presentation_get_current_page@Base 3.0.2 ev_view_presentation_get_rotation@Base 3.0.2 ev_view_presentation_get_type@Base 3.0.2 ev_view_presentation_new@Base 3.0.2 ev_view_presentation_next_page@Base 3.0.2 ev_view_presentation_previous_page@Base 3.0.2 ev_view_presentation_set_rotation@Base 3.0.2 ev_view_previous_page@Base 3.0.2 ev_view_reload@Base 3.0.2 ev_view_scroll@Base 3.0.2 ev_view_select_all@Base 3.0.2 #MISSING: 3.9.5-0ubuntu1~saucy1# ev_view_selection_mode_get_type@Base 3.0.2 ev_view_set_caret_cursor_position@Base 3.9.5 ev_view_set_caret_navigation_enabled@Base 3.9.5 ev_view_set_loading@Base 3.0.2 ev_view_set_model@Base 3.0.2 ev_view_set_page_cache_size@Base 3.0.2 ev_view_show_cursor@Base 3.0.2 ev_view_supports_caret_navigation@Base 3.9.5 ev_view_zoom_in@Base 3.0.2 ev_view_zoom_out@Base 3.0.2 debian/evince.menu0000664000000000000000000000024612343356101011327 0ustar ?package(evince):needs="X11" section="Applications/Viewers"\ title="Evince" command="/usr/bin/evince"\ hints="Documents,GNOME" icon="/usr/share/pixmaps/evince.xpm" debian/evince-gtk.lintian-overrides0000664000000000000000000000023212343356101014577 0ustar #Our copyright file is more complex, but correct: evince-gtk: copyright-without-copyright-notice evince-gtk: copyright-refers-to-versionless-license-file debian/gir1.2-evince-3.0.lintian-overrides0000664000000000000000000000025012343356101015312 0ustar #Our copyright file is more complex, but correct: gir1.2-evince-3.0: copyright-without-copyright-notice gir1.2-evince-3.0: copyright-refers-to-versionless-license-file debian/evince-common.lintian-overrides0000664000000000000000000000024012343356101015301 0ustar #Our copyright file is more complex, but correct: evince-common: copyright-without-copyright-notice evince-common: copyright-refers-to-versionless-license-file debian/evince.xpm0000664000000000000000000000554612343356101011177 0ustar /* XPM */ static char * evince_xpm[] = { "16 16 143 2", " c None", ". c #3B6BA7", "+ c #3666A5", "@ c #3465A4", "# c #3C6BA7", "$ c #5D84B6", "% c #DAE4EF", "& c #FEFEFE", "* c #FFFFFF", "= c #DBE4EF", "- c #5E85B7", "; c #3B6AA7", "> c #DAE3EF", ", c #E2EBF5", "' c #CBDCED", ") c #CFDEEF", "! c #D4E1F0", "~ c #D8E4F2", "{ c #E9EFF7", "] c #EDF3F9", "^ c #ECF2F8", "/ c #D7E3F1", "( c #D0DFEF", "_ c #E4EDF6", ": c #3566A4", "< c #C8D9EC", "[ c #CBDCEE", "} c #D1DFEF", "| c #DDE8F3", "1 c #F4E8EB", "2 c #E57B7B", "3 c #DB4B4B", "4 c #D42828", "5 c #DE5C5C", "6 c #FBFCFD", "7 c #D2E0EF", "8 c #CCDDEE", "9 c #C7D9EC", "0 c #CCDCEE", "a c #E9F0F8", "b c #ECA4A4", "c c #D42626", "d c #EEAAAA", "e c #FBECEC", "f c #DF5F5F", "g c #E57D7D", "h c #F6F9FC", "i c #D1E0F0", "j c #C6D8EC", "k c #DFE9F4", "l c #E99393", "m c #D11818", "n c #F6D1D1", "o c #F0B6B6", "p c #DC5252", "q c #FEFBFB", "r c #E3ECF5", "s c #CDDDEE", "t c #F3CFD0", "u c #CD0707", "v c #ECA1A1", "w c #F6D0D0", "x c #DC5151", "y c #FEF8F8", "z c #E9F0F7", "A c #D2E1F0", "B c #CEDEEF", "C c #C9DAED", "D c #E0EAF4", "E c #E47A7A", "F c #CC0000", "G c #F7D8D8", "H c #DF6161", "I c #FDF4F4", "J c #EAF1F8", "K c #D2E0F0", "L c #D4E2F1", "M c #EDF2F8", "N c #F8DADA", "O c #3A69A6", "P c #F4C7C7", "Q c #CE0C0C", "R c #E88C8C", "S c #FEFCFC", "T c #EEF3F9", "U c #D9E4F2", "V c #E6EEF6", "W c #EFD7DA", "X c #EEABAB", "Y c #E68181", "Z c #E78585", "` c #C1D5EA", " . c #F9FBFD", ".. c #F1BABA", "+. c #DB4A4A", "@. c #DA4646", "#. c #E57E7E", "$. c #E98F8F", "%. c #E37575", "&. c #D83D3D", "*. c #D93F3F", "=. c #F0B2B2", "-. c #F8DBDB", ";. c #F7E5E6", ">. c #F9E1E1", ",. c #FFFEFE", "'. c #F4C8C8", "). c #FCEEEE", "!. c #FFFDFD", "~. c #3768A5", "{. c #E6EDF5", "]. c #FEF9F9", "^. c #CEDDEE", "/. c #DEE9F4", "(. c #EFF4F9", "_. c #EDF2F9", ":. c #DCE7F3", "<. c #CCDCED", "[. c #BBD1E8", "}. c #B4CBE5", "|. c #D6E3F1", "1. c #B7CEE7", "2. c #B9CFE7", "3. c #BAD0E8", "4. c #B4CCE6", "5. c #DFE7F2", "6. c #B0C9E4", "7. c #B2CBE5", "8. c #B5CDE6", "9. c #B6CDE6", "0. c #B6CEE7", "a. c #CFDEEE", "b. c #DFE8F2", "c. c #6E91BE", "d. c #EAF0F6", "e. c #F7F9FC", "f. c #F5F8FB", "g. c #F7FAFC", "h. c #6F92BE", "i. c #3A6AA7", "j. c #4F79B0", "k. c #567FB3", "l. c #567FB4", " . + @ @ @ @ @ @ @ @ + # ", " $ % & * * * * * * * * & = - ", "; > , ' ) ! ~ , { ] ^ / ( _ = . ", ": & < [ } | 1 2 3 4 5 6 7 8 & + ", "@ * 9 0 a b c d e f g h i 0 * @ ", "@ * j k l m n * o p q r ( [ * @ ", "@ * s t u v & w x y z A B C * + ", "@ * D E F w G H I J K ) L M N O ", "@ * k P Q f R S T U V W X Y Z O ", "@ * ` ...+.@.#.$.%.&.*.#.=.-.O ", "@ * s ;.>.* ,.-.'.N ).!.* & * ~.", "@ * {.].T ^./.T (._.a :.<.[.* @ ", "@ * }.|.1.2.3.[.[.[.3.2.1.4.* @ ", "; 5.s 6.7.4.8.9.0.9.8.4.7.a.b.; ", " c.d.e.f.f.f.f.f.f.f.f.g.d.h. ", " i.j.k.k.l.l.l.l.l.k.j.; "}; debian/evince.mime0000664000000000000000000000012512343356101011306 0ustar application/pdf; evince %s; test=test -n "$DISPLAY"; nametemplate=%s.pdf; priority=5 debian/evince-thumbnailer.10000664000000000000000000000122412343356101013030 0ustar .TH evince\-thumbnailer 1 2007\-01\-15 .SH NAME evince\-thumbnailer \- create png thumbnails from PostScript and PDF documents .SH SYNOPSIS \fBevince\-thumbnailer\fR [\-s \fBsize\fR] \fBinput\fR \fBoutput\fR .SH DESCRIPTION evince\-thumbnailer is a GNOME program to create thumbnails from PostScript (PS), Portable Document Format (PDF), DjVu and DVI files. .SH OPTIONS evince obeys all normal GNOME and GTK+ command line options. The only option \-s \fIsize \fRmakes it possible to choose the vertical size of the created thumbnail. .SH "SEE ALSO" \fBevince\fR(1), \fBgnome\-options\fR(7), \fBgtk\-options\fR(7). .PP http://www.gnome.org/projects/evince/ debian/libevview3-3.install0000664000000000000000000000003012343356101012766 0ustar usr/lib/libevview*.so.* debian/evince.install0000664000000000000000000000006712343356101012032 0ustar usr/bin usr/lib/nautilus/*/*.so usr/lib/evince/evinced debian/evince-gtk.menu0000664000000000000000000000025212343356101012107 0ustar ?package(evince-gtk):needs="X11" section="Applications/Viewers"\ title="Evince" command="/usr/bin/evince"\ hints="Documents,GNOME" icon="/usr/share/pixmaps/evince.xpm" debian/gir1.2-evince-3.0.install0000664000000000000000000000002712343356101013324 0ustar usr/lib/girepository-* debian/rules0000775000000000000000000000466612343356101010262 0ustar #!/usr/bin/make -f export DEB_BUILD_MAINT_OPTIONS = hardening=+all include /usr/share/dpkg/buildflags.mk include /usr/share/cdbs/1/rules/autoreconf.mk include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/gnome.mk include /usr/share/gnome-pkg-tools/1/rules/uploaders.mk include /usr/share/gnome-pkg-tools/1/rules/gnome-version.mk include /usr/share/gnome-pkg-tools/1/rules/gnome-get-source.mk DEB_BUILDDIR := $(CURDIR)/debian/build/evince DEB_BUILDDIR_evince-gtk := $(CURDIR)/debian/build/evince-gtk DEB_DESTDIR_evince-gtk := $(CURDIR)/debian/evince-gtk DEB_CONFIGURE_EXTRA_FLAGS := --disable-scrollkeeper \ --enable-gtk-doc \ --enable-djvu \ --enable-dvi \ --enable-t1lib \ --enable-xps \ --enable-comics \ --enable-introspection \ --with-libgrip=yes DEB_DH_MAKESHLIBS_ARGS += -X /usr/lib/nautilus/ -X /usr/lib/evince/ \ -V -- -c4 DEB_DH_STRIP_ARGS_evince-gtk = #cdbs should do this, but doesn't (see #424636) clean:: rm -rf $(DEB_BUILDDIR) $(DEB_BUILDDIR_evince-gtk) configure/evince-gtk:: $(DEB_BUILDDIR_evince-gtk)/config.status $(DEB_BUILDDIR_evince-gtk)/config.status: cd $(DEB_BUILDDIR_evince-gtk) && \ $(DEB_CONFIGURE_SCRIPT_ENV) $(DEB_CONFIGURE_SCRIPT) \ $(DEB_CONFIGURE_NORMAL_ARGS) \ $(cdbs_configure_flags) \ $(DEB_CONFIGURE_EXTRA_FLAGS) \ --without-keyring \ --disable-nautilus \ --disable-introspection \ --disable-gtk-doc \ $(DEB_CONFIGURE_USER_FLAGS) build/evince-gtk:: make -C $(DEB_BUILDDIR_evince-gtk) install/evince-gtk:: make -C $(DEB_BUILDDIR_evince-gtk) install DESTDIR=$(DEB_DESTDIR_evince-gtk) rm -rf debian/evince-gtk/usr/share \ debian/evince-gtk/etc \ debian/evince-gtk/usr/include rm -rf debian/evince-gtk/usr/lib/lib* rm -rf debian/evince-gtk/usr/lib/nautilus rm -rf debian/evince-gtk/usr/lib/pkgconfig rm -rf debian/evince-gtk/usr/lib/girepository* rm -rf debian/evince-gtk/usr/lib/evince/4 binary-install/evince-common:: rm -rf debian/evince-common/usr/share/gtk-doc cp debian/apparmor-profile debian/evince-common/etc/apparmor.d/usr.bin.evince cp debian/apparmor-profile.abstraction debian/evince-common/etc/apparmor.d/abstractions/evince cp debian/evince.apport debian/evince-common/usr/share/apport/package-hooks/source_evince.py dh_apparmor --profile-name=usr.bin.evince -pevince-common cd po; intltool-update --pot --verbose # save some space by not shipping the synctex video find debian/evince-common/usr/share/help/ -name '*.ogv' -delete