GNOME Bugzilla – Bug 684851
Add an easy way of adding/editing meta data
Last modified: 2018-05-22 14:46:32 UTC
I have to go through many papers, all in pdf format, from different authors. Its a problem when papers don't have the author and title data set. Unfortunately, this is usually the case with the most of the papers. I generally use pdftk on the command like to set the meta data. But it is a time consuming process for such a simple task. What I had in mind for evince is to let me select a piece of text (that would be author(s) or title for example) and from the context menu that pops up on the selected text, I should be able to have the option to set it as the value for one of the meta fields. For example, in the pop up menu we could say "set as author" and "set as title" and "set as subject" etc. Of course, this should be in addition to the ability to directly edit all meta data in properties...
Created attachment 331956 [details] [review] [PATCH 1/8] libdocument: add functions for modifying document info I've implemented metadata editing in the properties dialog. Doing that from the context menu is probably not a good effort-benefit trade-off. Perhaps a designer could look at this and see if there are any problems with it from the UX point of view. The important fact here is that this code depends on poppler code which is available in the git master tree, but isn't released yet. It also doesn't need this poppler code for evince to work. In the absence of a poppler version which supports metadata editing evince just won't show the "Edit..." button in the properties dialog. Thanks to this we don't have to require the latest poppler version and we can let the distros update it at their usual pace. In order to test these patches, you have to compile poppler youself and use LD_PRELOAD env variable to preload the newly-compiled libpoppler.so and libpoppler-glib.so.
Created attachment 331957 [details] [review] [PATCH 2/8] pdf: implement document info editing
Created attachment 331958 [details] [review] [PATCH 3/8] pdf: don't check if forms or annots are modified, when saving a doc
Created attachment 331959 [details] [review] [PATCH 4/8] add gnome-calendar's GcalDateSelector & GcalTimeSelector
Created attachment 331960 [details] [review] [PATCH 5/8] implement edit mode for EvPropertiesDialog & EvPropertiesView
Created attachment 331961 [details] [review] [PATCH 6/8] change the window title when the document title is changed
Created attachment 331962 [details] [review] [PATCH 7/8] notify the user about unsaved document properties before closing
Created attachment 331963 [details] [review] [PATCH 8/8] add seconds to GcalTimeSelector
Created attachment 331972 [details] [review] [PATCH 1/8] libdocument: add functions for modifying document info Forgot about the copyright info. Sorry.
Created attachment 331973 [details] [review] [PATCH 2/8] pdf: implement document info editing
Created attachment 331975 [details] [review] [PATCH 3/8] pdf: don't check if forms or annots are modified, when saving a doc
Created attachment 331976 [details] [review] [PATCH 4/8] add gnome-calendar's GcalDateSelector & GcalTimeSelector
Created attachment 331977 [details] [review] [PATCH 5/8] implement edit mode for EvPropertiesDialog & EvPropertiesView
Created attachment 331978 [details] [review] [PATCH 6/8] change the window title when the document title is changed
Created attachment 331979 [details] [review] [PATCH 7/8] notify the user about unsaved document properties before closing
Created attachment 331980 [details] [review] [PATCH 8/8] add seconds to GcalTimeSelector
Just a note: new poppler version (0.46) has been released. The code these patches use is in this version. Still: if the needed poppler version is not there, the "Edit..." button just won't be shown on the properties dialog header bar, everything will still work.
Very nice work. I like this, but have two main concerns. First, we should probably do a nautilus plugin or a standalone program that uses your UI to just change the properties of a PDF, this could be launched from the context menu in "Files" a.k.a. nautilus. Something like evince-thumbnailer or maybe the already existing nautilus plugin can be improved. Second, I dislike the fact that the Edit mode looks so different from the non-edit mode... I think that your dialog looks much nicer than the propertie dialog, so I would try to refresh the properties dialog to look similar to yours.
(In reply to José Aliste from comment #18) > Very nice work. I like this, but have two main concerns. First, we should > probably do a nautilus plugin or a standalone program that uses your UI to > just change the properties of a PDF, this could be launched from the context > menu in "Files" a.k.a. nautilus. Something like evince-thumbnailer or maybe > the already existing nautilus plugin can be improved. Agreed. I haven't developed any nautilus plugins yet, so I may be wrong, but based on a brief reading of the Nautilus Extension Reference I think that extensions cannot add buttons to the header bar (if the nautilus properties dialog has a header bar at all). So it seems that a separate plugin (I'm not sure yet if plugins can open their own windows/dialogs) or a standalone program which would be launched from the context menu. I'm not sure if this should go as a separate issue or be reviewed along with the above patches. > Second, I dislike the fact that the Edit mode looks so different from the > non-edit mode... I think that your dialog looks much nicer than the > propertie dialog, so I would try to refresh the properties dialog to look > similar to yours. I think that in large part it's because of the fact that there is much less information which you can edit than all the information which you can read. Because of that in edit mode there is no tab bar (because editable fields are on just one GtkNotebook page) and there are less fields to show (no "Format:", "Number of Pages:" etc.). If you have something else on your mind, please elaborate.
Is there a chance for landing it for 3.22? (I could change something, if I knew that something specifically has to be changed.)
Jakub, Can you add a screencast or screenshot of what you have implemented? that way I can CC people in the design team to give us advice.
Created attachment 332688 [details] How evince behaves when the needed poppler version is unavailable
Created attachment 332689 [details] How evince behaves when the needed poppler version is available
Recorded with Adwaita, but IMHO it looks better with Arc-Darker. ;)
Created attachment 338254 [details] [review] [PATCH 1/8] libdocument: add functions for modifying document info
Created attachment 338255 [details] [review] [PATCH 2/8] pdf: implement document info editing
Created attachment 338256 [details] [review] [PATCH 3/8] pdf: don't check if forms or annots are modified, when saving a doc
Created attachment 338257 [details] [review] [PATCH 4/8] add gnome-calendar's GcalDateSelector & GcalTimeSelector
Created attachment 338258 [details] [review] [PATCH 5/8] implement edit mode for EvPropertiesDialog & EvPropertiesView
Created attachment 338259 [details] [review] [PATCH 6/8] change the window title when the document title is changed
Created attachment 338260 [details] [review] [PATCH 7/8] notify the user about unsaved document properties before closing
Created attachment 338261 [details] [review] [PATCH 8/8] add seconds to GcalTimeSelector
I've resolved the merge conflicts and updated the copyright info (I've changed my name).
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/evince/issues/301.