1
0
mirror of https://gitlab.gnome.org/GNOME/evince synced 2024-07-05 00:59:07 +00:00
Commit Graph

85 Commits

Author SHA1 Message Date
Pablo Correa Gómez
200be9b923
properties: simplify freeing memory by better exploiting glib functions 2023-03-24 09:58:48 +01:00
Pablo Correa Gómez
2940af6afd properties: Remove trailing whitespaces 2023-03-22 20:15:51 +00:00
Germán Poo-Caamaño
53f38dae98 properties: Prepare properties view for gtk4
Co-authored-by: Qiu Wenbo <qiuwenbo@kylinos.com.cn>
2022-03-19 18:42:06 +00:00
Christian Persch
60ba7b0ee5 all: Replace include guards with pragma once
Instead of using the "#ifndef FOO_H", "#define FOO_H", …, "#endif FOO_H"
guards around the header file, use the "#pragma once".
2021-12-15 02:24:07 +00:00
Christian Persch
1e0a3efa24 libdocument: Move GDateTime members to the extended struct
Commit ed1e94af introduced an unintentional API and ABI break by
changing the creation_date and modified_date members of EvDocumentInfo
from GTime to GDateTime*.

Revert this API/ABI break by adding the created and modified GDateTime
members to EvDocumentInfoExtended, and add public getters and
backend-private setters.

Make the PDF backend set these, and adjust the properties view to use
the new accessor functions.

Fixes: https://gitlab.gnome.org/GNOME/evince/-/issues/1711
2021-12-02 18:35:18 +01:00
Christian Persch
b80ad518df build: Use symbol visibility to hide symbols in the nautilus module
Use the visibility attribute to hide all symbols from private
convenience static libraries used in the backends.
2021-12-01 16:51:33 +01:00
Germán Poo-Caamaño
ed1e94af8d Use GDateTime for handling document properties
* GTime is deprecated as it not 2038-year safe
* Add deprecation information to no break the API (yet)
2021-10-17 17:09:18 +00:00
Volte--Vieira Philippe
7d39e0347d properties: Show None when missing creation/modification date
According to the PDF spec, the creation date and modification date are
optional (for pdf documents). We can safely assume that a file will not
to be modified exactly at 31 Dec 1969 23:59:59 UTC, so each creation and
modification date equal to -1 is considered as NULL for the pointers to
the other attributes (None is displayed).

The if statements could be used in the future when using GDateDime instead
of GTime (a pointer could help, or optional type), and it works for
any type of document, not only PDF.

Closes: #1549

Signed-off-by: Philippe Volte--Vieira <philippeisvv@hotmail.fr>
2021-06-25 19:47:29 +00:00
Nelson Benítez León
dd1ff5473d EvPropertiesView: add "contains_js" property
based on new EvDocumentInfo field by same name.
2021-01-24 02:07:52 +00:00
Iñigo Martínez
b27189bb3c build: Remove autotools
To avoid the burden of maintaining multiple build systems, autotools
support has been removed.

GitLab CI configuration has also been updated to use meson.
2020-05-30 22:39:51 -04:00
Tom Schoonjans
d396cb7e02 shared_module: use so suffix on macOS
GLib and GModule expect shared_modules to have the so suffix on macOS,
but meson uses dylib by default, which means that the backends are not
loaded.

This patch enforces the use of the so suffix for shared modules.
2020-05-30 13:48:06 -04:00
Jason Crain
66a7927b42 properties: Update libnautilus-extension includes
libnautilus-extension changed to a single-include header in version 3.28
and deprecated the direct inclusion of individual headers.
2020-02-04 15:18:05 -07:00
Iñigo Martínez
d69158ecf0 build: Port to Meson build system
Meson is a build system focused on speed and ease of use, which
helps speed up software development. This patch adds Meson support
alongside Autotools.
2018-09-24 10:28:33 +02:00
Jason Crain
b83cd4c8ed properties: Fix dialog extending past edge of screen
A property with a lot of newlines can extend Nautilus's file properties
dialog past the edge of the screen.  Replace these newlines with spaces
to limit the vertical size and let the label's ellipsizing work
correctly.  Have labels wrap for up to five lines in case someone is
relying on the properties dialog showing large properties.  Place
properties page in a GtkScrolledWindow in case it is still too tall.

