]> www.fi.muni.cz Git - evince.git/commitdiff
Initial go at file properties. Patch by Emil Soleyman-Zomalan
authorMarco Pesenti Gritti <mpg@redhat.com>
Fri, 3 Jun 2005 17:57:18 +0000 (17:57 +0000)
committerMarco Pesenti Gritti <marco@src.gnome.org>
Fri, 3 Jun 2005 17:57:18 +0000 (17:57 +0000)
2005-06-03  Marco Pesenti Gritti <mpg@redhat.com>

        * backend/ev-document-info.h:
        * data/Makefile.am:
        * data/evince-ui.xml:
        * pdf/ev-poppler.cc:
        * shell/Makefile.am:
        * shell/ev-window.c: (update_action_sensitivity),
        (ev_window_cmd_file_properties):

        Initial go at file properties. Patch by
        Emil Soleyman-Zomalan <emil@soleyman.com>.
        Needs love see #169583

ChangeLog
backend/ev-document-info.h
data/Makefile.am
data/evince-properties.glade [new file with mode: 0644]
data/evince-ui.xml
pdf/ev-poppler.cc
shell/Makefile.am
shell/ev-properties.c [new file with mode: 0644]
shell/ev-properties.h [new file with mode: 0644]
shell/ev-window.c

index 7b87c94ea5f4d61d73cd2e6a09a553d1aebe7854..956e1d9f5d1d6a01e734a331cd61bc87c6579d75 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2005-06-03  Marco Pesenti Gritti <mpg@redhat.com>
+
+       * backend/ev-document-info.h:
+       * data/Makefile.am:
+       * data/evince-ui.xml:
+       * pdf/ev-poppler.cc:
+       * shell/Makefile.am:
+       * shell/ev-window.c: (update_action_sensitivity),
+       (ev_window_cmd_file_properties):
+
+       Initial go at file properties. Patch by
+       Emil Soleyman-Zomalan <emil@soleyman.com>.
+       Needs love see #169583
+
 2005-06-02  Marco Pesenti Gritti <mpg@redhat.com>
 
        * ps/ps-document.c: (output):
index 02ea5b110035a085da893800b188cb60a78b312f..299576c8e08f77e2954959949e60969763e12117 100644 (file)
@@ -81,10 +81,14 @@ typedef enum
        EV_DOCUMENT_INFO_SUBJECT = 1 << 3,
        EV_DOCUMENT_INFO_KEYWORDS = 1 << 4,
        EV_DOCUMENT_INFO_LAYOUT = 1 << 5,
-       EV_DOCUMENT_INFO_START_MODE = 1 << 6,
-       EV_DOCUMENT_INFO_CREATION_DATE = 1 << 7,
-       EV_DOCUMENT_INFO_UI_HINTS = 1 << 8,
-       EV_DOCUMENT_INFO_PERMISSIONS = 1 << 9,
+       EV_DOCUMENT_INFO_CREATOR = 1 << 6,
+       EV_DOCUMENT_INFO_PRODUCER = 1 << 7,
+       EV_DOCUMENT_INFO_CREATION_DATE = 1 << 8,
+       EV_DOCUMENT_INFO_MOD_DATE = 1 << 9,
+       EV_DOCUMENT_INFO_LINEARIZED = 1 << 10,
+       EV_DOCUMENT_INFO_START_MODE = 1 << 11,
+       EV_DOCUMENT_INFO_UI_HINTS = 1 << 12,
+       EV_DOCUMENT_INFO_PERMISSIONS = 1 << 13
 } EvDocumentInfoFields;
 
 struct _EvDocumentInfo
@@ -94,9 +98,13 @@ struct _EvDocumentInfo
        char *author;
        char *subject;
        char *keywords;
+       char *creator;
+       char *producer;
+       char *linearized;
+       GTime *creation_date;
+       GTime *modified_date;
        EvDocumentLayout layout;
        EvDocumentMode mode;
-       GDate creation_date;
        guint ui_hints;
        guint permissions;
 
index 183e455fb19bfe549d0de8f4d2df553999e90d6e..d7d6dafe3c60a193636042f14077909d498c5410 100644 (file)
@@ -13,6 +13,7 @@ ui_DATA =                             \
 gladedir = $(pkgdatadir)
 glade_DATA =                           \
        evince-password.glade           \
