? at-poke-0.2.3.tar.gz
? at-poke-stream-patch.diff
? poke-merged-doc-streamable.diff
? poke.diff
? poke.patch
? glade/at-poke.glade2p
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/at-poke/ChangeLog,v
retrieving revision 1.86
diff -u -r1.86 ChangeLog
--- ChangeLog	21 Aug 2006 19:44:33 -0000	1.86
+++ ChangeLog	23 Aug 2006 17:38:10 -0000
@@ -1,3 +1,14 @@
+2006-08-23  Bill Haneman <billh@gnome.org>
+
+	* glade/at-poke.glade2:
+	* poke/src.c: Added support for Accessibility_StreamableContent.
+	Bug #345706.
+
+	* glade/at-poke.glade2:
+	* poke/src.c:
+	Patch from Ginn Chen, added support for Accessibility_Document.
+	Bug #351427.
+	
 2006-08-21  Brian Cameron  <brian.cameron@sun.com>
 
 	* src/main.c: Minor one-line change to a g_warning call
Index: glade/at-poke.glade2
===================================================================
RCS file: /cvs/gnome/at-poke/glade/at-poke.glade2,v
retrieving revision 1.20
diff -u -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 17:38:13 -0000
@@ -2188,116 +2188,7 @@
 	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
 	      <child>
-		<widget class="GtkTable" id="table9">
-		  <property name="visible">True</property>
-		  <property name="n_rows">2</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="label2798">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Description</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">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_padding">2</property>
-		      <property name="y_padding">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label2799">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Size</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>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="image_if_size">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">&lt;no size&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>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="image_if_description">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">&lt;no description&gt;</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">True</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>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-		</widget>
+		<placeholder/>
 	      </child>
 
 	      <child>
@@ -2327,24 +2218,7 @@
 	  </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>
-	      <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="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
+	    <placeholder/>
 	  </child>
 
 	  <child>
@@ -2568,155 +2442,279 @@
 	    </packing>
 	  </child>
 
-	  <child>
-	    <widget class="GtkHButtonBox" id="hbuttonbox1">
+ 	  <child>
+	    <widget class="GtkFrame" id="poker_document_frame">
+	      <property name="border_width">1</property>
 	      <property name="visible">True</property>
-	      <property name="layout_style">GTK_BUTTONBOX_END</property>
-	      <property name="spacing">2</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="GtkButton" id="poker_refresh">
+		<widget class="GtkTable" id="table13">
 		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">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="GtkAlignment" id="alignment11">
+		    <widget class="GtkLabel" id="label2836">
 		      <property name="visible">True</property>
-		      <property name="xalign">0.5</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="xscale">0</property>
-		      <property name="yscale">0</property>
-		      <property name="top_padding">0</property>
-		      <property name="bottom_padding">0</property>
-		      <property name="left_padding">0</property>
-		      <property name="right_padding">0</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="GtkHBox" id="hbox22">
-			  <property name="visible">True</property>
-			  <property name="homogeneous">False</property>
-			  <property name="spacing">2</property>
+		  <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="GtkImage" id="image15">
-			      <property name="visible">True</property>
-			      <property name="stock">gtk-refresh</property>
-			      <property name="icon_size">4</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="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</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="label2822">
-			      <property name="visible">True</property>
-			      <property name="label" translatable="yes">_Refresh</property>
-			      <property name="use_underline">True</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="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
-			</widget>
-		      </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="GtkFrame" id="poker_streamable_frame">
+	      <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="GtkButton" id="poker_expand">
+		<widget class="GtkAlignment" id="streamable_alignment">
 		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">1</property>
+		  <property name="yscale">1</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">12</property>
+		  <property name="right_padding">0</property>
 
 		  <child>
-		    <widget class="GtkAlignment" id="alignment10">
+		    <widget class="GtkVBox" id="streamable_vbox">
 		      <property name="visible">True</property>
-		      <property name="xalign">0.5</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xscale">0</property>
-		      <property name="yscale">0</property>
-		      <property name="top_padding">0</property>
-		      <property name="bottom_padding">0</property>
-		      <property name="left_padding">0</property>
-		      <property name="right_padding">0</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkScrolledWindow" id="streamable_viewport">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
+			  <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+			  <property name="shadow_type">GTK_SHADOW_NONE</property>
+			  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+			  <child>
+			    <placeholder/>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
 
 		      <child>
-			<widget class="GtkHBox" id="hbox21">
+			<widget class="GtkHButtonBox" id="hbuttonbox1">
 			  <property name="visible">True</property>
-			  <property name="homogeneous">False</property>
-			  <property name="spacing">2</property>
+			  <property name="layout_style">GTK_BUTTONBOX_DEFAULT_STYLE</property>
+			  <property name="spacing">0</property>
 
 			  <child>
