diff options
author | rootavish <[email protected]> | 2014-07-20 16:08:07 +0530 |
---|---|---|
committer | rootavish <[email protected]> | 2014-07-20 16:08:07 +0530 |
commit | 4a3ac19d1365cb87a31eecea4759484673fad667 (patch) | |
tree | 3aeb0f092e04fc18445ced4757d1944352cb636a /backend | |
parent | e0535b0e61cc56ec62d32518c03a42836f5256e6 (diff) | |
download | atril-4a3ac19d1365cb87a31eecea4759484673fad667.tar.bz2 atril-4a3ac19d1365cb87a31eecea4759484673fad667.tar.xz |
Active properties dialog, other actions
Properties dialog for epub documents, will some basic properties.
Also set toolbar and menu sensitivity for the actions available in epub, will add more(find) once I write the module. Also inverted colors needs to be done with CSS or the like.
Diffstat (limited to 'backend')
-rw-r--r-- | backend/epub/epub-document.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/backend/epub/epub-document.c b/backend/epub/epub-document.c index 51a13d9a..0801c3ab 100644 --- a/backend/epub/epub-document.c +++ b/backend/epub/epub-document.c @@ -989,7 +989,17 @@ epub_document_get_info(EvDocument *document) return NULL ; } EvDocumentInfo* epubinfo = g_new0 (EvDocumentInfo, 1); - + + epubinfo->fields_mask = EV_DOCUMENT_INFO_TITLE | + EV_DOCUMENT_INFO_FORMAT | + EV_DOCUMENT_INFO_AUTHOR | + EV_DOCUMENT_INFO_SUBJECT | + EV_DOCUMENT_INFO_KEYWORDS | + EV_DOCUMENT_INFO_LAYOUT | + EV_DOCUMENT_INFO_CREATOR | + EV_DOCUMENT_INFO_LINEARIZED | + EV_DOCUMENT_INFO_N_PAGES ; + if ( xmldocument != NULL ) xml_free_doc(); @@ -1024,8 +1034,7 @@ epub_document_get_info(EvDocument *document) epubinfo->format = g_strdup(buffer->str); /*FIXME: Add more of these as you write the corresponding modules*/ - epubinfo->permissions = EV_DOCUMENT_PERMISSIONS_OK_TO_ADD_NOTES; - + epubinfo->layout = EV_DOCUMENT_LAYOUT_SINGLE_PAGE; metanode = xml_get_pointer_to_node((xmlChar*)"publisher",NULL,NULL); @@ -1034,6 +1043,9 @@ epub_document_get_info(EvDocument *document) else epubinfo->creator = (char*)xml_get_data_from_node(metanode,XML_KEYWORD,NULL); + /* number of pages */ + epubinfo->n_pages = epub_document_get_n_pages(document); + /*TODO : Add a function to get date*/ g_free(uri); g_string_free(containerpath,TRUE); |