+       evince-properties.glade         \
        $(NULL)
 
 DESKTOP_IN_FILES= evince.desktop.in.in
diff --git a/data/evince-properties.glade b/data/evince-properties.glade
new file mode 100644 (file)
index 0000000..837e8fb
--- /dev/null
@@ -0,0 +1,851 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkDialog" id="properties_dialog">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Properties</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
+  <property name="modal">False</property>
+  <property name="resizable">False</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_CENTER</property>
+  <property name="focus_on_map">True</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox1">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+       <widget class="GtkHButtonBox" id="dialog-action_area1">
+         <property name="visible">True</property>
+         <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+         <child>
+           <widget class="GtkButton" id="close_button">
+             <property name="visible">True</property>
+             <property name="can_default">True</property>
+             <property name="can_focus">True</property>
+             <property name="label">gtk-close</property>
+             <property name="use_stock">True</property>
+             <property name="relief">GTK_RELIEF_NORMAL</property>
+             <property name="focus_on_click">True</property>
+             <property name="response_id">-7</property>
+           </widget>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">False</property>
+         <property name="fill">True</property>
+         <property name="pack_type">GTK_PACK_END</property>
+       </packing>
+      </child>
+
+      <child>
+       <widget class="GtkNotebook" id="notebook2">
+         <property name="visible">True</property>
+         <property name="can_focus">True</property>
+         <property name="show_tabs">True</property>
+         <property name="show_border">True</property>
+         <property name="tab_pos">GTK_POS_TOP</property>
+         <property name="scrollable">False</property>
+         <property name="enable_popup">False</property>
+
+         <child>
+           <widget class="GtkTable" id="table2">
+             <property name="border_width">3</property>
+             <property name="visible">True</property>
+             <property name="n_rows">12</property>
+             <property name="n_columns">2</property>
+             <property name="homogeneous">False</property>
+             <property name="row_spacing">6</property>
+             <property name="column_spacing">6</property>
+
+             <child>
+               <widget class="GtkLabel" id="label3">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">&lt;b&gt;Title:&lt;/b&gt;</property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">True</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                 <property name="width_chars">-1</property>
+                 <property name="single_line_mode">False</property>
+                 <property name="angle">0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">0</property>
+                 <property name="bottom_attach">1</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="label4">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">&lt;b&gt;Subject:&lt;/b&gt;</property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">True</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                 <property name="width_chars">-1</property>
+                 <property name="single_line_mode">False</property>
+                 <property name="angle">0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">1</property>
+                 <property name="bottom_attach">2</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="label5">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">&lt;b&gt;Author:&lt;/b&gt;</property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">True</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                 <property name="width_chars">-1</property>
+                 <property name="single_line_mode">False</property>
+                 <property name="angle">0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">2</property>
+                 <property name="bottom_attach">3</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="label6">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">&lt;b&gt;Keywords:&lt;/b&gt;</property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">True</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                 <property name="width_chars">-1</property>
+                 <property name="single_line_mode">False</property>
+                 <property name="angle">0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">3</property>
+                 <property name="bottom_attach">4</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="label7">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">&lt;b&gt;Creator:&lt;/b&gt;</property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">True</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                 <property name="width_chars">-1</property>
+                 <property name="single_line_mode">False</property>
+                 <property name="angle">0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">4</property>
+                 <property name="bottom_attach">5</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="label8">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">&lt;b&gt;Producer:&lt;/b&gt;</property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">True</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                 <property name="width_chars">-1</property>
+                 <property name="single_line_mode">False</property>
+                 <property name="angle">0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">5</property>
+                 <property name="bottom_attach">6</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="label9">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">&lt;b&gt;Created:&lt;/b&gt;</property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">True</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                 <property name="width_chars">-1</property>
+                 <property name="single_line_mode">False</property>
+                 <property name="angle">0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">6</property>
+                 <property name="bottom_attach">7</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="label10">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">&lt;b&gt;Modified:&lt;/b&gt;</property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">True</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                 <property name="width_chars">-1</property>
+                 <property name="single_line_mode">False</property>
+                 <property name="angle">0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">7</property>
+                 <property name="bottom_attach">8</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="label11">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">&lt;b&gt;Security:&lt;/b&gt;</property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">True</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                 <property name="width_chars">-1</property>
+                 <property name="single_line_mode">False</property>
+                 <property name="angle">0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">8</property>
+                 <property name="bottom_attach">9</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="label12">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">&lt;b&gt;PDF Version:&lt;/b&gt;</property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">True</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                 <property name="width_chars">-1</property>
+                 <property name="single_line_mode">False</property>
+                 <property name="angle">0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">9</property>
+                 <property name="bottom_attach">10</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="label13">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">&lt;b&gt;Number of Pages:&lt;/b&gt;</property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">True</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                 <property name="width_chars">-1</property>
+                 <property name="single_line_mode">False</property>
+                 <property name="angle">0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">10</property>
+                 <property name="bottom_attach">11</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="label14">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">&lt;b&gt;Optimized:&lt;/b&gt;</property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">True</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                 <property name="width_chars">-1</property>
+                 <property name="single_line_mode">False</property>
+                 <property name="angle">0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">0</property>
+                 <property name="right_attach">1</property>
+                 <property name="top_attach">11</property>
+                 <property name="bottom_attach">12</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="title">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes"></property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">True</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                 <property name="width_chars">-1</property>
+                 <property name="single_line_mode">False</property>
+                 <property name="angle">0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">1</property>
+                 <property name="right_attach">2</property>
+                 <property name="top_attach">0</property>
+                 <property name="bottom_attach">1</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="subject">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes"></property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">True</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                 <property name="width_chars">-1</property>
+                 <property name="single_line_mode">False</property>
+                 <property name="angle">0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">1</property>
+                 <property name="right_attach">2</property>
+                 <property name="top_attach">1</property>
+                 <property name="bottom_attach">2</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="author">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes"></property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">True</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                 <property name="width_chars">-1</property>
+                 <property name="single_line_mode">False</property>
+                 <property name="angle">0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">1</property>
+                 <property name="right_attach">2</property>
+                 <property name="top_attach">2</property>
+                 <property name="bottom_attach">3</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="keywords">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes"></property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">True</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                 <property name="width_chars">-1</property>
+                 <property name="single_line_mode">False</property>
+                 <property name="angle">0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">1</property>
+                 <property name="right_attach">2</property>
+                 <property name="top_attach">3</property>
+                 <property name="bottom_attach">4</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="creator">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes"></property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">True</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                 <property name="width_chars">-1</property>
+                 <property name="single_line_mode">False</property>
+                 <property name="angle">0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">1</property>
+                 <property name="right_attach">2</property>
+                 <property name="top_attach">4</property>
+                 <property name="bottom_attach">5</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="producer">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes"></property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">True</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                 <property name="width_chars">-1</property>
+                 <property name="single_line_mode">False</property>
+                 <property name="angle">0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">1</property>
+                 <property name="right_attach">2</property>
+                 <property name="top_attach">5</property>
+                 <property name="bottom_attach">6</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="created">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes"></property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">True</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                 <property name="width_chars">-1</property>
+                 <property name="single_line_mode">False</property>
+                 <property name="angle">0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">1</property>
+                 <property name="right_attach">2</property>
+                 <property name="top_attach">6</property>
+                 <property name="bottom_attach">7</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="modified">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes"></property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">True</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                 <property name="width_chars">-1</property>
+                 <property name="single_line_mode">False</property>
+                 <property name="angle">0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">1</property>
+                 <property name="right_attach">2</property>
+                 <property name="top_attach">7</property>
+                 <property name="bottom_attach">8</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="security">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes"></property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">True</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                 <property name="width_chars">-1</property>
+                 <property name="single_line_mode">False</property>
+                 <property name="angle">0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">1</property>
+                 <property name="right_attach">2</property>
+                 <property name="top_attach">8</property>
+                 <property name="bottom_attach">9</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="version">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes"></property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">True</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                 <property name="width_chars">-1</property>
+                 <property name="single_line_mode">False</property>
+                 <property name="angle">0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">1</property>
+                 <property name="right_attach">2</property>
+                 <property name="top_attach">9</property>
+                 <property name="bottom_attach">10</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="pages">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes"></property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">True</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                 <property name="width_chars">-1</property>
+                 <property name="single_line_mode">False</property>
+                 <property name="angle">0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">1</property>
+                 <property name="right_attach">2</property>
+                 <property name="top_attach">10</property>
+                 <property name="bottom_attach">11</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="optimized">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes"></property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">True</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                 <property name="width_chars">-1</property>
+                 <property name="single_line_mode">False</property>
+                 <property name="angle">0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">1</property>
+                 <property name="right_attach">2</property>
+                 <property name="top_attach">11</property>
+                 <property name="bottom_attach">12</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+           </widget>
+           <packing>
+             <property name="tab_expand">False</property>
+             <property name="tab_fill">True</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkLabel" id="pdf_properties_label">
+             <property name="visible">True</property>
+             <property name="label" translatable="yes">PDF Properties</property>
+             <property name="use_underline">False</property>
+             <property name="use_markup">False</property>
+             <property name="justify">GTK_JUSTIFY_LEFT</property>
+             <property name="wrap">False</property>
+             <property name="selectable">False</property>
+             <property name="xalign">0.5</property>
+             <property name="yalign">0.5</property>
+             <property name="xpad">0</property>
+             <property name="ypad">0</property>
+             <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+             <property name="width_chars">-1</property>
+             <property name="single_line_mode">False</property>
+             <property name="angle">0</property>
+           </widget>
+           <packing>
+             <property name="type">tab</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkTable" id="table3">
+             <property name="visible">True</property>
+             <property name="n_rows">3</property>
+             <property name="n_columns">3</property>
+             <property name="homogeneous">False</property>
+             <property name="row_spacing">0</property>
+             <property name="column_spacing">0</property>
+
+             <child>
+               <widget class="GtkLabel" id="label15">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">Not implemented</property>
+                 <property name="use_underline">False</property>
+                 <property name="use_markup">False</property>
+                 <property name="justify">GTK_JUSTIFY_LEFT</property>
+                 <property name="wrap">False</property>
+                 <property name="selectable">False</property>
+                 <property name="xalign">0</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xpad">0</property>
+                 <property name="ypad">0</property>
+                 <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                 <property name="width_chars">-1</property>
+                 <property name="single_line_mode">False</property>
+                 <property name="angle">0</property>
+               </widget>
+               <packing>
+                 <property name="left_attach">1</property>
+                 <property name="right_attach">2</property>
+                 <property name="top_attach">1</property>
+                 <property name="bottom_attach">2</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+           </widget>
+           <packing>
+             <property name="tab_expand">False</property>
+             <property name="tab_fill">True</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkLabel" id="font_properties_label">
+             <property name="visible">True</property>
+             <property name="label" translatable="yes">Font Properties</property>
+             <property name="use_underline">False</property>
+             <property name="use_markup">False</property>
+             <property name="justify">GTK_JUSTIFY_LEFT</property>
+             <property name="wrap">False</property>
+             <property name="selectable">False</property>
+             <property name="xalign">0.5</property>
+             <property name="yalign">0.5</property>
+             <property name="xpad">0</property>
+             <property name="ypad">0</property>
+             <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+             <property name="width_chars">-1</property>
+             <property name="single_line_mode">False</property>
+             <property name="angle">0</property>
+           </widget>
+           <packing>
+             <property name="type">tab</property>
+           </packing>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">True</property>
+         <property name="fill">True</property>
+       </packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>
index f2e6c32cb6b63f83cafd36e4c4968da73f7fcbb2..a670da4c657fa0ee0db5b785a9d7d301ff79be1c 100644 (file)
@@ -6,6 +6,8 @@
       <separator/>
       <menuitem name="FilePrintMenu" action="FilePrint"/>
       <separator/>