https://bugzilla.gnome.org/show_bug.cgi?id=733618
2017-12-27 13:16:40 -06:00
astian
73fedee31f Fix omission from the GtkVBox to GtkBox conversion
Commits 7d6a5f17c and bd9f1a6ad (2013-06-09) that changed the users of
GtkVbox to GtkBox neglected to change the type names in the instance and
class structures (it changed only the GObject type IDs).

Maybe this wasn't noticed before because GtkVBox is in fact derived from
GtkBox, which means that when the GObject machinery accessed the
structure it simply used the smaller prefix memory area corresponding to
a GtkBox.  So this bug may have been inconsequential, but it does
illustrate the amount of trust (read "burden") that GObject places on
the programmer by casting types all over the place (not that it can do
much better while staying in C).

https://bugzilla.gnome.org/show_bug.cgi?id=785783
2017-08-05 08:55:39 +02:00
Joanmarie Diggs
7982b946c5 ev-properties-view: Add accessible relations between the labels
The properties view grid consists of two columns, the left column
contains a GtkLabel which describes, or "labels," the property
displayed in the GtkLabel in the right column. The lack of accessible
relations between the labels in each column means Orca has no clue
that it should also present the label on the left when the user
Tabs amongst the labels on the right, and that it should not treat
labels on the left as static text.

https://bugzilla.gnome.org/show_bug.cgi?id=749127
2015-05-08 21:34:40 -04:00
Tobias Westergaard Kjeldsen
c69275293b properties: Add document size in the file properties window
https://bugzilla.gnome.org/show_bug.cgi?id=741057
2015-01-18 09:45:04 +01:00
Christian Persch
d4216cc576 build: Don't use INCLUDES
It's deprecated. Instead use *_CPPFLAGS.
2013-07-26 21:26:35 +02:00
Christian Persch
bd9f1a6ad5 properties: Use a vertical box instead of a vbox 2013-06-09 01:47:28 +02:00
Germán Poo-Caamaño
544d9b4a73 Add contextual information for translators. Fixes #693095 2013-02-28 10:38:54 -08:00
Germán Poo-Caamaño
397f67d960 Unescape location URI in properties dialog. Fixes #693794
Shows an user-friendly filename (URI) in the properties dialog.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=693794

Signed-off-by: Germán Poo-Caamaño <gpoo@gnome.org>
2013-02-17 02:57:39 -08:00
Christian Persch
afa8277a8d properties: Remove unused define from CPPFLAGS 2012-06-24 13:14:36 +02:00
Christian Persch
32165b17a2 properties-view: Don't leak the document if it's encrypted
For encrypted documents, ev_document_load() returns a document *and*
sets the GError; handle this.
2012-06-04 12:22:24 +02:00
Hib Eris
44b9b196ad Respect prefix when installing nautilus extensions
Fixes bug #505359.
2011-12-25 22:36:34 +01:00
Carlos Garcia Campos
ca89fde69e properties: Fix a typo in property name
It was caused by s/table/grid/g selectable -> selectgrid
2011-12-04 12:22:51 +01:00
Carlos Garcia Campos
da8f31ef70 Use GtkGrid instead of GtkTable 2011-11-20 17:50:38 +01:00
Carlos Garcia Campos
9ee4ac8558 Bump api and libtool versions and rename libview and libdocument libraries
See bug #626030
2010-08-19 10:27:14 +02:00
Hib Eris
c32bea667d [build] Rename DATADIR with EVINCEDATADIR
Defining DATADIR conflicts with win32 api (ObjIdl.h), so this define is
renamed to EVINCEDATADIR.
2010-07-26 15:34:18 +02:00
Carlos Garcia Campos
c2ef0e90bc [libdocument] Move format_date function from ev-properties to ev-document-misc 2010-07-12 19:12:01 +02:00
Arun Persaud
19a00ed1cd Update FSF address everywhere.
updated where 'git grep Temple' showed an old address, not including po-files.

