[evince/BUG_has_javascript: 65/65] EvPropertiesView: add "contains_js" property
- From: Nelson Ben <nbenitez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince/BUG_has_javascript: 65/65] EvPropertiesView: add "contains_js" property
- Date: Mon, 13 Jul 2020 21:24:35 +0000 (UTC)
commit 42342cdb478e76447e575ae4b0db112fde7c324d
Author: Nelson Benítez León <nbenitezl gmail com>
Date: Mon Jul 13 16:32:55 2020 -0400
EvPropertiesView: add "contains_js" property
based on new EvDocumentInfo field by same name.
properties/ev-properties-view.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
---
diff --git a/properties/ev-properties-view.c b/properties/ev-properties-view.c
index 707e172f..1c97b135 100644
--- a/properties/ev-properties-view.c
+++ b/properties/ev-properties-view.c
@@ -47,6 +47,7 @@ typedef enum {
LINEARIZED_PROPERTY,
FORMAT_PROPERTY,
SECURITY_PROPERTY,
+ CONTAINS_JS_PROPERTY,
PAPER_SIZE_PROPERTY,
FILE_SIZE_PROPERTY,
N_PROPERTIES,
@@ -71,6 +72,7 @@ static const PropertyInfo properties_info[] = {
{ LINEARIZED_PROPERTY, N_("Optimized:") },
{ FORMAT_PROPERTY, N_("Format:") },
{ SECURITY_PROPERTY, N_("Security:") },
+ { CONTAINS_JS_PROPERTY, N_("Contains Javascript:") },
{ PAPER_SIZE_PROPERTY, N_("Paper Size:") },
{ FILE_SIZE_PROPERTY, N_("Size:") }
};
@@ -418,6 +420,16 @@ ev_properties_view_set_info (EvPropertiesView *properties, const EvDocumentInfo
set_property (properties, GTK_GRID (grid), PAPER_SIZE_PROPERTY, text, &row);
g_free (text);
}
+ if (info->fields_mask & EV_DOCUMENT_INFO_CONTAINS_JS) {
+ if (info->contains_js == EV_DOCUMENT_CONTAINS_JS_YES) {
+ text = _("Yes");
+ } else if (info->contains_js == EV_DOCUMENT_CONTAINS_JS_NO) {
+ text = _("No");
+ } else {
+ text = _("Unknown");
+ }
+ set_property (properties, GTK_GRID (grid), CONTAINS_JS_PROPERTY, text, &row);
+ }
if (properties->file_size) {
text = g_format_size (properties->file_size);
set_property (properties, GTK_GRID (grid), FILE_SIZE_PROPERTY, text, &row);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]