Index: glade/at-poke.glade2
===================================================================
RCS file: /cvs/gnome/at-poke/glade/at-poke.glade2,v
retrieving revision 1.20
diff -u -p -8 -r1.20 at-poke.glade2
--- glade/at-poke.glade2	26 May 2005 15:52:11 -0000	1.20
+++ glade/at-poke.glade2	23 Aug 2006 09:25:07 -0000
@@ -2322,16 +2322,176 @@
 	    <packing>
 	      <property name="padding">0</property>
 	      <property name="expand">False</property>
 	      <property name="fill">True</property>
 	    </packing>
 	  </child>
 
 	  <child>
+	    <widget class="GtkFrame" id="poker_document_frame">
+	      <property name="border_width">1</property>
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	      <child>
+		<widget class="GtkTable" id="table13">
+		  <property name="visible">True</property>
+		  <property name="n_rows">3</property>
+		  <property name="n_columns">2</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">0</property>
+		  <property name="column_spacing">0</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label2836">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Locale</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">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">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_padding">2</property>
+		      <property name="y_padding">1</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label2840">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Attributes</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>
+		    </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>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="document_if_type">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">&lt;no value&gt;</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>
+		    </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_padding">2</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="document_if_locale">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">&lt;no value&gt;</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>
+		    </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_padding">2</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="document_if_attributes">
+		      <property name="width_request">200</property>
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">&lt;i&gt;(none)&lt;/i&gt;</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">True</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">True</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">4</property>
+		      <property name="ypad">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>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label2839">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Document</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>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
 	    <widget class="GtkLabel" id="poker_streamable_frame">
 	      <property name="visible">True</property>
 	      <property name="label" translatable="yes">Streamable</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>
Index: src/poke.c
===================================================================
RCS file: /cvs/gnome/at-poke/src/poke.c,v
retrieving revision 1.45
diff -u -p -8 -r1.45 poke.c
--- src/poke.c	29 Nov 2005 14:37:08 -0000	1.45
+++ src/poke.c	23 Aug 2006 09:25:07 -0000
@@ -84,16 +84,19 @@ typedef struct {
 	GtkListStore *table_rows_store;
 
 	gulong        update_id;
 	gulong        text_update_id;
 
 	GtkListStore *hypertext_store;
 	GtkTreeView  *hypertext_view;
 
+	GtkWidget    *document_locale;
+	GtkWidget    *document_attributes;
+
 	Accessible   *selected;
 
 	AccessibleCoordType ctype;
 } Poker;
 
 typedef struct {
 	gint count;
 	gint x;
@@ -895,16 +898,42 @@ update_if_image (Poker *poker, Accessibl
 
 	AccessibleImage_getImageSize (image, &w, &h);
 	txt = g_strdup_printf ("%ld, %ld", w, h);
 	gtk_label_set_text (GTK_LABEL (poker->image_size), txt);
 	g_free (txt);
 }
 
 static void
+update_if_document (Poker *poker, AccessibleDocument *document)
+{
+	char *docType, *locale, *attributes_str, *tmp;
+	AccessibleAttributeSet *attributeSet;
+	int i;
+
+	locale = AccessibleDocument_getLocale (document);
+	gtk_label_set_text (GTK_LABEL (poker->document_locale), locale ? locale : "<no value>");
+
+	attributeSet = AccessibleDocument_getAttributes (document);
+	attributes_str = g_strdup ("");
+	for ( i = 0; i < attributeSet->len; ++ i)
+	  {
+	    tmp = g_strconcat (attributes_str,
+			       (i == 0) ? "" : " ",
+			       attributeSet->attributes [i],
+			       (i != attributeSet->len - 1) ? ";" : "",
+			       NULL);
+	    g_free (attributes_str);
+	    attributes_str = tmp;
+	  }
+	g_free (attributeSet);
+	gtk_label_set_text (GTK_LABEL (poker->document_attributes), attributes_str);
+}
+
+static void
 process_accessible (Poker *poker, AccessibleSelection *selection, Accessible *child, GtkTreeSelection *view_sel, long i)
 {
 	char *name, *descr;
 	GtkTreeIter    iter;
 	AccessibleRole role;
 	GValue         idx;
 		
 	name = Accessible_getName (child);
@@ -1115,16 +1144,17 @@ static const struct {
 	{ "poker_action_frame",        "IDL:Accessibility/Action:1.0",       "ac", update_if_action },
 	{ "poker_text_frame",          "IDL:Accessibility/Text:1.0",         "te", update_if_text },
 	{ "poker_editable_text_frame", "IDL:Accessibility/EditableText:1.0", "ed", update_if_editable },
 	{ "poker_value_frame",         "IDL:Accessibility/Value:1.0",        "va", update_if_value },
 	{ "poker_table_frame",         "IDL:Accessibility/Table:1.0",        "ta", update_if_table },
 	{ "poker_image_frame",         "IDL:Accessibility/Image:1.0",        "im", update_if_image },
 	{ "poker_selection_frame",     "IDL:Accessibility/Selection:1.0",    "se", update_if_selection },
 	{ "poker_hypertext_frame",     "IDL:Accessibility/Hypertext:1.0",    "hy", update_if_hypertext },
+	{ "poker_document_frame",      "IDL:Accessibility/Document:1.0",     "do", update_if_document },
 	{ NULL, NULL, NULL, NULL }
 };
 
 char *
 accessible_get_iface_string (Accessible *accessible)
 {
 	int i;
 	GString *str;
@@ -1649,16 +1679,23 @@ poker_create (Accessible *accessible)
 		gtk_tree_view_insert_column_with_attributes (
 			GTK_TREE_VIEW (widget), 2, "Name",
 			gtk_cell_renderer_text_new (), "text",
 			2, NULL);
 
 		g_signal_connect (widget, "row_activated",
 				  G_CALLBACK (link_activated_cb),
 				  poker);
+	}
+
+	{ /* document interface */
+		poker->document_locale  = glade_xml_get_widget (
+                        poker->xml, "document_if_locale");
+		poker->document_attributes  = glade_xml_get_widget (
+                        poker->xml, "document_if_attributes");
 	}
 
 	{ /* main frame buttons */
 		g_signal_connect (
 			glade_xml_get_widget (
 				poker->xml, "poker_refresh"),
 			"clicked",
 			G_CALLBACK (refresh_clicked_cb),