Fixes bug# 514607.

Signed-off-by: Arun Persaud <arun@nubati.net>
2010-04-05 11:24:46 +02:00
Philip Withnall
766adb9bff Assorted string fixes
Assorted string fixes, fixing some missing words, incorrect capitalisation;
and converting ellipses and dashes into the appropriate Unicode characters.
2010-02-03 15:21:35 +00:00
Carlos Garcia Campos
42571afbe2 [properties] Properly redrawn properties view when document is reloaded
Fixes bgo#605169.
2009-12-22 16:45:53 +01:00
Christian Persch
1bcbe16702 [build] Remove gitignore files from git
They're autogenerated now.
2009-10-25 20:57:24 +01:00
Christian Persch
f8a0165d07 [build] Include git.mk in all Makefiles 2009-10-22 11:53:07 +02:00
Christian Persch
05b38f9fa9 [build] Automatically keep .gitignore files updated
Import git.mk.
2009-10-22 00:36:20 +02:00
Carlos Garcia Campos
f08945af9e [properties] Fix license version 2009-08-08 16:49:34 +02:00
Christian Persch
bdca80a8cd Don't use automagic dependencies
Default to enable, and require explicit disabling. Default to disabled
on hildon for the nautilus extension, the thumbnailer and the previewer.
2009-06-11 23:38:07 +02:00
Carlos Garcia Campos
5d0383f8b6 Create and load the document based on the mime-type provided by nautilus
2009-04-10  Carlos Garcia Campos  <carlosgc@gnome.org>

	* properties/ev-properties-main.c: (ev_properties_get_pages):

	Create and load the document based on the mime-type provided by
	nautilus instead of using our own documents factory. Fixes bug
	#533917.

svn path=/trunk/; revision=3595
2009-04-10 10:37:56 +00:00
Christian Persch
b59f53187e Bug 575085 – titles not translated in the nautilus tab
* properties/ev-properties-view.c: (set_property): Translate the
	categories.

svn path=/trunk/; revision=3554
2009-03-24 21:47:47 +00:00
Tobias Mueller
30a392babb Make the fixed sized string a semantically correct const char[] instead of
* properties/ev-properties-view.c:
    (ev_properties_view_format_date): Make the fixed sized string a
    semantically correct const char[] instead of a const char* to fix
    a compiler warning if built with -Wformat.
    ** Fixes bug 574168


svn path=/trunk/; revision=3516
2009-03-05 00:34:49 +00:00
Nickolay V. Shmyrev
147f9044a8 Fixes bug #571787.
2009-02-15  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>

	* properties/ev-properties-view.c (set_property):
	
	Fixes bug #571787.


svn path=/trunk/; revision=3434
2009-02-15 06:25:14 +00:00
Christian Persch
eaf7296023 Make ev_init() also bind the evince gettext domain, so i18n works in the
* libdocument/ev-init.c: (ev_init): Make ev_init() also bind the
	evince gettext domain, so i18n works in the library.

	* properties/ev-properties-main.c: (nautilus_module_initialize):
	Remove extra bindtextdomain call.

svn path=/trunk/; revision=3413
2009-02-04 14:32:46 +00:00
Christian Persch
96ee76c82c Include gi18n-lib.h instead of gi18n.h.
* backend/comics/comics-document.c:
	* backend/djvu/djvu-document.c:
	* backend/dvi/dvi-document.c:
	* backend/impress/impress-document.c:
	* backend/pdf/ev-poppler.cc:
	* backend/pixbuf/pixbuf-document.c:
	* backend/ps/ev-spectre.c:
	* backend/tiff/tiff-document.c:
	* libdocument/ev-attachment.c:
	* libdocument/ev-document-factory.c:
	* libview/ev-jobs.c:
	* libview/ev-view-accessible.c:
	* libview/ev-view.c:
	* properties/ev-properties-view.c: Include gi18n-lib.h instead of
	gi18n.h.