+      <menuitem name="FilePropertiesMenu" action="FileProperties"/>
+      <separator/>
       <placeholder name="RecentFilesMenu"/>
       <menuitem name="FileCloseWindowMenu" action="FileCloseWindow"/>
     </menu>
index 9cb15348736c38e653dbdf63d50085ddd54ace46..684812c3efe81fc35c0ddb4dd708b0c9e620d25c 100644 (file)
@@ -329,9 +329,13 @@ pdf_document_get_info (EvDocument *document)
                            EV_DOCUMENT_INFO_KEYWORDS |
                            EV_DOCUMENT_INFO_LAYOUT |
                            EV_DOCUMENT_INFO_START_MODE |
-                           /* Missing EV_DOCUMENT_INFO_CREATION_DATE | */
                            EV_DOCUMENT_INFO_PERMISSIONS |
-                           EV_DOCUMENT_INFO_UI_HINTS;
+                           EV_DOCUMENT_INFO_UI_HINTS |
+                           EV_DOCUMENT_INFO_CREATOR |
+                           EV_DOCUMENT_INFO_PRODUCER |
+                           EV_DOCUMENT_INFO_CREATION_DATE |
+                           EV_DOCUMENT_INFO_MOD_DATE |
+                           EV_DOCUMENT_INFO_LINEARIZED;
 
 
        g_object_get (PDF_DOCUMENT (document)->document,
@@ -344,6 +348,11 @@ pdf_document_get_info (EvDocument *document)
                      "page-layout", &layout,
                      "viewer-preferences", &view_prefs,
                      "permissions", &permissions,
+                     "creator", &(info->creator),
+                     "producer", &(info->producer),
+                     "creation-date", &(info->creation_date),
+                     "mod-date", &(info->modified_date),
+                     "linearized", &(info->linearized),
                      NULL);
 
        switch (layout) {
index bd104e868e4431b4825869d6f84915ede0dc9c6e..7668e977162cc7af33db97a16537a01776ad2cbd 100644 (file)
@@ -70,6 +70,8 @@ evince_SOURCES=                               \
        ev-pixbuf-cache.h               \
        ev-print-job.c                  \
        ev-print-job.h                  \
+       ev-properties.c                 \
+       ev-properties.h                 \
        ev-utils.c                      \
        ev-utils.h                      \
        ev-view.c                       \
diff --git a/shell/ev-properties.c b/shell/ev-properties.c
new file mode 100644 (file)
index 0000000..995de60
--- /dev/null
@@ -0,0 +1,140 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; c-indent-level: 8 -*- */
+/* this file is part of evince, a gnome document viewer
+ *
+ *  Copyright (C) 2005 Red Hat, Inc
+ *
+ * Evince is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Evince is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "ev-properties.h"
+
+#include <glib/gi18n.h>
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+
+GtkDialog *
+ev_properties_new (EvDocument  *document, 
+                                  GtkWidget    *toplevel)
+{
+       const char *glade_file = DATADIR "/evince-properties.glade";
+       GladeXML *xml;
+       GtkWidget *dialog = NULL;
+       EvDocumentInfo *info;
+       GtkWidget *title, *subject, *author, *keywords, *producer, *creator;
+       GtkWidget *created, *modified, *security, *version, *pages, *optimized;
+       gchar *n_pages, **format_str, *pdf_version;
+       gchar *creation_date, *modified_date;
+       gchar *secured_document;
+       
+       /* Create a new GladeXML object from XML file glade_file */
+       xml = glade_xml_new (glade_file, NULL, NULL);
+       g_return_val_if_fail (xml != NULL, NULL);
+
+       /* Retrieve the document structure */
+       info = ev_document_get_info (document);
+
+       /* 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);
+
+       /* Clean up */
+       g_strfreev (format_str);
+       g_free (n_pages);
+       g_free (pdf_version);
+       g_free (creation_date);
+       g_free (modified_date); 
+               
+       return GTK_DIALOG (dialog); 
+}
+
+/* Returns a locale specific date and time representation */
+gchar *
+ev_properties_format_date (GTime utime)
+{
+       struct tm *time;
+       gchar *date_string;
+       
+       date_string = g_new0 (char, 101);
+       
+       time = localtime ((const time_t *) &utime);                     
+       my_strftime (date_string, 100, "%c", time);             
+       
+       return date_string;
+}
+
+/* Some buggy versions of gcc complain about the use of %c: 
+ * warning: `%c' yields  only last 2 digits of year in some locales.
+ * 
+ * This is a relatively clean one is to add an intermediate
+ * function thanks to the strftime(3) manpage
+ */
+size_t  
+my_strftime (char  *s, size_t max, 
+                        const char *fmt, 
+                        const struct tm *tm) 
+{
+       return strftime (s, max, fmt, tm);
+}
diff --git a/shell/ev-properties.h b/shell/ev-properties.h
new file mode 100644 (file)
index 0000000..0d0eaf8
--- /dev/null
@@ -0,0 +1,53 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; c-indent-level: 8 -*- */
+/* this file is part of evince, a gnome document viewer
+ *
+ *  Copyright (C) 2005 Red Hat, Inc
+ *
+ * Evince is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Evince is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __EV_PROPERTIES_H__
+#define __EV_PROPERTIES_H__
+
+#include "ev-document.h"
+#include "ev-document-security.h"
+#include "ev-window.h"
+
+#include <time.h>
+#include <sys/time.h>
+#include <gtk/gtkdialog.h>
+#include <gtk/gtkwidget.h>
+#include <gtk/gtkwindow.h>
+
+G_BEGIN_DECLS
+
+typedef struct _EvProperties       EvProperties;
+
+struct _EvProperties {
+       GtkDialog               parent;
+};
+
+GtkDialog *ev_properties_new       (EvDocument *document,
+                                                                        GtkWidget      *toplevel);
+               
+gchar *ev_properties_format_date       (GTime utime);
+
+size_t my_strftime                                     (char  *s, size_t max, 
+                                                                        const char *fmt, 
+                                                                        const struct tm *tm);
+
+G_END_DECLS
+
+#endif /* __EV_PROPERTIES_H__ */
index c5cfac688cbaa6ee77ebf3c07b3bb6f01af17929..b94871ba15aacd2c792f0cdf93e53e706c78beec 100644 (file)
@@ -37,6 +37,7 @@
 #include "ev-password.h"
 #include "ev-password-view.h"
 #include "ev-print-job.h"
