- /* Assign variables to labels */
- dialog = glade_xml_get_widget (xml, "properties_dialog");
- title = glade_xml_get_widget (xml, "title");
- subject = glade_xml_get_widget (xml, "subject");
- author = glade_xml_get_widget (xml, "author");
- keywords = glade_xml_get_widget (xml, "keywords");
- producer = glade_xml_get_widget (xml, "producer");
- creator = glade_xml_get_widget (xml, "creator");
- created = glade_xml_get_widget (xml, "created");
- modified = glade_xml_get_widget (xml, "modified");
- security = glade_xml_get_widget (xml, "security");
- version = glade_xml_get_widget (xml, "version");
- pages = glade_xml_get_widget (xml, "pages");
- optimized = glade_xml_get_widget (xml, "optimized");
-
- /* Number of pages */
- n_pages = g_strdup_printf (_("%d"), ev_document_get_n_pages (document));
-
- /* PDF version */
- format_str = g_strsplit (info->format, "-", 2);
- pdf_version = g_strdup_printf (_("%s"), format_str[1]);
-
- /* Creation and modified date */
- creation_date = ev_properties_format_date ((GTime) info->creation_date);
- modified_date = ev_properties_format_date ((GTime) info->modified_date);
-
- /* Does the document have security? */
- if (ev_document_security_has_document_security (EV_DOCUMENT_SECURITY (document))) {
- secured_document = "Yes";
- } else {
- secured_document = "No";
- }
-
- /* Shorten label values to fit window size by ellipsizing */
- gtk_label_set_ellipsize (GTK_LABEL (title), PANGO_ELLIPSIZE_END);
- gtk_label_set_ellipsize (GTK_LABEL (keywords), PANGO_ELLIPSIZE_END);
-
- /* Assign values to label fields */
- gtk_label_set_text (GTK_LABEL (title), info->title);
- gtk_label_set_text (GTK_LABEL (subject), info->subject);
- gtk_label_set_text (GTK_LABEL (author), info->author);
- gtk_label_set_text (GTK_LABEL (keywords), info->keywords);
- gtk_label_set_text (GTK_LABEL (producer), info->producer);
- gtk_label_set_text (GTK_LABEL (creator), info->creator);
- gtk_label_set_text (GTK_LABEL (created), creation_date);
- gtk_label_set_text (GTK_LABEL (modified), modified_date);
- gtk_label_set_text (GTK_LABEL (security), secured_document);
- gtk_label_set_text (GTK_LABEL (version), pdf_version);
- gtk_label_set_text (GTK_LABEL (pages), n_pages);
- gtk_label_set_text (GTK_LABEL (optimized), info->linearized);