svn path=/trunk/; revision=3412
2009-02-04 12:52:03 +00:00
Christian Persch
2d8aad40e1 A libdocument/ev-init.[ch]: Add single init/shutdown method. Bug #569117.
* evince-document.h:
	* libdocument/Makefile.am:
	A libdocument/ev-init.[ch]: Add single init/shutdown method. Bug
	#569117.

	* libdocument/ev-backends-manager.c: (_ev_backends_manager_init):
	* libdocument/ev-backends-manager.h:
	* libdocument/ev-debug.c: (_ev_debug_init), (_ev_debug_shutdown):
	* libdocument/ev-debug.h:
	* libdocument/ev-file-helpers.c: (_ev_file_helpers_init),
	(_ev_file_helpers_shutdown):
	* libdocument/ev-file-helpers.h: Make these init/shutdown methods
	private.

	* properties/ev-properties-main.c: (nautilus_module_initialize),
	(nautilus_module_shutdown):
	* shell/main.c: (main):
	* thumbnailer/evince-thumbnailer.c: (main): Use the new single
	init/shutdown method.

svn path=/trunk/; revision=3391
2009-01-30 18:40:17 +00:00
Christian Persch
4912987303 Renamed from evince-backend.pc.in. Renamed library to libevdocument.la.
* configure.ac:
        * evince-document.pc.in: Renamed from evince-backend.pc.in.
        * libdocument/Makefile.am: Renamed library to libevdocument.la.
        * libview/Makefile.am:
        * shell/Makefile.am:
        * backend/*/Makefile.am: Adapt to changed library name.

        * libdocument/Makefile.am:
        * libview/Makefile.am: Change the installed headers path to match
        the directory names in SVN.

        * evince-document.h:
        * evince-view.h: Add single headers. Bug #568227.

        * libdocument/*.h:
        * libview/*.h: Add single headers guards.

        * libview/Makefile.am:
        * libdocument/Makefile.am:
        * backend/*/Makefile.am:
        * help/reference/Makefile.am: Define EVINCE_COMPILATION, so we can
        still include individual headers.

        * properties/Makefile.am:
        * properties/ev-properties-main.c:
        * properties/ev-properties-view.h:
        * thumbnailer/Makefile.am:
        * thumbnailer/evince-thumbnailer.c: Include only evince-document.h.

        * libdocument/Makefile.am:
        * libview/Makefile.am: Generate type builtins from all installed headers.
        * libdocument/ev-link-action.[ch]:
        * libdocument/ev-link-dest.[ch]:
        * libdocument/ev-transition-effect.[ch]:
        * libview/ev-view.[ch]: Remove handcoded type builtins.

        * libdocument/Makefile.am:
        * evince-document.h: Add ev-document-factory.h to the public headers.

svn path=/trunk/; revision=3381
2009-01-25 15:08:57 +00:00
Hib Eris
93c67e6f35 Check for localtime_r. See bug #339172.
2009-01-16  Hib Eris  <hib@hiberis.nl>

	* configure.ac:
	* properties/ev-properties-view.c:
	(ev_properties_view_format_date):

	Check for localtime_r. See bug #339172.

svn path=/trunk/; revision=3339
2009-01-16 09:39:17 +00:00
Carlos Garcia Campos
309a8fb96d Add document URI to properties page. Fixes bug #555376.
2008-12-03  Carlos Garcia Campos  <carlosgc@gnome.org>

	* properties/ev-properties-main.c: (ev_properties_get_pages):
	* properties/ev-properties-view.[ch]:
	(ev_properties_view_dispose), (ev_properties_view_class_init),
	(ev_properties_view_set_info), (ev_properties_view_new):
	* shell/ev-properties-dialog.[ch]:
	(ev_properties_dialog_set_document):
	* shell/ev-window.c: (ev_window_setup_document),
	(ev_window_cmd_file_properties):

	Add document URI to properties page. Fixes bug #555376.