+#include "ev-properties.h"
 #include "ev-document-thumbnails.h"
 #include "ev-document-links.h"
 #include "ev-document-types.h"
@@ -218,10 +219,10 @@ update_action_sensitivity (EvWindow *ev_window)
        /* "FileOpen": always sensitive */
        set_action_sensitive (ev_window, "FileSaveAs", has_document && ok_to_copy);
        set_action_sensitive (ev_window, "FilePrint", has_pages && ok_to_print);
+       set_action_sensitive (ev_window, "FileProperties", has_document);
        /* "FileCloseWindow": always sensitive */
 
         /* Edit menu */
-
        sensitive = has_pages && ev_document_can_get_text (document);
        set_action_sensitive (ev_window, "EditCopy", sensitive && ok_to_copy);
        set_action_sensitive (ev_window, "EditSelectAll", sensitive && ok_to_copy);
@@ -1180,6 +1181,16 @@ ev_window_cmd_file_print (GtkAction *action, EvWindow *ev_window)
        ev_window_print (ev_window);
 }
 
+static void
+ev_window_cmd_file_properties (GtkAction *action, EvWindow *ev_window)
+{
+            GtkDialog *dialog;
+
+            dialog = ev_properties_new (ev_window->priv->document, GTK_WIDGET (ev_window));
+            gtk_dialog_run (dialog);
+            gtk_widget_destroy (GTK_WIDGET (dialog));
+}
+                                       
 static void
 ev_window_cmd_file_close_window (GtkAction *action, EvWindow *ev_window)
 {
@@ -2351,6 +2362,9 @@ static const GtkActionEntry entries[] = {
        { "FilePrint", GTK_STOCK_PRINT, N_("Print..."), "<control>P",
          N_("Print this document"),
          G_CALLBACK (ev_window_cmd_file_print) },
+       { "FileProperties", GTK_STOCK_PROPERTIES, N_("Properties"), "<alt>Return",
+         N_("View the properties of this document"),
+         G_CALLBACK (ev_window_cmd_file_properties) },                       
        { "FileCloseWindow", GTK_STOCK_CLOSE, NULL, "<control>W",
          N_("Close this window"),
          G_CALLBACK (ev_window_cmd_file_close_window) },