-			    <widget class="GtkImage" id="image14">
+			    <widget class="GtkButton" id="streamable_text_import_button">
 			      <property name="visible">True</property>
-			      <property name="stock">gtk-go-forward</property>
-			      <property name="icon_size">4</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="can_focus">True</property>
+			      <property name="label" translatable="yes">Import</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
 			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</property>
-			    </packing>
 			  </child>
 
 			  <child>
-			    <widget class="GtkLabel" id="label2821">
+			    <widget class="GtkButton" id="streamable_launch_button">
 			      <property name="visible">True</property>
-			      <property name="label" translatable="yes">_Expand</property>
+			      <property name="sensitive">False</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Launch</property>
 			      <property name="use_underline">True</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="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
 			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">False</property>
-			      <property name="fill">False</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>
 	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label2831">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">StreamableContent</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.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">2</property>
-	      <property name="expand">False</property>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
 	      <property name="fill">True</property>
 	    </packing>
+	  </child>
+
+	  <child>
+	    <placeholder/>
 	  </child>
 	</widget>
 	<packing>
Index: src/poke.c
===================================================================
RCS file: /cvs/gnome/at-poke/src/poke.c,v
retrieving revision 1.45
diff -u -r1.45 poke.c
--- src/poke.c	29 Nov 2005 14:37:08 -0000	1.45
+++ src/poke.c	23 Aug 2006 17:38:15 -0000
@@ -89,6 +89,13 @@
 	GtkListStore *hypertext_store;
 	GtkTreeView  *hypertext_view;
 
+	GtkWidget    *document_locale;
+	GtkWidget    *document_attributes;
+
+	GtkContainer *streamable_container;
+	GtkComboBox  *streamable_combo;
+	GtkTextView  *streamable_textview;
+
 	Accessible   *selected;
 
 	AccessibleCoordType ctype;
@@ -163,7 +170,7 @@
 	} relation_names [] = {
 		{ SPI_RELATION_NULL,           "NULL" },
 		{ SPI_RELATION_LABEL_FOR,      "LABEL_FOR" },
-		{ SPI_RELATION_LABELED_BY,     "LABELED_BY" },
+		{ SPI_RELATION_LABELED_BY,     "LABELLED_BY" },
 		{ SPI_RELATION_CONTROLLER_FOR, "CONTROLLER_FOR" },
 		{ SPI_RELATION_CONTROLLED_BY,  "CONTROLLED_BY" },
 		{ SPI_RELATION_MEMBER_OF,      "MEMBER_OF" },
@@ -900,6 +907,109 @@
 }
 
 static void
+update_if_document (Poker *poker, AccessibleDocument *document)
+{
+	char *docType, *locale;
+	AccessibleAttributeSet *attributeSet;
+	GString *attribute_str = g_string_new ("");
+	int i;
+ 
+ 	locale = AccessibleDocument_getLocale (document);
+ 	gtk_label_set_text (GTK_LABEL (poker->document_locale), locale ? locale : "<no value>");
+ 
+ 	attributeSet = AccessibleDocument_getAttributes (document);
+ 	for ( i = 0; i < attributeSet->len; ++ i)
+ 	  {
+	    
+ 	    g_string_append_printf (attribute_str,
+ 			       "%s%s%s", (i == 0) ? "" : " ",
+ 			       attributeSet->attributes [i],
+ 			       (i != attributeSet->len - 1) ? ";" : "");
+ 	  }
+ 	g_free (attributeSet);
+ 	gtk_label_set_text (GTK_LABEL (poker->document_attributes), 
+			    g_string_free (attribute_str, FALSE));
+ } 
+
+static void
+update_if_streamable (Poker *poker, AccessibleStreamableContent *streamable)
+{
+	char **mimetypes;
+	gint i = 0;
+	GtkComboBox *combo = GTK_COMBO_BOX (gtk_combo_box_new_text ());
+
+	if (poker->streamable_combo) {
+		gtk_container_remove (poker->streamable_container, 
+				      GTK_WIDGET (poker->streamable_combo));
+	}
+
+	mimetypes = AccessibleStreamableContent_getContentTypes (streamable);
+	while (mimetypes[i] != NULL) {
+		gtk_combo_box_append_text (combo, g_strdup (mimetypes[i]));
+		gtk_combo_box_set_active (combo, i);
+		++i;
+	}
+	AccessibleStreamableContent_freeContentTypesList (streamable, mimetypes);
+	poker->streamable_combo = combo;
+	gtk_container_add (poker->streamable_container, GTK_WIDGET (combo));
+	gtk_widget_show (GTK_WIDGET (combo));
+	gtk_widget_show (GTK_WIDGET (poker->streamable_textview));
+}
+
+static void
+streamable_import_cb (GtkButton *button, Poker *poker)
+{
+	GtkTextBuffer *textbuff;
+	gchar *mime_type = gtk_combo_box_get_active_text (poker->streamable_combo);
+	AccessibleStreamableContent *streamable =
+		Accessible_getStreamableContent (poker->selected);
+	char *cbuf = g_new0 (char, 1001);
+	if (AccessibleStreamableContent_open (streamable, mime_type)) {
+		AccessibleStreamableContent_read (streamable, cbuf, 1000, 0);
+		AccessibleStreamableContent_close (streamable);
+	}
+	else g_message ("error opening content stream");
+	textbuff = GTK_TEXT_BUFFER (gtk_text_buffer_new (NULL));
+#if GTK_CHECK_VERSION (2,9,0)
+	gtk_text_buffer_register_deserialize_tagset (textbuff, NULL);
+	gtk_text_buffer_register_deserialize_tagset (textbuff, NULL);
+#endif
+	if (!strcmp ("text/plain", mime_type))
+		gtk_text_buffer_set_text (textbuff, cbuf, -1);
+#if GTK_CHECK_VERSION (2,9,0)
+	else {
+		GtkTextIter iter;
+		GdkAtom atom = gdk_atom_intern (mime_type, TRUE);
+		gint i, nf = 0;
+		GError *err = NULL;
+		GdkAtom *formats = gtk_text_buffer_get_deserialize_formats (textbuff, &nf);
+		gboolean format_ok = FALSE;
+		gtk_text_buffer_get_iter_at_offset (textbuff, &iter, 0);
+		for (i = 0; i < nf; ++i) {
+			if (!strcmp (mime_type, gdk_atom_name (formats[i]))) {
+				format_ok = TRUE;
+				break;
+			}
+		}
+		if (format_ok) {
+			gtk_text_buffer_deserialize_set_can_create_tags (textbuff, atom, TRUE);
+			if (!gtk_text_buffer_deserialize (textbuff, textbuff, 
+							  atom, 
+							  &iter,
+							  cbuf, 1000, &err))
+			{
+				g_warning ("could not deserialize mime-type %s: %s", 
+					   mime_type,
+					   err->message);
+			}
+		}
+	}
+#endif
+	gtk_text_view_set_buffer (poker->streamable_textview, textbuff);
+	g_free (cbuf);    
+}
+
+static void
 process_accessible (Poker *poker, AccessibleSelection *selection, Accessible *child, GtkTreeSelection *view_sel, long i)
 {
 	char *name, *descr;
@@ -1110,7 +1220,7 @@
 } poker_widget_names[] = {
 	{ "poker_accessible_frame",    "IDL:Accessibility/Accessible:1.0",   "A", update_if_accessible },
 	{ "poker_application_label",   "IDL:Accessibility/Application:1.0",  "ap", NULL },
-	{ "poker_streamable_frame",    "IDL:Accessibility/Streamable:1.0",   "st", NULL },
+	{ "poker_streamable_frame",    "IDL:Accessibility/StreamableContent:1.0",  "st", update_if_streamable },
 	{ "poker_component_frame",     "IDL:Accessibility/Component:1.0",    "co", update_if_component },
 	{ "poker_action_frame",        "IDL:Accessibility/Action:1.0",       "ac", update_if_action },
 	{ "poker_text_frame",          "IDL:Accessibility/Text:1.0",         "te", update_if_text },
@@ -1120,6 +1230,7 @@
 	{ "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 }
 };
 
@@ -1136,6 +1247,7 @@
 		AccessibleUnknown *unknown;
 
 		unknown = Accessible_queryInterface (accessible, poker_widget_names [i].interface_name);
+
 		if (unknown) {
 			if (str->len)
 				g_string_append (str, "|");
@@ -1654,6 +1766,35 @@
 		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");
+  	}
+  
+	{ /* streamable-content interface */
+		widget = glade_xml_get_widget (
+			poker->xml, "streamable_vbox");
+		poker->streamable_container = GTK_CONTAINER (widget);
+		widget = glade_xml_get_widget (
+			poker->xml, "streamable_viewport");
+		if (!poker->streamable_textview) {
+			poker->streamable_textview = 
+				GTK_TEXT_VIEW (gtk_text_view_new ());
+			gtk_text_view_set_wrap_mode (poker->streamable_textview,
+						     GTK_WRAP_WORD);
+			gtk_container_add (GTK_CONTAINER (widget), 
+					   GTK_WIDGET (poker->streamable_textview));
+		}
+		widget = glade_xml_get_widget (
+			poker->xml, "streamable_launch_button");
+		gtk_widget_set_sensitive (widget, FALSE);
+		g_signal_connect (
+			glade_xml_get_widget (poker->xml, "streamable_text_import_button"),
+			"clicked", G_CALLBACK (streamable_import_cb), poker);
 	}
 
 	{ /* main frame buttons */