svn path=/trunk/; revision=3290
2008-12-03 15:45:10 +00:00
Carlos Garcia Campos
7401194be1 Removed Removed
2008-12-03  Carlos Garcia Campos  <carlosgc@gnome.org>

	* configure.ac:
	* data/Makefile.am:
	* data/evince-password.glade: Removed
	* data/evince-properties.glade: Removed
	* properties/ev-properties-view.c:
	(ev_properties_view_class_init), (set_property),
	(ev_properties_view_set_info), (ev_properties_view_init):
	* shell/ev-properties-fonts.c: (ev_properties_fonts_dispose),
	(font_cell_data_func), (ev_properties_fonts_init):

	Remove Glade dependency.

svn path=/trunk/; revision=3289
2008-12-03 15:02:40 +00:00
Carlos Garcia Campos
81c1342861 Removed shell/ev-view-private.h
2008-10-31  Carlos Garcia Campos  <carlosgc@gnome.org>

	* configure.ac:
	* backend/pdf/ev-poppler.cc:
	* properties/ev-properties-view.c:
	* shell/Makefile.am:
	* shell/ev-tooltip.[ch]: Removed
	* shell/ev-view-private.h
	* shell/eggfindbar.c:
	* shell/ev-application.c:
	* shell/ev-open-recent-action.c:
	* shell/ev-sidebar-thumbnails.c:
	* shell/ev-view.c:
	* shell/ev-window.c:

	Bump GTK+ requirement to 2.12.

svn path=/trunk/; revision=3242
2008-10-31 17:40:28 +00:00
Wouter Bolsterlee
75d6ca1691 More #include cleanups. Again: reordering, single gtk.h includes and other
2008-08-03  Wouter Bolsterlee  <wbolster@svn.gnome.org>

	* backend/impress/impress-document.c:
	* backend/impress/render.h:
	* libdocument/ev-document-factory.c:
	* libdocument/ev-document-factory.h:
	* libdocument/ev-document-links.h:
	* libdocument/ev-document-misc.c:
	* libdocument/ev-document-misc.h:
	* properties/ev-properties-main.c:
	* properties/ev-properties-view.c:
	* properties/ev-properties-view.h:
	* shell/eggfindbar.c:
	* shell/eggfindbar.h:
	* shell/ev-application.c:
	* shell/ev-application.h:
	* shell/ev-jobs.h:
	* shell/ev-message-area.h:
	* shell/ev-navigation-action.c:
	* shell/ev-navigation-action.h:
	* shell/ev-open-recent-action.c:
	* shell/ev-open-recent-action.h:
	* shell/ev-page-action-widget.c:
	* shell/ev-page-action.c:
	* shell/ev-page-action.h:
	* shell/ev-page-cache.h:
	* shell/ev-password-view.h:
	* shell/ev-password.h:
	* shell/ev-pixbuf-cache.h:
	* shell/ev-properties-fonts.c:
	* shell/ev-sidebar-attachments.c:
	* shell/ev-sidebar-links.c:
	* shell/ev-sidebar-links.h:
	* shell/ev-sidebar-thumbnails.c:
	* shell/ev-sidebar-thumbnails.h:
	* shell/ev-sidebar.c:
	* shell/ev-sidebar.h:
	* shell/ev-stock-icons.c:
	* shell/ev-tooltip.h:
	* shell/ev-view.c:
	* shell/ev-view.h:
	* shell/ev-window.c:
	* shell/ev-window.h:
	* shell/main.c:

	More #include cleanups. Again: reordering, single gtk.h
	includes and other stuff.


svn path=/trunk/; revision=3095
2008-08-03 18:32:42 +00:00