Add Document open and document close d-bus signals#742
Open
SebastiaanBooman wants to merge 2 commits intopwmt:developfrom
Open
Add Document open and document close d-bus signals#742SebastiaanBooman wants to merge 2 commits intopwmt:developfrom
SebastiaanBooman wants to merge 2 commits intopwmt:developfrom
Conversation
Member
|
The document info should be provided as property instead. Also, the signals also need to be added to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds d-bus signals for document open and document close events.
I would like to be able listen for document open and close events. In this PR the document metadata is included in the open event, whilst the close event only contains the filename. Perhaps it would be a better idea to ensure the data sent in the close and open events are identical.
Perhaps a different/external document identifier could be used as the same file can be opened multiple times in the same Zathura process. This would make it hard to track exactly which file got opened/closed,
The first commit contains a refactor for the meta_fields struct retrieval. I added a const contraint to zathura_document_get_plugin in internal.h. This is due to having to import internal.h in document.c as it uses zathura_document_information_type_t. Without this change I got a "conflicting types" error in document.c. I am not that experienced in C so let me know if this change does not make sense.
In the future I would also like to add events for page switches, which would include: